---
title: "List the newest scheduled function runs of an environment"
method: GET
path: "/v1/projects/{project_id}/environments/{environment_id}/function-runs"
---

# List the newest scheduled function runs of an environment

`GET /v1/projects/{project_id}/environments/{environment_id}/function-runs`

## Request

- Base URL: `https://app.ohmyho.st`
- URL: `https://app.ohmyho.st/v1/projects/{project_id}/environments/{environment_id}/function-runs`
- Auth: HTTP bearer

Every declared cron produces one run per due UTC minute; the newest runs come first. A run reports its state, attempt, the status the scheduled handler returned and its timing. Values never include request or response bodies.

## Path parameters

- `project_id` string, required
- `environment_id` string, required

## Query parameters

- `limit` integer

## Headers

- `X-Request-Id` string

## Response `200`

The newest scheduled runs of the environment, newest first.

- FunctionRunPage
  - `items` FunctionRun[], required
    - `id` string, required
    - `deployment_id` string, required
    - `cron` string, required
    - `scheduled_at` string, date-time, required
    - `state` 'due' | 'running' | 'retry' | 'succeeded' | 'failed', required
    - `attempt` integer, required
    - `status_code` integer, nullable, required
    - `started_at` string, date-time, nullable, required
    - `finished_at` string, date-time, nullable, required

## Other responses

- `400`: The request failed.
- `401`: The request failed.
- `403`: The request failed.
- `404`: The resource does not exist or is not visible to the authenticated principal.
- `429`: The request failed.
- `503`: The request failed.

---

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