A Content is anything that contains learning. It can be a video, some text, a question, a picture, and so on.
Object resources
Property | Type | Description |
id | Integer | identifier for the database of Domoscio's API |
name | String | Custom content |
uid | String | The ID of this knowledge node in your Database. Useful if you cannot store the ID returned by the API |
content_url | String | URL on which the content can be accessed |
format | String | format of the content |
type | String | “Evaluation” if the content is a question, “Learning” otherwise |
created_at | DateTime | Date of creation of the object |
updated_at | DateTime | Last time the object has been modified |
Create (POST)
Method | POST |
URL | /contents |
Parameters (*Requiered parameters)
Property | Type | Description |
name | String | Custom data |
uid* | String | The ID of this knowledge node in your Database. Useful if you cannot store the ID returned by the API |
content_url | String | URL on which the content can be accessed |
type* | String | “Evaluation” if the content is a question, “Learning” otherwise |
format | String | format of the content |
{
name : "on PGCD",
uid: "question1",
format: "qti",
type: "Evaluation"
}
Get the response (JSON output example)
{
"id": 2749,
"uid": "question1",
"type": "Evaluation",
"name": "on PGCD",
"content_url": null,
"format": qti,
"created_at": "2017-11-22T16:31:45.071Z",
"updated_at": "2017-11-22T16:31:45.071Z"
}
Fetch (GET)
Method | GET |
URL | /contents/{content_id} |
If no content_id is provided it will fetch all the Contents for your instance.
Get the response (JSON output example)
With ID provided
{
"id": 2749,
"uid": "question1",
"created_at": "2017-11-22T16:31:45.071Z",
"updated_at": "2017-11-22T16:31:45.412Z",
"name": "on PGCD",
"content_url": null,
"format": qti,
"type": "Evaluation"
}
Without ID provided
[
{
"id": 709,
"uid": "video",
"created_at": "2017-09-20T14:35:38.843Z",
"updated_at": "2017-09-20T14:35:38.843Z",
"name": "1_4",
"content_url": null,
"format": null,
"type": "Read"
},
{
"id": 2749,
"uid": "question1",
"created_at": "2017-11-22T16:31:45.071Z",
"updated_at": "2017-11-22T16:31:45.412Z",
"name": "on PGCD",
"content_url": null,
"format": qti,
"type": "Evaluation"
}
]
EDIT (PUT)
Method | PUT |
URL | /contents/{content_id} |
Editable parameters
Property | Type | Description/expected values |
name | String | Custom data (<255 characters) |
content_url | String | URL on which the content can be accessed |
{
name : "on PGCD - difficult"
}
Get the response (JSON output example)
{
"id": 2749,
"name": "on PDCG - difficult",
"created_at": "2017-11-22T16:31:45.071Z",
"updated_at": "2017-11-22T16:42:49.954Z",
"uid": "question1",
"format": qti,
"content_url": null
}