Skip to content

Knowledge Graph API (1)

A Knowledge Graph is a graph-based data model representation of knowledge within a domain. In other words, it contains nodes and edges that represent entities and the relationships between them. The API should then enable the creation, update, or query with regard to these graphs and their models.

Languages
Servers
Mock server

https://idp.cdq.com/_mock/apis/knowledge-graph-api/api-v1/

Production SOAP

https://api.corporate-data-league.ch/knowledge-graph-api/soap/v1/

Production

https://api.corporate-data-league.ch/knowledge-graph-api/

Concepts

Operations related to Concepts. A concept is a unit of knowledge that is created and managed within a model.

Operations

Concept history

Operations related to Concept history. A concept history is a record of changes made to a concept.

Operations

Imports

Operations related to Imports. An import is a process of bringing data from an external source into the system.

Operations

Knowledge Graphs

Operations related to Knowledge Graphs and their management. A Knowledge Graph is a graph-based data model

Operations

Create Knowledge Graph

Request

Endpoint for managing of Knowledge Graphs.

Security
basicAuth
Headers
X-Credential-Usernamestringrequired

Username that is passed as header parameter with the name X-Credential-Username. The header can take a form of:

  • username (e.g. "johnjoe")
  • user id (e.g. "87b1bdb1-ba87-4522-b363-c5a0e6e917b3")
Example: 87b1bdb1-ba87-4522-b363-c5a0e6e917b3
Bodyapplication/jsonrequired
urlstringrequired

URL of the Knowledge Graph.

Example: "https://example.com"
descriptionstringrequired

Description of the Knowledge Graph.

Example: "Knowledge Graph"
curl -i -X POST \
  -u <username>:<password> \
  https://idp.cdq.com/_mock/apis/knowledge-graph-api/api-v1/knowledgegraphs \
  -H 'Content-Type: application/json' \
  -H 'X-Credential-Username: 87b1bdb1-ba87-4522-b363-c5a0e6e917b3' \
  -d '{
    "url": "https://www.cdq.com",
    "description": "CDQ'\''s master Knowledge Graph"
  }'

Responses

Created

Bodyapplication/json
idintegerrequired

ID of the Knowledge Graph.

Example: "1"
urlstringrequired

Base URL.

Example: "https://example.com"
descriptionstringrequired

Description of the Knowledge Graph.

Example: "Knowledge Graph"
creatorstring(UserId)required

Unique ID of a user.

Example: "johndoe"
creationDatestring(CreatedAt)

Date of creation (ISO 8601-compliant).

Example: "2020-08-31T16:47+00:00"
modificationDatestring(ModifiedAt)

Date of modification (ISO 8601-compliant).

Example: "2020-08-31T16:47+00:00"
statusstringrequired

Status of the Knowledge Graph.

Enum ValueDescription
ACTIVE

Knowledge Graph is active.

DEACTIVATED

Knowledge Graph is deactivated.

Example: "ACTIVE"
Response
application/json
{ "summary": "Successfully created Knowledge Graph", "value": "{ \"id\":1, \"url\":\"https://www.cdq.com\", \"description\": \"CDQ's master Knowledge Graph\", \"creator\":\"demo_user\", \"creationDate\":\"2021-12-29T11:41:30\", \"modificationDate\":\"2021-12-29T11:41:30\", \"status\":\"ACTIVE\" }\n" }

List Knowledge Graphs

Request

Display a list of Knowledge Graphs, paged by optional query parameters.

Security
basicAuth
Query
pageinteger>= 0

The number of the page to read. Parameter isn't required, by default, set to '0'.

Default 0
Example: page=0
pageSizeinteger>= 0

Maximum number of elements on the page to read. Parameter isn't required. Can't be negative, by default, set to 10.

Default 10
Example: pageSize=10
sortstring

Enables sorting on Knowledge Graph's attributes: * URL - sorting by url of knowledge graph. * DESCRIPTION - sorting by description of knowledge graph. * CREATOR - sorting by creator of knowledge graph. * CREATED_AT - sorting by username of creator. * LAST_MODIFICATION_DATE - sorting by last modification date. * LAST_MODIFIER - sorting by username of last modifier.

Example: sort=URL
sortTypestring

Allows changing the default sorting order (ASC) to desire by user.

Default "ASC"
Enum ValueDescription
DESC

Sort in descending order.

ASC

Sort in ascending order.

Example: sortType=ASC
statusstring

Filter knowledge graphs models by status value.

Enum ValueDescription
ACTIVE

Active status.

DEACTIVATED

Deactivated status.

Example: status=ACTIVE
knowledgeGraphUrlstring

Filter knowledge graphs by url.

Example: knowledgeGraphUrl=https://www.cdq.com/kg/1
fullTextSearchstring

Full-text search for KG > * URL - URL of knowledge graph. * Description - Description of knowledge graph. * Creator - Creator of knowledge graph.

