Domoscio API (v2.3.0)

We designed the Domoscio API in a Restful way, so that your user experience is simple and straightforward.

You will find in this documentation all the information necessary to interact with the API.

To keep in touch with the latest developments, check the Changelog just here!

Authentication

The workflow to authentify is based on Oauth2 protocal. To have access to Domoscio functionalities the user should follow these steps:

  • AuthorizationToken:

    The AuthorizationToken is given to the user when he starts working with the Domoscio API. This token must remain secret and used only once.

    1. The AuthorizationToken should be used inside the Header of the request when calling the API for the first time:
      Authorization: Bearer < AuthorizationToken >
    2. Inside the response Header, the AccessToken and RefreshToken will be given:
      AccessToken: < AccessToken >
      RefreshToken: < RefreshToken >
  • AccessToken and RefreshToken:

    1. The user can now access API resources and functionalities with the AcessToken. Like the AuthorizationToken, the AccessToken should be used inside the Header of the request:
      AccessToken: < AccesToken >
    2. This AccessToken expires after two hours and an error message will be returned when calling the API:
      401 Error: {message: 'Expired Token. No Refresh Token provided'}
    3. The RefreshToken should now be used in the header of the API request with the expired AccessToken:
      AccessToken: < ExpiredAccessToken >
      RefreshToken: < RefreshToken >
    4. Get the new AccessToken in the Header of the API response:
      AccessToken: < NewAccessToken >
    5. The new AccessToken can be used as usual until it expires.

KnowledgeGraph

A KnowledgeGraph (KG) is the first object to instantiate while setting up your content on our API. It is the top level of aggregation for knowledge nodes and edges. You can use it to describe your course, a book or even your whole knowledge map.

Create KnowledgeGraph

Create KnowledgeGraphs with payload parameters

Request Body schema: application/json
name
string

Object name.

uid
string

Object UID.

Responses

201

Created

422

Unprocessable Entity

post/knowledge_graphs
https://adaptive-engine.domoscio.com/v2/instances/{client_id}/knowledge_graphs

Request samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "name": "Corporate Finance",
  • "uid": "fin101"
}

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "id": 45,
  • "name": "string",
  • "created_at": "2020-03-25T13:33:57.640Z",
  • "updated_at": "2020-03-25T13:33:57.640Z",
  • "uid": "string"
}

Get KnowledgeGraphs

Get KnowledgeGraphs with payload parameters (limit number of data in response is 20, use page parameter to get the following data).

Request Body schema: application/json
id
integer or Array of integers

Fetch the object(s) with ID.

uid
string or Array of strings

Fetch the object(s) with UID.

name
string or Array of strings

Fetch the object(s) with name.

sort_by
string

Parameter(s) to sort the response by.
Example: 'param1.asc,param2.desc' will sort the data with param1 in ascending order then with param2 in descending order.

page
integer
Default: 1

Response page number with index starting from 1. One page contains 20 objects per default (can be modified with per_page parameter).

per_page
integer
Default: 20

Number of objects to display per page.

Responses

200

OK

400

Bad Request

get/knowledge_graphs
https://adaptive-engine.domoscio.com/v2/instances/{client_id}/knowledge_graphs

Request samples

Content type
application/json
Copy
Expand all Collapse all
[ ]

Response samples

Content type
application/json
Copy
Expand all Collapse all
[
  • {
    },
  • {
    },
  • {
    }
]

Get a Knowledge Graph by ID

Get a specific knowledge graph

path Parameters
id
required
integer <int64>

Knowledge Graph ID

Responses

200

OK

400

Bad Request

get/knowledge_graphs/{id}
https://adaptive-engine.domoscio.com/v2/instances/{client_id}/knowledge_graphs/{id}

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "id": 45,
  • "name": "Corporate Finance",
  • "uid": "fin101",
  • "created_at": "2020-03-25T13:33:57.640Z",
  • "updated_at": "2020-03-25T13:33:57.640Z"
}

Update Knowledge Graph

Update a knowledge graph

path Parameters
id
required
integer <int64>

Knowledge Graph ID

Request Body schema: application/json
name
string

Object name.

uid
string

Object UID.

Responses

200

OK

400

Bad Request

put/knowledge_graphs/{id}
https://adaptive-engine.domoscio.com/v2/instances/{client_id}/knowledge_graphs/{id}

Request samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "name": "No more Corporate Finance",
  • "uid": "fin101"
}

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "id": 45,
  • "name": "string",
  • "created_at": "2020-03-25T13:33:57.640Z",
  • "updated_at": "2020-03-25T13:33:57.640Z",
  • "uid": "uid_object"
}

KnowledgeNode

A KnowledgeNode (KN) is the second object to instantiate while setting up your content on our API. It is the central model of the application; it can be linked to multiple KnowledgeGraphs. You can use it to describe your content architecture, i.e skills, knowledges, know-hows, etc.

Create KnowledgeNode

Create a KnowledgeNode object

Request Body schema: application/json
name
string

Object name.

uid
required
string

Object UID.

knowledge_graph_id
integer

Object related to a set of KnowledgeGraph ID. It will create automatically the KnowledgeGraphNode that correspond to this association.

knowledge_graph_uid
String

Object related to a set of KnowledgeGraph UID. It will create automatically the KnowledgeGraphNode that correspond to this association.

knowledge_graph_ids
Array

Object related to a set of KnowledgeGraph IDs. It will create automatically the KnowledgeGraphNodes that correspond to the associations.

knowledge_graph_uids
Array

Object related to a set of KnowledgeGraph UIDs. It will create automatically the KnowledgeGraphNodes that correspond to the associations.

description
string

Object description

mean
number
Default: 60

Object's mean

standard_deviation
number
Default: 15

Object's standarddeviation

Responses

201

Created

422

Unprocessable Entity

post/knowledge_nodes
https://adaptive-engine.domoscio.com/v2/instances/{client_id}/knowledge_nodes

Request samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "name": "Financial Assets",
  • "uid": "fa",
  • "knowledge_graph_id": 45
}

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "id": 0,
  • "knowledge_graph_id": 0,
  • "created_at": "2020-03-25T13:33:57.640Z",
  • "updated_at":