provider Feature Flags POST /api/v2/feature-flags/{feature_flag_id}/environments/{environment_id}/allocations
@utdk/datadog /api/v2/feature-flags/{feature_flag_id}/environments/{environment_id}/allocations
Create targeting rules for a flag env
Creates a new targeting rule (allocation) for a specific feature flag in a specific environment.
feature_flag_id path required
The ID of the feature flag.
string
environment_id path required
The ID of the environment.
string

Try it

Authentication
Configure credentials for Datadog API V2 Collection
Gateway
The gateway proxies requests and injects credentials server-side. Configure credentials above, then enter your gateway URL.

Saved automatically to browser storage.

createallocationsforfeatureflaginenvironment
POST/api/v2/feature-flags/{feature_flag_id}/environments/{environment_id}/allocations
Creates a new targeting rule (allocation) for a specific feature flag in a specific environment.

Parameters

required

The ID of the feature flag.

required

The ID of the environment.

Input

required

Data wrapper for allocation request payloads.

Enter a gateway URL above to enable sending.

Code snippet
Updates live as you fill in the form above.

TypeScript

import datadog from '@utdk/datadog';

await datadog.createallocationsforfeatureflaginenvironment()