Example: fullTextSearch=Description
Headers
X-Credential-Usernamestringrequired

Username that is passed as header parameter with the name X-Credential-Username. The header can take a form of:

  • username (e.g. "johnjoe")
  • user id (e.g. "87b1bdb1-ba87-4522-b363-c5a0e6e917b3")
Example: 87b1bdb1-ba87-4522-b363-c5a0e6e917b3
curl -i -X GET \
  -u <username>:<password> \
  https://idp.cdq.com/_mock/apis/knowledge-graph-api/api-v1/knowledgegraphs \
  -H 'X-Credential-Username: 87b1bdb1-ba87-4522-b363-c5a0e6e917b3'

Responses

OK

Bodyapplication/json
pageSizeinteger>= 0required

Number of elements on the page.

Example: "10"
pageinteger>= 0required

Number of the page.

Example: "0"
totalinteger(PageTotal)

Total number of items which can be paged.

Example: "67"
valuesArray of objects(KnowledgeGraph)required

List of Knowledge Graphs.

values[].​idintegerrequired

ID of the Knowledge Graph.

Example: "1"
values[].​urlstringrequired

Base URL.

Example: "https://example.com"
values[].​descriptionstringrequired

Description of the Knowledge Graph.

Example: "Knowledge Graph"
values[].​creatorstring(UserId)required

Unique ID of a user.

Example: "johndoe"
values[].​creationDatestring(CreatedAt)

Date of creation (ISO 8601-compliant).

Example: "2020-08-31T16:47+00:00"
values[].​modificationDatestring(ModifiedAt)

Date of modification (ISO 8601-compliant).

Example: "2020-08-31T16:47+00:00"
values[].​statusstringrequired

Status of the Knowledge Graph.

Enum ValueDescription
ACTIVE

Knowledge Graph is active.

DEACTIVATED

Knowledge Graph is deactivated.

Example: "ACTIVE"
Response
application/json
{ "summary": null, "value": "{\"pageSize\":100,\"page\":0,\"total\":1,\"values\":[{\"id\":1,\"url\":\"https://www.cdq.com\",\"description\":\"CDQ's master Knowledge Graph\",\"creator\":\"demo_user\",\"creationDate\":\"2021-12-29T11:41:30\",\"modificationDate\":\"2021-12-29T11:41:30\",\"status\":\"ACTIVE\"}]}\n" }

Read Knowledge Graph Details.

Request

Get details of Knowledge Graph by getKnowledgeGraphById.

Security
basicAuth
Path
knowledgeGraphIdintegerrequired

Used to identify Knowledge Graph and objects inside it.

Example: 1
Headers
X-Credential-Usernamestringrequired

Username that is passed as header parameter with the name X-Credential-Username. The header can take a form of:

  • username (e.g. "johnjoe")
  • user id (e.g. "87b1bdb1-ba87-4522-b363-c5a0e6e917b3")
Example: 87b1bdb1-ba87-4522-b363-c5a0e6e917b3
curl -i -X GET \
  -u <username>:<password> \
  https://idp.cdq.com/_mock/apis/knowledge-graph-api/api-v1/knowledgegraphs/1 \
  -H 'X-Credential-Username: 87b1bdb1-ba87-4522-b363-c5a0e6e917b3'

Responses

OK

Bodyapplication/json
idintegerrequired

ID of the Knowledge Graph.

Example: "1"
urlstringrequired

Base URL.

Example: "https://example.com"
descriptionstringrequired

Description of the Knowledge Graph.

Example: "Knowledge Graph"
creatorstring(UserId)required

Unique ID of a user.

Example: "johndoe"
creationDatestring(CreatedAt)

Date of creation (ISO 8601-compliant).

Example: "2020-08-31T16:47+00:00"
modificationDatestring(ModifiedAt)

Date of modification (ISO 8601-compliant).

Example: "2020-08-31T16:47+00:00"
statusstringrequired

Status of the Knowledge Graph.

Enum ValueDescription
ACTIVE

Knowledge Graph is active.

DEACTIVATED

Knowledge Graph is deactivated.

Example: "ACTIVE"
Response
application/json
{ "summary": null, "value": "{\"id\":1,\"url\":\"https://www.cdq.com\",\"description\":\"CDQ's master Knowledge Graph\",\"creator\":\"demo_user\",\"creationDate\":\"2021-12-29T11:41:30\",\"modificationDate\":\"2021-12-29T11:41:30\",\"status\":\"ACTIVE\"}\n" }

Update Knowledge Graph

Request

Update Knowledge Graph identified by knowledgeGraphId.

Security
basicAuth
Path
knowledgeGraphIdintegerrequired

Used to identify Knowledge Graph and objects inside it.

Example: 1
Headers
X-Credential-Usernamestringrequired

