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.
Knowledge Graph API (1)
https://idp.cdq.com/_mock/apis/knowledge-graph-api/api-v1/
https://api.corporate-data-league.ch/knowledge-graph-api/soap/v1/
https://api.corporate-data-league.ch/knowledge-graph-api/
- Mock server
https://idp.cdq.com/_mock/apis/knowledge-graph-api/api-v1/knowledgegraphs/{knowledgeGraphId}/models/{modelId}/translate/json
- Production SOAP
https://api.corporate-data-league.ch/knowledge-graph-api/soap/v1/knowledgegraphs/{knowledgeGraphId}/models/{modelId}/translate/json
- Production
https://api.corporate-data-league.ch/knowledge-graph-api/knowledgegraphs/{knowledgeGraphId}/models/{modelId}/translate/json
curl -i -X POST \
-u <username>:<password> \
https://idp.cdq.com/_mock/apis/knowledge-graph-api/api-v1/knowledgegraphs/1/models/1/translate/json \
-H 'Content-Type: application/json' \
-H 'X-Credential-Username: 87b1bdb1-ba87-4522-b363-c5a0e6e917b3' \
-d '{
"summary": "Translate JSON data into RDF structure.",
"value": "{ \"JsonRecord\": { \"data\": { \"record\": \"123\", \"EMail\": \"John.Doecdq.com\", \"FirstName\": \"John\", \"LastName\": \"Doe\" } } }\n"
}'OK
RDF record.
{ "summary": "Successful translation of JSON into an RDF structure.", "value": "{ \"rdfRecord\": \"SELECT * WHERE { ?a a <http://cacac.com/Data> ; <http://cacac.com/Property/Data/EMail> ?data_EMail ; <http://cacac.com/Property/Data/FirstName> ?data_FirstName ; <http://cacac.com/Property/Data/LastName> ?data_LastName ; <http://cacac.com/Property/Data/record> ?data_record ; <http://cacac.com/Property/Has_json_path> /Data ; <http://cacac.com/Property/Has_record_id> ?has_record_id . ?b a <http://cacac.com/Record> ; <http://cacac.com/Property/Data> ?a ; <http://cacac.com/Property/Has_record_id> ?has_record_id . }\", \"allJsonPaths\": [ \"data/EMail\", \"data/FirstName\", \"data/LastName\", \"data/record\" ] }\n" }
- Mock server
https://idp.cdq.com/_mock/apis/knowledge-graph-api/api-v1/knowledgegraphs/templates
- Production SOAP
https://api.corporate-data-league.ch/knowledge-graph-api/soap/v1/knowledgegraphs/templates
- Production
https://api.corporate-data-league.ch/knowledge-graph-api/knowledgegraphs/templates
curl -i -X GET \
-u <username>:<password> \
https://idp.cdq.com/_mock/apis/knowledge-graph-api/api-v1/knowledgegraphs/templates \
-H 'X-Credential-Username: 87b1bdb1-ba87-4522-b363-c5a0e6e917b3'{ "summary": "Successfully retrieved all JSON templates.", "value": "{\"templates\": [{\"MANDATORY_VALUE\": {\"Name\": \"Template for Mandatory Value of a field/variable\",\"URL\": \"https://cdq.com/templates/MandatoryValue\",\"TemplateOperations\": [{\"Key\": \"/Input\",\"Operation\": \"REPLACE\",\"Pattern\": \"#1 #2 $var\",\"Code\": \"OPTIONAL { #1 #2 $var . FILTER (str($var) != \\\"\\\") }\"},{\"Key\": \"!InOrder!\",\"Operation\": \"ADD\",\"Code\": \"FILTER(!BOUND($var))\"}]}}]}\n" }
- Mock server
https://idp.cdq.com/_mock/apis/knowledge-graph-api/api-v1/knowledgegraphs/generate/sparql
- Production SOAP
https://api.corporate-data-league.ch/knowledge-graph-api/soap/v1/knowledgegraphs/generate/sparql
- Production
https://api.corporate-data-league.ch/knowledge-graph-api/knowledgegraphs/generate/sparql
curl -i -X POST \
-u <username>:<password> \
https://idp.cdq.com/_mock/apis/knowledge-graph-api/api-v1/knowledgegraphs/generate/sparql \
-H 'Content-Type: application/json' \
-H 'X-Credential-Username: 87b1bdb1-ba87-4522-b363-c5a0e6e917b3' \
-d '{
"summary": "Translate imported JSON data into RDF structure."
}'{ "summary": "Successful Sparql query generation based on the provided template and input" }