Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 0 additions & 6 deletions .generator/schemas/v2/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -173432,9 +173432,6 @@ paths:
permissions:
- security_monitoring_findings_write
- appsec_vm_write
x-unstable: |-
**Note**: This endpoint is in preview and is subject to change.
If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).
post:
description: >-
Create ServiceNow tickets for security findings.
Expand Down Expand Up @@ -173505,9 +173502,6 @@ paths:
permissions:
- security_monitoring_findings_write
- appsec_vm_write
x-unstable: |-
**Note**: This endpoint is in preview and is subject to change.
If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).
/api/v2/security/sboms:
get:
description: |-
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = ApiClient.getDefaultApiClient();
defaultClient.setUnstableOperationEnabled("v2.attachServiceNowTicket", true);
SecurityMonitoringApi apiInstance = new SecurityMonitoringApi(defaultClient);

AttachServiceNowTicketRequest body =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = ApiClient.getDefaultApiClient();
defaultClient.setUnstableOperationEnabled("v2.createServiceNowTickets", true);
SecurityMonitoringApi apiInstance = new SecurityMonitoringApi(defaultClient);

CreateServiceNowTicketRequestArray body =
Expand Down
2 changes: 0 additions & 2 deletions src/main/java/com/datadog/api/client/ApiClient.java
Original file line number Diff line number Diff line change
Expand Up @@ -904,7 +904,6 @@ public class ApiClient {
put("v2.getAWSCloudAuthPersonaMapping", false);
put("v2.listAWSCloudAuthPersonaMappings", false);
put("v2.activateContentPack", false);
put("v2.attachServiceNowTicket", false);
put("v2.batchGetSecurityMonitoringDatasetDependencies", false);
put("v2.bulkCreateSampleLogGenerationSubscriptions", false);
put("v2.bulkExportSecurityMonitoringTerraformResources", false);
Expand All @@ -918,7 +917,6 @@ public class ApiClient {
put("v2.createSecurityFindingsAutomationTicketCreationRule", false);
put("v2.createSecurityMonitoringDataset", false);
put("v2.createSecurityMonitoringIntegrationConfig", false);
put("v2.createServiceNowTickets", false);
put("v2.createStaticAnalysisAst", false);
put("v2.createStaticAnalysisServerAnalysis", false);
put("v2.deactivateContentPack", false);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -720,13 +720,6 @@ public CompletableFuture<FindingCaseResponse> attachServiceNowTicketAsync(
*/
public ApiResponse<FindingCaseResponse> attachServiceNowTicketWithHttpInfo(
AttachServiceNowTicketRequest body) throws ApiException {
// Check if unstable operation is enabled
String operationId = "attachServiceNowTicket";
if (apiClient.isUnstableOperationEnabled("v2." + operationId)) {
apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId));
} else {
throw new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId));
}
Object localVarPostBody = body;

// verify the required parameter 'body' is set
Expand Down Expand Up @@ -769,16 +762,6 @@ public ApiResponse<FindingCaseResponse> attachServiceNowTicketWithHttpInfo(
*/
public CompletableFuture<ApiResponse<FindingCaseResponse>>
attachServiceNowTicketWithHttpInfoAsync(AttachServiceNowTicketRequest body) {
// Check if unstable operation is enabled
String operationId = "attachServiceNowTicket";
if (apiClient.isUnstableOperationEnabled("v2." + operationId)) {
apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId));
} else {
CompletableFuture<ApiResponse<FindingCaseResponse>> result = new CompletableFuture<>();
result.completeExceptionally(
new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId)));
return result;
}
Object localVarPostBody = body;

// verify the required parameter 'body' is set
Expand Down Expand Up @@ -5136,13 +5119,6 @@ public CompletableFuture<FindingCaseResponseArray> createServiceNowTicketsAsync(
*/
public ApiResponse<FindingCaseResponseArray> createServiceNowTicketsWithHttpInfo(
CreateServiceNowTicketRequestArray body) throws ApiException {
// Check if unstable operation is enabled
String operationId = "createServiceNowTickets";
if (apiClient.isUnstableOperationEnabled("v2." + operationId)) {
apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId));
} else {
throw new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId));
}
Object localVarPostBody = body;

// verify the required parameter 'body' is set
Expand Down Expand Up @@ -5185,16 +5161,6 @@ public ApiResponse<FindingCaseResponseArray> createServiceNowTicketsWithHttpInfo
*/
public CompletableFuture<ApiResponse<FindingCaseResponseArray>>
createServiceNowTicketsWithHttpInfoAsync(CreateServiceNowTicketRequestArray body) {
// Check if unstable operation is enabled
String operationId = "createServiceNowTickets";
if (apiClient.isUnstableOperationEnabled("v2." + operationId)) {
apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId));
} else {
CompletableFuture<ApiResponse<FindingCaseResponseArray>> result = new CompletableFuture<>();
result.completeExceptionally(
new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId)));
return result;
}
Object localVarPostBody = body;

// verify the required parameter 'body' is set
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -113,24 +113,21 @@ Feature: Security Monitoring

