---
title: "Retrieve processing and validation logs for a specific script."
method: GET
path: "/api/v1/script/{script}/log"
---

# Retrieve processing and validation logs for a specific script.

`GET /api/v1/script/{script}/log`

**Authentication**: JWT token required
**Access**: Script must be accessible to current user
**Purpose**: View script upload, validation, and publishing logs for debugging

**Path Parameters**:
- `script`: Script identifier/slug or numeric ID

**Query Parameters**:
- `start`: Start timestamp for log filtering (ISO 8601 format)
  - Example: `?start=2025-01-15T10:30:00Z`
- `last-id`: Last log ID for pagination/incremental updates
  - Example: `?last-id=log-456`

**Response Schema**:
```json
{
  "data": [
    {
      "id": "log-123",
      "script_id": "script-456",
      "timestamp": "2025-01-15T10:30:00Z",
      "level": "INFO",
      "message": "Script validation started",
      "details": {
        "stage": "validation",
        "file_count": 5,
        "total_size": "2.3MB"
      }
    },
    {
      "id": "log-124",
      "script_id": "script-456",
      "timestamp": "2025-01-15T10:30:15Z",
      "level": "SUCCESS",
      "message": "Script validation completed successfully",
      "details": {
        "stage": "validation",
        "duration": "15s"
      }
    }
  ]
}
```

**Log Levels**:
- `DEBUG`: Detailed diagnostic information
- `INFO`: General information about script processing
- `WARNING`: Warning messages about potential issues
- `ERROR`: Error messages about failures
- `SUCCESS`: Successful completion of operations

**Log Types**:
- Upload processing logs
- Script validation and syntax checking
- Dependency resolution logs
- Publishing process logs
- Configuration validation results

**Error Responses**:
- `401 Unauthorized`: JWT token required
- `403 Forbidden`: No access to view script logs
- `404 Not Found`: Script does not exist
- `500 Internal Server Error`: Failed to retrieve logs

## Path parameters

- `script` string, required

## Response `200`

Success

- object

## Other responses

- `400` — Bad Request
- `401` — Unauthorized
- `403` — Forbidden
- `404` — Not Found
- `500` — Internal Server Error

---

[API](https://skmtc.dev/trends/apis/trends-earth-api.md) · [All operations](https://skmtc.dev/trends/apis/trends-earth-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/trends/trends-earth-api/revisions/6bdbc0b84666/schema)
