Skip to content

Set property on container

POST /container/<containerId>/properties

Description

Create a property. Existing properties will be overwritten.

Path parameters

Param Description
containerId Container Id.

Query parameters

none

Body

Param Type Required Description
id int Yes Target Id wherefore the property will be created.
kind string Yes Must be one of Asset, Container, Condition or User.
key string Yes Property key.
value any Yes Property value which can be a string, number, boolean or null.

Return codes

Error code Reason
204 Success.
400 Unknown field or invalid query param.
401 Invalid or missing token.
403 Insufficient permissions (required: API+ASSET_MANAGEMENT).
404 Container not found.

Example

Curl request:

curl \
    -X POST 'https://api.infrasonar.com/container/123/properties' \
    -H 'Authorization: Bearer XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX' \
    -H 'Content-Type: application/json' \
    --data-raw '{
    "id": 123,
    "kind": "Asset",
    "key": "my_prop",
    "value": "some value"
}'