dots.v2.actionGateway.sessions.bySession_urn().delete()

Generated on 13 Nov 2026 from DoTs version v1.24.0

deprecated

Usage

client.v2.actionGateway.sessions.bySession_urn(session_urn).delete(requestConfiguration?: RequestConfiguration<object>): Promise<undefined | Empty_response>

Description

Deprecated: use DELETE /v2/action-gateway/endpoints/{endpoint_id} for endpoints. This route continues to accept legacy session URNs and delete legacy sessions. Deletes the session and its policy. Succeeds without deleting anything when the session does not exist or you cannot delete it, so repeating a delete also succeeds. A malformed session_urn is rejected with 400. When the session is a version of an endpoint, this deletes that version, and deleting the endpoint’s last live version also deletes the endpoint. Deleting the last live version with DELETE /v2/action-gateway/endpoint-versions/{version_id} instead keeps the endpoint, with no live version.

Parameters

session_urn string required

Example: do:managed_agent_session:2b3c9f0e-1a4d-4e5f-8a7b-6c5d4e3f2a1b

URN of the session, for example do:managed_agent_session:<uuid>.

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.actionGateway.sessions
    .bySession_urn("do:managed_agent_session:2b3c9f0e-1a4d-4e5f-8a7b-6c5d4e3f2a1b").delete();

Response Example

Show Response Example
{}

More Information

See /v2/action-gateway/sessions/{session_urn} 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.