Commands

List an individual Command

This endpoint returns a specific command based on the command ID.

Sample Request

curl -X GET https://console.jumpcloud.com/api/commands/{CommandID} \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \
  -H 'x-api-key: {API_KEY}'
get/api/commands/{id}

Request

Query parameters

fieldsstring

Use a space seperated string of field parameters to include the data in the response. If omitted, the default list of fields will be returned.

Headers

x-org-idstring

Response

OK

commandstring required

The command to execute on the server.

commandRunnersstring[]

An array of IDs of the Command Runner Users that can execute this command.

commandTarget'enterprise' | 'organization'

EP create target when enterprise command sharing is enabled. enterprise creates a default-shared Enterprise command (grants all current child orgs). organization creates a local command in targetOrganizationId (or the pinned org). Ignored when sharing is disabled.

targetOrganizationIdstring

Child organization ID for a local command when commandTarget is organization in Enterprise / View All context. Ignored for Enterprise create and when sharing is disabled.

commandTypestring required

The Command OS

filesstring[]

An array of file IDs to include with the command.

launchTypestring

How the command will execute.

listensTostring
namestring required
organizationstring

The ID of the organization.

schedulestring

A crontab that consists of: [ (seconds) (minutes) (hours) (days of month) (months) (weekdays) ] or [ immediate ]. If you send this as an empty string, it will run immediately.

scheduleRepeatTypestring

When the command will repeat.

sudoboolean
systemsstring[]

Not used. Use /api/v2/commands/{id}/associations to bind commands to systems.

templatestring

The template this command was created from

timeoutstring

The time in seconds to allow the command to run for. The maximum value is 86400 seconds (1 day).

triggerstring

The name of the command trigger.

userstring

The ID of the system user to run the command as. This field is required when creating a command with a commandType of "mac" or "linux".

shellstring

The shell used to run the command.

timeToLiveSecondsinteger

Time in seconds a command can wait in the queue to be run before timing out

scheduleYearinteger

The year that a scheduled command will launch in.

descriptionstring

Description of the command.

aiGeneratedboolean

Whether this command was generated with AI assistance.

templatingRequiredboolean

Whether this command requires templating before execution.

managedBy'enterprise' | 'organization'

Command owner type (enterprise or organization).

Changes

No recorded changes to this operation across all 1 revision of this API.