Remote actions API

Trigger and query remote actions using the Nexthink API.

Trigger a remote action

post

Triggers the execution of a remote action for a set of devices.

Authorizations
Header parameters
Authorizationstring | nullableOptional
Body
remoteActionIdstring · min: 1Required

The ID of the remote action to execute

Example: #ExampleRA
devicesstring[] · min: 1 · max: 10000Required

Nexthink Collector IDs of the devices that the remote action should be executed on

expiresInMinutesinteger · int32 · min: 60 · max: 10080Optional

The amount of time in minutes before the execution will expire if a targeted device does not come online to process it.

Example: 60
Responses
200

OK - Successful execution.

application/json
post
POST /api/v1/act/execute HTTP/1.1
Host: instance.api.region.nexthink.cloud
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 254

{
  "remoteActionId": "#ExampleRA",
  "params": {
    "ANY_ADDITIONAL_PROPERTY": "text"
  },
  "devices": [
    "text"
  ],
  "expiresInMinutes": 60,
  "triggerInfo": {
    "externalSource": "ServiceNow, Jira, etc.",
    "reason": "Fix teams issue on device remotely",
    "externalReference": "SNOW-488783"
  }
}
{
  "requestId": "7fbd96a7-b717-43a7-8973-9c6adbca3a56",
  "expiresInMinutes": 60
}

List remote actions

get

Retrieves the remote actions, including their configuration information.

Authorizations
Header parameters
AuthorizationstringRequired
Responses
200

OK - Successful listing.

application/json
get
GET /api/v1/act/remote-action HTTP/1.1
Host: instance.api.region.nexthink.cloud
Authorization: text
Accept: */*
[
  {
    "id": "text",
    "uuid": "text",
    "name": "text",
    "description": "text",
    "origin": "text",
    "builtInContentVersion": "text",
    "purpose": [
      "DATA_COLLECTION"
    ],
    "targeting": {
      "apiEnabled": true,
      "manualEnabled": true,
      "workflowEnabled": true,
      "manualAllowMultipleDevices": true
    },
    "scriptInfo": {
      "executionServiceDelegate": "text",
      "runAs": "LOCAL_SYSTEM",
      "timeoutSeconds": 1,
      "hasScriptWindows": true,
      "hasScriptMacOs": true,
      "inputs": [
        {
          "id": "text",
          "name": "text",
          "description": "text",
          "usedByWindows": true,
          "usedByMacOs": true,
          "options": [
            "text"
          ],
          "allowCustomValue": true
        }
      ],
      "outputs": [
        {
          "id": "text",
          "name": "text",
          "type": "text",
          "description": "text",
          "usedByWindows": true,
          "usedByMacOs": true
        }
      ]
    }
  }
]

Get remote action details

get

Retrieve the configuration of a specific remote action.

Authorizations
Query parameters
nql-idstringRequired

The nql-id of the remote action

Example: #ExampleRA
Header parameters
AuthorizationstringRequired
Responses
200

OK - Remote action configuration retrieved.

application/json
get
GET /api/v1/act/remote-action/details?nql-id=text HTTP/1.1
Host: instance.api.region.nexthink.cloud
Authorization: text
Accept: */*
{
  "id": "text",
  "uuid": "text",
  "name": "text",
  "description": "text",
  "origin": "text",
  "builtInContentVersion": "text",
  "purpose": [
    "DATA_COLLECTION"
  ],
  "targeting": {
    "apiEnabled": true,
    "manualEnabled": true,
    "workflowEnabled": true,
    "manualAllowMultipleDevices": true
  },
  "scriptInfo": {
    "executionServiceDelegate": "text",
    "runAs": "LOCAL_SYSTEM",
    "timeoutSeconds": 1,
    "hasScriptWindows": true,
    "hasScriptMacOs": true,
    "inputs": [
      {
        "id": "text",
        "name": "text",
        "description": "text",
        "usedByWindows": true,
        "usedByMacOs": true,
        "options": [
          "text"
        ],
        "allowCustomValue": true
      }
    ],
    "outputs": [
      {
        "id": "text",
        "name": "text",
        "type": "text",
        "description": "text",
        "usedByWindows": true,
        "usedByMacOs": true
      }
    ]
  }
}

Was this helpful?