---
title: "Get hook run log"
method: GET
path: "/v1/environments/{environment_id}/hook-runs/{run_id}"
tags: ["Environments"]
---

# Get hook run log

`GET /v1/environments/{environment_id}/hook-runs/{run_id}`

## Request

- Base URL: `https://api.replicas.dev`
- URL: `https://api.replicas.dev/v1/environments/{environment_id}/hook-runs/{run_id}`
- Auth: HTTP bearer

A hook run with its output. Follow a running hook by polling with `offset` set to the previous `output_length`.

## Path parameters

- `environment_id` string, required
- `run_id` string, uuid, required

## Headers

- `X-Replicas-Api-Version` '2026-10-07'

## Response `200`

Hook run

- GetEnvironmentHookRunResponse
  - `run` EnvironmentHookRun, required
    - `id` string, uuid, required
    - `environment_id` string, uuid, required
    - `kind` 'warm' | 'start', required
    - `status` 'running' | 'succeeded' | 'failed' | 'cancelled', required
    - `exit_code` integer, nullable, required
    - `timed_out` boolean, required
    - `warm_pool_build_id` string, uuid, nullable, required: Set on warm hook runs
    - `workspace_id` string, uuid, nullable, required: Set on start hook runs
    - `workspace_name` string, nullable, required
    - `builder_workspace_id` string, uuid, nullable, required: While a warm hook runs, the warm pool workspace whose output stream shows it live
    - `started_at` string, date-time, required
    - `finished_at` string, date-time, nullable, required
    - `output` string, required: The log, stored once the run finishes; empty while it runs
    - `output_length` integer, required: Characters the hook printed
    - `output_truncated` boolean, required: True when only the last 5 MB were kept

## Other responses

- `400`: Bad request - Missing or invalid parameters
- `401`: Unauthorized - Invalid or missing API key
- `404`: Resource not found
- `500`: Internal server error

---

[API](https://skmtc.dev/replicas/apis/replicas-api.md) - [All operations](https://skmtc.dev/replicas/apis/replicas-api/llms.txt) - [OpenAPI document](https://skmtc.dev/replicas/apis/replicas-api/revisions/2703ac1c9cb7?raw)
