---
title: "List an individual Command"
method: GET
path: "/commands/{id}"
tags: ["Commands"]
---

# List an individual Command

`GET /commands/{id}`

## Request

- Base URL: `https://console.jumpcloud.com/api`
- URL: `https://console.jumpcloud.com/api/commands/{id}`
- Auth: API key in header `x-api-key`
- TypeScript: <https://skmtc.dev/jumpcloud/apis/jumpcloud-api/docs/commands/:id/get.ts> (a function with typed inputs; its response is checked against the schema)

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}'
```

## Query parameters

- `fields` string

## Headers

- `x-org-id` string

## Response `200`

OK

- Command
  - `command` string, required: The command to execute on the server.
  - `commandRunners` string[]: 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.
  - `targetOrganizationId` string: 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.
  - `commandType` string, required: The Command OS
  - `files` string[]: An array of file IDs to include with the command.
  - `launchType` string: How the command will execute.
  - `listensTo` string
  - `name` string, required
  - `organization` string: The ID of the organization.
  - `schedule` string: 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.
  - `scheduleRepeatType` string: When the command will repeat.
  - `sudo` boolean
  - `systems` string[]: Not used. Use /api/v2/commands/{id}/associations to bind commands to systems.
  - `template` string: The template this command was created from
  - `timeout` string: The time in seconds to allow the command to run for. The maximum value is 86400 seconds (1 day).
  - `trigger` string: The name of the command trigger.
  - `user` string: 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".
  - `shell` string: The shell used to run the command.
  - `timeToLiveSeconds` integer: Time in seconds a command can wait in the queue to be run before timing out
  - `scheduleYear` integer: The year that a scheduled command will launch in.
  - `filesS3` FilesS3[]: An array of file stored in S3 to include with the command.
    - `objectStorageId` string, required: The ID of the file in object storage database.
    - `name` string, required: The name of the file.
    - `destination` string, required: The destination of the file.
    - `sha256` string, required: The SHA256 hash of the file.
  - `description` string: Description of the command.
  - `aiGenerated` boolean: Whether this command was generated with AI assistance.
  - `templatingRequired` boolean: Whether this command requires templating before execution.
  - `managedBy` 'enterprise' | 'organization': Command owner type (`enterprise` or `organization`).

## Other responses

- `401`: Unauthorized

---

[API](https://skmtc.dev/jumpcloud/apis/jumpcloud-api.md) - [All operations](https://skmtc.dev/jumpcloud/apis/jumpcloud-api/llms.txt) - [OpenAPI document](https://skmtc.dev/jumpcloud/apis/jumpcloud-api/revisions/0762c7d17a26?raw)
