Inventory
Complete reference for device inventory. Manage warehouses, assign devices to inventory locations, and query assignment history.
Inventory management for device stock, including warehouses, assignments, and device-inventory relationships.
Queries
inventory (query)
Retrieves an inventory by its ID.
inventory(id: ID!): InventoryArguments
id
ID!
The ID of the inventory to retrieve.
Output types:
inventories
Lists inventories in the caller's workspace.
inventories(
filter: InventoryFilter
first: Int
after: String
last: Int
before: String
orderBy: InventoryOrder = { field: TITLE, direction: ASC }
): InventoryConnection!Arguments
filter
InventoryFilter
Filtering options for the returned inventories.
orderBy
InventoryOrder
The ordering options for the returned inventories.
Input types:
Output types:
Mutations
inventoryCreate
Creates a new inventory.
Arguments
input
InventoryCreateInput!
The input fields for creating the inventory.
Input types:
Output types:
inventoryUpdate
Updates an existing inventory.
Arguments
input
InventoryUpdateInput!
The input fields for updating the inventory.
Input types:
Output types:
inventoryDelete
Deletes an inventory.
Refused with IN_USE while another live entity points at it through one of its own fields, custom-field values and field definitions included; the error's blockers name the first five of them, and hasMoreBlockers says whether it left any out.
Arguments
input
InventoryDeleteInput!
The input fields for deleting the inventory.
Input types:
Output types:
deviceInventoryLink
Links a device to an inventory.
A device holds at most one active inventory link. This is not an idempotent command: VALIDATION_ERROR when the device already has one, including a link to the very inventory named in the input. Moving a device between inventories is deviceInventoryUnlink then deviceInventoryLink, and re-running a link that already succeeded is an error, not a no-op.
Arguments
input
DeviceInventoryLinkInput!
The input fields for linking the device.
Input types:
Output types:
deviceInventoryUnlink
Unlinks a device from an inventory.
Not an idempotent command: NOT_FOUND when the device has no active inventory link, including a repeat of a call that already succeeded. The input names only the device — the link to close is the active one, whichever inventory it points at.
Arguments
input
DeviceInventoryUnlinkInput!
The input fields for unlinking the device.
Input types:
Output types:
Objects
DeviceInventoryRelation
A record of a device's assignment to an inventory.
Implements: Node
id
ID!
A globally unique identifier. This ID is opaque and should not be parsed by clients.
assignedById
ID
The id of the actor who assigned the device: a user's id from Console, a member of staff's, or the system's.
assignedBy
The actor who assigned the device; null when there is none or Console does not know the id.
Inventory
An inventory or warehouse record for device stock management.
Implements: Node, Versioned, Titled
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. Can be provided in update/delete mutations to prevent lost updates. If omitted, the update proceeds without stale-read protection.
title
String!
The human-readable display name.
Arguments of devices
orderBy
The ordering options for the returned devices. Default: { field: TITLE, direction: ASC }.
InventoryPayload
The result of an inventory mutation.
DeviceInventoryRelationPayload
The result of a device inventory link mutation.
Inputs
DeviceInventoryRelationOrder
Ordering options for device inventory relations.
InventoryFilter
Filtering options for inventories.
titleContains
String
Partial match on title (case-insensitive contains).
InventoryOrder
Ordering options for inventories.
InventoryCreateInput
Input for creating a new inventory.
title
String!
The display name.
InventoryUpdateInput
Input for updating an existing inventory.
id
ID!
The inventory ID to update.
version
Int
The current version for optimistic locking. If omitted, auto-increments without conflict check.
title
String
The new display name.
InventoryDeleteInput
Input for deleting an inventory.
id
ID!
The inventory ID to delete.
version
Int
The current version for optimistic locking. If omitted, auto-increments without conflict check.
DeviceInventoryLinkInput
Input for linking a device to an inventory. Both device and inventory must belong to the same workspace.
deviceId
ID!
The device ID.
inventoryId
ID!
The inventory ID. Must be in the same workspace as the device.
DeviceInventoryUnlinkInput
Input for unlinking a device from an inventory.
deviceId
ID!
The device ID to unlink.
Enums
DeviceInventoryRelationOrderField
Fields available for ordering device inventory relations.
ASSIGNED_AT
Order by assignment date.
InventoryOrderField
Fields available for ordering inventories.
TITLE
Order by title.
Interfaces
InventoryItem
An object that can be assigned to an inventory.
Implements: Node
id
ID!
A globally unique identifier.
Pagination types
InventoryConnection
A paginated list of Inventory items.
Implements: Connection
InventoryEdge
An edge in the Inventory connection.
Implements: Edge
cursor
String!
An opaque cursor for this edge.
DeviceInventoryRelationConnection
A paginated list of DeviceInventoryRelation items.
Implements: Connection
DeviceInventoryRelationEdge
An edge in the DeviceInventoryRelation connection.
Implements: Edge
cursor
String!
An opaque cursor for this edge.
See also
Last updated
Was this helpful?