Invoke a Skill or Query (Flexible)
POST /agent
**Invoke a Skill or Query (Flexible): **
Parameters
| name | in | type | required | description |
|---|---|---|---|---|
| asset | query | string | false | The Target Asset of the Query (targets the complete dataspace if empty) |
| runMode | query | string | false | Determines 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). |
| queryLn | query | string | false | Determines the query language. Currently only "SPARQL" is supported. |
| query | query | string | false | The SPARQL query (in case that the body contains a tuple set) |
| (vin | query | string | false | A sample bound parameter 'vin' which opens a new input tuple |
| troubleCode | query | array | false | A sample multi-bound parameter 'troubleCode' which closes the tuple |
Request Body
| Headers | |
|---|---|
| content-type | application/sparql-results+json |
Example request
{}
| Headers | |
|---|---|
| content-type | 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-type | application/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-type | application/sparql-results+json |
Example response for application/sparql-results+json
{}
| Headers | |
|---|---|
| content-type | application/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-type | text/csv |
Example response for text/csv
"\"subject\",\"predicate\",\"object\"\n\"foo\",\"meets\",\"bar\"\n\"one\",\"meets\",\"two\""
| Headers | |
|---|---|
| content-type | text/tab-separated-values |
Example response for text/tab-separated-values
"?subject ?predicate ?object"
| Headers | |
|---|---|
| content-type | application/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-type | application/sparql-results+json |
Example response for application/sparql-results+json
{}
| Headers | |
|---|---|
| content-type | application/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-type | text/csv |
Example response for text/csv
"\"subject\",\"predicate\",\"object\"\n\"foo\",\"meets\",\"bar\"\n\"one\",\"meets\",\"two\""
| Headers | |
|---|---|
| content-type | text/tab-separated-values |
Example response for text/tab-separated-values
"?subject ?predicate ?object"
| Headers | |
|---|---|
| content-type | application/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