Skip to content

Commit 90698dd

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit 991be1b of spec repo
1 parent fa8d9ba commit 90698dd

9 files changed

Lines changed: 354 additions & 4 deletions

File tree

.generator/schemas/v2/openapi.yaml

Lines changed: 105 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30860,9 +30860,10 @@ components:
3086030860
additionalProperties: {}
3086130861
description: The set of attributes recorded for the entity at this revision. The keys depend on the kind of entity.
3086230862
example:
30863+
accounts:
30864+
- linked-account-123
3086330865
display_name: Test User
30864-
emails:
30865-
- user@example.com
30866+
email: user@example.com
3086630867
principal_id: user@example.com
3086730868
type: object
3086830869
EntityData:
@@ -86480,6 +86481,14 @@ components:
8648086481
type: string
8648186482
x-enum-varnames:
8648286483
- AGGREGATED_DNS
86484+
SingleEntityContextResponse:
86485+
description: Response from the single entity context endpoint, containing the matching entity.
86486+
properties:
86487+
data:
86488+
$ref: "#/components/schemas/EntityContextEntity"
86489+
required:
86490+
- data
86491+
type: object
8648386492
SlackIntegrationMetadata:
8648486493
description: Incident integration metadata for the Slack integration.
8648586494
properties:
@@ -162276,9 +162285,10 @@ paths:
162276162285
- attributes:
162277162286
revisions:
162278162287
- attributes:
162288+
accounts:
162289+
- linked-account-123
162279162290
display_name: Test User
162280-
emails:
162281-
- user@example.com
162291+
email: user@example.com
162282162292
principal_id: user@example.com
162283162293
first_seen_at: "2026-04-01T00:00:00Z"
162284162294
last_seen_at: "2026-05-01T00:00:00Z"
@@ -162311,6 +162321,97 @@ paths:
162311162321
x-unstable: |-
162312162322
**Note**: This endpoint is in preview and is subject to change.
162313162323
If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).
162324+
/api/v2/security_monitoring/entity_context/{id}:
162325+
get:
162326+
description: |-
162327+
Get a single entity from the Cloud SIEM entity context store by its identifier, returning the historical
162328+
revisions of the entity in the requested time range. The endpoint can either return revisions across an
162329+
interval (`from` / `to`) or the snapshot of the entity at a single point in time (`as_of`); the two modes
162330+
are mutually exclusive.
162331+
operationId: GetSingleEntityContext
162332+
parameters:
162333+
- description: The unique identifier of the entity to retrieve.
162334+
in: path
162335+
name: id
162336+
required: true
162337+
schema:
162338+
example: user@example.com
162339+
type: string
162340+
- description: |-
162341+
The start of the time range to query, as an RFC3339 timestamp or a relative time (for example, `now-7d`).
162342+
Defaults to `now-7d`. Ignored when `as_of` is set.
162343+
in: query
162344+
name: from
162345+
required: false
162346+
schema:
162347+
default: now-7d
162348+
example: now-7d
162349+
type: string
162350+
- description: |-
162351+
The end of the time range to query, as an RFC3339 timestamp or a relative time (for example, `now`).
162352+
Defaults to `now`. Ignored when `as_of` is set.
162353+
in: query
162354+
name: to
162355+
required: false
162356+
schema:
162357+
default: now
162358+
example: now
162359+
type: string
162360+
- description: |-
162361+
A point in time at which to query the entity revisions, as an RFC3339 timestamp, a Unix timestamp
162362+
(in seconds), or a relative time (for example, `now-1d`). When set, `from` and `to` are ignored.
162363+
Cannot be combined with custom `from` / `to` values.
162364+
example: now-1d
162365+
in: query
162366+
name: as_of
162367+
required: false
162368+
schema:
162369+
type: string
162370+
responses:
162371+
"200":
162372+
content:
162373+
application/json:
162374+
examples:
162375+
default:
162376+
value:
162377+
data:
162378+
attributes:
162379+
revisions:
162380+
- attributes:
162381+
accounts:
162382+
- linked-account-123
162383+
display_name: Test User
162384+
email: user@example.com
162385+
principal_id: user@example.com
162386+
first_seen_at: "2026-04-01T00:00:00Z"
162387+
last_seen_at: "2026-05-01T00:00:00Z"
162388+
id: user@example.com
162389+
type: siem_entity_identity
162390+
schema:
162391+
$ref: "#/components/schemas/SingleEntityContextResponse"
162392+
description: OK
162393+
"400":
162394+
$ref: "#/components/responses/BadRequestResponse"
162395+
"403":
162396+
$ref: "#/components/responses/NotAuthorizedResponse"
162397+
"404":
162398+
$ref: "#/components/responses/NotFoundResponse"
162399+
"429":
162400+
$ref: "#/components/responses/TooManyRequestsResponse"
162401+
security:
162402+
- apiKeyAuth: []
162403+
appKeyAuth: []
162404+
- AuthZ:
162405+
- siem_entities_read
162406+
summary: Get a single entity context
162407+
tags: ["Security Monitoring"]
162408+
x-permission:
162409+
operator: OR
162410+
permissions:
162411+
- siem_entities_read
162412+
x-unstable: |-
162413+
**Note**: This endpoint is in preview and is subject to change.
162414+
If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).
162314162415
/api/v2/security_monitoring/rules:
162315162416
get:
162316162417
description: List rules.
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# Get a single entity context returns "OK" response
2+
3+
require "datadog_api_client"
4+
DatadogAPIClient.configure do |config|
5+
config.unstable_operations["v2.get_single_entity_context".to_sym] = true
6+
end
7+
api_instance = DatadogAPIClient::V2::SecurityMonitoringAPI.new
8+
p api_instance.get_single_entity_context("user@example.com")

