Returns a paginated list of all deployment gates for the organization.
Use page[cursor] and page[size] query parameters to paginate through results.
This endpoint requires the deployment_gates_read permission.
Arguments
Query Strings
Name
Type
Description
page[cursor]
string
Cursor for pagination. Use the meta.page.next_cursor value from the previous response.
page[size]
integer
Number of results per page. Defaults to 50. Must be between 1 and 1000.
"""
Get all deployment gates returns "OK" response
"""fromosimportenvironfromdatadog_api_clientimportApiClient,Configurationfromdatadog_api_client.v2.api.deployment_gates_apiimportDeploymentGatesApiconfiguration=Configuration()configuration.access_token=environ["DD_BEARER_TOKEN"]configuration.unstable_operations["list_deployment_gates"]=TruewithApiClient(configuration)asapi_client:api_instance=DeploymentGatesApi(api_client)response=api_instance.list_deployment_gates()print(response)
DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comuk1.datadoghq.comddog-gov.comus2.ddog-gov.com"DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"python3"example.py"
# Get all deployment gates returns "OK" responserequire"datadog_api_client"DatadogAPIClient.configuredo|config|config.access_token=ENV["DD_BEARER_TOKEN"]config.unstable_operations["v2.list_deployment_gates".to_sym]=trueendapi_instance=DatadogAPIClient::V2::DeploymentGatesAPI.newpapi_instance.list_deployment_gates()
DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comuk1.datadoghq.comddog-gov.comus2.ddog-gov.com"DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"rb"example.rb"
// Get all deployment gates returns "OK" responsepackagemainimport("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")funcmain(){ctx:=datadog.NewDefaultContext(context.Background())ctx=context.WithValue(ctx,datadog.ContextAccessToken,os.Getenv("DD_BEARER_TOKEN"))configuration:=datadog.NewConfiguration()configuration.SetUnstableOperationEnabled("v2.ListDeploymentGates",true)apiClient:=datadog.NewAPIClient(configuration)api:=datadogV2.NewDeploymentGatesApi(apiClient)resp,r,err:=api.ListDeploymentGates(ctx,*datadogV2.NewListDeploymentGatesOptionalParameters())iferr!=nil{fmt.Fprintf(os.Stderr,"Error when calling `DeploymentGatesApi.ListDeploymentGates`: %v\n",err)fmt.Fprintf(os.Stderr,"Full HTTP response: %v\n",r)}responseContent,_:=json.MarshalIndent(resp,""," ")fmt.Fprintf(os.Stdout,"Response from `DeploymentGatesApi.ListDeploymentGates`:\n%s\n",responseContent)}
DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comuk1.datadoghq.comddog-gov.comus2.ddog-gov.com"DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"go run"main.go"
// Get all deployment gates returns "OK" responseimportcom.datadog.api.client.ApiClient;importcom.datadog.api.client.ApiException;importcom.datadog.api.client.v2.api.DeploymentGatesApi;importcom.datadog.api.client.v2.model.DeploymentGatesListResponse;publicclassExample{publicstaticvoidmain(String[]args){ApiClientdefaultClient=ApiClient.getDefaultApiClient();defaultClient.setAccessToken(System.getenv("DD_BEARER_TOKEN"));defaultClient.setUnstableOperationEnabled("v2.listDeploymentGates",true);DeploymentGatesApiapiInstance=newDeploymentGatesApi(defaultClient);try{DeploymentGatesListResponseresult=apiInstance.listDeploymentGates();System.out.println(result);}catch(ApiExceptione){System.err.println("Exception when calling DeploymentGatesApi#listDeploymentGates");System.err.println("Status code: "+e.getCode());System.err.println("Reason: "+e.getResponseBody());System.err.println("Response headers: "+e.getResponseHeaders());e.printStackTrace();}}}
DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comuk1.datadoghq.comddog-gov.comus2.ddog-gov.com"DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"java"Example.java"
// Get all deployment gates returns "OK" response
usedatadog_api_client::datadog;usedatadog_api_client::datadogV2::api_deployment_gates::DeploymentGatesAPI;usedatadog_api_client::datadogV2::api_deployment_gates::ListDeploymentGatesOptionalParams;#[tokio::main]asyncfnmain(){letmutconfiguration=datadog::Configuration::new();configuration.set_unstable_operation_enabled("v2.ListDeploymentGates",true);letapi=DeploymentGatesAPI::with_config(configuration);letresp=api.list_deployment_gates(ListDeploymentGatesOptionalParams::default()).await;ifletOk(value)=resp{println!("{:#?}",value);}else{println!("{:#?}",resp.unwrap_err());}}
DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comuk1.datadoghq.comddog-gov.comus2.ddog-gov.com"DD_API_KEY="<DD_API_KEY>"DD_APP_KEY="<DD_APP_KEY>"cargo run
/**
* Get all deployment gates returns "OK" response
*/import{client,v2}from"@datadog/datadog-api-client";constconfiguration=client.createConfiguration({authMethods:{AuthZ:{accessToken: process.env.DD_BEARER_TOKENasstring,},},});configuration.unstableOperations["v2.listDeploymentGates"]=true;constapiInstance=newv2.DeploymentGatesApi(configuration);apiInstance.listDeploymentGates().then((data: v2.DeploymentGatesListResponse)=>{console.log("API called successfully. Returned data: "+JSON.stringify(data));}).catch((error: any)=>console.error(error));
DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comuk1.datadoghq.comddog-gov.comus2.ddog-gov.com"DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"tsc"example.ts"
Request a personalized demo
Get Started with Datadog
Ask AI
AI-generated responses may be inaccurate. Verify important info.