Trigger a workflow

Trigger and query workflows using the Nexthink API

Trigger a workflow V1

post

Triggers the execution of a workflow.

Authorizations
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.

paramsall ofOptional
and
anyOptional

Any parameters that can be sent to the workflow. If your workflow has been configured with a parameter, then params is optional. Leave the object empty if there are no parameters.

Responses
200

Successful execution response.

application/json
post
/api/v1/workflows/execute
POST /api/v1/workflows/execute HTTP/1.1
Host: instance.api.region.nexthink.cloud
Authorization: text
Content-Type: application/json
Accept: */*
Content-Length: 114

{
  "workflowId": "#workflow_example",
  "devices": [
    "text"
  ],
  "users": [
    "text"
  ],
  "params": {
    "ANY_ADDITIONAL_PROPERTY": "text"
  }
}
{
  "requestUuid": "7fbd96a7-b717-43a7-8973-9c6adbca3a56",
  "executionsUuids": [
    "text"
  ]
}

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
Header parameters
AuthorizationstringRequired
Sourcestring | nullableOptional
Body
workflowIdstringRequired

The ID of the workflow to execute.

Example: #workflow_example
paramsall ofOptional
and
anyOptional

Any parameters to send to the workflow. Leave the object empty if there are none.

Responses
200

Successful execution response.

application/json
post
/api/v2/workflows/execute
POST /api/v2/workflows/execute HTTP/1.1
Host: instance.api.region.nexthink.cloud
Authorization: text
Content-Type: application/json
Accept: */*
Content-Length: 192

{
  "workflowId": "#workflow_example",
  "devices": [
    {
      "name": "text",
      "uid": "text",
      "collectorUid": "text"
    }
  ],
  "users": [
    {
      "uid": "text",
      "upn": "text",
      "sid": "text"
    }
  ],
  "params": {
    "ANY_ADDITIONAL_PROPERTY": "text"
  }
}
{
  "requestUuid": "7fbd96a7-b717-43a7-8973-9c6adbca3a56",
  "executionsUuids": [
    "text"
  ]
}

Trigger wait for event

post

Triggers a waiting workflow execution.

Authorizations
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
parametersall ofOptional
and
anyOptional

Any parameters to send to the thinklet waiting for this trigger. Leave the object empty if there are none.

Responses
200

Returns a request identifier.

application/json
post
/api/v1/workflows/workflows/{workflowUuid}/execution/{executionUuid}/trigger
POST /api/v1/workflows/workflows/{workflowUuid}/execution/{executionUuid}/trigger HTTP/1.1
Host: instance.api.region.nexthink.cloud
Authorization: Bearer YOUR_OAUTH2_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 49

{
  "parameters": {
    "ANY_ADDITIONAL_PROPERTY": "text"
  }
}
[
  {
    "requestUuid": "123e4567-e89b-42d3-a456-556642440000"
  }
]

List workflows

get

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

