Skip to main content
Version: 24.08

Invoke a Skill or Query (Flexible)

POST /agent

Invoke a Skill or Query (Flexible):

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 (in case that the body contains a tuple set)
(vinquerystringfalseA sample bound parameter 'vin' which opens a new input tuple
troubleCodequeryarrayfalseA sample multi-bound parameter 'troubleCode' which closes the tuple

Request Body

Headers
content-typeapplication/sparql-results+json
Example request
{}
Headers
content-typeapplication/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-typeapplication/sparql-query
Example request
"string"

Code Snippets

Shell + Curl
curl --request POST \
--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' \
--header 'content-type: application/sparql-query'

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,2023 Contributors to the Eclipse Foundation. SPDX-License-Identifier: CC-BY-4.0