---
title: "Get a Command File"
method: GET
path: "/api/files/command/{id}"
tags: ["Commands"]
---

# Get a Command File

`GET /api/files/command/{id}`

## Request

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

This endpoint returns the uploaded file(s) associated with a specific command.

#### Sample Request

```
curl -X GET https://console.jumpcloud.com/api/files/command/{commandID} \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \
  -H 'x-api-key: {API_KEY}'
  ```

## Query parameters

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

## Headers

- `x-org-id` string

## Response `200`

- Commandfilereturn
  - `results` object[]
    - `_id` string: The ID of the file.
    - `destination` string: The location where the file will be stored.
    - `name` string: The file name.
  - `totalCount` integer: The total number of commands files

## Other responses

- `400`: Bad Request

---

[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)
