---
title: "List all Command Results"
method: GET
path: "/api/commandresults"
tags: ["Command Results"]
---

# List all Command Results

`GET /api/commandresults`

## Request

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

This endpoint returns all command results.

#### Sample Request
```
curl -X GET https://console.jumpcloud.com/api/commandresults \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \
  -H 'x-api-key:{API_KEY}'
  ```

To filter command results use the [**Search API**](#tag/Search/operation/search_commandresults_post)

## Query parameters

- `fields` string
- `limit` integer
- `skip` integer
- `sort` string

## Headers

- `x-org-id` string

## Response `200`

OK

- Commandresultslist
  - `totalCount` integer: The total number of command results.
  - `results` object[]
    - `command` string: The command that was executed on the system, truncated to 10k characters.
    - `exitCode` integer: The stderr output from the command that ran.
    - `name` string: The name of the command.
    - `organization` string: Device organization ID for the command result.
    - `managedBy` 'enterprise' | 'organization': Command owner type stamped at dispatch (`enterprise` or `organization`).
    - `managedByLabel` string: Display label for Managed By (`Enterprise` or the device organization name).
    - `requestTime` string, date-time, nullable: The time (UTC) that the command was sent.
    - `responseTime` string, date-time, nullable: The time (UTC) that the command was completed.
    - `sudo` boolean: If the user had sudo rights.
    - `system` string: The display name of the system the command was executed on.
    - `systemId` string: The id of the system the command was executed on.
    - `user` string: The user the command ran as.
    - `workflowId` string: The id for the command that ran on the system.
    - `_id` string: The ID of the command result.
    - `response` object
      - `data` object
        - `exitCode` integer: The numeric exit code returned by the executed command.
        - `output` string: The successful command output, truncated to 40 characters.
      - `error` string: The error output from the command, truncated to 40 characters.

## Other responses

- `401`: Unauthorized

---

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