diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index 3ac7ae5f2b7..4c5e097c1ad 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -537,6 +537,20 @@ components: required: true schema: type: string + 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 IncidentIDPathParameter: description: The UUID of the incident. in: path @@ -1461,20 +1475,6 @@ 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 ToTimestamp: description: The ending timestamp for the SLO status query in epoch seconds. in: query @@ -15035,7 +15035,7 @@ components: - GZIP - DEFLATE ConvertJobResultsToSignalsAttributes: - description: Attributes for converting threat hunting job results to signals. + description: Attributes for converting historical job results to signals. properties: id: description: Request ID. @@ -15069,7 +15069,7 @@ components: - notifications type: object ConvertJobResultsToSignalsData: - description: Data for converting threat hunting job results to signals. + description: Data for converting historical job results to signals. properties: attributes: $ref: "#/components/schemas/ConvertJobResultsToSignalsAttributes" @@ -15084,7 +15084,7 @@ components: x-enum-varnames: - HISTORICALDETECTIONSJOBRESULTSIGNALCONVERSION ConvertJobResultsToSignalsRequest: - description: Request for converting threat hunting job results to signals. + description: Request for converting historical job results to signals. properties: data: $ref: "#/components/schemas/ConvertJobResultsToSignalsData" @@ -31862,6 +31862,129 @@ components: type: string x-enum-varnames: - HAMR_ORG_CONNECTIONS + 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: + anomalyDetectionOptions: + $ref: "#/components/schemas/SecurityMonitoringRuleAnomalyDetectionOptions" + 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 + signalOutput: + description: Whether the job outputs signals. + type: boolean + 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: @@ -37473,7 +37596,7 @@ components: x-enum-varnames: - JIRA_ISSUES JobCreateResponse: - description: Run a threat hunting job response. + description: Run a historical job response. properties: data: $ref: "#/components/schemas/JobCreateResponseData" @@ -37485,10 +37608,10 @@ components: description: ID of the created job. type: string type: - $ref: "#/components/schemas/ThreatHuntingJobDataType" + $ref: "#/components/schemas/HistoricalJobDataType" type: object JobDefinition: - description: Definition of a threat hunting job. + description: Definition of a historical job. properties: calculatedFields: description: Calculated fields. @@ -37526,11 +37649,11 @@ components: example: Excessive number of failed attempts. type: string options: - $ref: "#/components/schemas/ThreatHuntingJobOptions" + $ref: "#/components/schemas/HistoricalJobOptions" queries: description: Queries for selecting logs analyzed by the job. items: - $ref: "#/components/schemas/ThreatHuntingJobQuery" + $ref: "#/components/schemas/HistoricalJobQuery" type: array referenceTables: description: Reference tables used in the queries. @@ -37567,7 +37690,7 @@ components: - message type: object JobDefinitionFromRule: - description: Definition of a threat hunting job based on a security monitoring rule. + description: Definition of a historical job based on a security monitoring rule. properties: from: description: Starting time of data analyzed by the job. @@ -39966,6 +40089,17 @@ 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 ListIntegrationsResponse: description: Response containing information about multiple integrations. properties: @@ -40328,17 +40462,6 @@ 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: @@ -59293,18 +59416,14 @@ components: $ref: "#/components/schemas/RumRetentionFilterData" type: array type: object - RunRetentionFilterName: - description: The name of a RUM retention filter. - example: "Retention filter for session" - type: string - RunThreatHuntingJobRequest: - description: Run a threat hunting job request. + RunHistoricalJobRequest: + description: Run a historical job request. properties: data: - $ref: "#/components/schemas/RunThreatHuntingJobRequestData" + $ref: "#/components/schemas/RunHistoricalJobRequestData" type: object - RunThreatHuntingJobRequestAttributes: - description: Run a threat hunting job request. + RunHistoricalJobRequestAttributes: + description: Run a historical job request. properties: fromRule: $ref: "#/components/schemas/JobDefinitionFromRule" @@ -59314,21 +59433,25 @@ components: jobDefinition: $ref: "#/components/schemas/JobDefinition" type: object - RunThreatHuntingJobRequestData: - description: Data for running a threat hunting job request. + RunHistoricalJobRequestData: + description: Data for running a historical job request. properties: attributes: - $ref: "#/components/schemas/RunThreatHuntingJobRequestAttributes" + $ref: "#/components/schemas/RunHistoricalJobRequestAttributes" type: - $ref: "#/components/schemas/RunThreatHuntingJobRequestDataType" + $ref: "#/components/schemas/RunHistoricalJobRequestDataType" type: object - RunThreatHuntingJobRequestDataType: + RunHistoricalJobRequestDataType: 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: @@ -74976,129 +75099,6 @@ components: type: string x-enum-varnames: - TEST_OPTIMIZATION_UPDATE_SERVICE_SETTINGS_REQUEST - 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: - anomalyDetectionOptions: - $ref: "#/components/schemas/SecurityMonitoringRuleAnomalyDetectionOptions" - 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 - signalOutput: - description: Whether the job outputs signals. - type: boolean - 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. @@ -115838,7 +115838,7 @@ paths: - incident_settings_write x-unstable: |- **Note**: This endpoint is deprecated. - /api/v2/siem-threat-hunting/histsignals: + /api/v2/siem-historical-detections/histsignals: get: description: List hist signals. operationId: ListSecurityMonitoringHistsignals @@ -115878,7 +115878,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-threat-hunting/histsignals/search: + /api/v2/siem-historical-detections/histsignals/search: get: description: Search hist signals. operationId: SearchSecurityMonitoringHistsignals @@ -115917,12 +115917,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-threat-hunting/histsignals/{histsignal_id}: + /api/v2/siem-historical-detections/histsignals/{histsignal_id}: get: description: Get a hist signal's details. operationId: GetSecurityMonitoringHistsignal parameters: - - $ref: "#/components/parameters/ThreatHuntingSignalID" + - $ref: "#/components/parameters/HistoricalSignalID" responses: "200": content: @@ -115952,10 +115952,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-threat-hunting/jobs: + /api/v2/siem-historical-detections/jobs: get: - description: List threat hunting jobs. - operationId: ListThreatHuntingJobs + description: List historical jobs. + operationId: ListHistoricalJobs parameters: - $ref: "#/components/parameters/PageSize" - $ref: "#/components/parameters/PageNumber" @@ -115978,7 +115978,7 @@ paths: content: "application/json": schema: - $ref: "#/components/schemas/ListThreatHuntingJobsResponse" + $ref: "#/components/schemas/ListHistoricalJobsResponse" description: OK "400": $ref: "#/components/responses/BadRequestResponse" @@ -115990,20 +115990,20 @@ paths: - apiKeyAuth: [] appKeyAuth: [] - AuthZ: [] - summary: List threat hunting jobs + summary: List historical 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 threat hunting job. - operationId: RunThreatHuntingJob + Run a historical job. + operationId: RunHistoricalJob requestBody: content: "application/json": schema: - $ref: "#/components/schemas/RunThreatHuntingJobRequest" + $ref: "#/components/schemas/RunHistoricalJobRequest" required: true responses: "201": @@ -116027,7 +116027,7 @@ paths: appKeyAuth: [] - AuthZ: - security_monitoring_rules_write - summary: Run a threat hunting job + summary: Run a historical job tags: ["Security Monitoring"] x-codegen-request-body-name: body "x-permission": @@ -116037,7 +116037,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-threat-hunting/jobs/signal_convert: + /api/v2/siem-historical-detections/jobs/signal_convert: post: description: |- Convert a job result to a signal. @@ -116071,13 +116071,13 @@ 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-threat-hunting/jobs/{job_id}: + /api/v2/siem-historical-detections/jobs/{job_id}: delete: description: |- Delete an existing job. - operationId: DeleteThreatHuntingJob + operationId: DeleteHistoricalJob parameters: - - $ref: "#/components/parameters/ThreatHuntingJobID" + - $ref: "#/components/parameters/HistoricalJobID" responses: "204": description: OK @@ -116104,15 +116104,15 @@ paths: Please check the documentation regularly for updates. get: description: Get a job's details. - operationId: GetThreatHuntingJob + operationId: GetHistoricalJob parameters: - - $ref: "#/components/parameters/ThreatHuntingJobID" + - $ref: "#/components/parameters/HistoricalJobID" responses: "200": content: "application/json": schema: - $ref: "#/components/schemas/ThreatHuntingJobResponse" + $ref: "#/components/schemas/HistoricalJobResponse" description: OK "400": $ref: "#/components/responses/BadRequestResponse" @@ -116136,12 +116136,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-threat-hunting/jobs/{job_id}/cancel: + /api/v2/siem-historical-detections/jobs/{job_id}/cancel: patch: - description: Cancel a threat hunting job. - operationId: CancelThreatHuntingJob + description: Cancel a historical job. + operationId: CancelHistoricalJob parameters: - - $ref: "#/components/parameters/ThreatHuntingJobID" + - $ref: "#/components/parameters/HistoricalJobID" responses: "204": description: OK @@ -116162,7 +116162,7 @@ paths: appKeyAuth: [] - AuthZ: - security_monitoring_rules_write - summary: Cancel a threat hunting job + summary: Cancel a historical job tags: ["Security Monitoring"] "x-permission": operator: OR @@ -116171,12 +116171,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-threat-hunting/jobs/{job_id}/histsignals: + /api/v2/siem-historical-detections/jobs/{job_id}/histsignals: get: description: Get a job's hist signals. operationId: GetSecurityMonitoringHistsignalsByJobId parameters: - - $ref: "#/components/parameters/ThreatHuntingJobID" + - $ref: "#/components/parameters/HistoricalJobID" - $ref: "#/components/parameters/QueryFilterSearch" - $ref: "#/components/parameters/QueryFilterFrom" - $ref: "#/components/parameters/QueryFilterTo" diff --git a/examples/v2/security-monitoring/CancelThreatHuntingJob_1945505845.java b/examples/v2/security-monitoring/CancelHistoricalJob.java similarity index 64% rename from examples/v2/security-monitoring/CancelThreatHuntingJob_1945505845.java rename to examples/v2/security-monitoring/CancelHistoricalJob.java index 8c4921a724a..6b02bc4d791 100644 --- a/examples/v2/security-monitoring/CancelThreatHuntingJob_1945505845.java +++ b/examples/v2/security-monitoring/CancelHistoricalJob.java @@ -7,17 +7,17 @@ public class Example { public static void main(String[] args) { ApiClient defaultClient = ApiClient.getDefaultApiClient(); - defaultClient.setUnstableOperationEnabled("v2.cancelThreatHuntingJob", true); - defaultClient.setUnstableOperationEnabled("v2.runThreatHuntingJob", true); + defaultClient.setUnstableOperationEnabled("v2.cancelHistoricalJob", true); + defaultClient.setUnstableOperationEnabled("v2.runHistoricalJob", true); SecurityMonitoringApi apiInstance = new SecurityMonitoringApi(defaultClient); - // there is a valid "threat_hunting_job" in the system - String THREAT_HUNTING_JOB_DATA_ID = System.getenv("THREAT_HUNTING_JOB_DATA_ID"); + // there is a valid "historical_job" in the system + String HISTORICAL_JOB_DATA_ID = System.getenv("HISTORICAL_JOB_DATA_ID"); try { - apiInstance.cancelThreatHuntingJob(THREAT_HUNTING_JOB_DATA_ID); + apiInstance.cancelHistoricalJob(HISTORICAL_JOB_DATA_ID); } catch (ApiException e) { - System.err.println("Exception when calling SecurityMonitoringApi#cancelThreatHuntingJob"); + System.err.println("Exception when calling SecurityMonitoringApi#cancelHistoricalJob"); 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/CancelThreatHuntingJob.java b/examples/v2/security-monitoring/CancelThreatHuntingJob.java deleted file mode 100644 index 6a9dde27289..00000000000 --- a/examples/v2/security-monitoring/CancelThreatHuntingJob.java +++ /dev/null @@ -1,23 +0,0 @@ -// 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/DeleteThreatHuntingJob.java b/examples/v2/security-monitoring/DeleteHistoricalJob.java similarity index 81% rename from examples/v2/security-monitoring/DeleteThreatHuntingJob.java rename to examples/v2/security-monitoring/DeleteHistoricalJob.java index c6b5873532b..393d437eb26 100644 --- a/examples/v2/security-monitoring/DeleteThreatHuntingJob.java +++ b/examples/v2/security-monitoring/DeleteHistoricalJob.java @@ -7,13 +7,13 @@ public class Example { public static void main(String[] args) { ApiClient defaultClient = ApiClient.getDefaultApiClient(); - defaultClient.setUnstableOperationEnabled("v2.deleteThreatHuntingJob", true); + defaultClient.setUnstableOperationEnabled("v2.deleteHistoricalJob", true); SecurityMonitoringApi apiInstance = new SecurityMonitoringApi(defaultClient); try { - apiInstance.deleteThreatHuntingJob("job_id"); + apiInstance.deleteHistoricalJob("job_id"); } catch (ApiException e) { - System.err.println("Exception when calling SecurityMonitoringApi#deleteThreatHuntingJob"); + System.err.println("Exception when calling SecurityMonitoringApi#deleteHistoricalJob"); 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/GetThreatHuntingJob.java b/examples/v2/security-monitoring/GetHistoricalJob.java similarity index 60% rename from examples/v2/security-monitoring/GetThreatHuntingJob.java rename to examples/v2/security-monitoring/GetHistoricalJob.java index d5de300df5f..4d7e5be994f 100644 --- a/examples/v2/security-monitoring/GetThreatHuntingJob.java +++ b/examples/v2/security-monitoring/GetHistoricalJob.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.ThreatHuntingJobResponse; +import com.datadog.api.client.v2.model.HistoricalJobResponse; public class Example { public static void main(String[] args) { ApiClient defaultClient = ApiClient.getDefaultApiClient(); - defaultClient.setUnstableOperationEnabled("v2.getThreatHuntingJob", true); - defaultClient.setUnstableOperationEnabled("v2.runThreatHuntingJob", true); + defaultClient.setUnstableOperationEnabled("v2.getHistoricalJob", true); + defaultClient.setUnstableOperationEnabled("v2.runHistoricalJob", true); SecurityMonitoringApi apiInstance = new SecurityMonitoringApi(defaultClient); - // there is a valid "threat_hunting_job" in the system - String THREAT_HUNTING_JOB_DATA_ID = System.getenv("THREAT_HUNTING_JOB_DATA_ID"); + // there is a valid "historical_job" in the system + String HISTORICAL_JOB_DATA_ID = System.getenv("HISTORICAL_JOB_DATA_ID"); try { - ThreatHuntingJobResponse result = apiInstance.getThreatHuntingJob(THREAT_HUNTING_JOB_DATA_ID); + HistoricalJobResponse result = apiInstance.getHistoricalJob(HISTORICAL_JOB_DATA_ID); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling SecurityMonitoringApi#getThreatHuntingJob"); + System.err.println("Exception when calling SecurityMonitoringApi#getHistoricalJob"); 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/ListHistoricalJobs.java similarity index 69% rename from examples/v2/security-monitoring/ListThreatHuntingJobs.java rename to examples/v2/security-monitoring/ListHistoricalJobs.java index 9e1c281b312..c0a7367b627 100644 --- a/examples/v2/security-monitoring/ListThreatHuntingJobs.java +++ b/examples/v2/security-monitoring/ListHistoricalJobs.java @@ -1,21 +1,21 @@ -// List threat hunting jobs returns "OK" response +// List historical 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; +import com.datadog.api.client.v2.model.ListHistoricalJobsResponse; public class Example { public static void main(String[] args) { ApiClient defaultClient = ApiClient.getDefaultApiClient(); - defaultClient.setUnstableOperationEnabled("v2.listThreatHuntingJobs", true); + defaultClient.setUnstableOperationEnabled("v2.listHistoricalJobs", true); SecurityMonitoringApi apiInstance = new SecurityMonitoringApi(defaultClient); try { - ListThreatHuntingJobsResponse result = apiInstance.listThreatHuntingJobs(); + ListHistoricalJobsResponse result = apiInstance.listHistoricalJobs(); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling SecurityMonitoringApi#listThreatHuntingJobs"); + System.err.println("Exception when calling SecurityMonitoringApi#listHistoricalJobs"); 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_1365512061.java b/examples/v2/security-monitoring/ListThreatHuntingJobs_1365512061.java deleted file mode 100644 index 26bc113b907..00000000000 --- a/examples/v2/security-monitoring/ListThreatHuntingJobs_1365512061.java +++ /dev/null @@ -1,32 +0,0 @@ -// List historical 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.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.listThreatHuntingJobs", true); - defaultClient.setUnstableOperationEnabled("v2.runThreatHuntingJob", true); - SecurityMonitoringApi apiInstance = new SecurityMonitoringApi(defaultClient); - - // there is a valid "threat_hunting_job" in the system - String THREAT_HUNTING_JOB_DATA_ID = System.getenv("THREAT_HUNTING_JOB_DATA_ID"); - - try { - ListThreatHuntingJobsResponse result = - apiInstance.listThreatHuntingJobs( - new ListThreatHuntingJobsOptionalParameters().filterQuery("id:string")); - 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/RunThreatHuntingJob.java b/examples/v2/security-monitoring/RunHistoricalJob.java similarity index 74% rename from examples/v2/security-monitoring/RunThreatHuntingJob.java rename to examples/v2/security-monitoring/RunHistoricalJob.java index 68106e7ea5d..7c9413d8637 100644 --- a/examples/v2/security-monitoring/RunThreatHuntingJob.java +++ b/examples/v2/security-monitoring/RunHistoricalJob.java @@ -1,44 +1,44 @@ -// Run a threat hunting job returns "Status created" response +// Run a historical 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.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.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.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.runThreatHuntingJob", true); + defaultClient.setUnstableOperationEnabled("v2.runHistoricalJob", true); SecurityMonitoringApi apiInstance = new SecurityMonitoringApi(defaultClient); - RunThreatHuntingJobRequest body = - new RunThreatHuntingJobRequest() + RunHistoricalJobRequest body = + new RunHistoricalJobRequest() .data( - new RunThreatHuntingJobRequestData() - .type(RunThreatHuntingJobRequestDataType.HISTORICALDETECTIONSJOBCREATE) + new RunHistoricalJobRequestData() + .type(RunHistoricalJobRequestDataType.HISTORICALDETECTIONSJOBCREATE) .attributes( - new RunThreatHuntingJobRequestAttributes() + new RunHistoricalJobRequestAttributes() .jobDefinition( new JobDefinition() .type("log_detection") .name("Excessive number of failed attempts.") .queries( Collections.singletonList( - new ThreatHuntingJobQuery() + new HistoricalJobQuery() .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 ThreatHuntingJobOptions() + new HistoricalJobOptions() .keepAlive(SecurityMonitoringRuleKeepAlive.ONE_HOUR) .maxSignalDuration( SecurityMonitoringRuleMaxSignalDuration.ONE_DAY) @@ -62,10 +62,10 @@ public static void main(String[] args) { .index("main")))); try { - JobCreateResponse result = apiInstance.runThreatHuntingJob(body); + JobCreateResponse result = apiInstance.runHistoricalJob(body); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling SecurityMonitoringApi#runThreatHuntingJob"); + System.err.println("Exception when calling SecurityMonitoringApi#runHistoricalJob"); 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 26cedc5c5d1..c5d42728810 100644 --- a/src/main/java/com/datadog/api/client/ApiClient.java +++ b/src/main/java/com/datadog/api/client/ApiClient.java @@ -802,30 +802,30 @@ public class ApiClient { put("v2.listAWSCloudAuthPersonaMappings", false); put("v2.activateContentPack", false); put("v2.bulkExportSecurityMonitoringTerraformResources", false); - put("v2.cancelThreatHuntingJob", false); + put("v2.cancelHistoricalJob", false); put("v2.convertJobResultToSignal", false); put("v2.convertSecurityMonitoringTerraformResource", false); put("v2.deactivateContentPack", false); - put("v2.deleteThreatHuntingJob", false); + put("v2.deleteHistoricalJob", false); put("v2.exportSecurityMonitoringTerraformResource", false); put("v2.getContentPacksStates", false); put("v2.getFinding", false); + put("v2.getHistoricalJob", false); put("v2.getIndicatorOfCompromise", false); put("v2.getRuleVersionHistory", false); put("v2.getSecretsRules", false); put("v2.getSecurityMonitoringHistsignal", false); put("v2.getSecurityMonitoringHistsignalsByJobId", false); - put("v2.getThreatHuntingJob", false); put("v2.listFindings", false); + put("v2.listHistoricalJobs", false); put("v2.listIndicatorsOfCompromise", false); put("v2.listMultipleRulesets", 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.runThreatHuntingJob", false); + put("v2.runHistoricalJob", false); put("v2.searchSecurityMonitoringHistsignals", false); put("v2.getCodeCoverageBranchSummary", false); put("v2.getCodeCoverageCommitSummary", 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 ff95fa787d0..0f5a870dc7f 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 @@ -34,17 +34,18 @@ import com.datadog.api.client.v2.model.GetRuleVersionHistoryResponse; import com.datadog.api.client.v2.model.GetSBOMResponse; import com.datadog.api.client.v2.model.GetSuppressionVersionHistoryResponse; +import com.datadog.api.client.v2.model.HistoricalJobResponse; import com.datadog.api.client.v2.model.IoCExplorerListResponse; 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.ListSecurityFindingsResponse; -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.RunThreatHuntingJobRequest; +import com.datadog.api.client.v2.model.RunHistoricalJobRequest; import com.datadog.api.client.v2.model.SBOMComponentLicenseType; import com.datadog.api.client.v2.model.SBOMFormat; import com.datadog.api.client.v2.model.ScannedAssetsMetadata; @@ -99,7 +100,6 @@ import com.datadog.api.client.v2.model.SecurityMonitoringTerraformConvertRequest; import com.datadog.api.client.v2.model.SecurityMonitoringTerraformExportResponse; import com.datadog.api.client.v2.model.SecurityMonitoringTerraformResourceType; -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; @@ -1223,27 +1223,27 @@ public ApiResponse bulkExportSecurityMonitoringTerraformResourcesWithHttpI } /** - * Cancel a threat hunting job. + * Cancel a historical job. * - *

