Skip to main content
Version: 24.08

Register a Skill

POST /agent/skill

Register a Skill:

Parameters

nameintyperequireddescription
assetquerystringtrueThe Asset Id of the Skill
assetNamequerystringfalseThe Asset Name of the Skill
assetDescriptionquerystringfalseThe Asset Description of the Skill
assetVersionquerystringfalseThe Asset Version of the Skill
distributionModequerystringfalseThe distribution mode under which to publish the skill
contractquerystringfalseThe contract under which the skill should be published
isFederatedquerybooleanfalseWhether the skill should be visible in the Federated Catalogue
ontologyquerystringfalseMultiple references to ontologies which are referenced in the skill
allowServicePatternquerystringfalseA regex indicating which external SERVICE Iris are allowed during execution.
denyServicePatternquerystringfalseA regex indicating which external SERVICE Iris are forbidden during execution.

Request Body

Headers
content-typeapplication/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