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.insights.resources.byResource_urn(resource_urn).get(requestConfiguration?: RequestConfiguration<object>): Promise<undefined | Resource_response>
Description
To retrieve the current metrics, logs, and traces signal enablement for a
single resource, send a GET request to
/v2/insights/resources/{resource_urn}.
A 404 is returned when no signal enablement has been recorded for the
resource.
Parameters
resource_urn string required
Example: do:droplet:12345
The uniform resource name (URN) of the resource, for example do:droplet:12345.
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.insights.resources
.byResource_urn("do:droplet:12345").get();
Response Example
Show Response Example
{
"resource": {
"resource_urn": "do:droplet:12345",
"product_type": "droplet",
"region": "nyc3",
"metrics": {
"enabled": true,
"effective_at": "2026-10-01T12:00:00Z"
},
"logs": {
"enabled": true,
"effective_at": "2026-10-01T12:00:00Z"
},
"traces": {
"enabled": false,
"effective_at": "2026-10-03T08:30:00Z"
}
}
}
See /v2/insights/resources/{resource_urn} in the API reference for additional detail on responses, headers, parameters, and more.