Skip to content

Retain or delete assets in bulk

POST
/v1/assets/bulk
curl --request POST \
--url https://api.pixonaut.app/v1/assets/bulk \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "action": "retain", "ids": [ "7a3e9b10-2c4d-4e5f-9a6b-1c2d3e4f5a6b", "b8c9d0e1-f2a3-4b4c-8d5e-6f7a8b9c0d1e" ] }'

Operation ID: assets.bulkUpdate

Answers every id on its own, in results, so one refusal does not fail the rest. retain keeps design uploads from being deleted when the tenant’s retention runs out; any other id answers not_found. delete deletes assets of either kind, refusing each one as DELETE /v1/assets/{id} would, and a design upload an order holds as order_referenced.

Media typeapplication/json
object
action
required
string
Allowed values: retain delete
ids
required
Array<string>
>= 1 items <= 100 items

Examples

Exampleexample

Example

{
"action": "retain",
"ids": [
"7a3e9b10-2c4d-4e5f-9a6b-1c2d3e4f5a6b",
"b8c9d0e1-f2a3-4b4c-8d5e-6f7a8b9c0d1e"
]
}

Each id’s answer

Media typeapplication/json
object
results
required
Array
Any of:
object
id
required
string
ok
required
boolean

Examples

Exampleexample

Example

{
"results": [
{
"id": "7a3e9b10-2c4d-4e5f-9a6b-1c2d3e4f5a6b",
"ok": true
},
{
"error": "not_found",
"id": "b8c9d0e1-f2a3-4b4c-8d5e-6f7a8b9c0d1e",
"ok": false
}
]
}
X-Request-Id
required
string

Every response names the request it answers in X-Request-Id: the id the request was sent with in that header, when it is well formed, else one the API gave it. Quote it when reporting a refusal or a failure: the API’s log lines for that request carry it.

Refused: bad_json

Media typeapplication/json
object
error
required
string

Examples

Examplebad_json

bad_json

{
"error": "bad_json"
}
X-Request-Id
required
string

Every response names the request it answers in X-Request-Id: the id the request was sent with in that header, when it is well formed, else one the API gave it. Quote it when reporting a refusal or a failure: the API’s log lines for that request carry it.

Refused: unauthorized

Media typeapplication/json
object
error
required
string

Examples

Exampleunauthorized

unauthorized

{
"error": "unauthorized"
}
X-Request-Id
required
string

Every response names the request it answers in X-Request-Id: the id the request was sent with in that header, when it is well formed, else one the API gave it. Quote it when reporting a refusal or a failure: the API’s log lines for that request carry it.

Refused: origin_forbidden, forbidden, feature_disabled, workspace_suspended

Media typeapplication/json
object
error
required
string
feature

The feature the tenant does not have. Always sent with feature_disabled.

string

Examples

feature_disabled

{
"error": "feature_disabled",
"feature": "api"
}
X-Request-Id
required
string

Every response names the request it answers in X-Request-Id: the id the request was sent with in that header, when it is well formed, else one the API gave it. Quote it when reporting a refusal or a failure: the API’s log lines for that request carry it.

Refused: payload_too_large, invalid_input

Media typeapplication/json
object
bytes

Sent with payload_too_large.

number
error
required
string
maxBytes

Always sent with payload_too_large.

number

Examples

invalid_input

{
"error": "invalid_input"
}
X-Request-Id
required
string

Every response names the request it answers in X-Request-Id: the id the request was sent with in that header, when it is well formed, else one the API gave it. Quote it when reporting a refusal or a failure: the API’s log lines for that request carry it.

Refused: db_error. A request that failed unexpectedly answers as text instead.

object
error
required
string

Examples

Exampledb_error

db_error

{
"error": "db_error"
}
X-Request-Id
required
string

Every response names the request it answers in X-Request-Id: the id the request was sent with in that header, when it is well formed, else one the API gave it. Quote it when reporting a refusal or a failure: the API’s log lines for that request carry it.

Questions? Write to [email protected].

Status · Terms of service · Privacy policy · Subprocessors