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).alerts.get(requestConfiguration?: RequestConfiguration<object>): Promise<undefined | Apps_list_alerts_response>
Description
List alerts associated to the app and any components. This includes configuration information about the alerts including emails, slack webhooks, and triggering events or conditions.
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").alerts.get();
Response Example
Show Response Example
{
"alerts": [
{
"id": "e552e1f9-c1b0-4e6d-8777-ad6f27767306",
"spec": {
"rule": "DEPLOYMENT_FAILED"
},
"emails": [
"[email protected]"
],
"phase": "ACTIVE",
"progress": {
"steps": [
{
"name": "alert-configure-insight-alert",
"status": "SUCCESS",
"started_at": "2020-07-28T18:00:00Z",
"ended_at": "2020-07-28T18:00:00Z"
}
]
}
},
{
"id": "b58cc9d4-0702-4ffd-ab45-4c2a8d979527",
"spec": {
"rule": "CPU_UTILIZATION",
"operator": "GREATER_THAN",
"value": 85,
"window": "FIVE_MINUTES"
},
"emails": [
"[email protected]"
],
"phase": "ACTIVE",
"progress": {
"steps": [
{
"name": "alert-configure-insight-alert",
"status": "SUCCESS",
"started_at": "2020-07-28T18:00:00Z",
"ended_at": "2020-07-28T18:00:00Z"
}
]
}
}
]
}
See /v2/apps/{app_id}/alerts in the API reference for additional detail on responses, headers, parameters, and more.