Register a Skill
POST /agent/skill
Register a Skill:
Parameters
name | in | type | required | description |
---|---|---|---|---|
asset | query | string | true | The Asset Id of the Skill |
assetName | query | string | false | The Asset Name of the Skill |
assetDescription | query | string | false | The Asset Description of the Skill |
assetVersion | query | string | false | The Asset Version of the Skill |
distributionMode | query | string | false | The distribution mode under which to publish the skill |
contract | query | string | false | The contract under which the skill should be published |
isFederated | query | boolean | false | Whether the skill should be visible in the Federated Catalogue |
ontology | query | string | false | Multiple references to ontologies which are referenced in the skill |
allowServicePattern | query | string | false | A regex indicating which external SERVICE Iris are allowed during execution. |
denyServicePattern | query | string | false | A regex indicating which external SERVICE Iris are forbidden during execution. |
Request Body
Headers | |
---|---|
content-type | application/sparql-query |
Example request
SELECT DISTINCT ?luogo ?indirizzo ?comune WHERE {
?x a cis:CulturalInstituteOrSite ;
cis:institutionalCISName ?luogo ;
cis:hasSite ?site .
?site cis:siteAddress ?address .
?address clvapit:fullAddress ?indirizzo ;
clvapit:hasCity [rdfs:label ?comune] .
FILTER regex(str(?comune), "Vinci", "i")
} ORDER BY ?luogo LIMIT 100
Code Snippets
Shell + Curl
curl --request POST \
--url 'https://knowledge.dev.demo.catena-x.net/consumer-edc-data/BPNL00000003CQI9/api/agent/skill?asset=SkillAsset%3Fconsumer%3DDataspace&assetName=Sample%20Skill&assetVersion=1.0.5&assetDescription=Performs%20some%20sample%20operations.&distributionMode=ALL&contract=Contract%3Fconsumer%3DSkill&isFederated=true&allowedServicePattern=edcs%3F%3A%2F%2F.*' \
--header 'content-type: application/sparql-query' \
--data 'PREFIX cx-common: <https://w3id.org/catenax/ontology/common#>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX sh: <http://www.w3.org/ns/shacl#>
SELECT ?connector ?asset
?name
(MIN(?adescription) AS ?description)
?type
(MAX(?aversion) AS ?version)
(GROUP_CONCAT(DISTINCT ?acontentType;SEPARATOR=",") AS ?contentType)
?protocol
(CONCAT("<",GROUP_CONCAT(?aontology;SEPARATOR=">,<"),">") AS ?isDefinedBy)
(MIN(?ashape) AS ?shape)
WHERE {
?connector cx-common:offers ?asset.
?asset cx-common:contentType ?acontentType;
cx-common:name ?name;
rdf:type ?type;
rdfs:isDefinedBy ?aontology;
cx-common:version ?aversion;
cx-common:description ?adescription;
cx-common:implementsProtocol ?protocol.
OPTIONAL {
?asset sh:shapesGraph ?ashape
}
} GROUP BY ?connector ?asset ?name ?type ?protocol
'
Responses
200
Skill has been registered
204
Skill has been updated
400
Bad request or malformed SPARQL
500
Fatal error
(C) 2021,2024 Contributors to the Eclipse Foundation. SPDX-License-Identifier: CC-BY-4.0