Create or replace the configuration for a given integration in the caller’s organization. The shape of data.attributes.config depends on the integration:
For github: config must contain an enabled_repos array of objects with hostname, github_org_name, and repo_name.
For jira: config must contain an enabled_projects array of objects with hostname, account_id, and project_key.
For pagerduty: config must contain an accounts array of objects with a required enabled boolean and an optional subdomain string.
This endpoint requires the integrations_read permission.
引数
パスパラメーター
名前
タイプ
説明
integration_id [required]
string
The identifier of the integration whose configuration is being managed. Supported values are github, jira, and pagerduty.
JSON:API resource object used in a request to create or update an entity integration configuration.
attributes [required]
object
Attributes used to create or update an entity integration configuration.
config [required]
object
Integration-specific configuration payload. The shape of this object depends on the integration identified by the path parameter. For github, the object must contain an enabled_repos array. For jira, it must contain an enabled_projects array. For pagerduty, it must contain an accounts array.
type [required]
enum
JSON:API resource type for the entity integration configuration create or update request. Always entity_integration_config_requests.
Allowed enum values: entity_integration_config_requests
JSON:API resource object for an entity integration configuration.
attributes [required]
object
The organization ID, integration identifier, and integration-specific configuration payload for an entity integration configuration.
config [required]
object
Integration-specific configuration payload. The shape of this object depends on the integration identified by the path parameter. For github, the object must contain an enabled_repos array. For jira, it must contain an enabled_projects array. For pagerduty, it must contain an accounts array.
integration_id [required]
string
The identifier of the integration this configuration applies to (for example, github, jira, or pagerduty).
org_id [required]
int64
The Datadog organization identifier that owns this configuration.
id [required]
string
Unique identifier of the entity integration configuration.
type [required]
enum
JSON:API resource type for an entity integration configuration. Always entity_integration_configs.
Allowed enum values: entity_integration_configs
JSON:API document containing a single entity integration configuration resource.
Expand All
フィールド
タイプ
説明
data [required]
object
JSON:API resource object for an entity integration configuration.
attributes [required]
object
The organization ID, integration identifier, and integration-specific configuration payload for an entity integration configuration.
config [required]
object
Integration-specific configuration payload. The shape of this object depends on the integration identified by the path parameter. For github, the object must contain an enabled_repos array. For jira, it must contain an enabled_projects array. For pagerduty, it must contain an accounts array.
integration_id [required]
string
The identifier of the integration this configuration applies to (for example, github, jira, or pagerduty).
org_id [required]
int64
The Datadog organization identifier that owns this configuration.
id [required]
string
Unique identifier of the entity integration configuration.
type [required]
enum
JSON:API resource type for an entity integration configuration. Always entity_integration_configs.
Allowed enum values: entity_integration_configs
## GitHub integration configuration
#
# Path parameters exportintegration_id="github" # Use a Personal Access Token or Service Access Token exportDD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"
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"
# Create or update entity integration configuration returns "OK" responserequire"datadog_api_client"DatadogAPIClient.configuredo|config|config.access_token=ENV["DD_BEARER_TOKEN"]config.unstable_operations["v2.update_entity_integration_config".to_sym]=trueendapi_instance=DatadogAPIClient::V2::EntityIntegrationConfigsAPI.newbody=DatadogAPIClient::V2::EntityIntegrationConfigRequest.new({data:DatadogAPIClient::V2::EntityIntegrationConfigRequestData.new({attributes:DatadogAPIClient::V2::EntityIntegrationConfigRequestAttributes.new({config:DatadogAPIClient::V2::EntityIntegrationConfigPayload.new({}),}),type:DatadogAPIClient::V2::EntityIntegrationConfigRequestType::ENTITY_INTEGRATION_CONFIG_REQUESTS,}),})papi_instance.update_entity_integration_config("github",body)
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"
// Create or update entity integration configuration 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(){body:=datadogV2.EntityIntegrationConfigRequest{Data:datadogV2.EntityIntegrationConfigRequestData{Attributes:datadogV2.EntityIntegrationConfigRequestAttributes{Config:map[string]interface{}{"enabled_repos":"[{'github_org_name': 'myorg', 'hostname': 'github.com', 'repo_name': 'myrepo'}]",},},Type:datadogV2.ENTITYINTEGRATIONCONFIGREQUESTTYPE_ENTITY_INTEGRATION_CONFIG_REQUESTS,},}ctx:=datadog.NewDefaultContext(context.Background())ctx=context.WithValue(ctx,datadog.ContextAccessToken,os.Getenv("DD_BEARER_TOKEN"))configuration:=datadog.NewConfiguration()configuration.SetUnstableOperationEnabled("v2.UpdateEntityIntegrationConfig",true)apiClient:=datadog.NewAPIClient(configuration)api:=datadogV2.NewEntityIntegrationConfigsApi(apiClient)resp,r,err:=api.UpdateEntityIntegrationConfig(ctx,"github",body)iferr!=nil{fmt.Fprintf(os.Stderr,"Error when calling `EntityIntegrationConfigsApi.UpdateEntityIntegrationConfig`: %v\n",err)fmt.Fprintf(os.Stderr,"Full HTTP response: %v\n",r)}responseContent,_:=json.MarshalIndent(resp,""," ")fmt.Fprintf(os.Stdout,"Response from `EntityIntegrationConfigsApi.UpdateEntityIntegrationConfig`:\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"
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"
DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comuk1.datadoghq.comddog-gov.comus2.ddog-gov.com"DD_API_KEY="<API-KEY>"DD_APP_KEY="<APP-KEY>"cargo run
/**
* Create or update entity integration configuration 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.updateEntityIntegrationConfig"]=true;constapiInstance=newv2.EntityIntegrationConfigsApi(configuration);constparams: v2.EntityIntegrationConfigsApiUpdateEntityIntegrationConfigRequest={body:{data:{attributes:{config:{enabled_repos:"[{'github_org_name': 'myorg', 'hostname': 'github.com', 'repo_name': 'myrepo'}]",},},type:"entity_integration_config_requests",},},integrationId:"github",};apiInstance.updateEntityIntegrationConfig(params).then((data: v2.EntityIntegrationConfigResponse)=>{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.