Mutations

circle-exclamation

assetCreate

Creates a new asset.

assetCreate(
    input: AssetCreateInput!
  ): AssetPayload

Arguments

Name
Type
Description

input

AssetCreateInput!

The input fields for creating the asset.

Input types:

chevron-rightAssetCreateInputhashtag

Input for creating a new asset.

Field
Type
Description

organizationId

ID!

The organization that will own the asset.

typeId

ID!

The asset type ID.

title

String!

The asset display name.

customFields

The custom field values.

chevron-rightCustomFieldsPatchInputhashtag

Input for updating custom field values using a patch model.

Field
Type
Description

set

JSON

Fields to set or update as a key-value map.

unset

[Code!]

Field codes to remove.

Output types:

chevron-rightAssetPayloadhashtag

The result of an asset mutation.

Field
Type
Description

asset

The created or updated asset.

chevron-rightAsset (entity)hashtag

A physical or logical asset being tracked.

Implements: Node, Titled, Customizable, Versioned

Field
Type
Description

id

ID!

A globally unique identifier. This ID is opaque and should not be parsed by clients.

version

Int!

The version number for optimistic locking. Incremented on each update. Must be provided in update/delete mutations to prevent lost updates.

title

String!

The human-readable display name.

organization

The organization that owns this asset.

type

The asset type classification.

customFields

JSON!

Custom field values as a key-value map. Keys are CustomFieldDefinition codes.

device

The primary tracking device linked to this asset. This is an alias for the device custom field.

groups

The groups this asset belongs to.


assetUpdate

Updates an existing asset.

Arguments

Name
Type
Description

input

AssetUpdateInput!

The input fields for updating the asset.

Input types:

chevron-rightAssetUpdateInputhashtag

Input for updating an existing asset.

Field
Type
Description

id

ID!

The asset ID to update.

version

Int!

The current version for optimistic locking.

title

String

The new display name.

customFields

The custom field changes.

chevron-rightCustomFieldsPatchInputhashtag

Input for updating custom field values using a patch model.

Field
Type
Description

set

JSON

Fields to set or update as a key-value map.

unset

[Code!]

Field codes to remove.

Output types:

chevron-rightAssetPayloadhashtag

The result of an asset mutation.

Field
Type
Description

asset

The created or updated asset.

chevron-rightAsset (entity)hashtag

A physical or logical asset being tracked.

Implements: Node, Titled, Customizable, Versioned

Field
Type
Description

id

ID!

A globally unique identifier. This ID is opaque and should not be parsed by clients.

version

Int!

The version number for optimistic locking. Incremented on each update. Must be provided in update/delete mutations to prevent lost updates.

title

String!

The human-readable display name.

organization

The organization that owns this asset.

type

The asset type classification.

customFields

JSON!

Custom field values as a key-value map. Keys are CustomFieldDefinition codes.

device

The primary tracking device linked to this asset. This is an alias for the device custom field.

groups

The groups this asset belongs to.


assetDelete

Deletes an asset.

Arguments

Name
Type
Description

input

AssetDeleteInput!

The input fields for deleting the asset.

Input types:

chevron-rightAssetDeleteInputhashtag

Input for deleting an asset.

Field
Type
Description

id

ID!

The asset ID to delete.

version

Int!

The current version for optimistic locking.

Output types:

chevron-rightDeletePayloadhashtag

The result of a delete mutation.

Field
Type
Description

deletedId

ID!

The ID of the deleted entity.


assetTypeCreate

Creates a new asset type.

Arguments

Name
Type
Description

input

AssetTypeCreateInput!

The input fields for creating the asset type.

Input types:

chevron-rightAssetTypeCreateInputhashtag

Input for creating an asset type.

Field
Type
Description

organizationId

ID!

The organization that will own the item.

code

Code!

The machine-readable code.

title

String!

The display name.

order

Int

The display order.

meta

The display properties.

chevron-rightCatalogItemMetaInputhashtag

Display properties for catalog items.

Field
Type
Description

description

String

The description.

hidden

Boolean

Whether the item is hidden from regular UI lists.

textColor

HexColorCode

The text color for UI display.

backgroundColor

HexColorCode

The background color for UI display.

icon

String

A relative URL to the icon.

Output types:

chevron-rightAssetTypePayloadhashtag

The result of an asset type mutation.

Field
Type
Description

assetType

The created or updated asset type.

chevron-rightAssetType (entity)hashtag

A classification type for assets.

Implements: CatalogItem, Node, Versioned, Titled

Field
Type
Description

id

ID!

A globally unique identifier.

version

Int!

The version number for optimistic locking.

title

String!

The human-readable display name. Can be localized.

code

Code!

A machine-readable code, unique within the catalog scope.

order

Int!

The display order within the same level or category.

catalog

The catalog this item belongs to.

organization

The organization that owns this item. Null for system items.

meta

Metadata about this item including description, origin, and display properties.

customFieldDefinitions

Custom field definitions specific to this asset type, ordered by display order.


assetTypeUpdate

Updates an asset type.

Arguments

Name
Type
Description

input

AssetTypeUpdateInput!

The input fields for updating the asset type.

Input types:

chevron-rightAssetTypeUpdateInputhashtag

Input for updating an asset type.

Field
Type
Description

id

ID!

The item ID to update.

version

Int!

The current version for optimistic locking.

title

String

The new display name.

order

Int

The new display order.

meta

The display properties.

chevron-rightCatalogItemMetaInputhashtag

Display properties for catalog items.

Field
Type
Description

description

String

The description.

hidden

Boolean

Whether the item is hidden from regular UI lists.

textColor

HexColorCode

The text color for UI display.

backgroundColor

HexColorCode

The background color for UI display.

icon

String

A relative URL to the icon.

Output types:

chevron-rightAssetTypePayloadhashtag

The result of an asset type mutation.

Field
Type
Description

assetType

The created or updated asset type.

chevron-rightAssetType (entity)hashtag

A classification type for assets.

Implements: CatalogItem, Node, Versioned, Titled

Field
Type
Description

id

ID!

A globally unique identifier.

version

Int!

The version number for optimistic locking.

title

String!

The human-readable display name. Can be localized.

code

Code!

A machine-readable code, unique within the catalog scope.

order

Int!

The display order within the same level or category.

catalog

The catalog this item belongs to.

organization

The organization that owns this item. Null for system items.

meta

Metadata about this item including description, origin, and display properties.

customFieldDefinitions

Custom field definitions specific to this asset type, ordered by display order.


assetTypeDelete

Deletes an asset type.

Arguments

Name
Type
Description

input

CatalogItemDeleteInput!

The input fields for deleting the asset type.

Input types:

chevron-rightCatalogItemDeleteInputhashtag

Input for deleting a catalog item.

Field
Type
Description

id

ID!

The catalog item ID to delete.

version

Int!

The current version for optimistic locking.

Output types:

chevron-rightDeletePayloadhashtag

The result of a delete mutation.

Field
Type
Description

deletedId

ID!

The ID of the deleted entity.


Last updated

Was this helpful?