User Tools

Site Tools


api2:knowledge_structure:knowledge_node

====== Differences ====== This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
api2:knowledge_structure:knowledge_node [2017/10/13 11:04]
maries
api2:knowledge_structure:knowledge_node [2018/07/23 09:41] (current)
maries
Line 6: Line 6:
  
 ^ Property ​    ^ Type      ^ Description ​        ^ ^ 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 | | knowledge_graph_id | Integer | The knowledge graph this knowledge node belongs to |
 | name | String | Custom data | | name | String | Custom data |
 | uid | String | The ID of this knowledge node in your Database | | 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)=== ===Create (POST)===
Line 20: Line 24:
 | knowledge_graph_id* | Integer | The knowledge graph this knowledge node belongs to | | knowledge_graph_id* | Integer | The knowledge graph this knowledge node belongs to |
 | name | String | Custom data | | 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 |+| uid| String | The ID of this knowledge node in your Database. Useful if you cannot store the ID returned by the API |
  
 ==Send the request (JSON input example)== ==Send the request (JSON input example)==
Line 26: Line 30:
 <​code>​ <​code>​
 { {
- knowledge_graph_id: ​1+ knowledge_graph_id: ​856
- name: ​Financial asset+ name: ​"Financial asset"
- uid: fin01+ uid: "fin01"
 } }
 </​code>​ </​code>​
Line 36: Line 40:
 <​code>​ <​code>​
 { {
- id: 1, +    "name""Financial asset"
- name: Financial asset+    "​knowledge_graph_id"856
- knowledge_graph_id: ​1+    "​id":​ 3170, 
- uid: “fin01”+    "​created_at":​ "​2017-11-22T15:​24:​15.098Z",​ 
 +    "​updated_at":​ "​2017-11-22T15:​24:​15.098Z",​ 
 +    "uid""​fin1",​ 
 +    "​difficulty":​ 1
 } }
- 
 </​code>​ </​code>​
  
Line 47: Line 53:
  
 ^ Method | GET | ^ Method | GET |
-^ URL | /​knowledge_nodes/​{knowledge_node_id ​%%||%% uid} |+^ URL | /​knowledge_nodes/​{knowledge_node_id} |
  
-If no knowledge_node_id ​or uid is provided ​it will fetch all the Knowledge Nodes for your instance.\\+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)== ==Get the response (JSON output example)==
Line 57: Line 67:
 <​code>​ <​code>​
 { {
- id: 1+    "id"3170
- name“Financial asset”+    "​knowledge_graph_id"​856
- knowledge_graph_id1+    "​created_at"​"​2017-11-22T15:​24:​15.098Z"​
- uid: “fin01”+    "​updated_at":​ "​2017-11-22T15:​24:​15.098Z",​ 
 +    "uid""​fin02",​ 
 +    "​name":​ "​Financial asset2",​ 
 +    "​difficulty":​ 1
 } }
 </​code>​ </​code>​
Line 67: Line 80:
 **Without ID provided**\\ **Without ID provided**\\
 <​code>​ <​code>​
-[{ +[ 
- id: 1+    ​
- name« Financial asset »+        "​id"2714
- knowledge_graph_id1+        "​knowledge_graph_id"​782
- uid: “fin01” +        "​name"​"​1_1"​
-}, +        "​uid"null, 
-+        "​created_at":​ "​2017-09-20T14:​35:​38.663Z",​ 
- id: 2+        "​updated_at":​ "​2017-11-20T09:​53:​10.116Z",​ 
- name: ​« Liquid ​asset »+        "​difficulty":​ 1.2 
- knowledge_graph_id: 1, +    }, 
- uid: “liq01” +    
-}]+        "​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 
 +    ​} 
 +]
 </​code>​ </​code>​
  
Line 91: Line 121:
  
 ^ Method | PUT | ^ Method | PUT |
-^ URL | /​v2/​knowledge_nodes/​{knowledge_node_id ​%%||%% uid} |+^ URL | /​v2/​knowledge_nodes/​{knowledge_node_id} |
  
 ==Editable parameters== ==Editable parameters==
Line 103: Line 133:
 <​code>​ <​code>​
 { {
- name: ​« No more Financial asset »+ name: ​"No more Financial asset"
- uid: “nofin01”+ uid: "​nofin2"​
 } }
 </​code>​ </​code>​
Line 112: Line 142:
 <​code>​ <​code>​
 { {
- id: 1+    "id"3170
- name: ​« No more Financial asset »+    "​knowledge_graph_id":​ 856, 
- instance_id1+    "​created_at":​ "​2017-11-22T15:​24:​15.098Z",​ 
- uid“nofin01”+    "​updated_at":​ "​2017-11-22T15:​42:​56.878Z",​ 
 +    "name""No more Financial asset"
 +    "​uid"​"​nofin2"​
 +    "​difficulty"​1
 } }
 </​code>​ </​code>​
  
  
api2/knowledge_structure/knowledge_node.1507885468.txt.gz · Last modified: 2017/10/13 11:04 by maries