The content’s structure is scattered into Knowledge Nodes. Knowledge Nodes are the second objects to instantiate while setting up your content on our API.
Object resources
Property | Type | Description |
id | Integer | identifier for the database of Domoscio's API |
knowledge_graph_id | Integer | The knowledge graph this knowledge node belongs to |
name | String | Custom data |
uid | String | The ID of this knowledge node in your Database |
created_at | DateTime | Date of creation of the object |
updated_at | DateTime | Last time the object has been modified |
difficulty | Float | Our estimation of how difficult this concept is to memorize |
Create (POST)
Method | POST |
URL | /knowledge_nodes |
Parameters (*Requiered parameters)
Property | Type | Description |
knowledge_graph_id* | Integer | The knowledge graph this knowledge node belongs to |
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 |
{
knowledge_graph_id: 856,
name: "Financial asset",
uid: "fin01"
}
Get the response (JSON output example)
{
"name": "Financial asset",
"knowledge_graph_id": 856,
"id": 3170,
"created_at": "2017-11-22T15:24:15.098Z",
"updated_at": "2017-11-22T15:24:15.098Z",
"uid": "fin1",
"difficulty": 1
}
Fetch (GET)
Method | GET |
URL | /knowledge_nodes/{knowledge_node_id} |
If no knowledge_node_id is provided you can use the following parameters to filter only some knowledge nodes.
Property | Type | Description |
knowledge_graph_id | Integer | The knowledge graph this knowledge node belongs to |
uid | String | The ID of this knowledge node in your Database. Useful if you cannot store the ID returned by the API |
Get the response (JSON output example)
With ID provided
{
"id": 3170,
"knowledge_graph_id": 856,
"created_at": "2017-11-22T15:24:15.098Z",
"updated_at": "2017-11-22T15:24:15.098Z",
"uid": "fin02",
"name": "Financial asset2",
"difficulty": 1
}
Without ID provided
[
{
"id": 2714,
"knowledge_graph_id": 782,
"name": "1_1",
"uid": null,
"created_at": "2017-09-20T14:35:38.663Z",
"updated_at": "2017-11-20T09:53:10.116Z",
"difficulty": 1.2
},
{
"id": 3169,
"knowledge_graph_id": 856,
"name": "Financial asset",
"uid": "fin01",
"created_at": "2017-11-22T15:13:34.162Z",
"updated_at": "2017-11-22T15:13:34.162Z",
"difficulty": 1
},
{
"id": 3170,
"knowledge_graph_id": 856,
"name": "Financial asset2",
"uid": "fin02",
"created_at": "2017-11-22T15:24:15.098Z",
"updated_at": "2017-11-22T15:24:15.098Z",
"difficulty": 1
}
]
Fetch all Knowledge Nodes by Knowledge Graph
You can get all Knowledge Nodes relative to a given Knowledge Graph.
Method | GET |
URL | /v2/knowledge_graphs/{knowledge_graph_id}/knowledge_nodes |
EDIT (PUT)
Method | PUT |
URL | /v2/knowledge_nodes/{knowledge_node_id} |
Editable parameters
Property | Type | Description/expected values |
name | String | Custom data (<255 chars) |
uid | String | Custom data (<255 chars) |
{
name: "No more Financial asset",
uid: "nofin2"
}
Get the response (JSON output example)
{
"id": 3170,
"knowledge_graph_id": 856,
"created_at": "2017-11-22T15:24:15.098Z",
"updated_at": "2017-11-22T15:42:56.878Z",
"name": "No more Financial asset",
"uid": "nofin2",
"difficulty": 1
}