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

# Get Hook Logs

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

Returns the warm hook and start hook execution logs for a replica.

## Path parameters

- `id` string, uuid, required

## Response `200`

Successful response

- HooksResponse — Hook execution logs for a replica
  - `warm_hooks` object, required
    - `logs` WarmHookLogEntry[], required
      - `hookType` 'global' | 'repository', required — Type of hook
      - `hookName` string, required — Name of the hook
      - `hookScript` string, required — Script that was executed
      - `output` string, required — Hook execution output. When `outputTruncated` 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.
      - `outputTruncated` boolean, required — Whether `output` has been truncated to a preview.
      - `outputTotalChars` integer, required — Total character length of the full stored log (regardless of whether `output` is truncated).
      - `exitCode` integer, required — Exit code of the hook
      - `timedOut` boolean, required — Whether the hook timed out
      - `executedAt` string, date-time, required — When the hook was executed
  - `start_hooks` object, required
    - `logs` StartHookLogEntry[], required
      - `hookType` '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.
      - `hookName` string, required — Identifier for the hook. For `repository` hooks this is the repository name; for the `environment` hook it is the literal string `environment`.
      - `repoName` string, required — Deprecated: use `hookName` instead. Equals `hookName` for repository hooks and the literal `environment` for the environment hook.
      - `hookCommands` string[], required — Commands that were executed
      - `output` string, required — Hook execution output. When `outputTruncated` 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.
      - `outputTruncated` boolean, required — Whether `output` has been truncated to a preview.
      - `outputTotalChars` integer, required — Total character length of the full stored log (regardless of whether `output` is truncated).
      - `exitCode` integer, required — Exit code of the hook
      - `timedOut` boolean, required — Whether the hook timed out
      - `executedAt` 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.net/tryreplicas/apis/replica-api.md) · [All operations](https://skmtc.net/tryreplicas/apis/replica-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/tryreplicas/replica-api/versions/aa3b4c932f7a/schema)
