Subjects API

Subjects to digital resources, like Artes, Biologia.

Adding subjects

POST v1/:type/:id/subjects

Parameters

Name Description
id The id of the object
type Represents the type of the object [LearningObject, Collection]
subjects The array of subjects

Request

Headers

Accept: application/json
Content-Type: application/json
Access-Token: ULBKUok664tP66QjNXDsTA
Client: N15yL00joyE5PQqwqFCm7A
Uid: doug.medhurst@corwin.name
Host: example.org
Cookie: 

Route

POST v1/learning_objects/957/subjects

Body

{"subjects":[1]}

cURL

curl "https://api.portalmec.c3sl.ufpr.brv1/learning_objects/957/subjects" -d '{"subjects":[1]}' -X POST \
	-H "Accept: application/json" \
	-H "Content-Type: application/json" \
	-H "Access-Token: ULBKUok664tP66QjNXDsTA" \
	-H "Client: N15yL00joyE5PQqwqFCm7A" \
	-H "Uid: doug.medhurst@corwin.name"

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=ZXkveU8zR0I5RzBUYTlLZUlSSzhBZDBXREt6NlV4WVFVNUp4MHdZZ1I5RW5MenVSWTF5bXhaRlh1MkduUDlKM09lTjJxK3Z1R3hSaThZdkxLLzl1Q3ArYVBiZVljV1RGQ0gzUmR4ZjVhTWp5TjBOSUFLYTVlUEFkNTBCS0NXTUVxemdWckFOZWVqSHZYRHJUa1JscDNNdHNSVndzbFRKMHRna0tTL0xuUGNZbGE1WHN4WXArOUJzOHJDREV6ZE9aLS0xOEV1Z3lpM1B5TGFGemIwVzZoZU9RPT0%3D--2a0e1dd85b440e6cadbbb43a3b455a27b6196325; path=/; HttpOnly
Vary: Origin
ETag: W/"f4dc39bed91743d0ef2594d0833c3f87"
Cache-Control: max-age=0, private, must-revalidate
X-Request-Id: e9059e46-0f60-4c6a-ad5e-2c60f82511ea
X-Runtime: 0.109229
Content-Length: 260

Status

201 Created

Body

[
  {
    "id": 1,
    "name": "Língua Espanhola",
    "created_at": "2019-03-08T13:42:18.041Z",
    "updated_at": "2019-03-08T13:42:18.041Z",
    "theme": false
  },
  {
    "id": 14,
    "name": "Outras Línguas",
    "created_at": "2019-03-08T13:42:18.107Z",
    "updated_at": "2019-03-08T13:42:18.107Z",
    "theme": false
  }
]