---
title: "List the factory's pull requests"
method: GET
path: "/factory/{uid}/pull-requests"
tags: ["Factories"]
---

# List the factory's pull requests

`GET /factory/{uid}/pull-requests`

## Request

- Base URL: `https://app.warp.dev/api/v1`
- URL: `https://app.warp.dev/api/v1/factory/{uid}/pull-requests`
- Auth: HTTP bearer

One record per pull request produced by the factory's runs, newest
opened first. A PR someone opened in one of the factory's
repositories without a factory run (by hand, for example) is not
listed. Each record carries the PR's identity, state and times,
size, human interactions, the runs that produced it, and its cycle
time. Pages are keyset-paginated: pass page_info.next_cursor back as
cursor to continue. Pass updated_after to sync incrementally.

## Path parameters

- `uid` string, required

## Query parameters

- `limit` integer
- `cursor` string
- `repo` string
- `state` FactoryPullRequestState[]
- `opened_after` string, date-time
- `opened_before` string, date-time
- `merged_after` string, date-time
- `merged_before` string, date-time
- `updated_after` string, date-time

## Response `200`

One page of the factory's pull requests

- FactoryPullRequestsResponse: Fields every factory-scoped metrics response carries alongside its data, so responses from several factories can be combined or told apart.
  - `as_of` string, date-time, required: The time the data is current as of. Data can lag live activity by a few minutes.
  - `team_uid` string, required: Public UID of the team that owns the factory.
  - `factory_uid` string, required: Public UID of the factory the response is scoped to.
  - `data` FactoryPullRequest[], required: Newest opened first.
    - `provider` 'GITHUB' | 'GITLAB' | 'AZURE_DEVOPS', required: The concrete source-control provider hosting a repository.
    - `repo_full_name` string, required: The repository as owner/repo.
    - `pr_number` integer, required: The provider's PR number.
    - `url` string, required: Canonical PR URL.
    - `title` string, nullable, required: The PR title; null until the code host reports it.
    - `author_login` string, nullable, required: The code-host login that opened the PR.
    - `factory_uid` string, required: Public UID of the factory whose runs produced the PR.
    - `team_uid` string, required: Public UID of the team that owns the factory.
    - `state` 'open' | 'draft' | 'merged' | 'closed', required: The pull request's current state.
    - `opened_at` string, date-time, nullable, required: When the PR was opened; null when Warp did not see it being opened.
    - `first_human_review_at` string, date-time, nullable, required: The first review by a person; null when none was observed.
    - `merged_at` string, date-time, nullable, required: When the PR was merged; null while it is not merged.
    - `closed_at` string, date-time, nullable, required: When the PR was closed, by merging or otherwise; null while it is open or when the code host did not report it.
    - `updated_at` string, date-time, required: When the PR itself last changed; the updated_after filter compares against it.
    - `additions` integer, nullable, required: Lines added; null until the code host reports it.
    - `deletions` integer, nullable, required: Lines deleted; null until the code host reports it.
    - `changed_files` integer, nullable, required: Files changed; null until the code host reports it.
    - `num_commits` integer, nullable, required: Commits on the PR; null until the code host reports it.
    - `human_interactions` FactoryPullRequestHumanInteractions, required: Actions people took on the pull request, counted by type. A person is not a bot and not an app acting on a person's behalf. A review that was later dismissed is not counted. A follow-up a person sent to the run that produced the PR counts when it came through Slack, Linear, Jira, Teams, the web app, or the API; messages relayed through the Factory MCP or a local agent do not count, and a follow-up sent as a GitHub comment counts once, as a PR comment or review. total is the sum of every type.
      - `opened` integer, required: A person opened the PR.
      - `code_push` integer, required: A person pushed code to the PR. Pushes are attributed to whoever triggered them, so the code host's "update branch" button and rebases count.
      - `review_approved` integer, required: A person approved the PR.
      - `review_changes_requested` integer, required: A person requested changes.
      - `review_commented` integer, required: A person reviewed with comments only.
      - `comment` integer, required: A person commented on the PR.
      - `review_comment` integer, required: A person commented on a line of code.
      - `pr_action` integer, required: Other PR actions by a person, such as closed, reopened, or marked ready.
      - `follow_up_message` integer, required: A person sent a follow-up message to the run that produced the PR.
      - `total` integer, required: The sum of every interaction type.
    - `human_code_change` boolean, required: Whether a person changed the PR's code: any opened or code_push interaction. False only means autonomous when history_complete is true.
    - `history_complete` boolean, required: Whether Warp observed the PR from the moment it was opened. When false, interactions before Warp started watching the PR are missing from the counts.
    - `runs` FactoryPullRequestRun[], required: The factory's runs that produced the PR, earliest first.
      - `run_id` string, required
      - `root_run_id` string, required: The top-level run of the run's tree; equals run_id for a top-level run.
      - `created_at` string, date-time, required
    - `kickoff_at` string, date-time, nullable, required: When the earliest run that produced the PR was created.
    - `cycle_time` FactoryPullRequestCycleTime, required: The pull request's pipeline-stage durations in seconds. Each stage is null when either end was not observed, and never negative. Kickoff is when the earliest run that produced the PR was created; first review is the first review by a person.
      - `kickoff_to_pr` number, double, nullable, required
      - `pr_to_first_review` number, double, nullable, required
      - `first_review_to_merge` number, double, nullable, required
      - `kickoff_to_merge` number, double, nullable, required
  - `page_info` PageInfo, required
    - `has_next_page` boolean, required: Whether there are more results available
    - `next_cursor` string: Opaque cursor for fetching the next page

## Other responses

- `400`: Invalid limit, cursor, state, or timestamp filter, or a time window whose *_after bound is not before its *_before bound
- `401`: Authentication required
- `403`: Factory access is not enabled for the authenticated principal
- `404`: Factory not found or not accessible
- `429`: The caller has used up the request budget shared by the factory metrics endpoints. Wait the number of seconds in Retry-After, then retry.
- `500`: Internal server error

## Changes

- **2026-10-15** `f4630aae17ba`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/warp/apis/oz-agent-api/changes/factory/:uid/pull-requests/get.md)

---

[API](https://skmtc.dev/warp/apis/oz-agent-api.md) - [All operations](https://skmtc.dev/warp/apis/oz-agent-api/llms.txt) - [OpenAPI document](https://skmtc.dev/warp/apis/oz-agent-api/revisions/4b5d145669be?raw)
