List vaults
client.beta.agents.vaults.list(VaultListParams { after, limit, metadata, 2 more } query?, RequestOptionsoptions?): CursorPage<Vault { id, created_at, metadata, 2 more } >
GET/vaults
Lists vaults using ID-based pagination. See vaults.
List vaults
import OpenAI from 'openai';
const client = new OpenAI({
apiKey: process.env['OPENAI_API_KEY'], // This is the default and can be omitted
});
// Automatically fetches more pages as needed.
for await (const vault of client.beta.agents.vaults.list()) {
console.log(vault.id);
}{
"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"
}