Learning Objects API

Learning objects are educational contents (movie, odf, file, sound, etc) which an user can show, create, update and destroy.

Creating a learning_object draft

POST /v1/learning_objects

Parameters

Name Description
learning_object[author] The author of a educational content
learning_object[name] The name of the learning object
learning_object[description] The description of educational content of the learning object
learning_object[link] Object link, when don’t have any attachments
learning_object[software] If some software is needed to run the object
learning_object[tags] Array with tags (by name)
learning_object[subjects] Array with subjects ids
learning_object[educational_stages] Array with educational stages ids
learning_object[object_type_id] The id of object type
learning_object[language_id] The id of a language
learning_object[license_id] The id of a license
learning_object[curator] The name of curator
learning_object[thumbnail] The learning_object thumbnail

Request

Headers

Accept: application/json
Content-Type: application/json
Access-Token: KZinZglQ02ikGrfQoxkW4g
Client: DeFQrsnm1COdww7ZckY_NQ
Uid: molly.yundt@krajcikabshire.com
Host: example.org
Cookie: 

Route

POST /v1/learning_objects

Body

{"learning_object":{"author":"Roberto Duarte","name":"Dr. Janaína Farias","description":"Omnis labore nemo quia nihil odio. Qui id rerum labore atque. Voluptas ad inventore. Voluptas est laborum dolores.","link":"http://rodriguezmohr.org/prudence","software":"In sint qui temporibus magnam autem mollitia quis.","tags":[{"name":"Tag 4106"},{"name":"Tag 4165"}],"subjects":[1],"educational_stages":[1],"object_type_id":1,"language_id":1,"license_id":1,"curator":"Sra. Esther Peixoto","thumbnail":"https://robohash.org/indolorenon.png?size=300x300\u0026set=set1"}}

cURL

curl "https://api.portalmec.c3sl.ufpr.br/v1/learning_objects" -d '{"learning_object":{"author":"Roberto Duarte","name":"Dr. Janaína Farias","description":"Omnis labore nemo quia nihil odio. Qui id rerum labore atque. Voluptas ad inventore. Voluptas est laborum dolores.","link":"http://rodriguezmohr.org/prudence","software":"In sint qui temporibus magnam autem mollitia quis.","tags":[{"name":"Tag 4106"},{"name":"Tag 4165"}],"subjects":[1],"educational_stages":[1],"object_type_id":1,"language_id":1,"license_id":1,"curator":"Sra. Esther Peixoto","thumbnail":"https://robohash.org/indolorenon.png?size=300x300\u0026set=set1"}}' -X POST \
	-H "Accept: application/json" \
	-H "Content-Type: application/json" \
	-H "Access-Token: KZinZglQ02ikGrfQoxkW4g" \
	-H "Client: DeFQrsnm1COdww7ZckY_NQ" \
	-H "Uid: molly.yundt@krajcikabshire.com"

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=em9IT29ORDVjakptUUJpYWpuSnREQjBoWEFkekxSaWJHSUlxdk91WGcxZkptYzRBdTVMTjlmNlk2UjFOd0IwVEtDRWNJZksxNUxZdTJ1bXBKYjZleExhK3l3ZEN4T2QxYWZHN2FaWUxINDlET3U2ektPZVBOWjZPVFB1R0c1eXk5NDBsM0xGN1R2NjJyeERkY2VkUTF6TVFrRmcyV3BMVzhvdU9DcU9hc0pLQTRZNFZtSTFueldOSFNhV3dsTTlVLS0vL0hUUkZlVG1jUjBtRW5OK2pWQXR3PT0%3D--ca1f8a55255c501995d70625133435f985778ce4; path=/; HttpOnly
Vary: Origin
ETag: W/"63e6a49ddceb99eb54dda726f5a7b3b5"
Cache-Control: max-age=0, private, must-revalidate
X-Request-Id: 2b2fd73d-08b6-4880-9b99-5b7ace9ab41e
X-Runtime: 2.112444
Content-Length: 2544

Status

201 Created

Body

{
  "id": 709,
  "name": "Dr. Janaína Farias",
  "description": "Omnis labore nemo quia nihil odio. Qui id rerum labore atque. Voluptas ad inventore. Voluptas est laborum dolores.",
  "author": "Roberto Duarte",
  "curator": "Sra. Esther Peixoto",
  "thumbnail": "/system/learning_objects/thumbnails/000/000/709/original/indolorenon.png?1552052822",
  "object_type": "Imagem",
  "language": {
    "id": 1,
    "name": "Português",
    "created_at": "2019-03-08T13:42:17.259Z",
    "updated_at": "2019-03-08T13:42:17.259Z",
    "code": "pt"
  },
  "default_attachment_location": null,
  "default_attachment_id": null,
  "default_mime_type": null,
  "score": 0.0,
  "state": "draft",
  "review_average": 0.0,
  "link": "http://rodriguezmohr.org/prudence",
  "software": "In sint qui temporibus magnam autem mollitia quis.",
  "license": {
    "id": 1,
    "name": "CC BY",
    "description": "Esta licença permite que outros distribuam, remixem, adaptem e criem a partir do seu trabalho, mesmo para fins comerciais, desde que lhe atribuam o devido crédito pela criação original",
    "image_url": "https://licensebuttons.net/l/by/3.0/88x31.png",
    "url": "https://creativecommons.org/licenses/by/4.0/deed.pt_BR",
    "created_at": "2019-03-08T13:42:17.310Z",
    "updated_at": "2019-03-08T13:42:17.313Z"
  },
  "liked": false,
  "likes_count": 0,
  "downloads_count": 0,
  "views_count": 0,
  "reviewed": false,
  "complained": false,
  "shares_count": 0,
  "created_at": "2019-03-08T13:47:02.736Z",
  "published_at": null,
  "terms_of_service": null,
  "updated_at": "2019-03-08T13:47:02.736Z",
  "magnetlink": null,
  "publisher": {
    "id": 6536,
    "email": "molly.yundt@krajcikabshire.com",
    "provider": "email",
    "cpf": null,
    "name": "Thomas Silveira",
    "description": "Quia qui doloribus quo.",
    "submitter_request": "default",
    "education": "Aut odio nostrum incidunt.",
    "score": 0.0,
    "cover": "",
    "role_ids": [
      1,
      10
    ],
    "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": 0,
    "created_at": "2019-03-08T13:47:00.689Z",
    "updated_at": "2019-03-08T13:47:00.803Z",
    "terms_accepted_at": null
  },
  "tags": [
    {
      "id": 4166,
      "name": "Tag 4165",
      "created_at": "2019-03-08T13:47:00.480Z",
      "updated_at": "2019-03-08T13:47:00.480Z"
    },
    {
      "id": 4107,
      "name": "Tag 4106",
      "created_at": "2019-03-08T13:46:56.174Z",
      "updated_at": "2019-03-08T13:46:56.174Z"
    }
  ],
  "subjects": [
    {
      "id": 1,
      "name": "Língua Espanhola",
      "created_at": "2019-03-08T13:42:18.041Z",
      "updated_at": "2019-03-08T13:42:18.041Z",
      "theme": false
    }
  ],
  "educational_stages": [
    {
      "id": 1,
      "name": "Educação Infantil",
      "created_at": "2019-03-08T13:42:18.179Z",
      "updated_at": "2019-03-08T13:42:18.179Z"
    }
  ],
  "attachments": [

  ]
}