diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index 59c7b8b08ef..be9a2271b2b 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -458,20 +458,6 @@ components: items: $ref: '#/components/schemas/GetIssueIncludeQueryParameterItem' type: array - HistoricalJobID: - description: The ID of the job. - in: path - name: job_id - required: true - schema: - type: string - HistoricalSignalID: - description: The ID of the historical signal. - in: path - name: histsignal_id - required: true - schema: - type: string IncidentAttachmentFilterQueryParameter: description: Specifies which types of attachments are included in the response. explode: false @@ -1091,6 +1077,20 @@ components: required: true schema: type: string + ThreatHuntingJobID: + description: The ID of the job. + in: path + name: job_id + required: true + schema: + type: string + ThreatHuntingSignalID: + description: The ID of the threat hunting signal. + in: path + name: histsignal_id + required: true + schema: + type: string UserID: description: The ID of the user. in: path @@ -11815,7 +11815,7 @@ components: - GZIP - DEFLATE ConvertJobResultsToSignalsAttributes: - description: Attributes for converting historical job results to signals. + description: Attributes for converting threat hunting job results to signals. properties: id: description: Request ID. @@ -11847,7 +11847,7 @@ components: - notifications type: object ConvertJobResultsToSignalsData: - description: Data for converting historical job results to signals. + description: Data for converting threat hunting job results to signals. properties: attributes: $ref: '#/components/schemas/ConvertJobResultsToSignalsAttributes' @@ -11862,7 +11862,7 @@ components: x-enum-varnames: - HISTORICALDETECTIONSJOBRESULTSIGNALCONVERSION ConvertJobResultsToSignalsRequest: - description: Request for converting historical job results to signals. + description: Request for converting threat hunting job results to signals. properties: data: $ref: '#/components/schemas/ConvertJobResultsToSignalsData' @@ -22191,130 +22191,6 @@ components: - type - value type: object - HistoricalJobDataType: - description: Type of payload. - enum: - - historicalDetectionsJob - type: string - x-enum-varnames: - - HISTORICALDETECTIONSJOB - HistoricalJobListMeta: - description: Metadata about the list of jobs. - properties: - totalCount: - description: Number of jobs in the list. - format: int32 - maximum: 2147483647 - type: integer - type: object - HistoricalJobOptions: - description: Job options. - properties: - detectionMethod: - $ref: '#/components/schemas/SecurityMonitoringRuleDetectionMethod' - evaluationWindow: - $ref: '#/components/schemas/SecurityMonitoringRuleEvaluationWindow' - impossibleTravelOptions: - $ref: '#/components/schemas/SecurityMonitoringRuleImpossibleTravelOptions' - keepAlive: - $ref: '#/components/schemas/SecurityMonitoringRuleKeepAlive' - maxSignalDuration: - $ref: '#/components/schemas/SecurityMonitoringRuleMaxSignalDuration' - newValueOptions: - $ref: '#/components/schemas/SecurityMonitoringRuleNewValueOptions' - sequenceDetectionOptions: - $ref: '#/components/schemas/SecurityMonitoringRuleSequenceDetectionOptions' - thirdPartyRuleOptions: - $ref: '#/components/schemas/SecurityMonitoringRuleThirdPartyOptions' - type: object - HistoricalJobQuery: - description: Query for selecting logs analyzed by the historical job. - properties: - aggregation: - $ref: '#/components/schemas/SecurityMonitoringRuleQueryAggregation' - dataSource: - $ref: '#/components/schemas/SecurityMonitoringStandardDataSource' - distinctFields: - description: Field for which the cardinality is measured. Sent as an array. - items: - description: Field. - type: string - type: array - groupByFields: - description: Fields to group by. - items: - description: Field. - type: string - type: array - hasOptionalGroupByFields: - default: false - description: When false, events without a group-by value are ignored by - the query. When true, events with missing group-by fields are processed - with `N/A`, replacing the missing values. - example: false - type: boolean - metrics: - description: Group of target fields to aggregate over when using the sum, - max, geo data, or new value aggregations. The sum, max, and geo data aggregations - only accept one value in this list, whereas the new value aggregation - accepts up to five values. - items: - description: Field. - type: string - type: array - name: - description: Name of the query. - type: string - query: - description: Query to run on logs. - example: a > 3 - type: string - type: object - HistoricalJobResponse: - description: Historical job response. - properties: - data: - $ref: '#/components/schemas/HistoricalJobResponseData' - type: object - HistoricalJobResponseAttributes: - description: Historical job attributes. - properties: - createdAt: - description: Time when the job was created. - type: string - createdByHandle: - description: The handle of the user who created the job. - type: string - createdByName: - description: The name of the user who created the job. - type: string - createdFromRuleId: - description: ID of the rule used to create the job (if it is created from - a rule). - type: string - jobDefinition: - $ref: '#/components/schemas/JobDefinition' - jobName: - description: Job name. - type: string - jobStatus: - description: Job status. - type: string - modifiedAt: - description: Last modification time of the job. - type: string - type: object - HistoricalJobResponseData: - description: Historical job response data. - properties: - attributes: - $ref: '#/components/schemas/HistoricalJobResponseAttributes' - id: - description: ID of the job. - type: string - type: - $ref: '#/components/schemas/HistoricalJobDataType' - type: object HourlyUsage: description: Hourly usage for a product family for an org. properties: @@ -26495,7 +26371,7 @@ components: type: string type: object JobCreateResponse: - description: Run a historical job response. + description: Run a threat hunting job response. properties: data: $ref: '#/components/schemas/JobCreateResponseData' @@ -26507,10 +26383,10 @@ components: description: ID of the created job. type: string type: - $ref: '#/components/schemas/HistoricalJobDataType' + $ref: '#/components/schemas/ThreatHuntingJobDataType' type: object JobDefinition: - description: Definition of a historical job. + description: Definition of a threat hunting job. properties: calculatedFields: description: Calculated fields. @@ -26549,11 +26425,11 @@ components: example: Excessive number of failed attempts. type: string options: - $ref: '#/components/schemas/HistoricalJobOptions' + $ref: '#/components/schemas/ThreatHuntingJobOptions' queries: description: Queries for selecting logs analyzed by the job. items: - $ref: '#/components/schemas/HistoricalJobQuery' + $ref: '#/components/schemas/ThreatHuntingJobQuery' type: array referenceTables: description: Reference tables used in the queries. @@ -26590,7 +26466,8 @@ components: - message type: object JobDefinitionFromRule: - description: Definition of a historical job based on a security monitoring rule. + description: Definition of a threat hunting job based on a security monitoring + rule. properties: from: description: Starting time of data analyzed by the job. @@ -27290,17 +27167,6 @@ components: - data - meta type: object - ListHistoricalJobsResponse: - description: List of historical jobs. - properties: - data: - description: Array containing the list of historical jobs. - items: - $ref: '#/components/schemas/HistoricalJobResponseData' - type: array - meta: - $ref: '#/components/schemas/HistoricalJobListMeta' - type: object ListKindCatalogResponse: description: List kind response. properties: @@ -27468,6 +27334,17 @@ components: - _NAME - USER_COUNT - _USER_COUNT + ListThreatHuntingJobsResponse: + description: List of threat hunting jobs. + properties: + data: + description: Array containing the list of threat hunting jobs. + items: + $ref: '#/components/schemas/ThreatHuntingJobResponseData' + type: array + meta: + $ref: '#/components/schemas/ThreatHuntingJobListMeta' + type: object ListVulnerabilitiesResponse: description: The expected response schema when listing vulnerabilities. properties: @@ -41523,14 +41400,18 @@ components: $ref: '#/components/schemas/RumRetentionFilterData' type: array type: object - RunHistoricalJobRequest: - description: Run a historical job request. + RunRetentionFilterName: + description: The name of a RUM retention filter. + example: Retention filter for session + type: string + RunThreatHuntingJobRequest: + description: Run a threat hunting job request. properties: data: - $ref: '#/components/schemas/RunHistoricalJobRequestData' + $ref: '#/components/schemas/RunThreatHuntingJobRequestData' type: object - RunHistoricalJobRequestAttributes: - description: Run a historical job request. + RunThreatHuntingJobRequestAttributes: + description: Run a threat hunting job request. properties: fromRule: $ref: '#/components/schemas/JobDefinitionFromRule' @@ -41540,25 +41421,21 @@ components: jobDefinition: $ref: '#/components/schemas/JobDefinition' type: object - RunHistoricalJobRequestData: - description: Data for running a historical job request. + RunThreatHuntingJobRequestData: + description: Data for running a threat hunting job request. properties: attributes: - $ref: '#/components/schemas/RunHistoricalJobRequestAttributes' + $ref: '#/components/schemas/RunThreatHuntingJobRequestAttributes' type: - $ref: '#/components/schemas/RunHistoricalJobRequestDataType' + $ref: '#/components/schemas/RunThreatHuntingJobRequestDataType' type: object - RunHistoricalJobRequestDataType: + RunThreatHuntingJobRequestDataType: description: Type of data. enum: - historicalDetectionsJobCreate type: string x-enum-varnames: - HISTORICALDETECTIONSJOBCREATE - RunRetentionFilterName: - description: The name of a RUM retention filter. - example: Retention filter for session - type: string SAMLAssertionAttribute: description: SAML assertion attribute. properties: @@ -50443,6 +50320,130 @@ components: description: Offset type. type: string type: object + ThreatHuntingJobDataType: + description: Type of payload. + enum: + - historicalDetectionsJob + type: string + x-enum-varnames: + - HISTORICALDETECTIONSJOB + ThreatHuntingJobListMeta: + description: Metadata about the list of jobs. + properties: + totalCount: + description: Number of jobs in the list. + format: int32 + maximum: 2147483647 + type: integer + type: object + ThreatHuntingJobOptions: + description: Job options. + properties: + detectionMethod: + $ref: '#/components/schemas/SecurityMonitoringRuleDetectionMethod' + evaluationWindow: + $ref: '#/components/schemas/SecurityMonitoringRuleEvaluationWindow' + impossibleTravelOptions: + $ref: '#/components/schemas/SecurityMonitoringRuleImpossibleTravelOptions' + keepAlive: + $ref: '#/components/schemas/SecurityMonitoringRuleKeepAlive' + maxSignalDuration: + $ref: '#/components/schemas/SecurityMonitoringRuleMaxSignalDuration' + newValueOptions: + $ref: '#/components/schemas/SecurityMonitoringRuleNewValueOptions' + sequenceDetectionOptions: + $ref: '#/components/schemas/SecurityMonitoringRuleSequenceDetectionOptions' + thirdPartyRuleOptions: + $ref: '#/components/schemas/SecurityMonitoringRuleThirdPartyOptions' + type: object + ThreatHuntingJobQuery: + description: Query for selecting logs analyzed by the threat hunting job. + properties: + aggregation: + $ref: '#/components/schemas/SecurityMonitoringRuleQueryAggregation' + dataSource: + $ref: '#/components/schemas/SecurityMonitoringStandardDataSource' + distinctFields: + description: Field for which the cardinality is measured. Sent as an array. + items: + description: Field. + type: string + type: array + groupByFields: + description: Fields to group by. + items: + description: Field. + type: string + type: array + hasOptionalGroupByFields: + default: false + description: When false, events without a group-by value are ignored by + the query. When true, events with missing group-by fields are processed + with `N/A`, replacing the missing values. + example: false + type: boolean + metrics: + description: Group of target fields to aggregate over when using the sum, + max, geo data, or new value aggregations. The sum, max, and geo data aggregations + only accept one value in this list, whereas the new value aggregation + accepts up to five values. + items: + description: Field. + type: string + type: array + name: + description: Name of the query. + type: string + query: + description: Query to run on logs. + example: a > 3 + type: string + type: object + ThreatHuntingJobResponse: + description: Threat hunting job response. + properties: + data: + $ref: '#/components/schemas/ThreatHuntingJobResponseData' + type: object + ThreatHuntingJobResponseAttributes: + description: Threat hunting job attributes. + properties: + createdAt: + description: Time when the job was created. + type: string + createdByHandle: + description: The handle of the user who created the job. + type: string + createdByName: + description: The name of the user who created the job. + type: string + createdFromRuleId: + description: ID of the rule used to create the job (if it is created from + a rule). + type: string + jobDefinition: + $ref: '#/components/schemas/JobDefinition' + jobName: + description: Job name. + type: string + jobStatus: + description: Job status. + type: string + modifiedAt: + description: Last modification time of the job. + type: string + type: object + ThreatHuntingJobResponseData: + description: Threat hunting job response data. + properties: + attributes: + $ref: '#/components/schemas/ThreatHuntingJobResponseAttributes' + id: + description: ID of the job. + type: string + type: + $ref: '#/components/schemas/ThreatHuntingJobDataType' + type: object TimeAggregation: description: 'Time aggregation period (in seconds) is used to aggregate the results of the notification rule evaluation. @@ -76493,7 +76494,7 @@ paths: permissions: - incident_settings_write x-unstable: '**Note**: This endpoint is deprecated.' - /api/v2/siem-historical-detections/histsignals: + /api/v2/siem-threat-hunting/histsignals: get: description: List hist signals. operationId: ListSecurityMonitoringHistsignals @@ -76534,7 +76535,7 @@ paths: x-unstable: '**Note**: This endpoint is in beta and may be subject to changes. Please check the documentation regularly for updates.' - /api/v2/siem-historical-detections/histsignals/search: + /api/v2/siem-threat-hunting/histsignals/search: get: description: Search hist signals. operationId: SearchSecurityMonitoringHistsignals @@ -76574,12 +76575,12 @@ paths: x-unstable: '**Note**: This endpoint is in beta and may be subject to changes. Please check the documentation regularly for updates.' - /api/v2/siem-historical-detections/histsignals/{histsignal_id}: + /api/v2/siem-threat-hunting/histsignals/{histsignal_id}: get: description: Get a hist signal's details. operationId: GetSecurityMonitoringHistsignal parameters: - - $ref: '#/components/parameters/HistoricalSignalID' + - $ref: '#/components/parameters/ThreatHuntingSignalID' responses: '200': content: @@ -76610,10 +76611,10 @@ paths: x-unstable: '**Note**: This endpoint is in beta and may be subject to changes. Please check the documentation regularly for updates.' - /api/v2/siem-historical-detections/jobs: + /api/v2/siem-threat-hunting/jobs: get: - description: List historical jobs. - operationId: ListHistoricalJobs + description: List threat hunting jobs. + operationId: ListThreatHuntingJobs parameters: - $ref: '#/components/parameters/PageSize' - $ref: '#/components/parameters/PageNumber' @@ -76636,7 +76637,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/ListHistoricalJobsResponse' + $ref: '#/components/schemas/ListThreatHuntingJobsResponse' description: OK '400': $ref: '#/components/responses/BadRequestResponse' @@ -76648,20 +76649,20 @@ paths: - apiKeyAuth: [] appKeyAuth: [] - AuthZ: [] - summary: List historical jobs + summary: List threat hunting jobs tags: - Security Monitoring x-unstable: '**Note**: This endpoint is in beta and may be subject to changes. Please check the documentation regularly for updates.' post: - description: Run a historical job. - operationId: RunHistoricalJob + description: Run a threat hunting job. + operationId: RunThreatHuntingJob requestBody: content: application/json: schema: - $ref: '#/components/schemas/RunHistoricalJobRequest' + $ref: '#/components/schemas/RunThreatHuntingJobRequest' required: true responses: '201': @@ -76685,7 +76686,7 @@ paths: appKeyAuth: [] - AuthZ: - security_monitoring_rules_write - summary: Run a historical job + summary: Run a threat hunting job tags: - Security Monitoring x-codegen-request-body-name: body @@ -76696,7 +76697,7 @@ paths: x-unstable: '**Note**: This endpoint is in beta and may be subject to changes. Please check the documentation regularly for updates.' - /api/v2/siem-historical-detections/jobs/signal_convert: + /api/v2/siem-threat-hunting/jobs/signal_convert: post: description: Convert a job result to a signal. operationId: ConvertJobResultToSignal @@ -76730,12 +76731,12 @@ paths: x-unstable: '**Note**: This endpoint is in beta and may be subject to changes. Please check the documentation regularly for updates.' - /api/v2/siem-historical-detections/jobs/{job_id}: + /api/v2/siem-threat-hunting/jobs/{job_id}: delete: description: Delete an existing job. - operationId: DeleteHistoricalJob + operationId: DeleteThreatHuntingJob parameters: - - $ref: '#/components/parameters/HistoricalJobID' + - $ref: '#/components/parameters/ThreatHuntingJobID' responses: '204': description: OK @@ -76763,15 +76764,15 @@ paths: Please check the documentation regularly for updates.' get: description: Get a job's details. - operationId: GetHistoricalJob + operationId: GetThreatHuntingJob parameters: - - $ref: '#/components/parameters/HistoricalJobID' + - $ref: '#/components/parameters/ThreatHuntingJobID' responses: '200': content: application/json: schema: - $ref: '#/components/schemas/HistoricalJobResponse' + $ref: '#/components/schemas/ThreatHuntingJobResponse' description: OK '400': $ref: '#/components/responses/BadRequestResponse' @@ -76796,12 +76797,12 @@ paths: x-unstable: '**Note**: This endpoint is in beta and may be subject to changes. Please check the documentation regularly for updates.' - /api/v2/siem-historical-detections/jobs/{job_id}/cancel: + /api/v2/siem-threat-hunting/jobs/{job_id}/cancel: patch: - description: Cancel a historical job. - operationId: CancelHistoricalJob + description: Cancel a threat hunting job. + operationId: CancelThreatHuntingJob parameters: - - $ref: '#/components/parameters/HistoricalJobID' + - $ref: '#/components/parameters/ThreatHuntingJobID' responses: '204': description: OK @@ -76822,7 +76823,7 @@ paths: appKeyAuth: [] - AuthZ: - security_monitoring_rules_write - summary: Cancel a historical job + summary: Cancel a threat hunting job tags: - Security Monitoring x-permission: @@ -76832,12 +76833,12 @@ paths: x-unstable: '**Note**: This endpoint is in beta and may be subject to changes. Please check the documentation regularly for updates.' - /api/v2/siem-historical-detections/jobs/{job_id}/histsignals: + /api/v2/siem-threat-hunting/jobs/{job_id}/histsignals: get: description: Get a job's hist signals. operationId: GetSecurityMonitoringHistsignalsByJobId parameters: - - $ref: '#/components/parameters/HistoricalJobID' + - $ref: '#/components/parameters/ThreatHuntingJobID' - $ref: '#/components/parameters/QueryFilterSearch' - $ref: '#/components/parameters/QueryFilterFrom' - $ref: '#/components/parameters/QueryFilterTo' diff --git a/examples/v2/security-monitoring/CancelThreatHuntingJob.java b/examples/v2/security-monitoring/CancelThreatHuntingJob.java new file mode 100644 index 00000000000..6a9dde27289 --- /dev/null +++ b/examples/v2/security-monitoring/CancelThreatHuntingJob.java @@ -0,0 +1,23 @@ +// Cancel a threat hunting job returns "OK" response + +import com.datadog.api.client.ApiClient; +import com.datadog.api.client.ApiException; +import com.datadog.api.client.v2.api.SecurityMonitoringApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + defaultClient.setUnstableOperationEnabled("v2.cancelThreatHuntingJob", true); + SecurityMonitoringApi apiInstance = new SecurityMonitoringApi(defaultClient); + + try { + apiInstance.cancelThreatHuntingJob("job_id"); + } catch (ApiException e) { + System.err.println("Exception when calling SecurityMonitoringApi#cancelThreatHuntingJob"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} diff --git a/examples/v2/security-monitoring/CancelHistoricalJob.java b/examples/v2/security-monitoring/CancelThreatHuntingJob_1945505845.java similarity index 64% rename from examples/v2/security-monitoring/CancelHistoricalJob.java rename to examples/v2/security-monitoring/CancelThreatHuntingJob_1945505845.java index 6b02bc4d791..8c4921a724a 100644 --- a/examples/v2/security-monitoring/CancelHistoricalJob.java +++ b/examples/v2/security-monitoring/CancelThreatHuntingJob_1945505845.java @@ -7,17 +7,17 @@ public class Example { public static void main(String[] args) { ApiClient defaultClient = ApiClient.getDefaultApiClient(); - defaultClient.setUnstableOperationEnabled("v2.cancelHistoricalJob", true); - defaultClient.setUnstableOperationEnabled("v2.runHistoricalJob", true); + defaultClient.setUnstableOperationEnabled("v2.cancelThreatHuntingJob", true); + defaultClient.setUnstableOperationEnabled("v2.runThreatHuntingJob", true); SecurityMonitoringApi apiInstance = new SecurityMonitoringApi(defaultClient); - // there is a valid "historical_job" in the system - String HISTORICAL_JOB_DATA_ID = System.getenv("HISTORICAL_JOB_DATA_ID"); + // there is a valid "threat_hunting_job" in the system + String THREAT_HUNTING_JOB_DATA_ID = System.getenv("THREAT_HUNTING_JOB_DATA_ID"); try { - apiInstance.cancelHistoricalJob(HISTORICAL_JOB_DATA_ID); + apiInstance.cancelThreatHuntingJob(THREAT_HUNTING_JOB_DATA_ID); } catch (ApiException e) { - System.err.println("Exception when calling SecurityMonitoringApi#cancelHistoricalJob"); + System.err.println("Exception when calling SecurityMonitoringApi#cancelThreatHuntingJob"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); diff --git a/examples/v2/security-monitoring/DeleteHistoricalJob.java b/examples/v2/security-monitoring/DeleteThreatHuntingJob.java similarity index 81% rename from examples/v2/security-monitoring/DeleteHistoricalJob.java rename to examples/v2/security-monitoring/DeleteThreatHuntingJob.java index 393d437eb26..c6b5873532b 100644 --- a/examples/v2/security-monitoring/DeleteHistoricalJob.java +++ b/examples/v2/security-monitoring/DeleteThreatHuntingJob.java @@ -7,13 +7,13 @@ public class Example { public static void main(String[] args) { ApiClient defaultClient = ApiClient.getDefaultApiClient(); - defaultClient.setUnstableOperationEnabled("v2.deleteHistoricalJob", true); + defaultClient.setUnstableOperationEnabled("v2.deleteThreatHuntingJob", true); SecurityMonitoringApi apiInstance = new SecurityMonitoringApi(defaultClient); try { - apiInstance.deleteHistoricalJob("job_id"); + apiInstance.deleteThreatHuntingJob("job_id"); } catch (ApiException e) { - System.err.println("Exception when calling SecurityMonitoringApi#deleteHistoricalJob"); + System.err.println("Exception when calling SecurityMonitoringApi#deleteThreatHuntingJob"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); diff --git a/examples/v2/security-monitoring/GetHistoricalJob.java b/examples/v2/security-monitoring/GetThreatHuntingJob.java similarity index 60% rename from examples/v2/security-monitoring/GetHistoricalJob.java rename to examples/v2/security-monitoring/GetThreatHuntingJob.java index 4d7e5be994f..d5de300df5f 100644 --- a/examples/v2/security-monitoring/GetHistoricalJob.java +++ b/examples/v2/security-monitoring/GetThreatHuntingJob.java @@ -3,23 +3,23 @@ import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; import com.datadog.api.client.v2.api.SecurityMonitoringApi; -import com.datadog.api.client.v2.model.HistoricalJobResponse; +import com.datadog.api.client.v2.model.ThreatHuntingJobResponse; public class Example { public static void main(String[] args) { ApiClient defaultClient = ApiClient.getDefaultApiClient(); - defaultClient.setUnstableOperationEnabled("v2.getHistoricalJob", true); - defaultClient.setUnstableOperationEnabled("v2.runHistoricalJob", true); + defaultClient.setUnstableOperationEnabled("v2.getThreatHuntingJob", true); + defaultClient.setUnstableOperationEnabled("v2.runThreatHuntingJob", true); SecurityMonitoringApi apiInstance = new SecurityMonitoringApi(defaultClient); - // there is a valid "historical_job" in the system - String HISTORICAL_JOB_DATA_ID = System.getenv("HISTORICAL_JOB_DATA_ID"); + // there is a valid "threat_hunting_job" in the system + String THREAT_HUNTING_JOB_DATA_ID = System.getenv("THREAT_HUNTING_JOB_DATA_ID"); try { - HistoricalJobResponse result = apiInstance.getHistoricalJob(HISTORICAL_JOB_DATA_ID); + ThreatHuntingJobResponse result = apiInstance.getThreatHuntingJob(THREAT_HUNTING_JOB_DATA_ID); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling SecurityMonitoringApi#getHistoricalJob"); + System.err.println("Exception when calling SecurityMonitoringApi#getThreatHuntingJob"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); diff --git a/examples/v2/security-monitoring/ListThreatHuntingJobs.java b/examples/v2/security-monitoring/ListThreatHuntingJobs.java new file mode 100644 index 00000000000..9e1c281b312 --- /dev/null +++ b/examples/v2/security-monitoring/ListThreatHuntingJobs.java @@ -0,0 +1,25 @@ +// List threat hunting jobs returns "OK" response + +import com.datadog.api.client.ApiClient; +import com.datadog.api.client.ApiException; +import com.datadog.api.client.v2.api.SecurityMonitoringApi; +import com.datadog.api.client.v2.model.ListThreatHuntingJobsResponse; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + defaultClient.setUnstableOperationEnabled("v2.listThreatHuntingJobs", true); + SecurityMonitoringApi apiInstance = new SecurityMonitoringApi(defaultClient); + + try { + ListThreatHuntingJobsResponse result = apiInstance.listThreatHuntingJobs(); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling SecurityMonitoringApi#listThreatHuntingJobs"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} diff --git a/examples/v2/security-monitoring/ListHistoricalJobs.java b/examples/v2/security-monitoring/ListThreatHuntingJobs_1365512061.java similarity index 53% rename from examples/v2/security-monitoring/ListHistoricalJobs.java rename to examples/v2/security-monitoring/ListThreatHuntingJobs_1365512061.java index 63a819d2537..26bc113b907 100644 --- a/examples/v2/security-monitoring/ListHistoricalJobs.java +++ b/examples/v2/security-monitoring/ListThreatHuntingJobs_1365512061.java @@ -3,26 +3,26 @@ import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; import com.datadog.api.client.v2.api.SecurityMonitoringApi; -import com.datadog.api.client.v2.api.SecurityMonitoringApi.ListHistoricalJobsOptionalParameters; -import com.datadog.api.client.v2.model.ListHistoricalJobsResponse; +import com.datadog.api.client.v2.api.SecurityMonitoringApi.ListThreatHuntingJobsOptionalParameters; +import com.datadog.api.client.v2.model.ListThreatHuntingJobsResponse; public class Example { public static void main(String[] args) { ApiClient defaultClient = ApiClient.getDefaultApiClient(); - defaultClient.setUnstableOperationEnabled("v2.listHistoricalJobs", true); - defaultClient.setUnstableOperationEnabled("v2.runHistoricalJob", true); + defaultClient.setUnstableOperationEnabled("v2.listThreatHuntingJobs", true); + defaultClient.setUnstableOperationEnabled("v2.runThreatHuntingJob", true); SecurityMonitoringApi apiInstance = new SecurityMonitoringApi(defaultClient); - // there is a valid "historical_job" in the system - String HISTORICAL_JOB_DATA_ID = System.getenv("HISTORICAL_JOB_DATA_ID"); + // there is a valid "threat_hunting_job" in the system + String THREAT_HUNTING_JOB_DATA_ID = System.getenv("THREAT_HUNTING_JOB_DATA_ID"); try { - ListHistoricalJobsResponse result = - apiInstance.listHistoricalJobs( - new ListHistoricalJobsOptionalParameters().filterQuery("id:string")); + ListThreatHuntingJobsResponse result = + apiInstance.listThreatHuntingJobs( + new ListThreatHuntingJobsOptionalParameters().filterQuery("id:string")); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling SecurityMonitoringApi#listHistoricalJobs"); + System.err.println("Exception when calling SecurityMonitoringApi#listThreatHuntingJobs"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); diff --git a/examples/v2/security-monitoring/RunHistoricalJob.java b/examples/v2/security-monitoring/RunThreatHuntingJob.java similarity index 74% rename from examples/v2/security-monitoring/RunHistoricalJob.java rename to examples/v2/security-monitoring/RunThreatHuntingJob.java index 7c9413d8637..68106e7ea5d 100644 --- a/examples/v2/security-monitoring/RunHistoricalJob.java +++ b/examples/v2/security-monitoring/RunThreatHuntingJob.java @@ -1,44 +1,44 @@ -// Run a historical job returns "Status created" response +// Run a threat hunting job returns "Status created" response import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; import com.datadog.api.client.v2.api.SecurityMonitoringApi; -import com.datadog.api.client.v2.model.HistoricalJobOptions; -import com.datadog.api.client.v2.model.HistoricalJobQuery; import com.datadog.api.client.v2.model.JobCreateResponse; import com.datadog.api.client.v2.model.JobDefinition; -import com.datadog.api.client.v2.model.RunHistoricalJobRequest; -import com.datadog.api.client.v2.model.RunHistoricalJobRequestAttributes; -import com.datadog.api.client.v2.model.RunHistoricalJobRequestData; -import com.datadog.api.client.v2.model.RunHistoricalJobRequestDataType; +import com.datadog.api.client.v2.model.RunThreatHuntingJobRequest; +import com.datadog.api.client.v2.model.RunThreatHuntingJobRequestAttributes; +import com.datadog.api.client.v2.model.RunThreatHuntingJobRequestData; +import com.datadog.api.client.v2.model.RunThreatHuntingJobRequestDataType; import com.datadog.api.client.v2.model.SecurityMonitoringRuleCaseCreate; import com.datadog.api.client.v2.model.SecurityMonitoringRuleEvaluationWindow; import com.datadog.api.client.v2.model.SecurityMonitoringRuleKeepAlive; import com.datadog.api.client.v2.model.SecurityMonitoringRuleMaxSignalDuration; import com.datadog.api.client.v2.model.SecurityMonitoringRuleQueryAggregation; import com.datadog.api.client.v2.model.SecurityMonitoringRuleSeverity; +import com.datadog.api.client.v2.model.ThreatHuntingJobOptions; +import com.datadog.api.client.v2.model.ThreatHuntingJobQuery; import java.util.Collections; public class Example { public static void main(String[] args) { ApiClient defaultClient = ApiClient.getDefaultApiClient(); - defaultClient.setUnstableOperationEnabled("v2.runHistoricalJob", true); + defaultClient.setUnstableOperationEnabled("v2.runThreatHuntingJob", true); SecurityMonitoringApi apiInstance = new SecurityMonitoringApi(defaultClient); - RunHistoricalJobRequest body = - new RunHistoricalJobRequest() + RunThreatHuntingJobRequest body = + new RunThreatHuntingJobRequest() .data( - new RunHistoricalJobRequestData() - .type(RunHistoricalJobRequestDataType.HISTORICALDETECTIONSJOBCREATE) + new RunThreatHuntingJobRequestData() + .type(RunThreatHuntingJobRequestDataType.HISTORICALDETECTIONSJOBCREATE) .attributes( - new RunHistoricalJobRequestAttributes() + new RunThreatHuntingJobRequestAttributes() .jobDefinition( new JobDefinition() .type("log_detection") .name("Excessive number of failed attempts.") .queries( Collections.singletonList( - new HistoricalJobQuery() + new ThreatHuntingJobQuery() .query("source:non_existing_src_weekend") .aggregation( SecurityMonitoringRuleQueryAggregation.COUNT))) @@ -49,7 +49,7 @@ public static void main(String[] args) { .status(SecurityMonitoringRuleSeverity.INFO) .condition("a > 1"))) .options( - new HistoricalJobOptions() + new ThreatHuntingJobOptions() .keepAlive(SecurityMonitoringRuleKeepAlive.ONE_HOUR) .maxSignalDuration( SecurityMonitoringRuleMaxSignalDuration.ONE_DAY) @@ -62,10 +62,10 @@ public static void main(String[] args) { .index("main")))); try { - JobCreateResponse result = apiInstance.runHistoricalJob(body); + JobCreateResponse result = apiInstance.runThreatHuntingJob(body); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling SecurityMonitoringApi#runHistoricalJob"); + System.err.println("Exception when calling SecurityMonitoringApi#runThreatHuntingJob"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); diff --git a/src/main/java/com/datadog/api/client/ApiClient.java b/src/main/java/com/datadog/api/client/ApiClient.java index d4731a82e7d..45f3ef73e30 100644 --- a/src/main/java/com/datadog/api/client/ApiClient.java +++ b/src/main/java/com/datadog/api/client/ApiClient.java @@ -696,24 +696,24 @@ public class ApiClient { put("v2.getOpenAPI", false); put("v2.listAPIs", false); put("v2.updateOpenAPI", false); - put("v2.cancelHistoricalJob", false); + put("v2.cancelThreatHuntingJob", false); put("v2.convertJobResultToSignal", false); - put("v2.deleteHistoricalJob", false); + put("v2.deleteThreatHuntingJob", false); put("v2.getFinding", false); - put("v2.getHistoricalJob", false); put("v2.getRuleVersionHistory", false); put("v2.getSBOM", false); put("v2.getSecurityMonitoringHistsignal", false); put("v2.getSecurityMonitoringHistsignalsByJobId", false); + put("v2.getThreatHuntingJob", false); put("v2.listAssetsSBOMs", false); put("v2.listFindings", false); - put("v2.listHistoricalJobs", false); put("v2.listScannedAssetsMetadata", false); put("v2.listSecurityMonitoringHistsignals", false); + put("v2.listThreatHuntingJobs", false); put("v2.listVulnerabilities", false); put("v2.listVulnerableAssets", false); put("v2.muteFindings", false); - put("v2.runHistoricalJob", false); + put("v2.runThreatHuntingJob", false); put("v2.searchSecurityMonitoringHistsignals", false); put("v2.createDataset", false); put("v2.deleteDataset", false); diff --git a/src/main/java/com/datadog/api/client/v2/api/SecurityMonitoringApi.java b/src/main/java/com/datadog/api/client/v2/api/SecurityMonitoringApi.java index 7bdb7d5e833..505dce2ee7e 100644 --- a/src/main/java/com/datadog/api/client/v2/api/SecurityMonitoringApi.java +++ b/src/main/java/com/datadog/api/client/v2/api/SecurityMonitoringApi.java @@ -23,16 +23,15 @@ import com.datadog.api.client.v2.model.GetResourceEvaluationFiltersResponse; import com.datadog.api.client.v2.model.GetRuleVersionHistoryResponse; import com.datadog.api.client.v2.model.GetSBOMResponse; -import com.datadog.api.client.v2.model.HistoricalJobResponse; import com.datadog.api.client.v2.model.JobCreateResponse; import com.datadog.api.client.v2.model.ListAssetsSBOMsResponse; import com.datadog.api.client.v2.model.ListFindingsResponse; -import com.datadog.api.client.v2.model.ListHistoricalJobsResponse; +import com.datadog.api.client.v2.model.ListThreatHuntingJobsResponse; import com.datadog.api.client.v2.model.ListVulnerabilitiesResponse; import com.datadog.api.client.v2.model.ListVulnerableAssetsResponse; import com.datadog.api.client.v2.model.NotificationRuleResponse; import com.datadog.api.client.v2.model.PatchNotificationRuleParameters; -import com.datadog.api.client.v2.model.RunHistoricalJobRequest; +import com.datadog.api.client.v2.model.RunThreatHuntingJobRequest; import com.datadog.api.client.v2.model.SBOMComponentLicenseType; import com.datadog.api.client.v2.model.SBOMFormat; import com.datadog.api.client.v2.model.ScannedAssetsMetadata; @@ -63,6 +62,7 @@ import com.datadog.api.client.v2.model.SecurityMonitoringSuppressionResponse; import com.datadog.api.client.v2.model.SecurityMonitoringSuppressionUpdateRequest; import com.datadog.api.client.v2.model.SecurityMonitoringSuppressionsResponse; +import com.datadog.api.client.v2.model.ThreatHuntingJobResponse; import com.datadog.api.client.v2.model.UpdateCustomFrameworkRequest; import com.datadog.api.client.v2.model.UpdateCustomFrameworkResponse; import com.datadog.api.client.v2.model.UpdateResourceEvaluationFiltersRequest; @@ -114,27 +114,27 @@ public void setApiClient(ApiClient apiClient) { } /** - * Cancel a historical job. + * Cancel a threat hunting job. * - *