Authorizations
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 /api/v1/workflows?dependency=USER&triggerMethod=API HTTP/1.1
Host: instance.api.region.nexthink.cloud
Authorization: Bearer YOUR_OAUTH2_TOKEN
Accept: */*
[
  {
    "id": "text",
    "uuid": "text",
    "name": "text",
    "description": "text",
    "status": "ACTIVE",
    "lastUpdateTime": "2025-10-31T19:09:03.189Z",
    "triggerMethods": {
      "id": "text",
      "uuid": "text",
      "name": "text",
      "description": "text",
      "status": "ACTIVE",
      "lastUpdateTime": "2025-10-31T19:09:03.189Z",
      "triggerMethods": {
        "id": "text",
        "uuid": "text",
        "name": "text",
        "description": "text",
        "status": "ACTIVE",
        "lastUpdateTime": "2025-10-31T19:09:03.189Z",
        "triggerMethods": {
          "id": "text",
          "uuid": "text",
          "name": "text",
          "description": "text",
          "status": "ACTIVE",
          "lastUpdateTime": "2025-10-31T19:09:03.189Z",
          "triggerMethods": {
            "id": "text",
            "uuid": "text",
            "name": "text",
            "description": "text",
            "status": "ACTIVE",
            "lastUpdateTime": "2025-10-31T19:09:03.189Z",
            "triggerMethods": "[Circular Reference]",
            "versions": "[Circular Reference]"
          },
          "versions": [
            "[Circular Reference]"
          ]
        },
        "versions": [
          {
            "id": "text",
            "uuid": "text",
            "name": "text",
            "description": "text",
            "status": "ACTIVE",
            "lastUpdateTime": "2025-10-31T19:09:03.189Z",
            "triggerMethods": {
              "id": "text",
              "uuid": "text",
              "name": "text",
              "description": "text",
              "status": "ACTIVE",
              "lastUpdateTime": "2025-10-31T19:09:03.189Z",
              "triggerMethods": {
                "id": "text",
                "uuid": "text",
                "name": "text",
                "description": "text",
                "status": "ACTIVE",
                "lastUpdateTime": "2025-10-31T19:09:03.189Z",
                "triggerMethods": "[Circular Reference]",
                "versions": "[Circular Reference]"
              },
              "versions": [
                "[Circular Reference]"
              ]
            },
            "versions": "[Circular Reference]"
          }
        ]
      },
      "versions": [
        {
          "id": "text",
          "uuid": "text",
          "name": "text",
          "description": "text",
          "status": "ACTIVE",
          "lastUpdateTime": "2025-10-31T19:09:03.189Z",
          "triggerMethods": {
            "id": "text",
            "uuid": "text",
            "name": "text",
            "description": "text",
            "status": "ACTIVE",
            "lastUpdateTime": "2025-10-31T19:09:03.189Z",
            "triggerMethods": {
              "id": "text",
              "uuid": "text",
              "name": "text",
              "description": "text",
              "status": "ACTIVE",
              "lastUpdateTime": "2025-10-31T19:09:03.189Z",
              "triggerMethods": "[Circular Reference]",
              "versions": "[Circular Reference]"
            },
            "versions": [
              "[Circular Reference]"
            ]
          },
          "versions": "[Circular Reference]"
        }
      ]
    },
    "versions": [
      {
        "id": "text",
        "uuid": "text",
        "name": "text",
        "description": "text",
        "status": "ACTIVE",
        "lastUpdateTime": "2025-10-31T19:09:03.189Z",
        "triggerMethods": {
          "id": "text",
          "uuid": "text",
          "name": "text",
          "description": "text",
          "status": "ACTIVE",
          "lastUpdateTime": "2025-10-31T19:09:03.189Z",
          "triggerMethods": {
            "id": "text",
            "uuid": "text",
            "name": "text",
            "description": "text",
            "status": "ACTIVE",
            "lastUpdateTime": "2025-10-31T19:09:03.189Z",
            "triggerMethods": "[Circular Reference]",
            "versions": "[Circular Reference]"
          },
          "versions": [
            "[Circular Reference]"
          ]
        },
        "versions": "[Circular Reference]"
      }
    ]
  }
]

Get workflow

get

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

Authorizations
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
GET /api/v1/workflows/details?nqlId=text HTTP/1.1
Host: instance.api.region.nexthink.cloud
Authorization: Bearer YOUR_OAUTH2_TOKEN
Accept: */*
[
  {
    "id": "text",
    "uuid": "text",
    "name": "text",
    "description": "text",
    "status": "ACTIVE",
    "lastUpdateTime": "2025-10-31T19:09:03.189Z",
    "triggerMethods": {
      "id": "text",
      "uuid": "text",
      "name": "text",
      "description": "text",
      "status": "ACTIVE",
      "lastUpdateTime": "2025-10-31T19:09:03.189Z",
      "triggerMethods": {
        "id": "text",
        "uuid": "text",
        "name": "text",
        "description": "text",
        "status": "ACTIVE",
        "lastUpdateTime": "2025-10-31T19:09:03.189Z",
        "triggerMethods": {
          "id": "text",
          "uuid": "text",
          "name": "text",
          "description": "text",
          "status": "ACTIVE",
          "lastUpdateTime": "2025-10-31T19:09:03.189Z",
          "triggerMethods": {
            "id": "text",
            "uuid": "text",
            "name": "text",
            "description": "text",
            "status": "ACTIVE",
            "lastUpdateTime": "2025-10-31T19:09:03.189Z",
            "triggerMethods": "[Circular Reference]",
            "versions": "[Circular Reference]"
          },
          "versions": [
            "[Circular Reference]"
          ]
        },
        "versions": [
          {
            "id": "text",
            "uuid": "text",
            "name": "text",
            "description": "text",
            "status": "ACTIVE",
            "lastUpdateTime": "2025-10-31T19:09:03.189Z",
            "triggerMethods": {
              "id": "text",
              "uuid": "text",
              "name": "text",
              "description": "text",
              "status": "ACTIVE",
              "lastUpdateTime": "2025-10-31T19:09:03.189Z",
              "triggerMethods": {
                "id": "text",
                "uuid": "text",
                "name": "text",
                "description": "text",
                "status": "ACTIVE",
                "lastUpdateTime": "2025-10-31T19:09:03.189Z",
                "triggerMethods": "[Circular Reference]",
                "versions": "[Circular Reference]"
              },
              "versions": [
                "[Circular Reference]"
              ]
            },
            "versions": "[Circular Reference]"
          }
        ]
      },
      "versions": [
        {
          "id": "text",
          "uuid": "text",
          "name": "text",
          "description": "text",
          "status": "ACTIVE",
          "lastUpdateTime": "2025-10-31T19:09:03.189Z",
          "triggerMethods": {
            "id": "text",
            "uuid": "text",
            "name": "text",
            "description": "text",
            "status": "ACTIVE",
            "lastUpdateTime": "2025-10-31T19:09:03.189Z",
            "triggerMethods": {
              "id": "text",
              "uuid": "text",
              "name": "text",
              "description": "text",
              "status": "ACTIVE",
              "lastUpdateTime": "2025-10-31T19:09:03.189Z",
              "triggerMethods": "[Circular Reference]",
              "versions": "[Circular Reference]"
            },
            "versions": [
              "[Circular Reference]"
            ]
          },
          "versions": "[Circular Reference]"
        }
      ]
    },
    "versions": [
      {
        "id": "text",
        "uuid": "text",
        "name": "text",
        "description": "text",
        "status": "ACTIVE",
        "lastUpdateTime": "2025-10-31T19:09:03.189Z",
        "triggerMethods": {
          "id": "text",
          "uuid": "text",
          "name": "text",
          "description": "text",
          "status": "ACTIVE",
          "lastUpdateTime": "2025-10-31T19:09:03.189Z",
          "triggerMethods": {
            "id": "text",
            "uuid": "text",
            "name": "text",
            "description": "text",
            "status": "ACTIVE",
            "lastUpdateTime": "2025-10-31T19:09:03.189Z",
            "triggerMethods": "[Circular Reference]",
            "versions": "[Circular Reference]"
          },
          "versions": [
            "[Circular Reference]"
          ]
        },
        "versions": "[Circular Reference]"
      }
    ]
  }
]

Was this helpful?