@generated @skip @team:DataDog/k9-investigation
Scenario: Attach security findings to a ServiceNow ticket returns "Bad Request" response
Given operation "AttachServiceNowTicket" enabled
And new "AttachServiceNowTicket" request
Given new "AttachServiceNowTicket" request
And body with value {"data": {"attributes": {"servicenow_ticket_url": "https://example.service-now.com/now/nav/ui/classic/params/target/incident.do?sys_id=abcdef0123456789abcdef0123456789"}, "relationships": {"findings": {"data": [{"id": "ZGVmLTAwcC1pZXJ-aS0wZjhjNjMyZDNmMzRlZTgzNw==", "type": "findings"}]}, "project": {"data": {"id": "aeadc05e-98a8-11ec-ac2c-da7ad0900001", "type": "projects"}}}, "type": "servicenow_tickets"}}
When the request is sent
Then the response status is 400 Bad Request

@generated @skip @team:DataDog/k9-investigation
Scenario: Attach security findings to a ServiceNow ticket returns "Not Found" response
Given operation "AttachServiceNowTicket" enabled
And new "AttachServiceNowTicket" request
Given new "AttachServiceNowTicket" request
And body with value {"data": {"attributes": {"servicenow_ticket_url": "https://example.service-now.com/now/nav/ui/classic/params/target/incident.do?sys_id=abcdef0123456789abcdef0123456789"}, "relationships": {"findings": {"data": [{"id": "ZGVmLTAwcC1pZXJ-aS0wZjhjNjMyZDNmMzRlZTgzNw==", "type": "findings"}]}, "project": {"data": {"id": "aeadc05e-98a8-11ec-ac2c-da7ad0900001", "type": "projects"}}}, "type": "servicenow_tickets"}}
When the request is sent
Then the response status is 404 Not Found

@generated @skip @team:DataDog/k9-investigation
Scenario: Attach security findings to a ServiceNow ticket returns "OK" response
Given operation "AttachServiceNowTicket" enabled
And new "AttachServiceNowTicket" request
Given new "AttachServiceNowTicket" request
And body with value {"data": {"attributes": {"servicenow_ticket_url": "https://example.service-now.com/now/nav/ui/classic/params/target/incident.do?sys_id=abcdef0123456789abcdef0123456789"}, "relationships": {"findings": {"data": [{"id": "ZGVmLTAwcC1pZXJ-aS0wZjhjNjMyZDNmMzRlZTgzNw==", "type": "findings"}]}, "project": {"data": {"id": "aeadc05e-98a8-11ec-ac2c-da7ad0900001", "type": "projects"}}}, "type": "servicenow_tickets"}}
When the request is sent
Then the response status is 200 OK
Expand Down Expand Up @@ -532,24 +529,21 @@ Feature: Security Monitoring

@generated @skip @team:DataDog/k9-investigation
Scenario: Create ServiceNow tickets for security findings returns "Bad Request" response
Given operation "CreateServiceNowTickets" enabled
And new "CreateServiceNowTickets" request
Given new "CreateServiceNowTickets" request
And body with value {"data": [{"attributes": {"assignee_id": "f315bdaf-9ee7-4808-a9c1-99c15bf0f4d0", "description": "A description of the ServiceNow ticket.", "priority": "NOT_DEFINED", "title": "A title for the ServiceNow ticket."}, "relationships": {"findings": {"data": [{"id": "ZGVmLTAwcC1pZXJ-aS0wZjhjNjMyZDNmMzRlZTgzNw==", "type": "findings"}]}, "project": {"data": {"id": "aeadc05e-98a8-11ec-ac2c-da7ad0900001", "type": "projects"}}}, "type": "servicenow_tickets"}]}
When the request is sent
Then the response status is 400 Bad Request

@generated @skip @team:DataDog/k9-investigation
Scenario: Create ServiceNow tickets for security findings returns "Created" response
Given operation "CreateServiceNowTickets" enabled
And new "CreateServiceNowTickets" request
Given new "CreateServiceNowTickets" request
And body with value {"data": [{"attributes": {"assignee_id": "f315bdaf-9ee7-4808-a9c1-99c15bf0f4d0", "description": "A description of the ServiceNow ticket.", "priority": "NOT_DEFINED", "title": "A title for the ServiceNow ticket."}, "relationships": {"findings": {"data": [{"id": "ZGVmLTAwcC1pZXJ-aS0wZjhjNjMyZDNmMzRlZTgzNw==", "type": "findings"}]}, "project": {"data": {"id": "aeadc05e-98a8-11ec-ac2c-da7ad0900001", "type": "projects"}}}, "type": "servicenow_tickets"}]}
When the request is sent
Then the response status is 201 Created

@generated @skip @team:DataDog/k9-investigation
Scenario: Create ServiceNow tickets for security findings returns "Not Found" response
Given operation "CreateServiceNowTickets" enabled
And new "CreateServiceNowTickets" request
Given new "CreateServiceNowTickets" request
And body with value {"data": [{"attributes": {"assignee_id": "f315bdaf-9ee7-4808-a9c1-99c15bf0f4d0", "description": "A description of the ServiceNow ticket.", "priority": "NOT_DEFINED", "title": "A title for the ServiceNow ticket."}, "relationships": {"findings": {"data": [{"id": "ZGVmLTAwcC1pZXJ-aS0wZjhjNjMyZDNmMzRlZTgzNw==", "type": "findings"}]}, "project": {"data": {"id": "aeadc05e-98a8-11ec-ac2c-da7ad0900001", "type": "projects"}}}, "type": "servicenow_tickets"}]}
When the request is sent
Then the response status is 404 Not Found
Expand Down
Loading