---
title: "List project factory PR costs"
method: GET
path: "/experimental/projects/{projectId}/factory/metrics/cost/prs"
tags: ["Projects"]
---

# List project factory PR costs

`GET /experimental/projects/{projectId}/factory/metrics/cost/prs`

## Request

- Base URL: `https://api.tessl.io`
- URL: `https://api.tessl.io/experimental/projects/{projectId}/factory/metrics/cost/prs`
- Auth: none declared

Lists the factory PRs behind the Cost per PR card (`GET .../factory/metrics/cost`) for the requested window (`filter[timestamp][gte]` to the exclusive `filter[timestamp][lt]`, at most 90 days, the last 7 days when neither is given), counted as the card counts them: one row per PR whose opening run, or any follow-up, is counted in the window. `firstRunCredits` and `followUpCredits` are the credits counted in the window, so the rows add up to the card’s `current.prCredits`, and the rows with `openedInWindow` number its `current.prsOpened`. `openedAt` is when the opening run was created, and `loop` and `skill` are the opening run’s project Loop (null when no Loop of the project started it) and its skill without its version. `runs` lists the PR's counted runs, oldest first, at most 20, and `runsTruncated` says there are more. `filter[opened]` keeps the PRs whose opening run is counted in the window (`inRange`, the rows with `openedInWindow`) or the rest (`earlier`), so an opening run still unfinished counts as `earlier`. `sort` is `-credits` (the default) or `-openedAt`, ties broken by URL; page links carry the resolved window.

## Path parameters

- `projectId` string, uuid, required

## Query parameters

- `filter[timestamp][gte]` string, date-time
- `filter[timestamp][lt]` string, date-time
- `filter[loopId]` string, uuid
- `filter[skillRef]` string
- `filter[opened]` union
  - 'inRange'
  - 'earlier'
- `sort` union
  - '-credits'
  - '-openedAt'
- `page[size]` integer
- `page[after]` string
- `page[before]` string

## Headers

- `Authorization` string

## Response `200`

Default Response

- object
  - `links` object, required
    - `self` string, uri, required
    - `next` string, uri, nullable, required
    - `prev` string, uri, nullable, required
  - `meta` object, required
    - `count` number, required
  - `data` object[], required
    - `id` string, required
    - `type` 'project-factory-cost-pr', required
    - `attributes` object, required
      - `url` string, required
      - `repositoryUrl` string, nullable, required
      - `number` integer, nullable, required
      - `openedAt` string, date-time, required
      - `openedInWindow` boolean, required
      - `mergedAt` string, date-time, nullable, required
      - `loop` object, nullable, required
        - `id` string, uuid, required
        - `label` string, nullable, required
      - `skill` string, nullable, required
      - `credits` number, required
      - `firstRunCredits` number, required
      - `followUpCredits` number, required
      - `runs` object[], required
        - `id` string, uuid, required
        - `createdAt` string, date-time, required
        - `status` union, required
          - 'completed'
          - 'failed'
          - 'cancelled'
        - `loop` object, nullable, required
          - `id` string, uuid, required
          - `label` string, nullable, required
        - `skill` string, nullable, required
        - `credits` number, required
        - `opened` boolean, required
      - `runsTruncated` boolean, required

## Other responses

- `401`: Unauthorized
- `403`: Default Response
- `404`: Not Found
- `500`: Internal Server Error

## Changes

- **2026-10-29** `06d2142ed144`: 1 info
  - api operation id `listProjectFactoryMetricCostPrs` was added
- **2026-10-29** `68c1ace37d92`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/tessl/apis/tessl-api/changes/experimental/projects/:projectId/factory/metrics/cost/prs/get.md)

---

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