> ## Documentation Index
> Fetch the complete documentation index at: https://docs.hopae.com/llms.txt
> Use this file to discover all available pages before exploring further.

# List Production Tests

> Get all production test challenges for an app.

Returns all production test challenges for the specified app.

## Request

<ParamField header="Authorization" type="string" required>
  `Bearer <API_KEY>` from Console > Developers > Workspace API Keys.
</ParamField>

### Path parameters

<ParamField path="client_id" type="string" required>
  Client identifier of the app.
</ParamField>

## Response

Returns an array of production test items. Each item is either a scheduled **challenge** or a pending **request** — use the `type` field to discriminate between them.

<ResponseField name="type" type="string">
  Discriminator field. One of `"challenge"` (the request has been scheduled and a tpas challenge exists) or `"request"` (the challenge request is still pending scheduling).
</ResponseField>

<ResponseField name="challenge" type="object | null">
  Present when `type === "challenge"`. The scheduled challenge object from tpas-backend.

  <Expandable title="challenge fields">
    <ResponseField name="id" type="string">
      Challenge ID (tpas-backend ID). Use this value as `{challenge_id}` in the report endpoint.
    </ResponseField>

    <ResponseField name="title" type="string">
      Challenge title.
    </ResponseField>

    <ResponseField name="description" type="string | null">
      Challenge description.
    </ResponseField>

    <ResponseField name="expiresAt" type="string">
      ISO 8601 timestamp when the challenge expires.
    </ResponseField>

    <ResponseField name="createdAt" type="string">
      ISO 8601 timestamp when the challenge was created.
    </ResponseField>

    <ResponseField name="completedAt" type="string | null">
      ISO 8601 timestamp when the challenge was completed. `null` if still active.
    </ResponseField>

    <ResponseField name="isActive" type="boolean">
      Whether the challenge is currently active.
    </ResponseField>

    <ResponseField name="challengeMode" type="string">
      The challenge mode (e.g. `"stamp"`).
    </ResponseField>

    <ResponseField name="sponsor" type="any | null">
      Optional sponsor information.
    </ResponseField>

    <ResponseField name="sources" type="any[] | null">
      Optional source configuration.
    </ResponseField>
  </Expandable>
</ResponseField>

<ResponseField name="request" type="object | null">
  Present when `type === "request"`. The pending challenge request object.

  <Expandable title="request fields">
    <ResponseField name="id" type="string">
      Request ID. Identifies this challenge request record.
    </ResponseField>

    <ResponseField name="clientId" type="string">
      The app client ID this challenge request belongs to.
    </ResponseField>

    <ResponseField name="status" type="string">
      Current status of the challenge request (e.g. `pending`, `scheduled`, `failed`).
    </ResponseField>

    <ResponseField name="payload" type="object">
      The challenge configuration payload forwarded to tpas-backend.
    </ResponseField>

    <ResponseField name="challengeId" type="string | null">
      The tpas-backend challenge ID. Populated once the request has been successfully scheduled.
    </ResponseField>

    <ResponseField name="createdAt" type="string">
      ISO 8601 timestamp when the challenge request was created.
    </ResponseField>
  </Expandable>
</ResponseField>

<Note>
  Items with `type === "request"` are pending and do not yet have a report available. Wait for the item to transition to `type === "challenge"` before fetching its report. The challenge `id` (inside the `challenge` object) is the ID to use with the report endpoint — not the request `id`.
</Note>

<RequestExample>
  ```bash theme={null}
  curl -H "Authorization: Bearer sk_workspace_test_..." \
    "https://sandbox.api.hopae.com/connect/v1/apps/FK5b0KSM/production-tests"
  ```
</RequestExample>

<ResponseExample>
  ```json theme={null}
  [
    {
      "type": "challenge",
      "challenge": {
        "id": "ch_9a1b2c3d-4e5f-6789-abcd-ef0123456789",
        "title": "BankID SE Production Test",
        "description": "Testing BankID SE integration in production",
        "expiresAt": "2026-04-15T23:59:59.000Z",
        "createdAt": "2026-04-08T09:00:00.000Z",
        "completedAt": null,
        "isActive": true,
        "challengeMode": "stamp",
        "sponsor": null,
        "sources": null
      },
      "request": null
    },
    {
      "type": "request",
      "challenge": null,
      "request": {
        "id": "req_7f3a9c1e-4b2d-4f88-9e1a-0c3d5b6e7f8a",
        "clientId": "FK5b0KSM",
        "status": "pending",
        "payload": {
          "title": "MitID Production Test",
          "providerIds": ["mitid"],
          "maxStampClaims": 3,
          "targetPlatform": null
        },
        "challengeId": null,
        "createdAt": "2026-04-08T10:00:00.000Z"
      }
    }
  ]
  ```
</ResponseExample>
