---
title: "Get one invocation and its logs"
method: GET
path: "/functions/{id}/invocations/{invocationId}"
tags: ["Functions"]
---

# Get one invocation and its logs

`GET /functions/{id}/invocations/{invocationId}`

## Request

- Base URL: `https://api.primitive.dev/v1`
- URL: `https://api.primitive.dev/v1/functions/{id}/invocations/{invocationId}`
- Auth: HTTP bearer

One run of the function with its exception stack and the log lines it wrote, oldest first. logs_truncated is true when the run wrote more lines than one response carries.

## Path parameters

- `id` string, uuid, required
- `invocationId` string, uuid, required

## Response `200`

Get one invocation and its logs

- object
  - `success` true, required
  - `data` GetFunctionInvocationResult, required
    - `invocation` object, required
      - `id` string, uuid, required
      - `function_id` string, uuid, required
      - `outcome` string, nullable, required
      - `cf_truncated` boolean, required
      - `trigger_kind` string, nullable, required
      - `cpu_time_ms` number, nullable, required
      - `wall_time_ms` number, nullable, required
      - `started_at` string, date-time, required
      - `request_url` string, nullable, required
      - `request_method` string, nullable, required
      - `response_status` integer, nullable, required
      - `exception_name` string, nullable, required
      - `exception_message` string, nullable, required
      - `exception_stack` string, nullable
      - `exception_fingerprint` string, nullable, required
      - `cf_script_version_id` string, nullable, required
      - `dispatch_namespace` string, nullable, required
      - `webhook_delivery_id` string, nullable, required
      - `log_line_count` integer, nullable, required
      - `log_bytes` integer, nullable, required
      - `created_at` string, date-time, required
    - `logs` object[], required
      - `id` string, uuid, required
      - `function_id` string, uuid, required
      - `level` string, required
      - `message` string, nullable, required
      - `ts` string, date-time, required
      - `metadata` unknown, required
    - `logs_truncated` boolean, required

## Other responses

- `401`: Invalid or missing API key
- `403`: Authenticated caller lacks permission for the operation
- `404`: Resource not found
- `429`: Rate limit exceeded. The `ratelimit-*` headers describe the limiter that rejected this request, with its own limit and window, not the API budget that successful responses report. A limiter that reports only a wait sends `Retry-After` alone.

---

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