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.droplets.byDroplet_id(droplet_id).backups.policy.get(requestConfiguration?: RequestConfiguration<object>): Promise<undefined | PolicyGetResponse>
Description
To show information about an individual Droplet’s backup policy, send a GET
request to /v2/droplets/{droplet_id}/backups/policy.
Parameters
droplet_id integer required
Example: 3164444
A unique identifier for a Droplet instance.
Min: 1
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.droplets
.byDroplet_id(3164444).backups.policy.get();
Response Example
Show Response Example
{
"policy": {
"droplet_id": 444909706,
"backup_enabled": true,
"backup_policy": {
"plan": "weekly",
"weekday": "SUN",
"hour": 20,
"window_length_hours": 4,
"retention_period_days": 28
},
"next_backup_window": {
"start": "2024-09-15T20:00:00Z",
"end": "2024-09-16T00:00:00Z"
}
}
}
See /v2/droplets/{droplet_id}/backups/policy in the API reference for additional detail on responses, headers, parameters, and more.