For AI agents: The documentation index is at https://docs.digitalocean.com/llms.txt. Markdown versions of pages use the same URL with index.html.md in place of the HTML page (for example, append index.html.md to the directory path instead of opening the HTML document).
Usage
client.v2.apps.byApp_Id(app_Id).instances.get(requestConfiguration?: RequestConfiguration<object>): Promise<undefined | App_instances>
Description
Retrieve the list of running instances for a given application, including instance names and component types. Please note that these instances are ephemeral and may change over time. It is recommended not to make persistent changes or develop scripts that rely on their persistence.
Parameters
app_Id string required
Example: 4f6c71e2-1e90-4762-9fee-6cc4a0a9f2cf
The app ID
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.apps
.byApp_Id("4f6c71e2-1e90-4762-9fee-6cc4a0a9f2cf").instances.get();
Response Example
Show Response Example
{
"instances": [
{
"component_name": "sample-golang",
"instance_name": "sample-golang-76b84c7fb8-6p8kq",
"instance_alias": "sample-golang-0",
"component_type": "SERVICE"
},
{
"component_name": "sample-golang",
"instance_name": "sample-golang-76b84c7fb8-ngvpc",
"instance_alias": "sample-golang-1",
"component_type": "SERVICE"
},
{
"component_name": "sample-php",
"instance_name": "sample-php-767c6b49c4-dkgpt",
"instance_alias": "sample-php-0",
"component_type": "SERVICE"
},
{
"component_name": "sample-php",
"instance_name": "sample-php-767c6b49c4-z8dll",
"instance_alias": "sample-php-1",
"component_type": "SERVICE"
}
]
}
See /v2/apps/{app_id}/instances in the API reference for additional detail on responses, headers, parameters, and more.