User Tools

Site Tools


api2:knowledge_content:knowledge_node_content

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

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

A Content deals with one or several Knowledge Nodes. For instance, the question “2 x 3 = ?” only deals with the Knowledge Node “multiplication”, while a book on Geography will deals with many Knowledge Nodes. The Knowledge Node Contents represent that relation.\\ ===Object resources=== ^ Property ^ Type ^ Description ^ | knowlede_node_id | Integer | One of the knowledge nodes the content is related to | | content_id | Integer | The related content | | importance_degree | Integer | If a content is related to several knowledge nodes, that parameter indicates the relative importance of each. | ===Create (POST)=== ^ Method | POST | ^ URL | /contents | ==Parameters (*Requiered parameters)== ^ Property ^ Type ^ Description ^ | knowlede_node_id* | Integer | One of the knowledge nodes the content is related to | | content_id* | Integer | The related content | | importance_degree | Integer | If a content is related to several knowledge nodes, that parameter indicates the relative importance of each. | ==Send the request (JSON input example)== <code> { knowledge_node_id: 1, content: 1, importance_degree: 1 } </code> ==Get the response (JSON output example)== <code> { id : 1, importance_degree: 1, knowledge_node_id: 1, content_id: 1 } </code> ===Fetch (GET)=== ^ Method | GET| ^ URL | /knowledge_node_contents/{knowledge_node_content_id} | If no knowledge_node_content_id is provided it will fetch all the Knowledge Node Content for your instance. ==Get the response (JSON output example)== **With ID provided**\\ <code> { id: 1, importance_degree: 1, knowledge_node_id: 1, content_id: 1 } </code> **Without ID provided**\\ <code> [ { id: 1, importance_degree: 1, knowledge_node_id: 1, content_id: 1 }, { id: 2, importance_degree: 2, knowledge_node_id: 2, content_id: 1 } ] </code> ===Fetch all Knowledge Node Content by Content (GET)=== ^ Method | GET | ^ URL | /content/{content_id}/content_knowledge_nodes |

api2/knowledge_content/knowledge_node_content.1507895808.txt.gz · Last modified: 2017/10/13 13:56 by maries