Collections API

Collection is a group of educational content or another collection, which an user can show, create, update and destroy.

Remove items from collection

DELETE /v1/collections/:id/items

Parameters

Name Description
collection[items] Items belongs to the collection

Request

Headers

Accept: application/json
Content-Type: application/json
Access-Token: 3EQ5r2skjZeSvXM0KBM7ng
Client: LhKSy4v-NqM2kfkhadrTWg
Uid: michel@borer.co
Host: example.org
Cookie: 

Route

DELETE /v1/collections/76/items

Body

{"collection":{"items":[{"id":228}]}}

cURL

curl "https://api.portalmec.c3sl.ufpr.br/v1/collections/76/items" -d '{"collection":{"items":[{"id":228}]}}' -X DELETE \
	-H "Accept: application/json" \
	-H "Content-Type: application/json" \
	-H "Access-Token: 3EQ5r2skjZeSvXM0KBM7ng" \
	-H "Client: LhKSy4v-NqM2kfkhadrTWg" \
	-H "Uid: michel@borer.co"

Response

Headers

X-Frame-Options: SAMEORIGIN
X-XSS-Protection: 1; mode=block
X-Content-Type-Options: nosniff
Content-Type: application/json; charset=utf-8
Set-Cookie: _session_id=cnN2dTNsZGtGb3ZHMUFteE8ydnFXTnF5SDlHQzc1S3pZdE5vQlNaRUU2aTcwVk1WL1EvYlpiZlhDb0k2anZIbHdmV09CNS91OHRLVU5TdEtzS2hoSGtBOHpkWkRXMldueDdkSE5PRTRmOENDYnZENFJYdUdOTE5SOWJJYTJHcEJxaE9YTnRJWndML29tbE1rWEdHL29oVlc0UThpSG9KRnNqSmJlOXU0ZHNuVnJwRVVsREhWVW5RWWZCcTRTMGlYLS1oM09rY0p6QlhKdG5XV3BWeXBRL29nPT0%3D--1cc6a3a9ebe01599ba5963a3536422e898412ee0; path=/; HttpOnly
Vary: Origin
ETag: W/"b38051e3f769c73044fd24b529ec053f"
Cache-Control: max-age=0, private, must-revalidate
X-Request-Id: d3eab988-eed2-4691-b2d7-a23c90571a61
X-Runtime: 0.309950
Content-Length: 9665

Status

200 OK

Body

