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

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

Release New Version

Request

This operation is asynchronous and returns a job id that can be used to track the status of the release of Data Validation Graph.

Security
basicAuth
Path
knowledgeGraphIdintegerrequired

Used to identify Knowledge Graph and objects inside it.

Example: 1
modelIdintegerrequired

Used to identify model 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
conceptsToAddArray of integers(ConceptsIdList)

List of concept (or rule) IDs.

Example: ["1"]
conceptsToRemoveArray of integers(ConceptsIdList)

List of concept (or rule) IDs.

Example: ["1"]
descriptionstring

Description of the release.

Example: "Release of the validation graph."
curl -i -X POST \
  -u <username>:<password> \
  https://idp.cdq.com/_mock/apis/knowledge-graph-api/api-v1/knowledgegraphs/1/models/1/validationgraph/release \
  -H 'Content-Type: application/json' \
  -H 'X-Credential-Username: 87b1bdb1-ba87-4522-b363-c5a0e6e917b3' \
  -d '{
    "summary": "Release validation graph request",
    "value": "{\"conceptsToAdd\":[110],\"conceptsToRemove\":[112],\"description\":\"\"}\n"
  }'

Responses

OK

Bodyapplication/json
releaseIdintegerrequired

Release unique ID.

Example: "1"
releaseJobIdstringrequired

Release job UUID.

Example: "1"
Response
application/json
{ "summary": "Release validation graph response", "value": "{ \"releaseId\": 7, \"releaseJobId\": \"job-uuid\" }\n" }

List Data Validation Graph Releases

Request

Fetches all releases related to a model.

Security
basicAuth
Path
knowledgeGraphIdintegerrequired

Used to identify Knowledge Graph and objects inside it.

Example: 1
modelIdintegerrequired

Used to identify model and objects inside it.

Example: 1
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
releaseIdArray of integers

Used to identify release, passed in URL.

Example: releaseId=1
editStatusstring

Filter validationgraph releases by edit status.

Example: editStatus=ACTIVE
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
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/models/1/validationgraph/releases \
  -H 'X-Credential-Username: 87b1bdb1-ba87-4522-b363-c5a0e6e917b3'

Responses

OK

Bodyapplication/json
pageSizeinteger(PageSize)[ 1 .. 1000 ]required

Number of items per page.

Default 10
Example: "100"
pageinteger(Page)>= 0required

Current page number.

Default 0
Example: "1"
totalinteger(PageTotal)

Total number of items which can be paged.

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

List of releases.

values[].​releaseIdintegerrequired

Release unique ID.

Example: "1"
values[].​releaseJobIdstringrequired

Release job UUID.

Example: "1"
values[].​statusstringrequired

Release status.

Enum ValueDescription
RUNNING

The release is still running.

FINISHED

The release finished with success.

FAILED

The release failed or finished with no success.

Example: "RUNNING"
values[].​outputFilestring

S3 path to a file containing data associated with this release (TTL file with in case of Validation Graph release).

Example: "s3://cdq-data/1.ttl"
values[].​releasedFilestring

Shows the released file - might be null if the status is not FINISHED or FAILED.

Example: "knowledgegraphs/customPathToFolderOnS3/userName-2022-04-14T09-04-01.082706266.ttl.gz"
values[].​startDatestring

Release start date in ISO-8601 format.

Example: "2020-07-06T12:14:03.204Z"
values[].​endDatestring

Release end date in ISO-8601 format.

Example: "2020-07-06T12:14:03.204Z"
values[].​userstringrequired

User who submitted the release.

Example: "user"
values[].​descriptionstring

Release description.

Example: "Release of the validation graph."
values[].​logMessagestring

Optional system message (for example error log).

Example: "Error message"
Response
application/json
{ "pageSize": "100", "page": "1", "total": "67", "values": [ {} ] }

Update Released File

Request

Updates released_file column from release_job identified by editId.

Security
basicAuth
Path
knowledgeGraphIdintegerrequired

Used to identify Knowledge Graph and objects inside it.

Example: 1
modelIdintegerrequired

Used to identify model and objects inside it.

Example: 1
editIdintegerrequired

