Skip to content

Query asset Id

GET /asset/<assetName>/id

Description

Query an asset Id by name. This route only works with a container token.

Removed assets (assets in trash) are ignored and will not be found using this API call.

Path parameters

Param Description
assetName Asset name.

Query parameters

none

Return codes

Error code Reason
200 Success.
401 Invalid or missing token.
403 Insufficient permissions (required: API).
404 No asset with the given name is found in the container.
409 Multiple assets with the same name are found within the container.

Example

Curl request:

curl \
    -X GET 'https://api.infrasonar.com/asset/my-asset.local/id' \
    -H 'Authorization: Bearer XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'

Response:

{
    "assetId": 123
}