-
Notifications
You must be signed in to change notification settings - Fork 1
Offer data via API
For the CaaS you need an access token to call your CaaS-API. Please contact your CaaS-Provider to get your client id, client secret and access token url of your CaaS. Then create the following auth script or you can download this template from here.
curl \ -d 'grant_type=client_credentials' \ -d 'client_id=[Please set your client id]' \ -d 'client_secret=[Please set your client secret]' \ '[Please set the access token url]'
For the On-premise Connector you are able to configure your access yourself depending on authorization mechanism you are using.
Then you need to create a custom json request for the asset creation. Please use this template as template with all available attributes and just remove attributes you not needed.
Last but not least you need to send the json request to your API (in case of CaaS using the authorisation token from the auth script). You can just use this python script as example or write your own script.
Note: use the endpoint POST [Connector base url]/api/management/v3/assets
for asset creation.
Please use this Postman collection as template to define customized policies and Contract Definitions.
For the creation of a contract definition with multiple assets you can use this template.
Note: use the endpoint POST [Connector base url]/api/management/v2/contractdefinitions
for contract definition creation.
Use Postman and import the collection.
Depending on your configuration changes, you need to adjust variables on collection MDV > Variables > Current Value
. Please note, that api_key
needs to be aligned with EDC_API_AUTH_KEY
in the docker-compose.yaml
- The imported collection will display prepared API requests under the folders for the API-Wrapper and the Management-API
- The API requests require specifying the API base-path, which depends on your specific deployed connector, this base-path can easily be found in the CaaS UI or in the dashboard of your on prem connector
- Authentication against the Management-API/API-Wrapper of your connector is necessary to execute API calls. You can configure it yourselves for the on-prem connectors or contact your CaaS provider to obtain auth details
- The APIs of the API-Wrapper or the Management-API available in the collection can then be used to control the connector via API
Please use the Postman collection as template to define customized policies and data offers.
Please use this template as example. Don't forget to set your own base URL.
- Home
- User guide
- Useful information