Learning Objects API

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

Updating a learning_object draft

PUT /v1/learning_objects/:id

Parameters

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

Request

Headers

Accept: application/json
Content-Type: application/json
Access-Token: WcMTMGPgfOkc0eEfD-mGOA
Client: urAEFrP7zhX6CgTUAmdwYA
Uid: guy_johnston@miller.biz
Host: example.org
Cookie: 

Route

PUT /v1/learning_objects/722

Body

{"description":"Provident sint quas non est. Nisi est quae sint dolore eaque. Dolor quae laudantium. Temporibus a voluptatem vero et vitae dicta laudantium. Maxime perferendis deserunt ut dicta."}

cURL

curl "https://api.portalmec.c3sl.ufpr.br/v1/learning_objects/722" -d '{"description":"Provident sint quas non est. Nisi est quae sint dolore eaque. Dolor quae laudantium. Temporibus a voluptatem vero et vitae dicta laudantium. Maxime perferendis deserunt ut dicta."}' -X PUT \
	-H "Accept: application/json" \
	-H "Content-Type: application/json" \
	-H "Access-Token: WcMTMGPgfOkc0eEfD-mGOA" \
	-H "Client: urAEFrP7zhX6CgTUAmdwYA" \
	-H "Uid: guy_johnston@miller.biz"

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=dHZ5cithSzBhUk5zS2J3ZzVza1VTOVhiOEZuMWR1YUZ1YW9HNlBqYTdBVElKOXh3aTFWOGxuRFV4NXQ1enptWkxsNU1pbUppaFB0T3UveE1FcWtWalo5b2lwZlo4N0dGWmRsdlhmS3RNK21GWUdhZ2NtQXM0ZExRTkI1Y2FseFZiTVhPWGhlREF5Y1phVlhlVlVzOXNuMXNiSnpzWHA5eWVHbytVTUNmb0NSajZkZk9yeEc0RHJhcTNqeE9TZVVqLS0zcTRLV0VxcU1USjFCenFQaENUcHFRPT0%3D--f5fbc3b079563ce953caf1d98ce7c89191cf29c8; path=/; HttpOnly
Vary: Origin
ETag: W/"92929c3f927312720f4a6ffbd838e64f"
Cache-Control: max-age=0, private, must-revalidate
X-Request-Id: bc01529b-2f8f-46e3-b9a2-4cc412cb5b0c
X-Runtime: 0.212029
Content-Length: 2534

Status

200 OK

Body

{
  "id": 722,
  "name": "LearningObject 721",
  "description": "Provident sint quas non est. Nisi est quae sint dolore eaque. Dolor quae laudantium. Temporibus a voluptatem vero et vitae dicta laudantium. Maxime perferendis deserunt ut dicta.",
  "author": "Srta. Benício Nogueira",
  "curator": null,
  "thumbnail": null,
  "object_type": "Vídeo",
  "language": {
    "id": 9,
    "name": "Japonês",
    "created_at": "2019-03-08T13:42:17.293Z",
    "updated_at": "2019-03-08T13:42:17.293Z",
    "code": "jp"
  },
  "default_attachment_location": null,
  "default_attachment_id": null,
  "default_mime_type": null,
  "score": 0.230148877348066,
  "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": "2019-03-08T13:47:06.973Z",
  "published_at": null,
  "terms_of_service": null,
  "updated_at": "2019-03-08T13:47:07.419Z",
  "magnetlink": null,
  "publisher": {
    "id": 6633,
    "email": "guy_johnston@miller.biz",
    "provider": "email",
    "cpf": null,
    "name": "Srta. Júlia Moreira",
    "description": "Natus rerum rerum quasi ullam.",
    "submitter_request": "default",
    "education": "Dicta quis repellendus deleniti quia explicabo.",
    "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": 1,
    "collections_count": 0,
    "created_at": "2019-03-08T13:47:06.858Z",
    "updated_at": "2019-03-08T13:47:06.961Z",
    "terms_accepted_at": null
  },
  "tags": [
    {
      "id": 4231,
      "name": "Tag 4230",
      "created_at": "2019-03-08T13:47:07.144Z",
      "updated_at": "2019-03-08T13:47:07.144Z"
    },
    {
      "id": 4230,
      "name": "Tag 4229",
      "created_at": "2019-03-08T13:47:07.106Z",
      "updated_at": "2019-03-08T13:47:07.106Z"
    },
    {
      "id": 4229,
      "name": "Tag 4228",
      "created_at": "2019-03-08T13:47:07.066Z",
      "updated_at": "2019-03-08T13:47:07.066Z"
    },
    {
      "id": 4228,
      "name": "Tag 4227",
      "created_at": "2019-03-08T13:47:07.029Z",
      "updated_at": "2019-03-08T13:47:07.029Z"
    },
    {
      "id": 4227,
      "name": "Tag 4226",
      "created_at": "2019-03-08T13:47:06.990Z",
      "updated_at": "2019-03-08T13:47:06.990Z"
    }
  ],
  "subjects": [
    {
      "id": 23,
      "name": "Educação Indígena",
      "created_at": "2019-03-08T13:42:18.149Z",
      "updated_at": "2019-03-08T13:42:18.149Z",
      "theme": true
    },
    {
      "id": 18,
      "name": "Outros",
      "created_at": "2019-03-08T13:42:18.125Z",
      "updated_at": "2019-03-08T13:42:18.125Z",
      "theme": false
    }
  ],
  "educational_stages": [
    {
      "id": 3,
      "name": "Ensino Fundamental II  (do 6º até o 9º ano)",
      "created_at": "2019-03-08T13:42:18.188Z",
      "updated_at": "2019-03-08T13:42:18.188Z"
    }
  ],
  "attachments": [

  ]
}