Create Asset

Create an asset. Values for custom fields go in custom_fields.

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

This endpoint creates an asset. It sends an HTTP POST request to https://hub.xyte.io/core/v1/organization/assets.

Authorization

This endpoint requires Authorization.

Request Body

KeyTypeDescription
namestringAsset name.
serial_numberstringSerial number.
space_idintegerID of the space the asset is in. Required on create.
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.
{
  "name": "Conference Room PDU",
  "serial_number": "RLNK-915R-00EA5A",
  "space_id": 100,
  "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.
  • null or "" clears a value.
  • Leaving out custom_fields sets no values.
  • A key that is not a defined field fails the whole request.

Response

Returns the created 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 space does not exist in your organization.
422space_id is missing, custom_fields is not an object, a key is not a defined field, or a value does not fit the field type.
Body Params
string

Asset name.

string
integer
required

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 that is not a defined field fails the request.

Response

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