Skip to main content
Version: 26.03

Invoke a Skill or Query (Simple)

GET /agent

**Invoke a Skill or Query (Simple): **

Parameters​

nameintyperequireddescription
assetquerystringfalseThe Target Asset of the Query (targets the complete dataspace if empty)
runModequerystringfalseDetermines the preferred execution location which may be "consumer" (in the computing environment of the endpoint agent), "provider" (in the computing environment of the remote agent providing the targetted asset) or "all" (the agent will choose the best computing environment based on contracts and policies, this is the default mode).
queryLnquerystringfalseDetermines the query language. Currently only "SPARQL" is supported.
queryquerystringfalseThe SPARQL query
(vinquerystringfalseA sample bound parameter 'vin' which opens a new input tuple
troubleCodequeryarrayfalseA sample multi-bound parameter 'troubleCode' which closes the tuple

Code Snippets​

Shell + Curl
curl --request GET \
--url 'https://knowledge.dev.demo.catena-x.net/consumer-edc-data/BPNL00000003CQI9/api/agent?asset=SOME_STRING_VALUE&runMode=SOME_STRING_VALUE&queryLn=SOME_STRING_VALUE&query=SOME_STRING_VALUE&(vin=SOME_STRING_VALUE&troubleCode=SOME_ARRAY_VALUE'

Responses​

200​

The SparQL query has been processed successfully.

Headers
content-typeapplication/sparql-results+json

Example response for application/sparql-results+json

{}
Headers
content-typeapplication/sparql-results+xml

Example response for application/sparql-results+xml

<?xml version="1.0" encoding="utf-8"?>
<sparql>
<head>
<variable>
<name>string</name>
</variable>
</head>
<results>
<result>
<binding>
<name>string</name>
<literal>string</literal>
<uri>string</uri>
</binding>
</result>
</results>
</sparql>
Headers
content-typetext/csv

Example response for text/csv

"\"subject\",\"predicate\",\"object\"\n\"foo\",\"meets\",\"bar\"\n\"one\",\"meets\",\"two\""
Headers
content-typetext/tab-separated-values

Example response for text/tab-separated-values

"?subject ?predicate ?object"
Headers
content-typeapplication/x-binary-rdf-results-table

Example response for application/x-binary-rdf-results-table

"string"

203​

The SparQL query has been processed successfully but warnings did occur.

Headers
content-typeapplication/sparql-results+json

Example response for application/sparql-results+json

{}
Headers
content-typeapplication/sparql-results+xml

Example response for application/sparql-results+xml

<?xml version="1.0" encoding="utf-8"?>
<sparql>
<head>
<variable>
<name>string</name>
</variable>
</head>
<results>
<result>
<binding>
<name>string</name>
<literal>string</literal>
<uri>string</uri>
</binding>
</result>
</results>
</sparql>
Headers
content-typetext/csv

Example response for text/csv

"\"subject\",\"predicate\",\"object\"\n\"foo\",\"meets\",\"bar\"\n\"one\",\"meets\",\"two\""
Headers
content-typetext/tab-separated-values

Example response for text/tab-separated-values

"?subject ?predicate ?object"
Headers
content-typeapplication/x-binary-rdf-results-table

Example response for application/x-binary-rdf-results-table

"string"

400​

Bad request or malformed SPARQL

500​

Fatal error

(C) 2021 Contributors to the Eclipse Foundation. SPDX-License-Identifier: CC-BY-4.0