@opusdns/api 1.15.0 → 1.17.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/helpers/constants.ts +2 -0
- package/src/helpers/keys.ts +41 -0
- package/src/helpers/requests.d.ts +30 -0
- package/src/helpers/responses.d.ts +50 -1
- package/src/helpers/schemas.d.ts +4 -0
- package/src/openapi.yaml +531 -2
- package/src/schema.d.ts +735 -80
package/src/openapi.yaml
CHANGED
|
@@ -2146,6 +2146,67 @@ components:
|
|
|
2146
2146
|
- EUR
|
|
2147
2147
|
title: Currency
|
|
2148
2148
|
type: string
|
|
2149
|
+
CustomRoleCreate:
|
|
2150
|
+
description: Request body for creating a custom role.
|
|
2151
|
+
properties:
|
|
2152
|
+
description:
|
|
2153
|
+
anyOf:
|
|
2154
|
+
- type: string
|
|
2155
|
+
- type: 'null'
|
|
2156
|
+
description: Description of the custom role.
|
|
2157
|
+
title: Description
|
|
2158
|
+
name:
|
|
2159
|
+
description: Display name of the custom role as provided by the user (e.g.
|
|
2160
|
+
'Support Staff').
|
|
2161
|
+
maxLength: 64
|
|
2162
|
+
minLength: 1
|
|
2163
|
+
title: Name
|
|
2164
|
+
type: string
|
|
2165
|
+
permissions:
|
|
2166
|
+
description: Permissions the role grants, as `resource:scope` (e.g. `domains:read`).
|
|
2167
|
+
The escalation-bearing admin/owner permissions cannot be granted.
|
|
2168
|
+
items:
|
|
2169
|
+
$ref: '#/components/schemas/PublicPermission'
|
|
2170
|
+
title: Permissions
|
|
2171
|
+
type: array
|
|
2172
|
+
required:
|
|
2173
|
+
- name
|
|
2174
|
+
- permissions
|
|
2175
|
+
title: CustomRoleCreate
|
|
2176
|
+
type: object
|
|
2177
|
+
CustomRoleLabel:
|
|
2178
|
+
type: string
|
|
2179
|
+
CustomRoleUpdate:
|
|
2180
|
+
description: 'Request body for updating a custom role. Omitted fields are left
|
|
2181
|
+
unchanged; `permissions`
|
|
2182
|
+
|
|
2183
|
+
is a full replacement set when provided.'
|
|
2184
|
+
properties:
|
|
2185
|
+
description:
|
|
2186
|
+
anyOf:
|
|
2187
|
+
- type: string
|
|
2188
|
+
- type: 'null'
|
|
2189
|
+
description: New description.
|
|
2190
|
+
title: Description
|
|
2191
|
+
name:
|
|
2192
|
+
anyOf:
|
|
2193
|
+
- maxLength: 64
|
|
2194
|
+
minLength: 1
|
|
2195
|
+
type: string
|
|
2196
|
+
- type: 'null'
|
|
2197
|
+
description: New display name.
|
|
2198
|
+
title: Name
|
|
2199
|
+
permissions:
|
|
2200
|
+
anyOf:
|
|
2201
|
+
- items:
|
|
2202
|
+
$ref: '#/components/schemas/PublicPermission'
|
|
2203
|
+
type: array
|
|
2204
|
+
- type: 'null'
|
|
2205
|
+
description: Full replacement set of `resource:scope` permissions the role
|
|
2206
|
+
grants.
|
|
2207
|
+
title: Permissions
|
|
2208
|
+
title: CustomRoleUpdate
|
|
2209
|
+
type: object
|
|
2149
2210
|
DeletePolicyType:
|
|
2150
2211
|
enum:
|
|
2151
2212
|
- immediate
|
|
@@ -9929,6 +9990,7 @@ components:
|
|
|
9929
9990
|
type: object
|
|
9930
9991
|
PublicResource:
|
|
9931
9992
|
enum:
|
|
9993
|
+
- organization
|
|
9932
9994
|
- domains
|
|
9933
9995
|
- contacts
|
|
9934
9996
|
- dns
|
|
@@ -9962,7 +10024,9 @@ components:
|
|
|
9962
10024
|
role:
|
|
9963
10025
|
anyOf:
|
|
9964
10026
|
- $ref: '#/components/schemas/PublicRole'
|
|
10027
|
+
- $ref: '#/components/schemas/CustomRoleLabel'
|
|
9965
10028
|
- type: 'null'
|
|
10029
|
+
title: Role
|
|
9966
10030
|
title: PublicRoleAssignment
|
|
9967
10031
|
type: object
|
|
9968
10032
|
PublicRoleAssignmentRequest:
|
|
@@ -9970,9 +10034,60 @@ components:
|
|
|
9970
10034
|
role:
|
|
9971
10035
|
anyOf:
|
|
9972
10036
|
- $ref: '#/components/schemas/AssignablePublicRole'
|
|
10037
|
+
- $ref: '#/components/schemas/CustomRoleLabel'
|
|
9973
10038
|
- type: 'null'
|
|
10039
|
+
title: Role
|
|
9974
10040
|
title: PublicRoleAssignmentRequest
|
|
9975
10041
|
type: object
|
|
10042
|
+
PublicRoleDefinition:
|
|
10043
|
+
description: "A role as listed/read through the public API \u2014 built-in or\
|
|
10044
|
+
\ custom."
|
|
10045
|
+
properties:
|
|
10046
|
+
built_in:
|
|
10047
|
+
description: Built-in roles are immutable; custom roles are organization-owned.
|
|
10048
|
+
title: Built In
|
|
10049
|
+
type: boolean
|
|
10050
|
+
created_on:
|
|
10051
|
+
anyOf:
|
|
10052
|
+
- format: date-time
|
|
10053
|
+
type: string
|
|
10054
|
+
- type: 'null'
|
|
10055
|
+
description: Creation time (custom roles only).
|
|
10056
|
+
title: Created On
|
|
10057
|
+
description:
|
|
10058
|
+
anyOf:
|
|
10059
|
+
- type: string
|
|
10060
|
+
- type: 'null'
|
|
10061
|
+
description: Description of the role.
|
|
10062
|
+
title: Description
|
|
10063
|
+
label:
|
|
10064
|
+
$ref: '#/components/schemas/CustomRoleLabel'
|
|
10065
|
+
description: Per-organization unique identifier (snake_case, e.g. 'support_staff').
|
|
10066
|
+
Used as the URL path parameter.
|
|
10067
|
+
name:
|
|
10068
|
+
description: Display name of the role (e.g. 'Support Staff').
|
|
10069
|
+
title: Name
|
|
10070
|
+
type: string
|
|
10071
|
+
permissions:
|
|
10072
|
+
description: Permissions the role grants, as `resource:scope` strings.
|
|
10073
|
+
items:
|
|
10074
|
+
$ref: '#/components/schemas/PublicPermission'
|
|
10075
|
+
title: Permissions
|
|
10076
|
+
type: array
|
|
10077
|
+
updated_on:
|
|
10078
|
+
anyOf:
|
|
10079
|
+
- format: date-time
|
|
10080
|
+
type: string
|
|
10081
|
+
- type: 'null'
|
|
10082
|
+
description: Last update time (custom roles only).
|
|
10083
|
+
title: Updated On
|
|
10084
|
+
required:
|
|
10085
|
+
- label
|
|
10086
|
+
- name
|
|
10087
|
+
- built_in
|
|
10088
|
+
- permissions
|
|
10089
|
+
title: PublicRoleDefinition
|
|
10090
|
+
type: object
|
|
9976
10091
|
PublicScope:
|
|
9977
10092
|
enum:
|
|
9978
10093
|
- read
|
|
@@ -11567,7 +11682,9 @@ components:
|
|
|
11567
11682
|
role:
|
|
11568
11683
|
anyOf:
|
|
11569
11684
|
- $ref: '#/components/schemas/PublicRole'
|
|
11685
|
+
- $ref: '#/components/schemas/CustomRoleLabel'
|
|
11570
11686
|
- type: 'null'
|
|
11687
|
+
title: Role
|
|
11571
11688
|
status:
|
|
11572
11689
|
$ref: '#/components/schemas/UserStatus'
|
|
11573
11690
|
readOnly: true
|
|
@@ -11771,7 +11888,9 @@ components:
|
|
|
11771
11888
|
role:
|
|
11772
11889
|
anyOf:
|
|
11773
11890
|
- $ref: '#/components/schemas/PublicRole'
|
|
11891
|
+
- $ref: '#/components/schemas/CustomRoleLabel'
|
|
11774
11892
|
- type: 'null'
|
|
11893
|
+
title: Role
|
|
11775
11894
|
status:
|
|
11776
11895
|
$ref: '#/components/schemas/UserStatus'
|
|
11777
11896
|
readOnly: true
|
|
@@ -12142,7 +12261,7 @@ info:
|
|
|
12142
12261
|
\n\n"
|
|
12143
12262
|
summary: OpusDNS - your gateway to a seamless domain management experience.
|
|
12144
12263
|
title: OpusDNS API
|
|
12145
|
-
version: 2026-06-
|
|
12264
|
+
version: 2026-06-16-093305
|
|
12146
12265
|
x-logo:
|
|
12147
12266
|
altText: OpusDNS API Reference
|
|
12148
12267
|
url: https://d24lr4zqs1tgqh.cloudfront.net/c9505a20-5ae1-406c-b060-d392569caebf.jpg
|
|
@@ -24394,6 +24513,402 @@ paths:
|
|
|
24394
24513
|
summary: Update an IP restriction
|
|
24395
24514
|
tags:
|
|
24396
24515
|
- organization
|
|
24516
|
+
/v1/organizations/role-permissions:
|
|
24517
|
+
get:
|
|
24518
|
+
description: Retrieves the catalog of `resource:scope` permissions a custom
|
|
24519
|
+
role may grant
|
|
24520
|
+
operationId: list_role_permissions_v1_organizations_role_permissions_get
|
|
24521
|
+
responses:
|
|
24522
|
+
'200':
|
|
24523
|
+
content:
|
|
24524
|
+
application/json:
|
|
24525
|
+
schema:
|
|
24526
|
+
$ref: '#/components/schemas/PublicPermissionSet'
|
|
24527
|
+
description: Successful Response
|
|
24528
|
+
'401':
|
|
24529
|
+
content:
|
|
24530
|
+
application/problem+json:
|
|
24531
|
+
example:
|
|
24532
|
+
code: ERROR_AUTHENTICATION
|
|
24533
|
+
detail: Additional error context.
|
|
24534
|
+
status: 401
|
|
24535
|
+
title: Authentication Error
|
|
24536
|
+
type: authentication
|
|
24537
|
+
schema:
|
|
24538
|
+
$ref: '#/components/schemas/Problem'
|
|
24539
|
+
description: Unauthorized
|
|
24540
|
+
'403':
|
|
24541
|
+
content:
|
|
24542
|
+
application/problem+json:
|
|
24543
|
+
example:
|
|
24544
|
+
code: ERROR_PERMISSION_DENIED
|
|
24545
|
+
detail: Insufficient permissions to perform this action
|
|
24546
|
+
status: 403
|
|
24547
|
+
title: Permission Denied
|
|
24548
|
+
type: permission-denied
|
|
24549
|
+
schema:
|
|
24550
|
+
$ref: '#/components/schemas/Problem'
|
|
24551
|
+
description: Forbidden
|
|
24552
|
+
'422':
|
|
24553
|
+
content:
|
|
24554
|
+
application/problem+json:
|
|
24555
|
+
schema:
|
|
24556
|
+
$ref: '#/components/schemas/HTTPValidationError'
|
|
24557
|
+
description: Validation Error
|
|
24558
|
+
security:
|
|
24559
|
+
- OAuth2PasswordBearer: []
|
|
24560
|
+
- APIKeyHeader: []
|
|
24561
|
+
summary: List grantable role permissions
|
|
24562
|
+
tags:
|
|
24563
|
+
- organization
|
|
24564
|
+
/v1/organizations/roles:
|
|
24565
|
+
get:
|
|
24566
|
+
description: 'Retrieves all roles assignable in the current organization: the
|
|
24567
|
+
built-in roles plus the organization''s custom roles'
|
|
24568
|
+
operationId: list_roles_v1_organizations_roles_get
|
|
24569
|
+
responses:
|
|
24570
|
+
'200':
|
|
24571
|
+
content:
|
|
24572
|
+
application/json:
|
|
24573
|
+
schema:
|
|
24574
|
+
items:
|
|
24575
|
+
$ref: '#/components/schemas/PublicRoleDefinition'
|
|
24576
|
+
title: Response List Roles V1 Organizations Roles Get
|
|
24577
|
+
type: array
|
|
24578
|
+
description: Successful Response
|
|
24579
|
+
'401':
|
|
24580
|
+
content:
|
|
24581
|
+
application/problem+json:
|
|
24582
|
+
example:
|
|
24583
|
+
code: ERROR_AUTHENTICATION
|
|
24584
|
+
detail: Additional error context.
|
|
24585
|
+
status: 401
|
|
24586
|
+
title: Authentication Error
|
|
24587
|
+
type: authentication
|
|
24588
|
+
schema:
|
|
24589
|
+
$ref: '#/components/schemas/Problem'
|
|
24590
|
+
description: Unauthorized
|
|
24591
|
+
'403':
|
|
24592
|
+
content:
|
|
24593
|
+
application/problem+json:
|
|
24594
|
+
example:
|
|
24595
|
+
code: ERROR_PERMISSION_DENIED
|
|
24596
|
+
detail: Insufficient permissions to perform this action
|
|
24597
|
+
status: 403
|
|
24598
|
+
title: Permission Denied
|
|
24599
|
+
type: permission-denied
|
|
24600
|
+
schema:
|
|
24601
|
+
$ref: '#/components/schemas/Problem'
|
|
24602
|
+
description: Forbidden
|
|
24603
|
+
'422':
|
|
24604
|
+
content:
|
|
24605
|
+
application/problem+json:
|
|
24606
|
+
schema:
|
|
24607
|
+
$ref: '#/components/schemas/HTTPValidationError'
|
|
24608
|
+
description: Validation Error
|
|
24609
|
+
security:
|
|
24610
|
+
- OAuth2PasswordBearer: []
|
|
24611
|
+
- APIKeyHeader: []
|
|
24612
|
+
summary: List roles
|
|
24613
|
+
tags:
|
|
24614
|
+
- organization
|
|
24615
|
+
post:
|
|
24616
|
+
description: Creates an organization-owned custom role granting the requested
|
|
24617
|
+
permissions. The escalation-bearing admin/owner permissions cannot be granted.
|
|
24618
|
+
operationId: create_role_v1_organizations_roles_post
|
|
24619
|
+
requestBody:
|
|
24620
|
+
content:
|
|
24621
|
+
application/json:
|
|
24622
|
+
schema:
|
|
24623
|
+
$ref: '#/components/schemas/CustomRoleCreate'
|
|
24624
|
+
required: true
|
|
24625
|
+
responses:
|
|
24626
|
+
'201':
|
|
24627
|
+
content:
|
|
24628
|
+
application/json:
|
|
24629
|
+
schema:
|
|
24630
|
+
$ref: '#/components/schemas/PublicRoleDefinition'
|
|
24631
|
+
description: Successful Response
|
|
24632
|
+
'401':
|
|
24633
|
+
content:
|
|
24634
|
+
application/problem+json:
|
|
24635
|
+
example:
|
|
24636
|
+
code: ERROR_AUTHENTICATION
|
|
24637
|
+
detail: Additional error context.
|
|
24638
|
+
status: 401
|
|
24639
|
+
title: Authentication Error
|
|
24640
|
+
type: authentication
|
|
24641
|
+
schema:
|
|
24642
|
+
$ref: '#/components/schemas/Problem'
|
|
24643
|
+
description: Unauthorized
|
|
24644
|
+
'403':
|
|
24645
|
+
content:
|
|
24646
|
+
application/problem+json:
|
|
24647
|
+
example:
|
|
24648
|
+
code: ERROR_PERMISSION_DENIED
|
|
24649
|
+
detail: Insufficient permissions to perform this action
|
|
24650
|
+
status: 403
|
|
24651
|
+
title: Permission Denied
|
|
24652
|
+
type: permission-denied
|
|
24653
|
+
schema:
|
|
24654
|
+
$ref: '#/components/schemas/Problem'
|
|
24655
|
+
description: Forbidden
|
|
24656
|
+
'409':
|
|
24657
|
+
content:
|
|
24658
|
+
application/problem+json:
|
|
24659
|
+
example:
|
|
24660
|
+
code: ERROR_DUPLICATE_ROLE_NAME
|
|
24661
|
+
detail: A role named 'support' already exists in this organization
|
|
24662
|
+
status: 409
|
|
24663
|
+
title: Role Management Error
|
|
24664
|
+
type: duplicate-role-name
|
|
24665
|
+
schema:
|
|
24666
|
+
$ref: '#/components/schemas/Problem'
|
|
24667
|
+
description: Conflict
|
|
24668
|
+
'422':
|
|
24669
|
+
content:
|
|
24670
|
+
application/problem+json:
|
|
24671
|
+
schema:
|
|
24672
|
+
$ref: '#/components/schemas/HTTPValidationError'
|
|
24673
|
+
description: Validation Error
|
|
24674
|
+
security:
|
|
24675
|
+
- OAuth2PasswordBearer: []
|
|
24676
|
+
- APIKeyHeader: []
|
|
24677
|
+
summary: Create a custom role
|
|
24678
|
+
tags:
|
|
24679
|
+
- organization
|
|
24680
|
+
/v1/organizations/roles/{label}:
|
|
24681
|
+
delete:
|
|
24682
|
+
description: Deletes a custom role. Refused while the role is still assigned
|
|
24683
|
+
to any subject, and for built-in roles.
|
|
24684
|
+
operationId: delete_role_v1_organizations_roles__label__delete
|
|
24685
|
+
parameters:
|
|
24686
|
+
- in: path
|
|
24687
|
+
name: label
|
|
24688
|
+
required: true
|
|
24689
|
+
schema:
|
|
24690
|
+
title: Label
|
|
24691
|
+
type: string
|
|
24692
|
+
responses:
|
|
24693
|
+
'204':
|
|
24694
|
+
description: Successful Response
|
|
24695
|
+
'401':
|
|
24696
|
+
content:
|
|
24697
|
+
application/problem+json:
|
|
24698
|
+
example:
|
|
24699
|
+
code: ERROR_AUTHENTICATION
|
|
24700
|
+
detail: Additional error context.
|
|
24701
|
+
status: 401
|
|
24702
|
+
title: Authentication Error
|
|
24703
|
+
type: authentication
|
|
24704
|
+
schema:
|
|
24705
|
+
$ref: '#/components/schemas/Problem'
|
|
24706
|
+
description: Unauthorized
|
|
24707
|
+
'403':
|
|
24708
|
+
content:
|
|
24709
|
+
application/problem+json:
|
|
24710
|
+
example:
|
|
24711
|
+
code: ERROR_PERMISSION_DENIED
|
|
24712
|
+
detail: Insufficient permissions to perform this action
|
|
24713
|
+
status: 403
|
|
24714
|
+
title: Permission Denied
|
|
24715
|
+
type: permission-denied
|
|
24716
|
+
schema:
|
|
24717
|
+
$ref: '#/components/schemas/Problem'
|
|
24718
|
+
description: Forbidden
|
|
24719
|
+
'404':
|
|
24720
|
+
content:
|
|
24721
|
+
application/problem+json:
|
|
24722
|
+
example:
|
|
24723
|
+
code: ERROR_ROLE_NOT_FOUND
|
|
24724
|
+
detail: Role not found
|
|
24725
|
+
role_name: support
|
|
24726
|
+
status: 404
|
|
24727
|
+
title: Role Management Error
|
|
24728
|
+
type: role-not-found
|
|
24729
|
+
schema:
|
|
24730
|
+
$ref: '#/components/schemas/Problem'
|
|
24731
|
+
description: Not Found
|
|
24732
|
+
'409':
|
|
24733
|
+
content:
|
|
24734
|
+
application/problem+json:
|
|
24735
|
+
example:
|
|
24736
|
+
binding_count: 1
|
|
24737
|
+
code: ERROR_ROLE_IN_USE
|
|
24738
|
+
detail: Role is still assigned to one or more subjects and cannot
|
|
24739
|
+
be deleted
|
|
24740
|
+
role_name: support
|
|
24741
|
+
status: 409
|
|
24742
|
+
title: Role Management Error
|
|
24743
|
+
type: role-in-use
|
|
24744
|
+
schema:
|
|
24745
|
+
$ref: '#/components/schemas/Problem'
|
|
24746
|
+
description: Conflict
|
|
24747
|
+
'422':
|
|
24748
|
+
content:
|
|
24749
|
+
application/problem+json:
|
|
24750
|
+
schema:
|
|
24751
|
+
$ref: '#/components/schemas/HTTPValidationError'
|
|
24752
|
+
description: Validation Error
|
|
24753
|
+
security:
|
|
24754
|
+
- OAuth2PasswordBearer: []
|
|
24755
|
+
- APIKeyHeader: []
|
|
24756
|
+
summary: Delete a custom role
|
|
24757
|
+
tags:
|
|
24758
|
+
- organization
|
|
24759
|
+
get:
|
|
24760
|
+
description: Retrieves a single role (built-in or custom) by its name
|
|
24761
|
+
operationId: get_role_v1_organizations_roles__label__get
|
|
24762
|
+
parameters:
|
|
24763
|
+
- in: path
|
|
24764
|
+
name: label
|
|
24765
|
+
required: true
|
|
24766
|
+
schema:
|
|
24767
|
+
title: Label
|
|
24768
|
+
type: string
|
|
24769
|
+
responses:
|
|
24770
|
+
'200':
|
|
24771
|
+
content:
|
|
24772
|
+
application/json:
|
|
24773
|
+
schema:
|
|
24774
|
+
$ref: '#/components/schemas/PublicRoleDefinition'
|
|
24775
|
+
description: Successful Response
|
|
24776
|
+
'401':
|
|
24777
|
+
content:
|
|
24778
|
+
application/problem+json:
|
|
24779
|
+
example:
|
|
24780
|
+
code: ERROR_AUTHENTICATION
|
|
24781
|
+
detail: Additional error context.
|
|
24782
|
+
status: 401
|
|
24783
|
+
title: Authentication Error
|
|
24784
|
+
type: authentication
|
|
24785
|
+
schema:
|
|
24786
|
+
$ref: '#/components/schemas/Problem'
|
|
24787
|
+
description: Unauthorized
|
|
24788
|
+
'403':
|
|
24789
|
+
content:
|
|
24790
|
+
application/problem+json:
|
|
24791
|
+
example:
|
|
24792
|
+
code: ERROR_PERMISSION_DENIED
|
|
24793
|
+
detail: Insufficient permissions to perform this action
|
|
24794
|
+
status: 403
|
|
24795
|
+
title: Permission Denied
|
|
24796
|
+
type: permission-denied
|
|
24797
|
+
schema:
|
|
24798
|
+
$ref: '#/components/schemas/Problem'
|
|
24799
|
+
description: Forbidden
|
|
24800
|
+
'404':
|
|
24801
|
+
content:
|
|
24802
|
+
application/problem+json:
|
|
24803
|
+
example:
|
|
24804
|
+
code: ERROR_ROLE_NOT_FOUND
|
|
24805
|
+
detail: Role not found
|
|
24806
|
+
role_name: support
|
|
24807
|
+
status: 404
|
|
24808
|
+
title: Role Management Error
|
|
24809
|
+
type: role-not-found
|
|
24810
|
+
schema:
|
|
24811
|
+
$ref: '#/components/schemas/Problem'
|
|
24812
|
+
description: Not Found
|
|
24813
|
+
'422':
|
|
24814
|
+
content:
|
|
24815
|
+
application/problem+json:
|
|
24816
|
+
schema:
|
|
24817
|
+
$ref: '#/components/schemas/HTTPValidationError'
|
|
24818
|
+
description: Validation Error
|
|
24819
|
+
security:
|
|
24820
|
+
- OAuth2PasswordBearer: []
|
|
24821
|
+
- APIKeyHeader: []
|
|
24822
|
+
summary: Get a role
|
|
24823
|
+
tags:
|
|
24824
|
+
- organization
|
|
24825
|
+
patch:
|
|
24826
|
+
description: Updates a custom role's name, description and/or permission set.
|
|
24827
|
+
Permission changes apply to every subject holding the role instantly. Built-in
|
|
24828
|
+
roles are immutable.
|
|
24829
|
+
operationId: update_role_v1_organizations_roles__label__patch
|
|
24830
|
+
parameters:
|
|
24831
|
+
- in: path
|
|
24832
|
+
name: label
|
|
24833
|
+
required: true
|
|
24834
|
+
schema:
|
|
24835
|
+
title: Label
|
|
24836
|
+
type: string
|
|
24837
|
+
requestBody:
|
|
24838
|
+
content:
|
|
24839
|
+
application/json:
|
|
24840
|
+
schema:
|
|
24841
|
+
$ref: '#/components/schemas/CustomRoleUpdate'
|
|
24842
|
+
required: true
|
|
24843
|
+
responses:
|
|
24844
|
+
'200':
|
|
24845
|
+
content:
|
|
24846
|
+
application/json:
|
|
24847
|
+
schema:
|
|
24848
|
+
$ref: '#/components/schemas/PublicRoleDefinition'
|
|
24849
|
+
description: Successful Response
|
|
24850
|
+
'401':
|
|
24851
|
+
content:
|
|
24852
|
+
application/problem+json:
|
|
24853
|
+
example:
|
|
24854
|
+
code: ERROR_AUTHENTICATION
|
|
24855
|
+
detail: Additional error context.
|
|
24856
|
+
status: 401
|
|
24857
|
+
title: Authentication Error
|
|
24858
|
+
type: authentication
|
|
24859
|
+
schema:
|
|
24860
|
+
$ref: '#/components/schemas/Problem'
|
|
24861
|
+
description: Unauthorized
|
|
24862
|
+
'403':
|
|
24863
|
+
content:
|
|
24864
|
+
application/problem+json:
|
|
24865
|
+
example:
|
|
24866
|
+
code: ERROR_PERMISSION_DENIED
|
|
24867
|
+
detail: Insufficient permissions to perform this action
|
|
24868
|
+
status: 403
|
|
24869
|
+
title: Permission Denied
|
|
24870
|
+
type: permission-denied
|
|
24871
|
+
schema:
|
|
24872
|
+
$ref: '#/components/schemas/Problem'
|
|
24873
|
+
description: Forbidden
|
|
24874
|
+
'404':
|
|
24875
|
+
content:
|
|
24876
|
+
application/problem+json:
|
|
24877
|
+
example:
|
|
24878
|
+
code: ERROR_ROLE_NOT_FOUND
|
|
24879
|
+
detail: Role not found
|
|
24880
|
+
role_name: support
|
|
24881
|
+
status: 404
|
|
24882
|
+
title: Role Management Error
|
|
24883
|
+
type: role-not-found
|
|
24884
|
+
schema:
|
|
24885
|
+
$ref: '#/components/schemas/Problem'
|
|
24886
|
+
description: Not Found
|
|
24887
|
+
'409':
|
|
24888
|
+
content:
|
|
24889
|
+
application/problem+json:
|
|
24890
|
+
example:
|
|
24891
|
+
code: ERROR_BUILT_IN_ROLE_IMMUTABLE
|
|
24892
|
+
detail: Built-in roles cannot be modified or deleted
|
|
24893
|
+
role_name: viewer
|
|
24894
|
+
status: 409
|
|
24895
|
+
title: Role Management Error
|
|
24896
|
+
type: built-in-role-immutable
|
|
24897
|
+
schema:
|
|
24898
|
+
$ref: '#/components/schemas/Problem'
|
|
24899
|
+
description: Conflict
|
|
24900
|
+
'422':
|
|
24901
|
+
content:
|
|
24902
|
+
application/problem+json:
|
|
24903
|
+
schema:
|
|
24904
|
+
$ref: '#/components/schemas/HTTPValidationError'
|
|
24905
|
+
description: Validation Error
|
|
24906
|
+
security:
|
|
24907
|
+
- OAuth2PasswordBearer: []
|
|
24908
|
+
- APIKeyHeader: []
|
|
24909
|
+
summary: Update a custom role
|
|
24910
|
+
tags:
|
|
24911
|
+
- organization
|
|
24397
24912
|
/v1/organizations/users:
|
|
24398
24913
|
get:
|
|
24399
24914
|
description: Retrieves a paginated list of users under the current organization
|
|
@@ -26613,7 +27128,8 @@ paths:
|
|
|
26613
27128
|
x-required-permissions:
|
|
26614
27129
|
- users:read
|
|
26615
27130
|
put:
|
|
26616
|
-
description: Set the role for a user, replacing any existing role
|
|
27131
|
+
description: Set the role for a user, replacing any existing role. Accepts a
|
|
27132
|
+
built-in role name or the label of a custom role owned by the user's organization
|
|
26617
27133
|
operationId: set_user_role_v1_users__user_id__role_put
|
|
26618
27134
|
parameters:
|
|
26619
27135
|
- in: path
|
|
@@ -26652,6 +27168,19 @@ paths:
|
|
|
26652
27168
|
schema:
|
|
26653
27169
|
$ref: '#/components/schemas/Problem'
|
|
26654
27170
|
description: Forbidden
|
|
27171
|
+
'404':
|
|
27172
|
+
content:
|
|
27173
|
+
application/problem+json:
|
|
27174
|
+
example:
|
|
27175
|
+
code: ERROR_ROLE_NOT_FOUND
|
|
27176
|
+
detail: Role not found
|
|
27177
|
+
role_name: support_staff
|
|
27178
|
+
status: 404
|
|
27179
|
+
title: Role Management Error
|
|
27180
|
+
type: role-not-found
|
|
27181
|
+
schema:
|
|
27182
|
+
$ref: '#/components/schemas/Problem'
|
|
27183
|
+
description: Not Found
|
|
26655
27184
|
'422':
|
|
26656
27185
|
content:
|
|
26657
27186
|
application/problem+json:
|