====== Differences ====== This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision | ||
|
api2:knowledge_structure:knowledge_graph [2017/10/13 10:10] maries |
api2:knowledge_structure:knowledge_graph [2017/11/22 16:09] (current) maries |
||
|---|---|---|---|
| Line 3: | Line 3: | ||
| {{:api2:knowledge_structure:graph.jpg?400|graph}} | {{:api2:knowledge_structure:graph.jpg?400|graph}} | ||
| - | ==Object resources== | + | ===Object resources=== |
| ^ Property ^ Type ^ Description ^ | ^ Property ^ Type ^ Description ^ | ||
| + | | id | Integer | identifier for the database of Domoscio's API | | ||
| | name | String | Custom data | | | name | String | Custom data | | ||
| + | | created_at | DateTime | Date of creation of the object | | ||
| + | | updated_at | DateTime | Last time the object has been modified | | ||
| - | ==Create (POST)== | + | ===Create (POST)=== |
| ^ Method | POST | | ^ Method | POST | | ||
| ^ URL | /knowledge_graphs | | ^ URL | /knowledge_graphs | | ||
| + | |||
| + | ==Parameters (*Requiered parameters)== | ||
| + | |||
| + | ^ Property ^ Type ^ Description ^ | ||
| + | | name | String | Custom data | | ||
| + | |||
| + | ==Send the request (JSON input example)== | ||
| + | |||
| + | <code> | ||
| + | { | ||
| + | name: "Corporate Finance" | ||
| + | } | ||
| + | |||
| + | </code> | ||
| + | |||
| + | ==Get the response (JSON output example)== | ||
| + | |||
| + | <code> | ||
| + | { | ||
| + | "name": "Corporate Finance", | ||
| + | "id": 856, | ||
| + | "created_at": "2017-11-22T15:01:23.263Z", | ||
| + | "updated_at": "2017-11-22T15:01:23.263Z" | ||
| + | } | ||
| + | </code> | ||
| + | |||
| + | ===Fetch (GET)=== | ||
| + | |||
| + | ^ Method | GET| | ||
| + | ^ URL | /knowledge_graphs/{knowledge_graph_id} | | ||
| + | |||
| + | If no knowledge_graph_id is provided it will fetch all the knowledge graphs for your instance. | ||
| + | |||
| + | ==Get the response (JSON output example)== | ||
| + | |||
| + | **With ID provided**\\ | ||
| + | |||
| + | <code> | ||
| + | { | ||
| + | "id": 856, | ||
| + | "name": "Corporate Finance", | ||
| + | "created_at": "2017-11-22T15:01:23.263Z", | ||
| + | "updated_at": "2017-11-22T15:01:23.263Z" | ||
| + | } | ||
| + | </code> | ||
| + | |||
| + | |||
| + | **Without ID provided**\\ | ||
| + | <code> | ||
| + | [ | ||
| + | { | ||
| + | "id": 855, | ||
| + | "name": "Assets", | ||
| + | "created_at": "2017-11-20T12:52:35.880Z", | ||
| + | "updated_at": "2017-11-20T12:52:35.880Z" | ||
| + | }, | ||
| + | { | ||
| + | "id": 856, | ||
| + | "name": "Corporate Finance", | ||
| + | "created_at": "2017-11-22T15:01:23.263Z", | ||
| + | "updated_at": "2017-11-22T15:01:23.263Z" | ||
| + | } | ||
| + | ] | ||
| + | </code> | ||
| + | |||
| + | ===EDIT (PUT)=== | ||
| + | |||
| + | ^ Method | PUT | | ||
| + | ^ URL | /knowledge_graphs/{knowledge_graph_id} | | ||
| + | |||
| + | ==Editable parameters== | ||
| + | |||
| + | ^ Property ^ Type ^ Description/expected values | | ||
| + | | name | String | Custom data (<255 characters) | | ||
| + | |||
| + | ==Send the request (JSON input example)== | ||
| + | |||
| + | <code> | ||
| + | { | ||
| + | name : "No more Corporate Finance" | ||
| + | } | ||
| + | </code> | ||
| + | |||
| + | ==Get the response (JSON output example)== | ||
| + | |||
| + | <code> | ||
| + | { | ||
| + | "id": 856, | ||
| + | "name": "No more Corporate Finance", | ||
| + | "created_at": "2017-11-22T15:01:23.263Z", | ||
| + | "updated_at": "2017-11-22T15:04:11.268Z" | ||
| + | } | ||
| + | </code> | ||