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: XlRMj4vjXup53V93vzs5Hw
Client: E32LjloWvfC859d7LWC7ew
Uid: floyd@rempel.co
Host: example.org
Cookie: 

Route

PUT /v1/collections/126

Body

{"name":"Eduarda Saraiva"}

cURL

curl "https://api.portalmec.c3sl.ufpr.br/v1/collections/126" -d '{"name":"Eduarda Saraiva"}' -X PUT \
	-H "Accept: application/json" \
	-H "Content-Type: application/json" \
	-H "Access-Token: XlRMj4vjXup53V93vzs5Hw" \
	-H "Client: E32LjloWvfC859d7LWC7ew" \
	-H "Uid: floyd@rempel.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=VDV0UlhmaURFcXBWb29KcWlpczkyQUE1VmE1MmNlRXVYRXRNMGhvUGUvUFh0Z2tMbzl4aXd3VjRBd1hFcVpyVFZNaXRwTWZHMzBmZlRmWTFLTmZ6bVpqOTczS0xvSkZibUJjT2QrSzZROUNyV3dScERYallxOUQ2b2hOWi9hTlJLL1VKQ1F6YTVEMmNXbVNPN1NHQTdpaGEya3JrenFKQUVNUENrNmlMYkJSWDJxWGxCbURRbEN2cnE2Kzc3QnZ6LS1OQTg2N2NDZzV3SS9WVm8wTGV1Z09BPT0%3D--caafa1d318e2589a32b7069656ff50e8bb3d08f0; path=/; HttpOnly
Vary: Origin
ETag: W/"3ca7bd16e4b79c2957b76c0d7880069e"
Cache-Control: max-age=0, private, must-revalidate
X-Request-Id: 60b283d7-832e-41a8-b276-8e9130b9a27f
X-Runtime: 0.284958
Content-Length: 9825

Status

200 OK

Body

