# Get target execution log

`GET /workspaces/:workspace/targets/execs/:exec_id/log`

Get a slice of the execution log.

**Required Scopes:** `TARGET_INFO`

## URL Parameters

```typescript
interface URLParameters {
  /** The human-readable ID of the workspace */
  workspace: string; // Example: "my-company"
  /** Execution ID returned by the execute endpoint */
  exec_id: string; // Example: "9214386e-7633-4d2b-ac66-fcfbaf5ea99b"
}
```

## Query Parameters

```typescript
interface QueryParameters {
  /** Line offset into the execution log to start reading from (number of leading lines to skip). Default: 0 */
  offset?: number; // Example: 0
  /** Maximum number of log lines to return. Default: 1000 */
  limit?: number; // Example: 1000
}
```

## Response Body

```typescript
interface ResponseBody {
  /** API endpoint to GET this object */
  url?: string;
  /** Web URL to view this object in Buddy.works */
  html_url?: string;
  /** The ID of the execution */
  execution_id?: string;
  /** The log lines of the execution output slice */
  lines?: string[];
  /** Line offset to pass as `offset` to fetch the next slice of the log */
  next_offset?: number;
  /** Indicates if the execution log was truncated */
  truncated?: boolean;
}
```

## Response Example

**Status:** `200 OK`

```json
{
  "execution_id": "9214386e-7633-4d2b-ac66-fcfbaf5ea99b",
  "lines": [
    "ok\tts",
    "1\t2026-05-28 08:00:10"
  ],
  "next_offset": 2,
  "truncated": false
}
```

---
Original source: https://buddy.works/docs/api/targets/execs/log