See {@link #cancelThreatHuntingJobWithHttpInfo}. + *

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

See {@link #cancelThreatHuntingJobWithHttpInfoAsync}. + *

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

See {@link #cancelThreatHuntingJobWithHttpInfo}. + *

See {@link #cancelHistoricalJobWithHttpInfo}. * * @param jobId The ID of the job. (required) * @return CompletableFuture<ApiResponse<Void>> */ - public CompletableFuture> cancelThreatHuntingJobWithHttpInfoAsync( - String jobId) { + public CompletableFuture> cancelHistoricalJobWithHttpInfoAsync(String jobId) { // Check if unstable operation is enabled - String operationId = "cancelThreatHuntingJob"; + String operationId = "cancelHistoricalJob"; if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); } else { @@ -1338,12 +1337,12 @@ public CompletableFuture> cancelThreatHuntingJobWithHttpInfoAs CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally( new ApiException( - 400, "Missing the required parameter 'jobId' when calling cancelThreatHuntingJob")); + 400, "Missing the required parameter 'jobId' when calling cancelHistoricalJob")); return result; } // create path and map variables String localVarPath = - "/api/v2/siem-threat-hunting/jobs/{job_id}/cancel" + "/api/v2/siem-historical-detections/jobs/{job_id}/cancel" .replaceAll("\\{" + "job_id" + "\\}", apiClient.escapeString(jobId.toString())); Map localVarHeaderParams = new HashMap(); @@ -1352,7 +1351,7 @@ public CompletableFuture> cancelThreatHuntingJobWithHttpInfoAs try { builder = apiClient.createBuilder( - "v2.SecurityMonitoringApi.cancelThreatHuntingJob", + "v2.SecurityMonitoringApi.cancelHistoricalJob", localVarPath, new ArrayList(), localVarHeaderParams, @@ -1589,7 +1588,7 @@ public ApiResponse convertJobResultToSignalWithHttpInfo( 400, "Missing the required parameter 'body' when calling convertJobResultToSignal"); } // create path and map variables - String localVarPath = "/api/v2/siem-threat-hunting/jobs/signal_convert"; + String localVarPath = "/api/v2/siem-historical-detections/jobs/signal_convert"; Map localVarHeaderParams = new HashMap(); @@ -1644,7 +1643,7 @@ public CompletableFuture> convertJobResultToSignalWithHttpInfo return result; } // create path and map variables - String localVarPath = "/api/v2/siem-threat-hunting/jobs/signal_convert"; + String localVarPath = "/api/v2/siem-historical-detections/jobs/signal_convert"; Map localVarHeaderParams = new HashMap(); @@ -3594,6 +3593,158 @@ 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. * @@ -4288,27 +4439,27 @@ public CompletableFuture> deleteSignalNotificationRuleWithHttp } /** - * Delete an existing job. + * Delete a vulnerability-based notification rule. * - *

See {@link #deleteThreatHuntingJobWithHttpInfo}. + *

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

See {@link #deleteThreatHuntingJobWithHttpInfoAsync}. + *

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

See {@link #deleteThreatHuntingJobWithHttpInfo}. + *

See {@link #deleteVulnerabilityNotificationRuleWithHttpInfo}. * - * @param jobId The ID of the job. (required) + * @param id ID of the notification rule. (required) * @return CompletableFuture<ApiResponse<Void>> */ - 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; - } + public CompletableFuture> deleteVulnerabilityNotificationRuleWithHttpInfoAsync( + String id) { Object localVarPostBody = null; - // verify the required parameter 'jobId' is set - if (jobId == null) { + // verify the required parameter 'id' is set + if (id == null) { CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally( new ApiException( - 400, "Missing the required parameter 'jobId' when calling deleteThreatHuntingJob")); + 400, + "Missing the required parameter 'id' when calling" + + " deleteVulnerabilityNotificationRule")); return result; } // create path and map variables String localVarPath = - "/api/v2/siem-threat-hunting/jobs/{job_id}" - .replaceAll("\\{" + "job_id" + "\\}", apiClient.escapeString(jobId.toString())); + "/api/v2/security/vulnerabilities/notification_rules/{id}" + .replaceAll("\\{" + "id" + "\\}", apiClient.escapeString(id.toString())); Map localVarHeaderParams = new HashMap(); @@ -4417,13 +4552,13 @@ public CompletableFuture> deleteThreatHuntingJobWithHttpInfoAs try { builder = apiClient.createBuilder( - "v2.SecurityMonitoringApi.deleteThreatHuntingJob", + "v2.SecurityMonitoringApi.deleteVulnerabilityNotificationRule", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"*/*"}, - new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); + new String[] {"apiKeyAuth", "appKeyAuth"}); } catch (ApiException ex) { CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); @@ -4441,27 +4576,27 @@ public CompletableFuture> deleteThreatHuntingJobWithHttpInfoAs } /** - * Delete a vulnerability-based notification rule. + * Detach security findings from their case. * - *

See {@link #deleteVulnerabilityNotificationRuleWithHttpInfo}. + *

See {@link #detachCaseWithHttpInfo}. * - * @param id ID of the notification rule. (required) + * @param body (required) * @throws ApiException if fails to make API call */ - public void deleteVulnerabilityNotificationRule(String id) throws ApiException { - deleteVulnerabilityNotificationRuleWithHttpInfo(id); + public void detachCase(DetachCaseRequest body) throws ApiException { + detachCaseWithHttpInfo(body); } /** - * Delete a vulnerability-based notification rule. + * Detach security findings from their case. * - *

See {@link #deleteVulnerabilityNotificationRuleWithHttpInfoAsync}. + *

See {@link #detachCaseWithHttpInfoAsync}. * - * @param id ID of the notification rule. (required) + * @param body (required) * @return CompletableFuture */ - public CompletableFuture deleteVulnerabilityNotificationRuleAsync(String id) { - return deleteVulnerabilityNotificationRuleWithHttpInfoAsync(id) + public CompletableFuture detachCaseAsync(DetachCaseRequest body) { + return detachCaseWithHttpInfoAsync(body) .thenApply( response -> { return response.getData(); @@ -4469,167 +4604,30 @@ public CompletableFuture deleteVulnerabilityNotificationRuleAsync(String i } /** - * Delete a notification rule for security vulnerabilities. + * Detach security findings from their case. This operation dissociates security findings from + * their associated cases without deleting the cases themselves. You can detach security findings + * from multiple different cases in a single request, with a limit of 50 security findings per + * request. Security findings that are not currently attached to any case will be ignored. * - * @param id ID of the notification rule. (required) + * @param body (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 No Content -
400 Bad Request -
404 Not Found -
429 Too many requests -
*/ - public ApiResponse deleteVulnerabilityNotificationRuleWithHttpInfo(String id) - throws ApiException { - Object localVarPostBody = null; + public ApiResponse detachCaseWithHttpInfo(DetachCaseRequest body) throws ApiException { + Object localVarPostBody = body; - // 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); - } - - /** - * Detach security findings from their case. - * - *

See {@link #detachCaseWithHttpInfo}. - * - * @param body (required) - * @throws ApiException if fails to make API call - */ - public void detachCase(DetachCaseRequest body) throws ApiException { - detachCaseWithHttpInfo(body); - } - - /** - * Detach security findings from their case. - * - *

See {@link #detachCaseWithHttpInfoAsync}. - * - * @param body (required) - * @return CompletableFuture - */ - public CompletableFuture detachCaseAsync(DetachCaseRequest body) { - return detachCaseWithHttpInfoAsync(body) - .thenApply( - response -> { - return response.getData(); - }); - } - - /** - * Detach security findings from their case. This operation dissociates security findings from - * their associated cases without deleting the cases themselves. You can detach security findings - * from multiple different cases in a single request, with a limit of 50 security findings per - * request. Security findings that are not currently attached to any case will be ignored. - * - * @param body (required) - * @return ApiResponse<Void> - * @throws ApiException if fails to make API call - * @http.response.details - * - * - * - * - * - * - * - *
Response details
Status Code Description Response Headers
204 No Content -
400 Bad Request -
404 Not Found -
429 Too many requests -
- */ - public ApiResponse detachCaseWithHttpInfo(DetachCaseRequest body) throws ApiException { - Object localVarPostBody = body; - - // verify the required parameter 'body' is set - if (body == null) { - throw new ApiException(400, "Missing the required parameter 'body' when calling detachCase"); + // verify the required parameter 'body' is set + if (body == null) { + throw new ApiException(400, "Missing the required parameter 'body' when calling detachCase"); } // create path and map variables String localVarPath = "/api/v2/security/findings/cases"; @@ -6070,31 +6068,28 @@ public CompletableFuture> getFindingWithHttpInfo } /** - * Get an indicator of compromise. + * Get a job's details. * - *

See {@link #getIndicatorOfCompromiseWithHttpInfo}. + *

See {@link #getHistoricalJobWithHttpInfo}. * - * @param indicator The indicator value to look up (for example, an IP address or domain). - * (required) - * @return GetIoCIndicatorResponse + * @param jobId The ID of the job. (required) + * @return HistoricalJobResponse * @throws ApiException if fails to make API call */ - public GetIoCIndicatorResponse getIndicatorOfCompromise(String indicator) throws ApiException { - return getIndicatorOfCompromiseWithHttpInfo(indicator).getData(); + public HistoricalJobResponse getHistoricalJob(String jobId) throws ApiException { + return getHistoricalJobWithHttpInfo(jobId).getData(); } /** - * Get an indicator of compromise. + * Get a job's details. * - *

See {@link #getIndicatorOfCompromiseWithHttpInfoAsync}. + *

See {@link #getHistoricalJobWithHttpInfoAsync}. * - * @param indicator The indicator value to look up (for example, an IP address or domain). - * (required) - * @return CompletableFuture<GetIoCIndicatorResponse> + * @param jobId The ID of the job. (required) + * @return CompletableFuture<HistoricalJobResponse> */ - public CompletableFuture getIndicatorOfCompromiseAsync( - String indicator) { - return getIndicatorOfCompromiseWithHttpInfoAsync(indicator) + public CompletableFuture getHistoricalJobAsync(String jobId) { + return getHistoricalJobWithHttpInfoAsync(jobId) .thenApply( response -> { return response.getData(); @@ -6102,11 +6097,10 @@ public CompletableFuture getIndicatorOfCompromiseAsync( } /** - * Get detailed information about a specific indicator of compromise (IoC). + * Get a job's details. * - * @param indicator The indicator value to look up (for example, an IP address or domain). - * (required) - * @return ApiResponse<GetIoCIndicatorResponse> + * @param jobId The ID of the job. (required) + * @return ApiResponse<HistoricalJobResponse> * @throws ApiException if fails to make API call * @http.response.details * @@ -6119,10 +6113,10 @@ public CompletableFuture getIndicatorOfCompromiseAsync( * *
429 Too many requests -
*/ - public ApiResponse getIndicatorOfCompromiseWithHttpInfo(String indicator) + public ApiResponse getHistoricalJobWithHttpInfo(String jobId) throws ApiException { // Check if unstable operation is enabled - String operationId = "getIndicatorOfCompromise"; + String operationId = "getHistoricalJob"; if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); } else { @@ -6130,24 +6124,23 @@ public ApiResponse getIndicatorOfCompromiseWithHttpInfo } Object localVarPostBody = null; - // verify the required parameter 'indicator' is set - if (indicator == null) { + // verify the required parameter 'jobId' is set + if (jobId == null) { throw new ApiException( - 400, "Missing the required parameter 'indicator' when calling getIndicatorOfCompromise"); + 400, "Missing the required parameter 'jobId' when calling getHistoricalJob"); } // create path and map variables - String localVarPath = "/api/v2/security/siem/ioc-explorer/indicator"; + String localVarPath = + "/api/v2/siem-historical-detections/jobs/{job_id}" + .replaceAll("\\{" + "job_id" + "\\}", apiClient.escapeString(jobId.toString())); - List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "indicator", indicator)); - Invocation.Builder builder = apiClient.createBuilder( - "v2.SecurityMonitoringApi.getIndicatorOfCompromise", + "v2.SecurityMonitoringApi.getHistoricalJob", localVarPath, - localVarQueryParams, + new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json"}, @@ -6160,62 +6153,59 @@ public ApiResponse getIndicatorOfCompromiseWithHttpInfo localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType() {}); } /** - * Get an indicator of compromise. + * Get a job's details. * - *

See {@link #getIndicatorOfCompromiseWithHttpInfo}. + *

See {@link #getHistoricalJobWithHttpInfo}. * - * @param indicator The indicator value to look up (for example, an IP address or domain). - * (required) - * @return CompletableFuture<ApiResponse<GetIoCIndicatorResponse>> + * @param jobId The ID of the job. (required) + * @return CompletableFuture<ApiResponse<HistoricalJobResponse>> */ - public CompletableFuture> - getIndicatorOfCompromiseWithHttpInfoAsync(String indicator) { + public CompletableFuture> getHistoricalJobWithHttpInfoAsync( + String jobId) { // Check if unstable operation is enabled - String operationId = "getIndicatorOfCompromise"; + String operationId = "getHistoricalJob"; 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; - // verify the required parameter 'indicator' is set - if (indicator == null) { - CompletableFuture> result = new CompletableFuture<>(); + // verify the required parameter 'jobId' is set + if (jobId == null) { + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally( new ApiException( - 400, - "Missing the required parameter 'indicator' when calling getIndicatorOfCompromise")); + 400, "Missing the required parameter 'jobId' when calling getHistoricalJob")); return result; } // create path and map variables - String localVarPath = "/api/v2/security/siem/ioc-explorer/indicator"; + String localVarPath = + "/api/v2/siem-historical-detections/jobs/{job_id}" + .replaceAll("\\{" + "job_id" + "\\}", apiClient.escapeString(jobId.toString())); - List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "indicator", indicator)); - Invocation.Builder builder; try { builder = apiClient.createBuilder( - "v2.SecurityMonitoringApi.getIndicatorOfCompromise", + "v2.SecurityMonitoringApi.getHistoricalJob", localVarPath, - localVarQueryParams, + new ArrayList(), localVarHeaderParams, new HashMap(), 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; } @@ -6227,34 +6217,35 @@ public ApiResponse getIndicatorOfCompromiseWithHttpInfo localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType() {}); } /** - * Get investigation queries for a signal. + * Get an indicator of compromise. * - *

See {@link #getInvestigationLogQueriesMatchingSignalWithHttpInfo}. + *

See {@link #getIndicatorOfCompromiseWithHttpInfo}. * - * @param signalId The ID of the signal. (required) - * @return SecurityMonitoringSignalSuggestedActionsResponse + * @param indicator The indicator value to look up (for example, an IP address or domain). + * (required) + * @return GetIoCIndicatorResponse * @throws ApiException if fails to make API call */ - public SecurityMonitoringSignalSuggestedActionsResponse getInvestigationLogQueriesMatchingSignal( - String signalId) throws ApiException { - return getInvestigationLogQueriesMatchingSignalWithHttpInfo(signalId).getData(); + public GetIoCIndicatorResponse getIndicatorOfCompromise(String indicator) throws ApiException { + return getIndicatorOfCompromiseWithHttpInfo(indicator).getData(); } /** - * Get investigation queries for a signal. + * Get an indicator of compromise. * - *

See {@link #getInvestigationLogQueriesMatchingSignalWithHttpInfoAsync}. + *

See {@link #getIndicatorOfCompromiseWithHttpInfoAsync}. * - * @param signalId The ID of the signal. (required) - * @return CompletableFuture<SecurityMonitoringSignalSuggestedActionsResponse> + * @param indicator The indicator value to look up (for example, an IP address or domain). + * (required) + * @return CompletableFuture<GetIoCIndicatorResponse> */ - public CompletableFuture - getInvestigationLogQueriesMatchingSignalAsync(String signalId) { - return getInvestigationLogQueriesMatchingSignalWithHttpInfoAsync(signalId) + public CompletableFuture getIndicatorOfCompromiseAsync( + String indicator) { + return getIndicatorOfCompromiseWithHttpInfoAsync(indicator) .thenApply( response -> { return response.getData(); @@ -6262,23 +6253,183 @@ public SecurityMonitoringSignalSuggestedActionsResponse getInvestigationLogQueri } /** - * Get the list of investigation log queries available for a given security signal. + * Get detailed information about a specific indicator of compromise (IoC). * - * @param signalId The ID of the signal. (required) - * @return ApiResponse<SecurityMonitoringSignalSuggestedActionsResponse> + * @param indicator The indicator value to look up (for example, an IP address or domain). + * (required) + * @return ApiResponse<GetIoCIndicatorResponse> * @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 - getInvestigationLogQueriesMatchingSignalWithHttpInfo(String signalId) throws ApiException { + public ApiResponse getIndicatorOfCompromiseWithHttpInfo(String indicator) + throws ApiException { + // Check if unstable operation is enabled + String operationId = "getIndicatorOfCompromise"; + 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 'indicator' is set + if (indicator == null) { + throw new ApiException( + 400, "Missing the required parameter 'indicator' when calling getIndicatorOfCompromise"); + } + // create path and map variables + String localVarPath = "/api/v2/security/siem/ioc-explorer/indicator"; + + List localVarQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + + localVarQueryParams.addAll(apiClient.parameterToPairs("", "indicator", indicator)); + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.SecurityMonitoringApi.getIndicatorOfCompromise", + 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() {}); + } + + /** + * Get an indicator of compromise. + * + *

See {@link #getIndicatorOfCompromiseWithHttpInfo}. + * + * @param indicator The indicator value to look up (for example, an IP address or domain). + * (required) + * @return CompletableFuture<ApiResponse<GetIoCIndicatorResponse>> + */ + public CompletableFuture> + getIndicatorOfCompromiseWithHttpInfoAsync(String indicator) { + // Check if unstable operation is enabled + String operationId = "getIndicatorOfCompromise"; + 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 'indicator' is set + if (indicator == null) { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, + "Missing the required parameter 'indicator' when calling getIndicatorOfCompromise")); + return result; + } + // create path and map variables + String localVarPath = "/api/v2/security/siem/ioc-explorer/indicator"; + + List localVarQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + + localVarQueryParams.addAll(apiClient.parameterToPairs("", "indicator", indicator)); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.SecurityMonitoringApi.getIndicatorOfCompromise", + 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() {}); + } + + /** + * Get investigation queries for a signal. + * + *

See {@link #getInvestigationLogQueriesMatchingSignalWithHttpInfo}. + * + * @param signalId The ID of the signal. (required) + * @return SecurityMonitoringSignalSuggestedActionsResponse + * @throws ApiException if fails to make API call + */ + public SecurityMonitoringSignalSuggestedActionsResponse getInvestigationLogQueriesMatchingSignal( + String signalId) throws ApiException { + return getInvestigationLogQueriesMatchingSignalWithHttpInfo(signalId).getData(); + } + + /** + * Get investigation queries for a signal. + * + *

See {@link #getInvestigationLogQueriesMatchingSignalWithHttpInfoAsync}. + * + * @param signalId The ID of the signal. (required) + * @return CompletableFuture<SecurityMonitoringSignalSuggestedActionsResponse> + */ + public CompletableFuture + getInvestigationLogQueriesMatchingSignalAsync(String signalId) { + return getInvestigationLogQueriesMatchingSignalWithHttpInfoAsync(signalId) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * Get the list of investigation log queries available for a given security signal. + * + * @param signalId The ID of the signal. (required) + * @return ApiResponse<SecurityMonitoringSignalSuggestedActionsResponse> + * @throws ApiException if fails to make API call + * @http.response.details + * + * + * + * + * + * + * + *
Response details
Status Code Description Response Headers
200 OK -
403 Not Authorized -
404 Not Found -
429 Too many requests -
+ */ + public ApiResponse + getInvestigationLogQueriesMatchingSignalWithHttpInfo(String signalId) throws ApiException { Object localVarPostBody = null; // verify the required parameter 'signalId' is set @@ -7482,7 +7633,7 @@ public SecurityMonitoringCriticalAssetResponse getSecurityMonitoringCriticalAsse * *

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

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

See {@link #getSecurityMonitoringHistsignalWithHttpInfo}. * - * @param histsignalId The ID of the threat hunting signal. (required) + * @param histsignalId The ID of the historical signal. (required) * @return CompletableFuture<ApiResponse<SecurityMonitoringSignalResponse>> */ public CompletableFuture> @@ -7607,7 +7758,7 @@ public ApiResponse getSecurityMonitoringHistsi } // create path and map variables String localVarPath = - "/api/v2/siem-threat-hunting/histsignals/{histsignal_id}" + "/api/v2/siem-historical-detections/histsignals/{histsignal_id}" .replaceAll( "\\{" + "histsignal_id" + "\\}", apiClient.escapeString(histsignalId.toString())); @@ -7838,7 +7989,7 @@ public SecurityMonitoringSignalsListResponse getSecurityMonitoringHistsignalsByJ Integer pageLimit = parameters.pageLimit; // create path and map variables String localVarPath = - "/api/v2/siem-threat-hunting/jobs/{job_id}/histsignals" + "/api/v2/siem-historical-detections/jobs/{job_id}/histsignals" .replaceAll("\\{" + "job_id" + "\\}", apiClient.escapeString(jobId.toString())); List localVarQueryParams = new ArrayList(); @@ -7915,7 +8066,7 @@ public SecurityMonitoringSignalsListResponse getSecurityMonitoringHistsignalsByJ Integer pageLimit = parameters.pageLimit; // create path and map variables String localVarPath = - "/api/v2/siem-threat-hunting/jobs/{job_id}/histsignals" + "/api/v2/siem-historical-detections/jobs/{job_id}/histsignals" .replaceAll("\\{" + "job_id" + "\\}", apiClient.escapeString(jobId.toString())); List localVarQueryParams = new ArrayList(); @@ -9278,159 +9429,6 @@ public ApiResponse getSuppressionVersionHi 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 'jobId' when calling getThreatHuntingJob")); - return result; - } - // 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; - try { - builder = - apiClient.createBuilder( - "v2.SecurityMonitoringApi.getThreatHuntingJob", - 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 details of a vulnerability notification rule. * @@ -10438,7 +10436,272 @@ public ApiResponse listFindingsWithHttpInfo( Invocation.Builder builder = apiClient.createBuilder( - "v2.SecurityMonitoringApi.listFindings", + "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)); + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.SecurityMonitoringApi.listHistoricalJobs", localVarPath, localVarQueryParams, localVarHeaderParams, @@ -10453,80 +10716,50 @@ public ApiResponse listFindingsWithHttpInfo( localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType() {}); } /** - * List findings. + * List historical jobs. * - *

See {@link #listFindingsWithHttpInfo}. + *

See {@link #listHistoricalJobsWithHttpInfo}. * * @param parameters Optional parameters for the request. - * @return CompletableFuture<ApiResponse<ListFindingsResponse>> + * @return CompletableFuture<ApiResponse<ListHistoricalJobsResponse>> */ - public CompletableFuture> listFindingsWithHttpInfoAsync( - ListFindingsOptionalParameters parameters) { + public CompletableFuture> + listHistoricalJobsWithHttpInfoAsync(ListHistoricalJobsOptionalParameters parameters) { // Check if unstable operation is enabled - String operationId = "listFindings"; + String operationId = "listHistoricalJobs"; 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 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; + 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/posture_management/findings"; + String localVarPath = "/api/v2/siem-historical-detections/jobs"; 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)); + 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.listFindings", + "v2.SecurityMonitoringApi.listHistoricalJobs", localVarPath, localVarQueryParams, localVarHeaderParams, @@ -10534,7 +10767,7 @@ public CompletableFuture> listFindingsWithHttp 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; } @@ -10546,7 +10779,7 @@ public CompletableFuture> listFindingsWithHttp localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType() {}); } /** Manage optional parameters to listIndicatorsOfCompromise. */ @@ -11977,7 +12210,7 @@ public SecurityMonitoringSignalsListResponse listSecurityMonitoringHistsignals( String pageCursor = parameters.pageCursor; Integer pageLimit = parameters.pageLimit; // create path and map variables - String localVarPath = "/api/v2/siem-threat-hunting/histsignals"; + String localVarPath = "/api/v2/siem-historical-detections/histsignals"; List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); @@ -12039,7 +12272,7 @@ public SecurityMonitoringSignalsListResponse listSecurityMonitoringHistsignals( String pageCursor = parameters.pageCursor; Integer pageLimit = parameters.pageLimit; // create path and map variables - String localVarPath = "/api/v2/siem-threat-hunting/histsignals"; + String localVarPath = "/api/v2/siem-historical-detections/histsignals"; List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); @@ -12848,244 +13081,6 @@ public SecurityMonitoringPaginatedSuppressionsResponse listSecurityMonitoringSup 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; @@ -15238,30 +15233,28 @@ public ApiResponse patchVulnerabilityNotificationRuleW } /** - * Run a threat hunting job. + * Run a historical job. * - *

See {@link #runThreatHuntingJobWithHttpInfo}. + *

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

See {@link #runThreatHuntingJobWithHttpInfoAsync}. + *

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

See {@link #runThreatHuntingJobWithHttpInfo}. + *

See {@link #runHistoricalJobWithHttpInfo}. * * @param body (required) * @return CompletableFuture<ApiResponse<JobCreateResponse>> */ - public CompletableFuture> runThreatHuntingJobWithHttpInfoAsync( - RunThreatHuntingJobRequest body) { + public CompletableFuture> runHistoricalJobWithHttpInfoAsync( + RunHistoricalJobRequest body) { // Check if unstable operation is enabled - String operationId = "runThreatHuntingJob"; + String operationId = "runHistoricalJob"; if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); } else { @@ -15354,11 +15347,11 @@ public CompletableFuture> runThreatHuntingJobWith CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally( new ApiException( - 400, "Missing the required parameter 'body' when calling runThreatHuntingJob")); + 400, "Missing the required parameter 'body' when calling runHistoricalJob")); return result; } // create path and map variables - String localVarPath = "/api/v2/siem-threat-hunting/jobs"; + String localVarPath = "/api/v2/siem-historical-detections/jobs"; Map localVarHeaderParams = new HashMap(); @@ -15366,7 +15359,7 @@ public CompletableFuture> runThreatHuntingJobWith try { builder = apiClient.createBuilder( - "v2.SecurityMonitoringApi.runThreatHuntingJob", + "v2.SecurityMonitoringApi.runHistoricalJob", localVarPath, new ArrayList(), localVarHeaderParams, @@ -15698,7 +15691,7 @@ public SecurityMonitoringSignalsListResponse searchSecurityMonitoringHistsignals } Object localVarPostBody = parameters.body; // create path and map variables - String localVarPath = "/api/v2/siem-threat-hunting/histsignals/search"; + String localVarPath = "/api/v2/siem-historical-detections/histsignals/search"; Map localVarHeaderParams = new HashMap(); @@ -15746,7 +15739,7 @@ public SecurityMonitoringSignalsListResponse searchSecurityMonitoringHistsignals } Object localVarPostBody = parameters.body; // create path and map variables - String localVarPath = "/api/v2/siem-threat-hunting/histsignals/search"; + String localVarPath = "/api/v2/siem-historical-detections/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 e537b0dc8d0..c7a084a305c 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 threat hunting job results to signals. */ +/** Attributes for converting historical 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 c2b2bf1ef9a..e654c0f92bf 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 threat hunting job results to signals. */ +/** Data for converting historical job results to signals. */ @JsonPropertyOrder({ ConvertJobResultsToSignalsData.JSON_PROPERTY_ATTRIBUTES, ConvertJobResultsToSignalsData.JSON_PROPERTY_TYPE @@ -39,7 +39,7 @@ public ConvertJobResultsToSignalsData attributes( } /** - * Attributes for converting threat hunting job results to signals. + * Attributes for converting historical 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 a2d976006ac..0548bbbcab4 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 threat hunting job results to signals. */ +/** Request for converting historical 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 threat hunting job results to signals. + * Data for converting historical job results to signals. * * @return data */ diff --git a/src/main/java/com/datadog/api/client/v2/model/ThreatHuntingJobDataType.java b/src/main/java/com/datadog/api/client/v2/model/HistoricalJobDataType.java similarity index 59% rename from src/main/java/com/datadog/api/client/v2/model/ThreatHuntingJobDataType.java rename to src/main/java/com/datadog/api/client/v2/model/HistoricalJobDataType.java index 64ece4b410d..b28fe5e04c8 100644 --- a/src/main/java/com/datadog/api/client/v2/model/ThreatHuntingJobDataType.java +++ b/src/main/java/com/datadog/api/client/v2/model/HistoricalJobDataType.java @@ -19,39 +19,38 @@ import java.util.Set; /** Type of payload. */ -@JsonSerialize(using = ThreatHuntingJobDataType.ThreatHuntingJobDataTypeSerializer.class) -public class ThreatHuntingJobDataType extends ModelEnum { +@JsonSerialize(using = HistoricalJobDataType.HistoricalJobDataTypeSerializer.class) +public class HistoricalJobDataType extends ModelEnum { private static final Set allowedValues = new HashSet(Arrays.asList("historicalDetectionsJob")); - public static final ThreatHuntingJobDataType HISTORICALDETECTIONSJOB = - new ThreatHuntingJobDataType("historicalDetectionsJob"); + public static final HistoricalJobDataType HISTORICALDETECTIONSJOB = + new HistoricalJobDataType("historicalDetectionsJob"); - ThreatHuntingJobDataType(String value) { + HistoricalJobDataType(String value) { super(value, allowedValues); } - public static class ThreatHuntingJobDataTypeSerializer - extends StdSerializer { - public ThreatHuntingJobDataTypeSerializer(Class t) { + public static class HistoricalJobDataTypeSerializer extends StdSerializer { + public HistoricalJobDataTypeSerializer(Class t) { super(t); } - public ThreatHuntingJobDataTypeSerializer() { + public HistoricalJobDataTypeSerializer() { this(null); } @Override public void serialize( - ThreatHuntingJobDataType value, JsonGenerator jgen, SerializerProvider provider) + HistoricalJobDataType value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { jgen.writeObject(value.value); } } @JsonCreator - public static ThreatHuntingJobDataType fromValue(String value) { - return new ThreatHuntingJobDataType(value); + public static HistoricalJobDataType fromValue(String value) { + return new HistoricalJobDataType(value); } } diff --git a/src/main/java/com/datadog/api/client/v2/model/ThreatHuntingJobListMeta.java b/src/main/java/com/datadog/api/client/v2/model/HistoricalJobListMeta.java similarity index 83% rename from src/main/java/com/datadog/api/client/v2/model/ThreatHuntingJobListMeta.java rename to src/main/java/com/datadog/api/client/v2/model/HistoricalJobListMeta.java index b53f6cb6318..bee924be8a7 100644 --- a/src/main/java/com/datadog/api/client/v2/model/ThreatHuntingJobListMeta.java +++ b/src/main/java/com/datadog/api/client/v2/model/HistoricalJobListMeta.java @@ -17,15 +17,15 @@ import java.util.Objects; /** Metadata about the list of jobs. */ -@JsonPropertyOrder({ThreatHuntingJobListMeta.JSON_PROPERTY_TOTAL_COUNT}) +@JsonPropertyOrder({HistoricalJobListMeta.JSON_PROPERTY_TOTAL_COUNT}) @jakarta.annotation.Generated( value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") -public class ThreatHuntingJobListMeta { +public class HistoricalJobListMeta { @JsonIgnore public boolean unparsed = false; public static final String JSON_PROPERTY_TOTAL_COUNT = "totalCount"; private Integer totalCount; - public ThreatHuntingJobListMeta totalCount(Integer totalCount) { + public HistoricalJobListMeta 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 ThreatHuntingJobListMeta + * @return HistoricalJobListMeta */ @JsonAnySetter - public ThreatHuntingJobListMeta putAdditionalProperty(String key, Object value) { + public HistoricalJobListMeta 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 ThreatHuntingJobListMeta object is equal to o. */ + /** Return true if this HistoricalJobListMeta 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; } - ThreatHuntingJobListMeta threatHuntingJobListMeta = (ThreatHuntingJobListMeta) o; - return Objects.equals(this.totalCount, threatHuntingJobListMeta.totalCount) - && Objects.equals(this.additionalProperties, threatHuntingJobListMeta.additionalProperties); + HistoricalJobListMeta historicalJobListMeta = (HistoricalJobListMeta) o; + return Objects.equals(this.totalCount, historicalJobListMeta.totalCount) + && Objects.equals(this.additionalProperties, historicalJobListMeta.additionalProperties); } @Override @@ -114,7 +114,7 @@ public int hashCode() { @Override public String toString() { StringBuilder sb = new StringBuilder(); - sb.append("class ThreatHuntingJobListMeta {\n"); + sb.append("class HistoricalJobListMeta {\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/ThreatHuntingJobOptions.java b/src/main/java/com/datadog/api/client/v2/model/HistoricalJobOptions.java similarity index 84% rename from src/main/java/com/datadog/api/client/v2/model/ThreatHuntingJobOptions.java rename to src/main/java/com/datadog/api/client/v2/model/HistoricalJobOptions.java index 2adb2ecc8ce..8168dcca558 100644 --- a/src/main/java/com/datadog/api/client/v2/model/ThreatHuntingJobOptions.java +++ b/src/main/java/com/datadog/api/client/v2/model/HistoricalJobOptions.java @@ -18,19 +18,19 @@ /** Job options. */ @JsonPropertyOrder({ - ThreatHuntingJobOptions.JSON_PROPERTY_ANOMALY_DETECTION_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 + HistoricalJobOptions.JSON_PROPERTY_ANOMALY_DETECTION_OPTIONS, + 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 }) @jakarta.annotation.Generated( value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") -public class ThreatHuntingJobOptions { +public class HistoricalJobOptions { @JsonIgnore public boolean unparsed = false; public static final String JSON_PROPERTY_ANOMALY_DETECTION_OPTIONS = "anomalyDetectionOptions"; private SecurityMonitoringRuleAnomalyDetectionOptions anomalyDetectionOptions; @@ -59,7 +59,7 @@ public class ThreatHuntingJobOptions { public static final String JSON_PROPERTY_THIRD_PARTY_RULE_OPTIONS = "thirdPartyRuleOptions"; private SecurityMonitoringRuleThirdPartyOptions thirdPartyRuleOptions; - public ThreatHuntingJobOptions anomalyDetectionOptions( + public HistoricalJobOptions anomalyDetectionOptions( SecurityMonitoringRuleAnomalyDetectionOptions anomalyDetectionOptions) { this.anomalyDetectionOptions = anomalyDetectionOptions; this.unparsed |= anomalyDetectionOptions.unparsed; @@ -83,7 +83,7 @@ public void setAnomalyDetectionOptions( this.anomalyDetectionOptions = anomalyDetectionOptions; } - public ThreatHuntingJobOptions detectionMethod( + public HistoricalJobOptions detectionMethod( SecurityMonitoringRuleDetectionMethod detectionMethod) { this.detectionMethod = detectionMethod; this.unparsed |= !detectionMethod.isValid(); @@ -109,7 +109,7 @@ public void setDetectionMethod(SecurityMonitoringRuleDetectionMethod detectionMe this.detectionMethod = detectionMethod; } - public ThreatHuntingJobOptions evaluationWindow( + public HistoricalJobOptions evaluationWindow( SecurityMonitoringRuleEvaluationWindow evaluationWindow) { this.evaluationWindow = evaluationWindow; this.unparsed |= !evaluationWindow.isValid(); @@ -137,7 +137,7 @@ public void setEvaluationWindow(SecurityMonitoringRuleEvaluationWindow evaluatio this.evaluationWindow = evaluationWindow; } - public ThreatHuntingJobOptions impossibleTravelOptions( + public HistoricalJobOptions impossibleTravelOptions( SecurityMonitoringRuleImpossibleTravelOptions impossibleTravelOptions) { this.impossibleTravelOptions = impossibleTravelOptions; this.unparsed |= impossibleTravelOptions.unparsed; @@ -161,7 +161,7 @@ public void setImpossibleTravelOptions( this.impossibleTravelOptions = impossibleTravelOptions; } - public ThreatHuntingJobOptions keepAlive(SecurityMonitoringRuleKeepAlive keepAlive) { + public HistoricalJobOptions keepAlive(SecurityMonitoringRuleKeepAlive keepAlive) { this.keepAlive = keepAlive; this.unparsed |= !keepAlive.isValid(); return this; @@ -187,7 +187,7 @@ public void setKeepAlive(SecurityMonitoringRuleKeepAlive keepAlive) { this.keepAlive = keepAlive; } - public ThreatHuntingJobOptions maxSignalDuration( + public HistoricalJobOptions maxSignalDuration( SecurityMonitoringRuleMaxSignalDuration maxSignalDuration) { this.maxSignalDuration = maxSignalDuration; this.unparsed |= !maxSignalDuration.isValid(); @@ -214,7 +214,7 @@ public void setMaxSignalDuration(SecurityMonitoringRuleMaxSignalDuration maxSign this.maxSignalDuration = maxSignalDuration; } - public ThreatHuntingJobOptions newValueOptions( + public HistoricalJobOptions newValueOptions( SecurityMonitoringRuleNewValueOptions newValueOptions) { this.newValueOptions = newValueOptions; this.unparsed |= newValueOptions.unparsed; @@ -237,7 +237,7 @@ public void setNewValueOptions(SecurityMonitoringRuleNewValueOptions newValueOpt this.newValueOptions = newValueOptions; } - public ThreatHuntingJobOptions sequenceDetectionOptions( + public HistoricalJobOptions sequenceDetectionOptions( SecurityMonitoringRuleSequenceDetectionOptions sequenceDetectionOptions) { this.sequenceDetectionOptions = sequenceDetectionOptions; this.unparsed |= sequenceDetectionOptions.unparsed; @@ -261,7 +261,7 @@ public void setSequenceDetectionOptions( this.sequenceDetectionOptions = sequenceDetectionOptions; } - public ThreatHuntingJobOptions thirdPartyRuleOptions( + public HistoricalJobOptions thirdPartyRuleOptions( SecurityMonitoringRuleThirdPartyOptions thirdPartyRuleOptions) { this.thirdPartyRuleOptions = thirdPartyRuleOptions; this.unparsed |= thirdPartyRuleOptions.unparsed; @@ -297,10 +297,10 @@ public void setThirdPartyRuleOptions( * * @param key The arbitrary key to set * @param value The associated value - * @return ThreatHuntingJobOptions + * @return HistoricalJobOptions */ @JsonAnySetter - public ThreatHuntingJobOptions putAdditionalProperty(String key, Object value) { + public HistoricalJobOptions putAdditionalProperty(String key, Object value) { if (this.additionalProperties == null) { this.additionalProperties = new HashMap(); } @@ -331,7 +331,7 @@ public Object getAdditionalProperty(String key) { return this.additionalProperties.get(key); } - /** Return true if this ThreatHuntingJobOptions object is equal to o. */ + /** Return true if this HistoricalJobOptions object is equal to o. */ @Override public boolean equals(Object o) { if (this == o) { @@ -340,20 +340,20 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - ThreatHuntingJobOptions threatHuntingJobOptions = (ThreatHuntingJobOptions) o; + HistoricalJobOptions historicalJobOptions = (HistoricalJobOptions) o; return Objects.equals( - this.anomalyDetectionOptions, threatHuntingJobOptions.anomalyDetectionOptions) - && Objects.equals(this.detectionMethod, threatHuntingJobOptions.detectionMethod) - && Objects.equals(this.evaluationWindow, threatHuntingJobOptions.evaluationWindow) + this.anomalyDetectionOptions, historicalJobOptions.anomalyDetectionOptions) + && Objects.equals(this.detectionMethod, historicalJobOptions.detectionMethod) + && Objects.equals(this.evaluationWindow, historicalJobOptions.evaluationWindow) && Objects.equals( - this.impossibleTravelOptions, threatHuntingJobOptions.impossibleTravelOptions) - && Objects.equals(this.keepAlive, threatHuntingJobOptions.keepAlive) - && Objects.equals(this.maxSignalDuration, threatHuntingJobOptions.maxSignalDuration) - && Objects.equals(this.newValueOptions, threatHuntingJobOptions.newValueOptions) + this.impossibleTravelOptions, historicalJobOptions.impossibleTravelOptions) + && Objects.equals(this.keepAlive, historicalJobOptions.keepAlive) + && Objects.equals(this.maxSignalDuration, historicalJobOptions.maxSignalDuration) + && Objects.equals(this.newValueOptions, historicalJobOptions.newValueOptions) && Objects.equals( - this.sequenceDetectionOptions, threatHuntingJobOptions.sequenceDetectionOptions) - && Objects.equals(this.thirdPartyRuleOptions, threatHuntingJobOptions.thirdPartyRuleOptions) - && Objects.equals(this.additionalProperties, threatHuntingJobOptions.additionalProperties); + this.sequenceDetectionOptions, historicalJobOptions.sequenceDetectionOptions) + && Objects.equals(this.thirdPartyRuleOptions, historicalJobOptions.thirdPartyRuleOptions) + && Objects.equals(this.additionalProperties, historicalJobOptions.additionalProperties); } @Override @@ -374,7 +374,7 @@ public int hashCode() { @Override public String toString() { StringBuilder sb = new StringBuilder(); - sb.append("class ThreatHuntingJobOptions {\n"); + sb.append("class HistoricalJobOptions {\n"); sb.append(" anomalyDetectionOptions: ") .append(toIndentedString(anomalyDetectionOptions)) .append("\n"); diff --git a/src/main/java/com/datadog/api/client/v2/model/ThreatHuntingJobQuery.java b/src/main/java/com/datadog/api/client/v2/model/HistoricalJobQuery.java similarity index 80% rename from src/main/java/com/datadog/api/client/v2/model/ThreatHuntingJobQuery.java rename to src/main/java/com/datadog/api/client/v2/model/HistoricalJobQuery.java index c36bf1e6061..d7c253a136e 100644 --- a/src/main/java/com/datadog/api/client/v2/model/ThreatHuntingJobQuery.java +++ b/src/main/java/com/datadog/api/client/v2/model/HistoricalJobQuery.java @@ -18,20 +18,20 @@ import java.util.Map; import java.util.Objects; -/** Query for selecting logs analyzed by the threat hunting job. */ +/** Query for selecting logs analyzed by the historical job. */ @JsonPropertyOrder({ - 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 + 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 }) @jakarta.annotation.Generated( value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") -public class ThreatHuntingJobQuery { +public class HistoricalJobQuery { @JsonIgnore public boolean unparsed = false; public static final String JSON_PROPERTY_AGGREGATION = "aggregation"; private SecurityMonitoringRuleQueryAggregation aggregation; @@ -59,7 +59,7 @@ public class ThreatHuntingJobQuery { public static final String JSON_PROPERTY_QUERY = "query"; private String query; - public ThreatHuntingJobQuery aggregation(SecurityMonitoringRuleQueryAggregation aggregation) { + public HistoricalJobQuery 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 ThreatHuntingJobQuery dataSource(SecurityMonitoringStandardDataSource dataSource) { + public HistoricalJobQuery dataSource(SecurityMonitoringStandardDataSource dataSource) { this.dataSource = dataSource; this.unparsed |= !dataSource.isValid(); return this; @@ -110,12 +110,12 @@ public void setDataSource(SecurityMonitoringStandardDataSource dataSource) { this.dataSource = dataSource; } - public ThreatHuntingJobQuery distinctFields(List distinctFields) { + public HistoricalJobQuery distinctFields(List distinctFields) { this.distinctFields = distinctFields; return this; } - public ThreatHuntingJobQuery addDistinctFieldsItem(String distinctFieldsItem) { + public HistoricalJobQuery addDistinctFieldsItem(String distinctFieldsItem) { if (this.distinctFields == null) { this.distinctFields = new ArrayList<>(); } @@ -139,12 +139,12 @@ public void setDistinctFields(List distinctFields) { this.distinctFields = distinctFields; } - public ThreatHuntingJobQuery groupByFields(List groupByFields) { + public HistoricalJobQuery groupByFields(List groupByFields) { this.groupByFields = groupByFields; return this; } - public ThreatHuntingJobQuery addGroupByFieldsItem(String groupByFieldsItem) { + public HistoricalJobQuery addGroupByFieldsItem(String groupByFieldsItem) { if (this.groupByFields == null) { this.groupByFields = new ArrayList<>(); } @@ -168,7 +168,7 @@ public void setGroupByFields(List groupByFields) { this.groupByFields = groupByFields; } - public ThreatHuntingJobQuery hasOptionalGroupByFields(Boolean hasOptionalGroupByFields) { + public HistoricalJobQuery hasOptionalGroupByFields(Boolean hasOptionalGroupByFields) { this.hasOptionalGroupByFields = hasOptionalGroupByFields; return this; } @@ -190,12 +190,12 @@ public void setHasOptionalGroupByFields(Boolean hasOptionalGroupByFields) { this.hasOptionalGroupByFields = hasOptionalGroupByFields; } - public ThreatHuntingJobQuery metrics(List metrics) { + public HistoricalJobQuery metrics(List metrics) { this.metrics = metrics; return this; } - public ThreatHuntingJobQuery addMetricsItem(String metricsItem) { + public HistoricalJobQuery addMetricsItem(String metricsItem) { if (this.metrics == null) { this.metrics = new ArrayList<>(); } @@ -221,7 +221,7 @@ public void setMetrics(List metrics) { this.metrics = metrics; } - public ThreatHuntingJobQuery name(String name) { + public HistoricalJobQuery name(String name) { this.name = name; return this; } @@ -242,7 +242,7 @@ public void setName(String name) { this.name = name; } - public ThreatHuntingJobQuery query(String query) { + public HistoricalJobQuery query(String query) { this.query = query; return this; } @@ -275,10 +275,10 @@ public void setQuery(String query) { * * @param key The arbitrary key to set * @param value The associated value - * @return ThreatHuntingJobQuery + * @return HistoricalJobQuery */ @JsonAnySetter - public ThreatHuntingJobQuery putAdditionalProperty(String key, Object value) { + public HistoricalJobQuery putAdditionalProperty(String key, Object value) { if (this.additionalProperties == null) { this.additionalProperties = new HashMap(); } @@ -309,7 +309,7 @@ public Object getAdditionalProperty(String key) { return this.additionalProperties.get(key); } - /** Return true if this ThreatHuntingJobQuery object is equal to o. */ + /** Return true if this HistoricalJobQuery object is equal to o. */ @Override public boolean equals(Object o) { if (this == o) { @@ -318,17 +318,17 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - 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) + 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) && Objects.equals( - 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); + 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); } @Override @@ -348,7 +348,7 @@ public int hashCode() { @Override public String toString() { StringBuilder sb = new StringBuilder(); - sb.append("class ThreatHuntingJobQuery {\n"); + sb.append("class HistoricalJobQuery {\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/ThreatHuntingJobResponse.java b/src/main/java/com/datadog/api/client/v2/model/HistoricalJobResponse.java similarity index 78% rename from src/main/java/com/datadog/api/client/v2/model/ThreatHuntingJobResponse.java rename to src/main/java/com/datadog/api/client/v2/model/HistoricalJobResponse.java index f2ba25ece19..49ca926a6a2 100644 --- a/src/main/java/com/datadog/api/client/v2/model/ThreatHuntingJobResponse.java +++ b/src/main/java/com/datadog/api/client/v2/model/HistoricalJobResponse.java @@ -16,34 +16,34 @@ import java.util.Map; import java.util.Objects; -/** Threat hunting job response. */ -@JsonPropertyOrder({ThreatHuntingJobResponse.JSON_PROPERTY_DATA}) +/** Historical job response. */ +@JsonPropertyOrder({HistoricalJobResponse.JSON_PROPERTY_DATA}) @jakarta.annotation.Generated( value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") -public class ThreatHuntingJobResponse { +public class HistoricalJobResponse { @JsonIgnore public boolean unparsed = false; public static final String JSON_PROPERTY_DATA = "data"; - private ThreatHuntingJobResponseData data; + private HistoricalJobResponseData data; - public ThreatHuntingJobResponse data(ThreatHuntingJobResponseData data) { + public HistoricalJobResponse data(HistoricalJobResponseData data) { this.data = data; this.unparsed |= data.unparsed; return this; } /** - * Threat hunting job response data. + * Historical job response data. * * @return data */ @jakarta.annotation.Nullable @JsonProperty(JSON_PROPERTY_DATA) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public ThreatHuntingJobResponseData getData() { + public HistoricalJobResponseData getData() { return data; } - public void setData(ThreatHuntingJobResponseData data) { + public void setData(HistoricalJobResponseData data) { this.data = data; } @@ -59,10 +59,10 @@ public void setData(ThreatHuntingJobResponseData data) { * * @param key The arbitrary key to set * @param value The associated value - * @return ThreatHuntingJobResponse + * @return HistoricalJobResponse */ @JsonAnySetter - public ThreatHuntingJobResponse putAdditionalProperty(String key, Object value) { + public HistoricalJobResponse 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 ThreatHuntingJobResponse object is equal to o. */ + /** Return true if this HistoricalJobResponse 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; } - ThreatHuntingJobResponse threatHuntingJobResponse = (ThreatHuntingJobResponse) o; - return Objects.equals(this.data, threatHuntingJobResponse.data) - && Objects.equals(this.additionalProperties, threatHuntingJobResponse.additionalProperties); + HistoricalJobResponse historicalJobResponse = (HistoricalJobResponse) o; + return Objects.equals(this.data, historicalJobResponse.data) + && Objects.equals(this.additionalProperties, historicalJobResponse.additionalProperties); } @Override @@ -115,7 +115,7 @@ public int hashCode() { @Override public String toString() { StringBuilder sb = new StringBuilder(); - sb.append("class ThreatHuntingJobResponse {\n"); + sb.append("class HistoricalJobResponse {\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/ThreatHuntingJobResponseAttributes.java b/src/main/java/com/datadog/api/client/v2/model/HistoricalJobResponseAttributes.java similarity index 75% rename from src/main/java/com/datadog/api/client/v2/model/ThreatHuntingJobResponseAttributes.java rename to src/main/java/com/datadog/api/client/v2/model/HistoricalJobResponseAttributes.java index 810e7a25f57..147ba90b0d1 100644 --- a/src/main/java/com/datadog/api/client/v2/model/ThreatHuntingJobResponseAttributes.java +++ b/src/main/java/com/datadog/api/client/v2/model/HistoricalJobResponseAttributes.java @@ -16,21 +16,21 @@ import java.util.Map; import java.util.Objects; -/** Threat hunting job attributes. */ +/** Historical job attributes. */ @JsonPropertyOrder({ - 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, - ThreatHuntingJobResponseAttributes.JSON_PROPERTY_SIGNAL_OUTPUT + 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, + HistoricalJobResponseAttributes.JSON_PROPERTY_SIGNAL_OUTPUT }) @jakarta.annotation.Generated( value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") -public class ThreatHuntingJobResponseAttributes { +public class HistoricalJobResponseAttributes { @JsonIgnore public boolean unparsed = false; public static final String JSON_PROPERTY_CREATED_AT = "createdAt"; private String createdAt; @@ -59,7 +59,7 @@ public class ThreatHuntingJobResponseAttributes { public static final String JSON_PROPERTY_SIGNAL_OUTPUT = "signalOutput"; private Boolean signalOutput; - public ThreatHuntingJobResponseAttributes createdAt(String createdAt) { + public HistoricalJobResponseAttributes createdAt(String createdAt) { this.createdAt = createdAt; return this; } @@ -80,7 +80,7 @@ public void setCreatedAt(String createdAt) { this.createdAt = createdAt; } - public ThreatHuntingJobResponseAttributes createdByHandle(String createdByHandle) { + public HistoricalJobResponseAttributes createdByHandle(String createdByHandle) { this.createdByHandle = createdByHandle; return this; } @@ -101,7 +101,7 @@ public void setCreatedByHandle(String createdByHandle) { this.createdByHandle = createdByHandle; } - public ThreatHuntingJobResponseAttributes createdByName(String createdByName) { + public HistoricalJobResponseAttributes createdByName(String createdByName) { this.createdByName = createdByName; return this; } @@ -122,7 +122,7 @@ public void setCreatedByName(String createdByName) { this.createdByName = createdByName; } - public ThreatHuntingJobResponseAttributes createdFromRuleId(String createdFromRuleId) { + public HistoricalJobResponseAttributes createdFromRuleId(String createdFromRuleId) { this.createdFromRuleId = createdFromRuleId; return this; } @@ -143,14 +143,14 @@ public void setCreatedFromRuleId(String createdFromRuleId) { this.createdFromRuleId = createdFromRuleId; } - public ThreatHuntingJobResponseAttributes jobDefinition(JobDefinition jobDefinition) { + public HistoricalJobResponseAttributes jobDefinition(JobDefinition jobDefinition) { this.jobDefinition = jobDefinition; this.unparsed |= jobDefinition.unparsed; return this; } /** - * Definition of a threat hunting job. + * Definition of a historical job. * * @return jobDefinition */ @@ -165,7 +165,7 @@ public void setJobDefinition(JobDefinition jobDefinition) { this.jobDefinition = jobDefinition; } - public ThreatHuntingJobResponseAttributes jobName(String jobName) { + public HistoricalJobResponseAttributes jobName(String jobName) { this.jobName = jobName; return this; } @@ -186,7 +186,7 @@ public void setJobName(String jobName) { this.jobName = jobName; } - public ThreatHuntingJobResponseAttributes jobStatus(String jobStatus) { + public HistoricalJobResponseAttributes jobStatus(String jobStatus) { this.jobStatus = jobStatus; return this; } @@ -207,7 +207,7 @@ public void setJobStatus(String jobStatus) { this.jobStatus = jobStatus; } - public ThreatHuntingJobResponseAttributes modifiedAt(String modifiedAt) { + public HistoricalJobResponseAttributes modifiedAt(String modifiedAt) { this.modifiedAt = modifiedAt; return this; } @@ -228,7 +228,7 @@ public void setModifiedAt(String modifiedAt) { this.modifiedAt = modifiedAt; } - public ThreatHuntingJobResponseAttributes signalOutput(Boolean signalOutput) { + public HistoricalJobResponseAttributes signalOutput(Boolean signalOutput) { this.signalOutput = signalOutput; return this; } @@ -261,10 +261,10 @@ public void setSignalOutput(Boolean signalOutput) { * * @param key The arbitrary key to set * @param value The associated value - * @return ThreatHuntingJobResponseAttributes + * @return HistoricalJobResponseAttributes */ @JsonAnySetter - public ThreatHuntingJobResponseAttributes putAdditionalProperty(String key, Object value) { + public HistoricalJobResponseAttributes putAdditionalProperty(String key, Object value) { if (this.additionalProperties == null) { this.additionalProperties = new HashMap(); } @@ -295,7 +295,7 @@ public Object getAdditionalProperty(String key) { return this.additionalProperties.get(key); } - /** Return true if this ThreatHuntingJobResponseAttributes object is equal to o. */ + /** Return true if this HistoricalJobResponseAttributes object is equal to o. */ @Override public boolean equals(Object o) { if (this == o) { @@ -304,20 +304,19 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - ThreatHuntingJobResponseAttributes threatHuntingJobResponseAttributes = - (ThreatHuntingJobResponseAttributes) o; - return Objects.equals(this.createdAt, threatHuntingJobResponseAttributes.createdAt) - && Objects.equals(this.createdByHandle, threatHuntingJobResponseAttributes.createdByHandle) - && Objects.equals(this.createdByName, threatHuntingJobResponseAttributes.createdByName) + 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) + && Objects.equals(this.signalOutput, historicalJobResponseAttributes.signalOutput) && Objects.equals( - 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.signalOutput, threatHuntingJobResponseAttributes.signalOutput) - && Objects.equals( - this.additionalProperties, threatHuntingJobResponseAttributes.additionalProperties); + this.additionalProperties, historicalJobResponseAttributes.additionalProperties); } @Override @@ -338,7 +337,7 @@ public int hashCode() { @Override public String toString() { StringBuilder sb = new StringBuilder(); - sb.append("class ThreatHuntingJobResponseAttributes {\n"); + sb.append("class HistoricalJobResponseAttributes {\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/ThreatHuntingJobResponseData.java b/src/main/java/com/datadog/api/client/v2/model/HistoricalJobResponseData.java similarity index 74% rename from src/main/java/com/datadog/api/client/v2/model/ThreatHuntingJobResponseData.java rename to src/main/java/com/datadog/api/client/v2/model/HistoricalJobResponseData.java index 763085eee32..bff7e52c787 100644 --- a/src/main/java/com/datadog/api/client/v2/model/ThreatHuntingJobResponseData.java +++ b/src/main/java/com/datadog/api/client/v2/model/HistoricalJobResponseData.java @@ -16,48 +16,48 @@ import java.util.Map; import java.util.Objects; -/** Threat hunting job response data. */ +/** Historical job response data. */ @JsonPropertyOrder({ - ThreatHuntingJobResponseData.JSON_PROPERTY_ATTRIBUTES, - ThreatHuntingJobResponseData.JSON_PROPERTY_ID, - ThreatHuntingJobResponseData.JSON_PROPERTY_TYPE + HistoricalJobResponseData.JSON_PROPERTY_ATTRIBUTES, + HistoricalJobResponseData.JSON_PROPERTY_ID, + HistoricalJobResponseData.JSON_PROPERTY_TYPE }) @jakarta.annotation.Generated( value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") -public class ThreatHuntingJobResponseData { +public class HistoricalJobResponseData { @JsonIgnore public boolean unparsed = false; public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; - private ThreatHuntingJobResponseAttributes attributes; + private HistoricalJobResponseAttributes attributes; public static final String JSON_PROPERTY_ID = "id"; private String id; public static final String JSON_PROPERTY_TYPE = "type"; - private ThreatHuntingJobDataType type; + private HistoricalJobDataType type; - public ThreatHuntingJobResponseData attributes(ThreatHuntingJobResponseAttributes attributes) { + public HistoricalJobResponseData attributes(HistoricalJobResponseAttributes attributes) { this.attributes = attributes; this.unparsed |= attributes.unparsed; return this; } /** - * Threat hunting job attributes. + * Historical job attributes. * * @return attributes */ @jakarta.annotation.Nullable @JsonProperty(JSON_PROPERTY_ATTRIBUTES) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public ThreatHuntingJobResponseAttributes getAttributes() { + public HistoricalJobResponseAttributes getAttributes() { return attributes; } - public void setAttributes(ThreatHuntingJobResponseAttributes attributes) { + public void setAttributes(HistoricalJobResponseAttributes attributes) { this.attributes = attributes; } - public ThreatHuntingJobResponseData id(String id) { + public HistoricalJobResponseData id(String id) { this.id = id; return this; } @@ -78,7 +78,7 @@ public void setId(String id) { this.id = id; } - public ThreatHuntingJobResponseData type(ThreatHuntingJobDataType type) { + public HistoricalJobResponseData type(HistoricalJobDataType type) { this.type = type; this.unparsed |= !type.isValid(); return this; @@ -92,11 +92,11 @@ public ThreatHuntingJobResponseData type(ThreatHuntingJobDataType type) { @jakarta.annotation.Nullable @JsonProperty(JSON_PROPERTY_TYPE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public ThreatHuntingJobDataType getType() { + public HistoricalJobDataType getType() { return type; } - public void setType(ThreatHuntingJobDataType type) { + public void setType(HistoricalJobDataType type) { if (!type.isValid()) { this.unparsed = true; } @@ -115,10 +115,10 @@ public void setType(ThreatHuntingJobDataType type) { * * @param key The arbitrary key to set * @param value The associated value - * @return ThreatHuntingJobResponseData + * @return HistoricalJobResponseData */ @JsonAnySetter - public ThreatHuntingJobResponseData putAdditionalProperty(String key, Object value) { + public HistoricalJobResponseData 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 ThreatHuntingJobResponseData object is equal to o. */ + /** Return true if this HistoricalJobResponseData 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; } - ThreatHuntingJobResponseData threatHuntingJobResponseData = (ThreatHuntingJobResponseData) o; - return Objects.equals(this.attributes, threatHuntingJobResponseData.attributes) - && Objects.equals(this.id, threatHuntingJobResponseData.id) - && Objects.equals(this.type, threatHuntingJobResponseData.type) + HistoricalJobResponseData historicalJobResponseData = (HistoricalJobResponseData) o; + return Objects.equals(this.attributes, historicalJobResponseData.attributes) + && Objects.equals(this.id, historicalJobResponseData.id) + && Objects.equals(this.type, historicalJobResponseData.type) && Objects.equals( - this.additionalProperties, threatHuntingJobResponseData.additionalProperties); + this.additionalProperties, historicalJobResponseData.additionalProperties); } @Override @@ -174,7 +174,7 @@ public int hashCode() { @Override public String toString() { StringBuilder sb = new StringBuilder(); - sb.append("class ThreatHuntingJobResponseData {\n"); + sb.append("class HistoricalJobResponseData {\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/main/java/com/datadog/api/client/v2/model/JobCreateResponse.java b/src/main/java/com/datadog/api/client/v2/model/JobCreateResponse.java index 508cc0d563b..e9050ef832c 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 threat hunting job response. */ +/** Run a historical 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 21496655291..499853d544c 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 ThreatHuntingJobDataType type; + private HistoricalJobDataType type; public JobCreateResponseData id(String id) { this.id = id; @@ -52,7 +52,7 @@ public void setId(String id) { this.id = id; } - public JobCreateResponseData type(ThreatHuntingJobDataType type) { + public JobCreateResponseData type(HistoricalJobDataType type) { this.type = type; this.unparsed |= !type.isValid(); return this; @@ -66,11 +66,11 @@ public JobCreateResponseData type(ThreatHuntingJobDataType type) { @jakarta.annotation.Nullable @JsonProperty(JSON_PROPERTY_TYPE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public ThreatHuntingJobDataType getType() { + public HistoricalJobDataType getType() { return type; } - public void setType(ThreatHuntingJobDataType type) { + public void setType(HistoricalJobDataType 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 5de1d62e859..29057415d42 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 threat hunting job. */ +/** Definition of a historical 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 ThreatHuntingJobOptions options; + private HistoricalJobOptions 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(ThreatHuntingJobOptions options) { + public JobDefinition options(HistoricalJobOptions options) { this.options = options; this.unparsed |= options.unparsed; return this; @@ -290,23 +290,23 @@ public JobDefinition options(ThreatHuntingJobOptions options) { @jakarta.annotation.Nullable @JsonProperty(JSON_PROPERTY_OPTIONS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public ThreatHuntingJobOptions getOptions() { + public HistoricalJobOptions getOptions() { return options; } - public void setOptions(ThreatHuntingJobOptions options) { + public void setOptions(HistoricalJobOptions options) { this.options = options; } - public JobDefinition queries(List queries) { + public JobDefinition queries(List queries) { this.queries = queries; - for (ThreatHuntingJobQuery item : queries) { + for (HistoricalJobQuery item : queries) { this.unparsed |= item.unparsed; } return this; } - public JobDefinition addQueriesItem(ThreatHuntingJobQuery queriesItem) { + public JobDefinition addQueriesItem(HistoricalJobQuery queriesItem) { this.queries.add(queriesItem); this.unparsed |= queriesItem.unparsed; return this; @@ -319,11 +319,11 @@ public JobDefinition addQueriesItem(ThreatHuntingJobQuery 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 dde8a7c2422..b84e3aaf6c4 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 threat hunting job based on a security monitoring rule. */ +/** Definition of a historical 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/ListThreatHuntingJobsResponse.java b/src/main/java/com/datadog/api/client/v2/model/ListHistoricalJobsResponse.java similarity index 73% rename from src/main/java/com/datadog/api/client/v2/model/ListThreatHuntingJobsResponse.java rename to src/main/java/com/datadog/api/client/v2/model/ListHistoricalJobsResponse.java index 1ba1934a0e6..7feea15e2e7 100644 --- a/src/main/java/com/datadog/api/client/v2/model/ListThreatHuntingJobsResponse.java +++ b/src/main/java/com/datadog/api/client/v2/model/ListHistoricalJobsResponse.java @@ -18,30 +18,30 @@ import java.util.Map; import java.util.Objects; -/** List of threat hunting jobs. */ +/** List of historical jobs. */ @JsonPropertyOrder({ - ListThreatHuntingJobsResponse.JSON_PROPERTY_DATA, - ListThreatHuntingJobsResponse.JSON_PROPERTY_META + ListHistoricalJobsResponse.JSON_PROPERTY_DATA, + ListHistoricalJobsResponse.JSON_PROPERTY_META }) @jakarta.annotation.Generated( value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") -public class ListThreatHuntingJobsResponse { +public class ListHistoricalJobsResponse { @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 ThreatHuntingJobListMeta meta; + private HistoricalJobListMeta meta; - public ListThreatHuntingJobsResponse data(List data) { + public ListHistoricalJobsResponse data(List data) { this.data = data; - for (ThreatHuntingJobResponseData item : data) { + for (HistoricalJobResponseData item : data) { this.unparsed |= item.unparsed; } return this; } - public ListThreatHuntingJobsResponse addDataItem(ThreatHuntingJobResponseData dataItem) { + public ListHistoricalJobsResponse addDataItem(HistoricalJobResponseData dataItem) { if (this.data == null) { this.data = new ArrayList<>(); } @@ -51,22 +51,22 @@ public ListThreatHuntingJobsResponse addDataItem(ThreatHuntingJobResponseData da } /** - * Array containing the list of threat hunting jobs. + * Array containing the list of historical 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 ListThreatHuntingJobsResponse meta(ThreatHuntingJobListMeta meta) { + public ListHistoricalJobsResponse meta(HistoricalJobListMeta meta) { this.meta = meta; this.unparsed |= meta.unparsed; return this; @@ -80,11 +80,11 @@ public ListThreatHuntingJobsResponse meta(ThreatHuntingJobListMeta meta) { @jakarta.annotation.Nullable @JsonProperty(JSON_PROPERTY_META) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public ThreatHuntingJobListMeta getMeta() { + public HistoricalJobListMeta getMeta() { return meta; } - public void setMeta(ThreatHuntingJobListMeta meta) { + public void setMeta(HistoricalJobListMeta meta) { this.meta = meta; } @@ -100,10 +100,10 @@ public void setMeta(ThreatHuntingJobListMeta meta) { * * @param key The arbitrary key to set * @param value The associated value - * @return ListThreatHuntingJobsResponse + * @return ListHistoricalJobsResponse */ @JsonAnySetter - public ListThreatHuntingJobsResponse putAdditionalProperty(String key, Object value) { + public ListHistoricalJobsResponse 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 ListThreatHuntingJobsResponse object is equal to o. */ + /** Return true if this ListHistoricalJobsResponse 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; } - ListThreatHuntingJobsResponse listThreatHuntingJobsResponse = (ListThreatHuntingJobsResponse) o; - return Objects.equals(this.data, listThreatHuntingJobsResponse.data) - && Objects.equals(this.meta, listThreatHuntingJobsResponse.meta) + ListHistoricalJobsResponse listHistoricalJobsResponse = (ListHistoricalJobsResponse) o; + return Objects.equals(this.data, listHistoricalJobsResponse.data) + && Objects.equals(this.meta, listHistoricalJobsResponse.meta) && Objects.equals( - this.additionalProperties, listThreatHuntingJobsResponse.additionalProperties); + this.additionalProperties, listHistoricalJobsResponse.additionalProperties); } @Override @@ -158,7 +158,7 @@ public int hashCode() { @Override public String toString() { StringBuilder sb = new StringBuilder(); - sb.append("class ListThreatHuntingJobsResponse {\n"); + sb.append("class ListHistoricalJobsResponse {\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/RunThreatHuntingJobRequest.java b/src/main/java/com/datadog/api/client/v2/model/RunHistoricalJobRequest.java similarity index 77% rename from src/main/java/com/datadog/api/client/v2/model/RunThreatHuntingJobRequest.java rename to src/main/java/com/datadog/api/client/v2/model/RunHistoricalJobRequest.java index 151aad159cb..c0346611bc8 100644 --- a/src/main/java/com/datadog/api/client/v2/model/RunThreatHuntingJobRequest.java +++ b/src/main/java/com/datadog/api/client/v2/model/RunHistoricalJobRequest.java @@ -16,34 +16,34 @@ import java.util.Map; import java.util.Objects; -/** Run a threat hunting job request. */ -@JsonPropertyOrder({RunThreatHuntingJobRequest.JSON_PROPERTY_DATA}) +/** Run a historical job request. */ +@JsonPropertyOrder({RunHistoricalJobRequest.JSON_PROPERTY_DATA}) @jakarta.annotation.Generated( value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") -public class RunThreatHuntingJobRequest { +public class RunHistoricalJobRequest { @JsonIgnore public boolean unparsed = false; public static final String JSON_PROPERTY_DATA = "data"; - private RunThreatHuntingJobRequestData data; + private RunHistoricalJobRequestData data; - public RunThreatHuntingJobRequest data(RunThreatHuntingJobRequestData data) { + public RunHistoricalJobRequest data(RunHistoricalJobRequestData data) { this.data = data; this.unparsed |= data.unparsed; return this; } /** - * Data for running a threat hunting job request. + * Data for running a historical job request. * * @return data */ @jakarta.annotation.Nullable @JsonProperty(JSON_PROPERTY_DATA) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public RunThreatHuntingJobRequestData getData() { + public RunHistoricalJobRequestData getData() { return data; } - public void setData(RunThreatHuntingJobRequestData data) { + public void setData(RunHistoricalJobRequestData data) { this.data = data; } @@ -59,10 +59,10 @@ public void setData(RunThreatHuntingJobRequestData data) { * * @param key The arbitrary key to set * @param value The associated value - * @return RunThreatHuntingJobRequest + * @return RunHistoricalJobRequest */ @JsonAnySetter - public RunThreatHuntingJobRequest putAdditionalProperty(String key, Object value) { + public RunHistoricalJobRequest 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 RunThreatHuntingJobRequest object is equal to o. */ + /** Return true if this RunHistoricalJobRequest object is equal to o. */ @Override public boolean equals(Object o) { if (this == o) { @@ -102,10 +102,9 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - RunThreatHuntingJobRequest runThreatHuntingJobRequest = (RunThreatHuntingJobRequest) o; - return Objects.equals(this.data, runThreatHuntingJobRequest.data) - && Objects.equals( - this.additionalProperties, runThreatHuntingJobRequest.additionalProperties); + RunHistoricalJobRequest runHistoricalJobRequest = (RunHistoricalJobRequest) o; + return Objects.equals(this.data, runHistoricalJobRequest.data) + && Objects.equals(this.additionalProperties, runHistoricalJobRequest.additionalProperties); } @Override @@ -116,7 +115,7 @@ public int hashCode() { @Override public String toString() { StringBuilder sb = new StringBuilder(); - sb.append("class RunThreatHuntingJobRequest {\n"); + sb.append("class RunHistoricalJobRequest {\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/RunThreatHuntingJobRequestAttributes.java b/src/main/java/com/datadog/api/client/v2/model/RunHistoricalJobRequestAttributes.java similarity index 76% rename from src/main/java/com/datadog/api/client/v2/model/RunThreatHuntingJobRequestAttributes.java rename to src/main/java/com/datadog/api/client/v2/model/RunHistoricalJobRequestAttributes.java index a5ced720177..92f9dec4c2c 100644 --- a/src/main/java/com/datadog/api/client/v2/model/RunThreatHuntingJobRequestAttributes.java +++ b/src/main/java/com/datadog/api/client/v2/model/RunHistoricalJobRequestAttributes.java @@ -16,15 +16,15 @@ import java.util.Map; import java.util.Objects; -/** Run a threat hunting job request. */ +/** Run a historical job request. */ @JsonPropertyOrder({ - RunThreatHuntingJobRequestAttributes.JSON_PROPERTY_FROM_RULE, - RunThreatHuntingJobRequestAttributes.JSON_PROPERTY_ID, - RunThreatHuntingJobRequestAttributes.JSON_PROPERTY_JOB_DEFINITION + RunHistoricalJobRequestAttributes.JSON_PROPERTY_FROM_RULE, + RunHistoricalJobRequestAttributes.JSON_PROPERTY_ID, + RunHistoricalJobRequestAttributes.JSON_PROPERTY_JOB_DEFINITION }) @jakarta.annotation.Generated( value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") -public class RunThreatHuntingJobRequestAttributes { +public class RunHistoricalJobRequestAttributes { @JsonIgnore public boolean unparsed = false; public static final String JSON_PROPERTY_FROM_RULE = "fromRule"; private JobDefinitionFromRule fromRule; @@ -35,14 +35,14 @@ public class RunThreatHuntingJobRequestAttributes { public static final String JSON_PROPERTY_JOB_DEFINITION = "jobDefinition"; private JobDefinition jobDefinition; - public RunThreatHuntingJobRequestAttributes fromRule(JobDefinitionFromRule fromRule) { + public RunHistoricalJobRequestAttributes fromRule(JobDefinitionFromRule fromRule) { this.fromRule = fromRule; this.unparsed |= fromRule.unparsed; return this; } /** - * Definition of a threat hunting job based on a security monitoring rule. + * Definition of a historical job based on a security monitoring rule. * * @return fromRule */ @@ -57,7 +57,7 @@ public void setFromRule(JobDefinitionFromRule fromRule) { this.fromRule = fromRule; } - public RunThreatHuntingJobRequestAttributes id(String id) { + public RunHistoricalJobRequestAttributes id(String id) { this.id = id; return this; } @@ -78,14 +78,14 @@ public void setId(String id) { this.id = id; } - public RunThreatHuntingJobRequestAttributes jobDefinition(JobDefinition jobDefinition) { + public RunHistoricalJobRequestAttributes jobDefinition(JobDefinition jobDefinition) { this.jobDefinition = jobDefinition; this.unparsed |= jobDefinition.unparsed; return this; } /** - * Definition of a threat hunting job. + * Definition of a historical 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 RunThreatHuntingJobRequestAttributes + * @return RunHistoricalJobRequestAttributes */ @JsonAnySetter - public RunThreatHuntingJobRequestAttributes putAdditionalProperty(String key, Object value) { + public RunHistoricalJobRequestAttributes 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 RunThreatHuntingJobRequestAttributes object is equal to o. */ + /** Return true if this RunHistoricalJobRequestAttributes 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; } - RunThreatHuntingJobRequestAttributes runThreatHuntingJobRequestAttributes = - (RunThreatHuntingJobRequestAttributes) o; - return Objects.equals(this.fromRule, runThreatHuntingJobRequestAttributes.fromRule) - && Objects.equals(this.id, runThreatHuntingJobRequestAttributes.id) - && Objects.equals(this.jobDefinition, runThreatHuntingJobRequestAttributes.jobDefinition) + RunHistoricalJobRequestAttributes runHistoricalJobRequestAttributes = + (RunHistoricalJobRequestAttributes) o; + return Objects.equals(this.fromRule, runHistoricalJobRequestAttributes.fromRule) + && Objects.equals(this.id, runHistoricalJobRequestAttributes.id) + && Objects.equals(this.jobDefinition, runHistoricalJobRequestAttributes.jobDefinition) && Objects.equals( - this.additionalProperties, runThreatHuntingJobRequestAttributes.additionalProperties); + this.additionalProperties, runHistoricalJobRequestAttributes.additionalProperties); } @Override @@ -172,7 +172,7 @@ public int hashCode() { @Override public String toString() { StringBuilder sb = new StringBuilder(); - sb.append("class RunThreatHuntingJobRequestAttributes {\n"); + sb.append("class RunHistoricalJobRequestAttributes {\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/RunThreatHuntingJobRequestData.java b/src/main/java/com/datadog/api/client/v2/model/RunHistoricalJobRequestData.java similarity index 73% rename from src/main/java/com/datadog/api/client/v2/model/RunThreatHuntingJobRequestData.java rename to src/main/java/com/datadog/api/client/v2/model/RunHistoricalJobRequestData.java index 3356e51d275..8d0d2898694 100644 --- a/src/main/java/com/datadog/api/client/v2/model/RunThreatHuntingJobRequestData.java +++ b/src/main/java/com/datadog/api/client/v2/model/RunHistoricalJobRequestData.java @@ -16,45 +16,44 @@ import java.util.Map; import java.util.Objects; -/** Data for running a threat hunting job request. */ +/** Data for running a historical job request. */ @JsonPropertyOrder({ - RunThreatHuntingJobRequestData.JSON_PROPERTY_ATTRIBUTES, - RunThreatHuntingJobRequestData.JSON_PROPERTY_TYPE + RunHistoricalJobRequestData.JSON_PROPERTY_ATTRIBUTES, + RunHistoricalJobRequestData.JSON_PROPERTY_TYPE }) @jakarta.annotation.Generated( value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") -public class RunThreatHuntingJobRequestData { +public class RunHistoricalJobRequestData { @JsonIgnore public boolean unparsed = false; public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; - private RunThreatHuntingJobRequestAttributes attributes; + private RunHistoricalJobRequestAttributes attributes; public static final String JSON_PROPERTY_TYPE = "type"; - private RunThreatHuntingJobRequestDataType type; + private RunHistoricalJobRequestDataType type; - public RunThreatHuntingJobRequestData attributes( - RunThreatHuntingJobRequestAttributes attributes) { + public RunHistoricalJobRequestData attributes(RunHistoricalJobRequestAttributes attributes) { this.attributes = attributes; this.unparsed |= attributes.unparsed; return this; } /** - * Run a threat hunting job request. + * Run a historical job request. * * @return attributes */ @jakarta.annotation.Nullable @JsonProperty(JSON_PROPERTY_ATTRIBUTES) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public RunThreatHuntingJobRequestAttributes getAttributes() { + public RunHistoricalJobRequestAttributes getAttributes() { return attributes; } - public void setAttributes(RunThreatHuntingJobRequestAttributes attributes) { + public void setAttributes(RunHistoricalJobRequestAttributes attributes) { this.attributes = attributes; } - public RunThreatHuntingJobRequestData type(RunThreatHuntingJobRequestDataType type) { + public RunHistoricalJobRequestData type(RunHistoricalJobRequestDataType type) { this.type = type; this.unparsed |= !type.isValid(); return this; @@ -68,11 +67,11 @@ public RunThreatHuntingJobRequestData type(RunThreatHuntingJobRequestDataType ty @jakarta.annotation.Nullable @JsonProperty(JSON_PROPERTY_TYPE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public RunThreatHuntingJobRequestDataType getType() { + public RunHistoricalJobRequestDataType getType() { return type; } - public void setType(RunThreatHuntingJobRequestDataType type) { + public void setType(RunHistoricalJobRequestDataType type) { if (!type.isValid()) { this.unparsed = true; } @@ -91,10 +90,10 @@ public void setType(RunThreatHuntingJobRequestDataType type) { * * @param key The arbitrary key to set * @param value The associated value - * @return RunThreatHuntingJobRequestData + * @return RunHistoricalJobRequestData */ @JsonAnySetter - public RunThreatHuntingJobRequestData putAdditionalProperty(String key, Object value) { + public RunHistoricalJobRequestData putAdditionalProperty(String key, Object value) { if (this.additionalProperties == null) { this.additionalProperties = new HashMap(); } @@ -125,7 +124,7 @@ public Object getAdditionalProperty(String key) { return this.additionalProperties.get(key); } - /** Return true if this RunThreatHuntingJobRequestData object is equal to o. */ + /** Return true if this RunHistoricalJobRequestData object is equal to o. */ @Override public boolean equals(Object o) { if (this == o) { @@ -134,12 +133,11 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - RunThreatHuntingJobRequestData runThreatHuntingJobRequestData = - (RunThreatHuntingJobRequestData) o; - return Objects.equals(this.attributes, runThreatHuntingJobRequestData.attributes) - && Objects.equals(this.type, runThreatHuntingJobRequestData.type) + RunHistoricalJobRequestData runHistoricalJobRequestData = (RunHistoricalJobRequestData) o; + return Objects.equals(this.attributes, runHistoricalJobRequestData.attributes) + && Objects.equals(this.type, runHistoricalJobRequestData.type) && Objects.equals( - this.additionalProperties, runThreatHuntingJobRequestData.additionalProperties); + this.additionalProperties, runHistoricalJobRequestData.additionalProperties); } @Override @@ -150,7 +148,7 @@ public int hashCode() { @Override public String toString() { StringBuilder sb = new StringBuilder(); - sb.append("class RunThreatHuntingJobRequestData {\n"); + sb.append("class RunHistoricalJobRequestData {\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/RunThreatHuntingJobRequestDataType.java b/src/main/java/com/datadog/api/client/v2/model/RunHistoricalJobRequestDataType.java similarity index 55% rename from src/main/java/com/datadog/api/client/v2/model/RunThreatHuntingJobRequestDataType.java rename to src/main/java/com/datadog/api/client/v2/model/RunHistoricalJobRequestDataType.java index 61b53b7d493..f2d57771736 100644 --- a/src/main/java/com/datadog/api/client/v2/model/RunThreatHuntingJobRequestDataType.java +++ b/src/main/java/com/datadog/api/client/v2/model/RunHistoricalJobRequestDataType.java @@ -20,40 +20,39 @@ /** Type of data. */ @JsonSerialize( - using = RunThreatHuntingJobRequestDataType.RunThreatHuntingJobRequestDataTypeSerializer.class) -public class RunThreatHuntingJobRequestDataType extends ModelEnum { + using = RunHistoricalJobRequestDataType.RunHistoricalJobRequestDataTypeSerializer.class) +public class RunHistoricalJobRequestDataType extends ModelEnum { private static final Set allowedValues = new HashSet(Arrays.asList("historicalDetectionsJobCreate")); - public static final RunThreatHuntingJobRequestDataType HISTORICALDETECTIONSJOBCREATE = - new RunThreatHuntingJobRequestDataType("historicalDetectionsJobCreate"); + public static final RunHistoricalJobRequestDataType HISTORICALDETECTIONSJOBCREATE = + new RunHistoricalJobRequestDataType("historicalDetectionsJobCreate"); - RunThreatHuntingJobRequestDataType(String value) { + RunHistoricalJobRequestDataType(String value) { super(value, allowedValues); } - public static class RunThreatHuntingJobRequestDataTypeSerializer - extends StdSerializer { - public RunThreatHuntingJobRequestDataTypeSerializer( - Class t) { + public static class RunHistoricalJobRequestDataTypeSerializer + extends StdSerializer { + public RunHistoricalJobRequestDataTypeSerializer(Class t) { super(t); } - public RunThreatHuntingJobRequestDataTypeSerializer() { + public RunHistoricalJobRequestDataTypeSerializer() { this(null); } @Override public void serialize( - RunThreatHuntingJobRequestDataType value, JsonGenerator jgen, SerializerProvider provider) + RunHistoricalJobRequestDataType value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { jgen.writeObject(value.value); } } @JsonCreator - public static RunThreatHuntingJobRequestDataType fromValue(String value) { - return new RunThreatHuntingJobRequestDataType(value); + public static RunHistoricalJobRequestDataType fromValue(String value) { + return new RunHistoricalJobRequestDataType(value); } } 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 633b88ea1af..a87300297ae 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 @@ -2025-10-24T14:24:00.041Z \ No newline at end of file +2026-04-13T09:15:40.141Z \ 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 799a7486716..2f02af2ca25 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-threat-hunting/jobs/inva-lid/cancel", + "path": "/api/v2/siem-historical-detections/jobs/inva-lid/cancel", "keepAlive": false, "secure": true }, @@ -23,6 +23,6 @@ "timeToLive": { "unlimited": true }, - "id": "e4257625-4269-56fb-c2c7-16c61d098a68" + "id": "9ee0d12d-c2a7-6c2c-4cd5-598af0680035" } ] \ 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 213014e1d2d..5ffbfe4c377 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 @@ -2025-10-24T14:24:00.856Z \ No newline at end of file +2026-04-13T09:15:41.174Z \ 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 a7946976f1c..2ca4f73faee 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,7 +3,7 @@ "httpRequest": { "headers": {}, "method": "PATCH", - "path": "/api/v2/siem-threat-hunting/jobs/8e2a37fb-b0c8-4761-a7f0-0a8d6a98ba93/cancel", + "path": "/api/v2/siem-historical-detections/jobs/8e2a37fb-b0c8-4761-a7f0-0a8d6a98ba93/cancel", "keepAlive": false, "secure": true }, @@ -23,6 +23,6 @@ "timeToLive": { "unlimited": true }, - "id": "e39b14a9-77fa-d872-9562-37286fee579e" + "id": "699b2b92-566c-9d92-69d6-d218f57402f8" } ] \ 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 9b9326abb8c..be59fd60df7 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 @@ -2025-10-24T14:24:00.975Z \ No newline at end of file +2026-04-13T09:15:41.286Z \ 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 f5cf418e965..b2d3b56dbd7 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-threat-hunting/jobs", + "path": "/api/v2/siem-historical-detections/jobs", "keepAlive": false, "secure": true }, "httpResponse": { - "body": "{\"data\":{\"id\":\"cafe565c-106b-486e-ad21-a712656723b4\",\"type\":\"historicalDetectionsJob\"}}", + "body": "{\"data\":{\"id\":\"67278df4-84b8-4413-884b-88d9facdb68a\",\"type\":\"historicalDetectionsJob\"}}", "headers": { "Content-Type": [ "application/vnd.api+json" @@ -27,13 +27,13 @@ "timeToLive": { "unlimited": true }, - "id": "4c138fa0-d834-5972-8bd7-894a659525ae" + "id": "6bb82102-e994-f0d1-ee96-e1e3f1d80ffd" }, { "httpRequest": { "headers": {}, "method": "PATCH", - "path": "/api/v2/siem-threat-hunting/jobs/cafe565c-106b-486e-ad21-a712656723b4/cancel", + "path": "/api/v2/siem-historical-detections/jobs/67278df4-84b8-4413-884b-88d9facdb68a/cancel", "keepAlive": false, "secure": true }, @@ -48,6 +48,6 @@ "timeToLive": { "unlimited": true }, - "id": "260d5e64-4c21-4178-5468-0ac43b40d556" + "id": "f7ee4604-982a-dbca-72d6-b8ad43fcc8d7" } ] \ 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 ba1f583e595..b22ac5b07a2 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 @@ -2025-10-24T14:24:01.235Z \ No newline at end of file +2026-04-13T09:15:41.656Z \ 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 212d2be60c0..f61957ebe35 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-threat-hunting/jobs/signal_convert", + "path": "/api/v2/siem-historical-detections/jobs/signal_convert", "keepAlive": false, "secure": true }, @@ -27,6 +27,6 @@ "timeToLive": { "unlimited": true }, - "id": "547f0189-451a-1424-59cd-9f22ee5351f6" + "id": "0d4946af-2c85-586b-74dd-eb117a50a4a6" } ] \ 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 cf2f32dfa3e..3b7d74bd4b9 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 @@ -2025-10-24T14:24:01.339Z \ No newline at end of file +2026-04-13T09:15:41.819Z \ 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 21071dec50d..dda6415382a 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-threat-hunting/jobs/inva-lid", + "path": "/api/v2/siem-historical-detections/jobs/inva-lid", "keepAlive": false, "secure": true }, @@ -23,6 +23,6 @@ "timeToLive": { "unlimited": true }, - "id": "75c431a7-6ec2-040e-5a4c-0f15acc3ea11" + "id": "74a52942-ee00-2479-0dc5-b284709530a7" } ] \ 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 68a6b0aca24..7528bc4877d 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 @@ -2025-10-24T14:24:01.428Z \ No newline at end of file +2026-04-13T09:15:42.455Z \ 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 b1bb4fe53e6..2b3b66dc80d 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,7 +3,7 @@ "httpRequest": { "headers": {}, "method": "DELETE", - "path": "/api/v2/siem-threat-hunting/jobs/8e2a37fb-b0c8-4761-a7f0-0a8d6a98ba93", + "path": "/api/v2/siem-historical-detections/jobs/8e2a37fb-b0c8-4761-a7f0-0a8d6a98ba93", "keepAlive": false, "secure": true }, @@ -23,6 +23,6 @@ "timeToLive": { "unlimited": true }, - "id": "4d768dca-9f97-4e76-a412-a45a6abf3e26" + "id": "9e763f3f-ed9d-995a-c149-75ddbbeec6b1" } ] \ 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 fa7eb2eaf3b..f959b7469ab 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 @@ -2025-10-24T14:24:01.540Z \ No newline at end of file +2026-04-13T09:15:42.536Z \ 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 47cabc58dad..2f8d99c79ce 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-threat-hunting/jobs/inva-lid", + "path": "/api/v2/siem-historical-detections/jobs/inva-lid", "keepAlive": false, "secure": true }, @@ -23,6 +23,6 @@ "timeToLive": { "unlimited": true }, - "id": "97fa0f78-e4c0-2b54-7fb1-fd5e12937587" + "id": "b91d3d2f-868f-0795-c35b-288e8f822892" } ] \ 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 8b7389cc8ba..be224ded310 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 @@ -2025-10-24T14:24:01.618Z \ No newline at end of file +2026-04-13T09:15:42.599Z \ 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 d1a98242207..84ee65a4edb 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-threat-hunting/jobs/8e2a37fb-b0c8-4761-a7f0-0a8d6a98ba93", + "path": "/api/v2/siem-historical-detections/jobs/8e2a37fb-b0c8-4761-a7f0-0a8d6a98ba93", "keepAlive": false, "secure": true }, @@ -23,6 +23,6 @@ "timeToLive": { "unlimited": true }, - "id": "5374e38c-5542-5a83-f75d-7f135c065277" + "id": "30d26c2a-6439-71ca-9721-8f20041d2227" } ] \ 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 e81b70e9ab2..24ebe9b1927 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 @@ -2025-11-11T21:36:52.314Z \ No newline at end of file +2026-04-13T09:15:42.662Z \ 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 4b177525577..e1bd23989d9 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-threat-hunting/jobs", + "path": "/api/v2/siem-historical-detections/jobs", "keepAlive": false, "secure": true }, "httpResponse": { - "body": "{\"data\":{\"id\":\"66896986-212c-4e6c-9890-14e5cfd0fc19\",\"type\":\"historicalDetectionsJob\"}}", + "body": "{\"data\":{\"id\":\"876b8334-58f8-4b7d-8e62-0101cb019208\",\"type\":\"historicalDetectionsJob\"}}", "headers": { "Content-Type": [ "application/vnd.api+json" @@ -27,18 +27,18 @@ "timeToLive": { "unlimited": true }, - "id": "4c138fa0-d834-5972-8bd7-894a659525af" + "id": "6bb82102-e994-f0d1-ee96-e1e3f1d80fff" }, { "httpRequest": { "headers": {}, "method": "GET", - "path": "/api/v2/siem-threat-hunting/jobs/66896986-212c-4e6c-9890-14e5cfd0fc19", + "path": "/api/v2/siem-historical-detections/jobs/876b8334-58f8-4b7d-8e62-0101cb019208", "keepAlive": false, "secure": true }, "httpResponse": { - "body": "{\"data\":{\"id\":\"66896986-212c-4e6c-9890-14e5cfd0fc19\",\"type\":\"historicalDetectionsJob\",\"attributes\":{\"createdAt\":\"2025-11-11 21:36:52.581297+00\",\"createdByHandle\":\"frog@datadoghq.com\",\"createdByName\":\"frog\",\"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-11-11 21:36:52.581297+00\",\"signalOutput\":false}}}", + "body": "{\"data\":{\"id\":\"876b8334-58f8-4b7d-8e62-0101cb019208\",\"type\":\"historicalDetectionsJob\",\"attributes\":{\"createdAt\":\"2026-04-13 09:15:42.715435+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\":\"2026-04-13 09:15:42.715435+00\",\"signalOutput\":false}}}", "headers": { "Content-Type": [ "application/vnd.api+json" @@ -53,6 +53,6 @@ "timeToLive": { "unlimited": true }, - "id": "288fd23d-8d2d-2972-e670-accb59b90273" + "id": "8e624a47-7fe4-18ef-6d32-b48313dc1217" } ] \ 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 03072b1897d..b2e95384617 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,7 +7,7 @@ }, "headers": {}, "method": "POST", - "path": "/api/v2/siem-threat-hunting/jobs", + "path": "/api/v2/siem-historical-detections/jobs", "keepAlive": false, "secure": true }, @@ -33,7 +33,7 @@ "httpRequest": { "headers": {}, "method": "GET", - "path": "/api/v2/siem-threat-hunting/jobs", + "path": "/api/v2/siem-historical-detections/jobs", "queryStringParameters": { "filter[query]": [ "id:c3564eed-ff70-43e1-ab6f-593de95bd21f" 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 new file mode 100644 index 00000000000..69151c224c6 --- /dev/null +++ b/src/test/resources/cassettes/features/v2/Run_a_historical_job_returns_Bad_Request_response.freeze @@ -0,0 +1 @@ +2026-04-13T09:15:42.851Z \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Run_a_threat_hunting_job_returns_Bad_Request_response.json b/src/test/resources/cassettes/features/v2/Run_a_historical_job_returns_Bad_Request_response.json similarity index 92% rename from src/test/resources/cassettes/features/v2/Run_a_threat_hunting_job_returns_Bad_Request_response.json rename to src/test/resources/cassettes/features/v2/Run_a_historical_job_returns_Bad_Request_response.json index 208ed6cbff5..4b01ce56c3f 100644 --- a/src/test/resources/cassettes/features/v2/Run_a_threat_hunting_job_returns_Bad_Request_response.json +++ b/src/test/resources/cassettes/features/v2/Run_a_historical_job_returns_Bad_Request_response.json @@ -7,7 +7,7 @@ }, "headers": {}, "method": "POST", - "path": "/api/v2/siem-threat-hunting/jobs", + "path": "/api/v2/siem-historical-detections/jobs", "keepAlive": false, "secure": true }, @@ -27,6 +27,6 @@ "timeToLive": { "unlimited": true }, - "id": "8385b3da-78cd-f5dc-4258-fcc039b5013a" + "id": "d6c37d4c-15bf-d57c-afed-ccbe43952e41" } ] \ 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 new file mode 100644 index 00000000000..765e43e8664 --- /dev/null +++ b/src/test/resources/cassettes/features/v2/Run_a_historical_job_returns_Not_Found_response.freeze @@ -0,0 +1 @@ +2026-04-13T09:15:42.922Z \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Run_a_threat_hunting_job_returns_Not_Found_response.json b/src/test/resources/cassettes/features/v2/Run_a_historical_job_returns_Not_Found_response.json similarity index 87% rename from src/test/resources/cassettes/features/v2/Run_a_threat_hunting_job_returns_Not_Found_response.json rename to src/test/resources/cassettes/features/v2/Run_a_historical_job_returns_Not_Found_response.json index 6cd75887e42..86d5280c9a1 100644 --- a/src/test/resources/cassettes/features/v2/Run_a_threat_hunting_job_returns_Not_Found_response.json +++ b/src/test/resources/cassettes/features/v2/Run_a_historical_job_returns_Not_Found_response.json @@ -7,7 +7,7 @@ }, "headers": {}, "method": "POST", - "path": "/api/v2/siem-threat-hunting/jobs", + "path": "/api/v2/siem-historical-detections/jobs", "keepAlive": false, "secure": true }, @@ -27,6 +27,6 @@ "timeToLive": { "unlimited": true }, - "id": "ad287eca-8dea-a404-d9eb-bd2408021229" + "id": "6baefcd2-575a-7f9d-36bf-f35d836edcfc" } ] \ 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 new file mode 100644 index 00000000000..ee9c040c771 --- /dev/null +++ b/src/test/resources/cassettes/features/v2/Run_a_historical_job_returns_Status_created_response.freeze @@ -0,0 +1 @@ +2026-04-13T09:15:42.979Z \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Run_a_threat_hunting_job_returns_Status_created_response.json b/src/test/resources/cassettes/features/v2/Run_a_historical_job_returns_Status_created_response.json similarity index 83% rename from src/test/resources/cassettes/features/v2/Run_a_threat_hunting_job_returns_Status_created_response.json rename to src/test/resources/cassettes/features/v2/Run_a_historical_job_returns_Status_created_response.json index 20ea8f51018..916bccfa080 100644 --- a/src/test/resources/cassettes/features/v2/Run_a_threat_hunting_job_returns_Status_created_response.json +++ b/src/test/resources/cassettes/features/v2/Run_a_historical_job_returns_Status_created_response.json @@ -7,12 +7,12 @@ }, "headers": {}, "method": "POST", - "path": "/api/v2/siem-threat-hunting/jobs", + "path": "/api/v2/siem-historical-detections/jobs", "keepAlive": false, "secure": true }, "httpResponse": { - "body": "{\"data\":{\"id\":\"6ff7a8ce-a0d1-4ea3-8cc9-e9c52cda0d24\",\"type\":\"historicalDetectionsJob\"}}", + "body": "{\"data\":{\"id\":\"8ce2a4d4-db9e-445d-93bb-b60980d56d25\",\"type\":\"historicalDetectionsJob\"}}", "headers": { "Content-Type": [ "application/vnd.api+json" @@ -27,6 +27,6 @@ "timeToLive": { "unlimited": true }, - "id": "4c138fa0-d834-5972-8bd7-894a659525ad" + "id": "6bb82102-e994-f0d1-ee96-e1e3f1d80ffe" } ] \ 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 deleted file mode 100644 index 3776cfacfd8..00000000000 --- a/src/test/resources/cassettes/features/v2/Run_a_threat_hunting_job_returns_Bad_Request_response.freeze +++ /dev/null @@ -1 +0,0 @@ -2025-10-24T14:24:02.385Z \ 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 deleted file mode 100644 index 9cda11fb151..00000000000 --- a/src/test/resources/cassettes/features/v2/Run_a_threat_hunting_job_returns_Not_Found_response.freeze +++ /dev/null @@ -1 +0,0 @@ -2025-10-24T14:24:02.486Z \ 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 deleted file mode 100644 index f914d8b2412..00000000000 --- a/src/test/resources/cassettes/features/v2/Run_a_threat_hunting_job_returns_Status_created_response.freeze +++ /dev/null @@ -1 +0,0 @@ -2025-10-24T14:24:02.570Z \ 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 303db68e6b3..398dd925ca1 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 @@ -1375,10 +1375,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 \"threat_hunting_job\" in the system", - "key": "threat_hunting_job", + "step": "there is a valid \"historical_job\" in the system", + "key": "historical_job", "tag": "Security Monitoring", - "operationId": "RunThreatHuntingJob" + "operationId": "RunHistoricalJob" }, { "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 1da592aca20..f6c7f395425 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 @@ -153,62 +153,38 @@ Feature: Security Monitoring @team:DataDog/k9-cloud-siem Scenario: Cancel a historical job returns "Bad Request" response - Given operation "CancelThreatHuntingJob" enabled - And new "CancelThreatHuntingJob" request + Given operation "CancelHistoricalJob" enabled + And new "CancelHistoricalJob" 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-siem + 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-siem Scenario: Cancel a historical job returns "Not Found" response - Given operation "CancelThreatHuntingJob" enabled - And new "CancelThreatHuntingJob" request + Given operation "CancelHistoricalJob" enabled + And new "CancelHistoricalJob" 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-siem Scenario: Cancel a historical job returns "OK" response - 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" + 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" When the request is sent Then the response status is 204 No Content - @generated @skip @team:DataDog/k9-cloud-siem - 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-siem - 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-siem - 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-siem - 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-siem Scenario: Change the related incidents of a security signal returns "Bad Request" response Given new "EditSecurityMonitoringSignalIncidents" request @@ -889,32 +865,32 @@ Feature: Security Monitoring @team:DataDog/k9-cloud-siem Scenario: Delete an existing job returns "Bad Request" response - Given operation "DeleteThreatHuntingJob" enabled - And new "DeleteThreatHuntingJob" request + Given operation "DeleteHistoricalJob" enabled + And new "DeleteHistoricalJob" 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-siem Scenario: Delete an existing job returns "Conflict" response - Given operation "DeleteThreatHuntingJob" enabled - And new "DeleteThreatHuntingJob" request + Given operation "DeleteHistoricalJob" enabled + And new "DeleteHistoricalJob" 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-siem Scenario: Delete an existing job returns "Not Found" response - Given operation "DeleteThreatHuntingJob" enabled - And new "DeleteThreatHuntingJob" request + Given operation "DeleteHistoricalJob" enabled + And new "DeleteHistoricalJob" 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-siem Scenario: Delete an existing job returns "OK" response - Given operation "DeleteThreatHuntingJob" enabled - And new "DeleteThreatHuntingJob" request + Given operation "DeleteHistoricalJob" enabled + And new "DeleteHistoricalJob" request And request contains "job_id" parameter from "REPLACE.ME" When the request is sent Then the response status is 204 OK @@ -1123,27 +1099,27 @@ Feature: Security Monitoring @team:DataDog/k9-cloud-siem Scenario: Get a job's details returns "Bad Request" response - Given operation "GetThreatHuntingJob" enabled - And new "GetThreatHuntingJob" request + Given operation "GetHistoricalJob" enabled + And new "GetHistoricalJob" 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-siem Scenario: Get a job's details returns "Not Found" response - Given operation "GetThreatHuntingJob" enabled - And new "GetThreatHuntingJob" request + Given operation "GetHistoricalJob" enabled + And new "GetHistoricalJob" 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-siem Scenario: Get a job's details returns "OK" response - 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" + 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" When the request is sent Then the response status is 200 OK @@ -1663,13 +1639,17 @@ Feature: Security Monitoring When the request is sent Then the response status is 200 OK - @team:DataDog/k9-cloud-siem + @generated @skip @team:DataDog/k9-cloud-siem + 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 + + @generated @skip @team:DataDog/k9-cloud-siem Scenario: List historical jobs returns "OK" response - 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}}" + Given operation "ListHistoricalJobs" enabled + And new "ListHistoricalJobs" request When the request is sent Then the response status is 200 OK @@ -1762,20 +1742,6 @@ Feature: Security Monitoring And the response "meta.page" has field "after" And the response "links" has field "next" - @generated @skip @team:DataDog/k9-cloud-siem - 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-siem - 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/k9-cloud-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 @@ -1968,25 +1934,25 @@ Feature: Security Monitoring Then the response status is 200 OK @team:DataDog/k9-cloud-siem - Scenario: Run a threat hunting job returns "Bad Request" response - Given operation "RunThreatHuntingJob" enabled - And new "RunThreatHuntingJob" request + Scenario: Run a historical job returns "Bad Request" response + Given operation "RunHistoricalJob" enabled + And new "RunHistoricalJob" 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-siem - Scenario: Run a threat hunting job returns "Not Found" response - Given operation "RunThreatHuntingJob" enabled - And new "RunThreatHuntingJob" request + Scenario: Run a historical job returns "Not Found" response + Given operation "RunHistoricalJob" enabled + And new "RunHistoricalJob" 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-siem - Scenario: Run a threat hunting job returns "Status created" response - Given operation "RunThreatHuntingJob" enabled - And new "RunThreatHuntingJob" request + Scenario: Run a historical job returns "Status created" response + Given operation "RunHistoricalJob" enabled + And new "RunHistoricalJob" 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 f78cd823b2c..bbfa27e028c 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 @@ -5998,13 +5998,13 @@ "type": "safe" } }, - "ListThreatHuntingJobs": { + "ListHistoricalJobs": { "tag": "Security Monitoring", "undo": { "type": "safe" } }, - "RunThreatHuntingJob": { + "RunHistoricalJob": { "tag": "Security Monitoring", "undo": { "type": "idempotent" @@ -6016,19 +6016,19 @@ "type": "idempotent" } }, - "DeleteThreatHuntingJob": { + "DeleteHistoricalJob": { "tag": "Security Monitoring", "undo": { "type": "idempotent" } }, - "GetThreatHuntingJob": { + "GetHistoricalJob": { "tag": "Security Monitoring", "undo": { "type": "safe" } }, - "CancelThreatHuntingJob": { + "CancelHistoricalJob": { "tag": "Security Monitoring", "undo": { "type": "idempotent"