Username that is passed as header parameter with the name X-Credential-Username. The header can take a form of:

  • username (e.g. "johnjoe")
  • user id (e.g. "87b1bdb1-ba87-4522-b363-c5a0e6e917b3")
Example: 87b1bdb1-ba87-4522-b363-c5a0e6e917b3
Bodyapplication/jsonrequired
descriptionstringrequired

Description of the Knowledge Graph.

Example: "Knowledge Graph"
curl -i -X PUT \
  -u <username>:<password> \
  https://idp.cdq.com/_mock/apis/knowledge-graph-api/api-v1/knowledgegraphs/1 \
  -H 'Content-Type: application/json' \
  -H 'X-Credential-Username: 87b1bdb1-ba87-4522-b363-c5a0e6e917b3' \
  -d '{
    "url": "https://www.cdq.com",
    "description": "Updated description of Knowledge Graph."
  }'

Responses

Knowledge Graph updated successfully

Bodyapplication/json
idintegerrequired

ID of the Knowledge Graph.

Example: "1"
urlstringrequired

Base URL.

Example: "https://example.com"
descriptionstringrequired

Description of the Knowledge Graph.

Example: "Knowledge Graph"
creatorstring(UserId)required

Unique ID of a user.

Example: "johndoe"
creationDatestring(CreatedAt)

Date of creation (ISO 8601-compliant).

Example: "2020-08-31T16:47+00:00"
modificationDatestring(ModifiedAt)

Date of modification (ISO 8601-compliant).

Example: "2020-08-31T16:47+00:00"
statusstringrequired

Status of the Knowledge Graph.

Enum ValueDescription
ACTIVE

Knowledge Graph is active.

DEACTIVATED

Knowledge Graph is deactivated.

Example: "ACTIVE"
Response
application/json
{ "summary": "Response to a successful deactivation of a Knowledge Graph.", "value": "{ \"id\": 1, \"url\": \"https://www.cdq.com\", \"description\": \"Updated description of Knowledge Graph.\", \"creator\": \"demo_user\", \"creationDate\": \"2021-12-29T11:41:30\", \"modificationDate\": \"2021-12-29T12:47:57\", \"status\": \"ACTIVE\" }\n" }

Deactivates Knowledge Graph

Request

Deactivates Knowledge Graph identified by knowledgeGraphId.

Security
basicAuth
Path
knowledgeGraphIdintegerrequired

Used to identify Knowledge Graph and objects inside it.

Example: 1
Headers
X-Credential-Usernamestringrequired

Username that is passed as header parameter with the name X-Credential-Username. The header can take a form of:

  • username (e.g. "johnjoe")
  • user id (e.g. "87b1bdb1-ba87-4522-b363-c5a0e6e917b3")
Example: 87b1bdb1-ba87-4522-b363-c5a0e6e917b3
curl -i -X DELETE \
  -u <username>:<password> \
  https://idp.cdq.com/_mock/apis/knowledge-graph-api/api-v1/knowledgegraphs/1 \
  -H 'X-Credential-Username: 87b1bdb1-ba87-4522-b363-c5a0e6e917b3'

Responses

Knowledge Graph deactivated successfully

Bodyapplication/json
idintegerrequired

ID of the Knowledge Graph.

Example: "1"
urlstringrequired

Base URL.

Example: "https://example.com"
descriptionstringrequired

Description of the Knowledge Graph.

Example: "Knowledge Graph"
creatorstring(UserId)required

Unique ID of a user.

Example: "johndoe"
creationDatestring(CreatedAt)

Date of creation (ISO 8601-compliant).

Example: "2020-08-31T16:47+00:00"
modificationDatestring(ModifiedAt)

Date of modification (ISO 8601-compliant).

Example: "2020-08-31T16:47+00:00"
statusstringrequired

Status of the Knowledge Graph.

Enum ValueDescription
ACTIVE

Knowledge Graph is active.

DEACTIVATED

Knowledge Graph is deactivated.

Example: "ACTIVE"
Response
application/json
{ "summary": "Response to a successful deactivation of a Knowledge Graph.", "value": "{ \"id\": 1, \"url\": \"https://www.cdq.com\", \"description\": \"Updated description of Knowledge Graph.\", \"creator\": \"demo_user\", \"creationDate\": \"2021-12-29T11:41:30\", \"modificationDate\": \"2021-12-29T12:47:57\", \"status\": \"DEACTIVATED\" }\n" }

Models

Operations related to Models. A model is a collection of concepts and their relationships.

Operations

Query

Operations related to Query. A query is a request for information from a database.

Rules

Operations related to Rules. A rule is a statement that defines or constrains some aspect of the business.

Operations

Translation

Operations related to Translation. Translation is the communication of a source language text's meaning through an equivalent target language text.

Operations

Validation Graph

Operations related to Validation Graphs. A Validation Graph is a graph-based data model representation of knowledge within a domain.

Operations

Values

Operations related to Values. A value is a piece of information that is stored in a database.

Operations