Skip to content

Commit 23c463f

Browse files
api-clients-generation-pipeline[bot]ci.datadog-api-spec
andauthored
Add support for configuring Splunk sourcetype in Custom Destinations (#3803)
Co-authored-by: ci.datadog-api-spec <packages@datadoghq.com>
1 parent 890705a commit 23c463f

File tree

34 files changed

+1865
-0
lines changed

34 files changed

+1865
-0
lines changed

.generator/schemas/v2/openapi.yaml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18216,6 +18216,16 @@ components:
1821618216
Must have HTTPS scheme and forwarding back to Datadog is not allowed.
1821718217
example: https://example.com
1821818218
type: string
18219+
sourcetype:
18220+
description: |-
18221+
The Splunk sourcetype for the events sent to this Splunk destination.
18222+
18223+
If absent, the default sourcetype `_json` is used. If set to null, the `sourcetype`
18224+
field is omitted from the Splunk HEC payload entirely. Otherwise, the provided string
18225+
value is used as the sourcetype.
18226+
example: my-source
18227+
nullable: true
18228+
type: string
1821918229
type:
1822018230
$ref: "#/components/schemas/CustomDestinationForwardDestinationSplunkType"
1822118231
required:
@@ -18491,6 +18501,16 @@ components:
1849118501
Must have HTTPS scheme and forwarding back to Datadog is not allowed.
1849218502
example: https://example.com
1849318503
type: string
18504+
sourcetype:
18505+
description: |-
18506+
The Splunk sourcetype for the events sent to this Splunk destination.
18507+
18508+
If absent, the default sourcetype `_json` is used. If set to null, the `sourcetype`
18509+
field is omitted from the Splunk HEC payload entirely. Otherwise, the provided string
18510+
value is used as the sourcetype.
18511+
example: my-source
18512+
nullable: true
18513+
type: string
1849418514
type:
1849518515
$ref: "#/components/schemas/CustomDestinationResponseForwardDestinationSplunkType"
1849618516
required:
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
"2026-03-25T16:23:47.455Z"
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,109 @@
1+
{
2+
"log": {
3+
"_recordingName": "Logs Custom Destinations/Create a Splunk custom destination with a null sourcetype returns \"OK\" response",
4+
"creator": {
5+
"comment": "persister:fs",
6+
"name": "Polly.JS",
7+
"version": "6.0.5"
8+
},
9+
"entries": [
10+
{
11+
"_id": "896b2ffddef9ece3cfc55bf21df0cd79",
12+
"_order": 0,
13+
"cache": {},
14+
"request": {
15+
"bodySize": 263,
16+
"cookies": [],
17+
"headers": [
18+
{
19+
"_fromType": "array",
20+
"name": "accept",
21+
"value": "application/json"
22+
},
23+
{
24+
"_fromType": "array",
25+
"name": "content-type",
26+
"value": "application/json"
27+
}
28+
],
29+
"headersSize": 592,
30+
"httpVersion": "HTTP/1.1",
31+
"method": "POST",
32+
"postData": {
33+
"mimeType": "application/json",
34+
"params": [],
35+
"text": "{\"data\":{\"attributes\":{\"enabled\":false,\"forward_tags\":false,\"forwarder_destination\":{\"access_token\":\"my-access-token\",\"endpoint\":\"https://example.com\",\"sourcetype\":null,\"type\":\"splunk_hec\"},\"name\":\"Nginx logs\",\"query\":\"source:nginx\"},\"type\":\"custom_destination\"}}"
36+
},
37+
"queryString": [],
38+
"url": "https://api.datadoghq.com/api/v2/logs/config/custom-destinations"
39+
},
40+
"response": {
41+
"bodySize": 360,
42+
"content": {
43+
"mimeType": "application/json",
44+
"size": 360,
45+
"text": "{\"data\":{\"id\":\"d328c779-9b3b-41c7-a952-20a7446eb7d1\",\"attributes\":{\"name\":\"Nginx logs\",\"query\":\"source:nginx\",\"enabled\":false,\"forwarder_destination\":{\"endpoint\":\"https://example.com\",\"type\":\"splunk_hec\",\"sourcetype\":null},\"forward_tags_restriction_list_type\":\"ALLOW_LIST\",\"forward_tags_restriction_list\":[],\"forward_tags\":false},\"type\":\"custom_destination\"}}\n"
46+
},
47+
"cookies": [],
48+
"headers": [
49+
{
50+
"name": "content-type",
51+
"value": "application/json"
52+
}
53+
],
54+
"headersSize": 713,
55+
"httpVersion": "HTTP/1.1",
56+
"redirectURL": "",
57+
"status": 200,
58+
"statusText": "OK"
59+
},
60+
"startedDateTime": "2026-03-25T16:23:48.102Z",
61+
"time": 518
62+
},
63+
{
64+
"_id": "b0c9326a11bd84d51c31e1565da92ef4",
65+
"_order": 0,
66+
"cache": {},
67+
"request": {
68+
"bodySize": 0,
69+
"cookies": [],
70+
"headers": [
71+
{
72+
"_fromType": "array",
73+
"name": "accept",
74+
"value": "*/*"
75+
}
76+
],
77+
"headersSize": 565,
78+
"httpVersion": "HTTP/1.1",
79+
"method": "DELETE",
80+
"queryString": [],
81+
"url": "https://api.datadoghq.com/api/v2/logs/config/custom-destinations/d328c779-9b3b-41c7-a952-20a7446eb7d1"
82+
},
83+
"response": {
84+
"bodySize": 0,
85+
"content": {
86+
"mimeType": "text/html; charset=utf-8",
87+
"size": 0
88+
},
89+
"cookies": [],
90+
"headers": [
91+
{
92+
"name": "content-type",
93+
"value": "text/html; charset=utf-8"
94+
}
95+
],
96+
"headersSize": 700,
97+
"httpVersion": "HTTP/1.1",
98+
"redirectURL": "",
99+
"status": 204,
100+
"statusText": "No Content"
101+
},
102+
"startedDateTime": "2026-03-25T16:23:48.629Z",
103+
"time": 374
104+
}
105+
],
106+
"pages": [],
107+
"version": "1.2"
108+
}
109+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
"2026-03-25T16:23:49.008Z"
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,109 @@
1+
{
2+
"log": {
3+
"_recordingName": "Logs Custom Destinations/Create a Splunk custom destination with a sourcetype returns \"OK\" response",
4+
"creator": {
5+
"comment": "persister:fs",
6+
"name": "Polly.JS",
7+
"version": "6.0.5"
8+
},
9+
"entries": [
10+
{
11+
"_id": "e40e6584080a0a976abbaac7f44042c6",
12+
"_order": 0,
13+
"cache": {},
14+
"request": {
15+
"bodySize": 274,
16+
"cookies": [],
17+
"headers": [
18+
{
19+
"_fromType": "array",
20+
"name": "accept",
21+
"value": "application/json"
22+
},
23+
{
24+
"_fromType": "array",
25+
"name": "content-type",
26+
"value": "application/json"
27+
}
28+
],
29+
"headersSize": 592,
30+
"httpVersion": "HTTP/1.1",
31+
"method": "POST",
32+
"postData": {
33+
"mimeType": "application/json",
34+
"params": [],
35+
"text": "{\"data\":{\"attributes\":{\"enabled\":false,\"forward_tags\":false,\"forwarder_destination\":{\"access_token\":\"my-access-token\",\"endpoint\":\"https://example.com\",\"sourcetype\":\"my-sourcetype\",\"type\":\"splunk_hec\"},\"name\":\"Nginx logs\",\"query\":\"source:nginx\"},\"type\":\"custom_destination\"}}"
36+
},
37+
"queryString": [],
38+
"url": "https://api.datadoghq.com/api/v2/logs/config/custom-destinations"
39+
},
40+
"response": {
41+
"bodySize": 371,
42+
"content": {
43+
"mimeType": "application/json",
44+
"size": 371,
45+
"text": "{\"data\":{\"id\":\"429e154f-5cf5-41ce-ae15-4bc41563f46f\",\"attributes\":{\"name\":\"Nginx logs\",\"query\":\"source:nginx\",\"enabled\":false,\"forwarder_destination\":{\"endpoint\":\"https://example.com\",\"type\":\"splunk_hec\",\"sourcetype\":\"my-sourcetype\"},\"forward_tags_restriction_list_type\":\"ALLOW_LIST\",\"forward_tags_restriction_list\":[],\"forward_tags\":false},\"type\":\"custom_destination\"}}\n"
46+
},
47+
"cookies": [],
48+
"headers": [
49+
{
50+
"name": "content-type",
51+
"value": "application/json"
52+
}
53+
],
54+
"headersSize": 713,
55+
"httpVersion": "HTTP/1.1",
56+
"redirectURL": "",
57+
"status": 200,
58+
"statusText": "OK"
59+
},
60+
"startedDateTime": "2026-03-25T16:23:49.010Z",
61+
"time": 648
62+
},
63+
{
64+
"_id": "6f5cc353eb8006ad8ba4a0b573ec4fe5",
65+
"_order": 0,
66+
"cache": {},
67+
"request": {
68+
"bodySize": 0,
69+
"cookies": [],
70+
"headers": [
71+
{
72+
"_fromType": "array",
73+
"name": "accept",
74+
"value": "*/*"
75+
}
76+
],
77+
"headersSize": 566,
78+
"httpVersion": "HTTP/1.1",
79+
"method": "DELETE",
80+
"queryString": [],
81+
"url": "https://api.datadoghq.com/api/v2/logs/config/custom-destinations/429e154f-5cf5-41ce-ae15-4bc41563f46f"
82+
},
83+
"response": {
84+
"bodySize": 0,
85+
"content": {
86+
"mimeType": "text/html; charset=utf-8",
87+
"size": 0
88+
},
89+
"cookies": [],
90+
"headers": [
91+
{
92+
"name": "content-type",
93+
"value": "text/html; charset=utf-8"
94+
}
95+
],
96+
"headersSize": 700,
97+
"httpVersion": "HTTP/1.1",
98+
"redirectURL": "",
99+
"status": 204,
100+
"statusText": "No Content"
101+
},
102+
"startedDateTime": "2026-03-25T16:23:49.664Z",
103+
"time": 543
104+
}
105+
],
106+
"pages": [],
107+
"version": "1.2"
108+
}
109+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
"2026-03-25T16:23:50.210Z"
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,109 @@
1+
{
2+
"log": {
3+
"_recordingName": "Logs Custom Destinations/Create a Splunk custom destination with an empty string sourcetype returns \"OK\" response",
4+
"creator": {
5+
"comment": "persister:fs",
6+
"name": "Polly.JS",
7+
"version": "6.0.5"
8+
},
9+
"entries": [
10+
{
11+
"_id": "8f9868734882068ec4ad8e924082c5d3",
12+
"_order": 0,
13+
"cache": {},
14+
"request": {
15+
"bodySize": 261,
16+
"cookies": [],
17+
"headers": [
18+
{
19+
"_fromType": "array",
20+
"name": "accept",
21+
"value": "application/json"
22+
},
23+
{
24+
"_fromType": "array",
25+
"name": "content-type",
26+
"value": "application/json"
27+
}
28+
],
29+
"headersSize": 592,
30+
"httpVersion": "HTTP/1.1",
31+
"method": "POST",
32+
"postData": {
33+
"mimeType": "application/json",
34+
"params": [],
35+
"text": "{\"data\":{\"attributes\":{\"enabled\":false,\"forward_tags\":false,\"forwarder_destination\":{\"access_token\":\"my-access-token\",\"endpoint\":\"https://example.com\",\"sourcetype\":\"\",\"type\":\"splunk_hec\"},\"name\":\"Nginx logs\",\"query\":\"source:nginx\"},\"type\":\"custom_destination\"}}"
36+
},
37+
"queryString": [],
38+
"url": "https://api.datadoghq.com/api/v2/logs/config/custom-destinations"
39+
},
40+
"response": {
41+
"bodySize": 358,
42+
"content": {
43+
"mimeType": "application/json",
44+
"size": 358,
45+
"text": "{\"data\":{\"id\":\"cb6c24f4-f420-42dd-bc86-ce51e03f7968\",\"attributes\":{\"name\":\"Nginx logs\",\"query\":\"source:nginx\",\"enabled\":false,\"forwarder_destination\":{\"endpoint\":\"https://example.com\",\"type\":\"splunk_hec\",\"sourcetype\":\"\"},\"forward_tags_restriction_list_type\":\"ALLOW_LIST\",\"forward_tags_restriction_list\":[],\"forward_tags\":false},\"type\":\"custom_destination\"}}\n"
46+
},
47+
"cookies": [],
48+
"headers": [
49+
{
50+
"name": "content-type",
51+
"value": "application/json"
52+
}
53+
],
54+
"headersSize": 713,
55+
"httpVersion": "HTTP/1.1",
56+
"redirectURL": "",
57+
"status": 200,
58+
"statusText": "OK"
59+
},
60+
"startedDateTime": "2026-03-25T16:23:50.213Z",
61+
"time": 1034
62+
},
63+
{
64+
"_id": "2868263b6837d9dc48b20187b7a96820",
65+
"_order": 0,
66+
"cache": {},
67+
"request": {
68+
"bodySize": 0,
69+
"cookies": [],
70+
"headers": [
71+
{
72+
"_fromType": "array",
73+
"name": "accept",
74+
"value": "*/*"
75+
}
76+
],
77+
"headersSize": 566,
78+
"httpVersion": "HTTP/1.1",
79+
"method": "DELETE",
80+
"queryString": [],
81+
"url": "https://api.datadoghq.com/api/v2/logs/config/custom-destinations/cb6c24f4-f420-42dd-bc86-ce51e03f7968"
82+
},
83+
"response": {
84+
"bodySize": 0,
85+
"content": {
86+
"mimeType": "text/html; charset=utf-8",
87+
"size": 0
88+
},
89+
"cookies": [],
90+
"headers": [
91+
{
92+
"name": "content-type",
93+
"value": "text/html; charset=utf-8"
94+
}
95+
],
96+
"headersSize": 699,
97+
"httpVersion": "HTTP/1.1",
98+
"redirectURL": "",
99+
"status": 204,
100+
"statusText": "No Content"
101+
},
102+
"startedDateTime": "2026-03-25T16:23:51.253Z",
103+
"time": 510
104+
}
105+
],
106+
"pages": [],
107+
"version": "1.2"
108+
}
109+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
"2026-03-25T16:23:51.766Z"

0 commit comments

Comments
 (0)