Returns organizations across regions for the authenticated user. The user_handle query parameter must match the authenticated user’s handle.
This endpoint requires the user_access_read permission.
OAuth apps require the user_access_read authorization scope to access this endpoint.
Arguments
Query Strings
Name
Type
Description
user_handle [required]
string
The handle of the authenticated user.
page[limit]
integer
Maximum number of results returned.
page[cursor]
string
String to query the next page of results.
This key is provided with each valid response from the API in meta.page.next_cursor.
"""
List global orgs returns "OK" response
"""fromdatadog_api_clientimportApiClient,Configurationfromdatadog_api_client.v2.api.organizations_apiimportOrganizationsApiconfiguration=Configuration()withApiClient(configuration)asapi_client:api_instance=OrganizationsApi(api_client)response=api_instance.list_global_orgs(user_handle="[email protected]",)print(response)
# List global orgs returns "OK" responserequire"datadog_api_client"api_instance=DatadogAPIClient::V2::OrganizationsAPI.newpapi_instance.list_global_orgs("[email protected]")
// List global orgs 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())configuration:=datadog.NewConfiguration()apiClient:=datadog.NewAPIClient(configuration)api:=datadogV2.NewOrganizationsApi(apiClient)resp,r,err:=api.ListGlobalOrgs(ctx,"[email protected]",*datadogV2.NewListGlobalOrgsOptionalParameters())iferr!=nil{fmt.Fprintf(os.Stderr,"Error when calling `OrganizationsApi.ListGlobalOrgs`: %v\n",err)fmt.Fprintf(os.Stderr,"Full HTTP response: %v\n",r)}responseContent,_:=json.MarshalIndent(resp,""," ")fmt.Fprintf(os.Stdout,"Response from `OrganizationsApi.ListGlobalOrgs`:\n%s\n",responseContent)}
// List global orgs returns "OK" response
usedatadog_api_client::datadog;usedatadog_api_client::datadogV2::api_organizations::ListGlobalOrgsOptionalParams;usedatadog_api_client::datadogV2::api_organizations::OrganizationsAPI;#[tokio::main]asyncfnmain(){letconfiguration=datadog::Configuration::new();letapi=OrganizationsAPI::with_config(configuration);letresp=api.list_global_orgs("[email protected]".to_string(),ListGlobalOrgsOptionalParams::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 global orgs returns "OK" response
*/import{client,v2}from"@datadog/datadog-api-client";constconfiguration=client.createConfiguration();constapiInstance=newv2.OrganizationsApi(configuration);constparams: v2.OrganizationsApiListGlobalOrgsRequest={userHandle:"[email protected]",};apiInstance.listGlobalOrgs(params).then((data: v2.GlobalOrgsResponse)=>{console.log("API called successfully. Returned data: "+JSON.stringify(data));}).catch((error: any)=>console.error(error));