Skip to content

Workflows Object Models

Objects used to build Workflows requests and parse Workflows metadata, execution, and thinklet responses.

nexthink_api.Workflows

Models for the Nexthink Workflows API.

NxtWorkflowErrorResponse

Bases: BaseModel

Error details returned by the Workflows API.

code: str = Field(min_length=1) class-attribute instance-attribute

details: str instance-attribute

NxtWorkflowExecutionRequest

Bases: BaseModel

Request body used to execute a workflow with collector UUIDs or SIDs.

workflowId: str = Field(min_length=1) class-attribute instance-attribute

devices: list[str] = Field(default_factory=list, max_length=10000) class-attribute instance-attribute

users: list[str] = Field(default_factory=list, max_length=10000) class-attribute instance-attribute

params: dict[str, str] | None = None class-attribute instance-attribute

validate_targets() -> Self

Require at least one target despite contradictory docs required fields.

NxtWorkflowExecutionResponse

Bases: BaseModel

Response returned when a workflow execution request is accepted.

requestUuid: str = Field(min_length=1) class-attribute instance-attribute

executionsUuids: list[str] = Field(min_length=1) class-attribute instance-attribute

NxtWorkflowDeviceData

Bases: BaseModel

Device selector accepted by Workflows v2 execution.

name: str | None = None class-attribute instance-attribute

uid: str | None = Field(default=None, pattern=UUID_PATTERN) class-attribute instance-attribute

collectorUid: str | None = Field(default=None, pattern=UUID_PATTERN) class-attribute instance-attribute

validate_identifier() -> Self

Require at least one supported device identifier.

NxtWorkflowExternalIdsExecutionRequest

Bases: BaseModel

Request body used to execute a workflow with external identifiers.

workflowId: str = Field(min_length=1) class-attribute instance-attribute

devices: list[NxtWorkflowDeviceData] = Field(default_factory=list, max_length=10000) class-attribute instance-attribute

users: list[NxtWorkflowUserData] = Field(default_factory=list, max_length=10000) class-attribute instance-attribute

params: dict[str, str] | None = None class-attribute instance-attribute

validate_targets() -> Self

Require at least one target despite contradictory docs required fields.

NxtWorkflowUserData

Bases: BaseModel

User selector accepted by Workflows v2 execution.

uid: str | None = Field(default=None, pattern=UUID_PATTERN) class-attribute instance-attribute

upn: str | None = Field(default=None, pattern=UPN_PATTERN) class-attribute instance-attribute

sid: str | None = Field(default=None, pattern=SID_PATTERN) class-attribute instance-attribute

validate_identifier() -> Self

Require at least one supported user identifier.

NxtWorkflow

Bases: BaseModel

Workflow configuration returned by inventory operations.

The official model currently describes recursive fields for triggerMethods and versions. Those fields are kept tolerant until the live payload shape is validated across tenants.

id: str = Field(min_length=1) class-attribute instance-attribute

uuid: str = Field(min_length=1) class-attribute instance-attribute

name: str = Field(min_length=1) class-attribute instance-attribute

description: str | None = None class-attribute instance-attribute

status: NxtWorkflowStatus | str | None = None class-attribute instance-attribute

lastUpdateTime: datetime | str | None = None class-attribute instance-attribute

triggerMethods: Any = None class-attribute instance-attribute

versions: list[Any] = Field(default_factory=list) class-attribute instance-attribute

NxtWorkflowDependency

Bases: str, Enum

Workflow dependency filters supported by the API.

USER = 'USER' class-attribute instance-attribute

DEVICE = 'DEVICE' class-attribute instance-attribute

USER_AND_DEVICE = 'USER_AND_DEVICE' class-attribute instance-attribute

NONE = 'NONE' class-attribute instance-attribute

NxtWorkflowStatus

Bases: str, Enum

Workflow activation status.

ACTIVE = 'ACTIVE' class-attribute instance-attribute

INACTIVE = 'INACTIVE' class-attribute instance-attribute

NxtWorkflowTriggerMethod

Bases: str, Enum

Workflow trigger method filters supported by the API.

API = 'API' class-attribute instance-attribute

MANUAL = 'MANUAL' class-attribute instance-attribute

MANUAL_MULTIPLE = 'MANUAL_MULTIPLE' class-attribute instance-attribute

SCHEDULER = 'SCHEDULER' class-attribute instance-attribute

NxtWorkflowThinkletTriggerRequest

Bases: BaseModel

Request body used to trigger a waiting workflow execution.

parameters: dict[str, str] | None = Field(default=None) class-attribute instance-attribute

NxtWorkflowThinkletTriggerResponse

Bases: BaseModel

Response returned when a waiting workflow execution is triggered.

requestUuid: str = Field(min_length=1) class-attribute instance-attribute

NxtWorkflowTriggerInfo

Bases: BaseModel

Optional trigger metadata described by the Workflows API models.

externalReference: str | None = None class-attribute instance-attribute

internalSource: str | None = None class-attribute instance-attribute

externalSource: str | None = None class-attribute instance-attribute

reason: str | None = None class-attribute instance-attribute

extra: str | None = None class-attribute instance-attribute