Skip to content

Commit eabfde6

Browse files
api-clients-generation-pipeline[bot]ci.datadog-api-spec
andauthored
Remove x-unstable property from security findings Jira issues endpoints (DataDog#3629)
Co-authored-by: ci.datadog-api-spec <packages@datadoghq.com>
1 parent cb16565 commit eabfde6

18 files changed

Lines changed: 389 additions & 57 deletions

.generator/schemas/v2/openapi.yaml

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -13778,7 +13778,8 @@ components:
1377813778
description: Attributes of the Jira issue to create.
1377913779
properties:
1378013780
assignee_id:
13781-
description: Unique identifier of the user assigned to the Jira issue.
13781+
description: Unique identifier of the Datadog user assigned to the Jira
13782+
issue.
1378213783
example: f315bdaf-9ee7-4808-a9c1-99c15bf0f4d0
1378313784
type: string
1378413785
description:
@@ -13799,8 +13800,9 @@ components:
1379913800
type: object
1380013801
priority:
1380113802
$ref: '#/components/schemas/CasePriority'
13802-
description: Priority of the Jira issue. If not provided, the priority will
13803-
be automatically set to "NOT_DEFINED".
13803+
description: Datadog case priority mapped to the Jira issue priority. If
13804+
not provided, the priority will be automatically set to "NOT_DEFINED".
13805+
To configure the mapping, see [Bidirectional ticket syncing with Jira](https://docs.datadoghq.com/security/ticketing_integrations/#bidirectional-ticket-syncing-with-jira).
1380413806
example: P4
1380513807
title:
1380613808
description: Title of the Jira issue. If not provided, the title will be
@@ -87819,9 +87821,6 @@ paths:
8781987821
permissions:
8782087822
- security_monitoring_findings_write
8782187823
- appsec_vm_write
87822-
x-unstable: '**Note**: This endpoint is in beta and is subject to change.
87823-
87824-
Please check the documentation regularly for updates.'
8782587824
post:
8782687825
description: 'Create Jira issues for security findings.
8782787826

@@ -87865,9 +87864,6 @@ paths:
8786587864
permissions:
8786687865
- security_monitoring_findings_write
8786787866
- appsec_vm_write
87868-
x-unstable: '**Note**: This endpoint is in beta and is subject to change.
87869-
87870-
Please check the documentation regularly for updates.'
8787187867
/api/v2/security/findings/search:
8787287868
post:
8787387869
description: 'Get a list of security findings that match a search query. [See

api/datadog/configuration.go

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -672,10 +672,8 @@ func NewConfiguration() *Configuration {
672672
"v2.GetOpenAPI": false,
673673
"v2.ListAPIs": false,
674674
"v2.UpdateOpenAPI": false,
675-
"v2.AttachJiraIssue": false,
676675
"v2.CancelThreatHuntingJob": false,
677676
"v2.ConvertJobResultToSignal": false,
678-
"v2.CreateJiraIssues": false,
679677
"v2.DeleteThreatHuntingJob": false,
680678
"v2.GetFinding": false,
681679
"v2.GetRuleVersionHistory": false,

api/datadogV2/api_security_monitoring.go

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -112,15 +112,6 @@ func (a *SecurityMonitoringApi) AttachJiraIssue(ctx _context.Context, body Attac
112112
localVarReturnValue FindingCaseResponse
113113
)
114114

115-
operationId := "v2.AttachJiraIssue"
116-
isOperationEnabled := a.Client.Cfg.IsUnstableOperationEnabled(operationId)
117-
if !isOperationEnabled {
118-
return localVarReturnValue, nil, datadog.GenericOpenAPIError{ErrorMessage: _fmt.Sprintf("Unstable operation '%s' is disabled", operationId)}
119-
}
120-
if isOperationEnabled && a.Client.Cfg.Debug {
121-
_log.Printf("WARNING: Using unstable operation '%s'", operationId)
122-
}
123-
124115
localBasePath, err := a.Client.Cfg.ServerURLWithContext(ctx, "v2.SecurityMonitoringApi.AttachJiraIssue")
125116
if err != nil {
126117
return localVarReturnValue, nil, datadog.GenericOpenAPIError{ErrorMessage: err.Error()}
@@ -763,15 +754,6 @@ func (a *SecurityMonitoringApi) CreateJiraIssues(ctx _context.Context, body Crea
763754
localVarReturnValue FindingCaseResponseArray
764755
)
765756

766-
operationId := "v2.CreateJiraIssues"
767-
isOperationEnabled := a.Client.Cfg.IsUnstableOperationEnabled(operationId)
768-
if !isOperationEnabled {
769-
return localVarReturnValue, nil, datadog.GenericOpenAPIError{ErrorMessage: _fmt.Sprintf("Unstable operation '%s' is disabled", operationId)}
770-
}
771-
if isOperationEnabled && a.Client.Cfg.Debug {
772-
_log.Printf("WARNING: Using unstable operation '%s'", operationId)
773-
}
774-
775757
localBasePath, err := a.Client.Cfg.ServerURLWithContext(ctx, "v2.SecurityMonitoringApi.CreateJiraIssues")
776758
if err != nil {
777759
return localVarReturnValue, nil, datadog.GenericOpenAPIError{ErrorMessage: err.Error()}

api/datadogV2/model_create_jira_issue_request_data_attributes.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import (
1010

1111
// CreateJiraIssueRequestDataAttributes Attributes of the Jira issue to create.
1212
type CreateJiraIssueRequestDataAttributes struct {
13-
// Unique identifier of the user assigned to the Jira issue.
13+
// Unique identifier of the Datadog user assigned to the Jira issue.
1414
AssigneeId *string `json:"assignee_id,omitempty"`
1515
// Description of the Jira issue. If not provided, the description will be automatically generated.
1616
Description *string `json:"description,omitempty"`

examples/v2/security-monitoring/CreateJiraIssues.go

Lines changed: 26 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -17,28 +17,44 @@ func main() {
1717
Data: []datadogV2.CreateJiraIssueRequestData{
1818
{
1919
Attributes: &datadogV2.CreateJiraIssueRequestDataAttributes{
20-
AssigneeId: datadog.PtrString("f315bdaf-9ee7-4808-a9c1-99c15bf0f4d0"),
21-
Description: datadog.PtrString("A description of the Jira issue."),
22-
Fields: map[string]interface{}{
23-
"key1": "value",
24-
"key2": "['value']",
25-
"key3": "{'key4': 'value'}",
20+
Title: datadog.PtrString("A title"),
21+
Description: datadog.PtrString("A description"),
22+
},
23+
Relationships: &datadogV2.CreateJiraIssueRequestDataRelationships{
24+
Findings: datadogV2.Findings{
25+
Data: []datadogV2.FindingData{
26+
{
27+
Id: "eWswLWJsdC1hZm5-aS0wMjRlYTgwMzVkZTU1MGIwYQ==",
28+
Type: datadogV2.FINDINGDATATYPE_FINDINGS,
29+
},
30+
},
31+
},
32+
Project: datadogV2.CaseManagementProject{
33+
Data: datadogV2.CaseManagementProjectData{
34+
Id: "959a6f71-bac8-4027-b1d3-2264f569296f",
35+
Type: datadogV2.CASEMANAGEMENTPROJECTDATATYPE_PROJECTS,
36+
},
2637
},
27-
Priority: datadogV2.CASEPRIORITY_NOT_DEFINED.Ptr(),
28-
Title: datadog.PtrString("A title for the Jira issue."),
38+
},
39+
Type: datadogV2.JIRAISSUESDATATYPE_JIRA_ISSUES,
40+
},
41+
{
42+
Attributes: &datadogV2.CreateJiraIssueRequestDataAttributes{
43+
Title: datadog.PtrString("A title"),
44+
Description: datadog.PtrString("A description"),
2945
},
3046
Relationships: &datadogV2.CreateJiraIssueRequestDataRelationships{
3147
Findings: datadogV2.Findings{
3248
Data: []datadogV2.FindingData{
3349
{
34-
Id: "ZGVmLTAwcC1pZXJ-aS0wZjhjNjMyZDNmMzRlZTgzNw==",
50+
Id: "a3ZoLXNjbS14eXV-aS0wNWY5MGYwMGE4NDg2ODdlOA==",
3551
Type: datadogV2.FINDINGDATATYPE_FINDINGS,
3652
},
3753
},
3854
},
3955
Project: datadogV2.CaseManagementProject{
4056
Data: datadogV2.CaseManagementProjectData{
41-
Id: "aeadc05e-98a8-11ec-ac2c-da7ad0900001",
57+
Id: "959a6f71-bac8-4027-b1d3-2264f569296f",
4258
Type: datadogV2.CASEMANAGEMENTPROJECTDATATYPE_PROJECTS,
4359
},
4460
},
@@ -49,7 +65,6 @@ func main() {
4965
}
5066
ctx := datadog.NewDefaultContext(context.Background())
5167
configuration := datadog.NewConfiguration()
52-
configuration.SetUnstableOperationEnabled("v2.CreateJiraIssues", true)
5368
apiClient := datadog.NewAPIClient(configuration)
5469
api := datadogV2.NewSecurityMonitoringApi(apiClient)
5570
resp, r, err := api.CreateJiraIssues(ctx, body)
Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
// Create Jira issue for security finding returns "Created" response
2+
3+
package main
4+
5+
import (
6+
"context"
7+
"encoding/json"
8+
"fmt"
9+
"os"
10+
11+
"github.com/DataDog/datadog-api-client-go/v2/api/datadog"
12+
"github.com/DataDog/datadog-api-client-go/v2/api/datadogV2"
13+
)
14+
15+
func main() {
16+
body := datadogV2.CreateJiraIssueRequestArray{
17+
Data: []datadogV2.CreateJiraIssueRequestData{
18+
{
19+
Attributes: &datadogV2.CreateJiraIssueRequestDataAttributes{
20+
Title: datadog.PtrString("A title"),
21+
Description: datadog.PtrString("A description"),
22+
},
23+
Relationships: &datadogV2.CreateJiraIssueRequestDataRelationships{
24+
Findings: datadogV2.Findings{
25+
Data: []datadogV2.FindingData{
26+
{
27+
Id: "YmNlZmJhYTcyMDU5ZDk0ZDhiNjRmNGI0NDk4MDdiNzN-MDJlMjg0NzNmYzJiODY2MzJkNjU0OTI4NmVhZTUyY2U=",
28+
Type: datadogV2.FINDINGDATATYPE_FINDINGS,
29+
},
30+
},
31+
},
32+
Project: datadogV2.CaseManagementProject{
33+
Data: datadogV2.CaseManagementProjectData{
34+
Id: "959a6f71-bac8-4027-b1d3-2264f569296f",
35+
Type: datadogV2.CASEMANAGEMENTPROJECTDATATYPE_PROJECTS,
36+
},
37+
},
38+
},
39+
Type: datadogV2.JIRAISSUESDATATYPE_JIRA_ISSUES,
40+
},
41+
},
42+
}
43+
ctx := datadog.NewDefaultContext(context.Background())
44+
configuration := datadog.NewConfiguration()
45+
apiClient := datadog.NewAPIClient(configuration)
46+
api := datadogV2.NewSecurityMonitoringApi(apiClient)
47+
resp, r, err := api.CreateJiraIssues(ctx, body)
48+
49+
if err != nil {
50+
fmt.Fprintf(os.Stderr, "Error when calling `SecurityMonitoringApi.CreateJiraIssues`: %v\n", err)
51+
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
52+
}
53+
54+
responseContent, _ := json.MarshalIndent(resp, "", " ")
55+
fmt.Fprintf(os.Stdout, "Response from `SecurityMonitoringApi.CreateJiraIssues`:\n%s\n", responseContent)
56+
}
Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
// Create Jira issue for security findings returns "Created" response
2+
3+
package main
4+
5+
import (
6+
"context"
7+
"encoding/json"
8+
"fmt"
9+
"os"
10+
11+
"github.com/DataDog/datadog-api-client-go/v2/api/datadog"
12+
"github.com/DataDog/datadog-api-client-go/v2/api/datadogV2"
13+
)
14+
15+
func main() {
16+
body := datadogV2.CreateJiraIssueRequestArray{
17+
Data: []datadogV2.CreateJiraIssueRequestData{
18+
{
19+
Attributes: &datadogV2.CreateJiraIssueRequestDataAttributes{
20+
Title: datadog.PtrString("A title"),
21+
Description: datadog.PtrString("A description"),
22+
},
23+
Relationships: &datadogV2.CreateJiraIssueRequestDataRelationships{
24+
Findings: datadogV2.Findings{
25+
Data: []datadogV2.FindingData{
26+
{
27+
Id: "a3ZoLXNjbS14eXV-aS0wNWY5MGYwMGE4NDg2ODdlOA==",
28+
Type: datadogV2.FINDINGDATATYPE_FINDINGS,
29+
},
30+
{
31+
Id: "eWswLWJsdC1hZm5-aS0wMjRlYTgwMzVkZTU1MGIwYQ==",
32+
Type: datadogV2.FINDINGDATATYPE_FINDINGS,
33+
},
34+
},
35+
},
36+
Project: datadogV2.CaseManagementProject{
37+
Data: datadogV2.CaseManagementProjectData{
38+
Id: "959a6f71-bac8-4027-b1d3-2264f569296f",
39+
Type: datadogV2.CASEMANAGEMENTPROJECTDATATYPE_PROJECTS,
40+
},
41+
},
42+
},
43+
Type: datadogV2.JIRAISSUESDATATYPE_JIRA_ISSUES,
44+
},
45+
},
46+
}
47+
ctx := datadog.NewDefaultContext(context.Background())
48+
configuration := datadog.NewConfiguration()
49+
apiClient := datadog.NewAPIClient(configuration)
50+
api := datadogV2.NewSecurityMonitoringApi(apiClient)
51+
resp, r, err := api.CreateJiraIssues(ctx, body)
52+
53+
if err != nil {
54+
fmt.Fprintf(os.Stderr, "Error when calling `SecurityMonitoringApi.CreateJiraIssues`: %v\n", err)
55+
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
56+
}
57+
58+
responseContent, _ := json.MarshalIndent(resp, "", " ")
59+
fmt.Fprintf(os.Stdout, "Response from `SecurityMonitoringApi.CreateJiraIssues`:\n%s\n", responseContent)
60+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
2026-01-02T17:04:07.979Z
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
interactions:
2+
- request:
3+
body: |
4+
{"data":[{"attributes":{"description":"A description","title":"A title"},"relationships":{"findings":{"data":[{"id":"YmNlZmJhYTcyMDU5ZDk0ZDhiNjRmNGI0NDk4MDdiNzN-MDJlMjg0NzNmYzJiODY2MzJkNjU0OTI4NmVhZTUyY2U=","type":"findings"}]},"project":{"data":{"id":"959a6f71-bac8-4027-b1d3-2264f569296f","type":"projects"}}},"type":"jira_issues"}]}
5+
form: {}
6+
headers:
7+
Accept:
8+
- application/json
9+
Content-Type:
10+
- application/json
11+
id: 0
12+
method: POST
13+
url: https://api.datadoghq.com/api/v2/security/findings/jira_issues
14+
response:
15+
body: '{"data":[{"id":"b5b9ee39-29f8-4b84-a878-28e597e2a33f","type":"cases","attributes":{"created_at":"2026-01-02T17:04:10.514692Z","creation_source":"CS_SECURITY_FINDING","description":"A
16+
description","insights":[{"type":"SECURITY_FINDING","ref":"/security/csm/vm?query=%40workflow.integrations.cases.id%3A%2A\u0026vulnerability=bcefbaa72059d94d8b64f4b449807b73","resource_id":"YmNlZmJhYTcyMDU5ZDk0ZDhiNjRmNGI0NDk4MDdiNzN-MDJlMjg0NzNmYzJiODY2MzJkNjU0OTI4NmVhZTUyY2U="}],"jira_issue":{"status":"COMPLETED","result":{"issue_id":"2523546","issue_key":"CSMSEC-105847","issue_url":"https://datadoghq-sandbox-538.atlassian.net/browse/CSMSEC-105847","account_id":"fdcffa62-24ab-4914-a195-a22bdc607030"}},"key":"CSMINV-521","modified_at":"2026-01-02T17:04:11.504549Z","priority":"P4","status":"OPEN","status_group":"SG_OPEN","status_name":"Open","title":"A
17+
title","type":"SECURITY"},"relationships":{"created_by":{"data":{"id":"dc09afab-6ae7-11ef-92b1-828dac1b0195","type":"users"}},"project":{"data":{"id":"959a6f71-bac8-4027-b1d3-2264f569296f","type":"projects"}}}}]}'
18+
code: 201
19+
duration: 0ms
20+
headers:
21+
Content-Type:
22+
- application/vnd.api+json
23+
status: 201 Created
24+
- request:
25+
body: |
26+
{"data":{"relationships":{"findings":{"data":[{"id":"YmNlZmJhYTcyMDU5ZDk0ZDhiNjRmNGI0NDk4MDdiNzN-MDJlMjg0NzNmYzJiODY2MzJkNjU0OTI4NmVhZTUyY2U=","type":"findings"}]}},"type":"cases"}}
27+
form: {}
28+
headers:
29+
Accept:
30+
- '*/*'
31+
Content-Type:
32+
- application/json
33+
id: 1
34+
method: DELETE
35+
url: https://api.datadoghq.com/api/v2/security/findings/cases
36+
response:
37+
body: ''
38+
code: 204
39+
duration: 0ms
40+
headers: {}
41+
status: 204 No Content
42+
version: 2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
2026-01-02T17:21:33.080Z

0 commit comments

Comments
 (0)