# Get Device Live Tools Read File

```http
GET /devices/{serial}/liveTools/readFile/{readFileId}
```

API: Meraki Dashboard API (version 1.77.0)

Operation ID: getDeviceLiveToolsReadFile

Tags: devices, liveTools, readFile

## Description

Return a read file live tool job.

## Servers

```json
[
  {
    "url": "https://api.meraki.com/{basePath}",
    "variables": {
      "basePath": {
        "default": "api/v1"
      }
    }
  }
]
```

## Authentication

Satisfy any one of the following alternatives. Within each alternative, all listed schemes are required. An empty object allows anonymous access.

```json
[
  {
    "oauth2": [
      "dashboard:general:telemetry:read"
    ]
  }
]
```

### Security schemes

```json
{
  "oauth2": {
    "type": "oauth2",
    "description": "This API uses OAuth 2 with the authorization code grant flow. [More info](https://developer.cisco.com/meraki/api-v1/authorization/)",
    "flows": {
      "authorizationCode": {
        "authorizationUrl": "https://as.meraki.com/oauth/authorize",
        "tokenUrl": "https://as.meraki.com/oauth/token",
        "scopes": {
          "camera:config:read": "Cameras (MV)",
          "camera:config:write": "Cameras (MV)",
          "camera:telemetry:read": "Cameras (MV)",
          "camera:telemetry:write": "Cameras (MV)",
          "dashboard:general:config:read": "Entire dashboard, excluding identity and access management",
          "dashboard:general:config:write": "Entire dashboard, excluding identity and access management",
          "dashboard:general:telemetry:read": "Entire dashboard, excluding identity and access management",
          "dashboard:general:telemetry:write": "Entire dashboard, excluding identity and access management",
          "dashboard:iam:config:read": "Dashboard related to identity and access management, including early access features",
          "dashboard:iam:config:write": "Dashboard related to identity and access management, including early access features",
          "dashboard:iam:telemetry:read": "Dashboard related to identity and access management, including early access features",
          "dashboard:iam:telemetry:write": "Dashboard related to identity and access management, including early access features",
          "dashboard:licensing:config:read": "Licensing",
          "dashboard:licensing:config:write": "Licensing",
          "dashboard:licensing:telemetry:read": "Licensing",
          "dashboard:licensing:telemetry:write": "Licensing",
          "iot:gateway:general:config:read": "Sensor Connect (IoT Control)",
          "iot:gateway:general:config:write": "Sensor Connect (IoT Control)",
          "iot:gateway:general:telemetry:read": "Sensor Connect (IoT Control)",
          "iot:gateway:general:telemetry:write": "Sensor Connect (IoT Control)",
          "iot:gateway:onboarding:config:read": "Sensor Connect (IoT Onboarding)",
          "iot:gateway:onboarding:config:write": "Sensor Connect (IoT Onboarding)",
          "policy:config:read": "Provides granular authorization over all global policy resources including policy objects, adaptive policy, and Organization Group Policy",
          "policy:config:write": "Provides granular authorization over all global policy resources including policy objects, adaptive policy, and Organization Group Policy",
          "policy:telemetry:read": "Provides granular authorization over all global policy resources including policy objects, adaptive policy, and Organization Group Policy",
          "policy:telemetry:write": "Provides granular authorization over all global policy resources including policy objects, adaptive policy, and Organization Group Policy",
          "sdwan:config:read": "Secure SD-WAN (MX including MXIGZ)",
          "sdwan:config:write": "Secure SD-WAN (MX including MXIGZ)",
          "sdwan:telemetry:read": "Secure SD-WAN (MX including MXIGZ)",
          "sdwan:telemetry:write": "Secure SD-WAN (MX including MXIGZ)",
          "sensor:config:read": "Sensors (MT)",
          "sensor:config:write": "Sensors (MT)",
          "sensor:telemetry:read": "Sensors (MT)",
          "sensor:telemetry:write": "Sensors (MT)",
          "sm:config:read": "Endpoint Management (SM)",
          "sm:config:write": "Endpoint Management (SM)",
          "sm:telemetry:read": "Endpoint Management (SM)",
          "sm:telemetry:write": "Endpoint Management (SM)",
          "switch:config:read": "Switches (MS)",
          "switch:config:write": "Switches (MS)",
          "switch:telemetry:read": "Switches (MS)",
          "switch:telemetry:write": "Switches (MS)",
          "wireless:config:read": "Wireless (MR)",
          "wireless:config:write": "Wireless (MR)",
          "wireless:telemetry:read": "Wireless (MR)",
          "wireless:telemetry:write": "Wireless (MR)"
        }
      }
    }
  }
}
```

## Parameters

| Name | In | Required | Type | Description |
| --- | --- | --- | --- | --- |
| serial | path | yes | string | Serial |
| readFileId | path | yes | string | Read file ID |

### Parameter definitions

```json
[
  {
    "name": "serial",
    "in": "path",
    "description": "Serial",
    "schema": {
      "type": "string"
    },
    "required": true
  },
  {
    "name": "readFileId",
    "in": "path",
    "description": "Read file ID",
    "schema": {
      "type": "string"
    },
    "required": true
  }
]
```

## Responses

### 200

Successful operation

```json
{
  "description": "Successful operation",
  "content": {
    "application/json": {
      "schema": {
        "type": "object",
        "properties": {
          "readFileId": {
            "type": "string",
            "description": "ID of the read file request. Used to check the status of the request."
          },
          "url": {
            "type": "string",
            "description": "GET this URL to check the status of your read file request."
          },
          "request": {
            "type": "object",
            "properties": {
              "command": {
                "type": "string",
                "description": "Command executed by the readFile live tool."
              },
              "filePath": {
                "type": "string",
                "description": "Path of the file requested from the device for cat/readFile commands."
              },
              "clickHandler": {
                "type": "string",
                "description": "Allowlisted click_read handler when command is click_read."
              },
              "args": {
                "type": "string",
                "description": "Optional click_read parameter string."
              },
              "filter": {
                "type": "string",
                "description": "Optional case-insensitive literal output filter."
              },
              "lines": {
                "type": "integer",
                "description": "Maximum lines returned by head."
              },
              "flags": {
                "type": "string",
                "description": "Optional grep or ls flags."
              },
              "purpose": {
                "type": "string",
                "description": "Optional caller-provided metadata describing why the readFile request was submitted."
              }
            },
            "description": "Read file request parameters"
          },
          "status": {
            "type": "string",
            "enum": [
              "complete",
              "failed",
              "new",
              "ready",
              "running",
              "scheduled"
            ],
            "description": "Status of the read file request."
          },
          "contents": {
            "type": "string",
            "description": "Raw content returned by the device."
          },
          "errors": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Errors encountered while reading the file or Click handler."
          }
        }
      },
      "example": {
        "readFileId": "1284392014819",
        "url": "/devices/Q234-ABCD-5678/liveTools/readFile/1284392014819",
        "request": {
          "command": "click_read",
          "filePath": "/MERAKI_BUILD",
          "clickHandler": "dhcp_enforcement/packet_drops",
          "args": "port0",
          "filter": "warning",
          "lines": 10,
          "flags": "-ltr",
          "purpose": "local dhcp drops test"
        },
        "status": "complete",
        "contents": "switch-15-14-0",
        "errors": [
          "The device is unreachable."
        ]
      }
    }
  }
}
```

## Additional OpenAPI fields

```json
{
  "__originalOperationId": "getDeviceLiveToolsReadFile"
}
```