{
  "id": 76,
  "name": "North Silva College",
  "curator": null,
  "created_at": "2019-03-08T13:44:49.283Z",
  "updated_at": "2019-03-08T13:44:49.283Z",
  "description": "Quibusdam quia fugit quos assumenda enim qui blanditiis.",
  "privacy": "public",
  "score": 0.0,
  "likes_count": 0,
  "liked": false,
  "followed": false,
  "reviewed": false,
  "complained": false,
  "review_average": 0.0,
  "thumbnail": "",
  "items_thumbnails": [

  ],
  "owner": {
    "id": 3566,
    "email": "michel@borer.co",
    "provider": "email",
    "cpf": null,
    "name": "Dr. Daniel Reis",
    "description": "Enim cupiditate eos quibusdam officia.",
    "submitter_request": "default",
    "education": "Quia modi amet itaque eligendi nulla et ratione.",
    "score": 0.0,
    "cover": "",
    "role_ids": [
      1,
      1
    ],
    "institution_ids": [

    ],
    "avatar": "",
    "dspace_url": null,
    "dspace_handle": null,
    "dspace_sets": [

    ],
    "likes_count": 0,
    "followed": false,
    "complained": false,
    "follows_count": 0,
    "learning_objects_count": 0,
    "collections_count": 1,
    "created_at": "2019-03-08T13:44:49.184Z",
    "updated_at": "2019-03-08T13:44:49.275Z",
    "terms_accepted_at": null
  },
  "tags": [
    {
      "id": 2291,
      "name": "Tag 2290",
      "created_at": "2019-03-08T13:44:49.407Z",
      "updated_at": "2019-03-08T13:44:49.407Z"
    },
    {
      "id": 2290,
      "name": "Tag 2289",
      "created_at": "2019-03-08T13:44:49.378Z",
      "updated_at": "2019-03-08T13:44:49.378Z"
    },
    {
      "id": 2289,
      "name": "Tag 2288",
      "created_at": "2019-03-08T13:44:49.349Z",
      "updated_at": "2019-03-08T13:44:49.349Z"
    },
    {
      "id": 2288,
      "name": "Tag 2287",
      "created_at": "2019-03-08T13:44:49.321Z",
      "updated_at": "2019-03-08T13:44:49.321Z"
    },
    {
      "id": 2287,
      "name": "Tag 2286",
      "created_at": "2019-03-08T13:44:49.292Z",
      "updated_at": "2019-03-08T13:44:49.292Z"
    }
  ],
  "subjects": [
    {
      "id": 8,
      "name": "Ensino Religioso",
      "created_at": "2019-03-08T13:42:18.080Z",
      "updated_at": "2019-03-08T13:42:18.080Z",
      "theme": false
    },
    {
      "id": 9,
      "name": "Filosofia",
      "created_at": "2019-03-08T13:42:18.085Z",
      "updated_at": "2019-03-08T13:42:18.085Z",
      "theme": false
    }
  ],
  "educational_stages": [
    {
      "id": 5,
      "name": "Ensino Superior",
      "created_at": "2019-03-08T13:42:18.196Z",
      "updated_at": "2019-03-08T13:42:18.196Z"
    }
  ],
  "collection_items": [
    {
      "id": 225,
      "position": 2,
      "collectionable": {
        "id": 384,
        "name": "LearningObject 384",
        "description": "Minus impedit laboriosam reiciendis. Dignissimos ut saepe ratione explicabo architecto. Et consectetur similique ut qui eum est. Et sint labore quo nihil aut. Eius iure ea dolores dolor hic enim voluptate.",
        "author": "Deneval Viana",
        "curator": null,
        "thumbnail": null,
        "object_type": "Experimento prático",
        "language": {
          "id": 3,
          "name": "Espanhol",
          "created_at": "2019-03-08T13:42:17.268Z",
          "updated_at": "2019-03-08T13:42:17.268Z",
          "code": "es"
        },
        "default_attachment_location": null,
        "default_attachment_id": null,
        "default_mime_type": null,
        "score": 0.536301317311811,
        "state": "published",
        "review_average": 0.0,
        "link": null,
        "software": null,
        "license": null,
        "liked": false,
        "likes_count": 0,
        "downloads_count": 0,
        "views_count": 0,
        "reviewed": false,
        "complained": false,
        "shares_count": 0,
        "created_at": "2019-03-08T13:44:49.463Z",
        "published_at": null,
        "terms_of_service": null,
        "updated_at": "2019-03-08T13:44:49.463Z",
        "magnetlink": null,
        "publisher": {
          "id": 3572,
          "email": null,
          "provider": "email",
          "cpf": null,
          "name": "Isaac Xavier",
          "description": "Placeat veniam qui aut ut voluptatibus soluta consectetur.",
          "submitter_request": "default",
          "education": "Consectetur aspernatur totam quo ut nisi.",
          "score": 0.0,
          "cover": "",
          "role_ids": [
            1
          ],
          "institution_ids": [

          ],
          "avatar": "",
          "dspace_url": null,
          "dspace_handle": null,
          "dspace_sets": null,
          "likes_count": 0,
          "followed": false,
          "complained": false,
          "follows_count": 0,
          "learning_objects_count": 1,
          "collections_count": 0,
          "created_at": "2019-03-08T13:44:49.445Z",
          "updated_at": "2019-03-08T13:44:49.445Z",
          "terms_accepted_at": null
        },
        "tags": [
          {
            "id": 2296,
            "name": "Tag 2295",
            "created_at": "2019-03-08T13:44:49.612Z",
            "updated_at": "2019-03-08T13:44:49.612Z"
          },
          {
            "id": 2295,
            "name": "Tag 2294",
            "created_at": "2019-03-08T13:44:49.573Z",
            "updated_at": "2019-03-08T13:44:49.573Z"
          },
          {
            "id": 2294,
            "name": "Tag 2293",
            "created_at": "2019-03-08T13:44:49.535Z",
            "updated_at": "2019-03-08T13:44:49.535Z"
          },
          {
            "id": 2293,
            "name": "Tag 2292",
            "created_at": "2019-03-08T13:44:49.504Z",
            "updated_at": "2019-03-08T13:44:49.504Z"
          },
          {
            "id": 2292,
            "name": "Tag 2291",
            "created_at": "2019-03-08T13:44:49.474Z",
            "updated_at": "2019-03-08T13:44:49.474Z"
          }
        ],
        "subjects": [
          {
            "id": 20,
            "name": "Educação Ambiental",
            "created_at": "2019-03-08T13:42:18.136Z",
            "updated_at": "2019-03-08T13:42:18.136Z",
            "theme": true
          },
          {
            "id": 22,
            "name": "Educação Especial",
            "created_at": "2019-03-08T13:42:18.145Z",
            "updated_at": "2019-03-08T13:42:18.145Z",
            "theme": true
          }
        ],
        "educational_stages": [
          {
            "id": 6,
            "name": "Outros",
            "created_at": "2019-03-08T13:42:18.200Z",
            "updated_at": "2019-03-08T13:42:18.200Z"
          }
        ],
        "attachments": [

        ]
      },
      "collectionable_type": "LearningObject"
    },
    {
      "id": 227,
      "position": 1,
      "collectionable": {
        "id": 386,
        "name": "LearningObject 386",
        "description": "Molestias voluptas aperiam voluptatibus nisi. Exercitationem assumenda enim autem. Quia enim aut dolorem rerum. Omnis voluptates et nihil alias rem facilis. Ea dolorum iure omnis corrupti eos ut.",
        "author": "Feliciano Corrêa",
        "curator": null,
        "thumbnail": null,
        "object_type": "Imagem",
        "language": {
          "id": 1,
          "name": "Português",
          "created_at": "2019-03-08T13:42:17.259Z",
          "updated_at": "2019-03-08T13:42:17.259Z",
          "code": "pt"
        },
        "default_attachment_location": null,
        "default_attachment_id": null,
        "default_mime_type": null,
        "score": 0.0942357386840228,
        "state": "published",
        "review_average": 0.0,
        "link": null,
        "software": null,
        "license": null,
        "liked": false,
        "likes_count": 0,
        "downloads_count": 0,
        "views_count": 0,
        "reviewed": false,
        "complained": false,
        "shares_count": 0,
        "created_at": "2019-03-08T13:44:50.147Z",
        "published_at": null,
        "terms_of_service": null,
        "updated_at": "2019-03-08T13:44:50.147Z",
        "magnetlink": null,
        "publisher": {
          "id": 3588,
          "email": null,
          "provider": "email",
          "cpf": null,
          "name": "Benjamin Silveira",
          "description": "Est vero qui suscipit earum.",
          "submitter_request": "default",
          "education": "Repellat aliquam dolorum aliquid ipsam nostrum.",
          "score": 0.0,
          "cover": "",
          "role_ids": [
            1
          ],
          "institution_ids": [

          ],
          "avatar": "",
          "dspace_url": null,
          "dspace_handle": null,
          "dspace_sets": null,
          "likes_count": 0,
          "followed": false,
          "complained": false,
          "follows_count": 0,
          "learning_objects_count": 1,
          "collections_count": 0,
          "created_at": "2019-03-08T13:44:50.123Z",
          "updated_at": "2019-03-08T13:44:50.123Z",
          "terms_accepted_at": null
        },
        "tags": [
          {
            "id": 2306,
            "name": "Tag 2305",
            "created_at": "2019-03-08T13:44:50.302Z",
            "updated_at": "2019-03-08T13:44:50.302Z"
          },
          {
            "id": 2305,
            "name": "Tag 2304",
            "created_at": "2019-03-08T13:44:50.268Z",
            "updated_at": "2019-03-08T13:44:50.268Z"
          },
          {
            "id": 2304,
            "name": "Tag 2303",
            "created_at": "2019-03-08T13:44:50.233Z",
            "updated_at": "2019-03-08T13:44:50.233Z"
          },
          {
            "id": 2303,
            "name": "Tag 2302",
            "created_at": "2019-03-08T13:44:50.196Z",
            "updated_at": "2019-03-08T13:44:50.196Z"
          },
          {
            "id": 2302,
            "name": "Tag 2301",
            "created_at": "2019-03-08T13:44:50.160Z",
            "updated_at": "2019-03-08T13:44:50.160Z"
          }
        ],
        "subjects": [
          {
            "id": 15,
            "name": "Matemática",
            "created_at": "2019-03-08T13:42:18.112Z",
            "updated_at": "2019-03-08T13:42:18.112Z",
            "theme": false
          },
          {
            "id": 12,
            "name": "História",
            "created_at": "2019-03-08T13:42:18.097Z",
            "updated_at": "2019-03-08T13:42:18.097Z",
            "theme": false
          }
        ],
        "educational_stages": [
          {
            "id": 4,
            "name": "Ensino Médio",
            "created_at": "2019-03-08T13:42:18.192Z",
            "updated_at": "2019-03-08T13:42:18.192Z"
          }
        ],
        "attachments": [

        ]
      },
      "collectionable_type": "LearningObject"
    },
    {
      "id": 226,
      "position": 4,
      "collectionable": {
        "id": 385,
        "name": "LearningObject 385",
        "description": "Optio aut sunt tempora beatae saepe dolor. Suscipit praesentium quia. Omnis mollitia non sed corrupti minus.",
        "author": "Kléber Pereira",
        "curator": null,
        "thumbnail": null,
        "object_type": "Vídeo",
        "language": {
          "id": 9,
          "name": "Japonês",
          "created_at": "2019-03-08T13:42:17.293Z",
          "updated_at": "2019-03-08T13:42:17.293Z",
          "code": "jp"
        },
        "default_attachment_location": null,
        "default_attachment_id": null,
        "default_mime_type": null,
        "score": 0.0543272296195297,
        "state": "published",
        "review_average": 0.0,
        "link": null,
        "software": null,
        "license": null,
        "liked": false,
        "likes_count": 0,
        "downloads_count": 0,
        "views_count": 0,
        "reviewed": false,
        "complained": false,
        "shares_count": 0,
        "created_at": "2019-03-08T13:44:49.790Z",
        "published_at": null,
        "terms_of_service": null,
        "updated_at": "2019-03-08T13:44:49.790Z",
        "magnetlink": null,
        "publisher": {
          "id": 3580,
          "email": null,
          "provider": "email",
          "cpf": null,
          "name": "Esther Franco Neto",
          "description": "Nesciunt commodi qui odio minima natus laboriosam.",
          "submitter_request": "default",
          "education": "Quis voluptatem excepturi voluptas facilis tempora voluptatem laudantium esse.",
          "score": 0.0,
          "cover": "",
          "role_ids": [
            1
          ],
          "institution_ids": [

          ],
          "avatar": "",
          "dspace_url": null,
          "dspace_handle": null,
          "dspace_sets": null,
          "likes_count": 0,
          "followed": false,
          "complained": false,
          "follows_count": 0,
          "learning_objects_count": 1,
          "collections_count": 0,
          "created_at": "2019-03-08T13:44:49.772Z",
          "updated_at": "2019-03-08T13:44:49.772Z",
          "terms_accepted_at": null
        },
        "tags": [
          {
            "id": 2301,
            "name": "Tag 2300",
            "created_at": "2019-03-08T13:44:49.923Z",
            "updated_at": "2019-03-08T13:44:49.923Z"
          },
          {
            "id": 2300,
            "name": "Tag 2299",
            "created_at": "2019-03-08T13:44:49.890Z",
            "updated_at": "2019-03-08T13:44:49.890Z"
          },
          {
            "id": 2299,
            "name": "Tag 2298",
            "created_at": "2019-03-08T13:44:49.861Z",
            "updated_at": "2019-03-08T13:44:49.861Z"
          },
          {
            "id": 2298,
            "name": "Tag 2297",
            "created_at": "2019-03-08T13:44:49.831Z",
            "updated_at": "2019-03-08T13:44:49.831Z"
          },
          {
            "id": 2297,
            "name": "Tag 2296",
            "created_at": "2019-03-08T13:44:49.800Z",
            "updated_at": "2019-03-08T13:44:49.800Z"
          }
        ],
        "subjects": [
          {
            "id": 14,
            "name": "Outras Línguas",
            "created_at": "2019-03-08T13:42:18.107Z",
            "updated_at": "2019-03-08T13:42:18.107Z",
            "theme": false
          },
          {
            "id": 18,
            "name": "Outros",
            "created_at": "2019-03-08T13:42:18.125Z",
            "updated_at": "2019-03-08T13:42:18.125Z",
            "theme": false
          }
        ],
        "educational_stages": [
          {
            "id": 5,
            "name": "Ensino Superior",
            "created_at": "2019-03-08T13:42:18.196Z",
            "updated_at": "2019-03-08T13:42:18.196Z"
          }
        ],
        "attachments": [

        ]
      },
      "collectionable_type": "LearningObject"
    }
  ]
}