@@ -41709,6 +41709,16 @@ components:
4170941709 format: date-time
4171041710 readOnly: true
4171141711 type: string
41712+ last_modifier_email:
41713+ description: Email of the user who last modified this restriction query.
41714+ example: user@example.com
41715+ readOnly: true
41716+ type: string
41717+ last_modifier_name:
41718+ description: Name of the user who last modified this restriction query.
41719+ example: John Doe
41720+ readOnly: true
41721+ type: string
4171241722 modified_at:
4171341723 description: Time of last restriction query modification.
4171441724 example: '2020-03-17T21:15:15.000Z'
@@ -41720,6 +41730,18 @@ components:
4172041730 the query can be returned.
4172141731 example: env:sandbox
4172241732 type: string
41733+ role_count:
41734+ description: Number of roles associated with this restriction query.
41735+ example: 3
41736+ format: int64
41737+ readOnly: true
41738+ type: integer
41739+ user_count:
41740+ description: Number of users associated with this restriction query.
41741+ example: 5
41742+ format: int64
41743+ readOnly: true
41744+ type: integer
4172341745 type: object
4172441746 RestrictionQueryCreateAttributes:
4172541747 description: Attributes of the created restriction query.
@@ -41728,6 +41750,8 @@ components:
4172841750 description: The restriction query.
4172941751 example: env:sandbox
4173041752 type: string
41753+ required:
41754+ - restriction_query
4173141755 type: object
4173241756 RestrictionQueryCreateData:
4173341757 description: Data related to the creation of a restriction query.
@@ -41752,18 +41776,8 @@ components:
4175241776 $ref: '#/components/schemas/RestrictionQueryWithoutRelationships'
4175341777 type: array
4175441778 type: object
41755- RestrictionQueryRelationships:
41756- description: Relationships of the restriction query object.
41757- properties:
41758- roles:
41759- $ref: '#/components/schemas/RelationshipToRoles'
41760- type: object
4176141779 RestrictionQueryResponseIncludedItem:
4176241780 description: An object related to a restriction query.
41763- discriminator:
41764- mapping:
41765- roles: '#/components/schemas/RestrictionQueryRole'
41766- propertyName: type
4176741781 oneOf:
4176841782 - $ref: '#/components/schemas/RestrictionQueryRole'
4176941783 RestrictionQueryRole:
@@ -41776,11 +41790,11 @@ components:
4177641790 example: <ROLE_ID>
4177741791 type: string
4177841792 type:
41779- default: roles
41780- description: Role resource type.
41781- example: roles
41782- readOnly: true
41783- type: string
41793+ $ref: '#/components/schemas/RolesType'
41794+ required:
41795+ - type
41796+ - id
41797+ - attributes
4178441798 type: object
4178541799 RestrictionQueryRoleAttribute:
4178641800 description: Attributes of the role for a restriction query.
@@ -41807,6 +41821,8 @@ components:
4180741821 description: The restriction query.
4180841822 example: env:sandbox
4180941823 type: string
41824+ required:
41825+ - restriction_query
4181041826 type: object
4181141827 RestrictionQueryUpdateData:
4181241828 description: Data related to the update of a restriction query.
@@ -41832,7 +41848,7 @@ components:
4183241848 example: 79a0e60a-644a-11ea-ad29-43329f7f58b5
4183341849 type: string
4183441850 relationships:
41835- $ref: '#/components/schemas/RestrictionQueryRelationships '
41851+ $ref: '#/components/schemas/UserRelationships '
4183641852 type:
4183741853 $ref: '#/components/schemas/LogsRestrictionQueriesType'
4183841854 type: object
@@ -70095,6 +70111,12 @@ paths:
7009570111 schema:
7009670112 $ref: '#/components/schemas/APIErrorResponse'
7009770113 description: Authentication error
70114+ '404':
70115+ content:
70116+ application/json:
70117+ schema:
70118+ $ref: '#/components/schemas/APIErrorResponse'
70119+ description: Not found
7009870120 '429':
7009970121 $ref: '#/components/responses/TooManyRequestsResponse'
7010070122 summary: Get restriction query for a given role
@@ -70133,6 +70155,12 @@ paths:
7013370155 schema:
7013470156 $ref: '#/components/schemas/APIErrorResponse'
7013570157 description: Authentication error
70158+ '404':
70159+ content:
70160+ application/json:
70161+ schema:
70162+ $ref: '#/components/schemas/APIErrorResponse'
70163+ description: Not found
7013670164 '429':
7013770165 $ref: '#/components/responses/TooManyRequestsResponse'
7013870166 summary: Get all restriction queries for a given user
@@ -70282,6 +70310,56 @@ paths:
7028270310 x-unstable: '**Note**: This endpoint is in public beta.
7028370311
7028470312 If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).'
70313+ put:
70314+ description: Replace a restriction query.
70315+ operationId: ReplaceRestrictionQuery
70316+ parameters:
70317+ - $ref: '#/components/parameters/RestrictionQueryID'
70318+ requestBody:
70319+ content:
70320+ application/json:
70321+ schema:
70322+ $ref: '#/components/schemas/RestrictionQueryUpdatePayload'
70323+ required: true
70324+ responses:
70325+ '200':
70326+ content:
70327+ application/json:
70328+ schema:
70329+ $ref: '#/components/schemas/RestrictionQueryWithoutRelationshipsResponse'
70330+ description: OK
70331+ '400':
70332+ content:
70333+ application/json:
70334+ schema:
70335+ $ref: '#/components/schemas/APIErrorResponse'
70336+ description: Bad Request
70337+ '403':
70338+ content:
70339+ application/json:
70340+ schema:
70341+ $ref: '#/components/schemas/APIErrorResponse'
70342+ description: Authentication error
70343+ '404':
70344+ content:
70345+ application/json:
70346+ schema:
70347+ $ref: '#/components/schemas/APIErrorResponse'
70348+ description: Not found
70349+ '429':
70350+ $ref: '#/components/responses/TooManyRequestsResponse'
70351+ summary: Replace a restriction query
70352+ tags:
70353+ - Logs Restriction Queries
70354+ x-codegen-request-body-name: body
70355+ x-menu-order: 4.5
70356+ x-permission:
70357+ operator: OR
70358+ permissions:
70359+ - user_access_manage
70360+ x-unstable: '**Note**: This endpoint is in public beta.
70361+
70362+ If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).'
7028570363 /api/v2/logs/config/restriction_queries/{restriction_query_id}/roles:
7028670364 delete:
7028770365 description: Removes a role from a restriction query.
@@ -70376,7 +70454,11 @@ paths:
7037670454
7037770455 If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).'
7037870456 post:
70379- description: Adds a role to a restriction query.
70457+ description: 'Adds a role to a restriction query.
70458+
70459+
70460+ **Note**: This operation automatically grants the `logs_read_data` permission
70461+ to the role if it doesn''t already have it.'
7038070462 operationId: AddRoleToRestrictionQuery
7038170463 parameters:
7038270464 - $ref: '#/components/parameters/RestrictionQueryID'
0 commit comments