Used to identify edit.

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
releasedFilestringrequired

Update releasedFile in release_job.

Example: "knowledgegraphs/customPathToFolderOnS3/userName-2022-04-14T09-04-01.082706266.ttl.gz"
curl -i -X PUT \
  -u <username>:<password> \
  https://idp.cdq.com/_mock/apis/knowledge-graph-api/api-v1/knowledgegraphs/1/models/1/validationgraph/1/release/releasedFile \
  -H 'Content-Type: application/json' \
  -H 'X-Credential-Username: 87b1bdb1-ba87-4522-b363-c5a0e6e917b3' \
  -d '{
    "summary": "Updates released_file column of a release job.",
    "value": "{\"releasedFile\": \"knowledgegraphs/customPathToFolderOnS3/userName-2022-04-14T09-04-01.082706266.ttl.gz\"}\n"
  }'

Responses

OK

List Data Validation Graph Releases

Request

Fetches all releases related to a model based on releases IDs.

Security
basicAuth
Path
knowledgeGraphIdintegerrequired

Used to identify Knowledge Graph and objects inside it.

Example: 1
modelIdintegerrequired

Used to identify model and objects inside it.

Example: 1
releaseIdintegerrequired

Used to identify release.

Example: 1
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
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
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/models/1/validationgraph/release/1/details \
  -H 'X-Credential-Username: 87b1bdb1-ba87-4522-b363-c5a0e6e917b3'

Responses

OK

Bodyapplication/json
pageinteger(Page)>= 0

Current page number.

Default 0
Example: "1"
pageSizeinteger(PageSize)[ 1 .. 1000 ]

Number of items per page.

Default 10
Example: "100"
totalinteger(PageTotal)

Total number of items which can be paged.

Example: "67"
valuesArray of objects(RulesReleaseDetails)

List of rules.

Response
application/json
{ "summary": "List of released Rules", "value": "{\"page\":0,\"pageSize\":10,\"values\":[{\"releaseInfo\":{\"releaseId\":7,\"releaseJobId\":\"8004c1d1-4c01-9691-3c36-bc243de4f4d6\",\"status\":\"FINISHED\",\"outputFile\":\"knowledgegraphs/release/cdq/release-2022-03-07T09-40-17.101577750.ttl.gz\",\"startDate\":\"2022-03-07T09:40:17\",\"endDate\":\"2022-03-07T09:40:41\",\"user\":\"user\",\"description\":\"Update release status\"}},{\"releaseInfo\":{\"releaseId\":8,\"releaseJobId\":\"2c39ad88-3a8b-b42f-48f4-1de6fa9c9abf\",\"status\":\"FINISHED\",\"outputFile\":\"knowledgegraphs/release/cdq/release-2022-03-09T14-38-48.514414793.ttl.gz\",\"startDate\":\"2022-03-09T14:38:48\",\"endDate\":\"2022-03-09T14:39:16\",\"user\":\"user\",\"description\":\"Update release status\"},\"affectedRules\":[{\"releaseId\":8,\"ruleId\":110,\"ruleUrl\":\"http://www.cdq.com/rule/1\",\"ruleStatus\":\"DEACTIVATED\",\"isCurrentStatus\":true}]}]}\n" }

Release Job Update Status

Request

Updates status of the release job identified by editId.

Security
basicAuth
Path
knowledgeGraphIdintegerrequired

Used to identify Knowledge Graph and objects inside it.

Example: 1
modelIdintegerrequired

Used to identify model and objects inside it.

Example: 1
editIdintegerrequired

Used to identify edit.

Example: 1
jobStatusstringrequired

Describes the status of a job.

Enum ValueDescription
RUNNING

Job is still running.

FINISHED

Job finished with success.

FAILED

Job failed or finished with no success.

Example: FINISHED
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 PUT \
  -u <username>:<password> \
  https://idp.cdq.com/_mock/apis/knowledge-graph-api/api-v1/knowledgegraphs/1/models/1/validationgraph/1/status/FINISHED \
  -H 'X-Credential-Username: 87b1bdb1-ba87-4522-b363-c5a0e6e917b3'

Responses

OK

Values

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

Operations