Tags API

Tags to digital resources of free and personal assignment.

Adding a tag

POST /v1/:type/:id/tagging

Parameters

Name Description
type Represents the type of object, [learning_objects,collections]
id The id of object
tags[name] The name of tag
tags[owner_id] The id of owner
tags[owner_type] Can be [User,Institution]

Request

Headers

Accept: application/json
Content-Type: application/json
Access-Token: Asn9S3wZ6sFHRyiqig72Kg
Client: d9IBGYR5jxYjdD3HR5g52Q
Uid: warren.buckridge@prohaska.io
Host: example.org
Cookie: 

Route

POST /v1/learning_objects/1063/tagging

Body

{"tags":{"name":"et","owner_id":9621,"owner_type":"User"}}

cURL

curl "https://api.portalmec.c3sl.ufpr.br/v1/learning_objects/1063/tagging" -d '{"tags":{"name":"et","owner_id":9621,"owner_type":"User"}}' -X POST \
	-H "Accept: application/json" \
	-H "Content-Type: application/json" \
	-H "Access-Token: Asn9S3wZ6sFHRyiqig72Kg" \
	-H "Client: d9IBGYR5jxYjdD3HR5g52Q" \
	-H "Uid: warren.buckridge@prohaska.io"

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=SVkyK2pVU05KUXJzTE1nNytxanBQTXNGNG8xdUlJN1dlQ1Vic1A0RDdJenU1VkRXZTU5dVVPSzlRRmZhczl5WmgxbTVNN2tlV2tORllYVTlBcXI1Q1BvN2NPWGt1NmFRSGxsdFcyWklRYjUwc3JkeEJuWEczTGJPVWg1Vmh6dUUvSCtvempjMEJQV01HZk9nQitZalJLOEl6amswWjZuSGd5Nm54MzBQYkhua0lZTWIrUGU4VHRRZkYwVkNLcnBTLS1LTkxmS1E0YVoxSWhDa0tSdmVpLzd3PT0%3D--2e71c3bfad44865e5d44263eeb34d9453fcd8130; path=/; HttpOnly
Vary: Origin
ETag: W/"6cfe29d5c3daccc79c6e0f515775f683"
Cache-Control: max-age=0, private, must-revalidate
X-Request-Id: 478f0a72-c741-4059-9439-abe52f77b047
X-Runtime: 0.125499
Content-Length: 655

Status

201 Created

Body

[
  {
    "id": 5932,
    "name": "Tag 5931",
    "created_at": "2019-10-31T13:38:41.227Z",
    "updated_at": "2019-10-31T13:38:41.227Z"
  },
  {
    "id": 5933,
    "name": "Tag 5932",
    "created_at": "2019-10-31T13:38:41.266Z",
    "updated_at": "2019-10-31T13:38:41.266Z"
  },
  {
    "id": 5934,
    "name": "Tag 5933",
    "created_at": "2019-10-31T13:38:41.305Z",
    "updated_at": "2019-10-31T13:38:41.305Z"
  },
  {
    "id": 5935,
    "name": "Tag 5934",
    "created_at": "2019-10-31T13:38:41.345Z",
    "updated_at": "2019-10-31T13:38:41.345Z"
  },
  {
    "id": 5936,
    "name": "Tag 5935",
    "created_at": "2019-10-31T13:38:41.392Z",
    "updated_at": "2019-10-31T13:38:41.392Z"
  },
  {
    "id": 5992,
    "name": "et",
    "created_at": "2019-10-31T13:38:46.139Z",
    "updated_at": "2019-10-31T13:38:46.139Z"
  }
]