Skip to main content

Post Assets

POST /assets

For each of the assets in the list of provided assets, upsert function will either add new asset to program, or update existing asset with the same asset_id

Request Parameters

Header Parameters

NameTypeDescription
program-id requiredstring

Request Body

AssetList | application/json

NameTypeProperties
assets requiredarray

items: {'$ref': '#/components/schemas/Asset'}

Asset | application/json

NameTypeProperties
asset_id requiredstring

maxLength: 64

asset_namestring

maxLength: 124

labelsarray

items: {}

Request Example

{
"assets": [
{
"asset_id": "string",
"asset_name": "string",
"labels": "array"
}
]
}

Responses

200 Successful Response

SuccessMessage | application/json

NameTypeProperties
result requiredstring

Response Example

{
"result": "string"
}

422 Validation Error

HTTPValidationError | application/json

NameTypeProperties
detailarray

items: {'$ref': '#/components/schemas/ValidationError'}

ValidationError | application/json

NameTypeProperties
loc requiredarray

items: {'anyOf': [{'type': 'string'}, {'type': 'integer'}]}

msg requiredstring
type requiredstring