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

# ListSecrets

`POST /gitpod.v1.SecretService/ListSecrets`

Lists secrets with optional filtering.

 Use this method to:
 - View all project secrets
 - Filter secrets by project

 ### Examples

 - List project secrets:

   Shows all secrets for a project.

   ```yaml
   filter:
     projectIds: ["b0e12f6c-4c67-429d-a4a6-d9838b5da047"]
   pagination:
     pageSize: 20
   ```

## Query parameters

- `pageSize` integer
- `token` string

## Request body

- GitpodV1ListSecretsRequest
  - `filter` GitpodV1ListSecretsRequestFilter
    - `projectIds` string[] — project_ids filters the response to only Secrets used by these Project IDs
  - `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-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/cd6a05ae99d2/schema)
