Skip to content

Remove caseIndex from historical jobs API spec #2360

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-06-13 13:39:04.008694",
"spec_repo_commit": "9757e1ea"
"regenerated": "2025-06-13 20:50:54.558539",
"spec_repo_commit": "7fe71d9f"
},
"v2": {
"apigentools_version": "1.6.6",
"regenerated": "2025-06-13 13:39:04.025215",
"spec_repo_commit": "9757e1ea"
"regenerated": "2025-06-13 20:50:54.575411",
"spec_repo_commit": "7fe71d9f"
}
}
}
7 changes: 0 additions & 7 deletions .generator/schemas/v2/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19273,12 +19273,6 @@ components:
JobDefinitionFromRule:
description: Definition of a historical job based on a security monitoring rule.
properties:
caseIndex:
description: Index of the rule case applied by the job.
example: 0
format: int32
maximum: 9
type: integer
from:
description: Starting time of data analyzed by the job.
example: 1729843470000
Expand Down Expand Up @@ -19309,7 +19303,6 @@ components:
- from
- to
- index
- caseIndex
type: object
KindAttributes:
description: Kind attributes.
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1 @@
"2024-11-08T09:54:40.192Z"
"2025-06-12T14:01:05.945Z"
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@
},
"entries": [
{
"_id": "8056350d00d9df6e525e771fe22b1354",
"_id": "6baefcd2575a7f9d36bff35d836edcfc",
"_order": 0,
"cache": {},
"request": {
"bodySize": 184,
"bodySize": 170,
"cookies": [],
"headers": [
{
Expand All @@ -26,23 +26,23 @@
"value": "application/json"
}
],
"headersSize": 581,
"headersSize": 582,
"httpVersion": "HTTP/1.1",
"method": "POST",
"postData": {
"mimeType": "application/json",
"params": [],
"text": "{\"data\":{\"attributes\":{\"fromRule\":{\"caseIndex\":0,\"from\":1730201035064,\"id\":\"non-existng\",\"index\":\"main\",\"notifications\":[],\"to\":1730204635115}},\"type\":\"historicalDetectionsJobCreate\"}}"
"text": "{\"data\":{\"attributes\":{\"fromRule\":{\"from\":1730201035064,\"id\":\"non-existng\",\"index\":\"main\",\"notifications\":[],\"to\":1730204635115}},\"type\":\"historicalDetectionsJobCreate\"}}"
},
"queryString": [],
"url": "https://api.datadoghq.com/api/v2/siem-historical-detections/jobs"
},
"response": {
"bodySize": 67,
"bodySize": 49,
"content": {
"mimeType": "application/vnd.api+json",
"size": 67,
"text": "{\"errors\":[{\"status\":\"404\",\"detail\":\"failed to get rule details\"}]}"
"size": 49,
"text": "{\"errors\":[{\"status\":\"404\",\"title\":\"Not Found\"}]}"
},
"cookies": [],
"headers": [
Expand All @@ -57,8 +57,8 @@
"status": 404,
"statusText": "Not Found"
},
"startedDateTime": "2024-11-08T09:54:40.194Z",
"time": 73
"startedDateTime": "2025-06-12T14:01:06.563Z",
"time": 328
}
],
"pages": [],
Expand Down
2 changes: 1 addition & 1 deletion features/v2/security_monitoring.feature
Original file line number Diff line number Diff line change
Expand Up @@ -1095,7 +1095,7 @@ Feature: Security Monitoring
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": {"caseIndex": 0, "from": 1730201035064, "id": "non-existng", "index": "main", "notifications": [], "to": 1730204635115}}}}
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

Expand Down
10 changes: 0 additions & 10 deletions packages/datadog-api-client-v2/models/JobDefinitionFromRule.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,6 @@ import { AttributeTypeMap } from "../../datadog-api-client-common/util";
* Definition of a historical job based on a security monitoring rule.
*/
export class JobDefinitionFromRule {
/**
* Index of the rule case applied by the job.
*/
"caseIndex": number;
/**
* Starting time of data analyzed by the job.
*/
Expand Down Expand Up @@ -51,12 +47,6 @@ export class JobDefinitionFromRule {
* @ignore
*/
static readonly attributeTypeMap: AttributeTypeMap = {
caseIndex: {
baseName: "caseIndex",
type: "number",
required: true,
format: "int32",
},
from: {
baseName: "from",
type: "number",
Expand Down