Skip to content

security_monitoring - Make Rule History endpoint public #2492

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-17 13:26:11.571880",
"spec_repo_commit": "12ab5180"
"regenerated": "2025-04-18 16:37:11.871236",
"spec_repo_commit": "8ff9b6bd"
},
"v2": {
"apigentools_version": "1.6.6",
"regenerated": "2025-04-17 13:26:11.587151",
"spec_repo_commit": "12ab5180"
"regenerated": "2025-04-18 16:37:11.886494",
"spec_repo_commit": "8ff9b6bd"
}
}
}
1 change: 0 additions & 1 deletion .generator/schemas/v2/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -52698,7 +52698,6 @@ paths:
operator: OR
permissions:
- security_monitoring_rules_read
x-unstable: '**Note**: This endpoint is in beta and may be subject to changes.'
/api/v2/security_monitoring/signals:
get:
description: 'The list endpoint returns security signals that match a search
Expand Down
1 change: 0 additions & 1 deletion examples/v2/security-monitoring/GetRuleVersionHistory.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
from datadog_api_client.v2.api.security_monitoring_api import SecurityMonitoringApi

configuration = Configuration()
configuration.unstable_operations["get_rule_version_history"] = True
with ApiClient(configuration) as api_client:
api_instance = SecurityMonitoringApi(api_client)
response = api_instance.get_rule_version_history(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
SECURITY_RULE_ID = environ["SECURITY_RULE_ID"]

configuration = Configuration()
configuration.unstable_operations["get_rule_version_history"] = True
with ApiClient(configuration) as api_client:
api_instance = SecurityMonitoringApi(api_client)
response = api_instance.get_rule_version_history(
Expand Down
1 change: 0 additions & 1 deletion src/datadog_api_client/configuration.py
Original file line number Diff line number Diff line change
Expand Up @@ -288,7 +288,6 @@ def __init__(
"v2.delete_historical_job": False,
"v2.get_finding": False,
"v2.get_historical_job": False,
"v2.get_rule_version_history": False,
"v2.get_sbom": False,
"v2.list_findings": False,
"v2.list_historical_jobs": False,
Expand Down
4 changes: 2 additions & 2 deletions tests/v2/features/on-call.feature
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ Feature: On-Call
When the request is sent
Then the response status is 400 Bad Request

@team:DataDog/bugle
@skip-python @team:DataDog/bugle
Scenario: Create on-call schedule returns "Created" response
Given new "CreateOnCallSchedule" request
And there is a valid "user" in the system
Expand Down Expand Up @@ -159,7 +159,7 @@ Feature: On-Call
When the request is sent
Then the response status is 404 Not Found

@team:DataDog/bugle
@skip-python @team:DataDog/bugle
Scenario: Update on-call schedule returns "OK" response
Given new "UpdateOnCallSchedule" request
And there is a valid "schedule" in the system
Expand Down
12 changes: 4 additions & 8 deletions tests/v2/features/security_monitoring.feature
Original file line number Diff line number Diff line change
Expand Up @@ -604,24 +604,21 @@ Feature: Security Monitoring

@generated @skip @team:DataDog/k9-cloud-security-platform
Scenario: Get a rule's version history returns "Bad Request" response
Given operation "GetRuleVersionHistory" enabled
And new "GetRuleVersionHistory" request
Given new "GetRuleVersionHistory" request
And request contains "rule_id" parameter from "REPLACE.ME"
When the request is sent
Then the response status is 400 Bad Request

@generated @skip @team:DataDog/k9-cloud-security-platform
Scenario: Get a rule's version history returns "Not Found" response
Given operation "GetRuleVersionHistory" enabled
And new "GetRuleVersionHistory" request
Given new "GetRuleVersionHistory" request
And request contains "rule_id" parameter from "REPLACE.ME"
When the request is sent
Then the response status is 404 Not Found

@generated @skip @team:DataDog/k9-cloud-security-platform
Scenario: Get a rule's version history returns "OK" response
Given operation "GetRuleVersionHistory" enabled
And new "GetRuleVersionHistory" request
Given new "GetRuleVersionHistory" request
And request contains "rule_id" parameter from "REPLACE.ME"
When the request is sent
Then the response status is 200 OK
Expand Down Expand Up @@ -737,8 +734,7 @@ Feature: Security Monitoring

@skip-go @skip-java @skip-ruby @team:DataDog/k9-cloud-security-platform
Scenario: Get rule version history returns "OK" response
Given operation "GetRuleVersionHistory" enabled
And new "GetRuleVersionHistory" request
Given new "GetRuleVersionHistory" request
And there is a valid "security_rule" in the system
And request contains "rule_id" parameter from "security_rule.id"
When the request is sent
Expand Down