{
  "id": 126,
  "name": "Eduarda Saraiva",
  "curator": null,
  "created_at": "2020-10-21T20:39:38.086Z",
  "updated_at": "2020-10-21T20:39:39.472Z",
  "description": "Ab facilis aliquam nisi qui hic.",
  "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": "floyd@rempel.co",
    "provider": "email",
    "cpf": null,
    "name": "Sr. Washington Ramos",
    "description": "Quisquam ducimus at quod consequatur aliquam vel.",
    "submitter_request": "default",
    "education": "Qui quia voluptas accusamus eum incidunt similique.",
    "score": 0.0,
    "cover": "",
    "role_ids": [
      8,
      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": "2020-10-21T20:39:37.983Z",
    "updated_at": "2020-10-21T20:39:38.077Z",
    "terms_accepted_at": null,
    "state": "active",
    "times_blocked": 0,
    "suspended_at": null,
    "reactivated_at": null,
    "ask_teacher_question": true
  },
  "tags": [
    {
      "id": 3532,
      "name": "Tag 3531",
      "created_at": "2020-10-21T20:39:38.100Z",
      "updated_at": "2020-10-21T20:39:38.100Z"
    },
    {
      "id": 3533,
      "name": "Tag 3532",
      "created_at": "2020-10-21T20:39:38.135Z",
      "updated_at": "2020-10-21T20:39:38.135Z"
    },
    {
      "id": 3534,
      "name": "Tag 3533",
      "created_at": "2020-10-21T20:39:38.168Z",
      "updated_at": "2020-10-21T20:39:38.168Z"
    },
    {
      "id": 3535,
      "name": "Tag 3534",
      "created_at": "2020-10-21T20:39:38.202Z",
      "updated_at": "2020-10-21T20:39:38.202Z"
    },
    {
      "id": 3536,
      "name": "Tag 3535",
      "created_at": "2020-10-21T20:39:38.240Z",
      "updated_at": "2020-10-21T20:39:38.240Z"
    }
  ],
  "subjects": [
    {
      "id": 10,
      "name": "Física",
      "created_at": "2020-10-21T20:35:11.090Z",
      "updated_at": "2020-10-21T20:35:11.090Z",
      "theme": false
    },
    {
      "id": 23,
      "name": "Educação Indígena",
      "created_at": "2020-10-21T20:35:11.203Z",
      "updated_at": "2020-10-21T20:35:11.203Z",
      "theme": true
    }
  ],
  "educational_stages": [
    {
      "id": 4,
      "name": "Ensino Médio",
      "created_at": "2020-10-21T20:35:11.282Z",
      "updated_at": "2020-10-21T20:35:11.282Z"
    }
  ],
  "collection_items": [
    {
      "id": 376,
      "position": 1,
      "collectionable": {
        "id": 583,
        "name": "LearningObject 583",
        "description": "Incidunt sit est est ut. Consectetur blanditiis voluptatem est fugiat labore cumque et. Modi maiores ea atque necessitatibus pariatur in eius. Recusandae harum qui alias explicabo eum.",
        "author": "Cecília Corrêa Filho",
        "curator": null,
        "thumbnail": null,
        "object_type": "Software Educacional",
        "language": [
          {
            "id": 6,
            "name": "Italiano",
            "created_at": "2020-10-21T20:35:09.516Z",
            "updated_at": "2020-10-21T20:35:09.516Z",
            "code": "it"
          }
        ],
        "default_attachment_location": null,
        "default_attachment_id": null,
        "submission_id": null,
        "default_mime_type": null,
        "score": 0.897265765041072,
        "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": "2020-10-21T20:39:38.311Z",
        "published_at": null,
        "terms_of_service": null,
        "updated_at": "2020-10-21T20:39:38.311Z",
        "magnetlink": null,
        "publisher": {
          "id": 5467,
          "email": null,
          "provider": "email",
          "cpf": null,
          "name": "Elísio Moraes",
          "description": "Quia porro amet odio in aliquam omnis.",
          "submitter_request": "default",
          "education": "Velit a veniam ipsa culpa.",
          "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": "2020-10-21T20:39:38.289Z",
          "updated_at": "2020-10-21T20:39:38.289Z",
          "terms_accepted_at": null,
          "state": "active"
        },
        "tags": [
          {
            "id": 3537,
            "name": "Tag 3536",
            "created_at": "2020-10-21T20:39:38.333Z",
            "updated_at": "2020-10-21T20:39:38.333Z"
          },
          {
            "id": 3538,
            "name": "Tag 3537",
            "created_at": "2020-10-21T20:39:38.368Z",
            "updated_at": "2020-10-21T20:39:38.368Z"
          },
          {
            "id": 3539,
            "name": "Tag 3538",
            "created_at": "2020-10-21T20:39:38.406Z",
            "updated_at": "2020-10-21T20:39:38.406Z"
          },
          {
            "id": 3540,
            "name": "Tag 3539",
            "created_at": "2020-10-21T20:39:38.440Z",
            "updated_at": "2020-10-21T20:39:38.440Z"
          },
          {
            "id": 3541,
            "name": "Tag 3540",
            "created_at": "2020-10-21T20:39:38.478Z",
            "updated_at": "2020-10-21T20:39:38.478Z"
          }
        ],
        "subjects": [
          {
            "id": 15,
            "name": "Matemática",
            "created_at": "2020-10-21T20:35:11.134Z",
            "updated_at": "2020-10-21T20:35:11.134Z",
            "theme": false
          },
          {
            "id": 21,
            "name": "Educação do Campo",
            "created_at": "2020-10-21T20:35:11.185Z",
            "updated_at": "2020-10-21T20:35:11.185Z",
            "theme": true
          }
        ],
        "educational_stages": [
          {
            "id": 3,
            "name": "Ensino Fundamental II  (do 6º até o 9º ano)",
            "created_at": "2020-10-21T20:35:11.274Z",
            "updated_at": "2020-10-21T20:35:11.274Z"
          }
        ],
        "attachments": [

        ]
      },
      "collectionable_type": "LearningObject"
    },
    {
      "id": 377,
      "position": 7,
      "collectionable": {
        "id": 584,
        "name": "LearningObject 584",
        "description": "Laborum est aut quod repellendus saepe cumque. Et fuga est quas nihil. Est ad et quod sint at asperiores. Aliquid dolorem magnam voluptas vero repellat aut. Repellat non qui sint deleniti qui in.",
        "author": "Srta. Frederico Alves",
        "curator": null,
        "thumbnail": null,
        "object_type": "Mapa",
        "language": [
          {
            "id": 5,
            "name": "Alemão",
            "created_at": "2020-10-21T20:35:09.507Z",
            "updated_at": "2020-10-21T20:35:09.507Z",
            "code": "de"
          }
        ],
        "default_attachment_location": null,
        "default_attachment_id": null,
        "submission_id": null,
        "default_mime_type": null,
        "score": 0.0878659044757503,
        "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": "2020-10-21T20:39:38.682Z",
        "published_at": null,
        "terms_of_service": null,
        "updated_at": "2020-10-21T20:39:38.682Z",
        "magnetlink": null,
        "publisher": {
          "id": 5475,
          "email": null,
          "provider": "email",
          "cpf": null,
          "name": "Lucca Custódio",
          "description": "Quidem illum voluptates laborum odit qui.",
          "submitter_request": "default",
          "education": "Repudiandae laboriosam modi vitae.",
          "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": "2020-10-21T20:39:38.659Z",
          "updated_at": "2020-10-21T20:39:38.659Z",
          "terms_accepted_at": null,
          "state": "active"
        },
        "tags": [
          {
            "id": 3542,
            "name": "Tag 3541",
            "created_at": "2020-10-21T20:39:38.697Z",
            "updated_at": "2020-10-21T20:39:38.697Z"
          },
          {
            "id": 3543,
            "name": "Tag 3542",
            "created_at": "2020-10-21T20:39:38.732Z",
            "updated_at": "2020-10-21T20:39:38.732Z"
          },
          {
            "id": 3544,
            "name": "Tag 3543",
            "created_at": "2020-10-21T20:39:38.766Z",
            "updated_at": "2020-10-21T20:39:38.766Z"
          },
          {
            "id": 3545,
            "name": "Tag 3544",
            "created_at": "2020-10-21T20:39:38.804Z",
            "updated_at": "2020-10-21T20:39:38.804Z"
          },
          {
            "id": 3546,
            "name": "Tag 3545",
            "created_at": "2020-10-21T20:39:38.839Z",
            "updated_at": "2020-10-21T20:39:38.839Z"
          }
        ],
        "subjects": [
          {
            "id": 10,
            "name": "Física",
            "created_at": "2020-10-21T20:35:11.090Z",
            "updated_at": "2020-10-21T20:35:11.090Z",
            "theme": false
          },
          {
            "id": 11,
            "name": "Geografia",
            "created_at": "2020-10-21T20:35:11.098Z",
            "updated_at": "2020-10-21T20:35:11.098Z",
            "theme": false
          }
        ],
        "educational_stages": [
          {
            "id": 5,
            "name": "Ensino Superior",
            "created_at": "2020-10-21T20:35:11.291Z",
            "updated_at": "2020-10-21T20:35:11.291Z"
          }
        ],
        "attachments": [

        ]
      },
      "collectionable_type": "LearningObject"
    },
    {
      "id": 378,
      "position": 8,
      "collectionable": {
        "id": 585,
        "name": "LearningObject 585",
        "description": "Ut rem sed impedit ea corporis. Occaecati tenetur sit deleniti. Non nemo hic nam rerum inventore assumenda. Qui ducimus et sed.",
        "author": "Tertuliano Ramos",
        "curator": null,
        "thumbnail": null,
        "object_type": "Software Educacional",
        "language": [
          {
            "id": 10,
            "name": "Outro",
            "created_at": "2020-10-21T20:35:09.555Z",
            "updated_at": "2020-10-21T20:35:09.555Z",
            "code": "Outro"
          }
        ],
        "default_attachment_location": null,
        "default_attachment_id": null,
        "submission_id": null,
        "default_mime_type": null,
        "score": 0.364325057752569,
        "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": "2020-10-21T20:39:39.056Z",
        "published_at": null,
        "terms_of_service": null,
        "updated_at": "2020-10-21T20:39:39.056Z",
        "magnetlink": null,
        "publisher": {
          "id": 5483,
          "email": null,
          "provider": "email",
          "cpf": null,
          "name": "Dalila Dias",
          "description": "Laborum porro et quibusdam rerum ex autem in quo.",
          "submitter_request": "default",
          "education": "Aliquam sit aut totam est.",
          "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": "2020-10-21T20:39:39.035Z",
          "updated_at": "2020-10-21T20:39:39.035Z",
          "terms_accepted_at": null,
          "state": "active"
        },
        "tags": [
          {
            "id": 3547,
            "name": "Tag 3546",
            "created_at": "2020-10-21T20:39:39.070Z",
            "updated_at": "2020-10-21T20:39:39.070Z"
          },
          {
            "id": 3548,
            "name": "Tag 3547",
            "created_at": "2020-10-21T20:39:39.102Z",
            "updated_at": "2020-10-21T20:39:39.102Z"
          },
          {
            "id": 3549,
            "name": "Tag 3548",
            "created_at": "2020-10-21T20:39:39.135Z",
            "updated_at": "2020-10-21T20:39:39.135Z"
          },
          {
            "id": 3550,
            "name": "Tag 3549",
            "created_at": "2020-10-21T20:39:39.170Z",
            "updated_at": "2020-10-21T20:39:39.170Z"
          },
          {
            "id": 3551,
            "name": "Tag 3550",
            "created_at": "2020-10-21T20:39:39.204Z",
            "updated_at": "2020-10-21T20:39:39.204Z"
          }
        ],
        "subjects": [
          {
            "id": 18,
            "name": "Outros",
            "created_at": "2020-10-21T20:35:11.160Z",
            "updated_at": "2020-10-21T20:35:11.160Z",
            "theme": false
          },
          {
            "id": 4,
            "name": "Arte",
            "created_at": "2020-10-21T20:35:11.040Z",
            "updated_at": "2020-10-21T20:35:11.040Z",
            "theme": false
          }
        ],
        "educational_stages": [
          {
            "id": 4,
            "name": "Ensino Médio",
            "created_at": "2020-10-21T20:35:11.282Z",
            "updated_at": "2020-10-21T20:35:11.282Z"
          }
        ],
        "attachments": [

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