- 필수 기능
- 시작하기
- Glossary
- 표준 속성
- Guides
- Agent
- 통합
- 개방형텔레메트리
- 개발자
- Administrator's Guide
- API
- Datadog Mobile App
- CoScreen
- Cloudcraft
- 앱 내
- 서비스 관리
- 인프라스트럭처
- 애플리케이션 성능
- APM
- Continuous Profiler
- 스팬 시각화
- 데이터 스트림 모니터링
- 데이터 작업 모니터링
- 디지털 경험
- 소프트웨어 제공
- 보안
- AI Observability
- 로그 관리
- 관리
Manage your Datadog Cloudflare integration directly through the Datadog API. See the Cloudflare integration page for more information.
GET https://api.ap1.datadoghq.com/api/v2/integrations/cloudflare/accountshttps://api.datadoghq.eu/api/v2/integrations/cloudflare/accountshttps://api.ddog-gov.com/api/v2/integrations/cloudflare/accountshttps://api.datadoghq.com/api/v2/integrations/cloudflare/accountshttps://api.us3.datadoghq.com/api/v2/integrations/cloudflare/accountshttps://api.us5.datadoghq.com/api/v2/integrations/cloudflare/accounts
List Cloudflare accounts.
This endpoint requires the integrations_read
permission.
OK
The expected response schema when getting Cloudflare accounts.
항목
유형
설명
data
[object]
The JSON:API data schema.
attributes [required]
object
Attributes object of a Cloudflare account.
string
The email associated with the Cloudflare account.
name [required]
string
The name of the Cloudflare account.
resources
[string]
An allowlist of resources, such as web
, dns
, lb
(load balancer), worker
, that restricts pulling metrics from those resources.
zones
[string]
An allowlist of zones to restrict pulling metrics for.
id [required]
string
The ID of the Cloudflare account, a hash of the account name.
type [required]
enum
The JSON:API type for this API. Should always be cloudflare-accounts
.
Allowed enum values: cloudflare-accounts
default: cloudflare-accounts
{
"data": [
{
"attributes": {
"email": "test-email@example.com",
"name": "test-name",
"resources": [
"web",
"dns",
"lb",
"worker"
],
"zones": [
"zone_id_1",
"zone_id_2"
]
},
"id": "c1a8e059bfd1e911cf10b626340c9a54",
"type": "cloudflare-accounts"
}
]
}
Bad Request
API error response.
{
"errors": [
"Bad Request"
]
}
Forbidden
API error response.
{
"errors": [
"Bad Request"
]
}
Not Found
API error response.
{
"errors": [
"Bad Request"
]
}
Too many requests
API error response.
{
"errors": [
"Bad Request"
]
}
// List Cloudflare accounts returns "OK" response
package main
import (
"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"
)
func main() {
ctx := datadog.NewDefaultContext(context.Background())
configuration := datadog.NewConfiguration()
apiClient := datadog.NewAPIClient(configuration)
api := datadogV2.NewCloudflareIntegrationApi(apiClient)
resp, r, err := api.ListCloudflareAccounts(ctx)
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `CloudflareIntegrationApi.ListCloudflareAccounts`: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
responseContent, _ := json.MarshalIndent(resp, "", " ")
fmt.Fprintf(os.Stdout, "Response from `CloudflareIntegrationApi.ListCloudflareAccounts`:\n%s\n", responseContent)
}
First install the library and its dependencies and then save the example to main.go
and run following commands:
DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comddog-gov.com" DD_API_KEY="<API-KEY>" DD_APP_KEY="<APP-KEY>" go run "main.go"
POST https://api.ap1.datadoghq.com/api/v2/integrations/cloudflare/accountshttps://api.datadoghq.eu/api/v2/integrations/cloudflare/accountshttps://api.ddog-gov.com/api/v2/integrations/cloudflare/accountshttps://api.datadoghq.com/api/v2/integrations/cloudflare/accountshttps://api.us3.datadoghq.com/api/v2/integrations/cloudflare/accountshttps://api.us5.datadoghq.com/api/v2/integrations/cloudflare/accounts
Create a Cloudflare account.
This endpoint requires the manage_integrations
permission.
항목
유형
설명
data [required]
object
Data object for creating a Cloudflare account.
attributes [required]
object
Attributes object for creating a Cloudflare account.
api_key [required]
string
The API key (or token) for the Cloudflare account.
string
The email associated with the Cloudflare account. If an API key is provided (and not a token), this field is also required.
name [required]
string
The name of the Cloudflare account.
resources
[string]
An allowlist of resources to restrict pulling metrics for including 'web', 'dns', 'lb' (load balancer), 'worker'
.
zones
[string]
An allowlist of zones to restrict pulling metrics for.
type [required]
enum
The JSON:API type for this API. Should always be cloudflare-accounts
.
Allowed enum values: cloudflare-accounts
default: cloudflare-accounts
{
"data": {
"attributes": {
"api_key": "fakekey",
"email": "dev@datadoghq.com",
"name": "examplecloudflareintegration"
},
"type": "cloudflare-accounts"
}
}
CREATED
The expected response schema when getting a Cloudflare account.
항목
유형
설명
data
object
Data object of a Cloudflare account.
attributes [required]
object
Attributes object of a Cloudflare account.
string
The email associated with the Cloudflare account.
name [required]
string
The name of the Cloudflare account.
resources
[string]
An allowlist of resources, such as web
, dns
, lb
(load balancer), worker
, that restricts pulling metrics from those resources.
zones
[string]
An allowlist of zones to restrict pulling metrics for.
id [required]
string
The ID of the Cloudflare account, a hash of the account name.
type [required]
enum
The JSON:API type for this API. Should always be cloudflare-accounts
.
Allowed enum values: cloudflare-accounts
default: cloudflare-accounts
{
"data": {
"attributes": {
"email": "test-email@example.com",
"name": "test-name",
"resources": [
"web",
"dns",
"lb",
"worker"
],
"zones": [
"zone_id_1",
"zone_id_2"
]
},
"id": "c1a8e059bfd1e911cf10b626340c9a54",
"type": "cloudflare-accounts"
}
}
Bad Request
API error response.
{
"errors": [
"Bad Request"
]
}
Forbidden
API error response.
{
"errors": [
"Bad Request"
]
}
Not Found
API error response.
{
"errors": [
"Bad Request"
]
}
Too many requests
API error response.
{
"errors": [
"Bad Request"
]
}
// Add Cloudflare account returns "CREATED" response
package main
import (
"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"
)
func main() {
body := datadogV2.CloudflareAccountCreateRequest{
Data: datadogV2.CloudflareAccountCreateRequestData{
Attributes: datadogV2.CloudflareAccountCreateRequestAttributes{
ApiKey: "fakekey",
Email: datadog.PtrString("dev@datadoghq.com"),
Name: "examplecloudflareintegration",
},
Type: datadogV2.CLOUDFLAREACCOUNTTYPE_CLOUDFLARE_ACCOUNTS,
},
}
ctx := datadog.NewDefaultContext(context.Background())
configuration := datadog.NewConfiguration()
apiClient := datadog.NewAPIClient(configuration)
api := datadogV2.NewCloudflareIntegrationApi(apiClient)
resp, r, err := api.CreateCloudflareAccount(ctx, body)
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `CloudflareIntegrationApi.CreateCloudflareAccount`: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
responseContent, _ := json.MarshalIndent(resp, "", " ")
fmt.Fprintf(os.Stdout, "Response from `CloudflareIntegrationApi.CreateCloudflareAccount`:\n%s\n", responseContent)
}
First install the library and its dependencies and then save the example to main.go
and run following commands:
DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comddog-gov.com" DD_API_KEY="<API-KEY>" DD_APP_KEY="<APP-KEY>" go run "main.go"
GET https://api.ap1.datadoghq.com/api/v2/integrations/cloudflare/accounts/{account_id}https://api.datadoghq.eu/api/v2/integrations/cloudflare/accounts/{account_id}https://api.ddog-gov.com/api/v2/integrations/cloudflare/accounts/{account_id}https://api.datadoghq.com/api/v2/integrations/cloudflare/accounts/{account_id}https://api.us3.datadoghq.com/api/v2/integrations/cloudflare/accounts/{account_id}https://api.us5.datadoghq.com/api/v2/integrations/cloudflare/accounts/{account_id}
Get a Cloudflare account.
This endpoint requires the integrations_read
permission.
이름
유형
설명
account_id [required]
string
None
OK
The expected response schema when getting a Cloudflare account.
항목
유형
설명
data
object
Data object of a Cloudflare account.
attributes [required]
object
Attributes object of a Cloudflare account.
string
The email associated with the Cloudflare account.
name [required]
string
The name of the Cloudflare account.
resources
[string]
An allowlist of resources, such as web
, dns
, lb
(load balancer), worker
, that restricts pulling metrics from those resources.
zones
[string]
An allowlist of zones to restrict pulling metrics for.
id [required]
string
The ID of the Cloudflare account, a hash of the account name.
type [required]
enum
The JSON:API type for this API. Should always be cloudflare-accounts
.
Allowed enum values: cloudflare-accounts
default: cloudflare-accounts
{
"data": {
"attributes": {
"email": "test-email@example.com",
"name": "test-name",
"resources": [
"web",
"dns",
"lb",
"worker"
],
"zones": [
"zone_id_1",
"zone_id_2"
]
},
"id": "c1a8e059bfd1e911cf10b626340c9a54",
"type": "cloudflare-accounts"
}
}
Bad Request
API error response.
{
"errors": [
"Bad Request"
]
}
Forbidden
API error response.
{
"errors": [
"Bad Request"
]
}
Not Found
API error response.
{
"errors": [
"Bad Request"
]
}
Too many requests
API error response.
{
"errors": [
"Bad Request"
]
}
// Get Cloudflare account returns "OK" response
package main
import (
"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"
)
func main() {
// there is a valid "cloudflare_account" in the system
CloudflareAccountDataID := os.Getenv("CLOUDFLARE_ACCOUNT_DATA_ID")
ctx := datadog.NewDefaultContext(context.Background())
configuration := datadog.NewConfiguration()
apiClient := datadog.NewAPIClient(configuration)
api := datadogV2.NewCloudflareIntegrationApi(apiClient)
resp, r, err := api.GetCloudflareAccount(ctx, CloudflareAccountDataID)
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `CloudflareIntegrationApi.GetCloudflareAccount`: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
responseContent, _ := json.MarshalIndent(resp, "", " ")
fmt.Fprintf(os.Stdout, "Response from `CloudflareIntegrationApi.GetCloudflareAccount`:\n%s\n", responseContent)
}
First install the library and its dependencies and then save the example to main.go
and run following commands:
DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comddog-gov.com" DD_API_KEY="<API-KEY>" DD_APP_KEY="<APP-KEY>" go run "main.go"
PATCH https://api.ap1.datadoghq.com/api/v2/integrations/cloudflare/accounts/{account_id}https://api.datadoghq.eu/api/v2/integrations/cloudflare/accounts/{account_id}https://api.ddog-gov.com/api/v2/integrations/cloudflare/accounts/{account_id}https://api.datadoghq.com/api/v2/integrations/cloudflare/accounts/{account_id}https://api.us3.datadoghq.com/api/v2/integrations/cloudflare/accounts/{account_id}https://api.us5.datadoghq.com/api/v2/integrations/cloudflare/accounts/{account_id}
Update a Cloudflare account.
This endpoint requires the manage_integrations
permission.
이름
유형
설명
account_id [required]
string
None
항목
유형
설명
data [required]
object
Data object for updating a Cloudflare account.
attributes
object
Attributes object for updating a Cloudflare account.
api_key [required]
string
The API key of the Cloudflare account.
string
The email associated with the Cloudflare account. If an API key is provided (and not a token), this field is also required.
name
string
The name of the Cloudflare account.
resources
[string]
An allowlist of resources to restrict pulling metrics for including 'web', 'dns', 'lb' (load balancer), 'worker'
.
zones
[string]
An allowlist of zones to restrict pulling metrics for.
type
enum
The JSON:API type for this API. Should always be cloudflare-accounts
.
Allowed enum values: cloudflare-accounts
default: cloudflare-accounts
{
"data": {
"attributes": {
"api_key": "fakekey",
"email": "dev@datadoghq.com",
"zones": [
"zone-id-3"
]
},
"type": "cloudflare-accounts"
}
}
OK
The expected response schema when getting a Cloudflare account.
항목
유형
설명
data
object
Data object of a Cloudflare account.
attributes [required]
object
Attributes object of a Cloudflare account.
string
The email associated with the Cloudflare account.
name [required]
string
The name of the Cloudflare account.
resources
[string]
An allowlist of resources, such as web
, dns
, lb
(load balancer), worker
, that restricts pulling metrics from those resources.
zones
[string]
An allowlist of zones to restrict pulling metrics for.
id [required]
string
The ID of the Cloudflare account, a hash of the account name.
type [required]
enum
The JSON:API type for this API. Should always be cloudflare-accounts
.
Allowed enum values: cloudflare-accounts
default: cloudflare-accounts
{
"data": {
"attributes": {
"email": "test-email@example.com",
"name": "test-name",
"resources": [
"web",
"dns",
"lb",
"worker"
],
"zones": [
"zone_id_1",
"zone_id_2"
]
},
"id": "c1a8e059bfd1e911cf10b626340c9a54",
"type": "cloudflare-accounts"
}
}
Bad Request
API error response.
{
"errors": [
"Bad Request"
]
}
Forbidden
API error response.
{
"errors": [
"Bad Request"
]
}
Not Found
API error response.
{
"errors": [
"Bad Request"
]
}
Too many requests
API error response.
{
"errors": [
"Bad Request"
]
}
// Update Cloudflare account returns "OK" response
package main
import (
"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"
)
func main() {
// there is a valid "cloudflare_account" in the system
CloudflareAccountDataID := os.Getenv("CLOUDFLARE_ACCOUNT_DATA_ID")
body := datadogV2.CloudflareAccountUpdateRequest{
Data: datadogV2.CloudflareAccountUpdateRequestData{
Attributes: &datadogV2.CloudflareAccountUpdateRequestAttributes{
ApiKey: "fakekey",
Email: datadog.PtrString("dev@datadoghq.com"),
Zones: []string{
"zone-id-3",
},
},
Type: datadogV2.CLOUDFLAREACCOUNTTYPE_CLOUDFLARE_ACCOUNTS.Ptr(),
},
}
ctx := datadog.NewDefaultContext(context.Background())
configuration := datadog.NewConfiguration()
apiClient := datadog.NewAPIClient(configuration)
api := datadogV2.NewCloudflareIntegrationApi(apiClient)
resp, r, err := api.UpdateCloudflareAccount(ctx, CloudflareAccountDataID, body)
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `CloudflareIntegrationApi.UpdateCloudflareAccount`: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
responseContent, _ := json.MarshalIndent(resp, "", " ")
fmt.Fprintf(os.Stdout, "Response from `CloudflareIntegrationApi.UpdateCloudflareAccount`:\n%s\n", responseContent)
}
First install the library and its dependencies and then save the example to main.go
and run following commands:
DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comddog-gov.com" DD_API_KEY="<API-KEY>" DD_APP_KEY="<APP-KEY>" go run "main.go"
DELETE https://api.ap1.datadoghq.com/api/v2/integrations/cloudflare/accounts/{account_id}https://api.datadoghq.eu/api/v2/integrations/cloudflare/accounts/{account_id}https://api.ddog-gov.com/api/v2/integrations/cloudflare/accounts/{account_id}https://api.datadoghq.com/api/v2/integrations/cloudflare/accounts/{account_id}https://api.us3.datadoghq.com/api/v2/integrations/cloudflare/accounts/{account_id}https://api.us5.datadoghq.com/api/v2/integrations/cloudflare/accounts/{account_id}
Delete a Cloudflare account.
This endpoint requires the manage_integrations
permission.
이름
유형
설명
account_id [required]
string
None
OK
Bad Request
API error response.
{
"errors": [
"Bad Request"
]
}
Forbidden
API error response.
{
"errors": [
"Bad Request"
]
}
Not Found
API error response.
{
"errors": [
"Bad Request"
]
}
Too many requests
API error response.
{
"errors": [
"Bad Request"
]
}
// Delete Cloudflare account returns "OK" response
package main
import (
"context"
"fmt"
"os"
"github.com/DataDog/datadog-api-client-go/v2/api/datadog"
"github.com/DataDog/datadog-api-client-go/v2/api/datadogV2"
)
func main() {
ctx := datadog.NewDefaultContext(context.Background())
configuration := datadog.NewConfiguration()
apiClient := datadog.NewAPIClient(configuration)
api := datadogV2.NewCloudflareIntegrationApi(apiClient)
r, err := api.DeleteCloudflareAccount(ctx, "account_id")
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `CloudflareIntegrationApi.DeleteCloudflareAccount`: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
}
First install the library and its dependencies and then save the example to main.go
and run following commands:
DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comddog-gov.com" DD_API_KEY="<API-KEY>" DD_APP_KEY="<APP-KEY>" go run "main.go"