STIX 위협 인텔리전스 수집
https://api.datadoghq.com/api/v2/security/threat-intel/stixhttps://api.us3.datadoghq.com/api/v2/security/threat-intel/stixhttps://api.us5.datadoghq.com/api/v2/security/threat-intel/stixhttps://api.datadoghq.eu/api/v2/security/threat-intel/stixhttps://api.ap1.datadoghq.com/api/v2/security/threat-intel/stixhttps://api.ap2.datadoghq.com/api/v2/security/threat-intel/stixhttps://api.uk1.datadoghq.com/api/v2/security/threat-intel/stixhttps://api.ddog-gov.com/api/v2/security/threat-intel/stixhttps://api.us2.ddog-gov.com/api/v2/security/threat-intel/stix개요
위협 인텔리전스 지표가 포함된 STIX 2.1 번들을 수집합니다. 지표 객체만 처리됩니다. 지원되는 지표 패턴에는 IPv4 주소, IPv6 주소, 도메인 이름 또는 SHA-256 파일 해시가 포함됩니다.
지표가 아닌 객체는 무시되며 응답 카운터에 포함되지 않습니다. 지원되지 않는 STIX 버전의 지표 객체나 지원되는 관찰 가능한 값을 생성하지 않는 패턴은 unsupported 카운터를 증가시킵니다. 구문 분석할 수 없는 패턴은 invalid 카운터를 증가시킵니다. 처리는 최선의 방식으로 이루어지므로 동일한 번들에 있는 유효하고 지원되는 지표는 계속 추가됩니다.
성공적인 응답은 수집이 완료되었음을 의미합니다. 참조 테이블 구체화 및 보강은 비동기적으로 발생합니다. 요청은 수신 시 50MB로 제한되며 압축 해제 후 100MB, API 키당 초당 10개 요청으로 제한됩니다. Gzip으로 압축된 요청 본문이 지원됩니다.
인수
헤더 파라미터
ti_vendor [required]Vendor identifier for the feed. The value must not exceed 10 characters. Datadog normalizes the accepted value to lowercase, converts non-alphanumeric characters to underscores, and trims leading and trailing underscores.
Content-EncodingContent encoding for the request body. Use gzip for a compressed STIX bundle.
gzip요청
Body Data (required)
지표 객체를 포함하는 STIX 2.1 번들입니다. 요청 본문은 수신 시 50MB를 초과할 수 없으며 압축 해제 후에는 100MB를 초과할 수 없습니다.
id [required]위협 인텔리전스 지표 객체를 포함하는 STIX 2.1 번들입니다.
objects [required]The STIX objects included in the bundle. Indicator objects are processed and ingested; all other STIX object types are ignored and are not included in the response counters.
confidenceThe confidence in the correctness of the indicator, from 0 through 100.
createdThe time when the object was created.
external_referencesOptional external reference metadata preserved with the indicator but not interpreted during ingestion.
id [required]The STIX object identifier.
indicator_typesThe open vocabulary terms that categorize the indicator.
kill_chain_phasesOptional kill chain metadata preserved with the indicator but not interpreted during ingestion.
labelsLabels associated with the indicator.
modifiedThe time when the object was last modified.
object_marking_refsReferences to marking definition objects that apply to the indicator.
patternThe STIX pattern that identifies the observable. Present on indicator objects.
pattern_typeThe supported STIX pattern language.
stixrevokedWhether the indicator has been revoked.
spec_versionThe STIX specification version declared on the object. Objects with an unsupported version are accepted and counted in the unsupported response counter.
type [required]The STIX object type.
valid_fromThe time from which the indicator is considered valid. Present on indicator objects.
valid_untilThe time until which the indicator is considered valid.
spec_versionThe supported STIX specification version.
2.1type [required]The STIX object type for a bundle.
bundle{
"id": "bundle--44444444-4444-4444-8444-444444444444",
"objects": [
{
"created": "2026-07-22T12:00:00Z",
"id": "indicator--55555555-5555-4555-8555-555555555555",
"modified": "2026-07-22T12:00:00Z",
"pattern": "[ipv4-addr:value = '198.51.100.42']",
"pattern_type": "stix",
"spec_version": "2.1",
"type": "indicator",
"valid_from": "2026-07-22T12:00:00Z"
}
],
"spec_version": "2.1",
"type": "bundle"
}응답
OK
The response from a completed STIX ingestion request.
data [required]The JSON:API resource describing the completed STIX ingestion request.
attributes [required]Counters describing the result of the STIX ingestion request.
accepted [required]The number of supported indicators accepted.
invalid [required]The number of indicators with patterns that could not be parsed.
unsupported [required]The number of indicator objects with an unsupported STIX version or a pattern that produced no supported observable values.
id [required]The normalized vendor identifier.
type [required]The STIX ingestion resource type.
threat-intel-stix-ingest{
"data": {
"attributes": {
"accepted": 1,
"invalid": 0,
"unsupported": 0
},
"id": "acme",
"type": "threat-intel-stix-ingest"
}
}Bad Request
API error response.
errors [required]A list of errors.
detailA human-readable explanation specific to this occurrence of the error.
metaNon-standard meta-information about the error
sourceReferences to the source of the error.
headerA string indicating the name of a single request header which caused the error.
parameterA string indicating which URI query parameter caused the error.
pointerA JSON pointer to the value in the request document that caused the error.
statusStatus code of the response.
titleShort human-readable summary of the error.
{
"errors": [
{
"detail": "Missing required attribute in body",
"meta": {},
"source": {
"header": "Authorization",
"parameter": "limit",
"pointer": "/data/attributes/title"
},
"status": "400",
"title": "Bad Request"
}
]
}Unauthorized
API error response.
errors [required]A list of errors.
{
"errors": [
"Bad Request"
]
}Forbidden
API error response.
errors [required]A list of errors.
{
"errors": [
"Bad Request"
]
}The request body exceeds 50 MB as received or 100 MB after decompression.
API error response.
errors [required]A list of errors.
detailA human-readable explanation specific to this occurrence of the error.
metaNon-standard meta-information about the error
sourceReferences to the source of the error.
headerA string indicating the name of a single request header which caused the error.
parameterA string indicating which URI query parameter caused the error.
pointerA JSON pointer to the value in the request document that caused the error.
statusStatus code of the response.
titleShort human-readable summary of the error.
{
"errors": [
{
"detail": "Missing required attribute in body",
"meta": {},
"source": {
"header": "Authorization",
"parameter": "limit",
"pointer": "/data/attributes/title"
},
"status": "400",
"title": "Bad Request"
}
]
}Too many requests
API error response.
errors [required]A list of errors.
detailA human-readable explanation specific to this occurrence of the error.
metaNon-standard meta-information about the error
sourceReferences to the source of the error.
headerA string indicating the name of a single request header which caused the error.
parameterA string indicating which URI query parameter caused the error.
pointerA JSON pointer to the value in the request document that caused the error.
statusStatus code of the response.
titleShort human-readable summary of the error.
{
"errors": [
{
"detail": "Missing required attribute in body",
"meta": {},
"source": {
"header": "Authorization",
"parameter": "limit",
"pointer": "/data/attributes/title"
},
"status": "400",
"title": "Bad Request"
}
]
}The STIX ingestion service returned an error while processing the request.
API error response.
errors [required]A list of errors.
detailA human-readable explanation specific to this occurrence of the error.
metaNon-standard meta-information about the error
sourceReferences to the source of the error.
headerA string indicating the name of a single request header which caused the error.
parameterA string indicating which URI query parameter caused the error.
pointerA JSON pointer to the value in the request document that caused the error.
statusStatus code of the response.
titleShort human-readable summary of the error.
{
"errors": [
{
"detail": "Missing required attribute in body",
"meta": {},
"source": {
"header": "Authorization",
"parameter": "limit",
"pointer": "/data/attributes/title"
},
"status": "400",
"title": "Bad Request"
}
]
}The STIX ingestion service is temporarily unavailable.
API error response.
errors [required]A list of errors.
detailA human-readable explanation specific to this occurrence of the error.
metaNon-standard meta-information about the error
sourceReferences to the source of the error.
headerA string indicating the name of a single request header which caused the error.
parameterA string indicating which URI query parameter caused the error.
pointerA JSON pointer to the value in the request document that caused the error.
statusStatus code of the response.
titleShort human-readable summary of the error.
{
"errors": [
{
"detail": "Missing required attribute in body",
"meta": {},
"source": {
"header": "Authorization",
"parameter": "limit",
"pointer": "/data/attributes/title"
},
"status": "400",
"title": "Bad Request"
}
]
}코드 예시
# Set your Datadog site and credentials
export DD_SITE="datadoghq.com"
# Use a Personal Access Token or Service Access Token
export DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"
curl -X POST "https://api.${DD_SITE}/api/v2/security/threat-intel/stix" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "ti_vendor: acme" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
"id": "bundle--44444444-4444-4444-8444-444444444444",
"objects": [
{
"created": "2026-07-22T12:00:00Z",
"id": "indicator--55555555-5555-4555-8555-555555555555",
"modified": "2026-07-22T12:00:00Z",
"pattern": "[ipv4-addr:value = '198.51.100.42']",
"pattern_type": "stix",
"spec_version": "2.1",
"type": "indicator",
"valid_from": "2026-07-22T12:00:00Z"
}
],
"spec_version": "2.1",
"type": "bundle"
}
EOF# Set your Datadog site and credentials
export DD_SITE="us3.datadoghq.com"
# Use a Personal Access Token or Service Access Token
export DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"
curl -X POST "https://api.${DD_SITE}/api/v2/security/threat-intel/stix" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "ti_vendor: acme" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
"id": "bundle--44444444-4444-4444-8444-444444444444",
"objects": [
{
"created": "2026-07-22T12:00:00Z",
"id": "indicator--55555555-5555-4555-8555-555555555555",
"modified": "2026-07-22T12:00:00Z",
"pattern": "[ipv4-addr:value = '198.51.100.42']",
"pattern_type": "stix",
"spec_version": "2.1",
"type": "indicator",
"valid_from": "2026-07-22T12:00:00Z"
}
],
"spec_version": "2.1",
"type": "bundle"
}
EOF# Set your Datadog site and credentials
export DD_SITE="us5.datadoghq.com"
# Use a Personal Access Token or Service Access Token
export DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"
curl -X POST "https://api.${DD_SITE}/api/v2/security/threat-intel/stix" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "ti_vendor: acme" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
"id": "bundle--44444444-4444-4444-8444-444444444444",
"objects": [
{
"created": "2026-07-22T12:00:00Z",
"id": "indicator--55555555-5555-4555-8555-555555555555",
"modified": "2026-07-22T12:00:00Z",
"pattern": "[ipv4-addr:value = '198.51.100.42']",
"pattern_type": "stix",
"spec_version": "2.1",
"type": "indicator",
"valid_from": "2026-07-22T12:00:00Z"
}
],
"spec_version": "2.1",
"type": "bundle"
}
EOF# Set your Datadog site and credentials
export DD_SITE="datadoghq.eu"
# Use a Personal Access Token or Service Access Token
export DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"
curl -X POST "https://api.${DD_SITE}/api/v2/security/threat-intel/stix" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "ti_vendor: acme" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
"id": "bundle--44444444-4444-4444-8444-444444444444",
"objects": [
{
"created": "2026-07-22T12:00:00Z",
"id": "indicator--55555555-5555-4555-8555-555555555555",
"modified": "2026-07-22T12:00:00Z",
"pattern": "[ipv4-addr:value = '198.51.100.42']",
"pattern_type": "stix",
"spec_version": "2.1",
"type": "indicator",
"valid_from": "2026-07-22T12:00:00Z"
}
],
"spec_version": "2.1",
"type": "bundle"
}
EOF# Set your Datadog site and credentials
export DD_SITE="ap1.datadoghq.com"
# Use a Personal Access Token or Service Access Token
export DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"
curl -X POST "https://api.${DD_SITE}/api/v2/security/threat-intel/stix" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "ti_vendor: acme" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
"id": "bundle--44444444-4444-4444-8444-444444444444",
"objects": [
{
"created": "2026-07-22T12:00:00Z",
"id": "indicator--55555555-5555-4555-8555-555555555555",
"modified": "2026-07-22T12:00:00Z",
"pattern": "[ipv4-addr:value = '198.51.100.42']",
"pattern_type": "stix",
"spec_version": "2.1",
"type": "indicator",
"valid_from": "2026-07-22T12:00:00Z"
}
],
"spec_version": "2.1",
"type": "bundle"
}
EOF# Set your Datadog site and credentials
export DD_SITE="ap2.datadoghq.com"
# Use a Personal Access Token or Service Access Token
export DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"
curl -X POST "https://api.${DD_SITE}/api/v2/security/threat-intel/stix" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "ti_vendor: acme" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
"id": "bundle--44444444-4444-4444-8444-444444444444",
"objects": [
{
"created": "2026-07-22T12:00:00Z",
"id": "indicator--55555555-5555-4555-8555-555555555555",
"modified": "2026-07-22T12:00:00Z",
"pattern": "[ipv4-addr:value = '198.51.100.42']",
"pattern_type": "stix",
"spec_version": "2.1",
"type": "indicator",
"valid_from": "2026-07-22T12:00:00Z"
}
],
"spec_version": "2.1",
"type": "bundle"
}
EOF# Set your Datadog site and credentials
export DD_SITE="uk1.datadoghq.com"
# Use a Personal Access Token or Service Access Token
export DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"
curl -X POST "https://api.${DD_SITE}/api/v2/security/threat-intel/stix" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "ti_vendor: acme" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
"id": "bundle--44444444-4444-4444-8444-444444444444",
"objects": [
{
"created": "2026-07-22T12:00:00Z",
"id": "indicator--55555555-5555-4555-8555-555555555555",
"modified": "2026-07-22T12:00:00Z",
"pattern": "[ipv4-addr:value = '198.51.100.42']",
"pattern_type": "stix",
"spec_version": "2.1",
"type": "indicator",
"valid_from": "2026-07-22T12:00:00Z"
}
],
"spec_version": "2.1",
"type": "bundle"
}
EOF# Set your Datadog site and credentials
export DD_SITE="ddog-gov.com"
# Use a Personal Access Token or Service Access Token
export DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"
curl -X POST "https://api.${DD_SITE}/api/v2/security/threat-intel/stix" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "ti_vendor: acme" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
"id": "bundle--44444444-4444-4444-8444-444444444444",
"objects": [
{
"created": "2026-07-22T12:00:00Z",
"id": "indicator--55555555-5555-4555-8555-555555555555",
"modified": "2026-07-22T12:00:00Z",
"pattern": "[ipv4-addr:value = '198.51.100.42']",
"pattern_type": "stix",
"spec_version": "2.1",
"type": "indicator",
"valid_from": "2026-07-22T12:00:00Z"
}
],
"spec_version": "2.1",
"type": "bundle"
}
EOF# Set your Datadog site and credentials
export DD_SITE="us2.ddog-gov.com"
# Use a Personal Access Token or Service Access Token
export DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"
curl -X POST "https://api.${DD_SITE}/api/v2/security/threat-intel/stix" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "ti_vendor: acme" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
"id": "bundle--44444444-4444-4444-8444-444444444444",
"objects": [
{
"created": "2026-07-22T12:00:00Z",
"id": "indicator--55555555-5555-4555-8555-555555555555",
"modified": "2026-07-22T12:00:00Z",
"pattern": "[ipv4-addr:value = '198.51.100.42']",
"pattern_type": "stix",
"spec_version": "2.1",
"type": "indicator",
"valid_from": "2026-07-22T12:00:00Z"
}
],
"spec_version": "2.1",
"type": "bundle"
}
EOF// Ingest STIX threat intelligence returns "OK" response
package main
import (
"context"
"encoding/json"
"fmt"
"os"
"time"
"github.com/DataDog/datadog-api-client-go/v2/api/datadog"
"github.com/DataDog/datadog-api-client-go/v2/api/datadogV2"
)
func main() {
body := datadogV2.STIXBundleRequest{
Id: "bundle--44444444-4444-4444-8444-444444444444",
Objects: []datadogV2.STIXObject{
{
Created: datadog.PtrTime(time.Date(2026, 7, 22, 12, 0, 0, 0, time.UTC)),
Id: "indicator--55555555-5555-4555-8555-555555555555",
Modified: datadog.PtrTime(time.Date(2026, 7, 22, 12, 0, 0, 0, time.UTC)),
Pattern: datadog.PtrString("[ipv4-addr:value = '198.51.100.42']"),
PatternType: datadogV2.STIXPATTERNTYPE_STIX.Ptr(),
SpecVersion: datadog.PtrString("2.1"),
Type: "indicator",
ValidFrom: datadog.PtrTime(time.Date(2026, 7, 22, 12, 0, 0, 0, time.UTC)),
},
},
SpecVersion: datadogV2.STIXSPECVERSION_VERSION_2_1.Ptr(),
Type: datadogV2.STIXBUNDLETYPE_BUNDLE,
}
ctx := datadog.NewDefaultContext(context.Background())
ctx = context.WithValue(ctx, datadog.ContextAccessToken, os.Getenv("DD_BEARER_TOKEN"))
configuration := datadog.NewConfiguration()
configuration.SetUnstableOperationEnabled("v2.AddSTIXThreatIntel", true)
apiClient := datadog.NewAPIClient(configuration)
api := datadogV2.NewThreatIntelligenceApi(apiClient)
resp, r, err := api.AddSTIXThreatIntel(ctx, "Acme-Inc", body, *datadogV2.NewAddSTIXThreatIntelOptionalParameters())
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `ThreatIntelligenceApi.AddSTIXThreatIntel`: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
responseContent, _ := json.MarshalIndent(resp, "", " ")
fmt.Fprintf(os.Stdout, "Response from `ThreatIntelligenceApi.AddSTIXThreatIntel`:\n%s\n", responseContent)
}
Instructions
First install the library and its dependencies and then save the example to main.go and run following commands:
DD_SITE="datadoghq.com" DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>" go run "main.go"DD_SITE="us3.datadoghq.com" DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>" go run "main.go"DD_SITE="us5.datadoghq.com" DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>" go run "main.go"DD_SITE="datadoghq.eu" DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>" go run "main.go"DD_SITE="ap1.datadoghq.com" DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>" go run "main.go"DD_SITE="ap2.datadoghq.com" DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>" go run "main.go"DD_SITE="uk1.datadoghq.com" DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>" go run "main.go"DD_SITE="ddog-gov.com" DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>" go run "main.go"DD_SITE="us2.ddog-gov.com" DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>" go run "main.go"// Ingest STIX threat intelligence returns "OK" response
import com.datadog.api.client.ApiClient;
import com.datadog.api.client.ApiException;
import com.datadog.api.client.v2.api.ThreatIntelligenceApi;
import com.datadog.api.client.v2.model.STIXBundleRequest;
import com.datadog.api.client.v2.model.STIXBundleType;
import com.datadog.api.client.v2.model.STIXIngestResponse;
import com.datadog.api.client.v2.model.STIXObject;
import com.datadog.api.client.v2.model.STIXPatternType;
import com.datadog.api.client.v2.model.STIXSpecVersion;
import java.time.OffsetDateTime;
import java.util.Collections;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = ApiClient.getDefaultApiClient();
defaultClient.setAccessToken(System.getenv("DD_BEARER_TOKEN"));
defaultClient.setUnstableOperationEnabled("v2.addSTIXThreatIntel", true);
ThreatIntelligenceApi apiInstance = new ThreatIntelligenceApi(defaultClient);
STIXBundleRequest body =
new STIXBundleRequest()
.id("bundle--44444444-4444-4444-8444-444444444444")
.objects(
Collections.singletonList(
new STIXObject()
.created(OffsetDateTime.parse("2026-07-22T12:00:00Z"))
.id("indicator--55555555-5555-4555-8555-555555555555")
.modified(OffsetDateTime.parse("2026-07-22T12:00:00Z"))
.pattern("[ipv4-addr:value = '198.51.100.42']")
.patternType(STIXPatternType.STIX)
.specVersion("2.1")
.type("indicator")
.validFrom(OffsetDateTime.parse("2026-07-22T12:00:00Z"))))
.specVersion(STIXSpecVersion.VERSION_2_1)
.type(STIXBundleType.BUNDLE);
try {
STIXIngestResponse result = apiInstance.addSTIXThreatIntel("Acme-Inc", body);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling ThreatIntelligenceApi#addSTIXThreatIntel");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}
Instructions
First install the library and its dependencies and then save the example to Example.java and run following commands:
DD_SITE="datadoghq.com" DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>" java "Example.java"DD_SITE="us3.datadoghq.com" DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>" java "Example.java"DD_SITE="us5.datadoghq.com" DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>" java "Example.java"DD_SITE="datadoghq.eu" DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>" java "Example.java"DD_SITE="ap1.datadoghq.com" DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>" java "Example.java"DD_SITE="ap2.datadoghq.com" DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>" java "Example.java"DD_SITE="uk1.datadoghq.com" DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>" java "Example.java"DD_SITE="ddog-gov.com" DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>" java "Example.java"DD_SITE="us2.ddog-gov.com" DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>" java "Example.java""""
Ingest STIX threat intelligence returns "OK" response
"""
from os import environ
from datadog_api_client import ApiClient, Configuration
from datadog_api_client.v2.api.threat_intelligence_api import ThreatIntelligenceApi
from datadog_api_client.v2.model.stix_bundle_request import STIXBundleRequest
from datadog_api_client.v2.model.stix_bundle_type import STIXBundleType
from datadog_api_client.v2.model.stix_object import STIXObject
from datadog_api_client.v2.model.stix_pattern_type import STIXPatternType
from datadog_api_client.v2.model.stix_spec_version import STIXSpecVersion
from datetime import datetime
from dateutil.tz import tzutc
body = STIXBundleRequest(
id="bundle--44444444-4444-4444-8444-444444444444",
objects=[
STIXObject(
created=datetime(2026, 7, 22, 12, 0, tzinfo=tzutc()),
id="indicator--55555555-5555-4555-8555-555555555555",
modified=datetime(2026, 7, 22, 12, 0, tzinfo=tzutc()),
pattern="[ipv4-addr:value = '198.51.100.42']",
pattern_type=STIXPatternType.STIX,
spec_version="2.1",
type="indicator",
valid_from=datetime(2026, 7, 22, 12, 0, tzinfo=tzutc()),
),
],
spec_version=STIXSpecVersion.VERSION_2_1,
type=STIXBundleType.BUNDLE,
)
configuration = Configuration()
configuration.access_token = environ["DD_BEARER_TOKEN"]
configuration.unstable_operations["add_stix_threat_intel"] = True
with ApiClient(configuration) as api_client:
api_instance = ThreatIntelligenceApi(api_client)
response = api_instance.add_stix_threat_intel(ti_vendor="Acme-Inc", body=body)
print(response)
Instructions
First install the library and its dependencies and then save the example to example.py and run following commands:
DD_SITE="datadoghq.com" DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>" python3 "example.py"DD_SITE="us3.datadoghq.com" DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>" python3 "example.py"DD_SITE="us5.datadoghq.com" DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>" python3 "example.py"DD_SITE="datadoghq.eu" DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>" python3 "example.py"DD_SITE="ap1.datadoghq.com" DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>" python3 "example.py"DD_SITE="ap2.datadoghq.com" DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>" python3 "example.py"DD_SITE="uk1.datadoghq.com" DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>" python3 "example.py"DD_SITE="ddog-gov.com" DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>" python3 "example.py"DD_SITE="us2.ddog-gov.com" DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>" python3 "example.py"# Ingest STIX threat intelligence returns "OK" response
require "datadog_api_client"
DatadogAPIClient.configure do |config|
config.access_token = ENV["DD_BEARER_TOKEN"]
config.unstable_operations["v2.add_stix_threat_intel".to_sym] = true
end
api_instance = DatadogAPIClient::V2::ThreatIntelligenceAPI.new
body = DatadogAPIClient::V2::STIXBundleRequest.new({
id: "bundle--44444444-4444-4444-8444-444444444444",
objects: [
DatadogAPIClient::V2::STIXObject.new({
created: "2026-07-22T12:00:00Z",
id: "indicator--55555555-5555-4555-8555-555555555555",
modified: "2026-07-22T12:00:00Z",
pattern: "[ipv4-addr:value = '198.51.100.42']",
pattern_type: DatadogAPIClient::V2::STIXPatternType::STIX,
spec_version: "2.1",
type: "indicator",
valid_from: "2026-07-22T12:00:00Z",
}),
],
spec_version: DatadogAPIClient::V2::STIXSpecVersion::VERSION_2_1,
type: DatadogAPIClient::V2::STIXBundleType::BUNDLE,
})
p api_instance.add_stix_threat_intel("Acme-Inc", body)
Instructions
First install the library and its dependencies and then save the example to example.rb and run following commands:
DD_SITE="datadoghq.com" DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>" rb "example.rb"DD_SITE="us3.datadoghq.com" DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>" rb "example.rb"DD_SITE="us5.datadoghq.com" DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>" rb "example.rb"DD_SITE="datadoghq.eu" DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>" rb "example.rb"DD_SITE="ap1.datadoghq.com" DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>" rb "example.rb"DD_SITE="ap2.datadoghq.com" DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>" rb "example.rb"DD_SITE="uk1.datadoghq.com" DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>" rb "example.rb"DD_SITE="ddog-gov.com" DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>" rb "example.rb"DD_SITE="us2.ddog-gov.com" DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>" rb "example.rb"// Ingest STIX threat intelligence returns "OK" response
use chrono::{DateTime, Utc};
use datadog_api_client::datadog;
use datadog_api_client::datadogV2::api_threat_intelligence::AddSTIXThreatIntelOptionalParams;
use datadog_api_client::datadogV2::api_threat_intelligence::ThreatIntelligenceAPI;
use datadog_api_client::datadogV2::model::STIXBundleRequest;
use datadog_api_client::datadogV2::model::STIXBundleType;
use datadog_api_client::datadogV2::model::STIXObject;
use datadog_api_client::datadogV2::model::STIXPatternType;
use datadog_api_client::datadogV2::model::STIXSpecVersion;
#[tokio::main]
async fn main() {
let body = STIXBundleRequest::new(
"bundle--44444444-4444-4444-8444-444444444444".to_string(),
vec![STIXObject::new(
"indicator--55555555-5555-4555-8555-555555555555".to_string(),
"indicator".to_string(),
)
.created(
DateTime::parse_from_rfc3339("2026-07-22T12:00:00+00:00")
.expect("Failed to parse datetime")
.with_timezone(&Utc),
)
.modified(
DateTime::parse_from_rfc3339("2026-07-22T12:00:00+00:00")
.expect("Failed to parse datetime")
.with_timezone(&Utc),
)
.pattern("[ipv4-addr:value = '198.51.100.42']".to_string())
.pattern_type(STIXPatternType::STIX)
.spec_version("2.1".to_string())
.valid_from(
DateTime::parse_from_rfc3339("2026-07-22T12:00:00+00:00")
.expect("Failed to parse datetime")
.with_timezone(&Utc),
)],
STIXBundleType::BUNDLE,
)
.spec_version(STIXSpecVersion::VERSION_2_1);
let mut configuration = datadog::Configuration::new();
configuration.set_unstable_operation_enabled("v2.add_stix_threat_intel", true);
let api = ThreatIntelligenceAPI::with_config(configuration);
let resp = api
.add_stix_threat_intel(
"Acme-Inc".to_string(),
body,
AddSTIXThreatIntelOptionalParams::default(),
)
.await;
if let Ok(value) = resp {
println!("{:#?}", value);
} else {
println!("{:#?}", resp.unwrap_err());
}
}
Instructions
First install the library and its dependencies and then save the example to src/main.rs and run following commands:
DD_SITE="datadoghq.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" cargo runDD_SITE="us3.datadoghq.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" cargo runDD_SITE="us5.datadoghq.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" cargo runDD_SITE="datadoghq.eu" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" cargo runDD_SITE="ap1.datadoghq.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" cargo runDD_SITE="ap2.datadoghq.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" cargo runDD_SITE="uk1.datadoghq.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" cargo runDD_SITE="ddog-gov.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" cargo runDD_SITE="us2.ddog-gov.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" cargo run/**
* Ingest STIX threat intelligence returns "OK" response
*/
import { client, v2 } from "@datadog/datadog-api-client";
const configuration = client.createConfiguration({
authMethods: {
AuthZ: {
accessToken: process.env.DD_BEARER_TOKEN as string,
},
},
});
configuration.unstableOperations["v2.addSTIXThreatIntel"] = true;
const apiInstance = new v2.ThreatIntelligenceApi(configuration);
const params: v2.ThreatIntelligenceApiAddSTIXThreatIntelRequest = {
body: {
id: "bundle--44444444-4444-4444-8444-444444444444",
objects: [
{
created: new Date(2026, 7, 22, 12, 0, 0, 0),
id: "indicator--55555555-5555-4555-8555-555555555555",
modified: new Date(2026, 7, 22, 12, 0, 0, 0),
pattern: "[ipv4-addr:value = '198.51.100.42']",
patternType: "stix",
specVersion: "2.1",
type: "indicator",
validFrom: new Date(2026, 7, 22, 12, 0, 0, 0),
},
],
specVersion: "2.1",
type: "bundle",
},
tiVendor: "Acme-Inc",
};
apiInstance
.addSTIXThreatIntel(params)
.then((data: v2.STIXIngestResponse) => {
console.log(
"API called successfully. Returned data: " + JSON.stringify(data)
);
})
.catch((error: any) => console.error(error));
Instructions
First install the library and its dependencies and then save the example to example.ts and run following commands:
DD_SITE="datadoghq.com" DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>" tsc "example.ts"DD_SITE="us3.datadoghq.com" DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>" tsc "example.ts"DD_SITE="us5.datadoghq.com" DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>" tsc "example.ts"DD_SITE="datadoghq.eu" DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>" tsc "example.ts"DD_SITE="ap1.datadoghq.com" DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>" tsc "example.ts"DD_SITE="ap2.datadoghq.com" DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>" tsc "example.ts"DD_SITE="uk1.datadoghq.com" DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>" tsc "example.ts"DD_SITE="ddog-gov.com" DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>" tsc "example.ts"DD_SITE="us2.ddog-gov.com" DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>" tsc "example.ts"