Skip to main content
PUT
/
metadata
/
{resourceId}
Update a metadata object
curl --request PUT \
  --url https://api.altostrat.io/metadata/{resourceId} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "type": "mikrotik.device",
  "metadata": {
    "location": "Level 5, Server Room B",
    "contact_person": "jane.doe@example.com",
    "maintenance_window": null
  }
}'
{
  "resource_id": "9b52d930-f432-4c0a-bac0-4c12dff85544",
  "type": "mikrotik.device",
  "metadata": {
    "circuit_id": "AS12345-XYZ",
    "install_date": "2025-01-15",
    "is_critical": true,
    "rack_units": 2
  }
}

Authorizations

Authorization
string
header
required

A bearer token is required for all API requests.

Path Parameters

resourceId
string<uuid>
required

The unique identifier of the resource whose metadata is being accessed.

Body

application/json

The metadata keys and values to update.

type
string
required

A string identifying the type of the resource.

Example:

"mikrotik.device"

metadata
object
required

An object containing the metadata fields to add or update.

Example:
{
"location": "Level 5, Server Room B",
"contact_person": "jane.doe@example.com",
"maintenance_window": null
}

Response

The metadata was updated successfully.

resource_id
string<uuid>

The unique identifier of the resource this metadata belongs to.

Example:

"9b52d930-f432-4c0a-bac0-4c12dff85544"

type
string

A string identifying the type of the resource.

Example:

"mikrotik.device"

metadata
object

A free-form object containing key-value pairs. Values can be strings, numbers, or booleans.

Example:
{
"circuit_id": "AS12345-XYZ",
"install_date": "2025-01-15",
"is_critical": true,
"rack_units": 2
}