Skip to content

[security_monitoring] Make Historical Jobs endpoints public #2790

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .apigentools-info
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@
"spec_versions": {
"v1": {
"apigentools_version": "1.6.6",
"regenerated": "2025-04-04 20:19:28.929107",
"spec_repo_commit": "3909ab62"
"regenerated": "2025-04-06 16:06:37.559390",
"spec_repo_commit": "fe3756c4"
},
"v2": {
"apigentools_version": "1.6.6",
"regenerated": "2025-04-04 20:19:28.944541",
"spec_repo_commit": "3909ab62"
"regenerated": "2025-04-06 16:06:37.575416",
"spec_repo_commit": "fe3756c4"
}
}
}
18 changes: 0 additions & 18 deletions .generator/schemas/v2/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -50645,9 +50645,6 @@ paths:
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 historical job.
operationId: RunHistoricalJob
Expand Down Expand Up @@ -50687,9 +50684,6 @@ paths:
operator: OR
permissions:
- security_monitoring_rules_write
x-unstable: '**Note**: This endpoint is in beta and may be subject to changes.

Please check the documentation regularly for updates.'
/api/v2/siem-historical-detections/jobs/signal_convert:
post:
description: Convert a job result to a signal.
Expand Down Expand Up @@ -50721,9 +50715,6 @@ paths:
operator: OR
permissions:
- security_monitoring_signals_write
x-unstable: '**Note**: This endpoint is in beta and may be subject to changes.

Please check the documentation regularly for updates.'
/api/v2/siem-historical-detections/jobs/{job_id}:
delete:
description: Delete an existing job.
Expand Down Expand Up @@ -50752,9 +50743,6 @@ paths:
summary: Delete an existing job
tags:
- Security Monitoring
x-unstable: '**Note**: This endpoint is in beta and may be subject to changes.

Please check the documentation regularly for updates.'
get:
description: Get a job's details.
operationId: GetHistoricalJob
Expand Down Expand Up @@ -50787,9 +50775,6 @@ paths:
operator: OR
permissions:
- security_monitoring_rules_read
x-unstable: '**Note**: This endpoint is in beta and may be subject to changes.

Please check the documentation regularly for updates.'
/api/v2/siem-historical-detections/jobs/{job_id}/cancel:
patch:
description: Cancel a historical job.
Expand Down Expand Up @@ -50823,9 +50808,6 @@ paths:
operator: OR
permissions:
- security_monitoring_rules_write
x-unstable: '**Note**: This endpoint is in beta and may be subject to changes.

Please check the documentation regularly for updates.'
/api/v2/slo/report:
post:
description: 'Create a job to generate an SLO report. The report job is processed
Expand Down
2 changes: 0 additions & 2 deletions examples/v2/security-monitoring/CancelHistoricalJob.java
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = ApiClient.getDefaultApiClient();
defaultClient.setUnstableOperationEnabled("v2.cancelHistoricalJob", true);
defaultClient.setUnstableOperationEnabled("v2.runHistoricalJob", true);
SecurityMonitoringApi apiInstance = new SecurityMonitoringApi(defaultClient);

// there is a valid "historical_job" in the system
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = ApiClient.getDefaultApiClient();
defaultClient.setUnstableOperationEnabled("v2.convertJobResultToSignal", true);
SecurityMonitoringApi apiInstance = new SecurityMonitoringApi(defaultClient);

ConvertJobResultsToSignalsRequest body =
Expand Down
1 change: 0 additions & 1 deletion examples/v2/security-monitoring/DeleteHistoricalJob.java
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = ApiClient.getDefaultApiClient();
defaultClient.setUnstableOperationEnabled("v2.deleteHistoricalJob", true);
SecurityMonitoringApi apiInstance = new SecurityMonitoringApi(defaultClient);

