Update Asset

Update an asset. Send only the keys you want to change.

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…

This endpoint updates an asset. It sends an HTTP PUT request (PATCH works too) to https://hub.xyte.io/core/v1/organization/assets/{asset_id}. Send only the keys you want to change.

Authorization

This endpoint requires Authorization.

Request Body

KeyTypeDescription
namestringAsset name.
serial_numberstringSerial number.
space_idintegerID of the space to move the asset to.
purchased_atstringPurchase date, ISO 8601.
commentsstringFree text.
icon_namestringIcon shown in the portal.
manufacturer, device_model, device_type, statusstring or objectA label name (created if new) or { "id": "<label uuid>" }.
custom_fieldsobjectSee below.
{
  "custom_fields": { "cmdb_tag": "TAG-0042" }
}

Custom fields

custom_fields holds the values of the asset custom fields your organization defined in the portal (Settings → Assets). Keys are the field keys.

Field typeAccepted value
textA string, trimmed, up to 255 characters.
numberA number, or a plain decimal string such as "12" or "-1.5". Returned as a number.
dateYYYY-MM-DD.
  • A key you leave out keeps its value.
  • null or "" clears a value.
  • Leaving out custom_fields changes nothing.
  • A key that is not a defined field fails the whole request. Drop keys of deleted fields when you write back an asset you read earlier.

Response

Returns the updated asset:

KeyTypeDescription
idstringUnique identifier of the asset (UUID).
namestringAsset name.
serial_numberstringSerial number.
commentsstringFree text.
purchased_atstringPurchase date, ISO 8601.
created_atstringCreation time, ISO 8601.
icon_namestringIcon shown in the portal.
spaceobjectid, name and full_path of the space.
manufacturer, device_model, device_type, statusobjectid and name of the label, or null.
custom_fieldsobjectCustom field values, keyed by field key. {} when none are set.

Errors

StatusDescription
403A label belongs to another organization, or the space is the organization's root space.
404The asset or space does not exist in your organization.
422custom_fields is not an object, a key is not a defined field, a value does not fit the field type, or the asset is moved to a space under a different customer.
Path Params
string
required

Unique identifier of the asset (UUID).

Body Params
string

Asset name.

string
integer

ID of the space the asset is in.

string

Purchase date, ISO 8601.

string

Free text.

string

Label name (created if new) or { "id": ... } of an existing label.

Label name (created if new) or { "id": ... } of an existing label.

Label name (created if new) or { "id": ... } of an existing label.

Label name (created if new) or { "id": ... } of an existing label.

custom_fields
object

Values for the asset custom fields defined in the portal, keyed by field key. A key you leave out keeps its value. null or an empty string clears it.

Response

Language
Credentials
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json