Stop a progressive rollout

POST https://api.ap1.datadoghq.com/api/v2/feature-flags/exposure-schedules/{exposure_schedule_id}/stophttps://api.ap2.datadoghq.com/api/v2/feature-flags/exposure-schedules/{exposure_schedule_id}/stophttps://api.datadoghq.eu/api/v2/feature-flags/exposure-schedules/{exposure_schedule_id}/stophttps://api.ddog-gov.com/api/v2/feature-flags/exposure-schedules/{exposure_schedule_id}/stophttps://api.us2.ddog-gov.com/api/v2/feature-flags/exposure-schedules/{exposure_schedule_id}/stophttps://api.datadoghq.com/api/v2/feature-flags/exposure-schedules/{exposure_schedule_id}/stophttps://api.us3.datadoghq.com/api/v2/feature-flags/exposure-schedules/{exposure_schedule_id}/stophttps://api.us5.datadoghq.com/api/v2/feature-flags/exposure-schedules/{exposure_schedule_id}/stop

Overview

Stops a progressive rollout and marks it as aborted. This endpoint requires the feature_flag_config_write permission.

Arguments

Path Parameters

Name

Type

Description

exposure_schedule_id [required]

string

The ID of the exposure schedule.

Response

OK

Response containing a progressive rollout schedule.

Expand All

Field

Type

Description

data [required]

object

Data wrapper for progressive rollout schedule responses.

attributes [required]

object

Progressive release details for a targeting rule allocation.

absolute_start_time

date-time

The absolute UTC start time for this schedule.

allocation_id [required]

uuid

The targeting rule allocation ID this progressive rollout belongs to.

control_variant_id

string

The control variant ID used for experiment comparisons.

created_at [required]

date-time

The timestamp when the schedule was created.

guardrail_triggered_action

string

Last guardrail action triggered for this schedule.

guardrail_triggers [required]

[object]

Guardrail trigger records for this schedule.

allocation_exposure_schedule_id [required]

uuid

The progressive rollout ID this trigger belongs to.

created_at [required]

date-time

The timestamp when this trigger was created.

flagging_variant_id [required]

uuid

The variant ID that triggered this event.

id [required]

uuid

The unique identifier of the guardrail trigger.

metric_id [required]

string

The metric ID associated with the trigger.

triggered_action [required]

string

The action that was triggered.

updated_at [required]

date-time

The timestamp when this trigger was last updated.

id

uuid

The unique identifier of the progressive rollout.

rollout_options [required]

object

Applied progression options for a progressive rollout.

autostart [required]

boolean

Whether the schedule starts automatically.

selection_interval_ms [required]

int64

Interval in milliseconds for uniform interval strategies.

strategy [required]

enum

The progression strategy used by a progressive rollout. Allowed enum values: UNIFORM_INTERVALS,NO_ROLLOUT

rollout_steps [required]

[object]

Ordered progression steps for exposure.

allocation_exposure_schedule_id [required]

uuid

The progressive rollout ID this step belongs to.

created_at [required]

date-time

The timestamp when the progression step was created.

exposure_ratio [required]

double

The exposure ratio for this step.

grouped_step_index [required]

int64

Logical index grouping related steps.

id [required]

uuid

The unique identifier of the progression step.

interval_ms

int64

Step duration in milliseconds.

is_pause_record [required]

boolean

Whether this step represents a pause record.

order_position [required]

int64

Sort order for the progression step.

updated_at [required]

date-time

The timestamp when the progression step was last updated.

updated_at [required]

date-time

The timestamp when the schedule was last updated.

id [required]

uuid

The unique identifier of the progressive rollout.

type [required]

enum

The resource type for progressive rollout schedules. Allowed enum values: allocation_exposure_schedules

