---
title: "Get hook logs"
method: GET
path: "/v1/replica/{id}/hooks"
tags: ["Replica"]
---

# Get hook logs

`GET /v1/replica/{id}/hooks`

## Request

- Base URL: `https://api.replicas.dev`
- URL: `https://api.replicas.dev/v1/replica/{id}/hooks`
- Auth: HTTP bearer

Returns warm hook and start hook logs.

## Path parameters

- `id` string, uuid, required

## Headers

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

## Response `200`

Successful response

- HooksResponse: Hook execution logs for a workspace
  - `warm_hooks` object, required
    - `logs` WarmHookLogEntry[], required
      - `hook_type` 'environment' | 'repository', required: Type of hook
      - `hook_name` string, required: Name of the hook
      - `hook_script` string, required: Script that was executed
      - `output` string, required: Hook execution output. When `output_truncated` is true, this is a preview of up to ~100,000 characters of the full stored log; the complete log can be retrieved via the dashboard full-log endpoint.
      - `output_truncated` boolean, required: Whether `output` has been truncated to a preview.
      - `output_total_chars` integer, required: Total character length of the full stored log (regardless of whether `output` is truncated).
      - `exit_code` integer, required: Exit code of the hook
      - `timed_out` boolean, required: Whether the hook timed out
      - `executed_at` string, date-time, required: When the hook was executed
  - `start_hooks` object, required
    - `logs` StartHookLogEntry[], required
      - `hook_type` 'environment' | 'repository', required: Type of start hook. `environment` is the workspace-level start hook configured on the environment; `repository` is a per-repo start hook from replicas.json/yaml.
      - `hook_name` string, required: Identifier for the hook. For `repository` hooks this is the repository name; for the `environment` hook it is the literal string `environment`.
      - `repo_name` string, required: Deprecated: use `hook_name` instead. Equals `hook_name` for repository hooks and the literal `environment` for the environment hook.
      - `hook_commands` string[], required: Commands that were executed
      - `output` string, required: Hook execution output. When `output_truncated` is true, this is a preview of up to ~100,000 characters of the full stored log; the complete log can be retrieved via the dashboard full-log endpoint.
      - `output_truncated` boolean, required: Whether `output` has been truncated to a preview.
      - `output_total_chars` integer, required: Total character length of the full stored log (regardless of whether `output` is truncated).
      - `exit_code` integer, required: Exit code of the hook
      - `timed_out` boolean, required: Whether the hook timed out
      - `executed_at` string, date-time, required: When the hook was executed

## Other responses

- `401`: Unauthorized - Invalid or missing API key
- `404`: Resource not found
- `500`: Internal server error
- `502`: Bad gateway - The workspace is unreachable or returned an invalid response

---

[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)
