---
title: "ListSecrets"
method: POST
path: "/gitpod.v1.SecretService/ListSecrets"
tags: ["gitpod.v1.SecretService"]
---

# ListSecrets

`POST /gitpod.v1.SecretService/ListSecrets`

Lists secrets

 Use this method to:
 - View all project secrets
 - View all user secrets

 ### Examples

 - List project secrets:

   Shows all secrets for a project.

   ```yaml
   filter:
     scope:
       projectId: "b0e12f6c-4c67-429d-a4a6-d9838b5da047"
   pagination:
     pageSize: 20
   ```

 - List user secrets:

   Shows all secrets for a user.

   ```yaml
   filter:
     scope:
       userId: "123e4567-e89b-12d3-a456-426614174000"
   pagination:
     pageSize: 20
   ```

## Query parameters

- `pageSize` integer
- `token` string

## Request body

- GitpodV1ListSecretsRequest
  - `filter` GitpodV1ListSecretsRequestFilter — unresolved $ref
  - `pagination` GitpodV1PaginationRequest
    - `pageSize` integer — Page size is the maximum number of results to retrieve per page. Defaults to 25. Maximum 100.
    - `token` string — Token for the next set of results that was returned as next_token of a PaginationResponse

## Response `200`

Success

- GitpodV1ListSecretsResponse — unresolved $ref

## Other responses

- `default` — Error

## Changes

- **2025-06-10** `ca9a49ac7fbb` — 1 warning, 5 info
  - added the new `PRINCIPAL_RUNNER_MANAGER` enum value to the `secrets/items/creator/principal` response property for the response status `200`
  - added the new optional request property `filter/scope`
  - request property `filter/projectIds` deprecated
  - request property `filter/projectIds/items/` deprecated
  - …2 more
- **2025-02-21** `3655d5ad0ac3` — 6 breaking, 2 warning, 10 info
  - the `filter` request property type/format changed from ``/`` to `object`/``
  - the `pagination` request property type/format changed from ``/`` to `object`/``
  - the `pagination` response's property type/format changed from ``/`` to `object`/`` for status `200`
  - the `secrets/items/createdAt` response's property type/format changed from ``/`` to `string`/`date-time` for status `200`
  - …14 more
- **2025-02-18** `cd6a05ae99d2` — 1 warning
  - removed the optional property `detail` from the response with the `default` status

[Change history](https://skmtc.dev/gitpod-io/apis/gitpod-v1/changes/gitpod.v1.SecretService/ListSecrets/post.md)

---

[API](https://skmtc.dev/gitpod-io/apis/gitpod-v1.md) · [All operations](https://skmtc.dev/gitpod-io/apis/gitpod-v1/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/gitpod-io/gitpod-v1/revisions/ca9a49ac7fbb/schema)
