# Business Partner Storages Provides functionalities for creating, retrieving, updating and deleting Business Partner storage, as well as managing associated data sources and data monitors. ## Update Storage - [PUT /storages/{storageId}](https://developer.cdq.com/apis/data-exchange-api/api-v5/business-partner-storages/paths/~1storages~1%7Bstorageid%7D/put.md): Update a Business Partner Storage. ## Delete Storage - [DELETE /storages/{storageId}](https://developer.cdq.com/apis/data-exchange-api/api-v5/business-partner-storages/paths/~1storages~1%7Bstorageid%7D/delete.md): Delete a Business Partner Storage. ## Read Storage - [GET /v2/storages/{storageId}](https://developer.cdq.com/apis/data-exchange-api/api-v5/business-partner-storages/paths/~1v2~1storages~1%7Bstorageid%7D/get.md): Read metadata of a storage. ## Roll Event Store - [POST /v2/storages/{storageId}/eventstore/roll](https://developer.cdq.com/apis/data-exchange-api/api-v5/business-partner-storages/paths/~1v2~1storages~1%7Bstorageid%7D~1eventstore~1roll/post.md): This endpoint facilitates the transition to a new event store for Business Partner Storage. The process involves several key steps: Ensure that the collection associated with does not exist. If it does, rolling to a new event store is prohibited. Establish a new collection intended to store events for the Business Partner Storage's event store. Safeguard the current by storing it as within the Business Partner Storage Metadata. Update the Business Partner Storage Metadata by setting the new collection ID as the . Retain the without dropping it, as it is now prepared for backup. This endpoint ensures a smooth transition while maintaining the integrity and accessibility of historical event data. ## Clear Storage - [POST /storages/{storageId}/clear](https://developer.cdq.com/apis/data-exchange-api/api-v5/business-partner-storages/paths/~1storages~1%7Bstorageid%7D~1clear/post.md): Remove all Business Partners from given Business Partner Storage. ## Create Data Source - [POST /storages/{storageId}/datasources](https://developer.cdq.com/apis/data-exchange-api/api-v5/business-partner-storages/paths/~1storages~1%7Bstorageid%7D~1datasources/post.md): Create a new data source. Max 100 data sources are allowed. Warn: If you have an integration with one data source, please check if data source id is included in the upsert request before adding a new data source. Otherwise, adding new data source may lead to upsert failures visible as bad request containing message "No DataSource was provided for the given Business Partners and the storage has more than one attached to it.". In case data source is created within DATA_MIRROR and does not have or filled, is set to . ## Update Data Source - [PUT /storages/{storageId}/datasources/{dataSourceId}](https://developer.cdq.com/apis/data-exchange-api/api-v5/business-partner-storages/paths/~1storages~1%7Bstorageid%7D~1datasources~1%7Bdatasourceid%7D/put.md): Update a Data Source. ## Delete Data Source - [DELETE /storages/{storageId}/datasources/{dataSourceId}](https://developer.cdq.com/apis/data-exchange-api/api-v5/business-partner-storages/paths/~1storages~1%7Bstorageid%7D~1datasources~1%7Bdatasourceid%7D/delete.md): Delete a data source and its dependencies: * Business Partners from a storage, * update monitors, data monitors and sharing scopes for that data source are adjusted (data source is removed from the data sources list of a resource and resource is removed if data source was the only one assigned). ## Clear Data Source - [POST /storages/{storageId}/datasources/{dataSourceId}/clear](https://developer.cdq.com/apis/data-exchange-api/api-v5/business-partner-storages/paths/~1storages~1%7Bstorageid%7D~1datasources~1%7Bdatasourceid%7D~1clear/post.md): Clear all Business Partners of a data source. ## Copy Data Source - [POST /storages/{storageId}/datasources/{dataSourceId}/copy](https://developer.cdq.com/apis/data-exchange-api/api-v5/business-partner-storages/paths/~1storages~1%7Bstorageid%7D~1datasources~1%7Bdatasourceid%7D~1copy/post.md): Copy a data source between storages. ## Poll Copy Data Source Job Status - [GET /storages/{storageId}/datasources/{dataSourceId}/copy/{jobId}](https://developer.cdq.com/apis/data-exchange-api/api-v5/business-partner-storages/paths/~1storages~1%7Bstorageid%7D~1datasources~1%7Bdatasourceid%7D~1copy~1%7Bjobid%7D/get.md): Allows polling the status of copy data source job ## List Storages - [GET /v2/storages](https://developer.cdq.com/apis/data-exchange-api/api-v5/business-partner-storages/paths/~1v2~1storages/get.md): List all storages to which user has access to. ## Create Storage - [POST /v2/storages](https://developer.cdq.com/apis/data-exchange-api/api-v5/business-partner-storages/paths/~1v2~1storages/post.md): If no data source is provided, a minimal data source (name=default and without mapping ID) is attached. ## List Update Monitors' Data Sources - [GET /v2/updatemonitors/referencedatasources](https://developer.cdq.com/apis/data-exchange-api/api-v5/business-partner-storages/paths/~1v2~1updatemonitors~1referencedatasources/get.md): List all data sources available for update monitoring. ## List Sharing Scopes - [GET /v4/storages/{storageId}/sharingscopes](https://developer.cdq.com/apis/data-exchange-api/api-v5/business-partner-storages/paths/~1v4~1storages~1%7Bstorageid%7D~1sharingscopes/get.md): List all sharing scopes of the give storage. ## Create Sharing Scope - [POST /v4/storages/{storageId}/sharingscopes](https://developer.cdq.com/apis/data-exchange-api/api-v5/business-partner-storages/paths/~1v4~1storages~1%7Bstorageid%7D~1sharingscopes/post.md): Create a new sharing scope. Max 100 sharing scopes are allowed. When creating sharing scope, all Business Partners from selection scope which are covered become disclosed. The following table presents the source for disclosed field. | Mapping disclosure | Sharing Scope matches | Source for disclosed | |---|---|---| | true | yes | Mapping disclosure | | true | no | Mapping disclosure | | false | yes | Sharing Scope | | false | no | default: false, otherwise from API request up to V4 | When source for disclosed field is Sharing Scope, the value is determined only during the creation of a Sharing Scope or Business Partner. Any new update of Business Partner doesn't overwrite the value of disclosed in the Business Partner. To change the disclosure of a concrete Business Partner, it has to be requested directly. ## Delete Sharing Scopes - [POST /v4/storages/{storageId}/sharingscopes/delete](https://developer.cdq.com/apis/data-exchange-api/api-v5/business-partner-storages/paths/~1v4~1storages~1%7Bstorageid%7D~1sharingscopes~1delete/post.md): Delete sharing scopes. When deleting sharing scope, all Business Partners from selection scope who are not included in any other sharing scopes, become undisclosed. ## Update Data Sources (deprecated) - [PUT /storages/{storageId}/datasources](https://developer.cdq.com/apis/data-exchange-api/api-v5/business-partner-storages/paths/~1storages~1%7Bstorageid%7D~1datasources/put.md): This endpoint is deprecated. Please use * create data source to create a new data source, * update data source to update existing data source, * delete data source to delete existing data source. Update all data sources of a given storage. * When a new data source without id is added to the list, it is created. In case data source is created within DATA_MIRROR and does not have or filled, is set to . * When existing data source is provided on a list with id included, it is updated. * When data source identified by id is not included in a list, it is deleted with all its related Business Partners, data monitors and sharing scopes for that data source are adjusted (data source is removed from the data sources list of a resource and resource is removed if data source was the only one assigned). Note: all data sources that are expected to remain in the storage must be included on a list. Warn: If you have an integration with one data source, please check if data source id is included in the upsert request before adding a new data source. Otherwise, adding new data source may lead to upsert failures visible as bad request containing message "No DataSource was provided for the given Business Partners and the storage has more than one attached to it.". ## List Update Monitors' Data Sources (deprecated) - [GET /updatemonitors/datasources](https://developer.cdq.com/apis/data-exchange-api/api-v5/business-partner-storages/paths/~1updatemonitors~1datasources/get.md): List all data sources available for update monitoring.