dots.v1.consent.byEnvironment_id().put()

Generated on 13 Nov 2026 from DoTs version v1.24.0

Usage

client.v1.consent.byEnvironment_id(environment_id).put(body: WithEnvironment_PutRequestBody, requestConfiguration?: RequestConfiguration<object>): Promise<undefined | WithEnvironment_PutResponse>

Description

To enable or disable signals collection for a specific environment, send a PUT request to /v1/consent/{environment_id} with an enabled boolean in the request body.

This endpoint only manages per-environment (source: agent) consent. To manage team-level consent for Serverless Inference, use PUT /v1/consent?source=inference instead.

Parameters

Path Parameters

environment_id string required

Example: 019fb3d2-8a56-72cc-8bf9-9d21510b2a99

A unique identifier for an environment. For Harness Runtime, this is the Environment Config ID. Formerly named agent_id.

Request Body

enabled boolean required

Whether to enable signals collection for this environment.

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.v1.consent
    .byEnvironment_id("019fb3d2-8a56-72cc-8bf9-9d21510b2a99").put({
    enabled: true,
});

Response Example

Show Response Example
{
  "consent": {
    "id": 13,
    "team_id": 39449946,
    "source": "agent",
    "agent_id": "019fb3d2-8a56-72cc-8bf9-9d21510b2a99",
    "environment_id": "019fb3d2-8a56-72cc-8bf9-9d21510b2a99",
    "enabled": true,
    "updated_at": "2026-10-07T11:06:32.280572Z"
  }
}

More Information

See /v1/consent/{environment_id} 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.