AppSys N-Central icon

AppSys N-Central

Interact with the N-Central API

Scheduled Task → Run Direct

AI-generated

Summary

Run a scheduled task immediately on a specified device in N-Central using direct execution.

Inputs

  • Task Name (required) — Unique name for this task execution.
  • Item ID (required) — ID of the script or software repository item with 'Enable API' flag ON in N-Central UI.
  • Task Type (required) — Type of the task to run, either Automation Policy, Script, or Mac Script.
  • Customer ID (required) — ID of the customer to which the target device belongs.
  • Device ID (required) — ID of the device to run the task on.
  • Credential Type (required) — Credential type for task execution; can be Local System, Device Credentials, or Custom Credentials.
  • Username — Username for custom credentials (required if Credential Type is Custom Credentials).
  • Password — Password for custom credentials (required if Credential Type is Custom Credentials).
  • Parameters — List of script parameters as name/value pairs to pass with the task execution.

Output shape

a list of JSON objects, each representing the API response to the run direct task request for each input item

The output returns data from the N-Central API indicating the status or result of the direct task execution request. No pagination applies for this operation.

Examples

Example 1: Run a direct scheduled task to execute a script on a device

Provide task name, item ID of the script, select the task type, specify the customer and device IDs, choose credential type and supply custom credentials if needed, and optionally provide parameters for the script.

Links

Discussion