try {
Expand Down
2 changes: 0 additions & 2 deletions examples/v2/security-monitoring/GetHistoricalJob.java
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = ApiClient.getDefaultApiClient();
defaultClient.setUnstableOperationEnabled("v2.getHistoricalJob", true);
defaultClient.setUnstableOperationEnabled("v2.runHistoricalJob", true);
SecurityMonitoringApi apiInstance = new SecurityMonitoringApi(defaultClient);

// there is a valid "historical_job" in the system
Expand Down
2 changes: 0 additions & 2 deletions examples/v2/security-monitoring/ListHistoricalJobs.java
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = ApiClient.getDefaultApiClient();
defaultClient.setUnstableOperationEnabled("v2.listHistoricalJobs", true);
defaultClient.setUnstableOperationEnabled("v2.runHistoricalJob", true);
SecurityMonitoringApi apiInstance = new SecurityMonitoringApi(defaultClient);

// there is a valid "historical_job" in the system
Expand Down
1 change: 0 additions & 1 deletion examples/v2/security-monitoring/RunHistoricalJob.java
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = ApiClient.getDefaultApiClient();
defaultClient.setUnstableOperationEnabled("v2.runHistoricalJob", true);
SecurityMonitoringApi apiInstance = new SecurityMonitoringApi(defaultClient);

RunHistoricalJobRequest body =
Expand Down
6 changes: 0 additions & 6 deletions src/main/java/com/datadog/api/client/ApiClient.java
Original file line number Diff line number Diff line change
Expand Up @@ -409,19 +409,13 @@ public class ApiClient {
put("v2.updateAWSAccount", false);
put("v2.listAWSLogsServices", false);
put("v2.getAggregatedConnections", false);
put("v2.cancelHistoricalJob", false);
put("v2.convertJobResultToSignal", false);
put("v2.deleteHistoricalJob", false);
put("v2.getFinding", false);
put("v2.getHistoricalJob", false);
put("v2.getRuleVersionHistory", false);
put("v2.getSBOM", false);
put("v2.listFindings", false);
put("v2.listHistoricalJobs", false);
put("v2.listVulnerabilities", false);
put("v2.listVulnerableAssets", false);
put("v2.muteFindings", false);
put("v2.runHistoricalJob", false);
put("v2.createScorecardOutcomesBatch", false);
put("v2.createScorecardRule", false);
put("v2.deleteScorecardRule", false);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -147,13 +147,6 @@ public CompletableFuture<Void> cancelHistoricalJobAsync(String jobId) {
* </table>
*/
public ApiResponse<Void> cancelHistoricalJobWithHttpInfo(String jobId) throws ApiException {
// Check if unstable operation is enabled
String operationId = "cancelHistoricalJob";
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
Expand Down Expand Up @@ -197,16 +190,6 @@ public ApiResponse<Void> cancelHistoricalJobWithHttpInfo(String jobId) throws Ap
* @return CompletableFuture&lt;ApiResponse&lt;Void&gt;&gt;
*/
public CompletableFuture<ApiResponse<Void>> cancelHistoricalJobWithHttpInfoAsync(String jobId) {
// Check if unstable operation is enabled
String operationId = "cancelHistoricalJob";
if (apiClient.isUnstableOperationEnabled("v2." + operationId)) {
apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId));
} else {
CompletableFuture<ApiResponse<Void>> 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
Expand Down Expand Up @@ -445,13 +428,6 @@ public CompletableFuture<Void> convertJobResultToSignalAsync(
*/
public ApiResponse<Void> convertJobResultToSignalWithHttpInfo(
ConvertJobResultsToSignalsRequest body) throws ApiException {
// Check if unstable operation is enabled
String operationId = "convertJobResultToSignal";
if (apiClient.isUnstableOperationEnabled("v2." + operationId)) {
apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId));
} else {
throw new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId));
}
Object localVarPostBody = body;

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

// verify the required parameter 'body' is set
Expand Down Expand Up @@ -1440,13 +1406,6 @@ public CompletableFuture<Void> deleteHistoricalJobAsync(String jobId) {
* </table>
*/
public ApiResponse<Void> 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
Expand Down Expand Up @@ -1490,16 +1449,6 @@ public ApiResponse<Void> deleteHistoricalJobWithHttpInfo(String jobId) throws Ap
* @return CompletableFuture&lt;ApiResponse&lt;Void&gt;&gt;
*/
public CompletableFuture<ApiResponse<Void>> 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<ApiResponse<Void>> 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
Expand Down Expand Up @@ -3010,13 +2959,6 @@ public CompletableFuture<HistoricalJobResponse> getHistoricalJobAsync(String job
*/
public ApiResponse<HistoricalJobResponse> getHistoricalJobWithHttpInfo(String jobId)
throws ApiException {
// Check if unstable operation is enabled
String operationId = "getHistoricalJob";
if (apiClient.isUnstableOperationEnabled("v2." + operationId)) {
apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId));
} else {
throw new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId));
}
Object localVarPostBody = null;

// verify the required parameter 'jobId' is set
Expand Down Expand Up @@ -3061,16 +3003,6 @@ public ApiResponse<HistoricalJobResponse> getHistoricalJobWithHttpInfo(String jo
*/
public CompletableFuture<ApiResponse<HistoricalJobResponse>> getHistoricalJobWithHttpInfoAsync(
String jobId) {
// Check if unstable operation is enabled
String operationId = "getHistoricalJob";
if (apiClient.isUnstableOperationEnabled("v2." + operationId)) {
apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId));
} else {
CompletableFuture<ApiResponse<HistoricalJobResponse>> 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
Expand Down Expand Up @@ -5289,13 +5221,6 @@ public CompletableFuture<ListHistoricalJobsResponse> listHistoricalJobsAsync(
*/
public ApiResponse<ListHistoricalJobsResponse> 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;
Expand Down Expand Up @@ -5342,16 +5267,6 @@ public ApiResponse<ListHistoricalJobsResponse> listHistoricalJobsWithHttpInfo(
*/
public CompletableFuture<ApiResponse<ListHistoricalJobsResponse>>
listHistoricalJobsWithHttpInfoAsync(ListHistoricalJobsOptionalParameters parameters) {
// 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 {
CompletableFuture<ApiResponse<ListHistoricalJobsResponse>> 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;
Expand Down Expand Up @@ -8227,13 +8142,6 @@ public CompletableFuture<JobCreateResponse> runHistoricalJobAsync(RunHistoricalJ
*/
public ApiResponse<JobCreateResponse> runHistoricalJobWithHttpInfo(RunHistoricalJobRequest body)
throws ApiException {
// Check if unstable operation is enabled
String operationId = "runHistoricalJob";
if (apiClient.isUnstableOperationEnabled("v2." + operationId)) {
apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId));
} else {
throw new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId));
}
Object localVarPostBody = body;

// verify the required parameter 'body' is set
Expand Down Expand Up @@ -8276,16 +8184,6 @@ public ApiResponse<JobCreateResponse> runHistoricalJobWithHttpInfo(RunHistorical
*/
public CompletableFuture<ApiResponse<JobCreateResponse>> runHistoricalJobWithHttpInfoAsync(
RunHistoricalJobRequest body) {
// Check if unstable operation is enabled
String operationId = "runHistoricalJob";
if (apiClient.isUnstableOperationEnabled("v2." + operationId)) {
apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId));
} else {
CompletableFuture<ApiResponse<JobCreateResponse>> result = new CompletableFuture<>();
result.completeExceptionally(
new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId)));
return result;
}
Object localVarPostBody = body;

// verify the required parameter 'body' is set
Expand Down
Loading
Loading