Skip to content
Dark mode

Move or mirror assets

Moves or mirrors assets across hubs asynchronously and returns an execution ID to track progress.

Prerequisites

  1. Authentication and setup: A valid access token.
  2. Create assets: The assets must exist and must not be archived.
  3. Create a hub: The target hubs must exist.
PATCH /api/assethub/v2/map-asset-hub/async

Base URL: the standard REST host for your region. See Base URLs.

Headers: Authorization: Bearer ACCESS_TOKEN, Content-Type: application/json.

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.
{
"user_id": "123456789abcd101",
"assets": [
{
"asset_id": "123456789012345102",
"operation": 2,
"hubs": ["hub_456", "hub_789"]
},
{
"asset_id": "123456789012345103",
"operation": 1,
"hubs": ["hub_123"]
}
]
}
Field Type Description
execution_id string ID used to track the asynchronous operation status.
request_id string Unique ID for the request.
  • Move: Operation 1 replaces 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 2 keeps 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_id to check the final status of each item.
  • Limits: Maximum 50 assets per request.
  • Permissions: The user_id must have the DEVELOP_ASSETS permission 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}.

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"
}
]
}