# Get sandbox logs (/docs/api-reference/sandboxes/get-sandbox-logs)

<!-- agent-signals: reading_time_min: 2 · est_tokens: 1258 · updated: 2026-07-30 -->
Related: [List sandboxes](/docs/api-reference/sandboxes/list-sandboxes.md), [Create sandbox](/docs/api-reference/sandboxes/create-sandbox.md), [List sandboxes (v2)](/docs/api-reference/sandboxes/list-sandboxes-v2.md), [List sandbox metrics](/docs/api-reference/sandboxes/list-sandbox-metrics.md), [Get sandbox logs (v2)](/docs/api-reference/sandboxes/get-sandbox-logs-v2.md), [Get sandbox](/docs/api-reference/sandboxes/get-sandbox.md)

# Get sandbox logs

`GET /sandboxes/{sandboxID}/logs`

> Deprecated

Get sandbox logs. Use /v2/sandboxes/{sandboxID}/logs instead.

## OpenAPI

```json
{
  "security": [
    {
      "ApiKeyAuth": []
    }
  ],
  "parameters": [
    {
      "name": "sandboxID",
      "in": "path",
      "required": true,
      "schema": {
        "type": "string"
      }
    },
    {
      "in": "query",
      "name": "start",
      "schema": {
        "type": "integer",
        "format": "int64",
        "minimum": 0
      },
      "description": "Starting timestamp of the logs that should be returned in milliseconds"
    },
    {
      "in": "query",
      "name": "limit",
      "schema": {
        "default": 1000,
        "format": "int32",
        "minimum": 0,
        "type": "integer"
      },
      "description": "Maximum number of logs that should be returned"
    }
  ],
  "responses": {
    "200": {
      "description": "Successfully returned the sandbox logs",
      "content": {
        "application/json": {
          "schema": {
            "required": [
              "logs",
              "logEntries"
            ],
            "properties": {
              "logs": {
                "description": "Logs of the sandbox",
                "type": "array",
                "items": {
                  "description": "Log entry with timestamp and line",
                  "required": [
                    "timestamp",
                    "line"
                  ],
                  "properties": {
                    "timestamp": {
                      "type": "string",
                      "format": "date-time",
                      "description": "Timestamp of the log entry"
                    },
                    "line": {
                      "type": "string",
                      "description": "Log line content"
                    }
                  },
                  "type": "object"
                }
              },
              "logEntries": {
                "description": "Structured logs of the sandbox",
                "type": "array",
                "items": {
                  "required": [
                    "timestamp",
                    "level",
                    "message",
                    "fields"
                  ],
                  "properties": {
                    "timestamp": {
                      "type": "string",
                      "format": "date-time",
                      "description": "Timestamp of the log entry"
                    },
                    "message": {
                      "type": "string",
                      "description": "Log message content"
                    },
                    "level": {
                      "type": "string",
                      "description": "Severity level for log entries (e.g. info, warn, error)"
                    },
                    "fields": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "string"
                      }
                    }
                  },
                  "type": "object"
                }
              }
            },
            "type": "object"
          }
        }
      }
    },
    "401": {
      "description": "Authentication error",
      "content": {
        "application/json": {
          "schema": {
            "required": [
              "code",
              "message"
            ],
            "properties": {
              "code": {
                "type": "integer",
                "format": "int32",
                "description": "Error code"
              },
              "message": {
                "type": "string",
                "description": "Error"
              }
            },
            "type": "object"
          }
        }
      }
    },
    "404": {
      "description": "Not found",
      "content": {
        "application/json": {
          "schema": {
            "required": [
              "code",
              "message"
            ],
            "properties": {
              "code": {
                "type": "integer",
                "format": "int32",
                "description": "Error code"
              },
              "message": {
                "type": "string",
                "description": "Error"
              }
            },
            "type": "object"
          }
        }
      }
    },
    "500": {
      "description": "Server error",
      "content": {
        "application/json": {
          "schema": {
            "required": [
              "code",
              "message"
            ],
            "properties": {
              "code": {
                "type": "integer",
                "format": "int32",
                "description": "Error code"
              },
              "message": {
                "type": "string",
                "description": "Error"
              }
            },
            "type": "object"
          }
        }
      }
    }
  }
}
```
