Collections API

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

Updating a collection

PUT /v1/collections/:id

Parameters

Name Description
id The id of the collection
name The collection name
Collection The collection to be updated

Request

Headers

Accept: application/json
Content-Type: application/json
Access-Token: C1Y9mum61Iza43mYTHzi2w
Client: Vaj5AnIVKU58dKrqWlq6zA
Uid: elmer@beckerhomenick.info
Host: example.org
Cookie: 

Route

PUT /v1/collections/126

Body

{"name":"Nicolas Carvalho"}

cURL

curl "https://api.portalmec.c3sl.ufpr.br/v1/collections/126" -d '{"name":"Nicolas Carvalho"}' -X PUT \
	-H "Accept: application/json" \
	-H "Content-Type: application/json" \
	-H "Access-Token: C1Y9mum61Iza43mYTHzi2w" \
	-H "Client: Vaj5AnIVKU58dKrqWlq6zA" \
	-H "Uid: elmer@beckerhomenick.info"

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=UkZMdkV3bXUybnRkNzU0YjRUbGlUOTQ1enBvN0tnNDQ1UGU3LythbTlEZUk1ZzZOcnJVRTBrNkFnWDZFYTNnb25wRmRleWNDTUViM1drQ29LSWNhTjJ6Qll2ZEhFOFoxQzdwcFp2Wi9qVWtpcVQ0cXNuMm9oZkVrdXhvanFlZ0FUcXZ1Zmg1VEFFS25acWpsSUhDK2psN3FwU0lWWEFJU01wSGlJcmdnTi93QUlSR3ZEUnRMNHFmR1d0UVU2amQvLS0zMXhPL3R0Q096TnVhMEs1S040TzZRPT0%3D--8dc0617a646269b6eaee8b1fc1caaf038e113d42; path=/; HttpOnly
Vary: Origin
ETag: W/"11a6a23cf0e0eecea5507366d2aa34ae"
Cache-Control: max-age=0, private, must-revalidate
X-Request-Id: 03489aa7-ef91-4a3c-aadf-db399b944bd8
X-Runtime: 0.322027
Content-Length: 9741

Status

200 OK

Body