features/scenarios_model_mapping.rb

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2314,6 +2314,12 @@
23142314
"limit" => "Integer",
23152315
"page_token" => "String",
23162316
},
2317+
"v2.GetSingleEntityContext" => {
2318+
"id" => "String",
2319+
"from" => "String",
2320+
"to" => "String",
2321+
"as_of" => "String",
2322+
},
23172323
"v2.ListSecurityMonitoringRules" => {
23182324
"page_size" => "Integer",
23192325
"page_number" => "Integer",

features/v2/security_monitoring.feature

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1608,6 +1608,30 @@ Feature: Security Monitoring
16081608
When the request is sent
16091609
Then the response status is 200 OK
16101610

1611+
@generated @skip @team:DataDog/k9-cloud-siem
1612+
Scenario: Get a single entity context returns "Bad Request" response
1613+
Given operation "GetSingleEntityContext" enabled
1614+
And new "GetSingleEntityContext" request
1615+
And request contains "id" parameter from "REPLACE.ME"
1616+
When the request is sent
1617+
Then the response status is 400 Bad Request
1618+
1619+
@generated @skip @team:DataDog/k9-cloud-siem
1620+
Scenario: Get a single entity context returns "Not Found" response
1621+
Given operation "GetSingleEntityContext" enabled
1622+
And new "GetSingleEntityContext" request
1623+
And request contains "id" parameter from "REPLACE.ME"
1624+
When the request is sent
1625+
Then the response status is 404 Not Found
1626+
1627+
@generated @skip @team:DataDog/k9-cloud-siem
1628+
Scenario: Get a single entity context returns "OK" response
1629+
Given operation "GetSingleEntityContext" enabled
1630+
And new "GetSingleEntityContext" request
1631+
And request contains "id" parameter from "REPLACE.ME"
1632+
When the request is sent
1633+
Then the response status is 200 OK
1634+
16111635
@skip-validation @team:DataDog/k9-cloud-siem
16121636
Scenario: Get a suppression rule returns "Not Found" response
16131637
Given new "GetSecurityMonitoringSuppression" request

features/v2/undo.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7030,6 +7030,12 @@
70307030
"type": "safe"
70317031
}
70327032
},
7033+
"GetSingleEntityContext": {
7034+
"tag": "Security Monitoring",
7035+
"undo": {
7036+
"type": "safe"
7037+
}
7038+
},
70337039
"ListSecurityMonitoringRules": {
70347040
"tag": "Security Monitoring",
70357041
"undo": {

lib/datadog_api_client/configuration.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -362,6 +362,7 @@ def initialize
362362
"v2.get_security_monitoring_histsignals_by_job_id": false,
363363
"v2.get_security_monitoring_integration_config": false,
364364
"v2.get_signal_entities": false,
365+
"v2.get_single_entity_context": false,
365366
"v2.get_static_analysis_default_rulesets": false,
366367
"v2.get_static_analysis_node_types": false,
367368
"v2.get_static_analysis_ruleset": false,

lib/datadog_api_client/inflector.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6430,6 +6430,7 @@ def overrides
64306430
"v2.single_aggregated_dns_response_data_attributes_group_by_items" => "SingleAggregatedDnsResponseDataAttributesGroupByItems",
64316431
"v2.single_aggregated_dns_response_data_attributes_metrics_items" => "SingleAggregatedDnsResponseDataAttributesMetricsItems",
64326432
"v2.single_aggregated_dns_response_data_type" => "SingleAggregatedDnsResponseDataType",
6433+
"v2.single_entity_context_response" => "SingleEntityContextResponse",
64336434
"v2.slack_integration_metadata" => "SlackIntegrationMetadata",
64346435
"v2.slack_integration_metadata_channel_item" => "SlackIntegrationMetadataChannelItem",
64356436
"v2.slack_trigger_wrapper" => "SlackTriggerWrapper",

lib/datadog_api_client/v2/api/security_monitoring_api.rb

Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5494,6 +5494,86 @@ def get_signal_notification_rules_with_http_info(opts = {})
54945494
return data, status_code, headers
54955495
end
54965496

5497+
# Get a single entity context.
5498+
#
5499+
# @see #get_single_entity_context_with_http_info
5500+
def get_single_entity_context(id, opts = {})
5501+
data, _status_code, _headers = get_single_entity_context_with_http_info(id, opts)
5502+
data
5503+
end
5504+
5505+
# Get a single entity context.
5506+
#
5507+
# Get a single entity from the Cloud SIEM entity context store by its identifier, returning the historical
5508+
# revisions of the entity in the requested time range. The endpoint can either return revisions across an
5509+
# interval (`from` / `to`) or the snapshot of the entity at a single point in time (`as_of`); the two modes
5510+
# are mutually exclusive.
5511+
#
5512+
# @param id [String] The unique identifier of the entity to retrieve.
5513+
# @param opts [Hash] the optional parameters
5514+
# @option opts [String] :from The start of the time range to query, as an RFC3339 timestamp or a relative time (for example, `now-7d`). Defaults to `now-7d`. Ignored when `as_of` is set.
5515+
# @option opts [String] :to The end of the time range to query, as an RFC3339 timestamp or a relative time (for example, `now`). Defaults to `now`. Ignored when `as_of` is set.
5516+
# @option opts [String] :as_of A point in time at which to query the entity revisions, as an RFC3339 timestamp, a Unix timestamp (in seconds), or a relative time (for example, `now-1d`). When set, `from` and `to` are ignored. Cannot be combined with custom `from` / `to` values.
5517+
# @return [Array<(SingleEntityContextResponse, Integer, Hash)>] SingleEntityContextResponse data, response status code and response headers
5518+
def get_single_entity_context_with_http_info(id, opts = {})
5519+
unstable_enabled = @api_client.config.unstable_operations["v2.get_single_entity_context".to_sym]
5520+
if unstable_enabled
5521+
@api_client.config.logger.warn format("Using unstable operation '%s'", "v2.get_single_entity_context")
5522+
else
5523+
raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.get_single_entity_context"))
5524+
end
5525+
5526+
if @api_client.config.debugging
5527+
@api_client.config.logger.debug 'Calling API: SecurityMonitoringAPI.get_single_entity_context ...'
5528+
end
5529+
# verify the required parameter 'id' is set
5530+
if @api_client.config.client_side_validation && id.nil?
5531+
fail ArgumentError, "Missing the required parameter 'id' when calling SecurityMonitoringAPI.get_single_entity_context"
5532+
end
5533+
# resource path
5534+
local_var_path = '/api/v2/security_monitoring/entity_context/{id}'.sub('{id}', CGI.escape(id.to_s).gsub('%2F', '/'))
5535+
5536+
# query parameters
5537+
query_params = opts[:query_params] || {}
5538+
query_params[:'from'] = opts[:'from'] if !opts[:'from'].nil?
5539+
query_params[:'to'] = opts[:'to'] if !opts[:'to'].nil?
5540+
query_params[:'as_of'] = opts[:'as_of'] if !opts[:'as_of'].nil?
5541+
5542+
# header parameters
5543+
header_params = opts[:header_params] || {}
5544+
# HTTP header 'Accept' (if needed)
5545+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
5546+
5547+
# form parameters
5548+
form_params = opts[:form_params] || {}
5549+
5550+
# http body (model)
5551+
post_body = opts[:debug_body]
5552+
5553+
# return_type
5554+
return_type = opts[:debug_return_type] || 'SingleEntityContextResponse'
5555+
5556+
# auth_names
5557+
auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ]
5558+
5559+
new_options = opts.merge(
5560+
:operation => :get_single_entity_context,
5561+
:header_params => header_params,
5562+
:query_params => query_params,
5563+
:form_params => form_params,
5564+
:body => post_body,
5565+
:auth_names => auth_names,
5566+
:return_type => return_type,
5567+
:api_version => "V2"
5568+
)
5569+
5570+
data, status_code, headers = @api_client.call_api(Net::HTTP::Get, local_var_path, new_options)
5571+
if @api_client.config.debugging
5572+
@api_client.config.logger.debug "API called: SecurityMonitoringAPI#get_single_entity_context\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
5573+
end
5574+
return data, status_code, headers
5575+
end
5576+
54975577
# Get default rulesets for a language.
54985578
#
54995579
# @see #get_static_analysis_default_rulesets_with_http_info

0 commit comments

Comments
 (0)