Trigger a workflow

Trigger and query workflows using the Nexthink API.

Trigger a workflow V1

post

Triggers the execution of a workflow.

Authorizations
OAuth2clientCredentialsRequired
Token URL:
Header parameters
AuthorizationstringRequired
Sourcestring | nullableOptional
Body
workflowIdstringRequired

The ID of the workflow to execute.

Example: #workflow_example
devicesstring[] · max: 10000Required

Nexthink Collector IDs of the devices that the workflow should be executed on. Note: If devices are included in the request, then users are optional by default.

usersstring[] · max: 10000Required

The security IDs of the users that the workflow would target. Note: If users are included in the request, then devices are optional by default.

Responses
200

Successful execution response.

application/json
post
/api/v1/workflows/execute

Trigger a workflow V2

post

Triggers the execution of a workflow using external identifiers for users and devices. For users, provide at least one of the following:

  • sid: The security identifier of the user

  • upn: The user's principal name (email format)

  • uid: A globally unique user identifier For devices, provide at least one of the following:

  • collectorUid: The Collector UUID of the device

  • name: The name of the device

  • uid: A globally unique device identifier If multiple users or devices match the identifiers, the system triggers the workflow on the most recently active one (lastSeen).

Authorizations
OAuth2clientCredentialsRequired
Token URL:
Header parameters
AuthorizationstringRequired
Sourcestring | nullableOptional
Body
workflowIdstringRequired

The ID of the workflow to execute.

Example: #workflow_example
Responses
200

Successful execution response.

application/json
post
/api/v2/workflows/execute

Trigger wait for event

post

Triggers a waiting workflow execution.

Authorizations
OAuth2clientCredentialsRequired
Token URL:
Path parameters
workflowUuidstringRequiredPattern: ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$
executionUuidstringRequiredPattern: ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$
Header parameters
Sourcestring | nullableOptional
Body
Responses
200

Returns a request identifier.

application/json
post
/api/v1/workflows/workflows/{workflowUuid}/execution/{executionUuid}/trigger

List workflows

get

Returns a list of workflows, including their configuration information. Use query parameters to filter the list of the workflows.

Authorizations
OAuth2clientCredentialsRequired
Token URL:
Query parameters
dependencystring · enumRequiredPossible values:
triggerMethodstring · enumRequiredPossible values:
fetchOnlyActiveWorkflowsbooleanOptional
Header parameters
Sourcestring | nullableOptional
Responses
200

List of workflows and their configurations.

application/json
get
/api/v1/workflows

Get workflow

get

Returns the configuration of a specific workflow by NQL ID. Use nqlId to filter for a specific configured workflow.

Authorizations
OAuth2clientCredentialsRequired
Token URL:
Query parameters
nqlIdstringRequired

The NQL ID of the workflow.

Example: #ExampleWorkflow
Header parameters
Sourcestring | nullableOptional
Responses
200

Workflow configuration.

application/json
get
/api/v1/workflows/details

Last updated

Was this helpful?