Skip to content
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
13 changes: 13 additions & 0 deletions .generator/schemas/v2/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -174662,6 +174662,19 @@ paths:
description: |-
Returns a list of all permissions, including name, description, and ID.
operationId: ListPermissions
parameters:
- description: |-
Set to `true` to return all permissions, including both permissions
that can be assigned to user roles and permissions that can only be
used as scopes for OAuth clients and scoped credentials. When `false`
(default), only permissions that can be assigned to user roles are
returned.
example: false
in: query
name: include_scopes
required: false
schema:
type: boolean
responses:
"200":
content:
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
2026-08-05T16:12:34.510Z

Large diffs are not rendered by default.

8 changes: 8 additions & 0 deletions examples/v2/roles/ListPermissions_1350046915.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# List permissions including scopes returns "OK" response

require "datadog_api_client"
api_instance = DatadogAPIClient::V2::RolesAPI.new
opts = {
include_scopes: true,
}
p api_instance.list_permissions(opts)
3 changes: 3 additions & 0 deletions features/scenarios_model_mapping.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4901,6 +4901,9 @@
"org_group_id" => "UUID",
"body" => "OrgGroupUpdateRequest",
},
"v2.ListPermissions" => {
"include_scopes" => "Boolean",
},
"v2.ListRoles" => {
"page_size" => "Integer",
"page_number" => "Integer",
Expand Down
8 changes: 8 additions & 0 deletions features/v2/roles.feature
Original file line number Diff line number Diff line change
Expand Up @@ -203,6 +203,14 @@ Feature: Roles
And the response "data[0].type" is equal to "{{ permission.type }}"
And the response "data" has item with field "id" with value "{{ permission.id }}"

@team:DataDog/aaa-core-access @team:DataDog/access-policies-lifecycle
Scenario: List permissions including scopes returns "OK" response
Given new "ListPermissions" request
And request contains "include_scopes" parameter with value true
When the request is sent
Then the response status is 200 OK
And the response "data" has item with field "attributes.name" with value "admin"

@generated @skip @team:DataDog/aaa-core-access @team:DataDog/access-policies-lifecycle
Scenario: List permissions returns "Bad Request" response
Given new "ListPermissions" request
Expand Down
2 changes: 2 additions & 0 deletions lib/datadog_api_client/v2/api/roles_api.rb
Original file line number Diff line number Diff line change
Expand Up @@ -462,6 +462,7 @@ def list_permissions(opts = {})
# Returns a list of all permissions, including name, description, and ID.
#
# @param opts [Hash] the optional parameters
# @option opts [Boolean] :include_scopes Set to `true` to return all permissions, including both permissions that can be assigned to user roles and permissions that can only be used as scopes for OAuth clients and scoped credentials. When `false` (default), only permissions that can be assigned to user roles are returned.
# @return [Array<(PermissionsResponse, Integer, Hash)>] PermissionsResponse data, response status code and response headers
def list_permissions_with_http_info(opts = {})

Expand All @@ -473,6 +474,7 @@ def list_permissions_with_http_info(opts = {})

# query parameters
query_params = opts[:query_params] || {}
query_params[:'include_scopes'] = opts[:'include_scopes'] if !opts[:'include_scopes'].nil?

# header parameters
header_params = opts[:header_params] || {}
Expand Down
Loading