{
  "id": 126,
  "name": "Nicolas Carvalho",
  "curator": null,
  "created_at": "2019-10-31T13:34:48.048Z",
  "updated_at": "2019-10-31T13:34:49.691Z",
  "description": "Et et repellat optio excepturi.",
  "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": 5461,
    "email": "elmer@beckerhomenick.info",
    "provider": "email",
    "cpf": null,
    "name": "Marcelo Araújo",
    "description": "Error velit facere earum accusantium.",
    "submitter_request": "default",
    "education": "Magni voluptatum quia qui repellat aliquam.",
    "score": 0.0,
    "cover": "",
    "role_ids": [
      1,
      8
    ],
    "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-10-31T13:34:47.942Z",
    "updated_at": "2019-10-31T13:34:48.038Z",
    "terms_accepted_at": null,
    "state": "active",
    "times_blocked": 0,
    "suspended_at": null,
    "reactivated_at": null,
    "ask_teacher_question": true
  },
  "tags": [
    {
      "id": 3536,
      "name": "Tag 3535",
      "created_at": "2019-10-31T13:34:48.256Z",
      "updated_at": "2019-10-31T13:34:48.256Z"
    },
    {
      "id": 3535,
      "name": "Tag 3534",
      "created_at": "2019-10-31T13:34:48.210Z",
      "updated_at": "2019-10-31T13:34:48.210Z"
    },
    {
      "id": 3534,
      "name": "Tag 3533",
      "created_at": "2019-10-31T13:34:48.167Z",
      "updated_at": "2019-10-31T13:34:48.167Z"
    },
    {
      "id": 3533,
      "name": "Tag 3532",
      "created_at": "2019-10-31T13:34:48.124Z",
      "updated_at": "2019-10-31T13:34:48.124Z"
    },
    {
      "id": 3532,
      "name": "Tag 3531",
      "created_at": "2019-10-31T13:34:48.060Z",
      "updated_at": "2019-10-31T13:34:48.060Z"
    }
  ],
  "subjects": [
    {
      "id": 15,
      "name": "Matemática",
      "created_at": "2019-10-31T13:29:44.864Z",
      "updated_at": "2019-10-31T13:29:44.864Z",
      "theme": false
    },
    {
      "id": 5,
      "name": "Biologia",
      "created_at": "2019-10-31T13:29:44.717Z",
      "updated_at": "2019-10-31T13:29:44.717Z",
      "theme": false
    }
  ],
  "educational_stages": [
    {
      "id": 3,
      "name": "Ensino Fundamental II  (do 6º até o 9º ano)",
      "created_at": "2019-10-31T13:29:45.027Z",
      "updated_at": "2019-10-31T13:29:45.027Z"
    }
  ],
  "collection_items": [
    {
      "id": 377,
      "position": 2,
      "collectionable": {
        "id": 584,
        "name": "LearningObject 584",
        "description": "Laudantium vero quasi quia et quaerat aspernatur. Officiis consectetur rerum delectus illum. Iusto sequi laboriosam et voluptas adipisci.",
        "author": "Srta. Heloísa Batista",
        "curator": null,
        "thumbnail": null,
        "object_type": "Software Educacional",
        "language": [
          {
            "id": 2,
            "name": "Inglês",
            "created_at": "2019-10-31T13:29:42.713Z",
            "updated_at": "2019-10-31T13:29:42.713Z",
            "code": "en"
          }
        ],
        "default_attachment_location": null,
        "default_attachment_id": null,
        "default_mime_type": null,
        "score": 0.701815077279882,
        "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-10-31T13:34:48.731Z",
        "published_at": null,
        "terms_of_service": null,
        "updated_at": "2019-10-31T13:34:48.731Z",
        "magnetlink": null,
        "publisher": {
          "id": 5475,
          "email": null,
          "provider": "email",
          "cpf": null,
          "name": "Helena Nunes Neto",
          "description": "Et in pariatur nam sequi.",
          "submitter_request": "default",
          "education": "Dolores unde porro officia qui quasi amet a eos.",
          "score": 0.0,
          "cover": "",
          "role_ids": [
            8
          ],
          "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-10-31T13:34:48.705Z",
          "updated_at": "2019-10-31T13:34:48.705Z",
          "terms_accepted_at": null,
          "state": "active"
        },
        "tags": [
          {
            "id": 3546,
            "name": "Tag 3545",
            "created_at": "2019-10-31T13:34:48.913Z",
            "updated_at": "2019-10-31T13:34:48.913Z"
          },
          {
            "id": 3545,
            "name": "Tag 3544",
            "created_at": "2019-10-31T13:34:48.870Z",
            "updated_at": "2019-10-31T13:34:48.870Z"
          },
          {
            "id": 3544,
            "name": "Tag 3543",
            "created_at": "2019-10-31T13:34:48.828Z",
            "updated_at": "2019-10-31T13:34:48.828Z"
          },
          {
            "id": 3543,
            "name": "Tag 3542",
            "created_at": "2019-10-31T13:34:48.786Z",
            "updated_at": "2019-10-31T13:34:48.786Z"
          },
          {
            "id": 3542,
            "name": "Tag 3541",
            "created_at": "2019-10-31T13:34:48.747Z",
            "updated_at": "2019-10-31T13:34:48.747Z"
          }
        ],
        "subjects": [
          {
            "id": 6,
            "name": "Ciências da Natureza",
            "created_at": "2019-10-31T13:29:44.728Z",
            "updated_at": "2019-10-31T13:29:44.728Z",
            "theme": false
          },
          {
            "id": 23,
            "name": "Educação Indígena",
            "created_at": "2019-10-31T13:29:44.948Z",
            "updated_at": "2019-10-31T13:29:44.948Z",
            "theme": true
          }
        ],
        "educational_stages": [
          {
            "id": 3,
            "name": "Ensino Fundamental II  (do 6º até o 9º ano)",
            "created_at": "2019-10-31T13:29:45.027Z",
            "updated_at": "2019-10-31T13:29:45.027Z"
          }
        ],
        "attachments": [

        ]
      },
      "collectionable_type": "LearningObject"
    },
    {
      "id": 376,
      "position": 12,
      "collectionable": {
        "id": 583,
        "name": "LearningObject 583",
        "description": "Qui nulla sit voluptas. Fugit commodi et natus quo. Illum optio sint facere rerum adipisci nam unde. Et aut amet. Temporibus consequatur quia ea.",
        "author": "Deneval Fogaça",
        "curator": null,
        "thumbnail": null,
        "object_type": "Jogo",
        "language": [
          {
            "id": 10,
            "name": "Outro",
            "created_at": "2019-10-31T13:29:42.816Z",
            "updated_at": "2019-10-31T13:29:42.816Z",
            "code": "Outro"
          }
        ],
        "default_attachment_location": null,
        "default_attachment_id": null,
        "default_mime_type": null,
        "score": 0.19438652826885,
        "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-10-31T13:34:48.334Z",
        "published_at": null,
        "terms_of_service": null,
        "updated_at": "2019-10-31T13:34:48.334Z",
        "magnetlink": null,
        "publisher": {
          "id": 5467,
          "email": null,
          "provider": "email",
          "cpf": null,
          "name": "Dr. Vicente Dias",
          "description": "Fugiat et voluptas odio delectus.",
          "submitter_request": "default",
          "education": "Doloremque quos unde fugit omnis omnis.",
          "score": 0.0,
          "cover": "",
          "role_ids": [
            8
          ],
          "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-10-31T13:34:48.309Z",
          "updated_at": "2019-10-31T13:34:48.309Z",
          "terms_accepted_at": null,
          "state": "active"
        },
        "tags": [
          {
            "id": 3541,
            "name": "Tag 3540",
            "created_at": "2019-10-31T13:34:48.513Z",
            "updated_at": "2019-10-31T13:34:48.513Z"
          },
          {
            "id": 3540,
            "name": "Tag 3539",
            "created_at": "2019-10-31T13:34:48.475Z",
            "updated_at": "2019-10-31T13:34:48.475Z"
          },
          {
            "id": 3539,
            "name": "Tag 3538",
            "created_at": "2019-10-31T13:34:48.437Z",
            "updated_at": "2019-10-31T13:34:48.437Z"
          },
          {
            "id": 3538,
            "name": "Tag 3537",
            "created_at": "2019-10-31T13:34:48.394Z",
            "updated_at": "2019-10-31T13:34:48.394Z"
          },
          {
            "id": 3537,
            "name": "Tag 3536",
            "created_at": "2019-10-31T13:34:48.351Z",
            "updated_at": "2019-10-31T13:34:48.351Z"
          }
        ],
        "subjects": [
          {
            "id": 24,
            "name": "Educação Quilombola",
            "created_at": "2019-10-31T13:29:44.958Z",
            "updated_at": "2019-10-31T13:29:44.958Z",
            "theme": true
          },
          {
            "id": 16,
            "name": "Química",
            "created_at": "2019-10-31T13:29:44.874Z",
            "updated_at": "2019-10-31T13:29:44.874Z",
            "theme": false
          }
        ],
        "educational_stages": [
          {
            "id": 4,
            "name": "Ensino Médio",
            "created_at": "2019-10-31T13:29:45.043Z",
            "updated_at": "2019-10-31T13:29:45.043Z"
          }
        ],
        "attachments": [

        ]
      },
      "collectionable_type": "LearningObject"
    },
    {
      "id": 378,
      "position": 9,
      "collectionable": {
        "id": 585,
        "name": "LearningObject 585",
        "description": "Eveniet hic nihil aspernatur amet animi. Non perspiciatis cumque expedita unde consectetur voluptatem. Aspernatur saepe magni ipsum at aut repellat deleniti.",
        "author": "Sr. Letícia Rezende",
        "curator": null,
        "thumbnail": null,
        "object_type": "Vídeo",
        "language": [
          {
            "id": 7,
            "name": "Mandarim",
            "created_at": "2019-10-31T13:29:42.784Z",
            "updated_at": "2019-10-31T13:29:42.784Z",
            "code": "zh"
          }
        ],
        "default_attachment_location": null,
        "default_attachment_id": null,
        "default_mime_type": null,
        "score": 0.175492100296975,
        "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-10-31T13:34:49.173Z",
        "published_at": null,
        "terms_of_service": null,
        "updated_at": "2019-10-31T13:34:49.173Z",
        "magnetlink": null,
        "publisher": {
          "id": 5483,
          "email": null,
          "provider": "email",
          "cpf": null,
          "name": "Melissa Ambrósio",
          "description": "Est exercitationem sit qui laboriosam impedit.",
          "submitter_request": "default",
          "education": "Sit iste temporibus ipsa id.",
          "score": 0.0,
          "cover": "",
          "role_ids": [
            8
          ],
          "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-10-31T13:34:49.146Z",
          "updated_at": "2019-10-31T13:34:49.146Z",
          "terms_accepted_at": null,
          "state": "active"
        },
        "tags": [
          {
            "id": 3551,
            "name": "Tag 3550",
            "created_at": "2019-10-31T13:34:49.352Z",
            "updated_at": "2019-10-31T13:34:49.352Z"
          },
          {
            "id": 3550,
            "name": "Tag 3549",
            "created_at": "2019-10-31T13:34:49.311Z",
            "updated_at": "2019-10-31T13:34:49.311Z"
          },
          {
            "id": 3549,
            "name": "Tag 3548",
            "created_at": "2019-10-31T13:34:49.268Z",
            "updated_at": "2019-10-31T13:34:49.268Z"
          },
          {
            "id": 3548,
            "name": "Tag 3547",
            "created_at": "2019-10-31T13:34:49.226Z",
            "updated_at": "2019-10-31T13:34:49.226Z"
          },
          {
            "id": 3547,
            "name": "Tag 3546",
            "created_at": "2019-10-31T13:34:49.189Z",
            "updated_at": "2019-10-31T13:34:49.189Z"
          }
        ],
        "subjects": [
          {
            "id": 20,
            "name": "Educação Ambiental",
            "created_at": "2019-10-31T13:29:44.917Z",
            "updated_at": "2019-10-31T13:29:44.917Z",
            "theme": true
          },
          {
            "id": 19,
            "name": "Direitos Humanos",
            "created_at": "2019-10-31T13:29:44.907Z",
            "updated_at": "2019-10-31T13:29:44.907Z",
            "theme": true
          }
        ],
        "educational_stages": [
          {
            "id": 6,
            "name": "Outros",
            "created_at": "2019-10-31T13:29:45.060Z",
            "updated_at": "2019-10-31T13:29:45.060Z"
          }
        ],
        "attachments": [

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