Collections API

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

Getting all collection versions

GET /v1/collections/:id/versions

Request

Headers

Accept: application/json
Content-Type: application/json
Access-Token: D3LxqLt5SFYclZinzfs9eQ
Client: l-y2jr9cGaKVq6uEU_xIKA
Uid: shania@jakubowski.co
Host: example.org
Cookie: 

Route

GET /v1/collections/113/versions

cURL

curl -g "https://api.portalmec.c3sl.ufpr.br/v1/collections/113/versions" -X GET \
	-H "Accept: application/json" \
	-H "Content-Type: application/json" \
	-H "Access-Token: D3LxqLt5SFYclZinzfs9eQ" \
	-H "Client: l-y2jr9cGaKVq6uEU_xIKA" \
	-H "Uid: shania@jakubowski.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=czV2TlZHelhBMlYwb2JkYmV1SGQ4b2FoNmZxajBqYzI4c1FlNURReUNZK2N3VTVxclFMdGxkQjZ5d1VDSVVLTkpjcnQ1dVozNjBpNDFoNWxrTEpHL1NIc1h0UUdVS3FWMEg2WnVpaEZua2tXd0R2cU9TVmo1M3RCaHVEb3VCcm1iYU9aRGgwUDFBSFNGWHpNR2hCSCtOSW45WnBZUWNiYWkvSGl6d1RHQkdVMURNbGUvbDJzL0pzT3JJVVVnclhtLS12RittVUFFQzBmVTNZZmRkZFJIOUp3PT0%3D--1fd9c73c9262f8a807f84855a53cb495699ab570; path=/; HttpOnly
Vary: Origin
ETag: W/"4427666385a47a2fb786a8c228b3dbc1"
Cache-Control: max-age=0, private, must-revalidate
X-Request-Id: e94aa9b0-a200-4bb0-beff-46b884ede6df
X-Runtime: 0.135619
Content-Length: 2000

Status

200 OK

Body

[
  {
    "id": 6713,
    "item": {
      "id": 113,
      "name": "Sr. Marcela Ferreira",
      "description": "Id debitis temporibus et quibusdam quaerat autem facilis.",
      "privacy": "public",
      "owner_type": "User",
      "owner_id": 4975,
      "created_at": "2019-03-08T13:45:50.546Z",
      "updated_at": "2019-03-08T13:45:51.753Z",
      "views_count": 0,
      "downloads_count": 0,
      "likes_count": 0,
      "shares_count": 0,
      "score": 0.0,
      "follows_count": 0,
      "thumbnail_file_name": null,
      "thumbnail_content_type": null,
      "thumbnail_file_size": null,
      "thumbnail_updated_at": null,
      "deleted_at": null,
      "review_average": 0.0,
      "curator": null
    },
    "event": "create",
    "whodunnit": null,
    "created_at": "2019-03-08T13:45:50.546Z",
    "object": {
      "id": 6713,
      "item_type": "Collection",
      "item_id": 113,
      "event": "create",
      "whodunnit": null,
      "object": null,
      "created_at": "2019-03-08T13:45:50.546Z"
    }
  },
  {
    "id": 6752,
    "item": {
      "id": 113,
      "name": "Sr. Marcela Ferreira",
      "description": "Id debitis temporibus et quibusdam quaerat autem facilis.",
      "privacy": "public",
      "owner_type": "User",
      "owner_id": 4975,
      "created_at": "2019-03-08T13:45:50.546Z",
      "updated_at": "2019-03-08T13:45:51.753Z",
      "views_count": 0,
      "downloads_count": 0,
      "likes_count": 0,
      "shares_count": 0,
      "score": 0.0,
      "follows_count": 0,
      "thumbnail_file_name": null,
      "thumbnail_content_type": null,
      "thumbnail_file_size": null,
      "thumbnail_updated_at": null,
      "deleted_at": null,
      "review_average": 0.0,
      "curator": null
    },
    "event": "update",
    "whodunnit": null,
    "created_at": "2019-03-08T13:45:51.753Z",
    "object": {
      "id": 6752,
      "item_type": "Collection",
      "item_id": 113,
      "event": "update",
      "whodunnit": null,
      "object": "---\nid: 113\nname: Eastern Moura\ndescription: Id debitis temporibus et quibusdam quaerat autem facilis.\nprivacy: public\nowner_type: User\nowner_id: 4975\ncreated_at: 2019-03-08 13:45:50.546390500 Z\nupdated_at: 2019-03-08 13:45:50.546390500 Z\nviews_count: 0\ndownloads_count: 0\nlikes_count: 0\nshares_count: 0\nscore: 0.0\nfollows_count: 0\nthumbnail_file_name: \nthumbnail_content_type: \nthumbnail_file_size: \nthumbnail_updated_at: \ndeleted_at: \nreview_average: 0.0\ncurator: \n",
      "created_at": "2019-03-08T13:45:51.753Z"
    }
  }
]