Retrieve a list of On-Call schedules.
This endpoint requires the on_call_read permission.
인수
쿼리 문자열
이름
유형
설명
page[size]
integer
Number of items to return per page. The maximum allowed value is 100.
page[number]
integer
Specific page number to return.
filter[query]
string
Search query to filter schedules. Supports free-text search on schedule name (case-insensitive, * wildcards), and structured filters such as team.id:<uuid> and user.id:<uuid> (multiple values can be combined with OR, e.g. user.id:(<uuid> OR <uuid>)).
include
string
Comma-separated list of included relationships to be returned. Allowed value: teams.
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"
# List On-Call schedules returns "OK" responserequire"datadog_api_client"DatadogAPIClient.configuredo|config|config.access_token=ENV["DD_BEARER_TOKEN"]endapi_instance=DatadogAPIClient::V2::OnCallAPI.newpapi_instance.list_on_call_schedules()
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"
// List On-Call schedules 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()apiClient:=datadog.NewAPIClient(configuration)api:=datadogV2.NewOnCallApi(apiClient)resp,r,err:=api.ListOnCallSchedules(ctx,*datadogV2.NewListOnCallSchedulesOptionalParameters())iferr!=nil{fmt.Fprintf(os.Stderr,"Error when calling `OnCallApi.ListOnCallSchedules`: %v\n",err)fmt.Fprintf(os.Stderr,"Full HTTP response: %v\n",r)}responseContent,_:=json.MarshalIndent(resp,""," ")fmt.Fprintf(os.Stdout,"Response from `OnCallApi.ListOnCallSchedules`:\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"
// List On-Call schedules returns "OK" responseimportcom.datadog.api.client.ApiClient;importcom.datadog.api.client.ApiException;importcom.datadog.api.client.v2.api.OnCallApi;importcom.datadog.api.client.v2.model.Schedules;publicclassExample{publicstaticvoidmain(String[]args){ApiClientdefaultClient=ApiClient.getDefaultApiClient();defaultClient.setAccessToken(System.getenv("DD_BEARER_TOKEN"));OnCallApiapiInstance=newOnCallApi(defaultClient);try{Schedulesresult=apiInstance.listOnCallSchedules();System.out.println(result);}catch(ApiExceptione){System.err.println("Exception when calling OnCallApi#listOnCallSchedules");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"
// List On-Call schedules returns "OK" response
usedatadog_api_client::datadog;usedatadog_api_client::datadogV2::api_on_call::ListOnCallSchedulesOptionalParams;usedatadog_api_client::datadogV2::api_on_call::OnCallAPI;#[tokio::main]asyncfnmain(){letconfiguration=datadog::Configuration::new();letapi=OnCallAPI::with_config(configuration);letresp=api.list_on_call_schedules(ListOnCallSchedulesOptionalParams::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
/**
* List On-Call schedules returns "OK" response
*/import{client,v2}from"@datadog/datadog-api-client";constconfiguration=client.createConfiguration({authMethods:{AuthZ:{accessToken: process.env.DD_BEARER_TOKENasstring,},},});constapiInstance=newv2.OnCallApi(configuration);apiInstance.listOnCallSchedules().then((data: v2.Schedules)=>{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"
맞춤형 데모 요청
Datadog 시작하기
Ask AI
AI-generated responses may be inaccurate. Verify important info.