See {@link #cancelHistoricalJobWithHttpInfo}. + *

See {@link #cancelThreatHuntingJobWithHttpInfo}. * * @param jobId The ID of the job. (required) * @throws ApiException if fails to make API call */ - public void cancelHistoricalJob(String jobId) throws ApiException { - cancelHistoricalJobWithHttpInfo(jobId); + public void cancelThreatHuntingJob(String jobId) throws ApiException { + cancelThreatHuntingJobWithHttpInfo(jobId); } /** - * Cancel a historical job. + * Cancel a threat hunting job. * - *

See {@link #cancelHistoricalJobWithHttpInfoAsync}. + *

See {@link #cancelThreatHuntingJobWithHttpInfoAsync}. * * @param jobId The ID of the job. (required) * @return CompletableFuture */ - public CompletableFuture cancelHistoricalJobAsync(String jobId) { - return cancelHistoricalJobWithHttpInfoAsync(jobId) + public CompletableFuture cancelThreatHuntingJobAsync(String jobId) { + return cancelThreatHuntingJobWithHttpInfoAsync(jobId) .thenApply( response -> { return response.getData(); @@ -142,7 +142,7 @@ public CompletableFuture cancelHistoricalJobAsync(String jobId) { } /** - * Cancel a historical job. + * Cancel a threat hunting job. * * @param jobId The ID of the job. (required) * @return ApiResponse<Void> @@ -160,9 +160,9 @@ public CompletableFuture cancelHistoricalJobAsync(String jobId) { * 429 Too many requests - * */ - public ApiResponse cancelHistoricalJobWithHttpInfo(String jobId) throws ApiException { + public ApiResponse cancelThreatHuntingJobWithHttpInfo(String jobId) throws ApiException { // Check if unstable operation is enabled - String operationId = "cancelHistoricalJob"; + String operationId = "cancelThreatHuntingJob"; if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); } else { @@ -173,18 +173,18 @@ public ApiResponse cancelHistoricalJobWithHttpInfo(String jobId) throws Ap // verify the required parameter 'jobId' is set if (jobId == null) { throw new ApiException( - 400, "Missing the required parameter 'jobId' when calling cancelHistoricalJob"); + 400, "Missing the required parameter 'jobId' when calling cancelThreatHuntingJob"); } // create path and map variables String localVarPath = - "/api/v2/siem-historical-detections/jobs/{job_id}/cancel" + "/api/v2/siem-threat-hunting/jobs/{job_id}/cancel" .replaceAll("\\{" + "job_id" + "\\}", apiClient.escapeString(jobId.toString())); Map localVarHeaderParams = new HashMap(); Invocation.Builder builder = apiClient.createBuilder( - "v2.SecurityMonitoringApi.cancelHistoricalJob", + "v2.SecurityMonitoringApi.cancelThreatHuntingJob", localVarPath, new ArrayList(), localVarHeaderParams, @@ -203,16 +203,17 @@ public ApiResponse cancelHistoricalJobWithHttpInfo(String jobId) throws Ap } /** - * Cancel a historical job. + * Cancel a threat hunting job. * - *

See {@link #cancelHistoricalJobWithHttpInfo}. + *

See {@link #cancelThreatHuntingJobWithHttpInfo}. * * @param jobId The ID of the job. (required) * @return CompletableFuture<ApiResponse<Void>> */ - public CompletableFuture> cancelHistoricalJobWithHttpInfoAsync(String jobId) { + public CompletableFuture> cancelThreatHuntingJobWithHttpInfoAsync( + String jobId) { // Check if unstable operation is enabled - String operationId = "cancelHistoricalJob"; + String operationId = "cancelThreatHuntingJob"; if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); } else { @@ -228,12 +229,12 @@ public CompletableFuture> cancelHistoricalJobWithHttpInfoAsync CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally( new ApiException( - 400, "Missing the required parameter 'jobId' when calling cancelHistoricalJob")); + 400, "Missing the required parameter 'jobId' when calling cancelThreatHuntingJob")); return result; } // create path and map variables String localVarPath = - "/api/v2/siem-historical-detections/jobs/{job_id}/cancel" + "/api/v2/siem-threat-hunting/jobs/{job_id}/cancel" .replaceAll("\\{" + "job_id" + "\\}", apiClient.escapeString(jobId.toString())); Map localVarHeaderParams = new HashMap(); @@ -242,7 +243,7 @@ public CompletableFuture> cancelHistoricalJobWithHttpInfoAsync try { builder = apiClient.createBuilder( - "v2.SecurityMonitoringApi.cancelHistoricalJob", + "v2.SecurityMonitoringApi.cancelThreatHuntingJob", localVarPath, new ArrayList(), localVarHeaderParams, @@ -474,7 +475,7 @@ public ApiResponse convertJobResultToSignalWithHttpInfo( 400, "Missing the required parameter 'body' when calling convertJobResultToSignal"); } // create path and map variables - String localVarPath = "/api/v2/siem-historical-detections/jobs/signal_convert"; + String localVarPath = "/api/v2/siem-threat-hunting/jobs/signal_convert"; Map localVarHeaderParams = new HashMap(); @@ -529,7 +530,7 @@ public CompletableFuture> convertJobResultToSignalWithHttpInfo return result; } // create path and map variables - String localVarPath = "/api/v2/siem-historical-detections/jobs/signal_convert"; + String localVarPath = "/api/v2/siem-threat-hunting/jobs/signal_convert"; Map localVarHeaderParams = new HashMap(); @@ -1703,158 +1704,6 @@ public ApiResponse deleteCustomFrameworkWithHttpI new GenericType() {}); } - /** - * Delete an existing job. - * - *

See {@link #deleteHistoricalJobWithHttpInfo}. - * - * @param jobId The ID of the job. (required) - * @throws ApiException if fails to make API call - */ - public void deleteHistoricalJob(String jobId) throws ApiException { - deleteHistoricalJobWithHttpInfo(jobId); - } - - /** - * Delete an existing job. - * - *

See {@link #deleteHistoricalJobWithHttpInfoAsync}. - * - * @param jobId The ID of the job. (required) - * @return CompletableFuture - */ - public CompletableFuture deleteHistoricalJobAsync(String jobId) { - return deleteHistoricalJobWithHttpInfoAsync(jobId) - .thenApply( - response -> { - return response.getData(); - }); - } - - /** - * Delete an existing job. - * - * @param jobId The ID of the job. (required) - * @return ApiResponse<Void> - * @throws ApiException if fails to make API call - * @http.response.details - * - * - * - * - * - * - * - * - * - * - *
Response details
Status Code Description Response Headers
204 OK -
400 Bad Request -
401 Concurrent Modification -
403 Not Authorized -
404 Not Found -
409 Conflict -
429 Too many requests -
- */ - public ApiResponse deleteHistoricalJobWithHttpInfo(String jobId) throws ApiException { - // Check if unstable operation is enabled - String operationId = "deleteHistoricalJob"; - 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 = null; - - // verify the required parameter 'jobId' is set - if (jobId == null) { - throw new ApiException( - 400, "Missing the required parameter 'jobId' when calling deleteHistoricalJob"); - } - // create path and map variables - String localVarPath = - "/api/v2/siem-historical-detections/jobs/{job_id}" - .replaceAll("\\{" + "job_id" + "\\}", apiClient.escapeString(jobId.toString())); - - Map localVarHeaderParams = new HashMap(); - - Invocation.Builder builder = - apiClient.createBuilder( - "v2.SecurityMonitoringApi.deleteHistoricalJob", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"*/*"}, - new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); - return apiClient.invokeAPI( - "DELETE", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - null); - } - - /** - * Delete an existing job. - * - *

See {@link #deleteHistoricalJobWithHttpInfo}. - * - * @param jobId The ID of the job. (required) - * @return CompletableFuture<ApiResponse<Void>> - */ - public CompletableFuture> deleteHistoricalJobWithHttpInfoAsync(String jobId) { - // Check if unstable operation is enabled - String operationId = "deleteHistoricalJob"; - if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { - apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); - } else { - CompletableFuture> result = new CompletableFuture<>(); - result.completeExceptionally( - new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); - return result; - } - Object localVarPostBody = null; - - // verify the required parameter 'jobId' is set - if (jobId == null) { - CompletableFuture> result = new CompletableFuture<>(); - result.completeExceptionally( - new ApiException( - 400, "Missing the required parameter 'jobId' when calling deleteHistoricalJob")); - return result; - } - // create path and map variables - String localVarPath = - "/api/v2/siem-historical-detections/jobs/{job_id}" - .replaceAll("\\{" + "job_id" + "\\}", apiClient.escapeString(jobId.toString())); - - Map localVarHeaderParams = new HashMap(); - - Invocation.Builder builder; - try { - builder = - apiClient.createBuilder( - "v2.SecurityMonitoringApi.deleteHistoricalJob", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"*/*"}, - new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); - } catch (ApiException ex) { - CompletableFuture> result = new CompletableFuture<>(); - result.completeExceptionally(ex); - return result; - } - return apiClient.invokeAPIAsync( - "DELETE", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - null); - } - /** * Delete a security filter. * @@ -2406,27 +2255,27 @@ public CompletableFuture> deleteSignalNotificationRuleWithHttp } /** - * Delete a vulnerability-based notification rule. + * Delete an existing job. * - *

See {@link #deleteVulnerabilityNotificationRuleWithHttpInfo}. + *

See {@link #deleteThreatHuntingJobWithHttpInfo}. * - * @param id ID of the notification rule. (required) + * @param jobId The ID of the job. (required) * @throws ApiException if fails to make API call */ - public void deleteVulnerabilityNotificationRule(String id) throws ApiException { - deleteVulnerabilityNotificationRuleWithHttpInfo(id); + public void deleteThreatHuntingJob(String jobId) throws ApiException { + deleteThreatHuntingJobWithHttpInfo(jobId); } /** - * Delete a vulnerability-based notification rule. + * Delete an existing job. * - *

See {@link #deleteVulnerabilityNotificationRuleWithHttpInfoAsync}. + *

See {@link #deleteThreatHuntingJobWithHttpInfoAsync}. * - * @param id ID of the notification rule. (required) + * @param jobId The ID of the job. (required) * @return CompletableFuture */ - public CompletableFuture deleteVulnerabilityNotificationRuleAsync(String id) { - return deleteVulnerabilityNotificationRuleWithHttpInfoAsync(id) + public CompletableFuture deleteThreatHuntingJobAsync(String jobId) { + return deleteThreatHuntingJobWithHttpInfoAsync(jobId) .thenApply( response -> { return response.getData(); @@ -2434,47 +2283,55 @@ public CompletableFuture deleteVulnerabilityNotificationRuleAsync(String i } /** - * Delete a notification rule for security vulnerabilities. + * Delete an existing job. * - * @param id ID of the notification rule. (required) + * @param jobId The ID of the job. (required) * @return ApiResponse<Void> * @throws ApiException if fails to make API call * @http.response.details * * * - * - * + * + * + * + * * + * * *
Response details
Status Code Description Response Headers
204 Rule successfully deleted. -
403 Forbidden -
204 OK -
400 Bad Request -
401 Concurrent Modification -
403 Not Authorized -
404 Not Found -
409 Conflict -
429 Too many requests -
*/ - public ApiResponse deleteVulnerabilityNotificationRuleWithHttpInfo(String id) - throws ApiException { + public ApiResponse deleteThreatHuntingJobWithHttpInfo(String jobId) throws ApiException { + // Check if unstable operation is enabled + String operationId = "deleteThreatHuntingJob"; + 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 = null; - // verify the required parameter 'id' is set - if (id == null) { + // verify the required parameter 'jobId' is set + if (jobId == null) { throw new ApiException( - 400, - "Missing the required parameter 'id' when calling deleteVulnerabilityNotificationRule"); + 400, "Missing the required parameter 'jobId' when calling deleteThreatHuntingJob"); } // create path and map variables String localVarPath = - "/api/v2/security/vulnerabilities/notification_rules/{id}" - .replaceAll("\\{" + "id" + "\\}", apiClient.escapeString(id.toString())); + "/api/v2/siem-threat-hunting/jobs/{job_id}" + .replaceAll("\\{" + "job_id" + "\\}", apiClient.escapeString(jobId.toString())); Map localVarHeaderParams = new HashMap(); Invocation.Builder builder = apiClient.createBuilder( - "v2.SecurityMonitoringApi.deleteVulnerabilityNotificationRule", + "v2.SecurityMonitoringApi.deleteThreatHuntingJob", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"*/*"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); + new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); return apiClient.invokeAPI( "DELETE", builder, @@ -2487,31 +2344,39 @@ public ApiResponse deleteVulnerabilityNotificationRuleWithHttpInfo(String } /** - * Delete a vulnerability-based notification rule. + * Delete an existing job. * - *

See {@link #deleteVulnerabilityNotificationRuleWithHttpInfo}. + *

See {@link #deleteThreatHuntingJobWithHttpInfo}. * - * @param id ID of the notification rule. (required) + * @param jobId The ID of the job. (required) * @return CompletableFuture<ApiResponse<Void>> */ - public CompletableFuture> deleteVulnerabilityNotificationRuleWithHttpInfoAsync( - String id) { + public CompletableFuture> deleteThreatHuntingJobWithHttpInfoAsync( + String jobId) { + // Check if unstable operation is enabled + String operationId = "deleteThreatHuntingJob"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally( + new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); + return result; + } Object localVarPostBody = null; - // verify the required parameter 'id' is set - if (id == null) { + // verify the required parameter 'jobId' is set + if (jobId == null) { CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally( new ApiException( - 400, - "Missing the required parameter 'id' when calling" - + " deleteVulnerabilityNotificationRule")); + 400, "Missing the required parameter 'jobId' when calling deleteThreatHuntingJob")); return result; } // create path and map variables String localVarPath = - "/api/v2/security/vulnerabilities/notification_rules/{id}" - .replaceAll("\\{" + "id" + "\\}", apiClient.escapeString(id.toString())); + "/api/v2/siem-threat-hunting/jobs/{job_id}" + .replaceAll("\\{" + "job_id" + "\\}", apiClient.escapeString(jobId.toString())); Map localVarHeaderParams = new HashMap(); @@ -2519,13 +2384,13 @@ public CompletableFuture> deleteVulnerabilityNotificationRuleW try { builder = apiClient.createBuilder( - "v2.SecurityMonitoringApi.deleteVulnerabilityNotificationRule", + "v2.SecurityMonitoringApi.deleteThreatHuntingJob", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"*/*"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); + new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); } catch (ApiException ex) { CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); @@ -2543,33 +2408,27 @@ public CompletableFuture> deleteVulnerabilityNotificationRuleW } /** - * Modify the triage assignee of a security signal. + * Delete a vulnerability-based notification rule. * - *

See {@link #editSecurityMonitoringSignalAssigneeWithHttpInfo}. + *

See {@link #deleteVulnerabilityNotificationRuleWithHttpInfo}. * - * @param signalId The ID of the signal. (required) - * @param body Attributes describing the signal update. (required) - * @return SecurityMonitoringSignalTriageUpdateResponse + * @param id ID of the notification rule. (required) * @throws ApiException if fails to make API call */ - public SecurityMonitoringSignalTriageUpdateResponse editSecurityMonitoringSignalAssignee( - String signalId, SecurityMonitoringSignalAssigneeUpdateRequest body) throws ApiException { - return editSecurityMonitoringSignalAssigneeWithHttpInfo(signalId, body).getData(); + public void deleteVulnerabilityNotificationRule(String id) throws ApiException { + deleteVulnerabilityNotificationRuleWithHttpInfo(id); } /** - * Modify the triage assignee of a security signal. + * Delete a vulnerability-based notification rule. * - *

See {@link #editSecurityMonitoringSignalAssigneeWithHttpInfoAsync}. + *

See {@link #deleteVulnerabilityNotificationRuleWithHttpInfoAsync}. * - * @param signalId The ID of the signal. (required) - * @param body Attributes describing the signal update. (required) - * @return CompletableFuture<SecurityMonitoringSignalTriageUpdateResponse> + * @param id ID of the notification rule. (required) + * @return CompletableFuture */ - public CompletableFuture - editSecurityMonitoringSignalAssigneeAsync( - String signalId, SecurityMonitoringSignalAssigneeUpdateRequest body) { - return editSecurityMonitoringSignalAssigneeWithHttpInfoAsync(signalId, body) + public CompletableFuture deleteVulnerabilityNotificationRuleAsync(String id) { + return deleteVulnerabilityNotificationRuleWithHttpInfoAsync(id) .thenApply( response -> { return response.getData(); @@ -2577,27 +2436,170 @@ public SecurityMonitoringSignalTriageUpdateResponse editSecurityMonitoringSignal } /** - * Modify the triage assignee of a security signal. + * Delete a notification rule for security vulnerabilities. * - * @param signalId The ID of the signal. (required) - * @param body Attributes describing the signal update. (required) - * @return ApiResponse<SecurityMonitoringSignalTriageUpdateResponse> + * @param id ID of the notification rule. (required) + * @return ApiResponse<Void> * @throws ApiException if fails to make API call * @http.response.details * * * - * - * + * * * * *
Response details
Status Code Description Response Headers
200 OK -
400 Bad Request -
204 Rule successfully deleted. -
403 Forbidden -
404 Not Found -
429 Too many requests -
*/ - public ApiResponse - editSecurityMonitoringSignalAssigneeWithHttpInfo( - String signalId, SecurityMonitoringSignalAssigneeUpdateRequest body) throws ApiException { - Object localVarPostBody = body; + public ApiResponse deleteVulnerabilityNotificationRuleWithHttpInfo(String id) + throws ApiException { + Object localVarPostBody = null; + + // verify the required parameter 'id' is set + if (id == null) { + throw new ApiException( + 400, + "Missing the required parameter 'id' when calling deleteVulnerabilityNotificationRule"); + } + // create path and map variables + String localVarPath = + "/api/v2/security/vulnerabilities/notification_rules/{id}" + .replaceAll("\\{" + "id" + "\\}", apiClient.escapeString(id.toString())); + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.SecurityMonitoringApi.deleteVulnerabilityNotificationRule", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"*/*"}, + new String[] {"apiKeyAuth", "appKeyAuth"}); + return apiClient.invokeAPI( + "DELETE", + builder, + localVarHeaderParams, + new String[] {}, + localVarPostBody, + new HashMap(), + false, + null); + } + + /** + * Delete a vulnerability-based notification rule. + * + *

See {@link #deleteVulnerabilityNotificationRuleWithHttpInfo}. + * + * @param id ID of the notification rule. (required) + * @return CompletableFuture<ApiResponse<Void>> + */ + public CompletableFuture> deleteVulnerabilityNotificationRuleWithHttpInfoAsync( + String id) { + Object localVarPostBody = null; + + // verify the required parameter 'id' is set + if (id == null) { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, + "Missing the required parameter 'id' when calling" + + " deleteVulnerabilityNotificationRule")); + return result; + } + // create path and map variables + String localVarPath = + "/api/v2/security/vulnerabilities/notification_rules/{id}" + .replaceAll("\\{" + "id" + "\\}", apiClient.escapeString(id.toString())); + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.SecurityMonitoringApi.deleteVulnerabilityNotificationRule", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"*/*"}, + new String[] {"apiKeyAuth", "appKeyAuth"}); + } catch (ApiException ex) { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(ex); + return result; + } + return apiClient.invokeAPIAsync( + "DELETE", + builder, + localVarHeaderParams, + new String[] {}, + localVarPostBody, + new HashMap(), + false, + null); + } + + /** + * Modify the triage assignee of a security signal. + * + *

See {@link #editSecurityMonitoringSignalAssigneeWithHttpInfo}. + * + * @param signalId The ID of the signal. (required) + * @param body Attributes describing the signal update. (required) + * @return SecurityMonitoringSignalTriageUpdateResponse + * @throws ApiException if fails to make API call + */ + public SecurityMonitoringSignalTriageUpdateResponse editSecurityMonitoringSignalAssignee( + String signalId, SecurityMonitoringSignalAssigneeUpdateRequest body) throws ApiException { + return editSecurityMonitoringSignalAssigneeWithHttpInfo(signalId, body).getData(); + } + + /** + * Modify the triage assignee of a security signal. + * + *

See {@link #editSecurityMonitoringSignalAssigneeWithHttpInfoAsync}. + * + * @param signalId The ID of the signal. (required) + * @param body Attributes describing the signal update. (required) + * @return CompletableFuture<SecurityMonitoringSignalTriageUpdateResponse> + */ + public CompletableFuture + editSecurityMonitoringSignalAssigneeAsync( + String signalId, SecurityMonitoringSignalAssigneeUpdateRequest body) { + return editSecurityMonitoringSignalAssigneeWithHttpInfoAsync(signalId, body) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * Modify the triage assignee of a security signal. + * + * @param signalId The ID of the signal. (required) + * @param body Attributes describing the signal update. (required) + * @return ApiResponse<SecurityMonitoringSignalTriageUpdateResponse> + * @throws ApiException if fails to make API call + * @http.response.details + * + * + * + * + * + * + * + * + *
Response details
Status Code Description Response Headers
200 OK -
400 Bad Request -
403 Forbidden -
404 Not Found -
429 Too many requests -
+ */ + public ApiResponse + editSecurityMonitoringSignalAssigneeWithHttpInfo( + String signalId, SecurityMonitoringSignalAssigneeUpdateRequest body) throws ApiException { + Object localVarPostBody = body; // verify the required parameter 'signalId' is set if (signalId == null) { @@ -3431,159 +3433,6 @@ public CompletableFuture> getFindingWithHttpInfo new GenericType() {}); } - /** - * Get a job's details. - * - *

See {@link #getHistoricalJobWithHttpInfo}. - * - * @param jobId The ID of the job. (required) - * @return HistoricalJobResponse - * @throws ApiException if fails to make API call - */ - public HistoricalJobResponse getHistoricalJob(String jobId) throws ApiException { - return getHistoricalJobWithHttpInfo(jobId).getData(); - } - - /** - * Get a job's details. - * - *

See {@link #getHistoricalJobWithHttpInfoAsync}. - * - * @param jobId The ID of the job. (required) - * @return CompletableFuture<HistoricalJobResponse> - */ - public CompletableFuture getHistoricalJobAsync(String jobId) { - return getHistoricalJobWithHttpInfoAsync(jobId) - .thenApply( - response -> { - return response.getData(); - }); - } - - /** - * Get a job's details. - * - * @param jobId The ID of the job. (required) - * @return ApiResponse<HistoricalJobResponse> - * @throws ApiException if fails to make API call - * @http.response.details - * - * - * - * - * - * - * - * - *
Response details
Status Code Description Response Headers
200 OK -
400 Bad Request -
403 Not Authorized -
404 Not Found -
429 Too many requests -
- */ - public ApiResponse getHistoricalJobWithHttpInfo(String jobId) - throws ApiException { - // Check if unstable operation is enabled - String operationId = "getHistoricalJob"; - 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 = null; - - // verify the required parameter 'jobId' is set - if (jobId == null) { - throw new ApiException( - 400, "Missing the required parameter 'jobId' when calling getHistoricalJob"); - } - // create path and map variables - String localVarPath = - "/api/v2/siem-historical-detections/jobs/{job_id}" - .replaceAll("\\{" + "job_id" + "\\}", apiClient.escapeString(jobId.toString())); - - Map localVarHeaderParams = new HashMap(); - - Invocation.Builder builder = - apiClient.createBuilder( - "v2.SecurityMonitoringApi.getHistoricalJob", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); - return apiClient.invokeAPI( - "GET", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); - } - - /** - * Get a job's details. - * - *

See {@link #getHistoricalJobWithHttpInfo}. - * - * @param jobId The ID of the job. (required) - * @return CompletableFuture<ApiResponse<HistoricalJobResponse>> - */ - public CompletableFuture> getHistoricalJobWithHttpInfoAsync( - String jobId) { - // Check if unstable operation is enabled - String operationId = "getHistoricalJob"; - if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { - apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); - } else { - CompletableFuture> result = new CompletableFuture<>(); - result.completeExceptionally( - new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); - return result; - } - Object localVarPostBody = null; - - // verify the required parameter 'jobId' is set - if (jobId == null) { - CompletableFuture> result = new CompletableFuture<>(); - result.completeExceptionally( - new ApiException( - 400, "Missing the required parameter 'jobId' when calling getHistoricalJob")); - return result; - } - // create path and map variables - String localVarPath = - "/api/v2/siem-historical-detections/jobs/{job_id}" - .replaceAll("\\{" + "job_id" + "\\}", apiClient.escapeString(jobId.toString())); - - Map localVarHeaderParams = new HashMap(); - - Invocation.Builder builder; - try { - builder = - apiClient.createBuilder( - "v2.SecurityMonitoringApi.getHistoricalJob", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); - } catch (ApiException ex) { - CompletableFuture> result = new CompletableFuture<>(); - result.completeExceptionally(ex); - return result; - } - return apiClient.invokeAPIAsync( - "GET", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); - } - /** Manage optional parameters to getResourceEvaluationFilters. */ public static class GetResourceEvaluationFiltersOptionalParameters { private String cloudProvider; @@ -4437,7 +4286,7 @@ public CompletableFuture> getSecurityFilterW * *

See {@link #getSecurityMonitoringHistsignalWithHttpInfo}. * - * @param histsignalId The ID of the historical signal. (required) + * @param histsignalId The ID of the threat hunting signal. (required) * @return SecurityMonitoringSignalResponse * @throws ApiException if fails to make API call */ @@ -4451,7 +4300,7 @@ public SecurityMonitoringSignalResponse getSecurityMonitoringHistsignal(String h * *

See {@link #getSecurityMonitoringHistsignalWithHttpInfoAsync}. * - * @param histsignalId The ID of the historical signal. (required) + * @param histsignalId The ID of the threat hunting signal. (required) * @return CompletableFuture<SecurityMonitoringSignalResponse> */ public CompletableFuture getSecurityMonitoringHistsignalAsync( @@ -4466,7 +4315,7 @@ public CompletableFuture getSecurityMonitoring /** * Get a hist signal's details. * - * @param histsignalId The ID of the historical signal. (required) + * @param histsignalId The ID of the threat hunting signal. (required) * @return ApiResponse<SecurityMonitoringSignalResponse> * @throws ApiException if fails to make API call * @http.response.details @@ -4500,7 +4349,7 @@ public ApiResponse getSecurityMonitoringHistsi } // create path and map variables String localVarPath = - "/api/v2/siem-historical-detections/histsignals/{histsignal_id}" + "/api/v2/siem-threat-hunting/histsignals/{histsignal_id}" .replaceAll( "\\{" + "histsignal_id" + "\\}", apiClient.escapeString(histsignalId.toString())); @@ -4531,7 +4380,7 @@ public ApiResponse getSecurityMonitoringHistsi * *

See {@link #getSecurityMonitoringHistsignalWithHttpInfo}. * - * @param histsignalId The ID of the historical signal. (required) + * @param histsignalId The ID of the threat hunting signal. (required) * @return CompletableFuture<ApiResponse<SecurityMonitoringSignalResponse>> */ public CompletableFuture> @@ -4562,7 +4411,7 @@ public ApiResponse getSecurityMonitoringHistsi } // create path and map variables String localVarPath = - "/api/v2/siem-historical-detections/histsignals/{histsignal_id}" + "/api/v2/siem-threat-hunting/histsignals/{histsignal_id}" .replaceAll( "\\{" + "histsignal_id" + "\\}", apiClient.escapeString(histsignalId.toString())); @@ -4793,7 +4642,7 @@ public SecurityMonitoringSignalsListResponse getSecurityMonitoringHistsignalsByJ Integer pageLimit = parameters.pageLimit; // create path and map variables String localVarPath = - "/api/v2/siem-historical-detections/jobs/{job_id}/histsignals" + "/api/v2/siem-threat-hunting/jobs/{job_id}/histsignals" .replaceAll("\\{" + "job_id" + "\\}", apiClient.escapeString(jobId.toString())); List localVarQueryParams = new ArrayList(); @@ -4870,7 +4719,7 @@ public SecurityMonitoringSignalsListResponse getSecurityMonitoringHistsignalsByJ Integer pageLimit = parameters.pageLimit; // create path and map variables String localVarPath = - "/api/v2/siem-historical-detections/jobs/{job_id}/histsignals" + "/api/v2/siem-threat-hunting/jobs/{job_id}/histsignals" .replaceAll("\\{" + "job_id" + "\\}", apiClient.escapeString(jobId.toString())); List localVarQueryParams = new ArrayList(); @@ -5816,20 +5665,174 @@ public SecurityMonitoringSuppressionsResponse getSuppressionsAffectingRule(Strin getSuppressionsAffectingRuleWithHttpInfoAsync(String ruleId) { Object localVarPostBody = null; - // verify the required parameter 'ruleId' is set - if (ruleId == null) { - CompletableFuture> result = - new CompletableFuture<>(); + // verify the required parameter 'ruleId' is set + if (ruleId == null) { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, + "Missing the required parameter 'ruleId' when calling getSuppressionsAffectingRule")); + return result; + } + // create path and map variables + String localVarPath = + "/api/v2/security_monitoring/configuration/suppressions/rules/{rule_id}" + .replaceAll("\\{" + "rule_id" + "\\}", apiClient.escapeString(ruleId.toString())); + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.SecurityMonitoringApi.getSuppressionsAffectingRule", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); + } catch (ApiException ex) { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally(ex); + return result; + } + return apiClient.invokeAPIAsync( + "GET", + builder, + localVarHeaderParams, + new String[] {}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** + * Get a job's details. + * + *

See {@link #getThreatHuntingJobWithHttpInfo}. + * + * @param jobId The ID of the job. (required) + * @return ThreatHuntingJobResponse + * @throws ApiException if fails to make API call + */ + public ThreatHuntingJobResponse getThreatHuntingJob(String jobId) throws ApiException { + return getThreatHuntingJobWithHttpInfo(jobId).getData(); + } + + /** + * Get a job's details. + * + *

See {@link #getThreatHuntingJobWithHttpInfoAsync}. + * + * @param jobId The ID of the job. (required) + * @return CompletableFuture<ThreatHuntingJobResponse> + */ + public CompletableFuture getThreatHuntingJobAsync(String jobId) { + return getThreatHuntingJobWithHttpInfoAsync(jobId) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * Get a job's details. + * + * @param jobId The ID of the job. (required) + * @return ApiResponse<ThreatHuntingJobResponse> + * @throws ApiException if fails to make API call + * @http.response.details + * + * + * + * + * + * + * + * + *
Response details
Status Code Description Response Headers
200 OK -
400 Bad Request -
403 Not Authorized -
404 Not Found -
429 Too many requests -
+ */ + public ApiResponse getThreatHuntingJobWithHttpInfo(String jobId) + throws ApiException { + // Check if unstable operation is enabled + String operationId = "getThreatHuntingJob"; + 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 = null; + + // verify the required parameter 'jobId' is set + if (jobId == null) { + throw new ApiException( + 400, "Missing the required parameter 'jobId' when calling getThreatHuntingJob"); + } + // create path and map variables + String localVarPath = + "/api/v2/siem-threat-hunting/jobs/{job_id}" + .replaceAll("\\{" + "job_id" + "\\}", apiClient.escapeString(jobId.toString())); + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.SecurityMonitoringApi.getThreatHuntingJob", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); + return apiClient.invokeAPI( + "GET", + builder, + localVarHeaderParams, + new String[] {}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** + * Get a job's details. + * + *

See {@link #getThreatHuntingJobWithHttpInfo}. + * + * @param jobId The ID of the job. (required) + * @return CompletableFuture<ApiResponse<ThreatHuntingJobResponse>> + */ + public CompletableFuture> + getThreatHuntingJobWithHttpInfoAsync(String jobId) { + // Check if unstable operation is enabled + String operationId = "getThreatHuntingJob"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally( + new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); + return result; + } + Object localVarPostBody = null; + + // verify the required parameter 'jobId' is set + if (jobId == null) { + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally( new ApiException( - 400, - "Missing the required parameter 'ruleId' when calling getSuppressionsAffectingRule")); + 400, "Missing the required parameter 'jobId' when calling getThreatHuntingJob")); return result; } // create path and map variables String localVarPath = - "/api/v2/security_monitoring/configuration/suppressions/rules/{rule_id}" - .replaceAll("\\{" + "rule_id" + "\\}", apiClient.escapeString(ruleId.toString())); + "/api/v2/siem-threat-hunting/jobs/{job_id}" + .replaceAll("\\{" + "job_id" + "\\}", apiClient.escapeString(jobId.toString())); Map localVarHeaderParams = new HashMap(); @@ -5837,7 +5840,7 @@ public SecurityMonitoringSuppressionsResponse getSuppressionsAffectingRule(Strin try { builder = apiClient.createBuilder( - "v2.SecurityMonitoringApi.getSuppressionsAffectingRule", + "v2.SecurityMonitoringApi.getThreatHuntingJob", localVarPath, new ArrayList(), localVarHeaderParams, @@ -5845,8 +5848,7 @@ public SecurityMonitoringSuppressionsResponse getSuppressionsAffectingRule(Strin new String[] {"application/json"}, new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); } catch (ApiException ex) { - CompletableFuture> result = - new CompletableFuture<>(); + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } @@ -5858,7 +5860,7 @@ public SecurityMonitoringSuppressionsResponse getSuppressionsAffectingRule(Strin localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType() {}); } /** @@ -6873,283 +6875,18 @@ public ApiResponse listFindingsWithHttpInfo( localVarQueryParams.addAll( apiClient.parameterToPairs("", "filter[@resource_id]", filterResourceId)); localVarQueryParams.addAll( - apiClient.parameterToPairs("", "filter[discovery_timestamp]", filterDiscoveryTimestamp)); - localVarQueryParams.addAll( - apiClient.parameterToPairs("", "filter[evaluation]", filterEvaluation)); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[status]", filterStatus)); - localVarQueryParams.addAll( - apiClient.parameterToPairs("multi", "filter[vulnerability_type]", filterVulnerabilityType)); - localVarQueryParams.addAll( - apiClient.parameterToPairs("", "detailed_findings", detailedFindings)); - - Invocation.Builder builder = - apiClient.createBuilder( - "v2.SecurityMonitoringApi.listFindings", - localVarPath, - localVarQueryParams, - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); - return apiClient.invokeAPI( - "GET", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); - } - - /** - * List findings. - * - *

See {@link #listFindingsWithHttpInfo}. - * - * @param parameters Optional parameters for the request. - * @return CompletableFuture<ApiResponse<ListFindingsResponse>> - */ - public CompletableFuture> listFindingsWithHttpInfoAsync( - ListFindingsOptionalParameters parameters) { - // Check if unstable operation is enabled - String operationId = "listFindings"; - if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { - apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); - } else { - CompletableFuture> result = new CompletableFuture<>(); - result.completeExceptionally( - new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); - return result; - } - Object localVarPostBody = null; - Long pageLimit = parameters.pageLimit; - Long snapshotTimestamp = parameters.snapshotTimestamp; - String pageCursor = parameters.pageCursor; - String filterTags = parameters.filterTags; - String filterEvaluationChangedAt = parameters.filterEvaluationChangedAt; - Boolean filterMuted = parameters.filterMuted; - String filterRuleId = parameters.filterRuleId; - String filterRuleName = parameters.filterRuleName; - String filterResourceType = parameters.filterResourceType; - String filterResourceId = parameters.filterResourceId; - String filterDiscoveryTimestamp = parameters.filterDiscoveryTimestamp; - FindingEvaluation filterEvaluation = parameters.filterEvaluation; - FindingStatus filterStatus = parameters.filterStatus; - List filterVulnerabilityType = parameters.filterVulnerabilityType; - Boolean detailedFindings = parameters.detailedFindings; - // create path and map variables - String localVarPath = "/api/v2/posture_management/findings"; - - List localVarQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - - localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[limit]", pageLimit)); - localVarQueryParams.addAll( - apiClient.parameterToPairs("", "snapshot_timestamp", snapshotTimestamp)); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[cursor]", pageCursor)); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[tags]", filterTags)); - localVarQueryParams.addAll( - apiClient.parameterToPairs("", "filter[evaluation_changed_at]", filterEvaluationChangedAt)); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[muted]", filterMuted)); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[rule_id]", filterRuleId)); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[rule_name]", filterRuleName)); - localVarQueryParams.addAll( - apiClient.parameterToPairs("", "filter[resource_type]", filterResourceType)); - localVarQueryParams.addAll( - apiClient.parameterToPairs("", "filter[@resource_id]", filterResourceId)); - localVarQueryParams.addAll( - apiClient.parameterToPairs("", "filter[discovery_timestamp]", filterDiscoveryTimestamp)); - localVarQueryParams.addAll( - apiClient.parameterToPairs("", "filter[evaluation]", filterEvaluation)); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[status]", filterStatus)); - localVarQueryParams.addAll( - apiClient.parameterToPairs("multi", "filter[vulnerability_type]", filterVulnerabilityType)); - localVarQueryParams.addAll( - apiClient.parameterToPairs("", "detailed_findings", detailedFindings)); - - Invocation.Builder builder; - try { - builder = - apiClient.createBuilder( - "v2.SecurityMonitoringApi.listFindings", - localVarPath, - localVarQueryParams, - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); - } catch (ApiException ex) { - CompletableFuture> result = new CompletableFuture<>(); - result.completeExceptionally(ex); - return result; - } - return apiClient.invokeAPIAsync( - "GET", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); - } - - /** Manage optional parameters to listHistoricalJobs. */ - public static class ListHistoricalJobsOptionalParameters { - private Long pageSize; - private Long pageNumber; - private String sort; - private String filterQuery; - - /** - * Set pageSize. - * - * @param pageSize Size for a given page. The maximum allowed value is 100. (optional, default - * to 10) - * @return ListHistoricalJobsOptionalParameters - */ - public ListHistoricalJobsOptionalParameters pageSize(Long pageSize) { - this.pageSize = pageSize; - return this; - } - - /** - * Set pageNumber. - * - * @param pageNumber Specific page number to return. (optional, default to 0) - * @return ListHistoricalJobsOptionalParameters - */ - public ListHistoricalJobsOptionalParameters pageNumber(Long pageNumber) { - this.pageNumber = pageNumber; - return this; - } - - /** - * Set sort. - * - * @param sort The order of the jobs in results. (optional) - * @return ListHistoricalJobsOptionalParameters - */ - public ListHistoricalJobsOptionalParameters sort(String sort) { - this.sort = sort; - return this; - } - - /** - * Set filterQuery. - * - * @param filterQuery Query used to filter items from the fetched list. (optional) - * @return ListHistoricalJobsOptionalParameters - */ - public ListHistoricalJobsOptionalParameters filterQuery(String filterQuery) { - this.filterQuery = filterQuery; - return this; - } - } - - /** - * List historical jobs. - * - *

See {@link #listHistoricalJobsWithHttpInfo}. - * - * @return ListHistoricalJobsResponse - * @throws ApiException if fails to make API call - */ - public ListHistoricalJobsResponse listHistoricalJobs() throws ApiException { - return listHistoricalJobsWithHttpInfo(new ListHistoricalJobsOptionalParameters()).getData(); - } - - /** - * List historical jobs. - * - *

See {@link #listHistoricalJobsWithHttpInfoAsync}. - * - * @return CompletableFuture<ListHistoricalJobsResponse> - */ - public CompletableFuture listHistoricalJobsAsync() { - return listHistoricalJobsWithHttpInfoAsync(new ListHistoricalJobsOptionalParameters()) - .thenApply( - response -> { - return response.getData(); - }); - } - - /** - * List historical jobs. - * - *

See {@link #listHistoricalJobsWithHttpInfo}. - * - * @param parameters Optional parameters for the request. - * @return ListHistoricalJobsResponse - * @throws ApiException if fails to make API call - */ - public ListHistoricalJobsResponse listHistoricalJobs( - ListHistoricalJobsOptionalParameters parameters) throws ApiException { - return listHistoricalJobsWithHttpInfo(parameters).getData(); - } - - /** - * List historical jobs. - * - *

See {@link #listHistoricalJobsWithHttpInfoAsync}. - * - * @param parameters Optional parameters for the request. - * @return CompletableFuture<ListHistoricalJobsResponse> - */ - public CompletableFuture listHistoricalJobsAsync( - ListHistoricalJobsOptionalParameters parameters) { - return listHistoricalJobsWithHttpInfoAsync(parameters) - .thenApply( - response -> { - return response.getData(); - }); - } - - /** - * List historical jobs. - * - * @param parameters Optional parameters for the request. - * @return ApiResponse<ListHistoricalJobsResponse> - * @throws ApiException if fails to make API call - * @http.response.details - * - * - * - * - * - * - * - *
Response details
Status Code Description Response Headers
200 OK -
400 Bad Request -
403 Not Authorized -
429 Too many requests -
- */ - public ApiResponse listHistoricalJobsWithHttpInfo( - ListHistoricalJobsOptionalParameters parameters) throws ApiException { - // Check if unstable operation is enabled - String operationId = "listHistoricalJobs"; - 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 = null; - Long pageSize = parameters.pageSize; - Long pageNumber = parameters.pageNumber; - String sort = parameters.sort; - String filterQuery = parameters.filterQuery; - // create path and map variables - String localVarPath = "/api/v2/siem-historical-detections/jobs"; - - List localVarQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - - localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[size]", pageSize)); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[number]", pageNumber)); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "sort", sort)); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[query]", filterQuery)); + apiClient.parameterToPairs("", "filter[discovery_timestamp]", filterDiscoveryTimestamp)); + localVarQueryParams.addAll( + apiClient.parameterToPairs("", "filter[evaluation]", filterEvaluation)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[status]", filterStatus)); + localVarQueryParams.addAll( + apiClient.parameterToPairs("multi", "filter[vulnerability_type]", filterVulnerabilityType)); + localVarQueryParams.addAll( + apiClient.parameterToPairs("", "detailed_findings", detailedFindings)); Invocation.Builder builder = apiClient.createBuilder( - "v2.SecurityMonitoringApi.listHistoricalJobs", + "v2.SecurityMonitoringApi.listFindings", localVarPath, localVarQueryParams, localVarHeaderParams, @@ -7164,50 +6901,80 @@ public ApiResponse listHistoricalJobsWithHttpInfo( localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType() {}); } /** - * List historical jobs. + * List findings. * - *

See {@link #listHistoricalJobsWithHttpInfo}. + *

See {@link #listFindingsWithHttpInfo}. * * @param parameters Optional parameters for the request. - * @return CompletableFuture<ApiResponse<ListHistoricalJobsResponse>> + * @return CompletableFuture<ApiResponse<ListFindingsResponse>> */ - public CompletableFuture> - listHistoricalJobsWithHttpInfoAsync(ListHistoricalJobsOptionalParameters parameters) { + public CompletableFuture> listFindingsWithHttpInfoAsync( + ListFindingsOptionalParameters parameters) { // Check if unstable operation is enabled - String operationId = "listHistoricalJobs"; + String operationId = "listFindings"; if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); } else { - CompletableFuture> result = new CompletableFuture<>(); + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally( new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); return result; } Object localVarPostBody = null; - Long pageSize = parameters.pageSize; - Long pageNumber = parameters.pageNumber; - String sort = parameters.sort; - String filterQuery = parameters.filterQuery; + Long pageLimit = parameters.pageLimit; + Long snapshotTimestamp = parameters.snapshotTimestamp; + String pageCursor = parameters.pageCursor; + String filterTags = parameters.filterTags; + String filterEvaluationChangedAt = parameters.filterEvaluationChangedAt; + Boolean filterMuted = parameters.filterMuted; + String filterRuleId = parameters.filterRuleId; + String filterRuleName = parameters.filterRuleName; + String filterResourceType = parameters.filterResourceType; + String filterResourceId = parameters.filterResourceId; + String filterDiscoveryTimestamp = parameters.filterDiscoveryTimestamp; + FindingEvaluation filterEvaluation = parameters.filterEvaluation; + FindingStatus filterStatus = parameters.filterStatus; + List filterVulnerabilityType = parameters.filterVulnerabilityType; + Boolean detailedFindings = parameters.detailedFindings; // create path and map variables - String localVarPath = "/api/v2/siem-historical-detections/jobs"; + String localVarPath = "/api/v2/posture_management/findings"; List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[size]", pageSize)); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[number]", pageNumber)); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "sort", sort)); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[query]", filterQuery)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[limit]", pageLimit)); + localVarQueryParams.addAll( + apiClient.parameterToPairs("", "snapshot_timestamp", snapshotTimestamp)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[cursor]", pageCursor)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[tags]", filterTags)); + localVarQueryParams.addAll( + apiClient.parameterToPairs("", "filter[evaluation_changed_at]", filterEvaluationChangedAt)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[muted]", filterMuted)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[rule_id]", filterRuleId)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[rule_name]", filterRuleName)); + localVarQueryParams.addAll( + apiClient.parameterToPairs("", "filter[resource_type]", filterResourceType)); + localVarQueryParams.addAll( + apiClient.parameterToPairs("", "filter[@resource_id]", filterResourceId)); + localVarQueryParams.addAll( + apiClient.parameterToPairs("", "filter[discovery_timestamp]", filterDiscoveryTimestamp)); + localVarQueryParams.addAll( + apiClient.parameterToPairs("", "filter[evaluation]", filterEvaluation)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[status]", filterStatus)); + localVarQueryParams.addAll( + apiClient.parameterToPairs("multi", "filter[vulnerability_type]", filterVulnerabilityType)); + localVarQueryParams.addAll( + apiClient.parameterToPairs("", "detailed_findings", detailedFindings)); Invocation.Builder builder; try { builder = apiClient.createBuilder( - "v2.SecurityMonitoringApi.listHistoricalJobs", + "v2.SecurityMonitoringApi.listFindings", localVarPath, localVarQueryParams, localVarHeaderParams, @@ -7215,7 +6982,7 @@ public ApiResponse listHistoricalJobsWithHttpInfo( new String[] {"application/json"}, new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); } catch (ApiException ex) { - CompletableFuture> result = new CompletableFuture<>(); + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } @@ -7227,7 +6994,7 @@ public ApiResponse listHistoricalJobsWithHttpInfo( localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType() {}); } /** Manage optional parameters to listScannedAssetsMetadata. */ @@ -7854,7 +7621,7 @@ public SecurityMonitoringSignalsListResponse listSecurityMonitoringHistsignals( String pageCursor = parameters.pageCursor; Integer pageLimit = parameters.pageLimit; // create path and map variables - String localVarPath = "/api/v2/siem-historical-detections/histsignals"; + String localVarPath = "/api/v2/siem-threat-hunting/histsignals"; List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); @@ -7916,7 +7683,7 @@ public SecurityMonitoringSignalsListResponse listSecurityMonitoringHistsignals( String pageCursor = parameters.pageCursor; Integer pageLimit = parameters.pageLimit; // create path and map variables - String localVarPath = "/api/v2/siem-historical-detections/histsignals"; + String localVarPath = "/api/v2/siem-threat-hunting/histsignals"; List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); @@ -8638,6 +8405,244 @@ public SecurityMonitoringSuppressionsResponse listSecurityMonitoringSuppressions new GenericType() {}); } + /** Manage optional parameters to listThreatHuntingJobs. */ + public static class ListThreatHuntingJobsOptionalParameters { + private Long pageSize; + private Long pageNumber; + private String sort; + private String filterQuery; + + /** + * Set pageSize. + * + * @param pageSize Size for a given page. The maximum allowed value is 100. (optional, default + * to 10) + * @return ListThreatHuntingJobsOptionalParameters + */ + public ListThreatHuntingJobsOptionalParameters pageSize(Long pageSize) { + this.pageSize = pageSize; + return this; + } + + /** + * Set pageNumber. + * + * @param pageNumber Specific page number to return. (optional, default to 0) + * @return ListThreatHuntingJobsOptionalParameters + */ + public ListThreatHuntingJobsOptionalParameters pageNumber(Long pageNumber) { + this.pageNumber = pageNumber; + return this; + } + + /** + * Set sort. + * + * @param sort The order of the jobs in results. (optional) + * @return ListThreatHuntingJobsOptionalParameters + */ + public ListThreatHuntingJobsOptionalParameters sort(String sort) { + this.sort = sort; + return this; + } + + /** + * Set filterQuery. + * + * @param filterQuery Query used to filter items from the fetched list. (optional) + * @return ListThreatHuntingJobsOptionalParameters + */ + public ListThreatHuntingJobsOptionalParameters filterQuery(String filterQuery) { + this.filterQuery = filterQuery; + return this; + } + } + + /** + * List threat hunting jobs. + * + *

See {@link #listThreatHuntingJobsWithHttpInfo}. + * + * @return ListThreatHuntingJobsResponse + * @throws ApiException if fails to make API call + */ + public ListThreatHuntingJobsResponse listThreatHuntingJobs() throws ApiException { + return listThreatHuntingJobsWithHttpInfo(new ListThreatHuntingJobsOptionalParameters()) + .getData(); + } + + /** + * List threat hunting jobs. + * + *

See {@link #listThreatHuntingJobsWithHttpInfoAsync}. + * + * @return CompletableFuture<ListThreatHuntingJobsResponse> + */ + public CompletableFuture listThreatHuntingJobsAsync() { + return listThreatHuntingJobsWithHttpInfoAsync(new ListThreatHuntingJobsOptionalParameters()) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * List threat hunting jobs. + * + *

See {@link #listThreatHuntingJobsWithHttpInfo}. + * + * @param parameters Optional parameters for the request. + * @return ListThreatHuntingJobsResponse + * @throws ApiException if fails to make API call + */ + public ListThreatHuntingJobsResponse listThreatHuntingJobs( + ListThreatHuntingJobsOptionalParameters parameters) throws ApiException { + return listThreatHuntingJobsWithHttpInfo(parameters).getData(); + } + + /** + * List threat hunting jobs. + * + *

See {@link #listThreatHuntingJobsWithHttpInfoAsync}. + * + * @param parameters Optional parameters for the request. + * @return CompletableFuture<ListThreatHuntingJobsResponse> + */ + public CompletableFuture listThreatHuntingJobsAsync( + ListThreatHuntingJobsOptionalParameters parameters) { + return listThreatHuntingJobsWithHttpInfoAsync(parameters) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * List threat hunting jobs. + * + * @param parameters Optional parameters for the request. + * @return ApiResponse<ListThreatHuntingJobsResponse> + * @throws ApiException if fails to make API call + * @http.response.details + * + * + * + * + * + * + * + *
Response details
Status Code Description Response Headers
200 OK -
400 Bad Request -
403 Not Authorized -
429 Too many requests -
+ */ + public ApiResponse listThreatHuntingJobsWithHttpInfo( + ListThreatHuntingJobsOptionalParameters parameters) throws ApiException { + // Check if unstable operation is enabled + String operationId = "listThreatHuntingJobs"; + 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 = null; + Long pageSize = parameters.pageSize; + Long pageNumber = parameters.pageNumber; + String sort = parameters.sort; + String filterQuery = parameters.filterQuery; + // create path and map variables + String localVarPath = "/api/v2/siem-threat-hunting/jobs"; + + List localVarQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + + localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[size]", pageSize)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[number]", pageNumber)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "sort", sort)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[query]", filterQuery)); + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.SecurityMonitoringApi.listThreatHuntingJobs", + localVarPath, + localVarQueryParams, + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); + return apiClient.invokeAPI( + "GET", + builder, + localVarHeaderParams, + new String[] {}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** + * List threat hunting jobs. + * + *

See {@link #listThreatHuntingJobsWithHttpInfo}. + * + * @param parameters Optional parameters for the request. + * @return CompletableFuture<ApiResponse<ListThreatHuntingJobsResponse>> + */ + public CompletableFuture> + listThreatHuntingJobsWithHttpInfoAsync(ListThreatHuntingJobsOptionalParameters parameters) { + // Check if unstable operation is enabled + String operationId = "listThreatHuntingJobs"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally( + new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); + return result; + } + Object localVarPostBody = null; + Long pageSize = parameters.pageSize; + Long pageNumber = parameters.pageNumber; + String sort = parameters.sort; + String filterQuery = parameters.filterQuery; + // create path and map variables + String localVarPath = "/api/v2/siem-threat-hunting/jobs"; + + List localVarQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + + localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[size]", pageSize)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[number]", pageNumber)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "sort", sort)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[query]", filterQuery)); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.SecurityMonitoringApi.listThreatHuntingJobs", + localVarPath, + localVarQueryParams, + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); + } catch (ApiException ex) { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally(ex); + return result; + } + return apiClient.invokeAPIAsync( + "GET", + builder, + localVarHeaderParams, + new String[] {}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + /** Manage optional parameters to listVulnerabilities. */ public static class ListVulnerabilitiesOptionalParameters { private String pageToken; @@ -10758,28 +10763,30 @@ public ApiResponse patchVulnerabilityNotificationRuleW } /** - * Run a historical job. + * Run a threat hunting job. * - *

See {@link #runHistoricalJobWithHttpInfo}. + *

See {@link #runThreatHuntingJobWithHttpInfo}. * * @param body (required) * @return JobCreateResponse * @throws ApiException if fails to make API call */ - public JobCreateResponse runHistoricalJob(RunHistoricalJobRequest body) throws ApiException { - return runHistoricalJobWithHttpInfo(body).getData(); + public JobCreateResponse runThreatHuntingJob(RunThreatHuntingJobRequest body) + throws ApiException { + return runThreatHuntingJobWithHttpInfo(body).getData(); } /** - * Run a historical job. + * Run a threat hunting job. * - *

See {@link #runHistoricalJobWithHttpInfoAsync}. + *

See {@link #runThreatHuntingJobWithHttpInfoAsync}. * * @param body (required) * @return CompletableFuture<JobCreateResponse> */ - public CompletableFuture runHistoricalJobAsync(RunHistoricalJobRequest body) { - return runHistoricalJobWithHttpInfoAsync(body) + public CompletableFuture runThreatHuntingJobAsync( + RunThreatHuntingJobRequest body) { + return runThreatHuntingJobWithHttpInfoAsync(body) .thenApply( response -> { return response.getData(); @@ -10787,7 +10794,7 @@ public CompletableFuture runHistoricalJobAsync(RunHistoricalJ } /** - * Run a historical job. + * Run a threat hunting job. * * @param body (required) * @return ApiResponse<JobCreateResponse> @@ -10804,10 +10811,10 @@ public CompletableFuture runHistoricalJobAsync(RunHistoricalJ * 429 Too many requests - * */ - public ApiResponse runHistoricalJobWithHttpInfo(RunHistoricalJobRequest body) - throws ApiException { + public ApiResponse runThreatHuntingJobWithHttpInfo( + RunThreatHuntingJobRequest body) throws ApiException { // Check if unstable operation is enabled - String operationId = "runHistoricalJob"; + String operationId = "runThreatHuntingJob"; if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); } else { @@ -10818,16 +10825,16 @@ public ApiResponse runHistoricalJobWithHttpInfo(RunHistorical // verify the required parameter 'body' is set if (body == null) { throw new ApiException( - 400, "Missing the required parameter 'body' when calling runHistoricalJob"); + 400, "Missing the required parameter 'body' when calling runThreatHuntingJob"); } // create path and map variables - String localVarPath = "/api/v2/siem-historical-detections/jobs"; + String localVarPath = "/api/v2/siem-threat-hunting/jobs"; Map localVarHeaderParams = new HashMap(); Invocation.Builder builder = apiClient.createBuilder( - "v2.SecurityMonitoringApi.runHistoricalJob", + "v2.SecurityMonitoringApi.runThreatHuntingJob", localVarPath, new ArrayList(), localVarHeaderParams, @@ -10846,17 +10853,17 @@ public ApiResponse runHistoricalJobWithHttpInfo(RunHistorical } /** - * Run a historical job. + * Run a threat hunting job. * - *

See {@link #runHistoricalJobWithHttpInfo}. + *

See {@link #runThreatHuntingJobWithHttpInfo}. * * @param body (required) * @return CompletableFuture<ApiResponse<JobCreateResponse>> */ - public CompletableFuture> runHistoricalJobWithHttpInfoAsync( - RunHistoricalJobRequest body) { + public CompletableFuture> runThreatHuntingJobWithHttpInfoAsync( + RunThreatHuntingJobRequest body) { // Check if unstable operation is enabled - String operationId = "runHistoricalJob"; + String operationId = "runThreatHuntingJob"; if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); } else { @@ -10872,11 +10879,11 @@ public CompletableFuture> runHistoricalJobWithHtt CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally( new ApiException( - 400, "Missing the required parameter 'body' when calling runHistoricalJob")); + 400, "Missing the required parameter 'body' when calling runThreatHuntingJob")); return result; } // create path and map variables - String localVarPath = "/api/v2/siem-historical-detections/jobs"; + String localVarPath = "/api/v2/siem-threat-hunting/jobs"; Map localVarHeaderParams = new HashMap(); @@ -10884,7 +10891,7 @@ public CompletableFuture> runHistoricalJobWithHtt try { builder = apiClient.createBuilder( - "v2.SecurityMonitoringApi.runHistoricalJob", + "v2.SecurityMonitoringApi.runThreatHuntingJob", localVarPath, new ArrayList(), localVarHeaderParams, @@ -11017,7 +11024,7 @@ public SecurityMonitoringSignalsListResponse searchSecurityMonitoringHistsignals } Object localVarPostBody = parameters.body; // create path and map variables - String localVarPath = "/api/v2/siem-historical-detections/histsignals/search"; + String localVarPath = "/api/v2/siem-threat-hunting/histsignals/search"; Map localVarHeaderParams = new HashMap(); @@ -11065,7 +11072,7 @@ public SecurityMonitoringSignalsListResponse searchSecurityMonitoringHistsignals } Object localVarPostBody = parameters.body; // create path and map variables - String localVarPath = "/api/v2/siem-historical-detections/histsignals/search"; + String localVarPath = "/api/v2/siem-threat-hunting/histsignals/search"; Map localVarHeaderParams = new HashMap(); diff --git a/src/main/java/com/datadog/api/client/v2/model/ConvertJobResultsToSignalsAttributes.java b/src/main/java/com/datadog/api/client/v2/model/ConvertJobResultsToSignalsAttributes.java index c7a084a305c..e537b0dc8d0 100644 --- a/src/main/java/com/datadog/api/client/v2/model/ConvertJobResultsToSignalsAttributes.java +++ b/src/main/java/com/datadog/api/client/v2/model/ConvertJobResultsToSignalsAttributes.java @@ -19,7 +19,7 @@ import java.util.Map; import java.util.Objects; -/** Attributes for converting historical job results to signals. */ +/** Attributes for converting threat hunting job results to signals. */ @JsonPropertyOrder({ ConvertJobResultsToSignalsAttributes.JSON_PROPERTY_ID, ConvertJobResultsToSignalsAttributes.JSON_PROPERTY_JOB_RESULT_IDS, diff --git a/src/main/java/com/datadog/api/client/v2/model/ConvertJobResultsToSignalsData.java b/src/main/java/com/datadog/api/client/v2/model/ConvertJobResultsToSignalsData.java index e654c0f92bf..c2b2bf1ef9a 100644 --- a/src/main/java/com/datadog/api/client/v2/model/ConvertJobResultsToSignalsData.java +++ b/src/main/java/com/datadog/api/client/v2/model/ConvertJobResultsToSignalsData.java @@ -16,7 +16,7 @@ import java.util.Map; import java.util.Objects; -/** Data for converting historical job results to signals. */ +/** Data for converting threat hunting job results to signals. */ @JsonPropertyOrder({ ConvertJobResultsToSignalsData.JSON_PROPERTY_ATTRIBUTES, ConvertJobResultsToSignalsData.JSON_PROPERTY_TYPE @@ -39,7 +39,7 @@ public ConvertJobResultsToSignalsData attributes( } /** - * Attributes for converting historical job results to signals. + * Attributes for converting threat hunting job results to signals. * * @return attributes */ diff --git a/src/main/java/com/datadog/api/client/v2/model/ConvertJobResultsToSignalsRequest.java b/src/main/java/com/datadog/api/client/v2/model/ConvertJobResultsToSignalsRequest.java index 0548bbbcab4..a2d976006ac 100644 --- a/src/main/java/com/datadog/api/client/v2/model/ConvertJobResultsToSignalsRequest.java +++ b/src/main/java/com/datadog/api/client/v2/model/ConvertJobResultsToSignalsRequest.java @@ -16,7 +16,7 @@ import java.util.Map; import java.util.Objects; -/** Request for converting historical job results to signals. */ +/** Request for converting threat hunting job results to signals. */ @JsonPropertyOrder({ConvertJobResultsToSignalsRequest.JSON_PROPERTY_DATA}) @jakarta.annotation.Generated( value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") @@ -32,7 +32,7 @@ public ConvertJobResultsToSignalsRequest data(ConvertJobResultsToSignalsData dat } /** - * Data for converting historical job results to signals. + * Data for converting threat hunting job results to signals. * * @return data */ diff --git a/src/main/java/com/datadog/api/client/v2/model/JobCreateResponse.java b/src/main/java/com/datadog/api/client/v2/model/JobCreateResponse.java index e9050ef832c..508cc0d563b 100644 --- a/src/main/java/com/datadog/api/client/v2/model/JobCreateResponse.java +++ b/src/main/java/com/datadog/api/client/v2/model/JobCreateResponse.java @@ -16,7 +16,7 @@ import java.util.Map; import java.util.Objects; -/** Run a historical job response. */ +/** Run a threat hunting job response. */ @JsonPropertyOrder({JobCreateResponse.JSON_PROPERTY_DATA}) @jakarta.annotation.Generated( value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") diff --git a/src/main/java/com/datadog/api/client/v2/model/JobCreateResponseData.java b/src/main/java/com/datadog/api/client/v2/model/JobCreateResponseData.java index 499853d544c..21496655291 100644 --- a/src/main/java/com/datadog/api/client/v2/model/JobCreateResponseData.java +++ b/src/main/java/com/datadog/api/client/v2/model/JobCreateResponseData.java @@ -29,7 +29,7 @@ public class JobCreateResponseData { private String id; public static final String JSON_PROPERTY_TYPE = "type"; - private HistoricalJobDataType type; + private ThreatHuntingJobDataType type; public JobCreateResponseData id(String id) { this.id = id; @@ -52,7 +52,7 @@ public void setId(String id) { this.id = id; } - public JobCreateResponseData type(HistoricalJobDataType type) { + public JobCreateResponseData type(ThreatHuntingJobDataType type) { this.type = type; this.unparsed |= !type.isValid(); return this; @@ -66,11 +66,11 @@ public JobCreateResponseData type(HistoricalJobDataType type) { @jakarta.annotation.Nullable @JsonProperty(JSON_PROPERTY_TYPE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public HistoricalJobDataType getType() { + public ThreatHuntingJobDataType getType() { return type; } - public void setType(HistoricalJobDataType type) { + public void setType(ThreatHuntingJobDataType type) { if (!type.isValid()) { this.unparsed = true; } diff --git a/src/main/java/com/datadog/api/client/v2/model/JobDefinition.java b/src/main/java/com/datadog/api/client/v2/model/JobDefinition.java index 29057415d42..5de1d62e859 100644 --- a/src/main/java/com/datadog/api/client/v2/model/JobDefinition.java +++ b/src/main/java/com/datadog/api/client/v2/model/JobDefinition.java @@ -19,7 +19,7 @@ import java.util.Map; import java.util.Objects; -/** Definition of a historical job. */ +/** Definition of a threat hunting job. */ @JsonPropertyOrder({ JobDefinition.JSON_PROPERTY_CALCULATED_FIELDS, JobDefinition.JSON_PROPERTY_CASES, @@ -62,10 +62,10 @@ public class JobDefinition { private String name; public static final String JSON_PROPERTY_OPTIONS = "options"; - private HistoricalJobOptions options; + private ThreatHuntingJobOptions options; public static final String JSON_PROPERTY_QUERIES = "queries"; - private List queries = new ArrayList<>(); + private List queries = new ArrayList<>(); public static final String JSON_PROPERTY_REFERENCE_TABLES = "referenceTables"; private List referenceTables = null; @@ -93,7 +93,7 @@ public JobDefinition( @JsonProperty(required = true, value = JSON_PROPERTY_MESSAGE) String message, @JsonProperty(required = true, value = JSON_PROPERTY_NAME) String name, @JsonProperty(required = true, value = JSON_PROPERTY_QUERIES) - List queries, + List queries, @JsonProperty(required = true, value = JSON_PROPERTY_TO) Long to) { this.cases = cases; this.from = from; @@ -276,7 +276,7 @@ public void setName(String name) { this.name = name; } - public JobDefinition options(HistoricalJobOptions options) { + public JobDefinition options(ThreatHuntingJobOptions options) { this.options = options; this.unparsed |= options.unparsed; return this; @@ -290,23 +290,23 @@ public JobDefinition options(HistoricalJobOptions options) { @jakarta.annotation.Nullable @JsonProperty(JSON_PROPERTY_OPTIONS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public HistoricalJobOptions getOptions() { + public ThreatHuntingJobOptions getOptions() { return options; } - public void setOptions(HistoricalJobOptions options) { + public void setOptions(ThreatHuntingJobOptions options) { this.options = options; } - public JobDefinition queries(List queries) { + public JobDefinition queries(List queries) { this.queries = queries; - for (HistoricalJobQuery item : queries) { + for (ThreatHuntingJobQuery item : queries) { this.unparsed |= item.unparsed; } return this; } - public JobDefinition addQueriesItem(HistoricalJobQuery queriesItem) { + public JobDefinition addQueriesItem(ThreatHuntingJobQuery queriesItem) { this.queries.add(queriesItem); this.unparsed |= queriesItem.unparsed; return this; @@ -319,11 +319,11 @@ public JobDefinition addQueriesItem(HistoricalJobQuery queriesItem) { */ @JsonProperty(JSON_PROPERTY_QUERIES) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public List getQueries() { + public List getQueries() { return queries; } - public void setQueries(List queries) { + public void setQueries(List queries) { this.queries = queries; } diff --git a/src/main/java/com/datadog/api/client/v2/model/JobDefinitionFromRule.java b/src/main/java/com/datadog/api/client/v2/model/JobDefinitionFromRule.java index b84e3aaf6c4..dde8a7c2422 100644 --- a/src/main/java/com/datadog/api/client/v2/model/JobDefinitionFromRule.java +++ b/src/main/java/com/datadog/api/client/v2/model/JobDefinitionFromRule.java @@ -19,7 +19,7 @@ import java.util.Map; import java.util.Objects; -/** Definition of a historical job based on a security monitoring rule. */ +/** Definition of a threat hunting job based on a security monitoring rule. */ @JsonPropertyOrder({ JobDefinitionFromRule.JSON_PROPERTY_FROM, JobDefinitionFromRule.JSON_PROPERTY_ID, diff --git a/src/main/java/com/datadog/api/client/v2/model/ListHistoricalJobsResponse.java b/src/main/java/com/datadog/api/client/v2/model/ListThreatHuntingJobsResponse.java similarity index 73% rename from src/main/java/com/datadog/api/client/v2/model/ListHistoricalJobsResponse.java rename to src/main/java/com/datadog/api/client/v2/model/ListThreatHuntingJobsResponse.java index 7feea15e2e7..1ba1934a0e6 100644 --- a/src/main/java/com/datadog/api/client/v2/model/ListHistoricalJobsResponse.java +++ b/src/main/java/com/datadog/api/client/v2/model/ListThreatHuntingJobsResponse.java @@ -18,30 +18,30 @@ import java.util.Map; import java.util.Objects; -/** List of historical jobs. */ +/** List of threat hunting jobs. */ @JsonPropertyOrder({ - ListHistoricalJobsResponse.JSON_PROPERTY_DATA, - ListHistoricalJobsResponse.JSON_PROPERTY_META + ListThreatHuntingJobsResponse.JSON_PROPERTY_DATA, + ListThreatHuntingJobsResponse.JSON_PROPERTY_META }) @jakarta.annotation.Generated( value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") -public class ListHistoricalJobsResponse { +public class ListThreatHuntingJobsResponse { @JsonIgnore public boolean unparsed = false; public static final String JSON_PROPERTY_DATA = "data"; - private List data = null; + private List data = null; public static final String JSON_PROPERTY_META = "meta"; - private HistoricalJobListMeta meta; + private ThreatHuntingJobListMeta meta; - public ListHistoricalJobsResponse data(List data) { + public ListThreatHuntingJobsResponse data(List data) { this.data = data; - for (HistoricalJobResponseData item : data) { + for (ThreatHuntingJobResponseData item : data) { this.unparsed |= item.unparsed; } return this; } - public ListHistoricalJobsResponse addDataItem(HistoricalJobResponseData dataItem) { + public ListThreatHuntingJobsResponse addDataItem(ThreatHuntingJobResponseData dataItem) { if (this.data == null) { this.data = new ArrayList<>(); } @@ -51,22 +51,22 @@ public ListHistoricalJobsResponse addDataItem(HistoricalJobResponseData dataItem } /** - * Array containing the list of historical jobs. + * Array containing the list of threat hunting jobs. * * @return data */ @jakarta.annotation.Nullable @JsonProperty(JSON_PROPERTY_DATA) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getData() { + public List getData() { return data; } - public void setData(List data) { + public void setData(List data) { this.data = data; } - public ListHistoricalJobsResponse meta(HistoricalJobListMeta meta) { + public ListThreatHuntingJobsResponse meta(ThreatHuntingJobListMeta meta) { this.meta = meta; this.unparsed |= meta.unparsed; return this; @@ -80,11 +80,11 @@ public ListHistoricalJobsResponse meta(HistoricalJobListMeta meta) { @jakarta.annotation.Nullable @JsonProperty(JSON_PROPERTY_META) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public HistoricalJobListMeta getMeta() { + public ThreatHuntingJobListMeta getMeta() { return meta; } - public void setMeta(HistoricalJobListMeta meta) { + public void setMeta(ThreatHuntingJobListMeta meta) { this.meta = meta; } @@ -100,10 +100,10 @@ public void setMeta(HistoricalJobListMeta meta) { * * @param key The arbitrary key to set * @param value The associated value - * @return ListHistoricalJobsResponse + * @return ListThreatHuntingJobsResponse */ @JsonAnySetter - public ListHistoricalJobsResponse putAdditionalProperty(String key, Object value) { + public ListThreatHuntingJobsResponse putAdditionalProperty(String key, Object value) { if (this.additionalProperties == null) { this.additionalProperties = new HashMap(); } @@ -134,7 +134,7 @@ public Object getAdditionalProperty(String key) { return this.additionalProperties.get(key); } - /** Return true if this ListHistoricalJobsResponse object is equal to o. */ + /** Return true if this ListThreatHuntingJobsResponse object is equal to o. */ @Override public boolean equals(Object o) { if (this == o) { @@ -143,11 +143,11 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - ListHistoricalJobsResponse listHistoricalJobsResponse = (ListHistoricalJobsResponse) o; - return Objects.equals(this.data, listHistoricalJobsResponse.data) - && Objects.equals(this.meta, listHistoricalJobsResponse.meta) + ListThreatHuntingJobsResponse listThreatHuntingJobsResponse = (ListThreatHuntingJobsResponse) o; + return Objects.equals(this.data, listThreatHuntingJobsResponse.data) + && Objects.equals(this.meta, listThreatHuntingJobsResponse.meta) && Objects.equals( - this.additionalProperties, listHistoricalJobsResponse.additionalProperties); + this.additionalProperties, listThreatHuntingJobsResponse.additionalProperties); } @Override @@ -158,7 +158,7 @@ public int hashCode() { @Override public String toString() { StringBuilder sb = new StringBuilder(); - sb.append("class ListHistoricalJobsResponse {\n"); + sb.append("class ListThreatHuntingJobsResponse {\n"); sb.append(" data: ").append(toIndentedString(data)).append("\n"); sb.append(" meta: ").append(toIndentedString(meta)).append("\n"); sb.append(" additionalProperties: ") diff --git a/src/main/java/com/datadog/api/client/v2/model/RunHistoricalJobRequest.java b/src/main/java/com/datadog/api/client/v2/model/RunThreatHuntingJobRequest.java similarity index 77% rename from src/main/java/com/datadog/api/client/v2/model/RunHistoricalJobRequest.java rename to src/main/java/com/datadog/api/client/v2/model/RunThreatHuntingJobRequest.java index c0346611bc8..151aad159cb 100644 --- a/src/main/java/com/datadog/api/client/v2/model/RunHistoricalJobRequest.java +++ b/src/main/java/com/datadog/api/client/v2/model/RunThreatHuntingJobRequest.java @@ -16,34 +16,34 @@ import java.util.Map; import java.util.Objects; -/** Run a historical job request. */ -@JsonPropertyOrder({RunHistoricalJobRequest.JSON_PROPERTY_DATA}) +/** Run a threat hunting job request. */ +@JsonPropertyOrder({RunThreatHuntingJobRequest.JSON_PROPERTY_DATA}) @jakarta.annotation.Generated( value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") -public class RunHistoricalJobRequest { +public class RunThreatHuntingJobRequest { @JsonIgnore public boolean unparsed = false; public static final String JSON_PROPERTY_DATA = "data"; - private RunHistoricalJobRequestData data; + private RunThreatHuntingJobRequestData data; - public RunHistoricalJobRequest data(RunHistoricalJobRequestData data) { + public RunThreatHuntingJobRequest data(RunThreatHuntingJobRequestData data) { this.data = data; this.unparsed |= data.unparsed; return this; } /** - * Data for running a historical job request. + * Data for running a threat hunting job request. * * @return data */ @jakarta.annotation.Nullable @JsonProperty(JSON_PROPERTY_DATA) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public RunHistoricalJobRequestData getData() { + public RunThreatHuntingJobRequestData getData() { return data; } - public void setData(RunHistoricalJobRequestData data) { + public void setData(RunThreatHuntingJobRequestData data) { this.data = data; } @@ -59,10 +59,10 @@ public void setData(RunHistoricalJobRequestData data) { * * @param key The arbitrary key to set * @param value The associated value - * @return RunHistoricalJobRequest + * @return RunThreatHuntingJobRequest */ @JsonAnySetter - public RunHistoricalJobRequest putAdditionalProperty(String key, Object value) { + public RunThreatHuntingJobRequest putAdditionalProperty(String key, Object value) { if (this.additionalProperties == null) { this.additionalProperties = new HashMap(); } @@ -93,7 +93,7 @@ public Object getAdditionalProperty(String key) { return this.additionalProperties.get(key); } - /** Return true if this RunHistoricalJobRequest object is equal to o. */ + /** Return true if this RunThreatHuntingJobRequest object is equal to o. */ @Override public boolean equals(Object o) { if (this == o) { @@ -102,9 +102,10 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - RunHistoricalJobRequest runHistoricalJobRequest = (RunHistoricalJobRequest) o; - return Objects.equals(this.data, runHistoricalJobRequest.data) - && Objects.equals(this.additionalProperties, runHistoricalJobRequest.additionalProperties); + RunThreatHuntingJobRequest runThreatHuntingJobRequest = (RunThreatHuntingJobRequest) o; + return Objects.equals(this.data, runThreatHuntingJobRequest.data) + && Objects.equals( + this.additionalProperties, runThreatHuntingJobRequest.additionalProperties); } @Override @@ -115,7 +116,7 @@ public int hashCode() { @Override public String toString() { StringBuilder sb = new StringBuilder(); - sb.append("class RunHistoricalJobRequest {\n"); + sb.append("class RunThreatHuntingJobRequest {\n"); sb.append(" data: ").append(toIndentedString(data)).append("\n"); sb.append(" additionalProperties: ") .append(toIndentedString(additionalProperties)) diff --git a/src/main/java/com/datadog/api/client/v2/model/RunHistoricalJobRequestAttributes.java b/src/main/java/com/datadog/api/client/v2/model/RunThreatHuntingJobRequestAttributes.java similarity index 76% rename from src/main/java/com/datadog/api/client/v2/model/RunHistoricalJobRequestAttributes.java rename to src/main/java/com/datadog/api/client/v2/model/RunThreatHuntingJobRequestAttributes.java index 92f9dec4c2c..a5ced720177 100644 --- a/src/main/java/com/datadog/api/client/v2/model/RunHistoricalJobRequestAttributes.java +++ b/src/main/java/com/datadog/api/client/v2/model/RunThreatHuntingJobRequestAttributes.java @@ -16,15 +16,15 @@ import java.util.Map; import java.util.Objects; -/** Run a historical job request. */ +/** Run a threat hunting job request. */ @JsonPropertyOrder({ - RunHistoricalJobRequestAttributes.JSON_PROPERTY_FROM_RULE, - RunHistoricalJobRequestAttributes.JSON_PROPERTY_ID, - RunHistoricalJobRequestAttributes.JSON_PROPERTY_JOB_DEFINITION + RunThreatHuntingJobRequestAttributes.JSON_PROPERTY_FROM_RULE, + RunThreatHuntingJobRequestAttributes.JSON_PROPERTY_ID, + RunThreatHuntingJobRequestAttributes.JSON_PROPERTY_JOB_DEFINITION }) @jakarta.annotation.Generated( value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") -public class RunHistoricalJobRequestAttributes { +public class RunThreatHuntingJobRequestAttributes { @JsonIgnore public boolean unparsed = false; public static final String JSON_PROPERTY_FROM_RULE = "fromRule"; private JobDefinitionFromRule fromRule; @@ -35,14 +35,14 @@ public class RunHistoricalJobRequestAttributes { public static final String JSON_PROPERTY_JOB_DEFINITION = "jobDefinition"; private JobDefinition jobDefinition; - public RunHistoricalJobRequestAttributes fromRule(JobDefinitionFromRule fromRule) { + public RunThreatHuntingJobRequestAttributes fromRule(JobDefinitionFromRule fromRule) { this.fromRule = fromRule; this.unparsed |= fromRule.unparsed; return this; } /** - * Definition of a historical job based on a security monitoring rule. + * Definition of a threat hunting job based on a security monitoring rule. * * @return fromRule */ @@ -57,7 +57,7 @@ public void setFromRule(JobDefinitionFromRule fromRule) { this.fromRule = fromRule; } - public RunHistoricalJobRequestAttributes id(String id) { + public RunThreatHuntingJobRequestAttributes id(String id) { this.id = id; return this; } @@ -78,14 +78,14 @@ public void setId(String id) { this.id = id; } - public RunHistoricalJobRequestAttributes jobDefinition(JobDefinition jobDefinition) { + public RunThreatHuntingJobRequestAttributes jobDefinition(JobDefinition jobDefinition) { this.jobDefinition = jobDefinition; this.unparsed |= jobDefinition.unparsed; return this; } /** - * Definition of a historical job. + * Definition of a threat hunting job. * * @return jobDefinition */ @@ -112,10 +112,10 @@ public void setJobDefinition(JobDefinition jobDefinition) { * * @param key The arbitrary key to set * @param value The associated value - * @return RunHistoricalJobRequestAttributes + * @return RunThreatHuntingJobRequestAttributes */ @JsonAnySetter - public RunHistoricalJobRequestAttributes putAdditionalProperty(String key, Object value) { + public RunThreatHuntingJobRequestAttributes putAdditionalProperty(String key, Object value) { if (this.additionalProperties == null) { this.additionalProperties = new HashMap(); } @@ -146,7 +146,7 @@ public Object getAdditionalProperty(String key) { return this.additionalProperties.get(key); } - /** Return true if this RunHistoricalJobRequestAttributes object is equal to o. */ + /** Return true if this RunThreatHuntingJobRequestAttributes object is equal to o. */ @Override public boolean equals(Object o) { if (this == o) { @@ -155,13 +155,13 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - RunHistoricalJobRequestAttributes runHistoricalJobRequestAttributes = - (RunHistoricalJobRequestAttributes) o; - return Objects.equals(this.fromRule, runHistoricalJobRequestAttributes.fromRule) - && Objects.equals(this.id, runHistoricalJobRequestAttributes.id) - && Objects.equals(this.jobDefinition, runHistoricalJobRequestAttributes.jobDefinition) + RunThreatHuntingJobRequestAttributes runThreatHuntingJobRequestAttributes = + (RunThreatHuntingJobRequestAttributes) o; + return Objects.equals(this.fromRule, runThreatHuntingJobRequestAttributes.fromRule) + && Objects.equals(this.id, runThreatHuntingJobRequestAttributes.id) + && Objects.equals(this.jobDefinition, runThreatHuntingJobRequestAttributes.jobDefinition) && Objects.equals( - this.additionalProperties, runHistoricalJobRequestAttributes.additionalProperties); + this.additionalProperties, runThreatHuntingJobRequestAttributes.additionalProperties); } @Override @@ -172,7 +172,7 @@ public int hashCode() { @Override public String toString() { StringBuilder sb = new StringBuilder(); - sb.append("class RunHistoricalJobRequestAttributes {\n"); + sb.append("class RunThreatHuntingJobRequestAttributes {\n"); sb.append(" fromRule: ").append(toIndentedString(fromRule)).append("\n"); sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" jobDefinition: ").append(toIndentedString(jobDefinition)).append("\n"); diff --git a/src/main/java/com/datadog/api/client/v2/model/RunHistoricalJobRequestData.java b/src/main/java/com/datadog/api/client/v2/model/RunThreatHuntingJobRequestData.java similarity index 73% rename from src/main/java/com/datadog/api/client/v2/model/RunHistoricalJobRequestData.java rename to src/main/java/com/datadog/api/client/v2/model/RunThreatHuntingJobRequestData.java index 8d0d2898694..3356e51d275 100644 --- a/src/main/java/com/datadog/api/client/v2/model/RunHistoricalJobRequestData.java +++ b/src/main/java/com/datadog/api/client/v2/model/RunThreatHuntingJobRequestData.java @@ -16,44 +16,45 @@ import java.util.Map; import java.util.Objects; -/** Data for running a historical job request. */ +/** Data for running a threat hunting job request. */ @JsonPropertyOrder({ - RunHistoricalJobRequestData.JSON_PROPERTY_ATTRIBUTES, - RunHistoricalJobRequestData.JSON_PROPERTY_TYPE + RunThreatHuntingJobRequestData.JSON_PROPERTY_ATTRIBUTES, + RunThreatHuntingJobRequestData.JSON_PROPERTY_TYPE }) @jakarta.annotation.Generated( value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") -public class RunHistoricalJobRequestData { +public class RunThreatHuntingJobRequestData { @JsonIgnore public boolean unparsed = false; public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; - private RunHistoricalJobRequestAttributes attributes; + private RunThreatHuntingJobRequestAttributes attributes; public static final String JSON_PROPERTY_TYPE = "type"; - private RunHistoricalJobRequestDataType type; + private RunThreatHuntingJobRequestDataType type; - public RunHistoricalJobRequestData attributes(RunHistoricalJobRequestAttributes attributes) { + public RunThreatHuntingJobRequestData attributes( + RunThreatHuntingJobRequestAttributes attributes) { this.attributes = attributes; this.unparsed |= attributes.unparsed; return this; } /** - * Run a historical job request. + * Run a threat hunting job request. * * @return attributes */ @jakarta.annotation.Nullable @JsonProperty(JSON_PROPERTY_ATTRIBUTES) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public RunHistoricalJobRequestAttributes getAttributes() { + public RunThreatHuntingJobRequestAttributes getAttributes() { return attributes; } - public void setAttributes(RunHistoricalJobRequestAttributes attributes) { + public void setAttributes(RunThreatHuntingJobRequestAttributes attributes) { this.attributes = attributes; } - public RunHistoricalJobRequestData type(RunHistoricalJobRequestDataType type) { + public RunThreatHuntingJobRequestData type(RunThreatHuntingJobRequestDataType type) { this.type = type; this.unparsed |= !type.isValid(); return this; @@ -67,11 +68,11 @@ public RunHistoricalJobRequestData type(RunHistoricalJobRequestDataType type) { @jakarta.annotation.Nullable @JsonProperty(JSON_PROPERTY_TYPE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public RunHistoricalJobRequestDataType getType() { + public RunThreatHuntingJobRequestDataType getType() { return type; } - public void setType(RunHistoricalJobRequestDataType type) { + public void setType(RunThreatHuntingJobRequestDataType type) { if (!type.isValid()) { this.unparsed = true; } @@ -90,10 +91,10 @@ public void setType(RunHistoricalJobRequestDataType type) { * * @param key The arbitrary key to set * @param value The associated value - * @return RunHistoricalJobRequestData + * @return RunThreatHuntingJobRequestData */ @JsonAnySetter - public RunHistoricalJobRequestData putAdditionalProperty(String key, Object value) { + public RunThreatHuntingJobRequestData putAdditionalProperty(String key, Object value) { if (this.additionalProperties == null) { this.additionalProperties = new HashMap(); } @@ -124,7 +125,7 @@ public Object getAdditionalProperty(String key) { return this.additionalProperties.get(key); } - /** Return true if this RunHistoricalJobRequestData object is equal to o. */ + /** Return true if this RunThreatHuntingJobRequestData object is equal to o. */ @Override public boolean equals(Object o) { if (this == o) { @@ -133,11 +134,12 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - RunHistoricalJobRequestData runHistoricalJobRequestData = (RunHistoricalJobRequestData) o; - return Objects.equals(this.attributes, runHistoricalJobRequestData.attributes) - && Objects.equals(this.type, runHistoricalJobRequestData.type) + RunThreatHuntingJobRequestData runThreatHuntingJobRequestData = + (RunThreatHuntingJobRequestData) o; + return Objects.equals(this.attributes, runThreatHuntingJobRequestData.attributes) + && Objects.equals(this.type, runThreatHuntingJobRequestData.type) && Objects.equals( - this.additionalProperties, runHistoricalJobRequestData.additionalProperties); + this.additionalProperties, runThreatHuntingJobRequestData.additionalProperties); } @Override @@ -148,7 +150,7 @@ public int hashCode() { @Override public String toString() { StringBuilder sb = new StringBuilder(); - sb.append("class RunHistoricalJobRequestData {\n"); + sb.append("class RunThreatHuntingJobRequestData {\n"); sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); sb.append(" type: ").append(toIndentedString(type)).append("\n"); sb.append(" additionalProperties: ") diff --git a/src/main/java/com/datadog/api/client/v2/model/RunHistoricalJobRequestDataType.java b/src/main/java/com/datadog/api/client/v2/model/RunThreatHuntingJobRequestDataType.java similarity index 55% rename from src/main/java/com/datadog/api/client/v2/model/RunHistoricalJobRequestDataType.java rename to src/main/java/com/datadog/api/client/v2/model/RunThreatHuntingJobRequestDataType.java index f2d57771736..61b53b7d493 100644 --- a/src/main/java/com/datadog/api/client/v2/model/RunHistoricalJobRequestDataType.java +++ b/src/main/java/com/datadog/api/client/v2/model/RunThreatHuntingJobRequestDataType.java @@ -20,39 +20,40 @@ /** Type of data. */ @JsonSerialize( - using = RunHistoricalJobRequestDataType.RunHistoricalJobRequestDataTypeSerializer.class) -public class RunHistoricalJobRequestDataType extends ModelEnum { + using = RunThreatHuntingJobRequestDataType.RunThreatHuntingJobRequestDataTypeSerializer.class) +public class RunThreatHuntingJobRequestDataType extends ModelEnum { private static final Set allowedValues = new HashSet(Arrays.asList("historicalDetectionsJobCreate")); - public static final RunHistoricalJobRequestDataType HISTORICALDETECTIONSJOBCREATE = - new RunHistoricalJobRequestDataType("historicalDetectionsJobCreate"); + public static final RunThreatHuntingJobRequestDataType HISTORICALDETECTIONSJOBCREATE = + new RunThreatHuntingJobRequestDataType("historicalDetectionsJobCreate"); - RunHistoricalJobRequestDataType(String value) { + RunThreatHuntingJobRequestDataType(String value) { super(value, allowedValues); } - public static class RunHistoricalJobRequestDataTypeSerializer - extends StdSerializer { - public RunHistoricalJobRequestDataTypeSerializer(Class t) { + public static class RunThreatHuntingJobRequestDataTypeSerializer + extends StdSerializer { + public RunThreatHuntingJobRequestDataTypeSerializer( + Class t) { super(t); } - public RunHistoricalJobRequestDataTypeSerializer() { + public RunThreatHuntingJobRequestDataTypeSerializer() { this(null); } @Override public void serialize( - RunHistoricalJobRequestDataType value, JsonGenerator jgen, SerializerProvider provider) + RunThreatHuntingJobRequestDataType value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { jgen.writeObject(value.value); } } @JsonCreator - public static RunHistoricalJobRequestDataType fromValue(String value) { - return new RunHistoricalJobRequestDataType(value); + public static RunThreatHuntingJobRequestDataType fromValue(String value) { + return new RunThreatHuntingJobRequestDataType(value); } } diff --git a/src/main/java/com/datadog/api/client/v2/model/HistoricalJobDataType.java b/src/main/java/com/datadog/api/client/v2/model/ThreatHuntingJobDataType.java similarity index 59% rename from src/main/java/com/datadog/api/client/v2/model/HistoricalJobDataType.java rename to src/main/java/com/datadog/api/client/v2/model/ThreatHuntingJobDataType.java index b28fe5e04c8..64ece4b410d 100644 --- a/src/main/java/com/datadog/api/client/v2/model/HistoricalJobDataType.java +++ b/src/main/java/com/datadog/api/client/v2/model/ThreatHuntingJobDataType.java @@ -19,38 +19,39 @@ import java.util.Set; /** Type of payload. */ -@JsonSerialize(using = HistoricalJobDataType.HistoricalJobDataTypeSerializer.class) -public class HistoricalJobDataType extends ModelEnum { +@JsonSerialize(using = ThreatHuntingJobDataType.ThreatHuntingJobDataTypeSerializer.class) +public class ThreatHuntingJobDataType extends ModelEnum { private static final Set allowedValues = new HashSet(Arrays.asList("historicalDetectionsJob")); - public static final HistoricalJobDataType HISTORICALDETECTIONSJOB = - new HistoricalJobDataType("historicalDetectionsJob"); + public static final ThreatHuntingJobDataType HISTORICALDETECTIONSJOB = + new ThreatHuntingJobDataType("historicalDetectionsJob"); - HistoricalJobDataType(String value) { + ThreatHuntingJobDataType(String value) { super(value, allowedValues); } - public static class HistoricalJobDataTypeSerializer extends StdSerializer { - public HistoricalJobDataTypeSerializer(Class t) { + public static class ThreatHuntingJobDataTypeSerializer + extends StdSerializer { + public ThreatHuntingJobDataTypeSerializer(Class t) { super(t); } - public HistoricalJobDataTypeSerializer() { + public ThreatHuntingJobDataTypeSerializer() { this(null); } @Override public void serialize( - HistoricalJobDataType value, JsonGenerator jgen, SerializerProvider provider) + ThreatHuntingJobDataType value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { jgen.writeObject(value.value); } } @JsonCreator - public static HistoricalJobDataType fromValue(String value) { - return new HistoricalJobDataType(value); + public static ThreatHuntingJobDataType fromValue(String value) { + return new ThreatHuntingJobDataType(value); } } diff --git a/src/main/java/com/datadog/api/client/v2/model/HistoricalJobListMeta.java b/src/main/java/com/datadog/api/client/v2/model/ThreatHuntingJobListMeta.java similarity index 83% rename from src/main/java/com/datadog/api/client/v2/model/HistoricalJobListMeta.java rename to src/main/java/com/datadog/api/client/v2/model/ThreatHuntingJobListMeta.java index bee924be8a7..b53f6cb6318 100644 --- a/src/main/java/com/datadog/api/client/v2/model/HistoricalJobListMeta.java +++ b/src/main/java/com/datadog/api/client/v2/model/ThreatHuntingJobListMeta.java @@ -17,15 +17,15 @@ import java.util.Objects; /** Metadata about the list of jobs. */ -@JsonPropertyOrder({HistoricalJobListMeta.JSON_PROPERTY_TOTAL_COUNT}) +@JsonPropertyOrder({ThreatHuntingJobListMeta.JSON_PROPERTY_TOTAL_COUNT}) @jakarta.annotation.Generated( value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") -public class HistoricalJobListMeta { +public class ThreatHuntingJobListMeta { @JsonIgnore public boolean unparsed = false; public static final String JSON_PROPERTY_TOTAL_COUNT = "totalCount"; private Integer totalCount; - public HistoricalJobListMeta totalCount(Integer totalCount) { + public ThreatHuntingJobListMeta totalCount(Integer totalCount) { this.totalCount = totalCount; return this; } @@ -58,10 +58,10 @@ public void setTotalCount(Integer totalCount) { * * @param key The arbitrary key to set * @param value The associated value - * @return HistoricalJobListMeta + * @return ThreatHuntingJobListMeta */ @JsonAnySetter - public HistoricalJobListMeta putAdditionalProperty(String key, Object value) { + public ThreatHuntingJobListMeta putAdditionalProperty(String key, Object value) { if (this.additionalProperties == null) { this.additionalProperties = new HashMap(); } @@ -92,7 +92,7 @@ public Object getAdditionalProperty(String key) { return this.additionalProperties.get(key); } - /** Return true if this HistoricalJobListMeta object is equal to o. */ + /** Return true if this ThreatHuntingJobListMeta object is equal to o. */ @Override public boolean equals(Object o) { if (this == o) { @@ -101,9 +101,9 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - HistoricalJobListMeta historicalJobListMeta = (HistoricalJobListMeta) o; - return Objects.equals(this.totalCount, historicalJobListMeta.totalCount) - && Objects.equals(this.additionalProperties, historicalJobListMeta.additionalProperties); + ThreatHuntingJobListMeta threatHuntingJobListMeta = (ThreatHuntingJobListMeta) o; + return Objects.equals(this.totalCount, threatHuntingJobListMeta.totalCount) + && Objects.equals(this.additionalProperties, threatHuntingJobListMeta.additionalProperties); } @Override @@ -114,7 +114,7 @@ public int hashCode() { @Override public String toString() { StringBuilder sb = new StringBuilder(); - sb.append("class HistoricalJobListMeta {\n"); + sb.append("class ThreatHuntingJobListMeta {\n"); sb.append(" totalCount: ").append(toIndentedString(totalCount)).append("\n"); sb.append(" additionalProperties: ") .append(toIndentedString(additionalProperties)) diff --git a/src/main/java/com/datadog/api/client/v2/model/HistoricalJobOptions.java b/src/main/java/com/datadog/api/client/v2/model/ThreatHuntingJobOptions.java similarity index 84% rename from src/main/java/com/datadog/api/client/v2/model/HistoricalJobOptions.java rename to src/main/java/com/datadog/api/client/v2/model/ThreatHuntingJobOptions.java index 1fa89a6a82d..9a4a7b8961a 100644 --- a/src/main/java/com/datadog/api/client/v2/model/HistoricalJobOptions.java +++ b/src/main/java/com/datadog/api/client/v2/model/ThreatHuntingJobOptions.java @@ -18,18 +18,18 @@ /** Job options. */ @JsonPropertyOrder({ - HistoricalJobOptions.JSON_PROPERTY_DETECTION_METHOD, - HistoricalJobOptions.JSON_PROPERTY_EVALUATION_WINDOW, - HistoricalJobOptions.JSON_PROPERTY_IMPOSSIBLE_TRAVEL_OPTIONS, - HistoricalJobOptions.JSON_PROPERTY_KEEP_ALIVE, - HistoricalJobOptions.JSON_PROPERTY_MAX_SIGNAL_DURATION, - HistoricalJobOptions.JSON_PROPERTY_NEW_VALUE_OPTIONS, - HistoricalJobOptions.JSON_PROPERTY_SEQUENCE_DETECTION_OPTIONS, - HistoricalJobOptions.JSON_PROPERTY_THIRD_PARTY_RULE_OPTIONS + ThreatHuntingJobOptions.JSON_PROPERTY_DETECTION_METHOD, + ThreatHuntingJobOptions.JSON_PROPERTY_EVALUATION_WINDOW, + ThreatHuntingJobOptions.JSON_PROPERTY_IMPOSSIBLE_TRAVEL_OPTIONS, + ThreatHuntingJobOptions.JSON_PROPERTY_KEEP_ALIVE, + ThreatHuntingJobOptions.JSON_PROPERTY_MAX_SIGNAL_DURATION, + ThreatHuntingJobOptions.JSON_PROPERTY_NEW_VALUE_OPTIONS, + ThreatHuntingJobOptions.JSON_PROPERTY_SEQUENCE_DETECTION_OPTIONS, + ThreatHuntingJobOptions.JSON_PROPERTY_THIRD_PARTY_RULE_OPTIONS }) @jakarta.annotation.Generated( value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") -public class HistoricalJobOptions { +public class ThreatHuntingJobOptions { @JsonIgnore public boolean unparsed = false; public static final String JSON_PROPERTY_DETECTION_METHOD = "detectionMethod"; private SecurityMonitoringRuleDetectionMethod detectionMethod; @@ -55,7 +55,7 @@ public class HistoricalJobOptions { public static final String JSON_PROPERTY_THIRD_PARTY_RULE_OPTIONS = "thirdPartyRuleOptions"; private SecurityMonitoringRuleThirdPartyOptions thirdPartyRuleOptions; - public HistoricalJobOptions detectionMethod( + public ThreatHuntingJobOptions detectionMethod( SecurityMonitoringRuleDetectionMethod detectionMethod) { this.detectionMethod = detectionMethod; this.unparsed |= !detectionMethod.isValid(); @@ -81,7 +81,7 @@ public void setDetectionMethod(SecurityMonitoringRuleDetectionMethod detectionMe this.detectionMethod = detectionMethod; } - public HistoricalJobOptions evaluationWindow( + public ThreatHuntingJobOptions evaluationWindow( SecurityMonitoringRuleEvaluationWindow evaluationWindow) { this.evaluationWindow = evaluationWindow; this.unparsed |= !evaluationWindow.isValid(); @@ -109,7 +109,7 @@ public void setEvaluationWindow(SecurityMonitoringRuleEvaluationWindow evaluatio this.evaluationWindow = evaluationWindow; } - public HistoricalJobOptions impossibleTravelOptions( + public ThreatHuntingJobOptions impossibleTravelOptions( SecurityMonitoringRuleImpossibleTravelOptions impossibleTravelOptions) { this.impossibleTravelOptions = impossibleTravelOptions; this.unparsed |= impossibleTravelOptions.unparsed; @@ -133,7 +133,7 @@ public void setImpossibleTravelOptions( this.impossibleTravelOptions = impossibleTravelOptions; } - public HistoricalJobOptions keepAlive(SecurityMonitoringRuleKeepAlive keepAlive) { + public ThreatHuntingJobOptions keepAlive(SecurityMonitoringRuleKeepAlive keepAlive) { this.keepAlive = keepAlive; this.unparsed |= !keepAlive.isValid(); return this; @@ -159,7 +159,7 @@ public void setKeepAlive(SecurityMonitoringRuleKeepAlive keepAlive) { this.keepAlive = keepAlive; } - public HistoricalJobOptions maxSignalDuration( + public ThreatHuntingJobOptions maxSignalDuration( SecurityMonitoringRuleMaxSignalDuration maxSignalDuration) { this.maxSignalDuration = maxSignalDuration; this.unparsed |= !maxSignalDuration.isValid(); @@ -186,7 +186,7 @@ public void setMaxSignalDuration(SecurityMonitoringRuleMaxSignalDuration maxSign this.maxSignalDuration = maxSignalDuration; } - public HistoricalJobOptions newValueOptions( + public ThreatHuntingJobOptions newValueOptions( SecurityMonitoringRuleNewValueOptions newValueOptions) { this.newValueOptions = newValueOptions; this.unparsed |= newValueOptions.unparsed; @@ -209,7 +209,7 @@ public void setNewValueOptions(SecurityMonitoringRuleNewValueOptions newValueOpt this.newValueOptions = newValueOptions; } - public HistoricalJobOptions sequenceDetectionOptions( + public ThreatHuntingJobOptions sequenceDetectionOptions( SecurityMonitoringRuleSequenceDetectionOptions sequenceDetectionOptions) { this.sequenceDetectionOptions = sequenceDetectionOptions; this.unparsed |= sequenceDetectionOptions.unparsed; @@ -233,7 +233,7 @@ public void setSequenceDetectionOptions( this.sequenceDetectionOptions = sequenceDetectionOptions; } - public HistoricalJobOptions thirdPartyRuleOptions( + public ThreatHuntingJobOptions thirdPartyRuleOptions( SecurityMonitoringRuleThirdPartyOptions thirdPartyRuleOptions) { this.thirdPartyRuleOptions = thirdPartyRuleOptions; this.unparsed |= thirdPartyRuleOptions.unparsed; @@ -269,10 +269,10 @@ public void setThirdPartyRuleOptions( * * @param key The arbitrary key to set * @param value The associated value - * @return HistoricalJobOptions + * @return ThreatHuntingJobOptions */ @JsonAnySetter - public HistoricalJobOptions putAdditionalProperty(String key, Object value) { + public ThreatHuntingJobOptions putAdditionalProperty(String key, Object value) { if (this.additionalProperties == null) { this.additionalProperties = new HashMap(); } @@ -303,7 +303,7 @@ public Object getAdditionalProperty(String key) { return this.additionalProperties.get(key); } - /** Return true if this HistoricalJobOptions object is equal to o. */ + /** Return true if this ThreatHuntingJobOptions object is equal to o. */ @Override public boolean equals(Object o) { if (this == o) { @@ -312,18 +312,18 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - HistoricalJobOptions historicalJobOptions = (HistoricalJobOptions) o; - return Objects.equals(this.detectionMethod, historicalJobOptions.detectionMethod) - && Objects.equals(this.evaluationWindow, historicalJobOptions.evaluationWindow) + ThreatHuntingJobOptions threatHuntingJobOptions = (ThreatHuntingJobOptions) o; + return Objects.equals(this.detectionMethod, threatHuntingJobOptions.detectionMethod) + && Objects.equals(this.evaluationWindow, threatHuntingJobOptions.evaluationWindow) && Objects.equals( - this.impossibleTravelOptions, historicalJobOptions.impossibleTravelOptions) - && Objects.equals(this.keepAlive, historicalJobOptions.keepAlive) - && Objects.equals(this.maxSignalDuration, historicalJobOptions.maxSignalDuration) - && Objects.equals(this.newValueOptions, historicalJobOptions.newValueOptions) + this.impossibleTravelOptions, threatHuntingJobOptions.impossibleTravelOptions) + && Objects.equals(this.keepAlive, threatHuntingJobOptions.keepAlive) + && Objects.equals(this.maxSignalDuration, threatHuntingJobOptions.maxSignalDuration) + && Objects.equals(this.newValueOptions, threatHuntingJobOptions.newValueOptions) && Objects.equals( - this.sequenceDetectionOptions, historicalJobOptions.sequenceDetectionOptions) - && Objects.equals(this.thirdPartyRuleOptions, historicalJobOptions.thirdPartyRuleOptions) - && Objects.equals(this.additionalProperties, historicalJobOptions.additionalProperties); + this.sequenceDetectionOptions, threatHuntingJobOptions.sequenceDetectionOptions) + && Objects.equals(this.thirdPartyRuleOptions, threatHuntingJobOptions.thirdPartyRuleOptions) + && Objects.equals(this.additionalProperties, threatHuntingJobOptions.additionalProperties); } @Override @@ -343,7 +343,7 @@ public int hashCode() { @Override public String toString() { StringBuilder sb = new StringBuilder(); - sb.append("class HistoricalJobOptions {\n"); + sb.append("class ThreatHuntingJobOptions {\n"); sb.append(" detectionMethod: ").append(toIndentedString(detectionMethod)).append("\n"); sb.append(" evaluationWindow: ").append(toIndentedString(evaluationWindow)).append("\n"); sb.append(" impossibleTravelOptions: ") diff --git a/src/main/java/com/datadog/api/client/v2/model/HistoricalJobQuery.java b/src/main/java/com/datadog/api/client/v2/model/ThreatHuntingJobQuery.java similarity index 80% rename from src/main/java/com/datadog/api/client/v2/model/HistoricalJobQuery.java rename to src/main/java/com/datadog/api/client/v2/model/ThreatHuntingJobQuery.java index 9a683e0996b..6eb52d0b0ea 100644 --- a/src/main/java/com/datadog/api/client/v2/model/HistoricalJobQuery.java +++ b/src/main/java/com/datadog/api/client/v2/model/ThreatHuntingJobQuery.java @@ -18,20 +18,20 @@ import java.util.Map; import java.util.Objects; -/** Query for selecting logs analyzed by the historical job. */ +/** Query for selecting logs analyzed by the threat hunting job. */ @JsonPropertyOrder({ - HistoricalJobQuery.JSON_PROPERTY_AGGREGATION, - HistoricalJobQuery.JSON_PROPERTY_DATA_SOURCE, - HistoricalJobQuery.JSON_PROPERTY_DISTINCT_FIELDS, - HistoricalJobQuery.JSON_PROPERTY_GROUP_BY_FIELDS, - HistoricalJobQuery.JSON_PROPERTY_HAS_OPTIONAL_GROUP_BY_FIELDS, - HistoricalJobQuery.JSON_PROPERTY_METRICS, - HistoricalJobQuery.JSON_PROPERTY_NAME, - HistoricalJobQuery.JSON_PROPERTY_QUERY + ThreatHuntingJobQuery.JSON_PROPERTY_AGGREGATION, + ThreatHuntingJobQuery.JSON_PROPERTY_DATA_SOURCE, + ThreatHuntingJobQuery.JSON_PROPERTY_DISTINCT_FIELDS, + ThreatHuntingJobQuery.JSON_PROPERTY_GROUP_BY_FIELDS, + ThreatHuntingJobQuery.JSON_PROPERTY_HAS_OPTIONAL_GROUP_BY_FIELDS, + ThreatHuntingJobQuery.JSON_PROPERTY_METRICS, + ThreatHuntingJobQuery.JSON_PROPERTY_NAME, + ThreatHuntingJobQuery.JSON_PROPERTY_QUERY }) @jakarta.annotation.Generated( value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") -public class HistoricalJobQuery { +public class ThreatHuntingJobQuery { @JsonIgnore public boolean unparsed = false; public static final String JSON_PROPERTY_AGGREGATION = "aggregation"; private SecurityMonitoringRuleQueryAggregation aggregation; @@ -59,7 +59,7 @@ public class HistoricalJobQuery { public static final String JSON_PROPERTY_QUERY = "query"; private String query; - public HistoricalJobQuery aggregation(SecurityMonitoringRuleQueryAggregation aggregation) { + public ThreatHuntingJobQuery aggregation(SecurityMonitoringRuleQueryAggregation aggregation) { this.aggregation = aggregation; this.unparsed |= !aggregation.isValid(); return this; @@ -84,7 +84,7 @@ public void setAggregation(SecurityMonitoringRuleQueryAggregation aggregation) { this.aggregation = aggregation; } - public HistoricalJobQuery dataSource(SecurityMonitoringStandardDataSource dataSource) { + public ThreatHuntingJobQuery dataSource(SecurityMonitoringStandardDataSource dataSource) { this.dataSource = dataSource; this.unparsed |= !dataSource.isValid(); return this; @@ -109,12 +109,12 @@ public void setDataSource(SecurityMonitoringStandardDataSource dataSource) { this.dataSource = dataSource; } - public HistoricalJobQuery distinctFields(List distinctFields) { + public ThreatHuntingJobQuery distinctFields(List distinctFields) { this.distinctFields = distinctFields; return this; } - public HistoricalJobQuery addDistinctFieldsItem(String distinctFieldsItem) { + public ThreatHuntingJobQuery addDistinctFieldsItem(String distinctFieldsItem) { if (this.distinctFields == null) { this.distinctFields = new ArrayList<>(); } @@ -138,12 +138,12 @@ public void setDistinctFields(List distinctFields) { this.distinctFields = distinctFields; } - public HistoricalJobQuery groupByFields(List groupByFields) { + public ThreatHuntingJobQuery groupByFields(List groupByFields) { this.groupByFields = groupByFields; return this; } - public HistoricalJobQuery addGroupByFieldsItem(String groupByFieldsItem) { + public ThreatHuntingJobQuery addGroupByFieldsItem(String groupByFieldsItem) { if (this.groupByFields == null) { this.groupByFields = new ArrayList<>(); } @@ -167,7 +167,7 @@ public void setGroupByFields(List groupByFields) { this.groupByFields = groupByFields; } - public HistoricalJobQuery hasOptionalGroupByFields(Boolean hasOptionalGroupByFields) { + public ThreatHuntingJobQuery hasOptionalGroupByFields(Boolean hasOptionalGroupByFields) { this.hasOptionalGroupByFields = hasOptionalGroupByFields; return this; } @@ -189,12 +189,12 @@ public void setHasOptionalGroupByFields(Boolean hasOptionalGroupByFields) { this.hasOptionalGroupByFields = hasOptionalGroupByFields; } - public HistoricalJobQuery metrics(List metrics) { + public ThreatHuntingJobQuery metrics(List metrics) { this.metrics = metrics; return this; } - public HistoricalJobQuery addMetricsItem(String metricsItem) { + public ThreatHuntingJobQuery addMetricsItem(String metricsItem) { if (this.metrics == null) { this.metrics = new ArrayList<>(); } @@ -220,7 +220,7 @@ public void setMetrics(List metrics) { this.metrics = metrics; } - public HistoricalJobQuery name(String name) { + public ThreatHuntingJobQuery name(String name) { this.name = name; return this; } @@ -241,7 +241,7 @@ public void setName(String name) { this.name = name; } - public HistoricalJobQuery query(String query) { + public ThreatHuntingJobQuery query(String query) { this.query = query; return this; } @@ -274,10 +274,10 @@ public void setQuery(String query) { * * @param key The arbitrary key to set * @param value The associated value - * @return HistoricalJobQuery + * @return ThreatHuntingJobQuery */ @JsonAnySetter - public HistoricalJobQuery putAdditionalProperty(String key, Object value) { + public ThreatHuntingJobQuery putAdditionalProperty(String key, Object value) { if (this.additionalProperties == null) { this.additionalProperties = new HashMap(); } @@ -308,7 +308,7 @@ public Object getAdditionalProperty(String key) { return this.additionalProperties.get(key); } - /** Return true if this HistoricalJobQuery object is equal to o. */ + /** Return true if this ThreatHuntingJobQuery object is equal to o. */ @Override public boolean equals(Object o) { if (this == o) { @@ -317,17 +317,17 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - HistoricalJobQuery historicalJobQuery = (HistoricalJobQuery) o; - return Objects.equals(this.aggregation, historicalJobQuery.aggregation) - && Objects.equals(this.dataSource, historicalJobQuery.dataSource) - && Objects.equals(this.distinctFields, historicalJobQuery.distinctFields) - && Objects.equals(this.groupByFields, historicalJobQuery.groupByFields) + ThreatHuntingJobQuery threatHuntingJobQuery = (ThreatHuntingJobQuery) o; + return Objects.equals(this.aggregation, threatHuntingJobQuery.aggregation) + && Objects.equals(this.dataSource, threatHuntingJobQuery.dataSource) + && Objects.equals(this.distinctFields, threatHuntingJobQuery.distinctFields) + && Objects.equals(this.groupByFields, threatHuntingJobQuery.groupByFields) && Objects.equals( - this.hasOptionalGroupByFields, historicalJobQuery.hasOptionalGroupByFields) - && Objects.equals(this.metrics, historicalJobQuery.metrics) - && Objects.equals(this.name, historicalJobQuery.name) - && Objects.equals(this.query, historicalJobQuery.query) - && Objects.equals(this.additionalProperties, historicalJobQuery.additionalProperties); + this.hasOptionalGroupByFields, threatHuntingJobQuery.hasOptionalGroupByFields) + && Objects.equals(this.metrics, threatHuntingJobQuery.metrics) + && Objects.equals(this.name, threatHuntingJobQuery.name) + && Objects.equals(this.query, threatHuntingJobQuery.query) + && Objects.equals(this.additionalProperties, threatHuntingJobQuery.additionalProperties); } @Override @@ -347,7 +347,7 @@ public int hashCode() { @Override public String toString() { StringBuilder sb = new StringBuilder(); - sb.append("class HistoricalJobQuery {\n"); + sb.append("class ThreatHuntingJobQuery {\n"); sb.append(" aggregation: ").append(toIndentedString(aggregation)).append("\n"); sb.append(" dataSource: ").append(toIndentedString(dataSource)).append("\n"); sb.append(" distinctFields: ").append(toIndentedString(distinctFields)).append("\n"); diff --git a/src/main/java/com/datadog/api/client/v2/model/HistoricalJobResponse.java b/src/main/java/com/datadog/api/client/v2/model/ThreatHuntingJobResponse.java similarity index 78% rename from src/main/java/com/datadog/api/client/v2/model/HistoricalJobResponse.java rename to src/main/java/com/datadog/api/client/v2/model/ThreatHuntingJobResponse.java index 49ca926a6a2..f2ba25ece19 100644 --- a/src/main/java/com/datadog/api/client/v2/model/HistoricalJobResponse.java +++ b/src/main/java/com/datadog/api/client/v2/model/ThreatHuntingJobResponse.java @@ -16,34 +16,34 @@ import java.util.Map; import java.util.Objects; -/** Historical job response. */ -@JsonPropertyOrder({HistoricalJobResponse.JSON_PROPERTY_DATA}) +/** Threat hunting job response. */ +@JsonPropertyOrder({ThreatHuntingJobResponse.JSON_PROPERTY_DATA}) @jakarta.annotation.Generated( value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") -public class HistoricalJobResponse { +public class ThreatHuntingJobResponse { @JsonIgnore public boolean unparsed = false; public static final String JSON_PROPERTY_DATA = "data"; - private HistoricalJobResponseData data; + private ThreatHuntingJobResponseData data; - public HistoricalJobResponse data(HistoricalJobResponseData data) { + public ThreatHuntingJobResponse data(ThreatHuntingJobResponseData data) { this.data = data; this.unparsed |= data.unparsed; return this; } /** - * Historical job response data. + * Threat hunting job response data. * * @return data */ @jakarta.annotation.Nullable @JsonProperty(JSON_PROPERTY_DATA) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public HistoricalJobResponseData getData() { + public ThreatHuntingJobResponseData getData() { return data; } - public void setData(HistoricalJobResponseData data) { + public void setData(ThreatHuntingJobResponseData data) { this.data = data; } @@ -59,10 +59,10 @@ public void setData(HistoricalJobResponseData data) { * * @param key The arbitrary key to set * @param value The associated value - * @return HistoricalJobResponse + * @return ThreatHuntingJobResponse */ @JsonAnySetter - public HistoricalJobResponse putAdditionalProperty(String key, Object value) { + public ThreatHuntingJobResponse putAdditionalProperty(String key, Object value) { if (this.additionalProperties == null) { this.additionalProperties = new HashMap(); } @@ -93,7 +93,7 @@ public Object getAdditionalProperty(String key) { return this.additionalProperties.get(key); } - /** Return true if this HistoricalJobResponse object is equal to o. */ + /** Return true if this ThreatHuntingJobResponse object is equal to o. */ @Override public boolean equals(Object o) { if (this == o) { @@ -102,9 +102,9 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - HistoricalJobResponse historicalJobResponse = (HistoricalJobResponse) o; - return Objects.equals(this.data, historicalJobResponse.data) - && Objects.equals(this.additionalProperties, historicalJobResponse.additionalProperties); + ThreatHuntingJobResponse threatHuntingJobResponse = (ThreatHuntingJobResponse) o; + return Objects.equals(this.data, threatHuntingJobResponse.data) + && Objects.equals(this.additionalProperties, threatHuntingJobResponse.additionalProperties); } @Override @@ -115,7 +115,7 @@ public int hashCode() { @Override public String toString() { StringBuilder sb = new StringBuilder(); - sb.append("class HistoricalJobResponse {\n"); + sb.append("class ThreatHuntingJobResponse {\n"); sb.append(" data: ").append(toIndentedString(data)).append("\n"); sb.append(" additionalProperties: ") .append(toIndentedString(additionalProperties)) diff --git a/src/main/java/com/datadog/api/client/v2/model/HistoricalJobResponseAttributes.java b/src/main/java/com/datadog/api/client/v2/model/ThreatHuntingJobResponseAttributes.java similarity index 76% rename from src/main/java/com/datadog/api/client/v2/model/HistoricalJobResponseAttributes.java rename to src/main/java/com/datadog/api/client/v2/model/ThreatHuntingJobResponseAttributes.java index 3cc744fcb7c..5404fa3cdbd 100644 --- a/src/main/java/com/datadog/api/client/v2/model/HistoricalJobResponseAttributes.java +++ b/src/main/java/com/datadog/api/client/v2/model/ThreatHuntingJobResponseAttributes.java @@ -16,20 +16,20 @@ import java.util.Map; import java.util.Objects; -/** Historical job attributes. */ +/** Threat hunting job attributes. */ @JsonPropertyOrder({ - HistoricalJobResponseAttributes.JSON_PROPERTY_CREATED_AT, - HistoricalJobResponseAttributes.JSON_PROPERTY_CREATED_BY_HANDLE, - HistoricalJobResponseAttributes.JSON_PROPERTY_CREATED_BY_NAME, - HistoricalJobResponseAttributes.JSON_PROPERTY_CREATED_FROM_RULE_ID, - HistoricalJobResponseAttributes.JSON_PROPERTY_JOB_DEFINITION, - HistoricalJobResponseAttributes.JSON_PROPERTY_JOB_NAME, - HistoricalJobResponseAttributes.JSON_PROPERTY_JOB_STATUS, - HistoricalJobResponseAttributes.JSON_PROPERTY_MODIFIED_AT + ThreatHuntingJobResponseAttributes.JSON_PROPERTY_CREATED_AT, + ThreatHuntingJobResponseAttributes.JSON_PROPERTY_CREATED_BY_HANDLE, + ThreatHuntingJobResponseAttributes.JSON_PROPERTY_CREATED_BY_NAME, + ThreatHuntingJobResponseAttributes.JSON_PROPERTY_CREATED_FROM_RULE_ID, + ThreatHuntingJobResponseAttributes.JSON_PROPERTY_JOB_DEFINITION, + ThreatHuntingJobResponseAttributes.JSON_PROPERTY_JOB_NAME, + ThreatHuntingJobResponseAttributes.JSON_PROPERTY_JOB_STATUS, + ThreatHuntingJobResponseAttributes.JSON_PROPERTY_MODIFIED_AT }) @jakarta.annotation.Generated( value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") -public class HistoricalJobResponseAttributes { +public class ThreatHuntingJobResponseAttributes { @JsonIgnore public boolean unparsed = false; public static final String JSON_PROPERTY_CREATED_AT = "createdAt"; private String createdAt; @@ -55,7 +55,7 @@ public class HistoricalJobResponseAttributes { public static final String JSON_PROPERTY_MODIFIED_AT = "modifiedAt"; private String modifiedAt; - public HistoricalJobResponseAttributes createdAt(String createdAt) { + public ThreatHuntingJobResponseAttributes createdAt(String createdAt) { this.createdAt = createdAt; return this; } @@ -76,7 +76,7 @@ public void setCreatedAt(String createdAt) { this.createdAt = createdAt; } - public HistoricalJobResponseAttributes createdByHandle(String createdByHandle) { + public ThreatHuntingJobResponseAttributes createdByHandle(String createdByHandle) { this.createdByHandle = createdByHandle; return this; } @@ -97,7 +97,7 @@ public void setCreatedByHandle(String createdByHandle) { this.createdByHandle = createdByHandle; } - public HistoricalJobResponseAttributes createdByName(String createdByName) { + public ThreatHuntingJobResponseAttributes createdByName(String createdByName) { this.createdByName = createdByName; return this; } @@ -118,7 +118,7 @@ public void setCreatedByName(String createdByName) { this.createdByName = createdByName; } - public HistoricalJobResponseAttributes createdFromRuleId(String createdFromRuleId) { + public ThreatHuntingJobResponseAttributes createdFromRuleId(String createdFromRuleId) { this.createdFromRuleId = createdFromRuleId; return this; } @@ -139,14 +139,14 @@ public void setCreatedFromRuleId(String createdFromRuleId) { this.createdFromRuleId = createdFromRuleId; } - public HistoricalJobResponseAttributes jobDefinition(JobDefinition jobDefinition) { + public ThreatHuntingJobResponseAttributes jobDefinition(JobDefinition jobDefinition) { this.jobDefinition = jobDefinition; this.unparsed |= jobDefinition.unparsed; return this; } /** - * Definition of a historical job. + * Definition of a threat hunting job. * * @return jobDefinition */ @@ -161,7 +161,7 @@ public void setJobDefinition(JobDefinition jobDefinition) { this.jobDefinition = jobDefinition; } - public HistoricalJobResponseAttributes jobName(String jobName) { + public ThreatHuntingJobResponseAttributes jobName(String jobName) { this.jobName = jobName; return this; } @@ -182,7 +182,7 @@ public void setJobName(String jobName) { this.jobName = jobName; } - public HistoricalJobResponseAttributes jobStatus(String jobStatus) { + public ThreatHuntingJobResponseAttributes jobStatus(String jobStatus) { this.jobStatus = jobStatus; return this; } @@ -203,7 +203,7 @@ public void setJobStatus(String jobStatus) { this.jobStatus = jobStatus; } - public HistoricalJobResponseAttributes modifiedAt(String modifiedAt) { + public ThreatHuntingJobResponseAttributes modifiedAt(String modifiedAt) { this.modifiedAt = modifiedAt; return this; } @@ -236,10 +236,10 @@ public void setModifiedAt(String modifiedAt) { * * @param key The arbitrary key to set * @param value The associated value - * @return HistoricalJobResponseAttributes + * @return ThreatHuntingJobResponseAttributes */ @JsonAnySetter - public HistoricalJobResponseAttributes putAdditionalProperty(String key, Object value) { + public ThreatHuntingJobResponseAttributes putAdditionalProperty(String key, Object value) { if (this.additionalProperties == null) { this.additionalProperties = new HashMap(); } @@ -270,7 +270,7 @@ public Object getAdditionalProperty(String key) { return this.additionalProperties.get(key); } - /** Return true if this HistoricalJobResponseAttributes object is equal to o. */ + /** Return true if this ThreatHuntingJobResponseAttributes object is equal to o. */ @Override public boolean equals(Object o) { if (this == o) { @@ -279,18 +279,19 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - HistoricalJobResponseAttributes historicalJobResponseAttributes = - (HistoricalJobResponseAttributes) o; - return Objects.equals(this.createdAt, historicalJobResponseAttributes.createdAt) - && Objects.equals(this.createdByHandle, historicalJobResponseAttributes.createdByHandle) - && Objects.equals(this.createdByName, historicalJobResponseAttributes.createdByName) - && Objects.equals(this.createdFromRuleId, historicalJobResponseAttributes.createdFromRuleId) - && Objects.equals(this.jobDefinition, historicalJobResponseAttributes.jobDefinition) - && Objects.equals(this.jobName, historicalJobResponseAttributes.jobName) - && Objects.equals(this.jobStatus, historicalJobResponseAttributes.jobStatus) - && Objects.equals(this.modifiedAt, historicalJobResponseAttributes.modifiedAt) + ThreatHuntingJobResponseAttributes threatHuntingJobResponseAttributes = + (ThreatHuntingJobResponseAttributes) o; + return Objects.equals(this.createdAt, threatHuntingJobResponseAttributes.createdAt) + && Objects.equals(this.createdByHandle, threatHuntingJobResponseAttributes.createdByHandle) + && Objects.equals(this.createdByName, threatHuntingJobResponseAttributes.createdByName) && Objects.equals( - this.additionalProperties, historicalJobResponseAttributes.additionalProperties); + this.createdFromRuleId, threatHuntingJobResponseAttributes.createdFromRuleId) + && Objects.equals(this.jobDefinition, threatHuntingJobResponseAttributes.jobDefinition) + && Objects.equals(this.jobName, threatHuntingJobResponseAttributes.jobName) + && Objects.equals(this.jobStatus, threatHuntingJobResponseAttributes.jobStatus) + && Objects.equals(this.modifiedAt, threatHuntingJobResponseAttributes.modifiedAt) + && Objects.equals( + this.additionalProperties, threatHuntingJobResponseAttributes.additionalProperties); } @Override @@ -310,7 +311,7 @@ public int hashCode() { @Override public String toString() { StringBuilder sb = new StringBuilder(); - sb.append("class HistoricalJobResponseAttributes {\n"); + sb.append("class ThreatHuntingJobResponseAttributes {\n"); sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); sb.append(" createdByHandle: ").append(toIndentedString(createdByHandle)).append("\n"); sb.append(" createdByName: ").append(toIndentedString(createdByName)).append("\n"); diff --git a/src/main/java/com/datadog/api/client/v2/model/HistoricalJobResponseData.java b/src/main/java/com/datadog/api/client/v2/model/ThreatHuntingJobResponseData.java similarity index 74% rename from src/main/java/com/datadog/api/client/v2/model/HistoricalJobResponseData.java rename to src/main/java/com/datadog/api/client/v2/model/ThreatHuntingJobResponseData.java index bff7e52c787..763085eee32 100644 --- a/src/main/java/com/datadog/api/client/v2/model/HistoricalJobResponseData.java +++ b/src/main/java/com/datadog/api/client/v2/model/ThreatHuntingJobResponseData.java @@ -16,48 +16,48 @@ import java.util.Map; import java.util.Objects; -/** Historical job response data. */ +/** Threat hunting job response data. */ @JsonPropertyOrder({ - HistoricalJobResponseData.JSON_PROPERTY_ATTRIBUTES, - HistoricalJobResponseData.JSON_PROPERTY_ID, - HistoricalJobResponseData.JSON_PROPERTY_TYPE + ThreatHuntingJobResponseData.JSON_PROPERTY_ATTRIBUTES, + ThreatHuntingJobResponseData.JSON_PROPERTY_ID, + ThreatHuntingJobResponseData.JSON_PROPERTY_TYPE }) @jakarta.annotation.Generated( value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") -public class HistoricalJobResponseData { +public class ThreatHuntingJobResponseData { @JsonIgnore public boolean unparsed = false; public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; - private HistoricalJobResponseAttributes attributes; + private ThreatHuntingJobResponseAttributes attributes; public static final String JSON_PROPERTY_ID = "id"; private String id; public static final String JSON_PROPERTY_TYPE = "type"; - private HistoricalJobDataType type; + private ThreatHuntingJobDataType type; - public HistoricalJobResponseData attributes(HistoricalJobResponseAttributes attributes) { + public ThreatHuntingJobResponseData attributes(ThreatHuntingJobResponseAttributes attributes) { this.attributes = attributes; this.unparsed |= attributes.unparsed; return this; } /** - * Historical job attributes. + * Threat hunting job attributes. * * @return attributes */ @jakarta.annotation.Nullable @JsonProperty(JSON_PROPERTY_ATTRIBUTES) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public HistoricalJobResponseAttributes getAttributes() { + public ThreatHuntingJobResponseAttributes getAttributes() { return attributes; } - public void setAttributes(HistoricalJobResponseAttributes attributes) { + public void setAttributes(ThreatHuntingJobResponseAttributes attributes) { this.attributes = attributes; } - public HistoricalJobResponseData id(String id) { + public ThreatHuntingJobResponseData id(String id) { this.id = id; return this; } @@ -78,7 +78,7 @@ public void setId(String id) { this.id = id; } - public HistoricalJobResponseData type(HistoricalJobDataType type) { + public ThreatHuntingJobResponseData type(ThreatHuntingJobDataType type) { this.type = type; this.unparsed |= !type.isValid(); return this; @@ -92,11 +92,11 @@ public HistoricalJobResponseData type(HistoricalJobDataType type) { @jakarta.annotation.Nullable @JsonProperty(JSON_PROPERTY_TYPE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public HistoricalJobDataType getType() { + public ThreatHuntingJobDataType getType() { return type; } - public void setType(HistoricalJobDataType type) { + public void setType(ThreatHuntingJobDataType type) { if (!type.isValid()) { this.unparsed = true; } @@ -115,10 +115,10 @@ public void setType(HistoricalJobDataType type) { * * @param key The arbitrary key to set * @param value The associated value - * @return HistoricalJobResponseData + * @return ThreatHuntingJobResponseData */ @JsonAnySetter - public HistoricalJobResponseData putAdditionalProperty(String key, Object value) { + public ThreatHuntingJobResponseData putAdditionalProperty(String key, Object value) { if (this.additionalProperties == null) { this.additionalProperties = new HashMap(); } @@ -149,7 +149,7 @@ public Object getAdditionalProperty(String key) { return this.additionalProperties.get(key); } - /** Return true if this HistoricalJobResponseData object is equal to o. */ + /** Return true if this ThreatHuntingJobResponseData object is equal to o. */ @Override public boolean equals(Object o) { if (this == o) { @@ -158,12 +158,12 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - HistoricalJobResponseData historicalJobResponseData = (HistoricalJobResponseData) o; - return Objects.equals(this.attributes, historicalJobResponseData.attributes) - && Objects.equals(this.id, historicalJobResponseData.id) - && Objects.equals(this.type, historicalJobResponseData.type) + ThreatHuntingJobResponseData threatHuntingJobResponseData = (ThreatHuntingJobResponseData) o; + return Objects.equals(this.attributes, threatHuntingJobResponseData.attributes) + && Objects.equals(this.id, threatHuntingJobResponseData.id) + && Objects.equals(this.type, threatHuntingJobResponseData.type) && Objects.equals( - this.additionalProperties, historicalJobResponseData.additionalProperties); + this.additionalProperties, threatHuntingJobResponseData.additionalProperties); } @Override @@ -174,7 +174,7 @@ public int hashCode() { @Override public String toString() { StringBuilder sb = new StringBuilder(); - sb.append("class HistoricalJobResponseData {\n"); + sb.append("class ThreatHuntingJobResponseData {\n"); sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" type: ").append(toIndentedString(type)).append("\n"); diff --git a/src/test/resources/cassettes/features/v2/Cancel_a_historical_job_returns_Bad_Request_response.freeze b/src/test/resources/cassettes/features/v2/Cancel_a_historical_job_returns_Bad_Request_response.freeze index bf92f15d9de..633b88ea1af 100644 --- a/src/test/resources/cassettes/features/v2/Cancel_a_historical_job_returns_Bad_Request_response.freeze +++ b/src/test/resources/cassettes/features/v2/Cancel_a_historical_job_returns_Bad_Request_response.freeze @@ -1 +1 @@ -2024-11-08T09:54:38.539Z \ No newline at end of file +2025-10-24T14:24:00.041Z \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Cancel_a_historical_job_returns_Bad_Request_response.json b/src/test/resources/cassettes/features/v2/Cancel_a_historical_job_returns_Bad_Request_response.json index 2f02af2ca25..799a7486716 100644 --- a/src/test/resources/cassettes/features/v2/Cancel_a_historical_job_returns_Bad_Request_response.json +++ b/src/test/resources/cassettes/features/v2/Cancel_a_historical_job_returns_Bad_Request_response.json @@ -3,7 +3,7 @@ "httpRequest": { "headers": {}, "method": "PATCH", - "path": "/api/v2/siem-historical-detections/jobs/inva-lid/cancel", + "path": "/api/v2/siem-threat-hunting/jobs/inva-lid/cancel", "keepAlive": false, "secure": true }, @@ -23,6 +23,6 @@ "timeToLive": { "unlimited": true }, - "id": "9ee0d12d-c2a7-6c2c-4cd5-598af0680035" + "id": "e4257625-4269-56fb-c2c7-16c61d098a68" } ] \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Cancel_a_historical_job_returns_Not_Found_response.freeze b/src/test/resources/cassettes/features/v2/Cancel_a_historical_job_returns_Not_Found_response.freeze index 8bf8faeef38..213014e1d2d 100644 --- a/src/test/resources/cassettes/features/v2/Cancel_a_historical_job_returns_Not_Found_response.freeze +++ b/src/test/resources/cassettes/features/v2/Cancel_a_historical_job_returns_Not_Found_response.freeze @@ -1 +1 @@ -2024-11-08T09:54:39.006Z \ No newline at end of file +2025-10-24T14:24:00.856Z \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Cancel_a_historical_job_returns_Not_Found_response.json b/src/test/resources/cassettes/features/v2/Cancel_a_historical_job_returns_Not_Found_response.json index 53a0295200e..a7946976f1c 100644 --- a/src/test/resources/cassettes/features/v2/Cancel_a_historical_job_returns_Not_Found_response.json +++ b/src/test/resources/cassettes/features/v2/Cancel_a_historical_job_returns_Not_Found_response.json @@ -3,12 +3,12 @@ "httpRequest": { "headers": {}, "method": "PATCH", - "path": "/api/v2/siem-historical-detections/jobs/8e2a37fb-b0c8-4761-a7f0-0a8d6a98ba93/cancel", + "path": "/api/v2/siem-threat-hunting/jobs/8e2a37fb-b0c8-4761-a7f0-0a8d6a98ba93/cancel", "keepAlive": false, "secure": true }, "httpResponse": { - "body": "{\"errors\":[{\"status\":\"404\",\"title\":\"Not Found\",\"detail\":\"Job 8e2a37fb-b0c8-4761-a7f0-0a8d6a98ba93 was not found.\"}]}", + "body": "{\"errors\":[{\"status\":\"404\",\"detail\":\"Not Found\"}]}", "headers": { "Content-Type": [ "application/vnd.api+json" @@ -23,6 +23,6 @@ "timeToLive": { "unlimited": true }, - "id": "699b2b92-566c-9d92-69d6-d218f57402f8" + "id": "e39b14a9-77fa-d872-9562-37286fee579e" } ] \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Cancel_a_historical_job_returns_OK_response.freeze b/src/test/resources/cassettes/features/v2/Cancel_a_historical_job_returns_OK_response.freeze index 8eee63f586c..9b9326abb8c 100644 --- a/src/test/resources/cassettes/features/v2/Cancel_a_historical_job_returns_OK_response.freeze +++ b/src/test/resources/cassettes/features/v2/Cancel_a_historical_job_returns_OK_response.freeze @@ -1 +1 @@ -2024-11-08T09:54:39.082Z \ No newline at end of file +2025-10-24T14:24:00.975Z \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Cancel_a_historical_job_returns_OK_response.json b/src/test/resources/cassettes/features/v2/Cancel_a_historical_job_returns_OK_response.json index 73b6c147c8c..8df6e835fb8 100644 --- a/src/test/resources/cassettes/features/v2/Cancel_a_historical_job_returns_OK_response.json +++ b/src/test/resources/cassettes/features/v2/Cancel_a_historical_job_returns_OK_response.json @@ -7,12 +7,12 @@ }, "headers": {}, "method": "POST", - "path": "/api/v2/siem-historical-detections/jobs", + "path": "/api/v2/siem-threat-hunting/jobs", "keepAlive": false, "secure": true }, "httpResponse": { - "body": "{\"data\":{\"id\":\"e332b07e-d573-45fa-b2df-9a1bcc27f17e\",\"type\":\"historicalDetectionsJob\"}}", + "body": "{\"data\":{\"id\":\"cafe565c-106b-486e-ad21-a712656723b4\",\"type\":\"historicalDetectionsJob\"}}", "headers": { "Content-Type": [ "application/vnd.api+json" @@ -27,13 +27,13 @@ "timeToLive": { "unlimited": true }, - "id": "6bb82102-e994-f0d1-ee96-e1e3f1d80ffd" + "id": "4c138fa0-d834-5972-8bd7-894a659525ac" }, { "httpRequest": { "headers": {}, "method": "PATCH", - "path": "/api/v2/siem-historical-detections/jobs/e332b07e-d573-45fa-b2df-9a1bcc27f17e/cancel", + "path": "/api/v2/siem-threat-hunting/jobs/cafe565c-106b-486e-ad21-a712656723b4/cancel", "keepAlive": false, "secure": true }, @@ -48,6 +48,6 @@ "timeToLive": { "unlimited": true }, - "id": "43cd9ba3-ae67-113c-4ab1-7f57b600ac37" + "id": "260d5e64-4c21-4178-5468-0ac43b40d556" } ] \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Convert_a_job_result_to_a_signal_returns_Bad_Request_response.freeze b/src/test/resources/cassettes/features/v2/Convert_a_job_result_to_a_signal_returns_Bad_Request_response.freeze index b819957f316..ba1f583e595 100644 --- a/src/test/resources/cassettes/features/v2/Convert_a_job_result_to_a_signal_returns_Bad_Request_response.freeze +++ b/src/test/resources/cassettes/features/v2/Convert_a_job_result_to_a_signal_returns_Bad_Request_response.freeze @@ -1 +1 @@ -2024-11-08T09:54:39.280Z \ No newline at end of file +2025-10-24T14:24:01.235Z \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Convert_a_job_result_to_a_signal_returns_Bad_Request_response.json b/src/test/resources/cassettes/features/v2/Convert_a_job_result_to_a_signal_returns_Bad_Request_response.json index f61957ebe35..212d2be60c0 100644 --- a/src/test/resources/cassettes/features/v2/Convert_a_job_result_to_a_signal_returns_Bad_Request_response.json +++ b/src/test/resources/cassettes/features/v2/Convert_a_job_result_to_a_signal_returns_Bad_Request_response.json @@ -7,7 +7,7 @@ }, "headers": {}, "method": "POST", - "path": "/api/v2/siem-historical-detections/jobs/signal_convert", + "path": "/api/v2/siem-threat-hunting/jobs/signal_convert", "keepAlive": false, "secure": true }, @@ -27,6 +27,6 @@ "timeToLive": { "unlimited": true }, - "id": "0d4946af-2c85-586b-74dd-eb117a50a4a6" + "id": "547f0189-451a-1424-59cd-9f22ee5351f6" } ] \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Delete_an_existing_job_returns_Bad_Request_response.freeze b/src/test/resources/cassettes/features/v2/Delete_an_existing_job_returns_Bad_Request_response.freeze index 553556ed2e1..cf2f32dfa3e 100644 --- a/src/test/resources/cassettes/features/v2/Delete_an_existing_job_returns_Bad_Request_response.freeze +++ b/src/test/resources/cassettes/features/v2/Delete_an_existing_job_returns_Bad_Request_response.freeze @@ -1 +1 @@ -2024-11-08T09:54:39.371Z \ No newline at end of file +2025-10-24T14:24:01.339Z \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Delete_an_existing_job_returns_Bad_Request_response.json b/src/test/resources/cassettes/features/v2/Delete_an_existing_job_returns_Bad_Request_response.json index dda6415382a..21071dec50d 100644 --- a/src/test/resources/cassettes/features/v2/Delete_an_existing_job_returns_Bad_Request_response.json +++ b/src/test/resources/cassettes/features/v2/Delete_an_existing_job_returns_Bad_Request_response.json @@ -3,7 +3,7 @@ "httpRequest": { "headers": {}, "method": "DELETE", - "path": "/api/v2/siem-historical-detections/jobs/inva-lid", + "path": "/api/v2/siem-threat-hunting/jobs/inva-lid", "keepAlive": false, "secure": true }, @@ -23,6 +23,6 @@ "timeToLive": { "unlimited": true }, - "id": "74a52942-ee00-2479-0dc5-b284709530a7" + "id": "75c431a7-6ec2-040e-5a4c-0f15acc3ea11" } ] \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Delete_an_existing_job_returns_Not_Found_response.freeze b/src/test/resources/cassettes/features/v2/Delete_an_existing_job_returns_Not_Found_response.freeze index e02fd6acb10..68a6b0aca24 100644 --- a/src/test/resources/cassettes/features/v2/Delete_an_existing_job_returns_Not_Found_response.freeze +++ b/src/test/resources/cassettes/features/v2/Delete_an_existing_job_returns_Not_Found_response.freeze @@ -1 +1 @@ -2024-11-08T09:54:39.455Z \ No newline at end of file +2025-10-24T14:24:01.428Z \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Delete_an_existing_job_returns_Not_Found_response.json b/src/test/resources/cassettes/features/v2/Delete_an_existing_job_returns_Not_Found_response.json index b3c30e07ee2..b1bb4fe53e6 100644 --- a/src/test/resources/cassettes/features/v2/Delete_an_existing_job_returns_Not_Found_response.json +++ b/src/test/resources/cassettes/features/v2/Delete_an_existing_job_returns_Not_Found_response.json @@ -3,12 +3,12 @@ "httpRequest": { "headers": {}, "method": "DELETE", - "path": "/api/v2/siem-historical-detections/jobs/8e2a37fb-b0c8-4761-a7f0-0a8d6a98ba93", + "path": "/api/v2/siem-threat-hunting/jobs/8e2a37fb-b0c8-4761-a7f0-0a8d6a98ba93", "keepAlive": false, "secure": true }, "httpResponse": { - "body": "{\"errors\":[{\"status\":\"404\",\"title\":\"Not Found\",\"detail\":\"Job 8e2a37fb-b0c8-4761-a7f0-0a8d6a98ba93 was not found.\"}]}", + "body": "{\"errors\":[{\"status\":\"404\",\"detail\":\"Not Found\"}]}", "headers": { "Content-Type": [ "application/vnd.api+json" @@ -23,6 +23,6 @@ "timeToLive": { "unlimited": true }, - "id": "9e763f3f-ed9d-995a-c149-75ddbbeec6b1" + "id": "4d768dca-9f97-4e76-a412-a45a6abf3e26" } ] \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Get_a_job_s_details_returns_Bad_Request_response.freeze b/src/test/resources/cassettes/features/v2/Get_a_job_s_details_returns_Bad_Request_response.freeze index 14e96034851..fa7eb2eaf3b 100644 --- a/src/test/resources/cassettes/features/v2/Get_a_job_s_details_returns_Bad_Request_response.freeze +++ b/src/test/resources/cassettes/features/v2/Get_a_job_s_details_returns_Bad_Request_response.freeze @@ -1 +1 @@ -2024-11-08T09:54:39.538Z \ No newline at end of file +2025-10-24T14:24:01.540Z \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Get_a_job_s_details_returns_Bad_Request_response.json b/src/test/resources/cassettes/features/v2/Get_a_job_s_details_returns_Bad_Request_response.json index 2f8d99c79ce..47cabc58dad 100644 --- a/src/test/resources/cassettes/features/v2/Get_a_job_s_details_returns_Bad_Request_response.json +++ b/src/test/resources/cassettes/features/v2/Get_a_job_s_details_returns_Bad_Request_response.json @@ -3,7 +3,7 @@ "httpRequest": { "headers": {}, "method": "GET", - "path": "/api/v2/siem-historical-detections/jobs/inva-lid", + "path": "/api/v2/siem-threat-hunting/jobs/inva-lid", "keepAlive": false, "secure": true }, @@ -23,6 +23,6 @@ "timeToLive": { "unlimited": true }, - "id": "b91d3d2f-868f-0795-c35b-288e8f822892" + "id": "97fa0f78-e4c0-2b54-7fb1-fd5e12937587" } ] \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Get_a_job_s_details_returns_Not_Found_response.freeze b/src/test/resources/cassettes/features/v2/Get_a_job_s_details_returns_Not_Found_response.freeze index 5cc9a16c879..8b7389cc8ba 100644 --- a/src/test/resources/cassettes/features/v2/Get_a_job_s_details_returns_Not_Found_response.freeze +++ b/src/test/resources/cassettes/features/v2/Get_a_job_s_details_returns_Not_Found_response.freeze @@ -1 +1 @@ -2024-11-08T09:54:39.611Z \ No newline at end of file +2025-10-24T14:24:01.618Z \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Get_a_job_s_details_returns_Not_Found_response.json b/src/test/resources/cassettes/features/v2/Get_a_job_s_details_returns_Not_Found_response.json index 84ee65a4edb..d1a98242207 100644 --- a/src/test/resources/cassettes/features/v2/Get_a_job_s_details_returns_Not_Found_response.json +++ b/src/test/resources/cassettes/features/v2/Get_a_job_s_details_returns_Not_Found_response.json @@ -3,7 +3,7 @@ "httpRequest": { "headers": {}, "method": "GET", - "path": "/api/v2/siem-historical-detections/jobs/8e2a37fb-b0c8-4761-a7f0-0a8d6a98ba93", + "path": "/api/v2/siem-threat-hunting/jobs/8e2a37fb-b0c8-4761-a7f0-0a8d6a98ba93", "keepAlive": false, "secure": true }, @@ -23,6 +23,6 @@ "timeToLive": { "unlimited": true }, - "id": "30d26c2a-6439-71ca-9721-8f20041d2227" + "id": "5374e38c-5542-5a83-f75d-7f135c065277" } ] \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Get_a_job_s_details_returns_OK_response.freeze b/src/test/resources/cassettes/features/v2/Get_a_job_s_details_returns_OK_response.freeze index 34c6fa06848..6994ed27070 100644 --- a/src/test/resources/cassettes/features/v2/Get_a_job_s_details_returns_OK_response.freeze +++ b/src/test/resources/cassettes/features/v2/Get_a_job_s_details_returns_OK_response.freeze @@ -1 +1 @@ -2024-12-18T17:02:38.823Z \ No newline at end of file +2025-10-24T14:24:01.707Z \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Get_a_job_s_details_returns_OK_response.json b/src/test/resources/cassettes/features/v2/Get_a_job_s_details_returns_OK_response.json index c909d675988..233952bb34a 100644 --- a/src/test/resources/cassettes/features/v2/Get_a_job_s_details_returns_OK_response.json +++ b/src/test/resources/cassettes/features/v2/Get_a_job_s_details_returns_OK_response.json @@ -7,12 +7,12 @@ }, "headers": {}, "method": "POST", - "path": "/api/v2/siem-historical-detections/jobs", + "path": "/api/v2/siem-threat-hunting/jobs", "keepAlive": false, "secure": true }, "httpResponse": { - "body": "{\"data\":{\"id\":\"fa90e7ac-998d-4bf4-9d32-2e831a1e9479\",\"type\":\"historicalDetectionsJob\"}}", + "body": "{\"data\":{\"id\":\"071b3516-4072-44d9-9288-d4adaa1db921\",\"type\":\"historicalDetectionsJob\"}}", "headers": { "Content-Type": [ "application/vnd.api+json" @@ -27,18 +27,18 @@ "timeToLive": { "unlimited": true }, - "id": "6bb82102-e994-f0d1-ee96-e1e3f1d81000" + "id": "4c138fa0-d834-5972-8bd7-894a659525af" }, { "httpRequest": { "headers": {}, "method": "GET", - "path": "/api/v2/siem-historical-detections/jobs/fa90e7ac-998d-4bf4-9d32-2e831a1e9479", + "path": "/api/v2/siem-threat-hunting/jobs/071b3516-4072-44d9-9288-d4adaa1db921", "keepAlive": false, "secure": true }, "httpResponse": { - "body": "{\"data\":{\"id\":\"fa90e7ac-998d-4bf4-9d32-2e831a1e9479\",\"type\":\"historicalDetectionsJob\",\"attributes\":{\"createdAt\":\"2024-12-18 17:02:39.551791+00\",\"createdByHandle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"createdByName\":\"CI Account\",\"jobDefinition\":{\"from\":1730387522611,\"to\":1730387532611,\"index\":\"main\",\"name\":\"Excessive number of failed attempts.\",\"cases\":[{\"name\":\"Condition 1\",\"status\":\"info\",\"notifications\":[],\"condition\":\"a \\u003e 1\"}],\"queries\":[{\"query\":\"source:non_existing_src_weekend\",\"groupByFields\":[],\"hasOptionalGroupByFields\":false,\"distinctFields\":[],\"aggregation\":\"count\",\"name\":\"\"}],\"options\":{\"evaluationWindow\":900,\"detectionMethod\":\"threshold\",\"maxSignalDuration\":86400,\"keepAlive\":3600},\"message\":\"A large number of failed login attempts.\",\"tags\":[],\"type\":\"log_detection\"},\"jobName\":\"Excessive number of failed attempts.\",\"jobStatus\":\"pending\",\"modifiedAt\":\"2024-12-18 17:02:39.551791+00\"}}}", + "body": "{\"data\":{\"id\":\"071b3516-4072-44d9-9288-d4adaa1db921\",\"type\":\"historicalDetectionsJob\",\"attributes\":{\"createdAt\":\"2025-10-24 14:24:02.057923+00\",\"createdByHandle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"createdByName\":\"CI Account\",\"jobDefinition\":{\"from\":1730387522611,\"to\":1730387532611,\"index\":\"main\",\"name\":\"Excessive number of failed attempts.\",\"cases\":[{\"name\":\"Condition 1\",\"status\":\"info\",\"notifications\":[],\"condition\":\"a \\u003e 1\"}],\"queries\":[{\"query\":\"source:non_existing_src_weekend\",\"groupByFields\":[],\"hasOptionalGroupByFields\":false,\"distinctFields\":[],\"aggregation\":\"count\",\"name\":\"\",\"dataSource\":\"logs\"}],\"options\":{\"evaluationWindow\":900,\"detectionMethod\":\"threshold\",\"maxSignalDuration\":86400,\"keepAlive\":3600},\"message\":\"A large number of failed login attempts.\",\"tags\":[],\"type\":\"log_detection\"},\"jobName\":\"Excessive number of failed attempts.\",\"jobStatus\":\"pending\",\"modifiedAt\":\"2025-10-24 14:24:02.057923+00\"}}}", "headers": { "Content-Type": [ "application/vnd.api+json" @@ -53,6 +53,6 @@ "timeToLive": { "unlimited": true }, - "id": "7b01960b-436d-6727-69de-5d7f5dd093c1" + "id": "08901fdd-0425-df60-dbde-e039f0e4a4dc" } ] \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/List_historical_jobs_returns_OK_response.freeze b/src/test/resources/cassettes/features/v2/List_historical_jobs_returns_OK_response.freeze index b139681f648..2c0d4ff4e33 100644 --- a/src/test/resources/cassettes/features/v2/List_historical_jobs_returns_OK_response.freeze +++ b/src/test/resources/cassettes/features/v2/List_historical_jobs_returns_OK_response.freeze @@ -1 +1 @@ -2024-12-18T17:02:39.880Z \ No newline at end of file +2025-10-24T14:24:02.188Z \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/List_historical_jobs_returns_OK_response.json b/src/test/resources/cassettes/features/v2/List_historical_jobs_returns_OK_response.json index bdd0bdd635d..0db92de899d 100644 --- a/src/test/resources/cassettes/features/v2/List_historical_jobs_returns_OK_response.json +++ b/src/test/resources/cassettes/features/v2/List_historical_jobs_returns_OK_response.json @@ -7,12 +7,12 @@ }, "headers": {}, "method": "POST", - "path": "/api/v2/siem-historical-detections/jobs", + "path": "/api/v2/siem-threat-hunting/jobs", "keepAlive": false, "secure": true }, "httpResponse": { - "body": "{\"data\":{\"id\":\"7b16f110-0ce9-46cd-9dad-b658ced2ac50\",\"type\":\"historicalDetectionsJob\"}}", + "body": "{\"data\":{\"id\":\"e935c6c8-ba76-4ebf-8770-bb772a5ec1ed\",\"type\":\"historicalDetectionsJob\"}}", "headers": { "Content-Type": [ "application/vnd.api+json" @@ -27,23 +27,23 @@ "timeToLive": { "unlimited": true }, - "id": "6bb82102-e994-f0d1-ee96-e1e3f1d80ffe" + "id": "4c138fa0-d834-5972-8bd7-894a659525ad" }, { "httpRequest": { "headers": {}, "method": "GET", - "path": "/api/v2/siem-historical-detections/jobs", + "path": "/api/v2/siem-threat-hunting/jobs", "queryStringParameters": { "filter[query]": [ - "id:7b16f110-0ce9-46cd-9dad-b658ced2ac50" + "id:e935c6c8-ba76-4ebf-8770-bb772a5ec1ed" ] }, "keepAlive": false, "secure": true }, "httpResponse": { - "body": "{\"data\":[{\"id\":\"7b16f110-0ce9-46cd-9dad-b658ced2ac50\",\"type\":\"historicalDetectionsJob\",\"attributes\":{\"createdAt\":\"2024-12-18 17:02:40.144396+00\",\"createdByHandle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"createdByName\":\"CI Account\",\"jobDefinition\":{\"from\":1730387522611,\"to\":1730387532611,\"index\":\"main\",\"name\":\"Excessive number of failed attempts.\",\"cases\":[{\"name\":\"Condition 1\",\"status\":\"info\",\"notifications\":[],\"condition\":\"a \\u003e 1\"}],\"queries\":[{\"query\":\"source:non_existing_src_weekend\",\"groupByFields\":[],\"hasOptionalGroupByFields\":false,\"distinctFields\":[],\"aggregation\":\"count\",\"name\":\"\"}],\"options\":{\"evaluationWindow\":900,\"detectionMethod\":\"threshold\",\"maxSignalDuration\":86400,\"keepAlive\":3600},\"message\":\"A large number of failed login attempts.\",\"tags\":[],\"type\":\"log_detection\"},\"jobName\":\"Excessive number of failed attempts.\",\"jobStatus\":\"pending\",\"modifiedAt\":\"2024-12-18 17:02:40.144396+00\"}}],\"meta\":{\"totalCount\":1}}", + "body": "{\"data\":[{\"id\":\"e935c6c8-ba76-4ebf-8770-bb772a5ec1ed\",\"type\":\"historicalDetectionsJob\",\"attributes\":{\"createdAt\":\"2025-10-24 14:24:02.256887+00\",\"createdByHandle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"createdByName\":\"CI Account\",\"jobDefinition\":{\"from\":1730387522611,\"to\":1730387532611,\"index\":\"main\",\"name\":\"Excessive number of failed attempts.\",\"cases\":[{\"name\":\"Condition 1\",\"status\":\"info\",\"notifications\":[],\"condition\":\"a \\u003e 1\"}],\"queries\":[{\"query\":\"source:non_existing_src_weekend\",\"groupByFields\":[],\"hasOptionalGroupByFields\":false,\"distinctFields\":[],\"aggregation\":\"count\",\"name\":\"\",\"dataSource\":\"logs\"}],\"options\":{\"evaluationWindow\":900,\"detectionMethod\":\"threshold\",\"maxSignalDuration\":86400,\"keepAlive\":3600},\"message\":\"A large number of failed login attempts.\",\"tags\":[],\"type\":\"log_detection\"},\"jobName\":\"Excessive number of failed attempts.\",\"jobStatus\":\"pending\",\"modifiedAt\":\"2025-10-24 14:24:02.256887+00\"}}],\"meta\":{\"totalCount\":1}}", "headers": { "Content-Type": [ "application/vnd.api+json" @@ -58,6 +58,6 @@ "timeToLive": { "unlimited": true }, - "id": "0728d69c-abf4-9695-6f86-d405f93de5cf" + "id": "4f7ef994-a9ff-2d13-c407-4a6f863a4781" } ] \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Run_a_historical_job_returns_Bad_Request_response.freeze b/src/test/resources/cassettes/features/v2/Run_a_historical_job_returns_Bad_Request_response.freeze deleted file mode 100644 index 9720094d000..00000000000 --- a/src/test/resources/cassettes/features/v2/Run_a_historical_job_returns_Bad_Request_response.freeze +++ /dev/null @@ -1 +0,0 @@ -2024-11-08T09:54:40.114Z \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Run_a_historical_job_returns_Not_Found_response.freeze b/src/test/resources/cassettes/features/v2/Run_a_historical_job_returns_Not_Found_response.freeze deleted file mode 100644 index 376ccf5d386..00000000000 --- a/src/test/resources/cassettes/features/v2/Run_a_historical_job_returns_Not_Found_response.freeze +++ /dev/null @@ -1 +0,0 @@ -2025-06-26T16:57:47.524Z \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Run_a_historical_job_returns_Status_created_response.freeze b/src/test/resources/cassettes/features/v2/Run_a_historical_job_returns_Status_created_response.freeze deleted file mode 100644 index 3e9fdecb999..00000000000 --- a/src/test/resources/cassettes/features/v2/Run_a_historical_job_returns_Status_created_response.freeze +++ /dev/null @@ -1 +0,0 @@ -2024-11-08T09:54:40.272Z \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Run_a_threat_hunting_job_returns_Bad_Request_response.freeze b/src/test/resources/cassettes/features/v2/Run_a_threat_hunting_job_returns_Bad_Request_response.freeze new file mode 100644 index 00000000000..3776cfacfd8 --- /dev/null +++ b/src/test/resources/cassettes/features/v2/Run_a_threat_hunting_job_returns_Bad_Request_response.freeze @@ -0,0 +1 @@ +2025-10-24T14:24:02.385Z \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Run_a_historical_job_returns_Bad_Request_response.json b/src/test/resources/cassettes/features/v2/Run_a_threat_hunting_job_returns_Bad_Request_response.json similarity index 92% rename from src/test/resources/cassettes/features/v2/Run_a_historical_job_returns_Bad_Request_response.json rename to src/test/resources/cassettes/features/v2/Run_a_threat_hunting_job_returns_Bad_Request_response.json index 4b01ce56c3f..208ed6cbff5 100644 --- a/src/test/resources/cassettes/features/v2/Run_a_historical_job_returns_Bad_Request_response.json +++ b/src/test/resources/cassettes/features/v2/Run_a_threat_hunting_job_returns_Bad_Request_response.json @@ -7,7 +7,7 @@ }, "headers": {}, "method": "POST", - "path": "/api/v2/siem-historical-detections/jobs", + "path": "/api/v2/siem-threat-hunting/jobs", "keepAlive": false, "secure": true }, @@ -27,6 +27,6 @@ "timeToLive": { "unlimited": true }, - "id": "d6c37d4c-15bf-d57c-afed-ccbe43952e41" + "id": "8385b3da-78cd-f5dc-4258-fcc039b5013a" } ] \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Run_a_threat_hunting_job_returns_Not_Found_response.freeze b/src/test/resources/cassettes/features/v2/Run_a_threat_hunting_job_returns_Not_Found_response.freeze new file mode 100644 index 00000000000..9cda11fb151 --- /dev/null +++ b/src/test/resources/cassettes/features/v2/Run_a_threat_hunting_job_returns_Not_Found_response.freeze @@ -0,0 +1 @@ +2025-10-24T14:24:02.486Z \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Run_a_historical_job_returns_Not_Found_response.json b/src/test/resources/cassettes/features/v2/Run_a_threat_hunting_job_returns_Not_Found_response.json similarity index 87% rename from src/test/resources/cassettes/features/v2/Run_a_historical_job_returns_Not_Found_response.json rename to src/test/resources/cassettes/features/v2/Run_a_threat_hunting_job_returns_Not_Found_response.json index 86d5280c9a1..6cd75887e42 100644 --- a/src/test/resources/cassettes/features/v2/Run_a_historical_job_returns_Not_Found_response.json +++ b/src/test/resources/cassettes/features/v2/Run_a_threat_hunting_job_returns_Not_Found_response.json @@ -7,7 +7,7 @@ }, "headers": {}, "method": "POST", - "path": "/api/v2/siem-historical-detections/jobs", + "path": "/api/v2/siem-threat-hunting/jobs", "keepAlive": false, "secure": true }, @@ -27,6 +27,6 @@ "timeToLive": { "unlimited": true }, - "id": "6baefcd2-575a-7f9d-36bf-f35d836edcfc" + "id": "ad287eca-8dea-a404-d9eb-bd2408021229" } ] \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Run_a_threat_hunting_job_returns_Status_created_response.freeze b/src/test/resources/cassettes/features/v2/Run_a_threat_hunting_job_returns_Status_created_response.freeze new file mode 100644 index 00000000000..f914d8b2412 --- /dev/null +++ b/src/test/resources/cassettes/features/v2/Run_a_threat_hunting_job_returns_Status_created_response.freeze @@ -0,0 +1 @@ +2025-10-24T14:24:02.570Z \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Run_a_historical_job_returns_Status_created_response.json b/src/test/resources/cassettes/features/v2/Run_a_threat_hunting_job_returns_Status_created_response.json similarity index 83% rename from src/test/resources/cassettes/features/v2/Run_a_historical_job_returns_Status_created_response.json rename to src/test/resources/cassettes/features/v2/Run_a_threat_hunting_job_returns_Status_created_response.json index 7f3aa0370d2..de52f958b01 100644 --- a/src/test/resources/cassettes/features/v2/Run_a_historical_job_returns_Status_created_response.json +++ b/src/test/resources/cassettes/features/v2/Run_a_threat_hunting_job_returns_Status_created_response.json @@ -7,12 +7,12 @@ }, "headers": {}, "method": "POST", - "path": "/api/v2/siem-historical-detections/jobs", + "path": "/api/v2/siem-threat-hunting/jobs", "keepAlive": false, "secure": true }, "httpResponse": { - "body": "{\"data\":{\"id\":\"6f4c9c40-782b-4d14-900f-65ccc02389db\",\"type\":\"historicalDetectionsJob\"}}", + "body": "{\"data\":{\"id\":\"6ff7a8ce-a0d1-4ea3-8cc9-e9c52cda0d24\",\"type\":\"historicalDetectionsJob\"}}", "headers": { "Content-Type": [ "application/vnd.api+json" @@ -27,6 +27,6 @@ "timeToLive": { "unlimited": true }, - "id": "6bb82102-e994-f0d1-ee96-e1e3f1d80fff" + "id": "4c138fa0-d834-5972-8bd7-894a659525ae" } ] \ No newline at end of file diff --git a/src/test/resources/com/datadog/api/client/v2/api/given.json b/src/test/resources/com/datadog/api/client/v2/api/given.json index a4ab9c24bd1..7c9df160aad 100644 --- a/src/test/resources/com/datadog/api/client/v2/api/given.json +++ b/src/test/resources/com/datadog/api/client/v2/api/given.json @@ -1086,10 +1086,10 @@ "value": "{\n \"data\": {\n \"type\": \"historicalDetectionsJobCreate\",\n \"attributes\": {\n \"jobDefinition\": {\n \"type\": \"log_detection\",\n \"name\": \"Excessive number of failed attempts.\",\n \"queries\": [\n {\n \"query\": \"source:non_existing_src_weekend\",\n \"aggregation\": \"count\",\n \"groupByFields\": [],\n \"distinctFields\": []\n }\n ],\n \"cases\": [\n {\n \"name\": \"Condition 1\",\n \"status\": \"info\",\n \"notifications\": [],\n \"condition\": \"a > 1\"\n }\n ],\n \"options\": {\n \"keepAlive\": 3600,\n \"maxSignalDuration\": 86400,\n \"evaluationWindow\": 900\n },\n \"message\": \"A large number of failed login attempts.\",\n \"tags\": [],\n \"from\": 1730387522611,\n \"to\": 1730387532611,\n \"index\": \"main\"\n }\n }\n }\n}" } ], - "step": "there is a valid \"historical_job\" in the system", - "key": "historical_job", + "step": "there is a valid \"threat_hunting_job\" in the system", + "key": "threat_hunting_job", "tag": "Security Monitoring", - "operationId": "RunHistoricalJob" + "operationId": "RunThreatHuntingJob" }, { "parameters": [ diff --git a/src/test/resources/com/datadog/api/client/v2/api/security_monitoring.feature b/src/test/resources/com/datadog/api/client/v2/api/security_monitoring.feature index 8e5e22baade..703fc3e460f 100644 --- a/src/test/resources/com/datadog/api/client/v2/api/security_monitoring.feature +++ b/src/test/resources/com/datadog/api/client/v2/api/security_monitoring.feature @@ -11,38 +11,62 @@ Feature: Security Monitoring @team:DataDog/k9-cloud-security-platform Scenario: Cancel a historical job returns "Bad Request" response - Given operation "CancelHistoricalJob" enabled - And new "CancelHistoricalJob" request + Given operation "CancelThreatHuntingJob" enabled + And new "CancelThreatHuntingJob" request And request contains "job_id" parameter with value "inva-lid" When the request is sent Then the response status is 400 Bad Request - @generated @skip @team:DataDog/k9-cloud-security-platform - Scenario: Cancel a historical job returns "Conflict" response - Given operation "CancelHistoricalJob" enabled - And new "CancelHistoricalJob" request - And request contains "job_id" parameter from "REPLACE.ME" - When the request is sent - Then the response status is 409 Conflict - @team:DataDog/k9-cloud-security-platform Scenario: Cancel a historical job returns "Not Found" response - Given operation "CancelHistoricalJob" enabled - And new "CancelHistoricalJob" request + Given operation "CancelThreatHuntingJob" enabled + And new "CancelThreatHuntingJob" request And request contains "job_id" parameter with value "8e2a37fb-b0c8-4761-a7f0-0a8d6a98ba93" When the request is sent Then the response status is 404 Not Found @team:DataDog/k9-cloud-security-platform Scenario: Cancel a historical job returns "OK" response - Given operation "CancelHistoricalJob" enabled - And operation "RunHistoricalJob" enabled - And new "CancelHistoricalJob" request - And there is a valid "historical_job" in the system - And request contains "job_id" parameter from "historical_job.data.id" + Given operation "CancelThreatHuntingJob" enabled + And operation "RunThreatHuntingJob" enabled + And new "CancelThreatHuntingJob" request + And there is a valid "threat_hunting_job" in the system + And request contains "job_id" parameter from "threat_hunting_job.data.id" When the request is sent Then the response status is 204 No Content + @generated @skip @team:DataDog/k9-cloud-security-platform + Scenario: Cancel a threat hunting job returns "Bad Request" response + Given operation "CancelThreatHuntingJob" enabled + And new "CancelThreatHuntingJob" request + And request contains "job_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/k9-cloud-security-platform + Scenario: Cancel a threat hunting job returns "Conflict" response + Given operation "CancelThreatHuntingJob" enabled + And new "CancelThreatHuntingJob" request + And request contains "job_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 409 Conflict + + @generated @skip @team:DataDog/k9-cloud-security-platform + Scenario: Cancel a threat hunting job returns "Not Found" response + Given operation "CancelThreatHuntingJob" enabled + And new "CancelThreatHuntingJob" request + And request contains "job_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 404 Not Found + + @generated @skip @team:DataDog/k9-cloud-security-platform + Scenario: Cancel a threat hunting job returns "OK" response + Given operation "CancelThreatHuntingJob" enabled + And new "CancelThreatHuntingJob" request + And request contains "job_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 204 OK + @generated @skip @team:DataDog/k9-cloud-security-platform Scenario: Change the related incidents of a security signal returns "Bad Request" response Given new "EditSecurityMonitoringSignalIncidents" request @@ -477,32 +501,32 @@ Feature: Security Monitoring @team:DataDog/k9-cloud-security-platform Scenario: Delete an existing job returns "Bad Request" response - Given operation "DeleteHistoricalJob" enabled - And new "DeleteHistoricalJob" request + Given operation "DeleteThreatHuntingJob" enabled + And new "DeleteThreatHuntingJob" request And request contains "job_id" parameter with value "inva-lid" When the request is sent Then the response status is 400 Bad Request @generated @skip @team:DataDog/k9-cloud-security-platform Scenario: Delete an existing job returns "Conflict" response - Given operation "DeleteHistoricalJob" enabled - And new "DeleteHistoricalJob" request + Given operation "DeleteThreatHuntingJob" enabled + And new "DeleteThreatHuntingJob" request And request contains "job_id" parameter from "REPLACE.ME" When the request is sent Then the response status is 409 Conflict @team:DataDog/k9-cloud-security-platform Scenario: Delete an existing job returns "Not Found" response - Given operation "DeleteHistoricalJob" enabled - And new "DeleteHistoricalJob" request + Given operation "DeleteThreatHuntingJob" enabled + And new "DeleteThreatHuntingJob" request And request contains "job_id" parameter with value "8e2a37fb-b0c8-4761-a7f0-0a8d6a98ba93" When the request is sent Then the response status is 404 Not Found @generated @skip @team:DataDog/k9-cloud-security-platform Scenario: Delete an existing job returns "OK" response - Given operation "DeleteHistoricalJob" enabled - And new "DeleteHistoricalJob" request + Given operation "DeleteThreatHuntingJob" enabled + And new "DeleteThreatHuntingJob" request And request contains "job_id" parameter from "REPLACE.ME" When the request is sent Then the response status is 204 OK @@ -627,27 +651,27 @@ Feature: Security Monitoring @team:DataDog/k9-cloud-security-platform Scenario: Get a job's details returns "Bad Request" response - Given operation "GetHistoricalJob" enabled - And new "GetHistoricalJob" request + Given operation "GetThreatHuntingJob" enabled + And new "GetThreatHuntingJob" request And request contains "job_id" parameter with value "inva-lid" When the request is sent Then the response status is 400 Bad Request @team:DataDog/k9-cloud-security-platform Scenario: Get a job's details returns "Not Found" response - Given operation "GetHistoricalJob" enabled - And new "GetHistoricalJob" request + Given operation "GetThreatHuntingJob" enabled + And new "GetThreatHuntingJob" request And request contains "job_id" parameter with value "8e2a37fb-b0c8-4761-a7f0-0a8d6a98ba93" When the request is sent Then the response status is 404 Not Found @team:DataDog/k9-cloud-security-platform Scenario: Get a job's details returns "OK" response - Given operation "GetHistoricalJob" enabled - And operation "RunHistoricalJob" enabled - And new "GetHistoricalJob" request - And there is a valid "historical_job" in the system - And request contains "job_id" parameter from "historical_job.data.id" + Given operation "GetThreatHuntingJob" enabled + And operation "RunThreatHuntingJob" enabled + And new "GetThreatHuntingJob" request + And there is a valid "threat_hunting_job" in the system + And request contains "job_id" parameter from "threat_hunting_job.data.id" When the request is sent Then the response status is 200 OK @@ -1021,20 +1045,13 @@ Feature: Security Monitoring When the request is sent Then the response status is 200 OK - @generated @skip @team:DataDog/k9-cloud-security-platform - Scenario: List historical jobs returns "Bad Request" response - Given operation "ListHistoricalJobs" enabled - And new "ListHistoricalJobs" request - When the request is sent - Then the response status is 400 Bad Request - @team:DataDog/k9-cloud-security-platform Scenario: List historical jobs returns "OK" response - Given operation "ListHistoricalJobs" enabled - And operation "RunHistoricalJob" enabled - And new "ListHistoricalJobs" request - And there is a valid "historical_job" in the system - And request contains "filter[query]" parameter with value "id:{{historical_job.data.id}}" + Given operation "ListThreatHuntingJobs" enabled + And operation "RunThreatHuntingJob" enabled + And new "ListThreatHuntingJobs" request + And there is a valid "threat_hunting_job" in the system + And request contains "filter[query]" parameter with value "id:{{threat_hunting_job.data.id}}" When the request is sent Then the response status is 200 OK @@ -1088,6 +1105,20 @@ Feature: Security Monitoring When the request is sent Then the response status is 200 OK + @generated @skip @team:DataDog/k9-cloud-security-platform + Scenario: List threat hunting jobs returns "Bad Request" response + Given operation "ListThreatHuntingJobs" enabled + And new "ListThreatHuntingJobs" request + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/k9-cloud-security-platform + Scenario: List threat hunting jobs returns "OK" response + Given operation "ListThreatHuntingJobs" enabled + And new "ListThreatHuntingJobs" request + When the request is sent + Then the response status is 200 OK + @generated @skip @team:DataDog/asm-vm Scenario: List vulnerabilities returns "Bad request: The server cannot process the request due to invalid syntax in the request." response Given operation "ListVulnerabilities" enabled @@ -1265,25 +1296,25 @@ Feature: Security Monitoring Then the response status is 422 The server cannot process the request because it contains invalid data. @team:DataDog/k9-cloud-security-platform - Scenario: Run a historical job returns "Bad Request" response - Given operation "RunHistoricalJob" enabled - And new "RunHistoricalJob" request + Scenario: Run a threat hunting job returns "Bad Request" response + Given operation "RunThreatHuntingJob" enabled + And new "RunThreatHuntingJob" request And body with value {"data":{"type":"historicalDetectionsJobCreate","attributes":{"jobDefinition":{"type":"log_detection","name":"Excessive number of failed attempts.","queries":[{"query":"source:non_existing_src_weekend","aggregation":"count","groupByFields":[],"distinctFields":[]}],"cases":[{"name":"Condition 1","status":"info","notifications":[],"condition":"a > 1"}],"options":{"keepAlive":3600,"maxSignalDuration":86400,"evaluationWindow":900},"message":"A large number of failed login attempts.","tags":[],"from":1730387522611,"to":1730391122611,"index":"non_existing_index"}}}} When the request is sent Then the response status is 400 Bad Request @team:DataDog/k9-cloud-security-platform - Scenario: Run a historical job returns "Not Found" response - Given operation "RunHistoricalJob" enabled - And new "RunHistoricalJob" request + Scenario: Run a threat hunting job returns "Not Found" response + Given operation "RunThreatHuntingJob" enabled + And new "RunThreatHuntingJob" request And body with value {"data": { "type": "historicalDetectionsJobCreate", "attributes": {"fromRule": {"from": 1730201035064, "id": "non-existng", "index": "main", "notifications": [], "to": 1730204635115}}}} When the request is sent Then the response status is 404 Not Found @team:DataDog/k9-cloud-security-platform - Scenario: Run a historical job returns "Status created" response - Given operation "RunHistoricalJob" enabled - And new "RunHistoricalJob" request + Scenario: Run a threat hunting job returns "Status created" response + Given operation "RunThreatHuntingJob" enabled + And new "RunThreatHuntingJob" request And body with value {"data":{"type":"historicalDetectionsJobCreate","attributes":{"jobDefinition":{"type":"log_detection","name":"Excessive number of failed attempts.","queries":[{"query":"source:non_existing_src_weekend","aggregation":"count","groupByFields":[],"distinctFields":[]}],"cases":[{"name":"Condition 1","status":"info","notifications":[],"condition":"a > 1"}],"options":{"keepAlive":3600,"maxSignalDuration":86400,"evaluationWindow":900},"message":"A large number of failed login attempts.","tags":[],"from":1730387522611,"to":1730387532611,"index":"main"}}}} When the request is sent Then the response status is 201 Status created diff --git a/src/test/resources/com/datadog/api/client/v2/api/undo.json b/src/test/resources/com/datadog/api/client/v2/api/undo.json index 5f2144f5fb2..eb1380ab6b8 100644 --- a/src/test/resources/com/datadog/api/client/v2/api/undo.json +++ b/src/test/resources/com/datadog/api/client/v2/api/undo.json @@ -3909,13 +3909,13 @@ "type": "safe" } }, - "ListHistoricalJobs": { + "ListThreatHuntingJobs": { "tag": "Security Monitoring", "undo": { "type": "safe" } }, - "RunHistoricalJob": { + "RunThreatHuntingJob": { "tag": "Security Monitoring", "undo": { "type": "idempotent" @@ -3927,19 +3927,19 @@ "type": "idempotent" } }, - "DeleteHistoricalJob": { + "DeleteThreatHuntingJob": { "tag": "Security Monitoring", "undo": { "type": "idempotent" } }, - "GetHistoricalJob": { + "GetThreatHuntingJob": { "tag": "Security Monitoring", "undo": { "type": "safe" } }, - "CancelHistoricalJob": { + "CancelThreatHuntingJob": { "tag": "Security Monitoring", "undo": { "type": "idempotent"