Move or mirror assets
Moves or mirrors assets across hubs asynchronously and returns an execution ID to track progress.
Prerequisites
- Authentication and setup: A valid access token.
- Create assets: The assets must exist and must not be archived.
- Create a hub: The target hubs must exist.
Endpoint
Section titled “Endpoint”PATCH /api/assethub/v2/map-asset-hub/asyncBase URL: the standard REST host for your region. See Base URLs.
Headers: Authorization: Bearer ACCESS_TOKEN, Content-Type: application/json.
Request
Section titled “Request”| Parameter | Type | Required | Description |
|---|---|---|---|
user_id |
string | Required | ID of the user performing the operation. Must have the DEVELOP_ASSETS permission on the target hubs. |
assets |
array | Required | List of mapping operations. Maximum 50 entries per request. |
assets[].asset_id |
string | Required | ID of the asset to map. |
assets[].operation |
integer | Required | Mapping type. 1 moves the asset by replacing all current hub mappings with the supplied hubs. 2 mirrors it into the supplied hubs while retaining existing mappings. |
assets[].hubs |
string[] | Required | Target hub IDs where the asset should be mapped. |
Request example
Section titled “Request example”{ "user_id": "123456789abcd101", "assets": [ { "asset_id": "123456789012345102", "operation": 2, "hubs": ["hub_456", "hub_789"] }, { "asset_id": "123456789012345103", "operation": 1, "hubs": ["hub_123"] } ]}Response
Section titled “Response”| Field | Type | Description |
|---|---|---|
execution_id |
string | ID used to track the asynchronous operation status. |
request_id |
string | Unique ID for the request. |
- Move: Operation
1replaces the asset’s entire existing hub list with the target hubs in the request. The asset is removed from all current hubs and added only to the new ones. For example, an asset in the New York hub moved to the San Francisco hub ends up only in the San Francisco hub, and an asset in the London, Berlin, and Paris hubs moved to the Tokyo and Sydney hubs ends up only in the Tokyo and Sydney hubs. The asset is removed from any hub not included in the target hubs. - Mirror: Operation
2keeps the asset in its existing hubs and adds the target hubs in the request. For example, an asset in the London, Berlin, and Paris hubs mirrored to the Tokyo and Sydney hubs stays in London, Berlin, and Paris, and is also in Tokyo and Sydney. - Async processing: This endpoint starts a background job. Use the
execution_idto check the final status of each item. - Limits: Maximum 50 assets per request.
- Permissions: The
user_idmust have theDEVELOP_ASSETSpermission on all target hubs. - Validation: The request fails if the asset is archived, or if an asset with the same name or file ID already exists in a target hub.
- Status response: Confirm the status response fields for your operation with Mindtickle Support before implementing polling. Do not assume creation and move or mirror operations use the same response shape because they share
GET /api/assethub/v2/assets/async/{execution_id}.
Check status
Section titled “Check status”Poll the result of the bulk mapping operation with the execution_id this endpoint returns.
GET /api/assethub/v2/assets/async/{execution_id}Query parameters:
| Parameter | Type | Required | Description |
|---|---|---|---|
user_id |
string | Required | User ID context. |
limit |
integer | Optional | Number of records to fetch. |
skip |
integer | Optional | Number of records to skip. |
Illustrative failure response. The asset and hub IDs differ from those in the request example above:
{ "execution_status": "FAILED", "total_count": 1, "failed_count": 1, "assets": [ { "asset_id": "123456789012345104", "hub_ids": ["123456789012345105"], "status": "TASK_STATUS_FAILED", "message": "Asset is archived" } ]}