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
Name | Type | Description |
---|---|---|
program-id required | string |
Request Body
AssetList | application/json
Name | Type | Properties |
---|---|---|
assets required | array | items: {'$ref': '#/components/schemas/Asset'} |
Asset | application/json
Name | Type | Properties |
---|---|---|
asset_id required | string | maxLength: 64 |
asset_name | string | maxLength: 124 |
labels | array | items: {} |
Request Example
{
"assets": [
{
"asset_id": "string",
"asset_name": "string",
"labels": "array"
}
]
}
Responses
200
Successful Response
SuccessMessage | application/json
Name | Type | Properties |
---|---|---|
result required | string |
Response Example
{
"result": "string"
}
422
Validation Error
HTTPValidationError | application/json
Name | Type | Properties |
---|---|---|
detail | array | items: {'$ref': '#/components/schemas/ValidationError'} |
ValidationError | application/json
Name | Type | Properties |
---|---|---|
loc required | array | items: {'anyOf': [{'type': 'string'}, {'type': 'integer'}]} |
msg required | string | |
type required | string |