User Tools

Site Tools


api2:knowledge_content:content

**This is an old revision of the document!** ----

A PCRE internal error occured. This might be caused by a faulty plugin

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 ^ | 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 | | type | String | "Evaluation" if the content is a question, "Learning" otherwise | ===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 | | type* | String | "Evaluation" if the content is a question, "Learning" otherwise | ==Send the request (JSON input example)== <code> { name : “on PGCD”, uid: “question1”, type: “Evaluation” } </code> ==Get the response (JSON output example)== <code> { id: 1, instance_id: 1, type: "Evaluation", name: “on PGCD”, uid: “question1” } </code> ===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**\\ <code> { id: 1, instance_id: 1, name: “on PGCD”, type: “Evaluation”, uid: 1 } </code> **Without ID provided**\\ <code> [ { id: 1, instance_id: 1, name: “on PGCD”, type: “Evaluation”, uid: “1” }, { id: 2, instance_id: 1, name: “on PPCM”, type: “Learning”, uid: “2” } ] </code>

api2/knowledge_content/content.1507895227.txt.gz · Last modified: 2017/10/13 13:47 by maries