dots.v2.genAi.openai.keys.byApi_key_uuId().agents.get()

Generated on 13 Nov 2026 from DoTs version v1.24.0

Usage

client.v2.genAi.openai.keys.byApi_key_uuId(api_key_uuId).agents.get(requestConfiguration?: RequestConfiguration<AgentsRequestBuilderGetQueryParameters>): Promise<undefined | ApiListAgentsByOpenAIKeyOutput>

Description

List Agents by OpenAI Key.

Parameters

Path Parameters

api_key_uuId string required

Example: "123e4567-e89b-12d3-a456-426614174000"

Unique ID of OpenAI key

Query Parameters

page integer optional

Example: 1

Page number.

perPage integer optional

Example: 1

Items per page.

Request Sample

Show Request Sample
import { FetchRequestAdapter } from "@microsoft/kiota-http-fetchlibrary";
import {
    createDigitalOceanClient,
    DigitalOceanApiKeyAuthenticationProvider,
} from "@digitalocean/dots";

const authProvider = new DigitalOceanApiKeyAuthenticationProvider(process.env.DIGITALOCEAN_TOKEN!);
const adapter = new FetchRequestAdapter(authProvider);
const client = createDigitalOceanClient(adapter);

const response = await client.v2.genAi.openai.keys
    .byApi_key_uuId("\"123e4567-e89b-12d3-a456-426614174000\"").agents.get();

Pagination

This method returns paginated results. The response includes a links.pages object with URLs for navigating between pages. To retrieve the next page, parse the next URL and pass the page query parameter:

let response = await client.v2.genAi.openai.keys
    .byApi_key_uuId("\"123e4567-e89b-12d3-a456-426614174000\"").agents.get();
let pages = response?.links?.pages;

while (pages && "next" in pages && typeof pages.next === "string") {
    const page = Number(new URL(pages.next).searchParams.get("page"));
    response = await client.v2.genAi.openai.keys
        .byApi_key_uuId("\"123e4567-e89b-12d3-a456-426614174000\"").agents.get({
        queryParameters: {
            page,
        },
    });
    pages = response?.links?.pages;
}

Response Example

Show Response Example
{
  "agents": [
    {
      "api_key_infos": [],
      "api_keys": [],
      "chatbot_identifiers": [],
      "child_agents": [],
      "conversation_logs_enabled": true,
      "created_at": "2023-01-01T00:00:00Z",
      "description": "example string",
      "functions": [],
      "guardrails": [],
      "if_case": "example string",
      "instruction": "example string",
      "k": 123,
      "knowledge_bases": [],
      "max_tokens": 123,
      "mcp_servers": [],
      "name": "example name",
      "parent_agents": [],
      "project_id": "123e4567-e89b-12d3-a456-426614174000",
      "provide_citations": true,
      "reasoning_effort": "example string",
      "region": "example string",
      "retrieval_method": "RETRIEVAL_METHOD_UNKNOWN",
      "route_created_at": "2023-01-01T00:00:00Z",
      "route_created_by": "12345",
      "route_name": "example name",
      "route_uuid": "123e4567-e89b-12d3-a456-426614174000",
      "tags": [
        "example string"
      ],
      "temperature": 123,
      "thinking_token_budget": 123,
      "top_p": 123,
      "updated_at": "2023-01-01T00:00:00Z",
      "url": "example string",
      "user_id": "12345",
      "uuid": "123e4567-e89b-12d3-a456-426614174000",
      "version_hash": "example string",
      "vpc_egress_ips": [
        "example string"
      ],
      "vpc_uuid": "\"12345678-1234-1234-1234-123456789012\"",
      "web_fetch_enabled": true,
      "web_search_enabled": true
    }
  ],
  "links": {
    "pages": {
      "first": "example string",
      "last": "example string",
      "next": "example string",
      "previous": "example string"
    }
  },
  "meta": {
    "page": 123,
    "pages": 123,
    "total": 123
  }
}

More Information

See /v2/gen-ai/openai/keys/{uuid}/agents in the API reference for additional detail on responses, headers, parameters, and more.

We can't find any results for your search.

Try using different keywords or simplifying your search terms.