Offer data via API - Mobility-Data-Space/mobility-data-space GitHub Wiki
Access to API
For the CaaS you need an access token to call your CaaS-API. Please follow the mail sent by your CaaS-Provider to proceed.
For the On-premise Connector you are able to configure your access yourself depending on authorization mechanism you are using.
Offer data via API
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.
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.
Postman collection
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.
Offer data via API using parametrization
Please use this template as example. Don't forget to set your own base URL.