Create many assets, with per-item results
For syncing an inventory. Each item is reported separately by its index, so a batch with two bad rows lands the rest and names the two.
Capacity is stated for the WHOLE batch before any row lands: a batch that does not fit adds nothing rather than filling the remaining headroom and stopping partway.
Status is 201 when every item succeeded, 400 when every item failed, and 207 only when the outcomes are genuinely mixed — so a caller branching on the status alone is never misled about the simple cases.
Authorization
BearerAuth API authentication via Authorization: Bearer <your-api-key>. Obtain
your API key from Config → API in the Aplas web app.
In: header
Path Parameters
The workspace's slug.
The asset type's slug.
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
application/json
application/json
application/json
application/json
application/json
curl -X POST "https://api.au.aplas.com/api/v3/workspaces/string/asset-types/string/assets/bulk" \ -H "Content-Type: application/json" \ -d '[ { "name": "string" } ]'{
"results": [
{
"index": 0,
"status": 0,
"asset": {
"id": "string",
"name": "string",
"shortName": "string",
"description": "string",
"status": 0,
"fields": {},
"sample": true,
"createdAt": "2019-08-24T14:15:22Z",
"updatedAt": "2019-08-24T14:15:22Z"
},
"error": {
"message": "string"
}
}
]
}{
"results": [
{
"index": 0,
"status": 0,
"asset": {
"id": "string",
"name": "string",
"shortName": "string",
"description": "string",
"status": 0,
"fields": {},
"sample": true,
"createdAt": "2019-08-24T14:15:22Z",
"updatedAt": "2019-08-24T14:15:22Z"
},
"error": {
"message": "string"
}
}
]
}{
"results": [
{
"index": 0,
"status": 0,
"asset": {
"id": "string",
"name": "string",
"shortName": "string",
"description": "string",
"status": 0,
"fields": {},
"sample": true,
"createdAt": "2019-08-24T14:15:22Z",
"updatedAt": "2019-08-24T14:15:22Z"
},
"error": {
"message": "string"
}
}
]
}{
"statusCode": 403,
"error": "Forbidden",
"message": "The permissions of your API key only allow read-only/GET calls."
}{
"statusCode": 403,
"error": "Forbidden",
"message": "The permissions of your API key only allow read-only/GET calls."
}{
"statusCode": 403,
"error": "Forbidden",
"message": "The permissions of your API key only allow read-only/GET calls."
}{
"statusCode": 403,
"error": "Forbidden",
"message": "The permissions of your API key only allow read-only/GET calls."
}