{
  "data": {
    "attributes": {
      "absolute_start_time": "2025-06-13T12:00:00Z",
      "allocation_id": "550e8400-e29b-41d4-a716-446655440020",
      "control_variant_id": "550e8400-e29b-41d4-a716-446655440012",
      "created_at": "2024-01-01T12:00:00Z",
      "guardrail_triggered_action": "PAUSE",
      "guardrail_triggers": [
        {
          "allocation_exposure_schedule_id": "550e8400-e29b-41d4-a716-446655440010",
          "created_at": "2024-01-01T12:00:00Z",
          "flagging_variant_id": "550e8400-e29b-41d4-a716-446655440001",
          "id": "550e8400-e29b-41d4-a716-446655440080",
          "metric_id": "metric-error-rate",
          "triggered_action": "PAUSE",
          "updated_at": "2024-01-01T12:00:00Z"
        }
      ],
      "id": "550e8400-e29b-41d4-a716-446655440010",
      "rollout_options": {
        "autostart": false,
        "selection_interval_ms": 3600000,
        "strategy": "UNIFORM_INTERVALS"
      },
      "rollout_steps": [
        {
          "allocation_exposure_schedule_id": "550e8400-e29b-41d4-a716-446655440010",
          "created_at": "2024-01-01T12:00:00Z",
          "exposure_ratio": 0.1,
          "grouped_step_index": 0,
          "id": "550e8400-e29b-41d4-a716-446655440040",
          "interval_ms": 3600000,
          "is_pause_record": false,
          "order_position": 0,
          "updated_at": "2024-01-01T12:00:00Z"
        }
      ],
      "updated_at": "2024-01-01T12:00:00Z"
    },
    "id": "550e8400-e29b-41d4-a716-446655440010",
    "type": "allocation_exposure_schedules"
  }
}

Bad Request

API error response.

Expand All

Field

Type

Description

errors [required]

[string]

A list of errors.

{
  "errors": [
    "Bad Request"
  ]
}

Forbidden

API error response.

Expand All

Field

Type

Description

errors [required]

[string]

A list of errors.

{
  "errors": [
    "Bad Request"
  ]
}

Not Found

API error response.

Expand All

Field

Type

Description

errors [required]

[string]

A list of errors.

{
  "errors": [
    "Bad Request"
  ]
}

Conflict

API error response.

Expand All

Field

Type

Description

errors [required]

[string]

A list of errors.

{
  "errors": [
    "Bad Request"
  ]
}

Too many requests

API error response.

Expand All

Field

Type

Description

errors [required]

[string]

A list of errors.

{
  "errors": [
    "Bad Request"
  ]
}

Code Example

                  # Path parameters
export exposure_schedule_id="550e8400-e29b-41d4-a716-446655440010"
# Curl command
curl -X POST "https://api.ap1.datadoghq.com"https://api.ap2.datadoghq.com"https://api.datadoghq.eu"https://api.ddog-gov.com"https://api.us2.ddog-gov.com"https://api.datadoghq.com"https://api.us3.datadoghq.com"https://api.us5.datadoghq.com/api/v2/feature-flags/exposure-schedules/${exposure_schedule_id}/stop" \ -H "Accept: application/json" \ -H "DD-API-KEY: ${DD_API_KEY}" \ -H "DD-APPLICATION-KEY: ${DD_APP_KEY}"
"""
Stop a progressive rollout returns "OK" response
"""

from datadog_api_client import ApiClient, Configuration
from datadog_api_client.v2.api.feature_flags_api import FeatureFlagsApi
from uuid import UUID

configuration = Configuration()
with ApiClient(configuration) as api_client:
    api_instance = FeatureFlagsApi(api_client)
    response = api_instance.stop_exposure_schedule(
        exposure_schedule_id=UUID("550e8400-e29b-41d4-a716-446655440010"),
    )

    print(response)

Instructions

First install the library and its dependencies and then save the example to example.py and run following commands:

    
DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.comus2.ddog-gov.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" python3 "example.py"
# Stop a progressive rollout returns "OK" response

require "datadog_api_client"
api_instance = DatadogAPIClient::V2::FeatureFlagsAPI.new
p api_instance.stop_exposure_schedule("550e8400-e29b-41d4-a716-446655440010")

Instructions

