This page is not yet available in Spanish. We are working on its translation. If you have any questions or feedback about our current translation project, feel free to reach out to us!
Una vez creada la nueva organización secundaria, puedes interactuar con ella
utilizando org.public_id, api_key.key y
application_key.hash proporcionados en la respuesta.
This endpoint requires the org_management permission.
The type of billing. Only parent_billing is supported.
created
string
Date of the organization creation.
description
string
Description of the organization.
name
string
The name of the child organization, limited to 32 characters.
public_id
string
The public_id of the organization you are operating within.
settings
object
A JSON array of settings.
private_widget_share
boolean
Whether or not the organization users can share widgets outside of Datadog.
saml
object
Set the boolean property enabled to enable or disable single sign on with SAML.
See the SAML documentation for more information about all SAML settings.
enabled
boolean
Whether or not SAML is enabled for this organization.
saml_autocreate_access_role
enum
The access role of the user. Options are st (standard user), adm (admin user), or ro (read-only user).
Allowed enum values: st,adm,ro,ERROR
saml_autocreate_users_domains
object
Has two properties, enabled (boolean) and domains, which is a list of domains without the @ symbol.
domains
[string]
List of domains where the SAML automated user creation is enabled.
enabled
boolean
Whether or not the automated user creation based on SAML domain is enabled.
saml_can_be_enabled
boolean
Whether or not SAML can be enabled for this organization.
saml_idp_endpoint
string
Identity provider endpoint for SAML authentication.
saml_idp_initiated_login
object
Has one property enabled (boolean).
enabled
boolean
Whether SAML IdP initiated login is enabled, learn more
in the SAML documentation.
saml_idp_metadata_uploaded
boolean
Whether or not a SAML identity provider metadata file was provided to the Datadog organization.
saml_login_url
string
URL for SAML logging.
saml_strict_mode
object
Has one property enabled (boolean).
enabled
boolean
Whether or not the SAML strict mode is enabled. If true, all users must log in with SAML.
Learn more on the SAML Strict documentation.
subscription
object
DEPRECATED: Subscription definition.
type
string
The subscription type. Types available are trial, free, and pro.
trial
boolean
Only available for MSP customers. Allows child organizations to be created on a trial plan.
user
object
Create, edit, and disable users.
access_role
enum
The access role of the user. Options are st (standard user), adm (admin user), or ro (read-only user).
Allowed enum values: st,adm,ro,ERROR
disabled
boolean
The new disabled status of the user.
email
string
The new email of the user.
handle
string
The user handle, must be a valid email.
icon
string
Gravatar icon associated to the user.
name
string
The name of the user.
verified
boolean
Whether or not the user logged in Datadog at least once.
DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comddog-gov.com"DD_API_KEY="<API-KEY>"DD_APP_KEY="<APP-KEY>"cargo run
/**
* Create a child organization returns "OK" response
*/import{client,v1}from"@datadog/datadog-api-client";constconfiguration=client.createConfiguration();constapiInstance=newv1.OrganizationsApi(configuration);constparams: v1.OrganizationsApiCreateChildOrgRequest={body:{billing:{type:"parent_billing",},name:"New child org",subscription:{type:"pro",},},};apiInstance.createChildOrg(params).then((data: v1.OrganizationCreateResponse)=>{console.log("API called successfully. Returned data: "+JSON.stringify(data));}).catch((error: any)=>console.error(error));
The type of billing. Only parent_billing is supported.
created
string
Date of the organization creation.
description
string
Description of the organization.
name
string
The name of the child organization, limited to 32 characters.
public_id
string
The public_id of the organization you are operating within.
settings
object
A JSON array of settings.
private_widget_share
boolean
Whether or not the organization users can share widgets outside of Datadog.
saml
object
Set the boolean property enabled to enable or disable single sign on with SAML.
See the SAML documentation for more information about all SAML settings.
enabled
boolean
Whether or not SAML is enabled for this organization.
saml_autocreate_access_role
enum
The access role of the user. Options are st (standard user), adm (admin user), or ro (read-only user).
Allowed enum values: st,adm,ro,ERROR
saml_autocreate_users_domains
object
Has two properties, enabled (boolean) and domains, which is a list of domains without the @ symbol.
domains
[string]
List of domains where the SAML automated user creation is enabled.
enabled
boolean
Whether or not the automated user creation based on SAML domain is enabled.
saml_can_be_enabled
boolean
Whether or not SAML can be enabled for this organization.
saml_idp_endpoint
string
Identity provider endpoint for SAML authentication.
saml_idp_initiated_login
object
Has one property enabled (boolean).
enabled
boolean
Whether SAML IdP initiated login is enabled, learn more
in the SAML documentation.
saml_idp_metadata_uploaded
boolean
Whether or not a SAML identity provider metadata file was provided to the Datadog organization.
saml_login_url
string
URL for SAML logging.
saml_strict_mode
object
Has one property enabled (boolean).
enabled
boolean
Whether or not the SAML strict mode is enabled. If true, all users must log in with SAML.
Learn more on the SAML Strict documentation.
subscription
object
DEPRECATED: Subscription definition.
type
string
The subscription type. Types available are trial, free, and pro.
trial
boolean
Only available for MSP customers. Allows child organizations to be created on a trial plan.
"""
List your managed organizations returns "OK" response
"""fromdatadog_api_clientimportApiClient,Configurationfromdatadog_api_client.v1.api.organizations_apiimportOrganizationsApiconfiguration=Configuration()withApiClient(configuration)asapi_client:api_instance=OrganizationsApi(api_client)response=api_instance.list_orgs()print(response)
# List your managed organizations returns "OK" responserequire"datadog_api_client"api_instance=DatadogAPIClient::V1::OrganizationsAPI.newpapi_instance.list_orgs()
// List your managed organizations returns "OK" response
packagemainimport("context""encoding/json""fmt""os""github.com/DataDog/datadog-api-client-go/v2/api/datadog""github.com/DataDog/datadog-api-client-go/v2/api/datadogV1")funcmain(){ctx:=datadog.NewDefaultContext(context.Background())configuration:=datadog.NewConfiguration()apiClient:=datadog.NewAPIClient(configuration)api:=datadogV1.NewOrganizationsApi(apiClient)resp,r,err:=api.ListOrgs(ctx)iferr!=nil{fmt.Fprintf(os.Stderr,"Error when calling `OrganizationsApi.ListOrgs`: %v\n",err)fmt.Fprintf(os.Stderr,"Full HTTP response: %v\n",r)}responseContent,_:=json.MarshalIndent(resp,""," ")fmt.Fprintf(os.Stdout,"Response from `OrganizationsApi.ListOrgs`:\n%s\n",responseContent)}
// List your managed organizations returns "OK" response
usedatadog_api_client::datadog;usedatadog_api_client::datadogV1::api_organizations::OrganizationsAPI;#[tokio::main]asyncfnmain(){letconfiguration=datadog::Configuration::new();letapi=OrganizationsAPI::with_config(configuration);letresp=api.list_orgs().await;ifletOk(value)=resp{println!("{:#?}",value);}else{println!("{:#?}",resp.unwrap_err());}}
DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comddog-gov.com"DD_API_KEY="<API-KEY>"DD_APP_KEY="<APP-KEY>"cargo run
/**
* List your managed organizations returns "OK" response
*/import{client,v1}from"@datadog/datadog-api-client";constconfiguration=client.createConfiguration();constapiInstance=newv1.OrganizationsApi(configuration);apiInstance.listOrgs().then((data: v1.OrganizationListResponse)=>{console.log("API called successfully. Returned data: "+JSON.stringify(data));}).catch((error: any)=>console.error(error));
The type of billing. Only parent_billing is supported.
created
string
Date of the organization creation.
description
string
Description of the organization.
name
string
The name of the child organization, limited to 32 characters.
public_id
string
The public_id of the organization you are operating within.
settings
object
A JSON array of settings.
private_widget_share
boolean
Whether or not the organization users can share widgets outside of Datadog.
saml
object
Set the boolean property enabled to enable or disable single sign on with SAML.
See the SAML documentation for more information about all SAML settings.
enabled
boolean
Whether or not SAML is enabled for this organization.
saml_autocreate_access_role
enum
The access role of the user. Options are st (standard user), adm (admin user), or ro (read-only user).
Allowed enum values: st,adm,ro,ERROR
saml_autocreate_users_domains
object
Has two properties, enabled (boolean) and domains, which is a list of domains without the @ symbol.
domains
[string]
List of domains where the SAML automated user creation is enabled.
enabled
boolean
Whether or not the automated user creation based on SAML domain is enabled.
saml_can_be_enabled
boolean
Whether or not SAML can be enabled for this organization.
saml_idp_endpoint
string
Identity provider endpoint for SAML authentication.
saml_idp_initiated_login
object
Has one property enabled (boolean).
enabled
boolean
Whether SAML IdP initiated login is enabled, learn more
in the SAML documentation.
saml_idp_metadata_uploaded
boolean
Whether or not a SAML identity provider metadata file was provided to the Datadog organization.
saml_login_url
string
URL for SAML logging.
saml_strict_mode
object
Has one property enabled (boolean).
enabled
boolean
Whether or not the SAML strict mode is enabled. If true, all users must log in with SAML.
Learn more on the SAML Strict documentation.
subscription
object
DEPRECATED: Subscription definition.
type
string
The subscription type. Types available are trial, free, and pro.
trial
boolean
Only available for MSP customers. Allows child organizations to be created on a trial plan.
"""
Get organization information returns "OK" response
"""fromdatadog_api_clientimportApiClient,Configurationfromdatadog_api_client.v1.api.organizations_apiimportOrganizationsApiconfiguration=Configuration()withApiClient(configuration)asapi_client:api_instance=OrganizationsApi(api_client)response=api_instance.get_org(public_id="abc123",)print(response)
# Get organization information returns "OK" responserequire"datadog_api_client"api_instance=DatadogAPIClient::V1::OrganizationsAPI.newpapi_instance.get_org("abc123")
// Get organization information returns "OK" response
packagemainimport("context""encoding/json""fmt""os""github.com/DataDog/datadog-api-client-go/v2/api/datadog""github.com/DataDog/datadog-api-client-go/v2/api/datadogV1")funcmain(){ctx:=datadog.NewDefaultContext(context.Background())configuration:=datadog.NewConfiguration()apiClient:=datadog.NewAPIClient(configuration)api:=datadogV1.NewOrganizationsApi(apiClient)resp,r,err:=api.GetOrg(ctx,"abc123")iferr!=nil{fmt.Fprintf(os.Stderr,"Error when calling `OrganizationsApi.GetOrg`: %v\n",err)fmt.Fprintf(os.Stderr,"Full HTTP response: %v\n",r)}responseContent,_:=json.MarshalIndent(resp,""," ")fmt.Fprintf(os.Stdout,"Response from `OrganizationsApi.GetOrg`:\n%s\n",responseContent)}
// Get organization information returns "OK" responseimportcom.datadog.api.client.ApiClient;importcom.datadog.api.client.ApiException;importcom.datadog.api.client.v1.api.OrganizationsApi;importcom.datadog.api.client.v1.model.OrganizationResponse;publicclassExample{publicstaticvoidmain(String[]args){ApiClientdefaultClient=ApiClient.getDefaultApiClient();OrganizationsApiapiInstance=newOrganizationsApi(defaultClient);try{OrganizationResponseresult=apiInstance.getOrg("abc123");System.out.println(result);}catch(ApiExceptione){System.err.println("Exception when calling OrganizationsApi#getOrg");System.err.println("Status code: "+e.getCode());System.err.println("Reason: "+e.getResponseBody());System.err.println("Response headers: "+e.getResponseHeaders());e.printStackTrace();}}}
// Get organization information returns "OK" response
usedatadog_api_client::datadog;usedatadog_api_client::datadogV1::api_organizations::OrganizationsAPI;#[tokio::main]asyncfnmain(){letconfiguration=datadog::Configuration::new();letapi=OrganizationsAPI::with_config(configuration);letresp=api.get_org("abc123".to_string()).await;ifletOk(value)=resp{println!("{:#?}",value);}else{println!("{:#?}",resp.unwrap_err());}}
DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comddog-gov.com"DD_API_KEY="<API-KEY>"DD_APP_KEY="<APP-KEY>"cargo run
/**
* Get organization information returns "OK" response
*/import{client,v1}from"@datadog/datadog-api-client";constconfiguration=client.createConfiguration();constapiInstance=newv1.OrganizationsApi(configuration);constparams: v1.OrganizationsApiGetOrgRequest={publicId:"abc123",};apiInstance.getOrg(params).then((data: v1.OrganizationResponse)=>{console.log("API called successfully. Returned data: "+JSON.stringify(data));}).catch((error: any)=>console.error(error));
The type of billing. Only parent_billing is supported.
created
string
Date of the organization creation.
description
string
Description of the organization.
name
string
The name of the child organization, limited to 32 characters.
public_id
string
The public_id of the organization you are operating within.
settings
object
A JSON array of settings.
private_widget_share
boolean
Whether or not the organization users can share widgets outside of Datadog.
saml
object
Set the boolean property enabled to enable or disable single sign on with SAML.
See the SAML documentation for more information about all SAML settings.
enabled
boolean
Whether or not SAML is enabled for this organization.
saml_autocreate_access_role
enum
The access role of the user. Options are st (standard user), adm (admin user), or ro (read-only user).
Allowed enum values: st,adm,ro,ERROR
saml_autocreate_users_domains
object
Has two properties, enabled (boolean) and domains, which is a list of domains without the @ symbol.
domains
[string]
List of domains where the SAML automated user creation is enabled.
enabled
boolean
Whether or not the automated user creation based on SAML domain is enabled.
saml_can_be_enabled
boolean
Whether or not SAML can be enabled for this organization.
saml_idp_endpoint
string
Identity provider endpoint for SAML authentication.
saml_idp_initiated_login
object
Has one property enabled (boolean).
enabled
boolean
Whether SAML IdP initiated login is enabled, learn more
in the SAML documentation.
saml_idp_metadata_uploaded
boolean
Whether or not a SAML identity provider metadata file was provided to the Datadog organization.
saml_login_url
string
URL for SAML logging.
saml_strict_mode
object
Has one property enabled (boolean).
enabled
boolean
Whether or not the SAML strict mode is enabled. If true, all users must log in with SAML.
Learn more on the SAML Strict documentation.
subscription
object
DEPRECATED: Subscription definition.
type
string
The subscription type. Types available are trial, free, and pro.
trial
boolean
Only available for MSP customers. Allows child organizations to be created on a trial plan.
The type of billing. Only parent_billing is supported.
created
string
Date of the organization creation.
description
string
Description of the organization.
name
string
The name of the child organization, limited to 32 characters.
public_id
string
The public_id of the organization you are operating within.
settings
object
A JSON array of settings.
private_widget_share
boolean
Whether or not the organization users can share widgets outside of Datadog.
saml
object
Set the boolean property enabled to enable or disable single sign on with SAML.
See the SAML documentation for more information about all SAML settings.
enabled
boolean
Whether or not SAML is enabled for this organization.
saml_autocreate_access_role
enum
The access role of the user. Options are st (standard user), adm (admin user), or ro (read-only user).
Allowed enum values: st,adm,ro,ERROR
saml_autocreate_users_domains
object
Has two properties, enabled (boolean) and domains, which is a list of domains without the @ symbol.
domains
[string]
List of domains where the SAML automated user creation is enabled.
enabled
boolean
Whether or not the automated user creation based on SAML domain is enabled.
saml_can_be_enabled
boolean
Whether or not SAML can be enabled for this organization.
saml_idp_endpoint
string
Identity provider endpoint for SAML authentication.
saml_idp_initiated_login
object
Has one property enabled (boolean).
enabled
boolean
Whether SAML IdP initiated login is enabled, learn more
in the SAML documentation.
saml_idp_metadata_uploaded
boolean
Whether or not a SAML identity provider metadata file was provided to the Datadog organization.
saml_login_url
string
URL for SAML logging.
saml_strict_mode
object
Has one property enabled (boolean).
enabled
boolean
Whether or not the SAML strict mode is enabled. If true, all users must log in with SAML.
Learn more on the SAML Strict documentation.
subscription
object
DEPRECATED: Subscription definition.
type
string
The subscription type. Types available are trial, free, and pro.
trial
boolean
Only available for MSP customers. Allows child organizations to be created on a trial plan.
DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comddog-gov.com"DD_API_KEY="<API-KEY>"DD_APP_KEY="<APP-KEY>"cargo run
/**
* Update your organization returns "OK" response
*/import{client,v1}from"@datadog/datadog-api-client";constconfiguration=client.createConfiguration();constapiInstance=newv1.OrganizationsApi(configuration);constparams: v1.OrganizationsApiUpdateOrgRequest={body:{billing:{type:"parent_billing",},description:"some description",name:"New child org",publicId:"abcdef12345",settings:{privateWidgetShare: false,saml:{enabled: false,},samlAutocreateAccessRole:"ro",samlAutocreateUsersDomains:{domains:["example.com"],enabled: false,},samlCanBeEnabled: false,samlIdpEndpoint:"https://my.saml.endpoint",samlIdpInitiatedLogin:{enabled: false,},samlIdpMetadataUploaded: false,samlLoginUrl:"https://my.saml.login.url",samlStrictMode:{enabled: false,},},subscription:{type:"pro",},trial: false,},publicId:"abc123",};apiInstance.updateOrg(params).then((data: v1.OrganizationResponse)=>{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.comddog-gov.com"DD_API_KEY="<API-KEY>"DD_APP_KEY="<APP-KEY>"cargo run
/**
* Upload IdP metadata returns "OK" response
*/import*asfsfrom"fs";import{client,v1}from"@datadog/datadog-api-client";constconfiguration=client.createConfiguration();constapiInstance=newv1.OrganizationsApi(configuration);constparams: v1.OrganizationsApiUploadIdPForOrgRequest={publicId:"abc123",idpFile:{data: Buffer.from(fs.readFileSync("./idp_metadata.xml","utf8")),name:"./idp_metadata.xml",},};apiInstance.uploadIdPForOrg(params).then((data: v1.IdpResponse)=>{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.comddog-gov.com"DD_API_KEY="<API-KEY>"DD_APP_KEY="<APP-KEY>"cargo run
/**
* Upload IdP metadata returns "OK" response
*/import*asfsfrom"fs";import{client,v2}from"@datadog/datadog-api-client";constconfiguration=client.createConfiguration();constapiInstance=newv2.OrganizationsApi(configuration);constparams: v2.OrganizationsApiUploadIdPMetadataRequest={idpFile:{data: Buffer.from(fs.readFileSync("fixtures/organizations/saml_configurations/valid_idp_metadata.xml","utf8")),name:"fixtures/organizations/saml_configurations/valid_idp_metadata.xml",},};apiInstance.uploadIdPMetadata(params).then((data: any)=>{console.log("API called successfully. Returned data: "+JSON.stringify(data));}).catch((error: any)=>console.error(error));
Sólo disponible para clientes MSP. Elimina una organización secundaria de la jerarquía de la organización principal y coloca la organización secundaria en un periodo de prueba de 30 días.
Argumentos
Parámetros de ruta
Nombre
Tipo
Descripción
public_id [required]
string
The public_id of the organization you are operating within.
DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comddog-gov.com"DD_API_KEY="<API-KEY>"DD_APP_KEY="<APP-KEY>"cargo run
/**
* Spin-off Child Organization returns "OK" response
*/import{client,v1}from"@datadog/datadog-api-client";constconfiguration=client.createConfiguration();constapiInstance=newv1.OrganizationsApi(configuration);constparams: v1.OrganizationsApiDowngradeOrgRequest={publicId:"abc123",};apiInstance.downgradeOrg(params).then((data: v1.OrgDowngradedResponse)=>{console.log("API called successfully. Returned data: "+JSON.stringify(data));}).catch((error: any)=>console.error(error));
The timestamp of the last Org Config update (if any).
name [required]
string
The machine-friendly name of an Org Config.
value [required]
The value of an Org Config.
value_type [required]
string
The type of an Org Config value.
id [required]
string
A unique identifier for an Org Config.
type [required]
enum
Data type of an Org Config.
Allowed enum values: org_configs
{"data":[{"attributes":{"description":"Frobulate the turbo encabulator manifold","modified_at":"2019-09-19T10:00:00.000Z","name":"monitor_timezone","value":"undefined","value_type":"bool"},"id":"abcd1234","type":"org_configs"}]}
DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comddog-gov.com"DD_API_KEY="<API-KEY>"DD_APP_KEY="<APP-KEY>"cargo run
/**
* List Org Configs returns "OK" response
*/import{client,v2}from"@datadog/datadog-api-client";constconfiguration=client.createConfiguration();constapiInstance=newv2.OrganizationsApi(configuration);apiInstance.listOrgConfigs().then((data: v2.OrgConfigListResponse)=>{console.log("API called successfully. Returned data: "+JSON.stringify(data));}).catch((error: any)=>console.error(error));
The timestamp of the last Org Config update (if any).
name [required]
string
The machine-friendly name of an Org Config.
value [required]
The value of an Org Config.
value_type [required]
string
The type of an Org Config value.
id [required]
string
A unique identifier for an Org Config.
type [required]
enum
Data type of an Org Config.
Allowed enum values: org_configs
{"data":{"attributes":{"description":"Frobulate the turbo encabulator manifold","modified_at":"2019-09-19T10:00:00.000Z","name":"monitor_timezone","value":"undefined","value_type":"bool"},"id":"abcd1234","type":"org_configs"}}
"""
Get a specific Org Config value 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.get_org_config(org_config_name="custom_roles",)print(response)
# Get a specific Org Config value returns "OK" responserequire"datadog_api_client"api_instance=DatadogAPIClient::V2::OrganizationsAPI.newpapi_instance.get_org_config("custom_roles")
// Get a specific Org Config value returns "OK" response
packagemainimport("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.GetOrgConfig(ctx,"custom_roles")iferr!=nil{fmt.Fprintf(os.Stderr,"Error when calling `OrganizationsApi.GetOrgConfig`: %v\n",err)fmt.Fprintf(os.Stderr,"Full HTTP response: %v\n",r)}responseContent,_:=json.MarshalIndent(resp,""," ")fmt.Fprintf(os.Stdout,"Response from `OrganizationsApi.GetOrgConfig`:\n%s\n",responseContent)}
// Get a specific Org Config value returns "OK" responseimportcom.datadog.api.client.ApiClient;importcom.datadog.api.client.ApiException;importcom.datadog.api.client.v2.api.OrganizationsApi;importcom.datadog.api.client.v2.model.OrgConfigGetResponse;publicclassExample{publicstaticvoidmain(String[]args){ApiClientdefaultClient=ApiClient.getDefaultApiClient();OrganizationsApiapiInstance=newOrganizationsApi(defaultClient);try{OrgConfigGetResponseresult=apiInstance.getOrgConfig("custom_roles");System.out.println(result);}catch(ApiExceptione){System.err.println("Exception when calling OrganizationsApi#getOrgConfig");System.err.println("Status code: "+e.getCode());System.err.println("Reason: "+e.getResponseBody());System.err.println("Response headers: "+e.getResponseHeaders());e.printStackTrace();}}}
// Get a specific Org Config value returns "OK" response
usedatadog_api_client::datadog;usedatadog_api_client::datadogV2::api_organizations::OrganizationsAPI;#[tokio::main]asyncfnmain(){letconfiguration=datadog::Configuration::new();letapi=OrganizationsAPI::with_config(configuration);letresp=api.get_org_config("custom_roles".to_string()).await;ifletOk(value)=resp{println!("{:#?}",value);}else{println!("{:#?}",resp.unwrap_err());}}
DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comddog-gov.com"DD_API_KEY="<API-KEY>"DD_APP_KEY="<APP-KEY>"cargo run
/**
* Get a specific Org Config value returns "OK" response
*/import{client,v2}from"@datadog/datadog-api-client";constconfiguration=client.createConfiguration();constapiInstance=newv2.OrganizationsApi(configuration);constparams: v2.OrganizationsApiGetOrgConfigRequest={orgConfigName:"custom_roles",};apiInstance.getOrgConfig(params).then((data: v2.OrgConfigGetResponse)=>{console.log("API called successfully. Returned data: "+JSON.stringify(data));}).catch((error: any)=>console.error(error));
The timestamp of the last Org Config update (if any).
name [required]
string
The machine-friendly name of an Org Config.
value [required]
The value of an Org Config.
value_type [required]
string
The type of an Org Config value.
id [required]
string
A unique identifier for an Org Config.
type [required]
enum
Data type of an Org Config.
Allowed enum values: org_configs
{"data":{"attributes":{"description":"Frobulate the turbo encabulator manifold","modified_at":"2019-09-19T10:00:00.000Z","name":"monitor_timezone","value":"undefined","value_type":"bool"},"id":"abcd1234","type":"org_configs"}}
// Update a specific Org Config returns "OK" response
packagemainimport("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(){body:=datadogV2.OrgConfigWriteRequest{Data:datadogV2.OrgConfigWrite{Attributes:datadogV2.OrgConfigWriteAttributes{Value:"UTC",},Type:datadogV2.ORGCONFIGTYPE_ORG_CONFIGS,},}ctx:=datadog.NewDefaultContext(context.Background())configuration:=datadog.NewConfiguration()apiClient:=datadog.NewAPIClient(configuration)api:=datadogV2.NewOrganizationsApi(apiClient)resp,r,err:=api.UpdateOrgConfig(ctx,"monitor_timezone",body)iferr!=nil{fmt.Fprintf(os.Stderr,"Error when calling `OrganizationsApi.UpdateOrgConfig`: %v\n",err)fmt.Fprintf(os.Stderr,"Full HTTP response: %v\n",r)}responseContent,_:=json.MarshalIndent(resp,""," ")fmt.Fprintf(os.Stdout,"Response from `OrganizationsApi.UpdateOrgConfig`:\n%s\n",responseContent)}
"""
Update a specific Org Config returns "OK" response
"""fromdatadog_api_clientimportApiClient,Configurationfromdatadog_api_client.v2.api.organizations_apiimportOrganizationsApifromdatadog_api_client.v2.model.org_config_typeimportOrgConfigTypefromdatadog_api_client.v2.model.org_config_writeimportOrgConfigWritefromdatadog_api_client.v2.model.org_config_write_attributesimportOrgConfigWriteAttributesfromdatadog_api_client.v2.model.org_config_write_requestimportOrgConfigWriteRequestbody=OrgConfigWriteRequest(data=OrgConfigWrite(attributes=OrgConfigWriteAttributes(value="UTC",),type=OrgConfigType.ORG_CONFIGS,),)configuration=Configuration()withApiClient(configuration)asapi_client:api_instance=OrganizationsApi(api_client)response=api_instance.update_org_config(org_config_name="monitor_timezone",body=body)print(response)
# Update a specific Org Config returns "OK" responserequire"datadog_api_client"api_instance=DatadogAPIClient::V2::OrganizationsAPI.newbody=DatadogAPIClient::V2::OrgConfigWriteRequest.new({data:DatadogAPIClient::V2::OrgConfigWrite.new({attributes:DatadogAPIClient::V2::OrgConfigWriteAttributes.new({value:"UTC",}),type:DatadogAPIClient::V2::OrgConfigType::ORG_CONFIGS,}),})papi_instance.update_org_config("monitor_timezone",body)
// Update a specific Org Config returns "OK" response
usedatadog_api_client::datadog;usedatadog_api_client::datadogV2::api_organizations::OrganizationsAPI;usedatadog_api_client::datadogV2::model::OrgConfigType;usedatadog_api_client::datadogV2::model::OrgConfigWrite;usedatadog_api_client::datadogV2::model::OrgConfigWriteAttributes;usedatadog_api_client::datadogV2::model::OrgConfigWriteRequest;useserde_json::Value;#[tokio::main]asyncfnmain(){letbody=OrgConfigWriteRequest::new(OrgConfigWrite::new(OrgConfigWriteAttributes::new(Value::from("UTC")),OrgConfigType::ORG_CONFIGS,));letconfiguration=datadog::Configuration::new();letapi=OrganizationsAPI::with_config(configuration);letresp=api.update_org_config("monitor_timezone".to_string(),body).await;ifletOk(value)=resp{println!("{:#?}",value);}else{println!("{:#?}",resp.unwrap_err());}}
DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comddog-gov.com"DD_API_KEY="<API-KEY>"DD_APP_KEY="<APP-KEY>"cargo run
/**
* Update a specific Org Config returns "OK" response
*/import{client,v2}from"@datadog/datadog-api-client";constconfiguration=client.createConfiguration();constapiInstance=newv2.OrganizationsApi(configuration);constparams: v2.OrganizationsApiUpdateOrgConfigRequest={body:{data:{attributes:{value:"UTC",},type:"org_configs",},},orgConfigName:"monitor_timezone",};apiInstance.updateOrgConfig(params).then((data: v2.OrgConfigGetResponse)=>{console.log("API called successfully. Returned data: "+JSON.stringify(data));}).catch((error: any)=>console.error(error));