---
title: "Get function execution logs"
method: GET
path: "/projects/v1/admin/{project_id}/functions/{name}/logs"
tags: ["Functions"]
---

# Get function execution logs

`GET /projects/v1/admin/{project_id}/functions/{name}/logs`

## Request

- Base URL: `https://api.run402.com`
- URL: `https://api.run402.com/projects/v1/admin/{project_id}/functions/{name}/logs`
- Auth: HTTP bearer

Returns the latest matching CloudWatch log events for a function after applying optional timestamp and request-id filters. Results are sorted chronologically. When request_id is supplied without since, the gateway uses a bounded recent lookback.

## Path parameters

- `project_id` string, required: Run402 project ID. Public IDs are not UUIDs.
- `name` string, required

## Query parameters

- `tail` integer
- `since` string, date-time
- `request_id` string

## Response `200`

Function logs

- object
  - `logs` object[], required
    - `timestamp` string, date-time, required
    - `message` string, required
    - `event_id` string: CloudWatch event id, when available.
    - `log_stream_name` string: CloudWatch log stream name, when available.
    - `ingestion_time` string, date-time: CloudWatch ingestion timestamp, when available.
    - `request_id` string: Best-effort routed/function request id extracted from structured logs or the request_id filter_

## Other responses

- `400`: Invalid tail, since, or request_id filter_ Run402-originated JSON bodies use the canonical ErrorEnvelope.
- `401`: Missing or invalid authentication. Run402-originated JSON bodies use the canonical ErrorEnvelope.
- `404`: Function not found. Run402-originated JSON bodies use the canonical ErrorEnvelope.

---

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