Skip to content
For the complete documentation index, see llms.txt. Markdown versions of documentation pages are available by appending .md to the page URL.
Primary navigation

List vaults

VaultListPage beta().agents().vaults().list(VaultListParamsparams = VaultListParams.none(), RequestOptionsrequestOptions = RequestOptions.none())
GET/vaults

Lists vaults using ID-based pagination. See vaults.

ParametersExpand Collapse
VaultListParams params
Optional<String> after

Return resources after this resource ID in the selected order.

minLength0
maxLength1048576
Optional<Long> limit

The maximum number of resources to return, between 1 and 100. Defaults to 20.

formatint64
minimum1
maximum100
Optional<Metadata> metadata

Exact string matches supplied as metadata[key]=value. All supplied pairs must match. Up to 16 pairs, with keys from 1 to 64 characters and values up to 512 characters. Filtering is eventually consistent; metadata changes may take time to appear.

Optional<Order> order

The order in which resources are returned. Defaults to desc.

Optional<VaultStatusFilter> status

Filter by one status or a list, such as status=active or status[]=active&status[]=archived. Both statuses are included by default.

ReturnsExpand Collapse
class Vault:

A collection of credentials for MCP servers and OpenAI-hosted environments.

String id

The ID of the vault.

minLength0
long createdAt

The Unix timestamp, in seconds, when the vault was created.

formatint64
Metadata metadata

Key-value pairs associated with the vault, such as an application or team identifier.

Optional<String> name

The human-readable name of the vault, if set.

minLength0
JsonValue; object_ "vault"constant"vault"constant

The object type. Always vault.

List vaults

package com.openai.example;

import com.openai.client.OpenAIClient;
import com.openai.client.okhttp.OpenAIOkHttpClient;
import com.openai.models.beta.agents.vaults.VaultListPage;
import com.openai.models.beta.agents.vaults.VaultListParams;

public final class Main {
    private Main() {}

    public static void main(String[] args) {
        OpenAIClient client = OpenAIOkHttpClient.fromEnv();

        VaultListPage page = client.beta().agents().vaults().list();
    }
}
{
  "data": [
    {
      "id": "id",
      "created_at": 0,
      "metadata": {
        "foo": "string"
      },
      "name": "name",
      "object": "vault"
    }
  ],
  "first_id": "first_id",
  "has_more": true,
  "last_id": "last_id",
  "object": "list"
}
Returns Examples
{
  "data": [
    {
      "id": "id",
      "created_at": 0,
      "metadata": {
        "foo": "string"
      },
      "name": "name",
      "object": "vault"
    }
  ],
  "first_id": "first_id",
  "has_more": true,
  "last_id": "last_id",
  "object": "list"
}