Archive assets
Archives multiple Asset Hub assets in a single request, with per asset success and failure results.
Prerequisites
- Authentication and setup: A valid access token.
- Create assets: The assets must exist.
Endpoint
Section titled “Endpoint”POST /api/assethub/v2/assets/archiveBase 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 |
|---|---|---|---|
asset_ids |
string[] | Required | Array of unique asset IDs to archive. The list must be non-empty, contain entirely unique string entries, and stay within the configured upper limit, commonly 50 items. |
user_id |
string | Required | Identifier of the user on whose behalf the archiving action is performed. Used to complete authorization checks. |
Request example
Section titled “Request example”{ "asset_ids": ["123456789012345101", "123456789012345102"], "user_id": "123456789abcd103"}Response
Section titled “Response”| Field | Type | Description |
|---|---|---|
request_id |
string | Unique tracking identifier for tracing the transaction and system logs. |
archived |
string[] | Array of the IDs of all assets successfully moved to the archived state. |
failed |
object[] | Array of objects for items that failed processing. Each object contains an asset_id and a descriptive failure reason. |
Response example
Section titled “Response example”This standalone example illustrates partial success for three assets. Its IDs are independent of the request example above:
{ "request_id": "req_101", "archived": ["asset1", "asset2"], "failed": [{ "asset_id": "123456789012345104", "reason": "Asset not found" }]}- Supported scope: Asset Hub assets.
- Partial success: Each asset in the request carries its own validation or processing outcome, returned in
archivedorfailed. - Limits: Maximum 50 assets per request. Larger jobs must be split into separate client side batches.
- Permissions: The user in
user_idmust have asset management permission, and the assets must belong to the account the access token authenticates. - Deduplication: Remove duplicate entries from the payload array before you call the endpoint, to avoid extra validation results in the response.