First install the library and its dependencies and then save the example to example.rb and run following commands:

    
DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.comus2.ddog-gov.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" rb "example.rb"
// Stop a progressive rollout returns "OK" response

package main

import (
	"context"
	"encoding/json"
	"fmt"
	"os"

	"github.com/DataDog/datadog-api-client-go/v2/api/datadog"
	"github.com/DataDog/datadog-api-client-go/v2/api/datadogV2"
	"github.com/google/uuid"
)

func main() {
	ctx := datadog.NewDefaultContext(context.Background())
	configuration := datadog.NewConfiguration()
	apiClient := datadog.NewAPIClient(configuration)
	api := datadogV2.NewFeatureFlagsApi(apiClient)
	resp, r, err := api.StopExposureSchedule(ctx, uuid.MustParse("550e8400-e29b-41d4-a716-446655440010"))

	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `FeatureFlagsApi.StopExposureSchedule`: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}

	responseContent, _ := json.MarshalIndent(resp, "", "  ")
	fmt.Fprintf(os.Stdout, "Response from `FeatureFlagsApi.StopExposureSchedule`:\n%s\n", responseContent)
}

Instructions

First install the library and its dependencies and then save the example to main.go and run following commands:

    
DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.comus2.ddog-gov.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" go run "main.go"
// Stop a progressive rollout returns "OK" response

import com.datadog.api.client.ApiClient;
import com.datadog.api.client.ApiException;
import com.datadog.api.client.v2.api.FeatureFlagsApi;
import com.datadog.api.client.v2.model.AllocationExposureScheduleResponse;
import java.util.UUID;

public class Example {
  public static void main(String[] args) {
    ApiClient defaultClient = ApiClient.getDefaultApiClient();
    FeatureFlagsApi apiInstance = new FeatureFlagsApi(defaultClient);

    try {
      AllocationExposureScheduleResponse result =
          apiInstance.stopExposureSchedule(UUID.fromString("550e8400-e29b-41d4-a716-446655440010"));
      System.out.println(result);
    } catch (ApiException e) {
      System.err.println("Exception when calling FeatureFlagsApi#stopExposureSchedule");
      System.err.println("Status code: " + e.getCode());
      System.err.println("Reason: " + e.getResponseBody());
      System.err.println("Response headers: " + e.getResponseHeaders());
      e.printStackTrace();
    }
  }
}

Instructions

First install the library and its dependencies and then save the example to Example.java and run following commands:

    
DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.comus2.ddog-gov.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" java "Example.java"
// Stop a progressive rollout returns "OK" response
use datadog_api_client::datadog;
use datadog_api_client::datadogV2::api_feature_flags::FeatureFlagsAPI;
use uuid::Uuid;

#[tokio::main]
async fn main() {
    let configuration = datadog::Configuration::new();
    let api = FeatureFlagsAPI::with_config(configuration);
    let resp = api
        .stop_exposure_schedule(
            Uuid::parse_str("550e8400-e29b-41d4-a716-446655440010").expect("invalid UUID"),
        )
        .await;
    if let Ok(value) = resp {
        println!("{:#?}", value);
    } else {
        println!("{:#?}", resp.unwrap_err());
    }
}

Instructions

First install the library and its dependencies and then save the example to src/main.rs and run following commands:

    
DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.comus2.ddog-gov.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" cargo run
/**
 * Stop a progressive rollout returns "OK" response
 */

import { client, v2 } from "@datadog/datadog-api-client";

const configuration = client.createConfiguration();
const apiInstance = new v2.FeatureFlagsApi(configuration);

const params: v2.FeatureFlagsApiStopExposureScheduleRequest = {
  exposureScheduleId: "550e8400-e29b-41d4-a716-446655440010",
};

apiInstance
  .stopExposureSchedule(params)
  .then((data: v2.AllocationExposureScheduleResponse) => {
    console.log(
      "API called successfully. Returned data: " + JSON.stringify(data)
    );
  })
  .catch((error: any) => console.error(error));

Instructions

First install the library and its dependencies and then save the example to example.ts and run following commands:

    
DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.comus2.ddog-gov.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" tsc "example.ts"