@faable/auth-sdk 2.9.0 → 2.9.1
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/dist/api/generated-client.d.ts +255 -0
- package/dist/api/generated-client.js +171 -0
- package/dist/api/types.d.ts +1475 -180
- package/dist/version.js +2 -2
- package/package.json +1 -1
- package/spec/openapi.json +2930 -640
package/spec/openapi.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"info": {
|
|
4
4
|
"title": "@faablecloud/auth",
|
|
5
5
|
"description": "Auth Platform made by Faable. Manage Users and Roles",
|
|
6
|
-
"version": "2.
|
|
6
|
+
"version": "2.93.0",
|
|
7
7
|
"license": {
|
|
8
8
|
"name": "private",
|
|
9
9
|
"url": "https://faable.com/docs/platform/privacy-policy"
|
|
@@ -4155,6 +4155,7 @@
|
|
|
4155
4155
|
"id",
|
|
4156
4156
|
"name",
|
|
4157
4157
|
"description",
|
|
4158
|
+
"permissions",
|
|
4158
4159
|
"account",
|
|
4159
4160
|
"createdAt"
|
|
4160
4161
|
],
|
|
@@ -4172,6 +4173,31 @@
|
|
|
4172
4173
|
"type": "string",
|
|
4173
4174
|
"description": "Free-form explanation of what users in this role are expected to do or have access to. Shown alongside the role in the dashboard."
|
|
4174
4175
|
},
|
|
4176
|
+
"permissions": {
|
|
4177
|
+
"type": "array",
|
|
4178
|
+
"items": {
|
|
4179
|
+
"type": "object",
|
|
4180
|
+
"required": [
|
|
4181
|
+
"api",
|
|
4182
|
+
"value"
|
|
4183
|
+
],
|
|
4184
|
+
"properties": {
|
|
4185
|
+
"api": {
|
|
4186
|
+
"type": "string",
|
|
4187
|
+
"description": "Id of the Api that defines the permission.",
|
|
4188
|
+
"example": "api_6555fd293acc2f0fac0e3452"
|
|
4189
|
+
},
|
|
4190
|
+
"value": {
|
|
4191
|
+
"type": "string",
|
|
4192
|
+
"description": "The permission, as it appears in the Api's `permissions` catalog.",
|
|
4193
|
+
"example": "invites:write"
|
|
4194
|
+
}
|
|
4195
|
+
},
|
|
4196
|
+
"additionalProperties": false,
|
|
4197
|
+
"description": "A permission of one Api granted by a role."
|
|
4198
|
+
},
|
|
4199
|
+
"description": "Api permissions granted to the users that hold this role at the account level (team roles grant none). Change them with `POST` / `DELETE /role/:role_id/permissions`; `GET /role/:role_id/permissions` lists them with their Api."
|
|
4200
|
+
},
|
|
4175
4201
|
"account": {
|
|
4176
4202
|
"type": "string",
|
|
4177
4203
|
"description": "Object is related with this account"
|
|
@@ -4813,6 +4839,7 @@
|
|
|
4813
4839
|
"token_dialect",
|
|
4814
4840
|
"token_lifetime",
|
|
4815
4841
|
"enforce_policies",
|
|
4842
|
+
"rbac",
|
|
4816
4843
|
"allow_offline_access",
|
|
4817
4844
|
"skip_consent",
|
|
4818
4845
|
"include_teams_in_access_token",
|
|
@@ -4890,317 +4917,329 @@
|
|
|
4890
4917
|
"type": "boolean",
|
|
4891
4918
|
"description": "When true, only scopes that match a permission in `permissions` are forwarded into the access_token. When false, requested scopes are echoed back verbatim with no filtering."
|
|
4892
4919
|
},
|
|
4893
|
-
"
|
|
4894
|
-
"type": "boolean",
|
|
4895
|
-
"description": "When true, the API is eligible to be the target of a `refresh_token` (i.e. clients can request `offline_access` against it)."
|
|
4896
|
-
},
|
|
4897
|
-
"consent_options": {
|
|
4898
|
-
"type": "object",
|
|
4899
|
-
"required": [
|
|
4900
|
-
"claim",
|
|
4901
|
-
"label",
|
|
4902
|
-
"url",
|
|
4903
|
-
"audience"
|
|
4904
|
-
],
|
|
4905
|
-
"properties": {
|
|
4906
|
-
"claim": {
|
|
4907
|
-
"type": "string",
|
|
4908
|
-
"pattern": "^[a-z][a-z0-9_]{0,31}$",
|
|
4909
|
-
"description": "Access token claim that carries the chosen id."
|
|
4910
|
-
},
|
|
4911
|
-
"label": {
|
|
4912
|
-
"type": "string",
|
|
4913
|
-
"maxLength": 60,
|
|
4914
|
-
"description": "What the screen asks for, e.g. \"Project\"."
|
|
4915
|
-
},
|
|
4916
|
-
"url": {
|
|
4917
|
-
"type": "string",
|
|
4918
|
-
"pattern": "^https://",
|
|
4919
|
-
"description": "GET endpoint of the resource server that lists the choices."
|
|
4920
|
-
},
|
|
4921
|
-
"audience": {
|
|
4922
|
-
"type": "string",
|
|
4923
|
-
"description": "Identifier of a registered API the listing token is issued for (usually the resource server behind `url`)."
|
|
4924
|
-
},
|
|
4925
|
-
"scope": {
|
|
4926
|
-
"type": "string",
|
|
4927
|
-
"description": "Space-separated permissions of the listing token. The token is delegated (`act`): the resource server sees auth acting for the user with only these, never the user’s full powers — an admin is listed their own choices, not the whole platform’s."
|
|
4928
|
-
}
|
|
4929
|
-
},
|
|
4930
|
-
"nullable": true
|
|
4931
|
-
},
|
|
4932
|
-
"delegation": {
|
|
4933
|
-
"type": "object",
|
|
4934
|
-
"required": [
|
|
4935
|
-
"client_id",
|
|
4936
|
-
"audience"
|
|
4937
|
-
],
|
|
4938
|
-
"properties": {
|
|
4939
|
-
"client_id": {
|
|
4940
|
-
"type": "string",
|
|
4941
|
-
"description": "The confidential client of the resource server allowed to exchange."
|
|
4942
|
-
},
|
|
4943
|
-
"audience": {
|
|
4944
|
-
"type": "string",
|
|
4945
|
-
"description": "Identifier of the registered API the new token is for."
|
|
4946
|
-
}
|
|
4947
|
-
},
|
|
4948
|
-
"nullable": true
|
|
4949
|
-
},
|
|
4950
|
-
"skip_consent": {
|
|
4951
|
-
"type": "boolean",
|
|
4952
|
-
"description": "When true, the consent prompt is skipped for first-party clients (clients owned by the same tenant as the API)."
|
|
4953
|
-
},
|
|
4954
|
-
"include_teams_in_access_token": {
|
|
4955
|
-
"type": "boolean",
|
|
4956
|
-
"description": "When true, access_tokens issued for this API carry a `teams` claim listing the slugs of the teams the subject is a member of within the tenant."
|
|
4957
|
-
},
|
|
4958
|
-
"include_roles_in_access_token": {
|
|
4959
|
-
"type": "boolean",
|
|
4960
|
-
"description": "When true, access_tokens issued for this API carry a `roles` claim listing the names of the roles the subject holds across their team memberships within the tenant."
|
|
4961
|
-
},
|
|
4962
|
-
"include_teams_in_id_token": {
|
|
4920
|
+
"rbac": {
|
|
4963
4921
|
"type": "boolean",
|
|
4964
|
-
"description": "When true,
|
|
4965
|
-
},
|
|
4966
|
-
"include_roles_in_id_token": {
|
|
4967
|
-
"type": "boolean",
|
|
4968
|
-
"description": "When true, id_tokens issued together with an access_token for this API carry a `roles` claim with the subject role names. Same audience caveat as `include_teams_in_id_token`."
|
|
4969
|
-
},
|
|
4970
|
-
"account": {
|
|
4971
|
-
"type": "string",
|
|
4972
|
-
"description": "Object is related with this account"
|
|
4973
|
-
},
|
|
4974
|
-
"metadata": {
|
|
4975
|
-
"type": "object",
|
|
4976
|
-
"properties": {},
|
|
4977
|
-
"additionalProperties": true,
|
|
4978
|
-
"description": "ApiMetadata",
|
|
4979
|
-
"default": {}
|
|
4980
|
-
},
|
|
4981
|
-
"createdAt": {
|
|
4982
|
-
"type": "string",
|
|
4983
|
-
"description": "Api creation date"
|
|
4984
|
-
},
|
|
4985
|
-
"updatedAt": {
|
|
4986
|
-
"type": "string",
|
|
4987
|
-
"description": "Api updated date"
|
|
4988
|
-
}
|
|
4989
|
-
},
|
|
4990
|
-
"description": "Api"
|
|
4991
|
-
},
|
|
4992
|
-
"ApiMetadata": {
|
|
4993
|
-
"type": "object",
|
|
4994
|
-
"properties": {},
|
|
4995
|
-
"additionalProperties": true,
|
|
4996
|
-
"description": "ApiMetadata",
|
|
4997
|
-
"default": {}
|
|
4998
|
-
},
|
|
4999
|
-
"ApiCreate": {
|
|
5000
|
-
"type": "object",
|
|
5001
|
-
"required": [
|
|
5002
|
-
"name",
|
|
5003
|
-
"identifier"
|
|
5004
|
-
],
|
|
5005
|
-
"properties": {
|
|
5006
|
-
"name": {
|
|
5007
|
-
"type": "string",
|
|
5008
|
-
"description": "Human-readable name for the API.",
|
|
5009
|
-
"example": "My Backend API"
|
|
5010
|
-
},
|
|
5011
|
-
"identifier": {
|
|
5012
|
-
"type": "string",
|
|
5013
|
-
"description": "Audience URL clients pass as `audience=` when requesting a token for this API. Must be unique within the tenant and is immutable after creation.",
|
|
5014
|
-
"example": "https://api.faable.com"
|
|
5015
|
-
},
|
|
5016
|
-
"description": {
|
|
5017
|
-
"type": "string",
|
|
5018
|
-
"description": "Optional human-readable description of the API."
|
|
5019
|
-
},
|
|
5020
|
-
"permissions": {
|
|
5021
|
-
"type": "array",
|
|
5022
|
-
"items": {
|
|
5023
|
-
"$ref": "#/components/schemas/PermissionCreate"
|
|
5024
|
-
},
|
|
5025
|
-
"description": "Set of permissions (scopes) this API exposes. Tokens issued with `audience=identifier` will only carry these in their `permissions` claim.",
|
|
5026
|
-
"default": []
|
|
5027
|
-
},
|
|
5028
|
-
"signing_alg": {
|
|
5029
|
-
"anyOf": [
|
|
5030
|
-
{
|
|
5031
|
-
"type": "string",
|
|
5032
|
-
"enum": [
|
|
5033
|
-
"RS256"
|
|
5034
|
-
]
|
|
5035
|
-
}
|
|
5036
|
-
],
|
|
5037
|
-
"description": "JWA algorithm used to sign access_tokens issued for this API. Currently only RS256 (the account keystore default) is implemented."
|
|
5038
|
-
},
|
|
5039
|
-
"token_dialect": {
|
|
5040
|
-
"anyOf": [
|
|
5041
|
-
{
|
|
5042
|
-
"type": "string",
|
|
5043
|
-
"enum": [
|
|
5044
|
-
"access_token"
|
|
5045
|
-
]
|
|
5046
|
-
},
|
|
5047
|
-
{
|
|
5048
|
-
"type": "string",
|
|
5049
|
-
"enum": [
|
|
5050
|
-
"access_token_authz"
|
|
5051
|
-
]
|
|
5052
|
-
}
|
|
5053
|
-
],
|
|
5054
|
-
"description": "Shape of access_tokens issued for this API. `access_token` emits the standard OAuth2 token. `access_token_authz` additionally embeds a `permissions` claim listing the permissions granted to the subject for this API."
|
|
5055
|
-
},
|
|
5056
|
-
"token_lifetime": {
|
|
5057
|
-
"type": "integer",
|
|
5058
|
-
"description": "Access_token lifetime in seconds. Defaults to 86400 (24h) if omitted.",
|
|
5059
|
-
"minimum": 60,
|
|
5060
|
-
"maximum": 2592000
|
|
5061
|
-
},
|
|
5062
|
-
"enforce_policies": {
|
|
5063
|
-
"type": "boolean",
|
|
5064
|
-
"description": "When true, requested scopes are filtered against `permissions` at token issuance."
|
|
4922
|
+
"description": "Role-based access control. When true, a token issued to a user carries only the permissions of this API granted to the user's roles (account-level role assignments, not team roles): `permissions` lists all of them, and `scope` keeps only the requested ones the user holds. Machine-to-machine tokens (`client_credentials`) are not affected. The `permissions` claim requires `token_dialect: access_token_authz`."
|
|
5065
4923
|
},
|
|
5066
4924
|
"allow_offline_access": {
|
|
5067
4925
|
"type": "boolean",
|
|
5068
|
-
"description": "When true,
|
|
5069
|
-
},
|
|
5070
|
-
"consent_options": {
|
|
5071
|
-
"type": "object",
|
|
5072
|
-
"required": [
|
|
5073
|
-
"claim",
|
|
5074
|
-
"label",
|
|
5075
|
-
"url",
|
|
5076
|
-
"audience"
|
|
5077
|
-
],
|
|
5078
|
-
"properties": {
|
|
5079
|
-
"claim": {
|
|
5080
|
-
"type": "string",
|
|
5081
|
-
"pattern": "^[a-z][a-z0-9_]{0,31}$",
|
|
5082
|
-
"description": "Access token claim that carries the chosen id."
|
|
5083
|
-
},
|
|
5084
|
-
"label": {
|
|
5085
|
-
"type": "string",
|
|
5086
|
-
"maxLength": 60,
|
|
5087
|
-
"description": "What the screen asks for, e.g. \"Project\"."
|
|
5088
|
-
},
|
|
5089
|
-
"url": {
|
|
5090
|
-
"type": "string",
|
|
5091
|
-
"pattern": "^https://",
|
|
5092
|
-
"description": "GET endpoint of the resource server that lists the choices."
|
|
5093
|
-
},
|
|
5094
|
-
"audience": {
|
|
5095
|
-
"type": "string",
|
|
5096
|
-
"description": "Identifier of a registered API the listing token is issued for (usually the resource server behind `url`)."
|
|
5097
|
-
},
|
|
5098
|
-
"scope": {
|
|
5099
|
-
"type": "string",
|
|
5100
|
-
"description": "Space-separated permissions of the listing token. The token is delegated (`act`): the resource server sees auth acting for the user with only these, never the user’s full powers — an admin is listed their own choices, not the whole platform’s."
|
|
5101
|
-
}
|
|
5102
|
-
}
|
|
5103
|
-
|
|
5104
|
-
|
|
5105
|
-
|
|
5106
|
-
"
|
|
5107
|
-
|
|
5108
|
-
"
|
|
5109
|
-
|
|
5110
|
-
|
|
5111
|
-
|
|
5112
|
-
|
|
5113
|
-
"
|
|
5114
|
-
|
|
5115
|
-
|
|
5116
|
-
|
|
5117
|
-
"
|
|
5118
|
-
|
|
5119
|
-
|
|
5120
|
-
|
|
5121
|
-
|
|
5122
|
-
|
|
5123
|
-
|
|
5124
|
-
|
|
5125
|
-
|
|
5126
|
-
|
|
5127
|
-
|
|
5128
|
-
|
|
5129
|
-
|
|
5130
|
-
|
|
5131
|
-
|
|
5132
|
-
|
|
5133
|
-
|
|
5134
|
-
|
|
5135
|
-
|
|
5136
|
-
|
|
5137
|
-
|
|
5138
|
-
|
|
5139
|
-
|
|
5140
|
-
|
|
5141
|
-
|
|
5142
|
-
|
|
5143
|
-
|
|
5144
|
-
|
|
5145
|
-
|
|
5146
|
-
|
|
5147
|
-
|
|
5148
|
-
|
|
5149
|
-
"
|
|
5150
|
-
"
|
|
5151
|
-
|
|
5152
|
-
|
|
5153
|
-
|
|
5154
|
-
|
|
5155
|
-
|
|
5156
|
-
|
|
5157
|
-
|
|
5158
|
-
|
|
5159
|
-
|
|
5160
|
-
|
|
5161
|
-
|
|
5162
|
-
|
|
5163
|
-
|
|
5164
|
-
|
|
5165
|
-
|
|
5166
|
-
|
|
5167
|
-
|
|
5168
|
-
|
|
5169
|
-
|
|
5170
|
-
|
|
5171
|
-
|
|
5172
|
-
|
|
5173
|
-
|
|
5174
|
-
|
|
5175
|
-
|
|
5176
|
-
|
|
5177
|
-
|
|
5178
|
-
|
|
5179
|
-
|
|
5180
|
-
|
|
5181
|
-
|
|
5182
|
-
|
|
5183
|
-
|
|
5184
|
-
|
|
5185
|
-
|
|
5186
|
-
|
|
5187
|
-
|
|
5188
|
-
|
|
5189
|
-
|
|
5190
|
-
|
|
5191
|
-
|
|
5192
|
-
|
|
5193
|
-
|
|
5194
|
-
"
|
|
5195
|
-
"
|
|
5196
|
-
|
|
5197
|
-
|
|
5198
|
-
"
|
|
5199
|
-
"
|
|
5200
|
-
},
|
|
5201
|
-
"
|
|
5202
|
-
"
|
|
5203
|
-
|
|
4926
|
+
"description": "When true, the API is eligible to be the target of a `refresh_token` (i.e. clients can request `offline_access` against it)."
|
|
4927
|
+
},
|
|
4928
|
+
"consent_options": {
|
|
4929
|
+
"type": "object",
|
|
4930
|
+
"required": [
|
|
4931
|
+
"claim",
|
|
4932
|
+
"label",
|
|
4933
|
+
"url",
|
|
4934
|
+
"audience"
|
|
4935
|
+
],
|
|
4936
|
+
"properties": {
|
|
4937
|
+
"claim": {
|
|
4938
|
+
"type": "string",
|
|
4939
|
+
"pattern": "^[a-z][a-z0-9_]{0,31}$",
|
|
4940
|
+
"description": "Access token claim that carries the chosen id."
|
|
4941
|
+
},
|
|
4942
|
+
"label": {
|
|
4943
|
+
"type": "string",
|
|
4944
|
+
"maxLength": 60,
|
|
4945
|
+
"description": "What the screen asks for, e.g. \"Project\"."
|
|
4946
|
+
},
|
|
4947
|
+
"url": {
|
|
4948
|
+
"type": "string",
|
|
4949
|
+
"pattern": "^https://",
|
|
4950
|
+
"description": "GET endpoint of the resource server that lists the choices."
|
|
4951
|
+
},
|
|
4952
|
+
"audience": {
|
|
4953
|
+
"type": "string",
|
|
4954
|
+
"description": "Identifier of a registered API the listing token is issued for (usually the resource server behind `url`)."
|
|
4955
|
+
},
|
|
4956
|
+
"scope": {
|
|
4957
|
+
"type": "string",
|
|
4958
|
+
"description": "Space-separated permissions of the listing token. The token is delegated (`act`): the resource server sees auth acting for the user with only these, never the user’s full powers — an admin is listed their own choices, not the whole platform’s."
|
|
4959
|
+
}
|
|
4960
|
+
},
|
|
4961
|
+
"nullable": true
|
|
4962
|
+
},
|
|
4963
|
+
"delegation": {
|
|
4964
|
+
"type": "object",
|
|
4965
|
+
"required": [
|
|
4966
|
+
"client_id",
|
|
4967
|
+
"audience"
|
|
4968
|
+
],
|
|
4969
|
+
"properties": {
|
|
4970
|
+
"client_id": {
|
|
4971
|
+
"type": "string",
|
|
4972
|
+
"description": "The confidential client of the resource server allowed to exchange."
|
|
4973
|
+
},
|
|
4974
|
+
"audience": {
|
|
4975
|
+
"type": "string",
|
|
4976
|
+
"description": "Identifier of the registered API the new token is for."
|
|
4977
|
+
}
|
|
4978
|
+
},
|
|
4979
|
+
"nullable": true
|
|
4980
|
+
},
|
|
4981
|
+
"skip_consent": {
|
|
4982
|
+
"type": "boolean",
|
|
4983
|
+
"description": "When true, the consent prompt is skipped for first-party clients (clients owned by the same tenant as the API)."
|
|
4984
|
+
},
|
|
4985
|
+
"include_teams_in_access_token": {
|
|
4986
|
+
"type": "boolean",
|
|
4987
|
+
"description": "When true, access_tokens issued for this API carry a `teams` claim listing the slugs of the teams the subject is a member of within the tenant."
|
|
4988
|
+
},
|
|
4989
|
+
"include_roles_in_access_token": {
|
|
4990
|
+
"type": "boolean",
|
|
4991
|
+
"description": "When true, access_tokens issued for this API carry a `roles` claim listing the names of the roles the subject holds across their team memberships within the tenant."
|
|
4992
|
+
},
|
|
4993
|
+
"include_teams_in_id_token": {
|
|
4994
|
+
"type": "boolean",
|
|
4995
|
+
"description": "When true, id_tokens issued together with an access_token for this API carry a `teams` claim with the subject team slugs. The id_token only sees the flag when the client requested `audience=` so this API is resolved at issuance time."
|
|
4996
|
+
},
|
|
4997
|
+
"include_roles_in_id_token": {
|
|
4998
|
+
"type": "boolean",
|
|
4999
|
+
"description": "When true, id_tokens issued together with an access_token for this API carry a `roles` claim with the subject role names. Same audience caveat as `include_teams_in_id_token`."
|
|
5000
|
+
},
|
|
5001
|
+
"account": {
|
|
5002
|
+
"type": "string",
|
|
5003
|
+
"description": "Object is related with this account"
|
|
5004
|
+
},
|
|
5005
|
+
"metadata": {
|
|
5006
|
+
"type": "object",
|
|
5007
|
+
"properties": {},
|
|
5008
|
+
"additionalProperties": true,
|
|
5009
|
+
"description": "ApiMetadata",
|
|
5010
|
+
"default": {}
|
|
5011
|
+
},
|
|
5012
|
+
"createdAt": {
|
|
5013
|
+
"type": "string",
|
|
5014
|
+
"description": "Api creation date"
|
|
5015
|
+
},
|
|
5016
|
+
"updatedAt": {
|
|
5017
|
+
"type": "string",
|
|
5018
|
+
"description": "Api updated date"
|
|
5019
|
+
}
|
|
5020
|
+
},
|
|
5021
|
+
"description": "Api"
|
|
5022
|
+
},
|
|
5023
|
+
"ApiMetadata": {
|
|
5024
|
+
"type": "object",
|
|
5025
|
+
"properties": {},
|
|
5026
|
+
"additionalProperties": true,
|
|
5027
|
+
"description": "ApiMetadata",
|
|
5028
|
+
"default": {}
|
|
5029
|
+
},
|
|
5030
|
+
"ApiCreate": {
|
|
5031
|
+
"type": "object",
|
|
5032
|
+
"required": [
|
|
5033
|
+
"name",
|
|
5034
|
+
"identifier"
|
|
5035
|
+
],
|
|
5036
|
+
"properties": {
|
|
5037
|
+
"name": {
|
|
5038
|
+
"type": "string",
|
|
5039
|
+
"description": "Human-readable name for the API.",
|
|
5040
|
+
"example": "My Backend API"
|
|
5041
|
+
},
|
|
5042
|
+
"identifier": {
|
|
5043
|
+
"type": "string",
|
|
5044
|
+
"description": "Audience URL clients pass as `audience=` when requesting a token for this API. Must be unique within the tenant and is immutable after creation.",
|
|
5045
|
+
"example": "https://api.faable.com"
|
|
5046
|
+
},
|
|
5047
|
+
"description": {
|
|
5048
|
+
"type": "string",
|
|
5049
|
+
"description": "Optional human-readable description of the API."
|
|
5050
|
+
},
|
|
5051
|
+
"permissions": {
|
|
5052
|
+
"type": "array",
|
|
5053
|
+
"items": {
|
|
5054
|
+
"$ref": "#/components/schemas/PermissionCreate"
|
|
5055
|
+
},
|
|
5056
|
+
"description": "Set of permissions (scopes) this API exposes. Tokens issued with `audience=identifier` will only carry these in their `permissions` claim.",
|
|
5057
|
+
"default": []
|
|
5058
|
+
},
|
|
5059
|
+
"signing_alg": {
|
|
5060
|
+
"anyOf": [
|
|
5061
|
+
{
|
|
5062
|
+
"type": "string",
|
|
5063
|
+
"enum": [
|
|
5064
|
+
"RS256"
|
|
5065
|
+
]
|
|
5066
|
+
}
|
|
5067
|
+
],
|
|
5068
|
+
"description": "JWA algorithm used to sign access_tokens issued for this API. Currently only RS256 (the account keystore default) is implemented."
|
|
5069
|
+
},
|
|
5070
|
+
"token_dialect": {
|
|
5071
|
+
"anyOf": [
|
|
5072
|
+
{
|
|
5073
|
+
"type": "string",
|
|
5074
|
+
"enum": [
|
|
5075
|
+
"access_token"
|
|
5076
|
+
]
|
|
5077
|
+
},
|
|
5078
|
+
{
|
|
5079
|
+
"type": "string",
|
|
5080
|
+
"enum": [
|
|
5081
|
+
"access_token_authz"
|
|
5082
|
+
]
|
|
5083
|
+
}
|
|
5084
|
+
],
|
|
5085
|
+
"description": "Shape of access_tokens issued for this API. `access_token` emits the standard OAuth2 token. `access_token_authz` additionally embeds a `permissions` claim listing the permissions granted to the subject for this API."
|
|
5086
|
+
},
|
|
5087
|
+
"token_lifetime": {
|
|
5088
|
+
"type": "integer",
|
|
5089
|
+
"description": "Access_token lifetime in seconds. Defaults to 86400 (24h) if omitted.",
|
|
5090
|
+
"minimum": 60,
|
|
5091
|
+
"maximum": 2592000
|
|
5092
|
+
},
|
|
5093
|
+
"enforce_policies": {
|
|
5094
|
+
"type": "boolean",
|
|
5095
|
+
"description": "When true, requested scopes are filtered against `permissions` at token issuance."
|
|
5096
|
+
},
|
|
5097
|
+
"rbac": {
|
|
5098
|
+
"type": "boolean",
|
|
5099
|
+
"description": "When true, user tokens carry only the permissions granted to the user's roles. Defaults to false."
|
|
5100
|
+
},
|
|
5101
|
+
"allow_offline_access": {
|
|
5102
|
+
"type": "boolean",
|
|
5103
|
+
"description": "When true, clients can request `offline_access` and receive a refresh_token for this API."
|
|
5104
|
+
},
|
|
5105
|
+
"consent_options": {
|
|
5106
|
+
"type": "object",
|
|
5107
|
+
"required": [
|
|
5108
|
+
"claim",
|
|
5109
|
+
"label",
|
|
5110
|
+
"url",
|
|
5111
|
+
"audience"
|
|
5112
|
+
],
|
|
5113
|
+
"properties": {
|
|
5114
|
+
"claim": {
|
|
5115
|
+
"type": "string",
|
|
5116
|
+
"pattern": "^[a-z][a-z0-9_]{0,31}$",
|
|
5117
|
+
"description": "Access token claim that carries the chosen id."
|
|
5118
|
+
},
|
|
5119
|
+
"label": {
|
|
5120
|
+
"type": "string",
|
|
5121
|
+
"maxLength": 60,
|
|
5122
|
+
"description": "What the screen asks for, e.g. \"Project\"."
|
|
5123
|
+
},
|
|
5124
|
+
"url": {
|
|
5125
|
+
"type": "string",
|
|
5126
|
+
"pattern": "^https://",
|
|
5127
|
+
"description": "GET endpoint of the resource server that lists the choices."
|
|
5128
|
+
},
|
|
5129
|
+
"audience": {
|
|
5130
|
+
"type": "string",
|
|
5131
|
+
"description": "Identifier of a registered API the listing token is issued for (usually the resource server behind `url`)."
|
|
5132
|
+
},
|
|
5133
|
+
"scope": {
|
|
5134
|
+
"type": "string",
|
|
5135
|
+
"description": "Space-separated permissions of the listing token. The token is delegated (`act`): the resource server sees auth acting for the user with only these, never the user’s full powers — an admin is listed their own choices, not the whole platform’s."
|
|
5136
|
+
}
|
|
5137
|
+
}
|
|
5138
|
+
},
|
|
5139
|
+
"delegation": {
|
|
5140
|
+
"type": "object",
|
|
5141
|
+
"required": [
|
|
5142
|
+
"client_id",
|
|
5143
|
+
"audience"
|
|
5144
|
+
],
|
|
5145
|
+
"properties": {
|
|
5146
|
+
"client_id": {
|
|
5147
|
+
"type": "string",
|
|
5148
|
+
"description": "The confidential client of the resource server allowed to exchange."
|
|
5149
|
+
},
|
|
5150
|
+
"audience": {
|
|
5151
|
+
"type": "string",
|
|
5152
|
+
"description": "Identifier of the registered API the new token is for."
|
|
5153
|
+
}
|
|
5154
|
+
}
|
|
5155
|
+
},
|
|
5156
|
+
"skip_consent": {
|
|
5157
|
+
"type": "boolean",
|
|
5158
|
+
"description": "When true, skip the consent prompt for first-party clients."
|
|
5159
|
+
},
|
|
5160
|
+
"include_teams_in_access_token": {
|
|
5161
|
+
"type": "boolean",
|
|
5162
|
+
"description": "When true, access_tokens issued for this API carry a `teams` claim with the subject team slugs."
|
|
5163
|
+
},
|
|
5164
|
+
"include_roles_in_access_token": {
|
|
5165
|
+
"type": "boolean",
|
|
5166
|
+
"description": "When true, access_tokens issued for this API carry a `roles` claim with the subject role names."
|
|
5167
|
+
},
|
|
5168
|
+
"include_teams_in_id_token": {
|
|
5169
|
+
"type": "boolean",
|
|
5170
|
+
"description": "When true, id_tokens issued together with an access_token for this API carry a `teams` claim with the subject team slugs."
|
|
5171
|
+
},
|
|
5172
|
+
"include_roles_in_id_token": {
|
|
5173
|
+
"type": "boolean",
|
|
5174
|
+
"description": "When true, id_tokens issued together with an access_token for this API carry a `roles` claim with the subject role names."
|
|
5175
|
+
}
|
|
5176
|
+
},
|
|
5177
|
+
"additionalProperties": false,
|
|
5178
|
+
"description": "Payload for creating an Api (a.k.a. Resource Server / Audience). The `identifier` becomes the `aud` claim in tokens issued for this API and cannot be changed after creation."
|
|
5179
|
+
},
|
|
5180
|
+
"ApiUpdate": {
|
|
5181
|
+
"type": "object",
|
|
5182
|
+
"properties": {
|
|
5183
|
+
"name": {
|
|
5184
|
+
"type": "string",
|
|
5185
|
+
"description": "Human-readable name for the API."
|
|
5186
|
+
},
|
|
5187
|
+
"description": {
|
|
5188
|
+
"type": "string",
|
|
5189
|
+
"description": "Optional human-readable description of the API."
|
|
5190
|
+
},
|
|
5191
|
+
"permissions": {
|
|
5192
|
+
"type": "array",
|
|
5193
|
+
"items": {
|
|
5194
|
+
"$ref": "#/components/schemas/PermissionCreate"
|
|
5195
|
+
},
|
|
5196
|
+
"description": "Replaces the full permissions list. Tokens issued AFTER the update will use the new list; tokens already in circulation are unchanged."
|
|
5197
|
+
},
|
|
5198
|
+
"signing_alg": {
|
|
5199
|
+
"anyOf": [
|
|
5200
|
+
{
|
|
5201
|
+
"type": "string",
|
|
5202
|
+
"enum": [
|
|
5203
|
+
"RS256"
|
|
5204
|
+
]
|
|
5205
|
+
}
|
|
5206
|
+
],
|
|
5207
|
+
"description": "JWA algorithm used to sign access_tokens issued for this API. Currently only RS256 (the account keystore default) is implemented."
|
|
5208
|
+
},
|
|
5209
|
+
"token_dialect": {
|
|
5210
|
+
"anyOf": [
|
|
5211
|
+
{
|
|
5212
|
+
"type": "string",
|
|
5213
|
+
"enum": [
|
|
5214
|
+
"access_token"
|
|
5215
|
+
]
|
|
5216
|
+
},
|
|
5217
|
+
{
|
|
5218
|
+
"type": "string",
|
|
5219
|
+
"enum": [
|
|
5220
|
+
"access_token_authz"
|
|
5221
|
+
]
|
|
5222
|
+
}
|
|
5223
|
+
],
|
|
5224
|
+
"description": "Shape of access_tokens issued for this API. `access_token` emits the standard OAuth2 token. `access_token_authz` additionally embeds a `permissions` claim listing the permissions granted to the subject for this API."
|
|
5225
|
+
},
|
|
5226
|
+
"token_lifetime": {
|
|
5227
|
+
"type": "integer",
|
|
5228
|
+
"description": "Access_token lifetime in seconds.",
|
|
5229
|
+
"minimum": 60,
|
|
5230
|
+
"maximum": 2592000
|
|
5231
|
+
},
|
|
5232
|
+
"enforce_policies": {
|
|
5233
|
+
"type": "boolean",
|
|
5234
|
+
"description": "When true, requested scopes are filtered against `permissions` at token issuance."
|
|
5235
|
+
},
|
|
5236
|
+
"rbac": {
|
|
5237
|
+
"type": "boolean",
|
|
5238
|
+
"description": "When true, user tokens carry only the permissions granted to the user's roles. Applies to tokens issued after the update, including refreshes."
|
|
5239
|
+
},
|
|
5240
|
+
"allow_offline_access": {
|
|
5241
|
+
"type": "boolean",
|
|
5242
|
+
"description": "When true, clients can request `offline_access` and receive a refresh_token for this API."
|
|
5204
5243
|
},
|
|
5205
5244
|
"consent_options": {
|
|
5206
5245
|
"type": "object",
|
|
@@ -9657,7 +9696,7 @@
|
|
|
9657
9696
|
},
|
|
9658
9697
|
"ErrorCode": {
|
|
9659
9698
|
"type": "string",
|
|
9660
|
-
"description": "Machine-readable error code. One HTTP status per code.\n\n- `bad_request` (400): The request is malformed. `message` says what is wrong.\n- `validation_error` (400): The body, query or path failed schema validation. `details.issues` lists each failing field.\n- `unauthorized` (401): The request carries no valid credentials.\n- `payment_required` (402): The feature is not included in the current plan.\n- `forbidden` (403): The credentials are valid but do not allow this operation.\n- `not_found` (404): The resource does not exist in this account.\n- `method_not_allowed` (405): The HTTP method is not supported on this path.\n- `conflict` (409): The request conflicts with the current state of the resource.\n- `last_sign_in_method` (409): Unlinking this account would leave the user with no way to sign in: set a password, verify the email or link another account first.\n- `payload_too_large` (413): The request body exceeds the size limit.\n- `unsupported_media_type` (415): The `Content-Type` is not accepted by this endpoint.\n- `unprocessable_entity` (422): The request is well-formed but cannot be processed.\n- `too_many_requests` (429): Rate limit exceeded. Honour the `Retry-After` header.\n- `internal_error` (500): Unexpected server error. Retry later; the request id is logged.\n- `already_exists` (400): A resource with the same unique field already exists (for a user, usually `email`). `details.fields` names the field.\n- `invalid_id` (400): The id in the path is not a valid id for this resource.\n- `account_not_found` (404): No Auth Account matches the request (domain, header or token).\n- `invalid_query` (400): The `?query=` FaableQL expression could not be parsed.\n- `search_not_supported` (400): This resource does not support `?search=`.\n- `invalid_expand` (400): An `?expand=` path is not allowed on this resource.\n- `access_denied` (403): The caller may not access this row (ownership or machine-to-machine restriction).\n- `insufficient_scope` (403): The token lacks a scope this operation requires. `message` names it.\n- `team_required` (400): An Auth Account must belong to a project (team).\n- `account_limit_reached` (409): The project already has the maximum number of Auth Accounts.\n- `invalid_project_id` (400): The project id is not of the form `project_<hex>` or `team_<hex>`.\n- `account_transfer_refused` (409): The Auth Account cannot be moved to that project. `details.blockers` lists why.\n- `email_sender_domain_not_allowed` (400): The sender address is not in a domain this platform signs email for (AUTH_EMAIL_SENDER_DOMAINS).\n- `plan_required` (402): The setting requires a higher plan. `message` says which.\n- `invalid_canonical_host` (400): `canonical_host` must be this account's own platform host or one of its verified custom domains.\n- `canonical_host_breaks_passkeys` (400): `canonical_host` is outside the account's current WebAuthn RP ID — every passkey already enrolled would stop working. Set `webauthn_rp_id` in the same request to a suffix that covers both.\n- `not_logged_in` (401): There is no signed-in session for this request.\n- `session_already_revoked` (409): The session was already revoked.\n- `invalid_token` (401): The bearer token is missing, malformed, expired or has no subject.\n- `not_owner` (403): The caller may only perform this operation on their own user.\n- `user_suspended` (403): The user is suspended and cannot sign in or be modified.\n- `invalid_credentials` (400): The email/username or password is incorrect.\n- `login_denied` (401): A post-login Action denied the sign-in. `message` carries the reason it gave. On token grants it is a 403 with `error: invalid_grant`.\n- `signup_denied` (403): A pre-signup Action or an active block denied the sign-up. `message` carries the reason.\n- `client_credentials_denied` (401): An Action denied the client_credentials grant. `message` carries the reason.\n- `m2m_quota_exceeded` (402): The project used the machine-to-machine tokens its plan includes this month. Free is capped; Hobby and Pro are billed per token instead.\n- `signup_disabled` (403): Self-service sign-up is disabled on this connection.\n- `email_taken` (409): Another user in this account already uses that email.\n- `username_taken` (409): Another user of this database connection already uses that username.\n- `invalid_username` (400): The username is empty, or contains an `@` or whitespace. `message` says which.\n- `invalid_email` (400): The email address is not valid.\n- `invalid_name` (400): The name contains a link. `message` says which field.\n- `same_email` (400): The new email is the same as the current one.\n- `user_has_no_email` (400): The operation needs an email but the user has none.\n- `password_too_weak` (400): The password does not meet the connection policy. `message` lists each unmet rule.\n- `invalid_password_hash` (400): The imported password hash cannot be read, or its cost is above what a login can afford. `message` names the field.\n- `weak_password_hash` (400): The imported password hash uses a fast digest (MD5, SHA-1, SHA-2) or a cost below the minimum. `message` says which.\n- `invalid_code` (400): The verification code is wrong, expired or already used.\n- `invalid_phone` (400): The phone number is not E.164 and could not be resolved with the account default country. Include the country code.\n- `phone_changed` (400): The phone on the user changed after the code was sent. Start again.\n- `phone_already_verified` (409): The user already has a verified phone; the number cannot be swapped from the screen.\n- `sms_unavailable` (409): This account cannot send SMS right now. The suffix says why: `sms_unavailable:plan`, `:quota`, `:provider`.\n- `sms_failed` (409): The SMS provider rejected the message.\n- `invalid_state` (400): The `state` is missing, expired, or does not describe a resumable step.\n- `state_mismatch` (401): The `state` belongs to another account, session, client or ceremony.\n- `invalid_ticket` (400): The ticket does not exist or is not the kind this endpoint accepts.\n- `ticket_used` (400): The ticket was already consumed.\n- `ticket_expired` (400): The ticket is past its expiry.\n- `ticket_not_found` (404): No ticket with that id belongs to this user.\n- `credential_not_found` (404): The user has no password credential on this connection.\n- `invalid_link` (400): The magic link is malformed.\n- `expired_link` (400): The magic link token was not found or has expired.\n- `invalid_otp` (401): The one-time password is wrong or expired.\n- `invalid_client` (400): The `client_id` in the request does not name a client of this account.\n- `client_not_found` (404): No client with that `client_id`.\n- `client_mismatch` (401): The client belongs to a different account.\n- `invalid_client_metadata` (400): Dynamic client registration rejected a field (RFC 7591). `message` names it.\n- `invalid_connection` (400): The connection does not exist, is disabled, or is not of the type this flow needs.\n- `no_database_connection` (400): The tenant has no database connection, so there is nowhere to store a password. Create one and retry.\n- `connection_required` (400): No connection was given and the client has no `default_connection`.\n- `connection_misconfigured` (400): The connection is missing settings needed to talk to its provider.\n- `passwordless_unavailable` (400): No passwordless connection is configured or enabled for this client.\n- `ambiguous_connection` (400): Several connections match; pass `connection_id`.\n- `invalid_redirect_uri` (400): The redirect URI is not registered for the client.\n- `invalid_saml_request` (400): The SAMLRequest is missing, too large, not well-formed or not a SAML 2.0 AuthnRequest.\n- `saml_sp_mismatch` (400): The AuthnRequest does not match the client's SAML configuration: its Issuer is not the configured entity_id, or it asks for another Assertion Consumer Service URL or binding.\n- `saml_not_enabled` (404): This client does not have SAML enabled.\n- `invalid_saml_sp` (400): The `saml_sp` configuration is invalid: `acs_url` must be an absolute https URL without a fragment.\n- `origin_not_allowed` (403): The request `Origin` is not in the client's Allowed Web Origins.\n- `audience_not_found` (403): The `audience` does not name an API registered in this account.\n- `system_resource` (403): The resource is managed by Faable and cannot be modified or deleted.\n- `invalid_request` (400): A required OAuth parameter is missing or two of them are incompatible. `message` says which.\n- `invalid_device_code` (400): The device or user code is invalid or expired.\n- `provider_error` (400): The upstream identity provider returned an error. The suffix is the provider’s own code, when it sent one: `provider_error:bad_refresh_token` (the user must re-authorize), `provider_error:incorrect_client_credentials` (our configuration, the user can do nothing). `details.provider_error_description` carries the provider’s sentence.\n- `identity_already_linked` (409): That external identity is already linked to another user.\n- `identity_link_denied` (409): That external identity cannot be linked to this user.\n- `identity_conflict` (409): The user already has a linked identity for this connection.\n- `identity_orphaned` (400): The identity pointed at a user that no longer exists; it was removed. Sign in again.\n- `no_provider_token` (400): The identity holds no provider access token.\n- `no_refresh_token` (400): The identity holds no provider refresh token, so it cannot be refreshed.\n- `action_unavailable` (401): The Action that paused this login is disabled or belongs elsewhere.\n- `login_flow_misconfigured` (500): The login flow of this account cannot run. `message` carries the node error.\n- `mfa_required` (403): The login needs a second factor that this flow cannot collect, or one is still pending on the session.\n- `step_up_required` (403): Confirm an existing factor before changing your factors.\n- `reauth_required` (403): The operation needs a recent sign-in (and the second factor, when the user has one). Sign in again with `max_age=0` and retry with the new token.\n- `invalid_current_password` (400): The current password is wrong.\n- `email_not_verified` (403): The user's email is not verified, and the operation needs it to be.\n- `invalid_profile_field` (400): A profile field is not declared for this application, or its value does not match the declaration. `message` names the key.\n- `interaction_required` (403): An Action asked for a redirect on a non-interactive flow.\n- `passkey_login_disabled` (400): Sign in with a passkey is not enabled for this client.\n- `mfa_pending` (401): A second-factor challenge is pending; answer it before continuing.\n- `mfa_invalid_code` (401): The authenticator code did not verify.\n- `mfa_invalid_recovery_code` (401): The recovery code did not verify.\n- `too_many_attempts` (429): Too many wrong codes. Wait a few minutes and try again.\n- `too_many_login_attempts` (429): Too many failed sign-in attempts for this email or username from this network. Wait a few minutes and try again.\n- `totp_not_allowed` (401): This account does not accept authenticator apps.\n- `no_usable_factor` (400): The user has no confirmed second factor to challenge.\n- `factor_not_found` (400): No factor with that id belongs to this user.\n- `factor_already_confirmed` (400): The factor was already confirmed.\n- `invalid_factor` (400): The factor cannot be verified (no secret material).\n- `session_missing` (401): The session that started this login no longer exists.\n- `passkey_verification_failed` (400): The WebAuthn response could not be verified.\n- `no_passkey_enrolled` (400): The user has no passkey to sign in with.\n- `malformed_credential` (400): The WebAuthn credential is malformed.\n- `unknown_passkey` (401): The passkey is not enrolled for this user.\n- `invalid_passkey` (401): The passkey assertion did not verify.\n- `invalid_invite_url` (400): An invite's `accept_url` or `redirect_uri` is not an http(s) URL at an origin of this tenant's client callbacks or `callback_hostnames`, or it carries a fragment.\n- `invite_email_mismatch` (403): The invite is for another email address than the accepting user's. `details.invited_email` shows it masked.\n- `invite_email_unverified` (403): The accepting user's email matches the invite but is not verified yet.\n- `invite_not_found` (404): No invite with that id in this account.\n- `invite_used` (400): The invite was already accepted.\n- `already_member` (400): The user is already a member of the team.\n- `not_a_member` (404): The user is not a member of the team.\n- `consent_options_unavailable` (502): The consent screen could not load the choices from the API being authorized (its `consent_options.url`). Try again in a moment.\n- `consent_choice_invalid` (400): The choice sent with the consent decision is not one the API offered for this user.\n- `registration_disabled` (403): Dynamic client registration is turned off for this tenant. Create the client from the dashboard or the Management API, or turn on `dynamic_client_registration_enabled`.\n- `invalid_email_domain` (400): Not an email domain this organization can claim: it must be a plain domain name (`acme.com`), lowercase, without scheme, path or wildcard.\n- `public_email_domain` (400): A public email provider (gmail.com, outlook.com…) cannot belong to an organization: anyone can have an address there.\n- `organization_domain_not_found` (404): The organization has no such domain.\n- `organization_domain_taken` (409): Another organization of this tenant already verified this domain. A domain belongs to one organization.\n- `organization_domain_unverified` (400): The TXT record was not found or does not hold the expected value yet. `details.record` says what was expected and what resolves now; DNS can take a few minutes to propagate.\n- `plan_unavailable` (503): The plan could not be checked right now, and this setting is only for paid plans. Try again in a minute.\n- `organization_domain_mismatch` (403): This organization's identity provider can only sign in addresses of the organization's verified email domains.\n- `team_not_in_organization` (400): Auto-join can only put people in teams of the same organization. `details.teams` lists the others.\n- `organization_has_no_idp` (400): Requiring SSO needs an identity provider: bind an `oidc` connection to the organization first.\n- `organization_not_found` (404): No organization with that id in this account.\n- `invalid_user` (400): The user does not exist in this account.\n- `not_an_organization_admin` (404): The user is not an admin of the organization.\n- `last_organization_admin` (409): An organization keeps at least one admin. Add another admin before removing this one.\n- `team_id_unavailable` (409): The team id cannot be used in this tenant. Pick another id or let the API generate one.\n- `use_team_member_route` (400): This generic route cannot create memberships. Use `POST /team/{team_id}/member` for team members or `POST /role/{role_id}/users` for role grants.\n- `role_not_found` (404): No role with that id in this account.\n- `invalid_role` (400): The role belongs to another account.\n- `flow_not_found` (400): The login flow does not exist in this account.\n- `revision_not_found` (404): The revision is not in the flow history.\n- `invalid_webhook_event` (400): An event is not in the webhook event catalog. `message` and `details.valid_events` list the valid ones.\n- `invalid_webhook_url` (400): The webhook URL must be an absolute `https` URL.\n- `not_a_webhook` (400): The operation only applies to `webhook` subscriptions.\n- `delivery_not_found` (404): No webhook delivery with that id for this subscription.\n- `delivery_in_progress` (409): The delivery is being attempted right now; retry the redeliver in a minute.",
|
|
9699
|
+
"description": "Machine-readable error code. One HTTP status per code.\n\n- `bad_request` (400): The request is malformed. `message` says what is wrong.\n- `validation_error` (400): The body, query or path failed schema validation. `details.issues` lists each failing field.\n- `unauthorized` (401): The request carries no valid credentials.\n- `payment_required` (402): The feature is not included in the current plan.\n- `forbidden` (403): The credentials are valid but do not allow this operation.\n- `not_found` (404): The resource does not exist in this account.\n- `method_not_allowed` (405): The HTTP method is not supported on this path.\n- `conflict` (409): The request conflicts with the current state of the resource.\n- `last_sign_in_method` (409): Unlinking this account would leave the user with no way to sign in: set a password, verify the email or link another account first.\n- `payload_too_large` (413): The request body exceeds the size limit.\n- `unsupported_media_type` (415): The `Content-Type` is not accepted by this endpoint.\n- `unprocessable_entity` (422): The request is well-formed but cannot be processed.\n- `too_many_requests` (429): Rate limit exceeded. Honour the `Retry-After` header.\n- `internal_error` (500): Unexpected server error. Retry later; the request id is logged.\n- `already_exists` (400): A resource with the same unique field already exists (for a user, usually `email`). `details.fields` names the field.\n- `invalid_id` (400): The id in the path is not a valid id for this resource.\n- `account_not_found` (404): No Auth Account matches the request (domain, header or token).\n- `invalid_query` (400): The `?query=` FaableQL expression could not be parsed.\n- `search_not_supported` (400): This resource does not support `?search=`.\n- `invalid_expand` (400): An `?expand=` path is not allowed on this resource.\n- `access_denied` (403): The caller may not access this row (ownership or machine-to-machine restriction).\n- `insufficient_scope` (403): The token lacks a scope this operation requires. `message` names it.\n- `team_required` (400): An Auth Account must belong to a project (team).\n- `account_limit_reached` (409): The project already has the maximum number of Auth Accounts.\n- `invalid_project_id` (400): The project id is not of the form `project_<hex>` or `team_<hex>`.\n- `account_transfer_refused` (409): The Auth Account cannot be moved to that project. `details.blockers` lists why.\n- `email_sender_domain_not_allowed` (400): The sender address is not in a domain this platform signs email for (AUTH_EMAIL_SENDER_DOMAINS).\n- `plan_required` (402): The setting requires a higher plan. `message` says which.\n- `invalid_canonical_host` (400): `canonical_host` must be this account's own platform host or one of its verified custom domains.\n- `canonical_host_breaks_passkeys` (400): `canonical_host` is outside the account's current WebAuthn RP ID — every passkey already enrolled would stop working. Set `webauthn_rp_id` in the same request to a suffix that covers both.\n- `not_logged_in` (401): There is no signed-in session for this request.\n- `session_already_revoked` (409): The session was already revoked.\n- `invalid_token` (401): The bearer token is missing, malformed, expired or has no subject.\n- `not_owner` (403): The caller may only perform this operation on their own user.\n- `user_suspended` (403): The user is suspended and cannot sign in or be modified.\n- `invalid_credentials` (400): The email/username or password is incorrect.\n- `login_denied` (401): A post-login Action denied the sign-in. `message` carries the reason it gave. On token grants it is a 403 with `error: invalid_grant`.\n- `signup_denied` (403): A pre-signup Action or an active block denied the sign-up. `message` carries the reason.\n- `client_credentials_denied` (401): An Action denied the client_credentials grant. `message` carries the reason.\n- `m2m_quota_exceeded` (402): The project used the machine-to-machine tokens its plan includes this month. Free is capped; Hobby and Pro are billed per token instead.\n- `signup_disabled` (403): Self-service sign-up is disabled on this connection.\n- `email_taken` (409): Another user in this account already uses that email.\n- `username_taken` (409): Another user of this database connection already uses that username.\n- `invalid_username` (400): The username is empty, or contains an `@` or whitespace. `message` says which.\n- `invalid_email` (400): The email address is not valid.\n- `invalid_name` (400): The name contains a link. `message` says which field.\n- `same_email` (400): The new email is the same as the current one.\n- `user_has_no_email` (400): The operation needs an email but the user has none.\n- `password_too_weak` (400): The password does not meet the connection policy. `message` lists each unmet rule.\n- `invalid_password_hash` (400): The imported password hash cannot be read, or its cost is above what a login can afford. `message` names the field.\n- `weak_password_hash` (400): The imported password hash uses a fast digest (MD5, SHA-1, SHA-2) or a cost below the minimum. `message` says which.\n- `invalid_code` (400): The verification code is wrong, expired or already used.\n- `invalid_phone` (400): The phone number is not E.164 and could not be resolved with the account default country. Include the country code.\n- `phone_changed` (400): The phone on the user changed after the code was sent. Start again.\n- `phone_already_verified` (409): The user already has a verified phone; the number cannot be swapped from the screen.\n- `sms_unavailable` (409): This account cannot send SMS right now. The suffix says why: `sms_unavailable:plan`, `:quota`, `:provider`.\n- `sms_failed` (409): The SMS provider rejected the message.\n- `invalid_state` (400): The `state` is missing, expired, or does not describe a resumable step.\n- `state_mismatch` (401): The `state` belongs to another account, session, client or ceremony.\n- `invalid_ticket` (400): The ticket does not exist or is not the kind this endpoint accepts.\n- `ticket_used` (400): The ticket was already consumed.\n- `ticket_expired` (400): The ticket is past its expiry.\n- `ticket_not_found` (404): No ticket with that id belongs to this user.\n- `credential_not_found` (404): The user has no password credential on this connection.\n- `invalid_link` (400): The magic link is malformed.\n- `expired_link` (400): The magic link token was not found or has expired.\n- `invalid_otp` (401): The one-time password is wrong or expired.\n- `invalid_client` (400): The `client_id` in the request does not name a client of this account.\n- `client_not_found` (404): No client with that `client_id`.\n- `client_mismatch` (401): The client belongs to a different account.\n- `invalid_client_metadata` (400): Dynamic client registration rejected a field (RFC 7591). `message` names it.\n- `invalid_connection` (400): The connection does not exist, is disabled, or is not of the type this flow needs.\n- `no_database_connection` (400): The tenant has no database connection, so there is nowhere to store a password. Create one and retry.\n- `connection_required` (400): No connection was given and the client has no `default_connection`.\n- `connection_misconfigured` (400): The connection is missing settings needed to talk to its provider.\n- `passwordless_unavailable` (400): No passwordless connection is configured or enabled for this client.\n- `ambiguous_connection` (400): Several connections match; pass `connection_id`.\n- `invalid_redirect_uri` (400): The redirect URI is not registered for the client.\n- `invalid_saml_request` (400): The SAMLRequest is missing, too large, not well-formed or not a SAML 2.0 AuthnRequest.\n- `saml_sp_mismatch` (400): The AuthnRequest does not match the client's SAML configuration: its Issuer is not the configured entity_id, or it asks for another Assertion Consumer Service URL or binding.\n- `saml_not_enabled` (404): This client does not have SAML enabled.\n- `invalid_saml_sp` (400): The `saml_sp` configuration is invalid: `acs_url` must be an absolute https URL without a fragment.\n- `origin_not_allowed` (403): The request `Origin` is not in the client's Allowed Web Origins.\n- `audience_not_found` (403): The `audience` does not name an API registered in this account.\n- `system_resource` (403): The resource is managed by Faable and cannot be modified or deleted.\n- `invalid_request` (400): A required OAuth parameter is missing or two of them are incompatible. `message` says which.\n- `invalid_device_code` (400): The device or user code is invalid or expired.\n- `provider_error` (400): The upstream identity provider returned an error. The suffix is the provider’s own code, when it sent one: `provider_error:bad_refresh_token` (the user must re-authorize), `provider_error:incorrect_client_credentials` (our configuration, the user can do nothing). `details.provider_error_description` carries the provider’s sentence.\n- `identity_already_linked` (409): That external identity is already linked to another user.\n- `identity_link_denied` (409): That external identity cannot be linked to this user.\n- `identity_conflict` (409): The user already has a linked identity for this connection.\n- `identity_orphaned` (400): The identity pointed at a user that no longer exists; it was removed. Sign in again.\n- `no_provider_token` (400): The identity holds no provider access token.\n- `no_refresh_token` (400): The identity holds no provider refresh token, so it cannot be refreshed.\n- `action_unavailable` (401): The Action that paused this login is disabled or belongs elsewhere.\n- `login_flow_misconfigured` (500): The login flow of this account cannot run. `message` carries the node error.\n- `mfa_required` (403): The login needs a second factor that this flow cannot collect, or one is still pending on the session.\n- `step_up_required` (403): Confirm an existing factor before changing your factors.\n- `reauth_required` (403): The operation needs a recent sign-in (and the second factor, when the user has one). Sign in again with `max_age=0` and retry with the new token.\n- `invalid_current_password` (400): The current password is wrong.\n- `email_not_verified` (403): The user's email is not verified, and the operation needs it to be.\n- `invalid_profile_field` (400): A profile field is not declared for this application, or its value does not match the declaration. `message` names the key.\n- `interaction_required` (403): An Action asked for a redirect on a non-interactive flow.\n- `passkey_login_disabled` (400): Sign in with a passkey is not enabled for this client.\n- `mfa_pending` (401): A second-factor challenge is pending; answer it before continuing.\n- `mfa_invalid_code` (401): The authenticator code did not verify.\n- `mfa_invalid_recovery_code` (401): The recovery code did not verify.\n- `too_many_attempts` (429): Too many wrong codes. Wait a few minutes and try again.\n- `too_many_login_attempts` (429): Too many failed sign-in attempts for this email or username from this network. Wait a few minutes and try again.\n- `totp_not_allowed` (401): This account does not accept authenticator apps.\n- `no_usable_factor` (400): The user has no confirmed second factor to challenge.\n- `factor_not_found` (400): No factor with that id belongs to this user.\n- `factor_already_confirmed` (400): The factor was already confirmed.\n- `invalid_factor` (400): The factor cannot be verified (no secret material).\n- `session_missing` (401): The session that started this login no longer exists.\n- `passkey_verification_failed` (400): The WebAuthn response could not be verified.\n- `no_passkey_enrolled` (400): The user has no passkey to sign in with.\n- `malformed_credential` (400): The WebAuthn credential is malformed.\n- `unknown_passkey` (401): The passkey is not enrolled for this user.\n- `invalid_passkey` (401): The passkey assertion did not verify.\n- `invalid_invite_url` (400): An invite's `accept_url` or `redirect_uri` is not an http(s) URL at an origin of this tenant's client callbacks or `callback_hostnames`, or it carries a fragment.\n- `invite_email_mismatch` (403): The invite is for another email address than the accepting user's. `details.invited_email` shows it masked.\n- `invite_email_unverified` (403): The accepting user's email matches the invite but is not verified yet.\n- `invite_not_found` (404): No invite with that id in this account.\n- `invite_used` (400): The invite was already accepted.\n- `already_member` (400): The user is already a member of the team.\n- `not_a_member` (404): The user is not a member of the team.\n- `consent_options_unavailable` (502): The consent screen could not load the choices from the API being authorized (its `consent_options.url`). Try again in a moment.\n- `consent_choice_invalid` (400): The choice sent with the consent decision is not one the API offered for this user.\n- `registration_disabled` (403): Dynamic client registration is turned off for this tenant. Create the client from the dashboard or the Management API, or turn on `dynamic_client_registration_enabled`.\n- `invalid_email_domain` (400): Not an email domain this organization can claim: it must be a plain domain name (`acme.com`), lowercase, without scheme, path or wildcard.\n- `public_email_domain` (400): A public email provider (gmail.com, outlook.com…) cannot belong to an organization: anyone can have an address there.\n- `organization_domain_not_found` (404): The organization has no such domain.\n- `organization_domain_taken` (409): Another organization of this tenant already verified this domain. A domain belongs to one organization.\n- `organization_domain_unverified` (400): The TXT record was not found or does not hold the expected value yet. `details.record` says what was expected and what resolves now; DNS can take a few minutes to propagate.\n- `plan_unavailable` (503): The plan could not be checked right now, and this setting is only for paid plans. Try again in a minute.\n- `organization_domain_mismatch` (403): This organization's identity provider can only sign in addresses of the organization's verified email domains.\n- `team_not_in_organization` (400): Auto-join can only put people in teams of the same organization. `details.teams` lists the others.\n- `organization_has_no_idp` (400): Requiring SSO needs an identity provider: bind an `oidc` connection to the organization first.\n- `organization_not_found` (404): No organization with that id in this account.\n- `invalid_user` (400): The user does not exist in this account.\n- `not_an_organization_admin` (404): The user is not an admin of the organization.\n- `last_organization_admin` (409): An organization keeps at least one admin. Add another admin before removing this one.\n- `team_id_unavailable` (409): The team id cannot be used in this tenant. Pick another id or let the API generate one.\n- `use_team_member_route` (400): This generic route cannot create memberships. Use `POST /team/{team_id}/member` for team members or `POST /role/{role_id}/users` for role grants.\n- `role_not_found` (404): No role with that id in this account.\n- `invalid_role` (400): The role belongs to another account.\n- `invalid_permission` (400): A permission is not in the catalog of its Api, or the Api is not in this account. `details.permissions` lists the ones refused.\n- `flow_not_found` (400): The login flow does not exist in this account.\n- `revision_not_found` (404): The revision is not in the flow history.\n- `invalid_webhook_event` (400): An event is not in the webhook event catalog. `message` and `details.valid_events` list the valid ones.\n- `invalid_webhook_url` (400): The webhook URL must be an absolute `https` URL.\n- `not_a_webhook` (400): The operation only applies to `webhook` subscriptions.\n- `delivery_not_found` (404): No webhook delivery with that id for this subscription.\n- `delivery_in_progress` (409): The delivery is being attempted right now; retry the redeliver in a minute.",
|
|
9661
9700
|
"enum": [
|
|
9662
9701
|
"bad_request",
|
|
9663
9702
|
"validation_error",
|
|
@@ -9806,6 +9845,7 @@
|
|
|
9806
9845
|
"use_team_member_route",
|
|
9807
9846
|
"role_not_found",
|
|
9808
9847
|
"invalid_role",
|
|
9848
|
+
"invalid_permission",
|
|
9809
9849
|
"flow_not_found",
|
|
9810
9850
|
"revision_not_found",
|
|
9811
9851
|
"invalid_webhook_event",
|
|
@@ -35630,72 +35670,1631 @@
|
|
|
35630
35670
|
}
|
|
35631
35671
|
}
|
|
35632
35672
|
},
|
|
35633
|
-
"/role": {
|
|
35673
|
+
"/role/{role_id}/permissions": {
|
|
35634
35674
|
"get": {
|
|
35635
|
-
"operationId": "role/
|
|
35636
|
-
"summary": "List
|
|
35675
|
+
"operationId": "role/permissions",
|
|
35676
|
+
"summary": "List the permissions of a Role",
|
|
35637
35677
|
"tags": [
|
|
35638
35678
|
"role"
|
|
35639
35679
|
],
|
|
35640
|
-
"description": "
|
|
35680
|
+
"description": "Lists the Api permissions the Role grants, each with its Api. A user gets them in tokens for an Api with `rbac` enabled when the Role is assigned to them at the account level.",
|
|
35641
35681
|
"parameters": [
|
|
35642
35682
|
{
|
|
35643
35683
|
"schema": {
|
|
35644
|
-
"type": "
|
|
35645
|
-
"minimum": 1,
|
|
35646
|
-
"maximum": 200
|
|
35684
|
+
"type": "string"
|
|
35647
35685
|
},
|
|
35648
|
-
"in": "
|
|
35649
|
-
"name": "
|
|
35650
|
-
"required":
|
|
35651
|
-
|
|
35686
|
+
"in": "path",
|
|
35687
|
+
"name": "role_id",
|
|
35688
|
+
"required": true
|
|
35689
|
+
}
|
|
35690
|
+
],
|
|
35691
|
+
"security": [
|
|
35692
|
+
{
|
|
35693
|
+
"bearerAuth": []
|
|
35694
|
+
}
|
|
35695
|
+
],
|
|
35696
|
+
"responses": {
|
|
35697
|
+
"200": {
|
|
35698
|
+
"description": "Default Response",
|
|
35699
|
+
"content": {
|
|
35700
|
+
"application/json": {
|
|
35701
|
+
"schema": {
|
|
35702
|
+
"type": "array",
|
|
35703
|
+
"items": {
|
|
35704
|
+
"type": "object",
|
|
35705
|
+
"required": [
|
|
35706
|
+
"api",
|
|
35707
|
+
"api_identifier",
|
|
35708
|
+
"api_name",
|
|
35709
|
+
"value"
|
|
35710
|
+
],
|
|
35711
|
+
"properties": {
|
|
35712
|
+
"api": {
|
|
35713
|
+
"type": "string",
|
|
35714
|
+
"description": "Id of the Api that defines it."
|
|
35715
|
+
},
|
|
35716
|
+
"api_identifier": {
|
|
35717
|
+
"type": "string",
|
|
35718
|
+
"description": "Audience of that Api: the `aud` of the tokens that carry this permission.",
|
|
35719
|
+
"example": "https://api.example.com"
|
|
35720
|
+
},
|
|
35721
|
+
"api_name": {
|
|
35722
|
+
"type": "string",
|
|
35723
|
+
"description": "Name of that Api."
|
|
35724
|
+
},
|
|
35725
|
+
"value": {
|
|
35726
|
+
"type": "string",
|
|
35727
|
+
"description": "The permission, as it appears in the `permissions` claim.",
|
|
35728
|
+
"example": "invites:write"
|
|
35729
|
+
},
|
|
35730
|
+
"description": {
|
|
35731
|
+
"type": "string",
|
|
35732
|
+
"description": "The permission's description in the Api."
|
|
35733
|
+
}
|
|
35734
|
+
},
|
|
35735
|
+
"additionalProperties": false,
|
|
35736
|
+
"description": "A permission granted by a role, joined with its Api. Permissions whose Api was deleted, or that left its catalog, are not listed: they grant nothing."
|
|
35737
|
+
}
|
|
35738
|
+
}
|
|
35739
|
+
}
|
|
35740
|
+
}
|
|
35741
|
+
},
|
|
35742
|
+
"400": {
|
|
35743
|
+
"description": "`validation_error` — The body, query or path failed schema validation. `details.issues` lists each failing field.",
|
|
35744
|
+
"content": {
|
|
35745
|
+
"application/json": {
|
|
35746
|
+
"schema": {
|
|
35747
|
+
"allOf": [
|
|
35748
|
+
{
|
|
35749
|
+
"$ref": "#/components/schemas/ErrorResponse"
|
|
35750
|
+
},
|
|
35751
|
+
{
|
|
35752
|
+
"type": "object",
|
|
35753
|
+
"properties": {
|
|
35754
|
+
"error_code": {
|
|
35755
|
+
"type": "string",
|
|
35756
|
+
"enum": [
|
|
35757
|
+
"validation_error"
|
|
35758
|
+
]
|
|
35759
|
+
}
|
|
35760
|
+
}
|
|
35761
|
+
}
|
|
35762
|
+
]
|
|
35763
|
+
}
|
|
35764
|
+
}
|
|
35765
|
+
}
|
|
35766
|
+
},
|
|
35767
|
+
"401": {
|
|
35768
|
+
"description": "`unauthorized` — The request carries no valid credentials.",
|
|
35769
|
+
"content": {
|
|
35770
|
+
"application/json": {
|
|
35771
|
+
"schema": {
|
|
35772
|
+
"allOf": [
|
|
35773
|
+
{
|
|
35774
|
+
"$ref": "#/components/schemas/ErrorResponse"
|
|
35775
|
+
},
|
|
35776
|
+
{
|
|
35777
|
+
"type": "object",
|
|
35778
|
+
"properties": {
|
|
35779
|
+
"error_code": {
|
|
35780
|
+
"type": "string",
|
|
35781
|
+
"enum": [
|
|
35782
|
+
"unauthorized"
|
|
35783
|
+
]
|
|
35784
|
+
}
|
|
35785
|
+
}
|
|
35786
|
+
}
|
|
35787
|
+
]
|
|
35788
|
+
}
|
|
35789
|
+
}
|
|
35790
|
+
}
|
|
35791
|
+
},
|
|
35792
|
+
"403": {
|
|
35793
|
+
"description": "`forbidden` — The credentials are valid but do not allow this operation.\n\n`insufficient_scope` — The token lacks a scope this operation requires. `message` names it.\n\n`user_suspended` — The user is suspended and cannot sign in or be modified.",
|
|
35794
|
+
"content": {
|
|
35795
|
+
"application/json": {
|
|
35796
|
+
"schema": {
|
|
35797
|
+
"allOf": [
|
|
35798
|
+
{
|
|
35799
|
+
"$ref": "#/components/schemas/ErrorResponse"
|
|
35800
|
+
},
|
|
35801
|
+
{
|
|
35802
|
+
"type": "object",
|
|
35803
|
+
"properties": {
|
|
35804
|
+
"error_code": {
|
|
35805
|
+
"type": "string",
|
|
35806
|
+
"enum": [
|
|
35807
|
+
"forbidden",
|
|
35808
|
+
"insufficient_scope",
|
|
35809
|
+
"user_suspended"
|
|
35810
|
+
]
|
|
35811
|
+
}
|
|
35812
|
+
}
|
|
35813
|
+
}
|
|
35814
|
+
]
|
|
35815
|
+
}
|
|
35816
|
+
}
|
|
35817
|
+
}
|
|
35818
|
+
},
|
|
35819
|
+
"404": {
|
|
35820
|
+
"description": "`not_found` — The resource does not exist in this account.\n\n`account_not_found` — No Auth Account matches the request (domain, header or token).",
|
|
35821
|
+
"content": {
|
|
35822
|
+
"application/json": {
|
|
35823
|
+
"schema": {
|
|
35824
|
+
"allOf": [
|
|
35825
|
+
{
|
|
35826
|
+
"$ref": "#/components/schemas/ErrorResponse"
|
|
35827
|
+
},
|
|
35828
|
+
{
|
|
35829
|
+
"type": "object",
|
|
35830
|
+
"properties": {
|
|
35831
|
+
"error_code": {
|
|
35832
|
+
"type": "string",
|
|
35833
|
+
"enum": [
|
|
35834
|
+
"not_found",
|
|
35835
|
+
"account_not_found"
|
|
35836
|
+
]
|
|
35837
|
+
}
|
|
35838
|
+
}
|
|
35839
|
+
}
|
|
35840
|
+
]
|
|
35841
|
+
}
|
|
35842
|
+
}
|
|
35843
|
+
}
|
|
35844
|
+
},
|
|
35845
|
+
"429": {
|
|
35846
|
+
"description": "`too_many_requests` — Rate limit exceeded. Honour the `Retry-After` header.",
|
|
35847
|
+
"content": {
|
|
35848
|
+
"application/json": {
|
|
35849
|
+
"schema": {
|
|
35850
|
+
"allOf": [
|
|
35851
|
+
{
|
|
35852
|
+
"$ref": "#/components/schemas/ErrorResponse"
|
|
35853
|
+
},
|
|
35854
|
+
{
|
|
35855
|
+
"type": "object",
|
|
35856
|
+
"properties": {
|
|
35857
|
+
"error_code": {
|
|
35858
|
+
"type": "string",
|
|
35859
|
+
"enum": [
|
|
35860
|
+
"too_many_requests"
|
|
35861
|
+
]
|
|
35862
|
+
}
|
|
35863
|
+
}
|
|
35864
|
+
}
|
|
35865
|
+
]
|
|
35866
|
+
}
|
|
35867
|
+
}
|
|
35868
|
+
}
|
|
35869
|
+
},
|
|
35870
|
+
"500": {
|
|
35871
|
+
"description": "`internal_error` — Unexpected server error. Retry later; the request id is logged.",
|
|
35872
|
+
"content": {
|
|
35873
|
+
"application/json": {
|
|
35874
|
+
"schema": {
|
|
35875
|
+
"allOf": [
|
|
35876
|
+
{
|
|
35877
|
+
"$ref": "#/components/schemas/ErrorResponse"
|
|
35878
|
+
},
|
|
35879
|
+
{
|
|
35880
|
+
"type": "object",
|
|
35881
|
+
"properties": {
|
|
35882
|
+
"error_code": {
|
|
35883
|
+
"type": "string",
|
|
35884
|
+
"enum": [
|
|
35885
|
+
"internal_error"
|
|
35886
|
+
]
|
|
35887
|
+
}
|
|
35888
|
+
}
|
|
35889
|
+
}
|
|
35890
|
+
]
|
|
35891
|
+
}
|
|
35892
|
+
}
|
|
35893
|
+
}
|
|
35894
|
+
}
|
|
35895
|
+
}
|
|
35896
|
+
},
|
|
35897
|
+
"post": {
|
|
35898
|
+
"operationId": "role/add_permissions",
|
|
35899
|
+
"summary": "Add permissions to a Role",
|
|
35900
|
+
"tags": [
|
|
35901
|
+
"role"
|
|
35902
|
+
],
|
|
35903
|
+
"description": "Grants Api permissions to a Role. Each must be in the catalog of an Api of this tenant. Permissions the Role already has are kept. Tokens issued from now on (refreshes included) carry them; tokens already issued are unchanged. Leaves an entry in the tenant's log.",
|
|
35904
|
+
"requestBody": {
|
|
35905
|
+
"required": true,
|
|
35906
|
+
"content": {
|
|
35907
|
+
"application/json": {
|
|
35908
|
+
"schema": {
|
|
35909
|
+
"type": "object",
|
|
35910
|
+
"required": [
|
|
35911
|
+
"permissions"
|
|
35912
|
+
],
|
|
35913
|
+
"properties": {
|
|
35914
|
+
"permissions": {
|
|
35915
|
+
"type": "array",
|
|
35916
|
+
"items": {
|
|
35917
|
+
"type": "object",
|
|
35918
|
+
"required": [
|
|
35919
|
+
"api",
|
|
35920
|
+
"value"
|
|
35921
|
+
],
|
|
35922
|
+
"properties": {
|
|
35923
|
+
"api": {
|
|
35924
|
+
"type": "string",
|
|
35925
|
+
"description": "Id of the Api that defines the permission.",
|
|
35926
|
+
"example": "api_6555fd293acc2f0fac0e3452"
|
|
35927
|
+
},
|
|
35928
|
+
"value": {
|
|
35929
|
+
"type": "string",
|
|
35930
|
+
"description": "The permission, as it appears in the Api's `permissions` catalog.",
|
|
35931
|
+
"example": "invites:write"
|
|
35932
|
+
}
|
|
35933
|
+
},
|
|
35934
|
+
"additionalProperties": false,
|
|
35935
|
+
"description": "A permission of one Api granted by a role."
|
|
35936
|
+
},
|
|
35937
|
+
"minItems": 1,
|
|
35938
|
+
"description": "Permissions to grant or revoke, each as the Api id plus the value from its catalog.",
|
|
35939
|
+
"example": [
|
|
35940
|
+
{
|
|
35941
|
+
"api": "api_6555fd293acc2f0fac0e3452",
|
|
35942
|
+
"value": "invites:write"
|
|
35943
|
+
}
|
|
35944
|
+
]
|
|
35945
|
+
},
|
|
35946
|
+
"actor_user_id": {
|
|
35947
|
+
"type": "string",
|
|
35948
|
+
"description": "The person making the change, when your backend calls on their behalf with a machine token: it is who the tenant's log names. Must be a user of this tenant."
|
|
35949
|
+
}
|
|
35950
|
+
},
|
|
35951
|
+
"additionalProperties": false,
|
|
35952
|
+
"description": "Permissions to add to or remove from a role."
|
|
35953
|
+
}
|
|
35954
|
+
}
|
|
35652
35955
|
},
|
|
35956
|
+
"description": "Permissions to add to or remove from a role."
|
|
35957
|
+
},
|
|
35958
|
+
"parameters": [
|
|
35653
35959
|
{
|
|
35654
35960
|
"schema": {
|
|
35655
35961
|
"type": "string"
|
|
35656
35962
|
},
|
|
35657
|
-
"in": "
|
|
35658
|
-
"name": "
|
|
35659
|
-
"required":
|
|
35660
|
-
|
|
35963
|
+
"in": "path",
|
|
35964
|
+
"name": "role_id",
|
|
35965
|
+
"required": true
|
|
35966
|
+
}
|
|
35967
|
+
],
|
|
35968
|
+
"security": [
|
|
35969
|
+
{
|
|
35970
|
+
"bearerAuth": []
|
|
35971
|
+
}
|
|
35972
|
+
],
|
|
35973
|
+
"responses": {
|
|
35974
|
+
"200": {
|
|
35975
|
+
"description": "Default Response",
|
|
35976
|
+
"content": {
|
|
35977
|
+
"application/json": {
|
|
35978
|
+
"schema": {
|
|
35979
|
+
"type": "array",
|
|
35980
|
+
"items": {
|
|
35981
|
+
"type": "object",
|
|
35982
|
+
"required": [
|
|
35983
|
+
"api",
|
|
35984
|
+
"api_identifier",
|
|
35985
|
+
"api_name",
|
|
35986
|
+
"value"
|
|
35987
|
+
],
|
|
35988
|
+
"properties": {
|
|
35989
|
+
"api": {
|
|
35990
|
+
"type": "string",
|
|
35991
|
+
"description": "Id of the Api that defines it."
|
|
35992
|
+
},
|
|
35993
|
+
"api_identifier": {
|
|
35994
|
+
"type": "string",
|
|
35995
|
+
"description": "Audience of that Api: the `aud` of the tokens that carry this permission.",
|
|
35996
|
+
"example": "https://api.example.com"
|
|
35997
|
+
},
|
|
35998
|
+
"api_name": {
|
|
35999
|
+
"type": "string",
|
|
36000
|
+
"description": "Name of that Api."
|
|
36001
|
+
},
|
|
36002
|
+
"value": {
|
|
36003
|
+
"type": "string",
|
|
36004
|
+
"description": "The permission, as it appears in the `permissions` claim.",
|
|
36005
|
+
"example": "invites:write"
|
|
36006
|
+
},
|
|
36007
|
+
"description": {
|
|
36008
|
+
"type": "string",
|
|
36009
|
+
"description": "The permission's description in the Api."
|
|
36010
|
+
}
|
|
36011
|
+
},
|
|
36012
|
+
"additionalProperties": false,
|
|
36013
|
+
"description": "A permission granted by a role, joined with its Api. Permissions whose Api was deleted, or that left its catalog, are not listed: they grant nothing."
|
|
36014
|
+
}
|
|
36015
|
+
}
|
|
36016
|
+
}
|
|
36017
|
+
}
|
|
36018
|
+
},
|
|
36019
|
+
"400": {
|
|
36020
|
+
"description": "`invalid_permission` — A permission is not in the catalog of its Api, or the Api is not in this account. `details.permissions` lists the ones refused.\n\n`validation_error` — The body, query or path failed schema validation. `details.issues` lists each failing field.",
|
|
36021
|
+
"content": {
|
|
36022
|
+
"application/json": {
|
|
36023
|
+
"schema": {
|
|
36024
|
+
"allOf": [
|
|
36025
|
+
{
|
|
36026
|
+
"$ref": "#/components/schemas/ErrorResponse"
|
|
36027
|
+
},
|
|
36028
|
+
{
|
|
36029
|
+
"type": "object",
|
|
36030
|
+
"properties": {
|
|
36031
|
+
"error_code": {
|
|
36032
|
+
"type": "string",
|
|
36033
|
+
"enum": [
|
|
36034
|
+
"invalid_permission",
|
|
36035
|
+
"validation_error"
|
|
36036
|
+
]
|
|
36037
|
+
}
|
|
36038
|
+
}
|
|
36039
|
+
}
|
|
36040
|
+
]
|
|
36041
|
+
}
|
|
36042
|
+
}
|
|
36043
|
+
}
|
|
36044
|
+
},
|
|
36045
|
+
"401": {
|
|
36046
|
+
"description": "`unauthorized` — The request carries no valid credentials.",
|
|
36047
|
+
"content": {
|
|
36048
|
+
"application/json": {
|
|
36049
|
+
"schema": {
|
|
36050
|
+
"allOf": [
|
|
36051
|
+
{
|
|
36052
|
+
"$ref": "#/components/schemas/ErrorResponse"
|
|
36053
|
+
},
|
|
36054
|
+
{
|
|
36055
|
+
"type": "object",
|
|
36056
|
+
"properties": {
|
|
36057
|
+
"error_code": {
|
|
36058
|
+
"type": "string",
|
|
36059
|
+
"enum": [
|
|
36060
|
+
"unauthorized"
|
|
36061
|
+
]
|
|
36062
|
+
}
|
|
36063
|
+
}
|
|
36064
|
+
}
|
|
36065
|
+
]
|
|
36066
|
+
}
|
|
36067
|
+
}
|
|
36068
|
+
}
|
|
36069
|
+
},
|
|
36070
|
+
"403": {
|
|
36071
|
+
"description": "`forbidden` — The credentials are valid but do not allow this operation.\n\n`insufficient_scope` — The token lacks a scope this operation requires. `message` names it.\n\n`user_suspended` — The user is suspended and cannot sign in or be modified.",
|
|
36072
|
+
"content": {
|
|
36073
|
+
"application/json": {
|
|
36074
|
+
"schema": {
|
|
36075
|
+
"allOf": [
|
|
36076
|
+
{
|
|
36077
|
+
"$ref": "#/components/schemas/ErrorResponse"
|
|
36078
|
+
},
|
|
36079
|
+
{
|
|
36080
|
+
"type": "object",
|
|
36081
|
+
"properties": {
|
|
36082
|
+
"error_code": {
|
|
36083
|
+
"type": "string",
|
|
36084
|
+
"enum": [
|
|
36085
|
+
"forbidden",
|
|
36086
|
+
"insufficient_scope",
|
|
36087
|
+
"user_suspended"
|
|
36088
|
+
]
|
|
36089
|
+
}
|
|
36090
|
+
}
|
|
36091
|
+
}
|
|
36092
|
+
]
|
|
36093
|
+
}
|
|
36094
|
+
}
|
|
36095
|
+
}
|
|
36096
|
+
},
|
|
36097
|
+
"404": {
|
|
36098
|
+
"description": "`not_found` — The resource does not exist in this account.\n\n`account_not_found` — No Auth Account matches the request (domain, header or token).",
|
|
36099
|
+
"content": {
|
|
36100
|
+
"application/json": {
|
|
36101
|
+
"schema": {
|
|
36102
|
+
"allOf": [
|
|
36103
|
+
{
|
|
36104
|
+
"$ref": "#/components/schemas/ErrorResponse"
|
|
36105
|
+
},
|
|
36106
|
+
{
|
|
36107
|
+
"type": "object",
|
|
36108
|
+
"properties": {
|
|
36109
|
+
"error_code": {
|
|
36110
|
+
"type": "string",
|
|
36111
|
+
"enum": [
|
|
36112
|
+
"not_found",
|
|
36113
|
+
"account_not_found"
|
|
36114
|
+
]
|
|
36115
|
+
}
|
|
36116
|
+
}
|
|
36117
|
+
}
|
|
36118
|
+
]
|
|
36119
|
+
}
|
|
36120
|
+
}
|
|
36121
|
+
}
|
|
36122
|
+
},
|
|
36123
|
+
"429": {
|
|
36124
|
+
"description": "`too_many_requests` — Rate limit exceeded. Honour the `Retry-After` header.",
|
|
36125
|
+
"content": {
|
|
36126
|
+
"application/json": {
|
|
36127
|
+
"schema": {
|
|
36128
|
+
"allOf": [
|
|
36129
|
+
{
|
|
36130
|
+
"$ref": "#/components/schemas/ErrorResponse"
|
|
36131
|
+
},
|
|
36132
|
+
{
|
|
36133
|
+
"type": "object",
|
|
36134
|
+
"properties": {
|
|
36135
|
+
"error_code": {
|
|
36136
|
+
"type": "string",
|
|
36137
|
+
"enum": [
|
|
36138
|
+
"too_many_requests"
|
|
36139
|
+
]
|
|
36140
|
+
}
|
|
36141
|
+
}
|
|
36142
|
+
}
|
|
36143
|
+
]
|
|
36144
|
+
}
|
|
36145
|
+
}
|
|
36146
|
+
}
|
|
36147
|
+
},
|
|
36148
|
+
"500": {
|
|
36149
|
+
"description": "`internal_error` — Unexpected server error. Retry later; the request id is logged.",
|
|
36150
|
+
"content": {
|
|
36151
|
+
"application/json": {
|
|
36152
|
+
"schema": {
|
|
36153
|
+
"allOf": [
|
|
36154
|
+
{
|
|
36155
|
+
"$ref": "#/components/schemas/ErrorResponse"
|
|
36156
|
+
},
|
|
36157
|
+
{
|
|
36158
|
+
"type": "object",
|
|
36159
|
+
"properties": {
|
|
36160
|
+
"error_code": {
|
|
36161
|
+
"type": "string",
|
|
36162
|
+
"enum": [
|
|
36163
|
+
"internal_error"
|
|
36164
|
+
]
|
|
36165
|
+
}
|
|
36166
|
+
}
|
|
36167
|
+
}
|
|
36168
|
+
]
|
|
36169
|
+
}
|
|
36170
|
+
}
|
|
36171
|
+
}
|
|
36172
|
+
}
|
|
36173
|
+
}
|
|
36174
|
+
},
|
|
36175
|
+
"delete": {
|
|
36176
|
+
"operationId": "role/remove_permissions",
|
|
36177
|
+
"summary": "Remove permissions from a Role",
|
|
36178
|
+
"tags": [
|
|
36179
|
+
"role"
|
|
36180
|
+
],
|
|
36181
|
+
"description": "Revokes Api permissions from a Role. Permissions the Role does not have are ignored. Tokens already issued keep them until they expire; refreshes drop them. Leaves an entry in the tenant's log.",
|
|
36182
|
+
"requestBody": {
|
|
36183
|
+
"required": true,
|
|
36184
|
+
"content": {
|
|
36185
|
+
"application/json": {
|
|
36186
|
+
"schema": {
|
|
36187
|
+
"type": "object",
|
|
36188
|
+
"required": [
|
|
36189
|
+
"permissions"
|
|
36190
|
+
],
|
|
36191
|
+
"properties": {
|
|
36192
|
+
"permissions": {
|
|
36193
|
+
"type": "array",
|
|
36194
|
+
"items": {
|
|
36195
|
+
"type": "object",
|
|
36196
|
+
"required": [
|
|
36197
|
+
"api",
|
|
36198
|
+
"value"
|
|
36199
|
+
],
|
|
36200
|
+
"properties": {
|
|
36201
|
+
"api": {
|
|
36202
|
+
"type": "string",
|
|
36203
|
+
"description": "Id of the Api that defines the permission.",
|
|
36204
|
+
"example": "api_6555fd293acc2f0fac0e3452"
|
|
36205
|
+
},
|
|
36206
|
+
"value": {
|
|
36207
|
+
"type": "string",
|
|
36208
|
+
"description": "The permission, as it appears in the Api's `permissions` catalog.",
|
|
36209
|
+
"example": "invites:write"
|
|
36210
|
+
}
|
|
36211
|
+
},
|
|
36212
|
+
"additionalProperties": false,
|
|
36213
|
+
"description": "A permission of one Api granted by a role."
|
|
36214
|
+
},
|
|
36215
|
+
"minItems": 1,
|
|
36216
|
+
"description": "Permissions to grant or revoke, each as the Api id plus the value from its catalog.",
|
|
36217
|
+
"example": [
|
|
36218
|
+
{
|
|
36219
|
+
"api": "api_6555fd293acc2f0fac0e3452",
|
|
36220
|
+
"value": "invites:write"
|
|
36221
|
+
}
|
|
36222
|
+
]
|
|
36223
|
+
},
|
|
36224
|
+
"actor_user_id": {
|
|
36225
|
+
"type": "string",
|
|
36226
|
+
"description": "The person making the change, when your backend calls on their behalf with a machine token: it is who the tenant's log names. Must be a user of this tenant."
|
|
36227
|
+
}
|
|
36228
|
+
},
|
|
36229
|
+
"additionalProperties": false,
|
|
36230
|
+
"description": "Permissions to add to or remove from a role."
|
|
36231
|
+
}
|
|
36232
|
+
}
|
|
35661
36233
|
},
|
|
36234
|
+
"description": "Permissions to add to or remove from a role."
|
|
36235
|
+
},
|
|
36236
|
+
"parameters": [
|
|
35662
36237
|
{
|
|
35663
36238
|
"schema": {
|
|
35664
36239
|
"type": "string"
|
|
35665
36240
|
},
|
|
35666
|
-
"in": "
|
|
35667
|
-
"name": "
|
|
35668
|
-
"required":
|
|
35669
|
-
|
|
35670
|
-
|
|
36241
|
+
"in": "path",
|
|
36242
|
+
"name": "role_id",
|
|
36243
|
+
"required": true
|
|
36244
|
+
}
|
|
36245
|
+
],
|
|
36246
|
+
"security": [
|
|
35671
36247
|
{
|
|
35672
|
-
"
|
|
35673
|
-
|
|
35674
|
-
|
|
35675
|
-
|
|
35676
|
-
|
|
35677
|
-
"
|
|
35678
|
-
"
|
|
36248
|
+
"bearerAuth": []
|
|
36249
|
+
}
|
|
36250
|
+
],
|
|
36251
|
+
"responses": {
|
|
36252
|
+
"200": {
|
|
36253
|
+
"description": "Default Response",
|
|
36254
|
+
"content": {
|
|
36255
|
+
"application/json": {
|
|
36256
|
+
"schema": {
|
|
36257
|
+
"type": "array",
|
|
36258
|
+
"items": {
|
|
36259
|
+
"type": "object",
|
|
36260
|
+
"required": [
|
|
36261
|
+
"api",
|
|
36262
|
+
"api_identifier",
|
|
36263
|
+
"api_name",
|
|
36264
|
+
"value"
|
|
36265
|
+
],
|
|
36266
|
+
"properties": {
|
|
36267
|
+
"api": {
|
|
36268
|
+
"type": "string",
|
|
36269
|
+
"description": "Id of the Api that defines it."
|
|
36270
|
+
},
|
|
36271
|
+
"api_identifier": {
|
|
36272
|
+
"type": "string",
|
|
36273
|
+
"description": "Audience of that Api: the `aud` of the tokens that carry this permission.",
|
|
36274
|
+
"example": "https://api.example.com"
|
|
36275
|
+
},
|
|
36276
|
+
"api_name": {
|
|
36277
|
+
"type": "string",
|
|
36278
|
+
"description": "Name of that Api."
|
|
36279
|
+
},
|
|
36280
|
+
"value": {
|
|
36281
|
+
"type": "string",
|
|
36282
|
+
"description": "The permission, as it appears in the `permissions` claim.",
|
|
36283
|
+
"example": "invites:write"
|
|
36284
|
+
},
|
|
36285
|
+
"description": {
|
|
36286
|
+
"type": "string",
|
|
36287
|
+
"description": "The permission's description in the Api."
|
|
36288
|
+
}
|
|
36289
|
+
},
|
|
36290
|
+
"additionalProperties": false,
|
|
36291
|
+
"description": "A permission granted by a role, joined with its Api. Permissions whose Api was deleted, or that left its catalog, are not listed: they grant nothing."
|
|
36292
|
+
}
|
|
36293
|
+
}
|
|
36294
|
+
}
|
|
36295
|
+
}
|
|
36296
|
+
},
|
|
36297
|
+
"400": {
|
|
36298
|
+
"description": "`validation_error` — The body, query or path failed schema validation. `details.issues` lists each failing field.",
|
|
36299
|
+
"content": {
|
|
36300
|
+
"application/json": {
|
|
36301
|
+
"schema": {
|
|
36302
|
+
"allOf": [
|
|
36303
|
+
{
|
|
36304
|
+
"$ref": "#/components/schemas/ErrorResponse"
|
|
36305
|
+
},
|
|
36306
|
+
{
|
|
36307
|
+
"type": "object",
|
|
36308
|
+
"properties": {
|
|
36309
|
+
"error_code": {
|
|
36310
|
+
"type": "string",
|
|
36311
|
+
"enum": [
|
|
36312
|
+
"validation_error"
|
|
36313
|
+
]
|
|
36314
|
+
}
|
|
36315
|
+
}
|
|
36316
|
+
}
|
|
36317
|
+
]
|
|
36318
|
+
}
|
|
36319
|
+
}
|
|
36320
|
+
}
|
|
36321
|
+
},
|
|
36322
|
+
"401": {
|
|
36323
|
+
"description": "`unauthorized` — The request carries no valid credentials.",
|
|
36324
|
+
"content": {
|
|
36325
|
+
"application/json": {
|
|
36326
|
+
"schema": {
|
|
36327
|
+
"allOf": [
|
|
36328
|
+
{
|
|
36329
|
+
"$ref": "#/components/schemas/ErrorResponse"
|
|
36330
|
+
},
|
|
36331
|
+
{
|
|
36332
|
+
"type": "object",
|
|
36333
|
+
"properties": {
|
|
36334
|
+
"error_code": {
|
|
36335
|
+
"type": "string",
|
|
36336
|
+
"enum": [
|
|
36337
|
+
"unauthorized"
|
|
36338
|
+
]
|
|
36339
|
+
}
|
|
36340
|
+
}
|
|
36341
|
+
}
|
|
36342
|
+
]
|
|
36343
|
+
}
|
|
36344
|
+
}
|
|
36345
|
+
}
|
|
36346
|
+
},
|
|
36347
|
+
"403": {
|
|
36348
|
+
"description": "`forbidden` — The credentials are valid but do not allow this operation.\n\n`insufficient_scope` — The token lacks a scope this operation requires. `message` names it.\n\n`user_suspended` — The user is suspended and cannot sign in or be modified.",
|
|
36349
|
+
"content": {
|
|
36350
|
+
"application/json": {
|
|
36351
|
+
"schema": {
|
|
36352
|
+
"allOf": [
|
|
36353
|
+
{
|
|
36354
|
+
"$ref": "#/components/schemas/ErrorResponse"
|
|
36355
|
+
},
|
|
36356
|
+
{
|
|
36357
|
+
"type": "object",
|
|
36358
|
+
"properties": {
|
|
36359
|
+
"error_code": {
|
|
36360
|
+
"type": "string",
|
|
36361
|
+
"enum": [
|
|
36362
|
+
"forbidden",
|
|
36363
|
+
"insufficient_scope",
|
|
36364
|
+
"user_suspended"
|
|
36365
|
+
]
|
|
36366
|
+
}
|
|
36367
|
+
}
|
|
36368
|
+
}
|
|
36369
|
+
]
|
|
36370
|
+
}
|
|
36371
|
+
}
|
|
36372
|
+
}
|
|
36373
|
+
},
|
|
36374
|
+
"404": {
|
|
36375
|
+
"description": "`not_found` — The resource does not exist in this account.\n\n`account_not_found` — No Auth Account matches the request (domain, header or token).",
|
|
36376
|
+
"content": {
|
|
36377
|
+
"application/json": {
|
|
36378
|
+
"schema": {
|
|
36379
|
+
"allOf": [
|
|
36380
|
+
{
|
|
36381
|
+
"$ref": "#/components/schemas/ErrorResponse"
|
|
36382
|
+
},
|
|
36383
|
+
{
|
|
36384
|
+
"type": "object",
|
|
36385
|
+
"properties": {
|
|
36386
|
+
"error_code": {
|
|
36387
|
+
"type": "string",
|
|
36388
|
+
"enum": [
|
|
36389
|
+
"not_found",
|
|
36390
|
+
"account_not_found"
|
|
36391
|
+
]
|
|
36392
|
+
}
|
|
36393
|
+
}
|
|
36394
|
+
}
|
|
36395
|
+
]
|
|
36396
|
+
}
|
|
36397
|
+
}
|
|
36398
|
+
}
|
|
36399
|
+
},
|
|
36400
|
+
"429": {
|
|
36401
|
+
"description": "`too_many_requests` — Rate limit exceeded. Honour the `Retry-After` header.",
|
|
36402
|
+
"content": {
|
|
36403
|
+
"application/json": {
|
|
36404
|
+
"schema": {
|
|
36405
|
+
"allOf": [
|
|
36406
|
+
{
|
|
36407
|
+
"$ref": "#/components/schemas/ErrorResponse"
|
|
36408
|
+
},
|
|
36409
|
+
{
|
|
36410
|
+
"type": "object",
|
|
36411
|
+
"properties": {
|
|
36412
|
+
"error_code": {
|
|
36413
|
+
"type": "string",
|
|
36414
|
+
"enum": [
|
|
36415
|
+
"too_many_requests"
|
|
36416
|
+
]
|
|
36417
|
+
}
|
|
36418
|
+
}
|
|
36419
|
+
}
|
|
36420
|
+
]
|
|
36421
|
+
}
|
|
36422
|
+
}
|
|
36423
|
+
}
|
|
36424
|
+
},
|
|
36425
|
+
"500": {
|
|
36426
|
+
"description": "`internal_error` — Unexpected server error. Retry later; the request id is logged.",
|
|
36427
|
+
"content": {
|
|
36428
|
+
"application/json": {
|
|
36429
|
+
"schema": {
|
|
36430
|
+
"allOf": [
|
|
36431
|
+
{
|
|
36432
|
+
"$ref": "#/components/schemas/ErrorResponse"
|
|
36433
|
+
},
|
|
36434
|
+
{
|
|
36435
|
+
"type": "object",
|
|
36436
|
+
"properties": {
|
|
36437
|
+
"error_code": {
|
|
36438
|
+
"type": "string",
|
|
36439
|
+
"enum": [
|
|
36440
|
+
"internal_error"
|
|
36441
|
+
]
|
|
36442
|
+
}
|
|
36443
|
+
}
|
|
36444
|
+
}
|
|
36445
|
+
]
|
|
36446
|
+
}
|
|
36447
|
+
}
|
|
36448
|
+
}
|
|
36449
|
+
}
|
|
36450
|
+
}
|
|
36451
|
+
}
|
|
36452
|
+
},
|
|
36453
|
+
"/role": {
|
|
36454
|
+
"get": {
|
|
36455
|
+
"operationId": "role/list",
|
|
36456
|
+
"summary": "List Roles",
|
|
36457
|
+
"tags": [
|
|
36458
|
+
"role"
|
|
36459
|
+
],
|
|
36460
|
+
"description": "List Roles",
|
|
36461
|
+
"parameters": [
|
|
36462
|
+
{
|
|
36463
|
+
"schema": {
|
|
36464
|
+
"type": "number",
|
|
36465
|
+
"minimum": 1,
|
|
36466
|
+
"maximum": 200
|
|
36467
|
+
},
|
|
36468
|
+
"in": "query",
|
|
36469
|
+
"name": "pageSize",
|
|
36470
|
+
"required": false,
|
|
36471
|
+
"description": "Number of items per page (max 200)"
|
|
36472
|
+
},
|
|
36473
|
+
{
|
|
36474
|
+
"schema": {
|
|
36475
|
+
"type": "string"
|
|
36476
|
+
},
|
|
36477
|
+
"in": "query",
|
|
36478
|
+
"name": "cursor",
|
|
36479
|
+
"required": false,
|
|
36480
|
+
"description": "Cursor for next page"
|
|
36481
|
+
},
|
|
36482
|
+
{
|
|
36483
|
+
"schema": {
|
|
36484
|
+
"type": "string"
|
|
36485
|
+
},
|
|
36486
|
+
"in": "query",
|
|
36487
|
+
"name": "next",
|
|
36488
|
+
"required": false,
|
|
36489
|
+
"description": "Cursor returned by the previous page"
|
|
36490
|
+
},
|
|
36491
|
+
{
|
|
36492
|
+
"schema": {
|
|
36493
|
+
"type": "boolean"
|
|
36494
|
+
},
|
|
36495
|
+
"in": "query",
|
|
36496
|
+
"name": "count",
|
|
36497
|
+
"required": false,
|
|
36498
|
+
"description": "Also return `total`: the rows matching the whole filter, across every page."
|
|
36499
|
+
},
|
|
36500
|
+
{
|
|
36501
|
+
"schema": {
|
|
36502
|
+
"type": "string"
|
|
36503
|
+
},
|
|
36504
|
+
"in": "query",
|
|
36505
|
+
"name": "query",
|
|
36506
|
+
"required": false,
|
|
36507
|
+
"description": "Filter using a FaableQL query"
|
|
36508
|
+
},
|
|
36509
|
+
{
|
|
36510
|
+
"schema": {
|
|
36511
|
+
"type": "string",
|
|
36512
|
+
"minLength": 1,
|
|
36513
|
+
"maxLength": 200
|
|
36514
|
+
},
|
|
36515
|
+
"in": "query",
|
|
36516
|
+
"name": "q",
|
|
36517
|
+
"required": false,
|
|
36518
|
+
"description": "Full-text search across: `name`, `description`."
|
|
36519
|
+
}
|
|
36520
|
+
],
|
|
36521
|
+
"security": [
|
|
36522
|
+
{
|
|
36523
|
+
"bearerAuth": []
|
|
36524
|
+
}
|
|
36525
|
+
],
|
|
36526
|
+
"responses": {
|
|
36527
|
+
"200": {
|
|
36528
|
+
"description": "Default Response",
|
|
36529
|
+
"content": {
|
|
36530
|
+
"application/json": {
|
|
36531
|
+
"schema": {
|
|
36532
|
+
"type": "object",
|
|
36533
|
+
"required": [
|
|
36534
|
+
"next",
|
|
36535
|
+
"results"
|
|
36536
|
+
],
|
|
36537
|
+
"properties": {
|
|
36538
|
+
"next": {
|
|
36539
|
+
"anyOf": [
|
|
36540
|
+
{
|
|
36541
|
+
"type": "string"
|
|
36542
|
+
},
|
|
36543
|
+
{
|
|
36544
|
+
"type": "null"
|
|
36545
|
+
}
|
|
36546
|
+
]
|
|
36547
|
+
},
|
|
36548
|
+
"results": {
|
|
36549
|
+
"type": "array",
|
|
36550
|
+
"items": {
|
|
36551
|
+
"$ref": "#/components/schemas/Role"
|
|
36552
|
+
}
|
|
36553
|
+
},
|
|
36554
|
+
"total": {
|
|
36555
|
+
"type": "integer",
|
|
36556
|
+
"description": "Rows matching the whole filter, across every page. Only with `?count=true`."
|
|
36557
|
+
}
|
|
36558
|
+
},
|
|
36559
|
+
"additionalProperties": false
|
|
36560
|
+
}
|
|
36561
|
+
}
|
|
36562
|
+
}
|
|
36563
|
+
},
|
|
36564
|
+
"400": {
|
|
36565
|
+
"description": "`invalid_query` — The `?query=` FaableQL expression could not be parsed.\n\n`invalid_expand` — An `?expand=` path is not allowed on this resource.\n\n`search_not_supported` — This resource does not support `?search=`.\n\n`validation_error` — The body, query or path failed schema validation. `details.issues` lists each failing field.",
|
|
36566
|
+
"content": {
|
|
36567
|
+
"application/json": {
|
|
36568
|
+
"schema": {
|
|
36569
|
+
"allOf": [
|
|
36570
|
+
{
|
|
36571
|
+
"$ref": "#/components/schemas/ErrorResponse"
|
|
36572
|
+
},
|
|
36573
|
+
{
|
|
36574
|
+
"type": "object",
|
|
36575
|
+
"properties": {
|
|
36576
|
+
"error_code": {
|
|
36577
|
+
"type": "string",
|
|
36578
|
+
"enum": [
|
|
36579
|
+
"invalid_query",
|
|
36580
|
+
"invalid_expand",
|
|
36581
|
+
"search_not_supported",
|
|
36582
|
+
"validation_error"
|
|
36583
|
+
]
|
|
36584
|
+
}
|
|
36585
|
+
}
|
|
36586
|
+
}
|
|
36587
|
+
]
|
|
36588
|
+
}
|
|
36589
|
+
}
|
|
36590
|
+
}
|
|
36591
|
+
},
|
|
36592
|
+
"401": {
|
|
36593
|
+
"description": "`unauthorized` — The request carries no valid credentials.",
|
|
36594
|
+
"content": {
|
|
36595
|
+
"application/json": {
|
|
36596
|
+
"schema": {
|
|
36597
|
+
"allOf": [
|
|
36598
|
+
{
|
|
36599
|
+
"$ref": "#/components/schemas/ErrorResponse"
|
|
36600
|
+
},
|
|
36601
|
+
{
|
|
36602
|
+
"type": "object",
|
|
36603
|
+
"properties": {
|
|
36604
|
+
"error_code": {
|
|
36605
|
+
"type": "string",
|
|
36606
|
+
"enum": [
|
|
36607
|
+
"unauthorized"
|
|
36608
|
+
]
|
|
36609
|
+
}
|
|
36610
|
+
}
|
|
36611
|
+
}
|
|
36612
|
+
]
|
|
36613
|
+
}
|
|
36614
|
+
}
|
|
36615
|
+
}
|
|
36616
|
+
},
|
|
36617
|
+
"403": {
|
|
36618
|
+
"description": "`forbidden` — The credentials are valid but do not allow this operation.\n\n`insufficient_scope` — The token lacks a scope this operation requires. `message` names it.\n\n`user_suspended` — The user is suspended and cannot sign in or be modified.",
|
|
36619
|
+
"content": {
|
|
36620
|
+
"application/json": {
|
|
36621
|
+
"schema": {
|
|
36622
|
+
"allOf": [
|
|
36623
|
+
{
|
|
36624
|
+
"$ref": "#/components/schemas/ErrorResponse"
|
|
36625
|
+
},
|
|
36626
|
+
{
|
|
36627
|
+
"type": "object",
|
|
36628
|
+
"properties": {
|
|
36629
|
+
"error_code": {
|
|
36630
|
+
"type": "string",
|
|
36631
|
+
"enum": [
|
|
36632
|
+
"forbidden",
|
|
36633
|
+
"insufficient_scope",
|
|
36634
|
+
"user_suspended"
|
|
36635
|
+
]
|
|
36636
|
+
}
|
|
36637
|
+
}
|
|
36638
|
+
}
|
|
36639
|
+
]
|
|
36640
|
+
}
|
|
36641
|
+
}
|
|
36642
|
+
}
|
|
36643
|
+
},
|
|
36644
|
+
"404": {
|
|
36645
|
+
"description": "`account_not_found` — No Auth Account matches the request (domain, header or token).",
|
|
36646
|
+
"content": {
|
|
36647
|
+
"application/json": {
|
|
36648
|
+
"schema": {
|
|
36649
|
+
"allOf": [
|
|
36650
|
+
{
|
|
36651
|
+
"$ref": "#/components/schemas/ErrorResponse"
|
|
36652
|
+
},
|
|
36653
|
+
{
|
|
36654
|
+
"type": "object",
|
|
36655
|
+
"properties": {
|
|
36656
|
+
"error_code": {
|
|
36657
|
+
"type": "string",
|
|
36658
|
+
"enum": [
|
|
36659
|
+
"account_not_found"
|
|
36660
|
+
]
|
|
36661
|
+
}
|
|
36662
|
+
}
|
|
36663
|
+
}
|
|
36664
|
+
]
|
|
36665
|
+
}
|
|
36666
|
+
}
|
|
36667
|
+
}
|
|
36668
|
+
},
|
|
36669
|
+
"429": {
|
|
36670
|
+
"description": "`too_many_requests` — Rate limit exceeded. Honour the `Retry-After` header.",
|
|
36671
|
+
"content": {
|
|
36672
|
+
"application/json": {
|
|
36673
|
+
"schema": {
|
|
36674
|
+
"allOf": [
|
|
36675
|
+
{
|
|
36676
|
+
"$ref": "#/components/schemas/ErrorResponse"
|
|
36677
|
+
},
|
|
36678
|
+
{
|
|
36679
|
+
"type": "object",
|
|
36680
|
+
"properties": {
|
|
36681
|
+
"error_code": {
|
|
36682
|
+
"type": "string",
|
|
36683
|
+
"enum": [
|
|
36684
|
+
"too_many_requests"
|
|
36685
|
+
]
|
|
36686
|
+
}
|
|
36687
|
+
}
|
|
36688
|
+
}
|
|
36689
|
+
]
|
|
36690
|
+
}
|
|
36691
|
+
}
|
|
36692
|
+
}
|
|
36693
|
+
},
|
|
36694
|
+
"500": {
|
|
36695
|
+
"description": "`internal_error` — Unexpected server error. Retry later; the request id is logged.",
|
|
36696
|
+
"content": {
|
|
36697
|
+
"application/json": {
|
|
36698
|
+
"schema": {
|
|
36699
|
+
"allOf": [
|
|
36700
|
+
{
|
|
36701
|
+
"$ref": "#/components/schemas/ErrorResponse"
|
|
36702
|
+
},
|
|
36703
|
+
{
|
|
36704
|
+
"type": "object",
|
|
36705
|
+
"properties": {
|
|
36706
|
+
"error_code": {
|
|
36707
|
+
"type": "string",
|
|
36708
|
+
"enum": [
|
|
36709
|
+
"internal_error"
|
|
36710
|
+
]
|
|
36711
|
+
}
|
|
36712
|
+
}
|
|
36713
|
+
}
|
|
36714
|
+
]
|
|
36715
|
+
}
|
|
36716
|
+
}
|
|
36717
|
+
}
|
|
36718
|
+
}
|
|
36719
|
+
}
|
|
36720
|
+
},
|
|
36721
|
+
"post": {
|
|
36722
|
+
"operationId": "role/create",
|
|
36723
|
+
"summary": "Create Role",
|
|
36724
|
+
"tags": [
|
|
36725
|
+
"role"
|
|
36726
|
+
],
|
|
36727
|
+
"description": "Create Role",
|
|
36728
|
+
"requestBody": {
|
|
36729
|
+
"required": true,
|
|
36730
|
+
"content": {
|
|
36731
|
+
"application/json": {
|
|
36732
|
+
"schema": {
|
|
36733
|
+
"type": "object",
|
|
36734
|
+
"required": [
|
|
36735
|
+
"name"
|
|
36736
|
+
],
|
|
36737
|
+
"properties": {
|
|
36738
|
+
"name": {
|
|
36739
|
+
"type": "string",
|
|
36740
|
+
"description": "Short, human-readable identifier for the role (e.g. `admin`, `editor`).",
|
|
36741
|
+
"example": "admin"
|
|
36742
|
+
},
|
|
36743
|
+
"description": {
|
|
36744
|
+
"type": "string",
|
|
36745
|
+
"description": "Free-form explanation of what users in this role are expected to do or have access to."
|
|
36746
|
+
},
|
|
36747
|
+
"metadata": {
|
|
36748
|
+
"type": "object",
|
|
36749
|
+
"properties": {},
|
|
36750
|
+
"additionalProperties": true,
|
|
36751
|
+
"description": "Add Metadata"
|
|
36752
|
+
}
|
|
36753
|
+
},
|
|
36754
|
+
"description": "RoleCreate",
|
|
36755
|
+
"additionalProperties": false
|
|
36756
|
+
}
|
|
36757
|
+
}
|
|
36758
|
+
},
|
|
36759
|
+
"description": "RoleCreate"
|
|
36760
|
+
},
|
|
36761
|
+
"security": [
|
|
36762
|
+
{
|
|
36763
|
+
"bearerAuth": []
|
|
36764
|
+
}
|
|
36765
|
+
],
|
|
36766
|
+
"responses": {
|
|
36767
|
+
"200": {
|
|
36768
|
+
"description": "Role",
|
|
36769
|
+
"content": {
|
|
36770
|
+
"application/json": {
|
|
36771
|
+
"schema": {
|
|
36772
|
+
"type": "object",
|
|
36773
|
+
"required": [
|
|
36774
|
+
"id",
|
|
36775
|
+
"name",
|
|
36776
|
+
"description",
|
|
36777
|
+
"permissions",
|
|
36778
|
+
"account",
|
|
36779
|
+
"createdAt"
|
|
36780
|
+
],
|
|
36781
|
+
"properties": {
|
|
36782
|
+
"id": {
|
|
36783
|
+
"type": "string",
|
|
36784
|
+
"description": "Role ID"
|
|
36785
|
+
},
|
|
36786
|
+
"name": {
|
|
36787
|
+
"type": "string",
|
|
36788
|
+
"description": "Short, human-readable identifier for the role (e.g. `admin`, `editor`, `billing-manager`). Surfaced in the dashboard role pickers.",
|
|
36789
|
+
"example": "admin"
|
|
36790
|
+
},
|
|
36791
|
+
"description": {
|
|
36792
|
+
"type": "string",
|
|
36793
|
+
"description": "Free-form explanation of what users in this role are expected to do or have access to. Shown alongside the role in the dashboard."
|
|
36794
|
+
},
|
|
36795
|
+
"permissions": {
|
|
36796
|
+
"type": "array",
|
|
36797
|
+
"items": {
|
|
36798
|
+
"type": "object",
|
|
36799
|
+
"required": [
|
|
36800
|
+
"api",
|
|
36801
|
+
"value"
|
|
36802
|
+
],
|
|
36803
|
+
"properties": {
|
|
36804
|
+
"api": {
|
|
36805
|
+
"type": "string",
|
|
36806
|
+
"description": "Id of the Api that defines the permission.",
|
|
36807
|
+
"example": "api_6555fd293acc2f0fac0e3452"
|
|
36808
|
+
},
|
|
36809
|
+
"value": {
|
|
36810
|
+
"type": "string",
|
|
36811
|
+
"description": "The permission, as it appears in the Api's `permissions` catalog.",
|
|
36812
|
+
"example": "invites:write"
|
|
36813
|
+
}
|
|
36814
|
+
},
|
|
36815
|
+
"additionalProperties": false,
|
|
36816
|
+
"description": "A permission of one Api granted by a role."
|
|
36817
|
+
},
|
|
36818
|
+
"description": "Api permissions granted to the users that hold this role at the account level (team roles grant none). Change them with `POST` / `DELETE /role/:role_id/permissions`; `GET /role/:role_id/permissions` lists them with their Api."
|
|
36819
|
+
},
|
|
36820
|
+
"account": {
|
|
36821
|
+
"type": "string",
|
|
36822
|
+
"description": "Object is related with this account"
|
|
36823
|
+
},
|
|
36824
|
+
"metadata": {
|
|
36825
|
+
"type": "object",
|
|
36826
|
+
"properties": {},
|
|
36827
|
+
"additionalProperties": true,
|
|
36828
|
+
"description": "RoleMetadata",
|
|
36829
|
+
"default": {}
|
|
36830
|
+
},
|
|
36831
|
+
"createdAt": {
|
|
36832
|
+
"type": "string",
|
|
36833
|
+
"description": "Role creation date"
|
|
36834
|
+
},
|
|
36835
|
+
"updatedAt": {
|
|
36836
|
+
"type": "string",
|
|
36837
|
+
"description": "Role updated date"
|
|
36838
|
+
}
|
|
36839
|
+
},
|
|
36840
|
+
"description": "Role"
|
|
36841
|
+
}
|
|
36842
|
+
}
|
|
36843
|
+
}
|
|
36844
|
+
},
|
|
36845
|
+
"400": {
|
|
36846
|
+
"description": "`already_exists` — A resource with the same unique field already exists (for a user, usually `email`). `details.fields` names the field.\n\n`validation_error` — The body, query or path failed schema validation. `details.issues` lists each failing field.",
|
|
36847
|
+
"content": {
|
|
36848
|
+
"application/json": {
|
|
36849
|
+
"schema": {
|
|
36850
|
+
"allOf": [
|
|
36851
|
+
{
|
|
36852
|
+
"$ref": "#/components/schemas/ErrorResponse"
|
|
36853
|
+
},
|
|
36854
|
+
{
|
|
36855
|
+
"type": "object",
|
|
36856
|
+
"properties": {
|
|
36857
|
+
"error_code": {
|
|
36858
|
+
"type": "string",
|
|
36859
|
+
"enum": [
|
|
36860
|
+
"already_exists",
|
|
36861
|
+
"validation_error"
|
|
36862
|
+
]
|
|
36863
|
+
}
|
|
36864
|
+
}
|
|
36865
|
+
}
|
|
36866
|
+
]
|
|
36867
|
+
}
|
|
36868
|
+
}
|
|
36869
|
+
}
|
|
36870
|
+
},
|
|
36871
|
+
"401": {
|
|
36872
|
+
"description": "`unauthorized` — The request carries no valid credentials.",
|
|
36873
|
+
"content": {
|
|
36874
|
+
"application/json": {
|
|
36875
|
+
"schema": {
|
|
36876
|
+
"allOf": [
|
|
36877
|
+
{
|
|
36878
|
+
"$ref": "#/components/schemas/ErrorResponse"
|
|
36879
|
+
},
|
|
36880
|
+
{
|
|
36881
|
+
"type": "object",
|
|
36882
|
+
"properties": {
|
|
36883
|
+
"error_code": {
|
|
36884
|
+
"type": "string",
|
|
36885
|
+
"enum": [
|
|
36886
|
+
"unauthorized"
|
|
36887
|
+
]
|
|
36888
|
+
}
|
|
36889
|
+
}
|
|
36890
|
+
}
|
|
36891
|
+
]
|
|
36892
|
+
}
|
|
36893
|
+
}
|
|
36894
|
+
}
|
|
36895
|
+
},
|
|
36896
|
+
"403": {
|
|
36897
|
+
"description": "`forbidden` — The credentials are valid but do not allow this operation.\n\n`insufficient_scope` — The token lacks a scope this operation requires. `message` names it.\n\n`user_suspended` — The user is suspended and cannot sign in or be modified.",
|
|
36898
|
+
"content": {
|
|
36899
|
+
"application/json": {
|
|
36900
|
+
"schema": {
|
|
36901
|
+
"allOf": [
|
|
36902
|
+
{
|
|
36903
|
+
"$ref": "#/components/schemas/ErrorResponse"
|
|
36904
|
+
},
|
|
36905
|
+
{
|
|
36906
|
+
"type": "object",
|
|
36907
|
+
"properties": {
|
|
36908
|
+
"error_code": {
|
|
36909
|
+
"type": "string",
|
|
36910
|
+
"enum": [
|
|
36911
|
+
"forbidden",
|
|
36912
|
+
"insufficient_scope",
|
|
36913
|
+
"user_suspended"
|
|
36914
|
+
]
|
|
36915
|
+
}
|
|
36916
|
+
}
|
|
36917
|
+
}
|
|
36918
|
+
]
|
|
36919
|
+
}
|
|
36920
|
+
}
|
|
36921
|
+
}
|
|
36922
|
+
},
|
|
36923
|
+
"404": {
|
|
36924
|
+
"description": "`account_not_found` — No Auth Account matches the request (domain, header or token).",
|
|
36925
|
+
"content": {
|
|
36926
|
+
"application/json": {
|
|
36927
|
+
"schema": {
|
|
36928
|
+
"allOf": [
|
|
36929
|
+
{
|
|
36930
|
+
"$ref": "#/components/schemas/ErrorResponse"
|
|
36931
|
+
},
|
|
36932
|
+
{
|
|
36933
|
+
"type": "object",
|
|
36934
|
+
"properties": {
|
|
36935
|
+
"error_code": {
|
|
36936
|
+
"type": "string",
|
|
36937
|
+
"enum": [
|
|
36938
|
+
"account_not_found"
|
|
36939
|
+
]
|
|
36940
|
+
}
|
|
36941
|
+
}
|
|
36942
|
+
}
|
|
36943
|
+
]
|
|
36944
|
+
}
|
|
36945
|
+
}
|
|
36946
|
+
}
|
|
36947
|
+
},
|
|
36948
|
+
"429": {
|
|
36949
|
+
"description": "`too_many_requests` — Rate limit exceeded. Honour the `Retry-After` header.",
|
|
36950
|
+
"content": {
|
|
36951
|
+
"application/json": {
|
|
36952
|
+
"schema": {
|
|
36953
|
+
"allOf": [
|
|
36954
|
+
{
|
|
36955
|
+
"$ref": "#/components/schemas/ErrorResponse"
|
|
36956
|
+
},
|
|
36957
|
+
{
|
|
36958
|
+
"type": "object",
|
|
36959
|
+
"properties": {
|
|
36960
|
+
"error_code": {
|
|
36961
|
+
"type": "string",
|
|
36962
|
+
"enum": [
|
|
36963
|
+
"too_many_requests"
|
|
36964
|
+
]
|
|
36965
|
+
}
|
|
36966
|
+
}
|
|
36967
|
+
}
|
|
36968
|
+
]
|
|
36969
|
+
}
|
|
36970
|
+
}
|
|
36971
|
+
}
|
|
36972
|
+
},
|
|
36973
|
+
"500": {
|
|
36974
|
+
"description": "`internal_error` — Unexpected server error. Retry later; the request id is logged.",
|
|
36975
|
+
"content": {
|
|
36976
|
+
"application/json": {
|
|
36977
|
+
"schema": {
|
|
36978
|
+
"allOf": [
|
|
36979
|
+
{
|
|
36980
|
+
"$ref": "#/components/schemas/ErrorResponse"
|
|
36981
|
+
},
|
|
36982
|
+
{
|
|
36983
|
+
"type": "object",
|
|
36984
|
+
"properties": {
|
|
36985
|
+
"error_code": {
|
|
36986
|
+
"type": "string",
|
|
36987
|
+
"enum": [
|
|
36988
|
+
"internal_error"
|
|
36989
|
+
]
|
|
36990
|
+
}
|
|
36991
|
+
}
|
|
36992
|
+
}
|
|
36993
|
+
]
|
|
36994
|
+
}
|
|
36995
|
+
}
|
|
36996
|
+
}
|
|
36997
|
+
}
|
|
36998
|
+
}
|
|
36999
|
+
}
|
|
37000
|
+
},
|
|
37001
|
+
"/role/{role_id}": {
|
|
37002
|
+
"get": {
|
|
37003
|
+
"operationId": "role/get",
|
|
37004
|
+
"summary": "Get Role",
|
|
37005
|
+
"tags": [
|
|
37006
|
+
"role"
|
|
37007
|
+
],
|
|
37008
|
+
"description": "Get Role",
|
|
37009
|
+
"parameters": [
|
|
37010
|
+
{
|
|
37011
|
+
"schema": {
|
|
37012
|
+
"type": "string"
|
|
37013
|
+
},
|
|
37014
|
+
"in": "path",
|
|
37015
|
+
"name": "role_id",
|
|
37016
|
+
"required": true
|
|
37017
|
+
}
|
|
37018
|
+
],
|
|
37019
|
+
"security": [
|
|
37020
|
+
{
|
|
37021
|
+
"bearerAuth": []
|
|
37022
|
+
}
|
|
37023
|
+
],
|
|
37024
|
+
"responses": {
|
|
37025
|
+
"200": {
|
|
37026
|
+
"description": "Role",
|
|
37027
|
+
"content": {
|
|
37028
|
+
"application/json": {
|
|
37029
|
+
"schema": {
|
|
37030
|
+
"type": "object",
|
|
37031
|
+
"required": [
|
|
37032
|
+
"id",
|
|
37033
|
+
"name",
|
|
37034
|
+
"description",
|
|
37035
|
+
"permissions",
|
|
37036
|
+
"account",
|
|
37037
|
+
"createdAt"
|
|
37038
|
+
],
|
|
37039
|
+
"properties": {
|
|
37040
|
+
"id": {
|
|
37041
|
+
"type": "string",
|
|
37042
|
+
"description": "Role ID"
|
|
37043
|
+
},
|
|
37044
|
+
"name": {
|
|
37045
|
+
"type": "string",
|
|
37046
|
+
"description": "Short, human-readable identifier for the role (e.g. `admin`, `editor`, `billing-manager`). Surfaced in the dashboard role pickers.",
|
|
37047
|
+
"example": "admin"
|
|
37048
|
+
},
|
|
37049
|
+
"description": {
|
|
37050
|
+
"type": "string",
|
|
37051
|
+
"description": "Free-form explanation of what users in this role are expected to do or have access to. Shown alongside the role in the dashboard."
|
|
37052
|
+
},
|
|
37053
|
+
"permissions": {
|
|
37054
|
+
"type": "array",
|
|
37055
|
+
"items": {
|
|
37056
|
+
"type": "object",
|
|
37057
|
+
"required": [
|
|
37058
|
+
"api",
|
|
37059
|
+
"value"
|
|
37060
|
+
],
|
|
37061
|
+
"properties": {
|
|
37062
|
+
"api": {
|
|
37063
|
+
"type": "string",
|
|
37064
|
+
"description": "Id of the Api that defines the permission.",
|
|
37065
|
+
"example": "api_6555fd293acc2f0fac0e3452"
|
|
37066
|
+
},
|
|
37067
|
+
"value": {
|
|
37068
|
+
"type": "string",
|
|
37069
|
+
"description": "The permission, as it appears in the Api's `permissions` catalog.",
|
|
37070
|
+
"example": "invites:write"
|
|
37071
|
+
}
|
|
37072
|
+
},
|
|
37073
|
+
"additionalProperties": false,
|
|
37074
|
+
"description": "A permission of one Api granted by a role."
|
|
37075
|
+
},
|
|
37076
|
+
"description": "Api permissions granted to the users that hold this role at the account level (team roles grant none). Change them with `POST` / `DELETE /role/:role_id/permissions`; `GET /role/:role_id/permissions` lists them with their Api."
|
|
37077
|
+
},
|
|
37078
|
+
"account": {
|
|
37079
|
+
"type": "string",
|
|
37080
|
+
"description": "Object is related with this account"
|
|
37081
|
+
},
|
|
37082
|
+
"metadata": {
|
|
37083
|
+
"type": "object",
|
|
37084
|
+
"properties": {},
|
|
37085
|
+
"additionalProperties": true,
|
|
37086
|
+
"description": "RoleMetadata",
|
|
37087
|
+
"default": {}
|
|
37088
|
+
},
|
|
37089
|
+
"createdAt": {
|
|
37090
|
+
"type": "string",
|
|
37091
|
+
"description": "Role creation date"
|
|
37092
|
+
},
|
|
37093
|
+
"updatedAt": {
|
|
37094
|
+
"type": "string",
|
|
37095
|
+
"description": "Role updated date"
|
|
37096
|
+
}
|
|
37097
|
+
},
|
|
37098
|
+
"description": "Role"
|
|
37099
|
+
}
|
|
37100
|
+
}
|
|
37101
|
+
}
|
|
37102
|
+
},
|
|
37103
|
+
"400": {
|
|
37104
|
+
"description": "`invalid_id` — The id in the path is not a valid id for this resource.\n\n`invalid_expand` — An `?expand=` path is not allowed on this resource.\n\n`validation_error` — The body, query or path failed schema validation. `details.issues` lists each failing field.",
|
|
37105
|
+
"content": {
|
|
37106
|
+
"application/json": {
|
|
37107
|
+
"schema": {
|
|
37108
|
+
"allOf": [
|
|
37109
|
+
{
|
|
37110
|
+
"$ref": "#/components/schemas/ErrorResponse"
|
|
37111
|
+
},
|
|
37112
|
+
{
|
|
37113
|
+
"type": "object",
|
|
37114
|
+
"properties": {
|
|
37115
|
+
"error_code": {
|
|
37116
|
+
"type": "string",
|
|
37117
|
+
"enum": [
|
|
37118
|
+
"invalid_id",
|
|
37119
|
+
"invalid_expand",
|
|
37120
|
+
"validation_error"
|
|
37121
|
+
]
|
|
37122
|
+
}
|
|
37123
|
+
}
|
|
37124
|
+
}
|
|
37125
|
+
]
|
|
37126
|
+
}
|
|
37127
|
+
}
|
|
37128
|
+
}
|
|
37129
|
+
},
|
|
37130
|
+
"401": {
|
|
37131
|
+
"description": "`unauthorized` — The request carries no valid credentials.",
|
|
37132
|
+
"content": {
|
|
37133
|
+
"application/json": {
|
|
37134
|
+
"schema": {
|
|
37135
|
+
"allOf": [
|
|
37136
|
+
{
|
|
37137
|
+
"$ref": "#/components/schemas/ErrorResponse"
|
|
37138
|
+
},
|
|
37139
|
+
{
|
|
37140
|
+
"type": "object",
|
|
37141
|
+
"properties": {
|
|
37142
|
+
"error_code": {
|
|
37143
|
+
"type": "string",
|
|
37144
|
+
"enum": [
|
|
37145
|
+
"unauthorized"
|
|
37146
|
+
]
|
|
37147
|
+
}
|
|
37148
|
+
}
|
|
37149
|
+
}
|
|
37150
|
+
]
|
|
37151
|
+
}
|
|
37152
|
+
}
|
|
37153
|
+
}
|
|
37154
|
+
},
|
|
37155
|
+
"403": {
|
|
37156
|
+
"description": "`forbidden` — The credentials are valid but do not allow this operation.\n\n`insufficient_scope` — The token lacks a scope this operation requires. `message` names it.\n\n`user_suspended` — The user is suspended and cannot sign in or be modified.",
|
|
37157
|
+
"content": {
|
|
37158
|
+
"application/json": {
|
|
37159
|
+
"schema": {
|
|
37160
|
+
"allOf": [
|
|
37161
|
+
{
|
|
37162
|
+
"$ref": "#/components/schemas/ErrorResponse"
|
|
37163
|
+
},
|
|
37164
|
+
{
|
|
37165
|
+
"type": "object",
|
|
37166
|
+
"properties": {
|
|
37167
|
+
"error_code": {
|
|
37168
|
+
"type": "string",
|
|
37169
|
+
"enum": [
|
|
37170
|
+
"forbidden",
|
|
37171
|
+
"insufficient_scope",
|
|
37172
|
+
"user_suspended"
|
|
37173
|
+
]
|
|
37174
|
+
}
|
|
37175
|
+
}
|
|
37176
|
+
}
|
|
37177
|
+
]
|
|
37178
|
+
}
|
|
37179
|
+
}
|
|
37180
|
+
}
|
|
37181
|
+
},
|
|
37182
|
+
"404": {
|
|
37183
|
+
"description": "`not_found` — The resource does not exist in this account.\n\n`account_not_found` — No Auth Account matches the request (domain, header or token).",
|
|
37184
|
+
"content": {
|
|
37185
|
+
"application/json": {
|
|
37186
|
+
"schema": {
|
|
37187
|
+
"allOf": [
|
|
37188
|
+
{
|
|
37189
|
+
"$ref": "#/components/schemas/ErrorResponse"
|
|
37190
|
+
},
|
|
37191
|
+
{
|
|
37192
|
+
"type": "object",
|
|
37193
|
+
"properties": {
|
|
37194
|
+
"error_code": {
|
|
37195
|
+
"type": "string",
|
|
37196
|
+
"enum": [
|
|
37197
|
+
"not_found",
|
|
37198
|
+
"account_not_found"
|
|
37199
|
+
]
|
|
37200
|
+
}
|
|
37201
|
+
}
|
|
37202
|
+
}
|
|
37203
|
+
]
|
|
37204
|
+
}
|
|
37205
|
+
}
|
|
37206
|
+
}
|
|
37207
|
+
},
|
|
37208
|
+
"429": {
|
|
37209
|
+
"description": "`too_many_requests` — Rate limit exceeded. Honour the `Retry-After` header.",
|
|
37210
|
+
"content": {
|
|
37211
|
+
"application/json": {
|
|
37212
|
+
"schema": {
|
|
37213
|
+
"allOf": [
|
|
37214
|
+
{
|
|
37215
|
+
"$ref": "#/components/schemas/ErrorResponse"
|
|
37216
|
+
},
|
|
37217
|
+
{
|
|
37218
|
+
"type": "object",
|
|
37219
|
+
"properties": {
|
|
37220
|
+
"error_code": {
|
|
37221
|
+
"type": "string",
|
|
37222
|
+
"enum": [
|
|
37223
|
+
"too_many_requests"
|
|
37224
|
+
]
|
|
37225
|
+
}
|
|
37226
|
+
}
|
|
37227
|
+
}
|
|
37228
|
+
]
|
|
37229
|
+
}
|
|
37230
|
+
}
|
|
37231
|
+
}
|
|
37232
|
+
},
|
|
37233
|
+
"500": {
|
|
37234
|
+
"description": "`internal_error` — Unexpected server error. Retry later; the request id is logged.",
|
|
37235
|
+
"content": {
|
|
37236
|
+
"application/json": {
|
|
37237
|
+
"schema": {
|
|
37238
|
+
"allOf": [
|
|
37239
|
+
{
|
|
37240
|
+
"$ref": "#/components/schemas/ErrorResponse"
|
|
37241
|
+
},
|
|
37242
|
+
{
|
|
37243
|
+
"type": "object",
|
|
37244
|
+
"properties": {
|
|
37245
|
+
"error_code": {
|
|
37246
|
+
"type": "string",
|
|
37247
|
+
"enum": [
|
|
37248
|
+
"internal_error"
|
|
37249
|
+
]
|
|
37250
|
+
}
|
|
37251
|
+
}
|
|
37252
|
+
}
|
|
37253
|
+
]
|
|
37254
|
+
}
|
|
37255
|
+
}
|
|
37256
|
+
}
|
|
37257
|
+
}
|
|
37258
|
+
}
|
|
37259
|
+
},
|
|
37260
|
+
"post": {
|
|
37261
|
+
"operationId": "role/update",
|
|
37262
|
+
"summary": "Update Role",
|
|
37263
|
+
"tags": [
|
|
37264
|
+
"role"
|
|
37265
|
+
],
|
|
37266
|
+
"description": "Update Role",
|
|
37267
|
+
"requestBody": {
|
|
37268
|
+
"required": true,
|
|
37269
|
+
"content": {
|
|
37270
|
+
"application/json": {
|
|
37271
|
+
"schema": {
|
|
37272
|
+
"type": "object",
|
|
37273
|
+
"properties": {
|
|
37274
|
+
"name": {
|
|
37275
|
+
"type": "string",
|
|
37276
|
+
"description": "New human-readable identifier for the role."
|
|
37277
|
+
},
|
|
37278
|
+
"description": {
|
|
37279
|
+
"type": "string",
|
|
37280
|
+
"description": "New free-form description of what users in this role do."
|
|
37281
|
+
}
|
|
37282
|
+
},
|
|
37283
|
+
"description": "Partial update for a Role. Only the supplied fields are modified.",
|
|
37284
|
+
"additionalProperties": false
|
|
37285
|
+
}
|
|
37286
|
+
}
|
|
35679
37287
|
},
|
|
37288
|
+
"description": "Partial update for a Role. Only the supplied fields are modified."
|
|
37289
|
+
},
|
|
37290
|
+
"parameters": [
|
|
35680
37291
|
{
|
|
35681
37292
|
"schema": {
|
|
35682
37293
|
"type": "string"
|
|
35683
37294
|
},
|
|
35684
|
-
"in": "
|
|
35685
|
-
"name": "
|
|
35686
|
-
"required":
|
|
35687
|
-
"description": "Filter using a FaableQL query"
|
|
35688
|
-
},
|
|
35689
|
-
{
|
|
35690
|
-
"schema": {
|
|
35691
|
-
"type": "string",
|
|
35692
|
-
"minLength": 1,
|
|
35693
|
-
"maxLength": 200
|
|
35694
|
-
},
|
|
35695
|
-
"in": "query",
|
|
35696
|
-
"name": "q",
|
|
35697
|
-
"required": false,
|
|
35698
|
-
"description": "Full-text search across: `name`, `description`."
|
|
37295
|
+
"in": "path",
|
|
37296
|
+
"name": "role_id",
|
|
37297
|
+
"required": true
|
|
35699
37298
|
}
|
|
35700
37299
|
],
|
|
35701
37300
|
"security": [
|
|
@@ -35705,44 +37304,85 @@
|
|
|
35705
37304
|
],
|
|
35706
37305
|
"responses": {
|
|
35707
37306
|
"200": {
|
|
35708
|
-
"description": "
|
|
37307
|
+
"description": "Role",
|
|
35709
37308
|
"content": {
|
|
35710
37309
|
"application/json": {
|
|
35711
37310
|
"schema": {
|
|
35712
37311
|
"type": "object",
|
|
35713
37312
|
"required": [
|
|
35714
|
-
"
|
|
35715
|
-
"
|
|
37313
|
+
"id",
|
|
37314
|
+
"name",
|
|
37315
|
+
"description",
|
|
37316
|
+
"permissions",
|
|
37317
|
+
"account",
|
|
37318
|
+
"createdAt"
|
|
35716
37319
|
],
|
|
35717
37320
|
"properties": {
|
|
35718
|
-
"
|
|
35719
|
-
"
|
|
35720
|
-
|
|
35721
|
-
"type": "string"
|
|
35722
|
-
},
|
|
35723
|
-
{
|
|
35724
|
-
"type": "null"
|
|
35725
|
-
}
|
|
35726
|
-
]
|
|
37321
|
+
"id": {
|
|
37322
|
+
"type": "string",
|
|
37323
|
+
"description": "Role ID"
|
|
35727
37324
|
},
|
|
35728
|
-
"
|
|
37325
|
+
"name": {
|
|
37326
|
+
"type": "string",
|
|
37327
|
+
"description": "Short, human-readable identifier for the role (e.g. `admin`, `editor`, `billing-manager`). Surfaced in the dashboard role pickers.",
|
|
37328
|
+
"example": "admin"
|
|
37329
|
+
},
|
|
37330
|
+
"description": {
|
|
37331
|
+
"type": "string",
|
|
37332
|
+
"description": "Free-form explanation of what users in this role are expected to do or have access to. Shown alongside the role in the dashboard."
|
|
37333
|
+
},
|
|
37334
|
+
"permissions": {
|
|
35729
37335
|
"type": "array",
|
|
35730
37336
|
"items": {
|
|
35731
|
-
"
|
|
35732
|
-
|
|
37337
|
+
"type": "object",
|
|
37338
|
+
"required": [
|
|
37339
|
+
"api",
|
|
37340
|
+
"value"
|
|
37341
|
+
],
|
|
37342
|
+
"properties": {
|
|
37343
|
+
"api": {
|
|
37344
|
+
"type": "string",
|
|
37345
|
+
"description": "Id of the Api that defines the permission.",
|
|
37346
|
+
"example": "api_6555fd293acc2f0fac0e3452"
|
|
37347
|
+
},
|
|
37348
|
+
"value": {
|
|
37349
|
+
"type": "string",
|
|
37350
|
+
"description": "The permission, as it appears in the Api's `permissions` catalog.",
|
|
37351
|
+
"example": "invites:write"
|
|
37352
|
+
}
|
|
37353
|
+
},
|
|
37354
|
+
"additionalProperties": false,
|
|
37355
|
+
"description": "A permission of one Api granted by a role."
|
|
37356
|
+
},
|
|
37357
|
+
"description": "Api permissions granted to the users that hold this role at the account level (team roles grant none). Change them with `POST` / `DELETE /role/:role_id/permissions`; `GET /role/:role_id/permissions` lists them with their Api."
|
|
35733
37358
|
},
|
|
35734
|
-
"
|
|
35735
|
-
"type": "
|
|
35736
|
-
"description": "
|
|
37359
|
+
"account": {
|
|
37360
|
+
"type": "string",
|
|
37361
|
+
"description": "Object is related with this account"
|
|
37362
|
+
},
|
|
37363
|
+
"metadata": {
|
|
37364
|
+
"type": "object",
|
|
37365
|
+
"properties": {},
|
|
37366
|
+
"additionalProperties": true,
|
|
37367
|
+
"description": "RoleMetadata",
|
|
37368
|
+
"default": {}
|
|
37369
|
+
},
|
|
37370
|
+
"createdAt": {
|
|
37371
|
+
"type": "string",
|
|
37372
|
+
"description": "Role creation date"
|
|
37373
|
+
},
|
|
37374
|
+
"updatedAt": {
|
|
37375
|
+
"type": "string",
|
|
37376
|
+
"description": "Role updated date"
|
|
35737
37377
|
}
|
|
35738
37378
|
},
|
|
35739
|
-
"
|
|
37379
|
+
"description": "Role"
|
|
35740
37380
|
}
|
|
35741
37381
|
}
|
|
35742
37382
|
}
|
|
35743
37383
|
},
|
|
35744
37384
|
"400": {
|
|
35745
|
-
"description": "`
|
|
37385
|
+
"description": "`invalid_id` — The id in the path is not a valid id for this resource.\n\n`already_exists` — A resource with the same unique field already exists (for a user, usually `email`). `details.fields` names the field.\n\n`validation_error` — The body, query or path failed schema validation. `details.issues` lists each failing field.",
|
|
35746
37386
|
"content": {
|
|
35747
37387
|
"application/json": {
|
|
35748
37388
|
"schema": {
|
|
@@ -35756,9 +37396,8 @@
|
|
|
35756
37396
|
"error_code": {
|
|
35757
37397
|
"type": "string",
|
|
35758
37398
|
"enum": [
|
|
35759
|
-
"
|
|
35760
|
-
"
|
|
35761
|
-
"search_not_supported",
|
|
37399
|
+
"invalid_id",
|
|
37400
|
+
"already_exists",
|
|
35762
37401
|
"validation_error"
|
|
35763
37402
|
]
|
|
35764
37403
|
}
|
|
@@ -35822,7 +37461,7 @@
|
|
|
35822
37461
|
}
|
|
35823
37462
|
},
|
|
35824
37463
|
"404": {
|
|
35825
|
-
"description": "`account_not_found` — No Auth Account matches the request (domain, header or token).",
|
|
37464
|
+
"description": "`not_found` — The resource does not exist in this account.\n\n`account_not_found` — No Auth Account matches the request (domain, header or token).",
|
|
35826
37465
|
"content": {
|
|
35827
37466
|
"application/json": {
|
|
35828
37467
|
"schema": {
|
|
@@ -35836,6 +37475,7 @@
|
|
|
35836
37475
|
"error_code": {
|
|
35837
37476
|
"type": "string",
|
|
35838
37477
|
"enum": [
|
|
37478
|
+
"not_found",
|
|
35839
37479
|
"account_not_found"
|
|
35840
37480
|
]
|
|
35841
37481
|
}
|
|
@@ -35898,46 +37538,23 @@
|
|
|
35898
37538
|
}
|
|
35899
37539
|
}
|
|
35900
37540
|
},
|
|
35901
|
-
"
|
|
35902
|
-
"operationId": "role/
|
|
35903
|
-
"summary": "
|
|
37541
|
+
"delete": {
|
|
37542
|
+
"operationId": "role/delete",
|
|
37543
|
+
"summary": "Delete Role",
|
|
35904
37544
|
"tags": [
|
|
35905
37545
|
"role"
|
|
35906
37546
|
],
|
|
35907
|
-
"description": "
|
|
35908
|
-
"
|
|
35909
|
-
|
|
35910
|
-
|
|
35911
|
-
|
|
35912
|
-
|
|
35913
|
-
|
|
35914
|
-
|
|
35915
|
-
|
|
35916
|
-
|
|
35917
|
-
|
|
35918
|
-
"name": {
|
|
35919
|
-
"type": "string",
|
|
35920
|
-
"description": "Short, human-readable identifier for the role (e.g. `admin`, `editor`).",
|
|
35921
|
-
"example": "admin"
|
|
35922
|
-
},
|
|
35923
|
-
"description": {
|
|
35924
|
-
"type": "string",
|
|
35925
|
-
"description": "Free-form explanation of what users in this role are expected to do or have access to."
|
|
35926
|
-
},
|
|
35927
|
-
"metadata": {
|
|
35928
|
-
"type": "object",
|
|
35929
|
-
"properties": {},
|
|
35930
|
-
"additionalProperties": true,
|
|
35931
|
-
"description": "Add Metadata"
|
|
35932
|
-
}
|
|
35933
|
-
},
|
|
35934
|
-
"description": "RoleCreate",
|
|
35935
|
-
"additionalProperties": false
|
|
35936
|
-
}
|
|
35937
|
-
}
|
|
35938
|
-
},
|
|
35939
|
-
"description": "RoleCreate"
|
|
35940
|
-
},
|
|
37547
|
+
"description": "Delete Role",
|
|
37548
|
+
"parameters": [
|
|
37549
|
+
{
|
|
37550
|
+
"schema": {
|
|
37551
|
+
"type": "string"
|
|
37552
|
+
},
|
|
37553
|
+
"in": "path",
|
|
37554
|
+
"name": "role_id",
|
|
37555
|
+
"required": true
|
|
37556
|
+
}
|
|
37557
|
+
],
|
|
35941
37558
|
"security": [
|
|
35942
37559
|
{
|
|
35943
37560
|
"bearerAuth": []
|
|
@@ -35954,6 +37571,7 @@
|
|
|
35954
37571
|
"id",
|
|
35955
37572
|
"name",
|
|
35956
37573
|
"description",
|
|
37574
|
+
"permissions",
|
|
35957
37575
|
"account",
|
|
35958
37576
|
"createdAt"
|
|
35959
37577
|
],
|
|
@@ -35971,6 +37589,31 @@
|
|
|
35971
37589
|
"type": "string",
|
|
35972
37590
|
"description": "Free-form explanation of what users in this role are expected to do or have access to. Shown alongside the role in the dashboard."
|
|
35973
37591
|
},
|
|
37592
|
+
"permissions": {
|
|
37593
|
+
"type": "array",
|
|
37594
|
+
"items": {
|
|
37595
|
+
"type": "object",
|
|
37596
|
+
"required": [
|
|
37597
|
+
"api",
|
|
37598
|
+
"value"
|
|
37599
|
+
],
|
|
37600
|
+
"properties": {
|
|
37601
|
+
"api": {
|
|
37602
|
+
"type": "string",
|
|
37603
|
+
"description": "Id of the Api that defines the permission.",
|
|
37604
|
+
"example": "api_6555fd293acc2f0fac0e3452"
|
|
37605
|
+
},
|
|
37606
|
+
"value": {
|
|
37607
|
+
"type": "string",
|
|
37608
|
+
"description": "The permission, as it appears in the Api's `permissions` catalog.",
|
|
37609
|
+
"example": "invites:write"
|
|
37610
|
+
}
|
|
37611
|
+
},
|
|
37612
|
+
"additionalProperties": false,
|
|
37613
|
+
"description": "A permission of one Api granted by a role."
|
|
37614
|
+
},
|
|
37615
|
+
"description": "Api permissions granted to the users that hold this role at the account level (team roles grant none). Change them with `POST` / `DELETE /role/:role_id/permissions`; `GET /role/:role_id/permissions` lists them with their Api."
|
|
37616
|
+
},
|
|
35974
37617
|
"account": {
|
|
35975
37618
|
"type": "string",
|
|
35976
37619
|
"description": "Object is related with this account"
|
|
@@ -35997,7 +37640,7 @@
|
|
|
35997
37640
|
}
|
|
35998
37641
|
},
|
|
35999
37642
|
"400": {
|
|
36000
|
-
"description": "`
|
|
37643
|
+
"description": "`invalid_id` — The id in the path is not a valid id for this resource.\n\n`validation_error` — The body, query or path failed schema validation. `details.issues` lists each failing field.",
|
|
36001
37644
|
"content": {
|
|
36002
37645
|
"application/json": {
|
|
36003
37646
|
"schema": {
|
|
@@ -36011,7 +37654,7 @@
|
|
|
36011
37654
|
"error_code": {
|
|
36012
37655
|
"type": "string",
|
|
36013
37656
|
"enum": [
|
|
36014
|
-
"
|
|
37657
|
+
"invalid_id",
|
|
36015
37658
|
"validation_error"
|
|
36016
37659
|
]
|
|
36017
37660
|
}
|
|
@@ -36075,7 +37718,7 @@
|
|
|
36075
37718
|
}
|
|
36076
37719
|
},
|
|
36077
37720
|
"404": {
|
|
36078
|
-
"description": "`account_not_found` — No Auth Account matches the request (domain, header or token).",
|
|
37721
|
+
"description": "`not_found` — The resource does not exist in this account.\n\n`account_not_found` — No Auth Account matches the request (domain, header or token).",
|
|
36079
37722
|
"content": {
|
|
36080
37723
|
"application/json": {
|
|
36081
37724
|
"schema": {
|
|
@@ -36089,6 +37732,7 @@
|
|
|
36089
37732
|
"error_code": {
|
|
36090
37733
|
"type": "string",
|
|
36091
37734
|
"enum": [
|
|
37735
|
+
"not_found",
|
|
36092
37736
|
"account_not_found"
|
|
36093
37737
|
]
|
|
36094
37738
|
}
|
|
@@ -36152,15 +37796,42 @@
|
|
|
36152
37796
|
}
|
|
36153
37797
|
}
|
|
36154
37798
|
},
|
|
36155
|
-
"/role/{role_id}": {
|
|
37799
|
+
"/role/{role_id}/users": {
|
|
36156
37800
|
"get": {
|
|
36157
|
-
"operationId": "role/
|
|
36158
|
-
"summary": "
|
|
37801
|
+
"operationId": "role/users",
|
|
37802
|
+
"summary": "List Users with Role",
|
|
36159
37803
|
"tags": [
|
|
36160
37804
|
"role"
|
|
36161
37805
|
],
|
|
36162
|
-
"description": "
|
|
37806
|
+
"description": "List Users with Role",
|
|
36163
37807
|
"parameters": [
|
|
37808
|
+
{
|
|
37809
|
+
"schema": {
|
|
37810
|
+
"type": "string"
|
|
37811
|
+
},
|
|
37812
|
+
"in": "query",
|
|
37813
|
+
"name": "cursor",
|
|
37814
|
+
"required": false,
|
|
37815
|
+
"description": "Start from this cursor"
|
|
37816
|
+
},
|
|
37817
|
+
{
|
|
37818
|
+
"schema": {
|
|
37819
|
+
"type": "string"
|
|
37820
|
+
},
|
|
37821
|
+
"in": "query",
|
|
37822
|
+
"name": "next",
|
|
37823
|
+
"required": false,
|
|
37824
|
+
"description": "Start from this cursor"
|
|
37825
|
+
},
|
|
37826
|
+
{
|
|
37827
|
+
"schema": {
|
|
37828
|
+
"type": "number"
|
|
37829
|
+
},
|
|
37830
|
+
"in": "query",
|
|
37831
|
+
"name": "pageSize",
|
|
37832
|
+
"required": false,
|
|
37833
|
+
"description": "Size of the results array"
|
|
37834
|
+
},
|
|
36164
37835
|
{
|
|
36165
37836
|
"schema": {
|
|
36166
37837
|
"type": "string"
|
|
@@ -36177,59 +37848,246 @@
|
|
|
36177
37848
|
],
|
|
36178
37849
|
"responses": {
|
|
36179
37850
|
"200": {
|
|
36180
|
-
"description": "
|
|
37851
|
+
"description": "PaginatedResponse",
|
|
36181
37852
|
"content": {
|
|
36182
37853
|
"application/json": {
|
|
36183
37854
|
"schema": {
|
|
36184
37855
|
"type": "object",
|
|
36185
37856
|
"required": [
|
|
36186
|
-
"
|
|
36187
|
-
"
|
|
36188
|
-
"description",
|
|
36189
|
-
"account",
|
|
36190
|
-
"createdAt"
|
|
37857
|
+
"next",
|
|
37858
|
+
"results"
|
|
36191
37859
|
],
|
|
36192
37860
|
"properties": {
|
|
36193
|
-
"
|
|
37861
|
+
"next": {
|
|
36194
37862
|
"type": "string",
|
|
36195
|
-
"description": "
|
|
37863
|
+
"description": "next cursor",
|
|
37864
|
+
"nullable": true
|
|
36196
37865
|
},
|
|
36197
|
-
"
|
|
36198
|
-
"type": "
|
|
36199
|
-
"
|
|
36200
|
-
|
|
37866
|
+
"results": {
|
|
37867
|
+
"type": "array",
|
|
37868
|
+
"items": {
|
|
37869
|
+
"$ref": "#/components/schemas/RoleMember"
|
|
37870
|
+
},
|
|
37871
|
+
"description": "List of results"
|
|
37872
|
+
}
|
|
37873
|
+
},
|
|
37874
|
+
"description": "PaginatedResponse",
|
|
37875
|
+
"additionalProperties": false
|
|
37876
|
+
}
|
|
37877
|
+
}
|
|
37878
|
+
}
|
|
37879
|
+
},
|
|
37880
|
+
"400": {
|
|
37881
|
+
"description": "`validation_error` — The body, query or path failed schema validation. `details.issues` lists each failing field.",
|
|
37882
|
+
"content": {
|
|
37883
|
+
"application/json": {
|
|
37884
|
+
"schema": {
|
|
37885
|
+
"allOf": [
|
|
37886
|
+
{
|
|
37887
|
+
"$ref": "#/components/schemas/ErrorResponse"
|
|
36201
37888
|
},
|
|
36202
|
-
|
|
36203
|
-
"type": "
|
|
36204
|
-
"
|
|
37889
|
+
{
|
|
37890
|
+
"type": "object",
|
|
37891
|
+
"properties": {
|
|
37892
|
+
"error_code": {
|
|
37893
|
+
"type": "string",
|
|
37894
|
+
"enum": [
|
|
37895
|
+
"validation_error"
|
|
37896
|
+
]
|
|
37897
|
+
}
|
|
37898
|
+
}
|
|
37899
|
+
}
|
|
37900
|
+
]
|
|
37901
|
+
}
|
|
37902
|
+
}
|
|
37903
|
+
}
|
|
37904
|
+
},
|
|
37905
|
+
"401": {
|
|
37906
|
+
"description": "`unauthorized` — The request carries no valid credentials.",
|
|
37907
|
+
"content": {
|
|
37908
|
+
"application/json": {
|
|
37909
|
+
"schema": {
|
|
37910
|
+
"allOf": [
|
|
37911
|
+
{
|
|
37912
|
+
"$ref": "#/components/schemas/ErrorResponse"
|
|
36205
37913
|
},
|
|
36206
|
-
|
|
36207
|
-
"type": "
|
|
36208
|
-
"
|
|
37914
|
+
{
|
|
37915
|
+
"type": "object",
|
|
37916
|
+
"properties": {
|
|
37917
|
+
"error_code": {
|
|
37918
|
+
"type": "string",
|
|
37919
|
+
"enum": [
|
|
37920
|
+
"unauthorized"
|
|
37921
|
+
]
|
|
37922
|
+
}
|
|
37923
|
+
}
|
|
37924
|
+
}
|
|
37925
|
+
]
|
|
37926
|
+
}
|
|
37927
|
+
}
|
|
37928
|
+
}
|
|
37929
|
+
},
|
|
37930
|
+
"403": {
|
|
37931
|
+
"description": "`forbidden` — The credentials are valid but do not allow this operation.\n\n`insufficient_scope` — The token lacks a scope this operation requires. `message` names it.\n\n`user_suspended` — The user is suspended and cannot sign in or be modified.",
|
|
37932
|
+
"content": {
|
|
37933
|
+
"application/json": {
|
|
37934
|
+
"schema": {
|
|
37935
|
+
"allOf": [
|
|
37936
|
+
{
|
|
37937
|
+
"$ref": "#/components/schemas/ErrorResponse"
|
|
36209
37938
|
},
|
|
36210
|
-
|
|
37939
|
+
{
|
|
36211
37940
|
"type": "object",
|
|
36212
|
-
"properties": {
|
|
36213
|
-
|
|
36214
|
-
|
|
36215
|
-
|
|
37941
|
+
"properties": {
|
|
37942
|
+
"error_code": {
|
|
37943
|
+
"type": "string",
|
|
37944
|
+
"enum": [
|
|
37945
|
+
"forbidden",
|
|
37946
|
+
"insufficient_scope",
|
|
37947
|
+
"user_suspended"
|
|
37948
|
+
]
|
|
37949
|
+
}
|
|
37950
|
+
}
|
|
37951
|
+
}
|
|
37952
|
+
]
|
|
37953
|
+
}
|
|
37954
|
+
}
|
|
37955
|
+
}
|
|
37956
|
+
},
|
|
37957
|
+
"404": {
|
|
37958
|
+
"description": "`role_not_found` — No role with that id in this account.\n\n`account_not_found` — No Auth Account matches the request (domain, header or token).",
|
|
37959
|
+
"content": {
|
|
37960
|
+
"application/json": {
|
|
37961
|
+
"schema": {
|
|
37962
|
+
"allOf": [
|
|
37963
|
+
{
|
|
37964
|
+
"$ref": "#/components/schemas/ErrorResponse"
|
|
36216
37965
|
},
|
|
36217
|
-
|
|
36218
|
-
"type": "
|
|
36219
|
-
"
|
|
37966
|
+
{
|
|
37967
|
+
"type": "object",
|
|
37968
|
+
"properties": {
|
|
37969
|
+
"error_code": {
|
|
37970
|
+
"type": "string",
|
|
37971
|
+
"enum": [
|
|
37972
|
+
"role_not_found",
|
|
37973
|
+
"account_not_found"
|
|
37974
|
+
]
|
|
37975
|
+
}
|
|
37976
|
+
}
|
|
37977
|
+
}
|
|
37978
|
+
]
|
|
37979
|
+
}
|
|
37980
|
+
}
|
|
37981
|
+
}
|
|
37982
|
+
},
|
|
37983
|
+
"429": {
|
|
37984
|
+
"description": "`too_many_requests` — Rate limit exceeded. Honour the `Retry-After` header.",
|
|
37985
|
+
"content": {
|
|
37986
|
+
"application/json": {
|
|
37987
|
+
"schema": {
|
|
37988
|
+
"allOf": [
|
|
37989
|
+
{
|
|
37990
|
+
"$ref": "#/components/schemas/ErrorResponse"
|
|
36220
37991
|
},
|
|
36221
|
-
|
|
36222
|
-
"type": "
|
|
36223
|
-
"
|
|
37992
|
+
{
|
|
37993
|
+
"type": "object",
|
|
37994
|
+
"properties": {
|
|
37995
|
+
"error_code": {
|
|
37996
|
+
"type": "string",
|
|
37997
|
+
"enum": [
|
|
37998
|
+
"too_many_requests"
|
|
37999
|
+
]
|
|
38000
|
+
}
|
|
38001
|
+
}
|
|
36224
38002
|
}
|
|
36225
|
-
|
|
36226
|
-
|
|
38003
|
+
]
|
|
38004
|
+
}
|
|
38005
|
+
}
|
|
38006
|
+
}
|
|
38007
|
+
},
|
|
38008
|
+
"500": {
|
|
38009
|
+
"description": "`internal_error` — Unexpected server error. Retry later; the request id is logged.",
|
|
38010
|
+
"content": {
|
|
38011
|
+
"application/json": {
|
|
38012
|
+
"schema": {
|
|
38013
|
+
"allOf": [
|
|
38014
|
+
{
|
|
38015
|
+
"$ref": "#/components/schemas/ErrorResponse"
|
|
38016
|
+
},
|
|
38017
|
+
{
|
|
38018
|
+
"type": "object",
|
|
38019
|
+
"properties": {
|
|
38020
|
+
"error_code": {
|
|
38021
|
+
"type": "string",
|
|
38022
|
+
"enum": [
|
|
38023
|
+
"internal_error"
|
|
38024
|
+
]
|
|
38025
|
+
}
|
|
38026
|
+
}
|
|
38027
|
+
}
|
|
38028
|
+
]
|
|
36227
38029
|
}
|
|
36228
38030
|
}
|
|
36229
38031
|
}
|
|
38032
|
+
}
|
|
38033
|
+
}
|
|
38034
|
+
},
|
|
38035
|
+
"post": {
|
|
38036
|
+
"operationId": "role/assign_users",
|
|
38037
|
+
"summary": "Assign Users to Role",
|
|
38038
|
+
"tags": [
|
|
38039
|
+
"role"
|
|
38040
|
+
],
|
|
38041
|
+
"description": "Assign Users to Role",
|
|
38042
|
+
"requestBody": {
|
|
38043
|
+
"required": true,
|
|
38044
|
+
"content": {
|
|
38045
|
+
"application/json": {
|
|
38046
|
+
"schema": {
|
|
38047
|
+
"type": "object",
|
|
38048
|
+
"required": [
|
|
38049
|
+
"users"
|
|
38050
|
+
],
|
|
38051
|
+
"properties": {
|
|
38052
|
+
"users": {
|
|
38053
|
+
"type": "array",
|
|
38054
|
+
"items": {
|
|
38055
|
+
"type": "string"
|
|
38056
|
+
},
|
|
38057
|
+
"description": "List of User ids to grant the role to. Existing role memberships are preserved; passing a user that already holds the role is a no-op.",
|
|
38058
|
+
"example": [
|
|
38059
|
+
"user_6555fd293acc2f0fac0e3452"
|
|
38060
|
+
]
|
|
38061
|
+
}
|
|
38062
|
+
},
|
|
38063
|
+
"additionalProperties": false,
|
|
38064
|
+
"description": "Payload for granting a role to one or more users in a single call. Posted to `POST /role/:role_id/users`."
|
|
38065
|
+
}
|
|
38066
|
+
}
|
|
38067
|
+
},
|
|
38068
|
+
"description": "Payload for granting a role to one or more users in a single call. Posted to `POST /role/:role_id/users`."
|
|
38069
|
+
},
|
|
38070
|
+
"parameters": [
|
|
38071
|
+
{
|
|
38072
|
+
"schema": {
|
|
38073
|
+
"type": "string"
|
|
38074
|
+
},
|
|
38075
|
+
"in": "path",
|
|
38076
|
+
"name": "role_id",
|
|
38077
|
+
"required": true
|
|
38078
|
+
}
|
|
38079
|
+
],
|
|
38080
|
+
"security": [
|
|
38081
|
+
{
|
|
38082
|
+
"bearerAuth": []
|
|
38083
|
+
}
|
|
38084
|
+
],
|
|
38085
|
+
"responses": {
|
|
38086
|
+
"200": {
|
|
38087
|
+
"description": "Default Response"
|
|
36230
38088
|
},
|
|
36231
38089
|
"400": {
|
|
36232
|
-
"description": "`
|
|
38090
|
+
"description": "`invalid_role` — The role belongs to another account.\n\n`validation_error` — The body, query or path failed schema validation. `details.issues` lists each failing field.",
|
|
36233
38091
|
"content": {
|
|
36234
38092
|
"application/json": {
|
|
36235
38093
|
"schema": {
|
|
@@ -36243,8 +38101,7 @@
|
|
|
36243
38101
|
"error_code": {
|
|
36244
38102
|
"type": "string",
|
|
36245
38103
|
"enum": [
|
|
36246
|
-
"
|
|
36247
|
-
"invalid_expand",
|
|
38104
|
+
"invalid_role",
|
|
36248
38105
|
"validation_error"
|
|
36249
38106
|
]
|
|
36250
38107
|
}
|
|
@@ -36308,7 +38165,7 @@
|
|
|
36308
38165
|
}
|
|
36309
38166
|
},
|
|
36310
38167
|
"404": {
|
|
36311
|
-
"description": "`
|
|
38168
|
+
"description": "`role_not_found` — No role with that id in this account.\n\n`account_not_found` — No Auth Account matches the request (domain, header or token).",
|
|
36312
38169
|
"content": {
|
|
36313
38170
|
"application/json": {
|
|
36314
38171
|
"schema": {
|
|
@@ -36322,7 +38179,7 @@
|
|
|
36322
38179
|
"error_code": {
|
|
36323
38180
|
"type": "string",
|
|
36324
38181
|
"enum": [
|
|
36325
|
-
"
|
|
38182
|
+
"role_not_found",
|
|
36326
38183
|
"account_not_found"
|
|
36327
38184
|
]
|
|
36328
38185
|
}
|
|
@@ -36385,35 +38242,41 @@
|
|
|
36385
38242
|
}
|
|
36386
38243
|
}
|
|
36387
38244
|
},
|
|
36388
|
-
"
|
|
36389
|
-
"operationId": "role/
|
|
36390
|
-
"summary": "
|
|
38245
|
+
"delete": {
|
|
38246
|
+
"operationId": "role/remove_users",
|
|
38247
|
+
"summary": "Remove Users from Role",
|
|
36391
38248
|
"tags": [
|
|
36392
38249
|
"role"
|
|
36393
38250
|
],
|
|
36394
|
-
"description": "
|
|
38251
|
+
"description": "Revokes an account-level role from users. Their next tokens (refreshes included) no longer carry its permissions; tokens already issued keep them until they expire. Leaves an entry in the tenant's log.",
|
|
36395
38252
|
"requestBody": {
|
|
36396
38253
|
"required": true,
|
|
36397
38254
|
"content": {
|
|
36398
38255
|
"application/json": {
|
|
36399
38256
|
"schema": {
|
|
36400
38257
|
"type": "object",
|
|
38258
|
+
"required": [
|
|
38259
|
+
"users"
|
|
38260
|
+
],
|
|
36401
38261
|
"properties": {
|
|
36402
|
-
"
|
|
36403
|
-
"type": "
|
|
36404
|
-
"
|
|
36405
|
-
|
|
36406
|
-
|
|
36407
|
-
"
|
|
36408
|
-
"description": "
|
|
38262
|
+
"users": {
|
|
38263
|
+
"type": "array",
|
|
38264
|
+
"items": {
|
|
38265
|
+
"type": "string"
|
|
38266
|
+
},
|
|
38267
|
+
"minItems": 1,
|
|
38268
|
+
"description": "User ids to revoke the role from. A user that does not hold it is reported in `not_in_role`, not an error.",
|
|
38269
|
+
"example": [
|
|
38270
|
+
"user_6555fd293acc2f0fac0e3452"
|
|
38271
|
+
]
|
|
36409
38272
|
}
|
|
36410
38273
|
},
|
|
36411
|
-
"
|
|
36412
|
-
"
|
|
38274
|
+
"additionalProperties": false,
|
|
38275
|
+
"description": "Payload for revoking a role from one or more users. Sent to `DELETE /role/:role_id/users`."
|
|
36413
38276
|
}
|
|
36414
38277
|
}
|
|
36415
38278
|
},
|
|
36416
|
-
"description": "
|
|
38279
|
+
"description": "Payload for revoking a role from one or more users. Sent to `DELETE /role/:role_id/users`."
|
|
36417
38280
|
},
|
|
36418
38281
|
"parameters": [
|
|
36419
38282
|
{
|
|
@@ -36432,59 +38295,36 @@
|
|
|
36432
38295
|
],
|
|
36433
38296
|
"responses": {
|
|
36434
38297
|
"200": {
|
|
36435
|
-
"description": "
|
|
38298
|
+
"description": "Default Response",
|
|
36436
38299
|
"content": {
|
|
36437
38300
|
"application/json": {
|
|
36438
38301
|
"schema": {
|
|
36439
38302
|
"type": "object",
|
|
36440
38303
|
"required": [
|
|
36441
|
-
"
|
|
36442
|
-
"
|
|
36443
|
-
"description",
|
|
36444
|
-
"account",
|
|
36445
|
-
"createdAt"
|
|
38304
|
+
"removed_from_role",
|
|
38305
|
+
"not_in_role"
|
|
36446
38306
|
],
|
|
36447
38307
|
"properties": {
|
|
36448
|
-
"
|
|
36449
|
-
"type": "
|
|
36450
|
-
"
|
|
36451
|
-
|
|
36452
|
-
|
|
36453
|
-
"type": "string",
|
|
36454
|
-
"description": "Short, human-readable identifier for the role (e.g. `admin`, `editor`, `billing-manager`). Surfaced in the dashboard role pickers.",
|
|
36455
|
-
"example": "admin"
|
|
36456
|
-
},
|
|
36457
|
-
"description": {
|
|
36458
|
-
"type": "string",
|
|
36459
|
-
"description": "Free-form explanation of what users in this role are expected to do or have access to. Shown alongside the role in the dashboard."
|
|
36460
|
-
},
|
|
36461
|
-
"account": {
|
|
36462
|
-
"type": "string",
|
|
36463
|
-
"description": "Object is related with this account"
|
|
36464
|
-
},
|
|
36465
|
-
"metadata": {
|
|
36466
|
-
"type": "object",
|
|
36467
|
-
"properties": {},
|
|
36468
|
-
"additionalProperties": true,
|
|
36469
|
-
"description": "RoleMetadata",
|
|
36470
|
-
"default": {}
|
|
36471
|
-
},
|
|
36472
|
-
"createdAt": {
|
|
36473
|
-
"type": "string",
|
|
36474
|
-
"description": "Role creation date"
|
|
38308
|
+
"removed_from_role": {
|
|
38309
|
+
"type": "array",
|
|
38310
|
+
"items": {
|
|
38311
|
+
"type": "string"
|
|
38312
|
+
}
|
|
36475
38313
|
},
|
|
36476
|
-
"
|
|
36477
|
-
"type": "
|
|
36478
|
-
"
|
|
38314
|
+
"not_in_role": {
|
|
38315
|
+
"type": "array",
|
|
38316
|
+
"items": {
|
|
38317
|
+
"type": "string"
|
|
38318
|
+
}
|
|
36479
38319
|
}
|
|
36480
38320
|
},
|
|
36481
|
-
"
|
|
38321
|
+
"additionalProperties": false
|
|
36482
38322
|
}
|
|
36483
38323
|
}
|
|
36484
38324
|
}
|
|
36485
38325
|
},
|
|
36486
38326
|
"400": {
|
|
36487
|
-
"description": "`
|
|
38327
|
+
"description": "`invalid_role` — The role belongs to another account.\n\n`validation_error` — The body, query or path failed schema validation. `details.issues` lists each failing field.",
|
|
36488
38328
|
"content": {
|
|
36489
38329
|
"application/json": {
|
|
36490
38330
|
"schema": {
|
|
@@ -36498,8 +38338,7 @@
|
|
|
36498
38338
|
"error_code": {
|
|
36499
38339
|
"type": "string",
|
|
36500
38340
|
"enum": [
|
|
36501
|
-
"
|
|
36502
|
-
"already_exists",
|
|
38341
|
+
"invalid_role",
|
|
36503
38342
|
"validation_error"
|
|
36504
38343
|
]
|
|
36505
38344
|
}
|
|
@@ -36639,21 +38478,23 @@
|
|
|
36639
38478
|
}
|
|
36640
38479
|
}
|
|
36641
38480
|
}
|
|
36642
|
-
}
|
|
36643
|
-
|
|
36644
|
-
|
|
36645
|
-
|
|
38481
|
+
}
|
|
38482
|
+
},
|
|
38483
|
+
"/user/{user_id}/roles": {
|
|
38484
|
+
"get": {
|
|
38485
|
+
"operationId": "user/roles",
|
|
38486
|
+
"summary": "List a User's roles",
|
|
36646
38487
|
"tags": [
|
|
36647
|
-
"
|
|
38488
|
+
"user"
|
|
36648
38489
|
],
|
|
36649
|
-
"description": "
|
|
38490
|
+
"description": "Lists the roles assigned to the User at the account level, by name. Account-level roles are what grant Api permissions to a user (in tokens for an Api with `rbac` enabled). Team roles are separate: they live on the team membership and grant no permissions.",
|
|
36650
38491
|
"parameters": [
|
|
36651
38492
|
{
|
|
36652
38493
|
"schema": {
|
|
36653
38494
|
"type": "string"
|
|
36654
38495
|
},
|
|
36655
38496
|
"in": "path",
|
|
36656
|
-
"name": "
|
|
38497
|
+
"name": "user_id",
|
|
36657
38498
|
"required": true
|
|
36658
38499
|
}
|
|
36659
38500
|
],
|
|
@@ -36664,59 +38505,88 @@
|
|
|
36664
38505
|
],
|
|
36665
38506
|
"responses": {
|
|
36666
38507
|
"200": {
|
|
36667
|
-
"description": "
|
|
38508
|
+
"description": "Default Response",
|
|
36668
38509
|
"content": {
|
|
36669
38510
|
"application/json": {
|
|
36670
38511
|
"schema": {
|
|
36671
|
-
"type": "
|
|
36672
|
-
"
|
|
36673
|
-
"
|
|
36674
|
-
"
|
|
36675
|
-
|
|
36676
|
-
|
|
36677
|
-
|
|
36678
|
-
|
|
36679
|
-
|
|
36680
|
-
|
|
36681
|
-
|
|
36682
|
-
|
|
36683
|
-
|
|
36684
|
-
|
|
36685
|
-
|
|
36686
|
-
|
|
36687
|
-
"
|
|
36688
|
-
|
|
36689
|
-
|
|
36690
|
-
|
|
36691
|
-
|
|
36692
|
-
|
|
36693
|
-
|
|
36694
|
-
|
|
36695
|
-
|
|
36696
|
-
|
|
36697
|
-
|
|
36698
|
-
|
|
36699
|
-
|
|
36700
|
-
|
|
36701
|
-
|
|
36702
|
-
|
|
36703
|
-
|
|
36704
|
-
|
|
36705
|
-
|
|
36706
|
-
|
|
38512
|
+
"type": "array",
|
|
38513
|
+
"items": {
|
|
38514
|
+
"type": "object",
|
|
38515
|
+
"required": [
|
|
38516
|
+
"id",
|
|
38517
|
+
"name",
|
|
38518
|
+
"description",
|
|
38519
|
+
"permissions",
|
|
38520
|
+
"account",
|
|
38521
|
+
"createdAt"
|
|
38522
|
+
],
|
|
38523
|
+
"properties": {
|
|
38524
|
+
"id": {
|
|
38525
|
+
"type": "string",
|
|
38526
|
+
"description": "Role ID"
|
|
38527
|
+
},
|
|
38528
|
+
"name": {
|
|
38529
|
+
"type": "string",
|
|
38530
|
+
"description": "Short, human-readable identifier for the role (e.g. `admin`, `editor`, `billing-manager`). Surfaced in the dashboard role pickers.",
|
|
38531
|
+
"example": "admin"
|
|
38532
|
+
},
|
|
38533
|
+
"description": {
|
|
38534
|
+
"type": "string",
|
|
38535
|
+
"description": "Free-form explanation of what users in this role are expected to do or have access to. Shown alongside the role in the dashboard."
|
|
38536
|
+
},
|
|
38537
|
+
"permissions": {
|
|
38538
|
+
"type": "array",
|
|
38539
|
+
"items": {
|
|
38540
|
+
"type": "object",
|
|
38541
|
+
"required": [
|
|
38542
|
+
"api",
|
|
38543
|
+
"value"
|
|
38544
|
+
],
|
|
38545
|
+
"properties": {
|
|
38546
|
+
"api": {
|
|
38547
|
+
"type": "string",
|
|
38548
|
+
"description": "Id of the Api that defines the permission.",
|
|
38549
|
+
"example": "api_6555fd293acc2f0fac0e3452"
|
|
38550
|
+
},
|
|
38551
|
+
"value": {
|
|
38552
|
+
"type": "string",
|
|
38553
|
+
"description": "The permission, as it appears in the Api's `permissions` catalog.",
|
|
38554
|
+
"example": "invites:write"
|
|
38555
|
+
}
|
|
38556
|
+
},
|
|
38557
|
+
"additionalProperties": false,
|
|
38558
|
+
"description": "A permission of one Api granted by a role."
|
|
38559
|
+
},
|
|
38560
|
+
"description": "Api permissions granted to the users that hold this role at the account level (team roles grant none). Change them with `POST` / `DELETE /role/:role_id/permissions`; `GET /role/:role_id/permissions` lists them with their Api."
|
|
38561
|
+
},
|
|
38562
|
+
"account": {
|
|
38563
|
+
"type": "string",
|
|
38564
|
+
"description": "Object is related with this account"
|
|
38565
|
+
},
|
|
38566
|
+
"metadata": {
|
|
38567
|
+
"type": "object",
|
|
38568
|
+
"properties": {},
|
|
38569
|
+
"additionalProperties": true,
|
|
38570
|
+
"description": "RoleMetadata",
|
|
38571
|
+
"default": {}
|
|
38572
|
+
},
|
|
38573
|
+
"createdAt": {
|
|
38574
|
+
"type": "string",
|
|
38575
|
+
"description": "Role creation date"
|
|
38576
|
+
},
|
|
38577
|
+
"updatedAt": {
|
|
38578
|
+
"type": "string",
|
|
38579
|
+
"description": "Role updated date"
|
|
38580
|
+
}
|
|
36707
38581
|
},
|
|
36708
|
-
"
|
|
36709
|
-
|
|
36710
|
-
"description": "Role updated date"
|
|
36711
|
-
}
|
|
36712
|
-
},
|
|
36713
|
-
"description": "Role"
|
|
38582
|
+
"description": "Role"
|
|
38583
|
+
}
|
|
36714
38584
|
}
|
|
36715
38585
|
}
|
|
36716
38586
|
}
|
|
36717
38587
|
},
|
|
36718
38588
|
"400": {
|
|
36719
|
-
"description": "`
|
|
38589
|
+
"description": "`validation_error` — The body, query or path failed schema validation. `details.issues` lists each failing field.",
|
|
36720
38590
|
"content": {
|
|
36721
38591
|
"application/json": {
|
|
36722
38592
|
"schema": {
|
|
@@ -36730,7 +38600,6 @@
|
|
|
36730
38600
|
"error_code": {
|
|
36731
38601
|
"type": "string",
|
|
36732
38602
|
"enum": [
|
|
36733
|
-
"invalid_id",
|
|
36734
38603
|
"validation_error"
|
|
36735
38604
|
]
|
|
36736
38605
|
}
|
|
@@ -36870,50 +38739,54 @@
|
|
|
36870
38739
|
}
|
|
36871
38740
|
}
|
|
36872
38741
|
}
|
|
36873
|
-
}
|
|
36874
|
-
|
|
36875
|
-
|
|
36876
|
-
|
|
36877
|
-
"operationId": "role/users",
|
|
36878
|
-
"summary": "List Users with Role",
|
|
38742
|
+
},
|
|
38743
|
+
"post": {
|
|
38744
|
+
"operationId": "user/assign_roles",
|
|
38745
|
+
"summary": "Assign roles to a User",
|
|
36879
38746
|
"tags": [
|
|
36880
|
-
"
|
|
38747
|
+
"user"
|
|
36881
38748
|
],
|
|
36882
|
-
"description": "
|
|
36883
|
-
"
|
|
36884
|
-
|
|
36885
|
-
|
|
36886
|
-
|
|
36887
|
-
|
|
36888
|
-
|
|
36889
|
-
|
|
36890
|
-
|
|
36891
|
-
|
|
36892
|
-
|
|
36893
|
-
|
|
36894
|
-
|
|
36895
|
-
|
|
36896
|
-
|
|
36897
|
-
|
|
36898
|
-
|
|
36899
|
-
|
|
36900
|
-
|
|
36901
|
-
|
|
36902
|
-
|
|
36903
|
-
|
|
36904
|
-
|
|
36905
|
-
|
|
36906
|
-
|
|
36907
|
-
|
|
36908
|
-
|
|
36909
|
-
|
|
38749
|
+
"description": "Assigns account-level roles to the User and returns all of their roles. Roles the User already has are kept. Their next tokens (refreshes included) carry the new permissions. Leaves an entry in the tenant's log. Account-level roles are what grant Api permissions to a user (in tokens for an Api with `rbac` enabled). Team roles are separate: they live on the team membership and grant no permissions.",
|
|
38750
|
+
"requestBody": {
|
|
38751
|
+
"required": true,
|
|
38752
|
+
"content": {
|
|
38753
|
+
"application/json": {
|
|
38754
|
+
"schema": {
|
|
38755
|
+
"type": "object",
|
|
38756
|
+
"required": [
|
|
38757
|
+
"roles"
|
|
38758
|
+
],
|
|
38759
|
+
"properties": {
|
|
38760
|
+
"roles": {
|
|
38761
|
+
"type": "array",
|
|
38762
|
+
"items": {
|
|
38763
|
+
"type": "string"
|
|
38764
|
+
},
|
|
38765
|
+
"minItems": 1,
|
|
38766
|
+
"description": "Role ids of this tenant.",
|
|
38767
|
+
"example": [
|
|
38768
|
+
"role_6555fd293acc2f0fac0e3452"
|
|
38769
|
+
]
|
|
38770
|
+
},
|
|
38771
|
+
"actor_user_id": {
|
|
38772
|
+
"type": "string",
|
|
38773
|
+
"description": "The person making the change, when your backend calls on their behalf with a machine token: it is who the tenant's log names. Must be a user of this tenant."
|
|
38774
|
+
}
|
|
38775
|
+
},
|
|
38776
|
+
"additionalProperties": false,
|
|
38777
|
+
"description": "Account-level roles to assign to or remove from a user."
|
|
38778
|
+
}
|
|
38779
|
+
}
|
|
36910
38780
|
},
|
|
38781
|
+
"description": "Account-level roles to assign to or remove from a user."
|
|
38782
|
+
},
|
|
38783
|
+
"parameters": [
|
|
36911
38784
|
{
|
|
36912
38785
|
"schema": {
|
|
36913
38786
|
"type": "string"
|
|
36914
38787
|
},
|
|
36915
38788
|
"in": "path",
|
|
36916
|
-
"name": "
|
|
38789
|
+
"name": "user_id",
|
|
36917
38790
|
"required": true
|
|
36918
38791
|
}
|
|
36919
38792
|
],
|
|
@@ -36924,37 +38797,88 @@
|
|
|
36924
38797
|
],
|
|
36925
38798
|
"responses": {
|
|
36926
38799
|
"200": {
|
|
36927
|
-
"description": "
|
|
38800
|
+
"description": "Default Response",
|
|
36928
38801
|
"content": {
|
|
36929
38802
|
"application/json": {
|
|
36930
38803
|
"schema": {
|
|
36931
|
-
"type": "
|
|
36932
|
-
"
|
|
36933
|
-
"
|
|
36934
|
-
"
|
|
36935
|
-
|
|
36936
|
-
|
|
36937
|
-
|
|
36938
|
-
"
|
|
36939
|
-
"
|
|
36940
|
-
"
|
|
36941
|
-
|
|
36942
|
-
"
|
|
36943
|
-
"
|
|
36944
|
-
|
|
36945
|
-
"
|
|
38804
|
+
"type": "array",
|
|
38805
|
+
"items": {
|
|
38806
|
+
"type": "object",
|
|
38807
|
+
"required": [
|
|
38808
|
+
"id",
|
|
38809
|
+
"name",
|
|
38810
|
+
"description",
|
|
38811
|
+
"permissions",
|
|
38812
|
+
"account",
|
|
38813
|
+
"createdAt"
|
|
38814
|
+
],
|
|
38815
|
+
"properties": {
|
|
38816
|
+
"id": {
|
|
38817
|
+
"type": "string",
|
|
38818
|
+
"description": "Role ID"
|
|
36946
38819
|
},
|
|
36947
|
-
"
|
|
36948
|
-
|
|
36949
|
-
|
|
36950
|
-
|
|
36951
|
-
|
|
38820
|
+
"name": {
|
|
38821
|
+
"type": "string",
|
|
38822
|
+
"description": "Short, human-readable identifier for the role (e.g. `admin`, `editor`, `billing-manager`). Surfaced in the dashboard role pickers.",
|
|
38823
|
+
"example": "admin"
|
|
38824
|
+
},
|
|
38825
|
+
"description": {
|
|
38826
|
+
"type": "string",
|
|
38827
|
+
"description": "Free-form explanation of what users in this role are expected to do or have access to. Shown alongside the role in the dashboard."
|
|
38828
|
+
},
|
|
38829
|
+
"permissions": {
|
|
38830
|
+
"type": "array",
|
|
38831
|
+
"items": {
|
|
38832
|
+
"type": "object",
|
|
38833
|
+
"required": [
|
|
38834
|
+
"api",
|
|
38835
|
+
"value"
|
|
38836
|
+
],
|
|
38837
|
+
"properties": {
|
|
38838
|
+
"api": {
|
|
38839
|
+
"type": "string",
|
|
38840
|
+
"description": "Id of the Api that defines the permission.",
|
|
38841
|
+
"example": "api_6555fd293acc2f0fac0e3452"
|
|
38842
|
+
},
|
|
38843
|
+
"value": {
|
|
38844
|
+
"type": "string",
|
|
38845
|
+
"description": "The permission, as it appears in the Api's `permissions` catalog.",
|
|
38846
|
+
"example": "invites:write"
|
|
38847
|
+
}
|
|
38848
|
+
},
|
|
38849
|
+
"additionalProperties": false,
|
|
38850
|
+
"description": "A permission of one Api granted by a role."
|
|
38851
|
+
},
|
|
38852
|
+
"description": "Api permissions granted to the users that hold this role at the account level (team roles grant none). Change them with `POST` / `DELETE /role/:role_id/permissions`; `GET /role/:role_id/permissions` lists them with their Api."
|
|
38853
|
+
},
|
|
38854
|
+
"account": {
|
|
38855
|
+
"type": "string",
|
|
38856
|
+
"description": "Object is related with this account"
|
|
38857
|
+
},
|
|
38858
|
+
"metadata": {
|
|
38859
|
+
"type": "object",
|
|
38860
|
+
"properties": {},
|
|
38861
|
+
"additionalProperties": true,
|
|
38862
|
+
"description": "RoleMetadata",
|
|
38863
|
+
"default": {}
|
|
38864
|
+
},
|
|
38865
|
+
"createdAt": {
|
|
38866
|
+
"type": "string",
|
|
38867
|
+
"description": "Role creation date"
|
|
38868
|
+
},
|
|
38869
|
+
"updatedAt": {
|
|
38870
|
+
"type": "string",
|
|
38871
|
+
"description": "Role updated date"
|
|
38872
|
+
}
|
|
38873
|
+
},
|
|
38874
|
+
"description": "Role"
|
|
38875
|
+
}
|
|
36952
38876
|
}
|
|
36953
38877
|
}
|
|
36954
38878
|
}
|
|
36955
38879
|
},
|
|
36956
38880
|
"400": {
|
|
36957
|
-
"description": "`validation_error` — The body, query or path failed schema validation. `details.issues` lists each failing field.",
|
|
38881
|
+
"description": "`invalid_role` — The role belongs to another account.\n\n`validation_error` — The body, query or path failed schema validation. `details.issues` lists each failing field.",
|
|
36958
38882
|
"content": {
|
|
36959
38883
|
"application/json": {
|
|
36960
38884
|
"schema": {
|
|
@@ -36968,6 +38892,7 @@
|
|
|
36968
38892
|
"error_code": {
|
|
36969
38893
|
"type": "string",
|
|
36970
38894
|
"enum": [
|
|
38895
|
+
"invalid_role",
|
|
36971
38896
|
"validation_error"
|
|
36972
38897
|
]
|
|
36973
38898
|
}
|
|
@@ -37031,7 +38956,7 @@
|
|
|
37031
38956
|
}
|
|
37032
38957
|
},
|
|
37033
38958
|
"404": {
|
|
37034
|
-
"description": "`
|
|
38959
|
+
"description": "`not_found` — The resource does not exist in this account.\n\n`account_not_found` — No Auth Account matches the request (domain, header or token).",
|
|
37035
38960
|
"content": {
|
|
37036
38961
|
"application/json": {
|
|
37037
38962
|
"schema": {
|
|
@@ -37045,7 +38970,7 @@
|
|
|
37045
38970
|
"error_code": {
|
|
37046
38971
|
"type": "string",
|
|
37047
38972
|
"enum": [
|
|
37048
|
-
"
|
|
38973
|
+
"not_found",
|
|
37049
38974
|
"account_not_found"
|
|
37050
38975
|
]
|
|
37051
38976
|
}
|
|
@@ -37108,13 +39033,13 @@
|
|
|
37108
39033
|
}
|
|
37109
39034
|
}
|
|
37110
39035
|
},
|
|
37111
|
-
"
|
|
37112
|
-
"operationId": "
|
|
37113
|
-
"summary": "
|
|
39036
|
+
"delete": {
|
|
39037
|
+
"operationId": "user/remove_roles",
|
|
39038
|
+
"summary": "Remove roles from a User",
|
|
37114
39039
|
"tags": [
|
|
37115
|
-
"
|
|
39040
|
+
"user"
|
|
37116
39041
|
],
|
|
37117
|
-
"description": "
|
|
39042
|
+
"description": "Removes account-level roles from the User and returns the ones left. Roles the User does not have are ignored. Tokens already issued keep the permissions until they expire; refreshes drop them. Leaves an entry in the tenant's log.",
|
|
37118
39043
|
"requestBody": {
|
|
37119
39044
|
"required": true,
|
|
37120
39045
|
"content": {
|
|
@@ -37122,26 +39047,31 @@
|
|
|
37122
39047
|
"schema": {
|
|
37123
39048
|
"type": "object",
|
|
37124
39049
|
"required": [
|
|
37125
|
-
"
|
|
39050
|
+
"roles"
|
|
37126
39051
|
],
|
|
37127
39052
|
"properties": {
|
|
37128
|
-
"
|
|
39053
|
+
"roles": {
|
|
37129
39054
|
"type": "array",
|
|
37130
39055
|
"items": {
|
|
37131
39056
|
"type": "string"
|
|
37132
39057
|
},
|
|
37133
|
-
"
|
|
39058
|
+
"minItems": 1,
|
|
39059
|
+
"description": "Role ids of this tenant.",
|
|
37134
39060
|
"example": [
|
|
37135
|
-
"
|
|
39061
|
+
"role_6555fd293acc2f0fac0e3452"
|
|
37136
39062
|
]
|
|
39063
|
+
},
|
|
39064
|
+
"actor_user_id": {
|
|
39065
|
+
"type": "string",
|
|
39066
|
+
"description": "The person making the change, when your backend calls on their behalf with a machine token: it is who the tenant's log names. Must be a user of this tenant."
|
|
37137
39067
|
}
|
|
37138
39068
|
},
|
|
37139
39069
|
"additionalProperties": false,
|
|
37140
|
-
"description": "
|
|
39070
|
+
"description": "Account-level roles to assign to or remove from a user."
|
|
37141
39071
|
}
|
|
37142
39072
|
}
|
|
37143
39073
|
},
|
|
37144
|
-
"description": "
|
|
39074
|
+
"description": "Account-level roles to assign to or remove from a user."
|
|
37145
39075
|
},
|
|
37146
39076
|
"parameters": [
|
|
37147
39077
|
{
|
|
@@ -37149,7 +39079,7 @@
|
|
|
37149
39079
|
"type": "string"
|
|
37150
39080
|
},
|
|
37151
39081
|
"in": "path",
|
|
37152
|
-
"name": "
|
|
39082
|
+
"name": "user_id",
|
|
37153
39083
|
"required": true
|
|
37154
39084
|
}
|
|
37155
39085
|
],
|
|
@@ -37160,10 +39090,88 @@
|
|
|
37160
39090
|
],
|
|
37161
39091
|
"responses": {
|
|
37162
39092
|
"200": {
|
|
37163
|
-
"description": "Default Response"
|
|
39093
|
+
"description": "Default Response",
|
|
39094
|
+
"content": {
|
|
39095
|
+
"application/json": {
|
|
39096
|
+
"schema": {
|
|
39097
|
+
"type": "array",
|
|
39098
|
+
"items": {
|
|
39099
|
+
"type": "object",
|
|
39100
|
+
"required": [
|
|
39101
|
+
"id",
|
|
39102
|
+
"name",
|
|
39103
|
+
"description",
|
|
39104
|
+
"permissions",
|
|
39105
|
+
"account",
|
|
39106
|
+
"createdAt"
|
|
39107
|
+
],
|
|
39108
|
+
"properties": {
|
|
39109
|
+
"id": {
|
|
39110
|
+
"type": "string",
|
|
39111
|
+
"description": "Role ID"
|
|
39112
|
+
},
|
|
39113
|
+
"name": {
|
|
39114
|
+
"type": "string",
|
|
39115
|
+
"description": "Short, human-readable identifier for the role (e.g. `admin`, `editor`, `billing-manager`). Surfaced in the dashboard role pickers.",
|
|
39116
|
+
"example": "admin"
|
|
39117
|
+
},
|
|
39118
|
+
"description": {
|
|
39119
|
+
"type": "string",
|
|
39120
|
+
"description": "Free-form explanation of what users in this role are expected to do or have access to. Shown alongside the role in the dashboard."
|
|
39121
|
+
},
|
|
39122
|
+
"permissions": {
|
|
39123
|
+
"type": "array",
|
|
39124
|
+
"items": {
|
|
39125
|
+
"type": "object",
|
|
39126
|
+
"required": [
|
|
39127
|
+
"api",
|
|
39128
|
+
"value"
|
|
39129
|
+
],
|
|
39130
|
+
"properties": {
|
|
39131
|
+
"api": {
|
|
39132
|
+
"type": "string",
|
|
39133
|
+
"description": "Id of the Api that defines the permission.",
|
|
39134
|
+
"example": "api_6555fd293acc2f0fac0e3452"
|
|
39135
|
+
},
|
|
39136
|
+
"value": {
|
|
39137
|
+
"type": "string",
|
|
39138
|
+
"description": "The permission, as it appears in the Api's `permissions` catalog.",
|
|
39139
|
+
"example": "invites:write"
|
|
39140
|
+
}
|
|
39141
|
+
},
|
|
39142
|
+
"additionalProperties": false,
|
|
39143
|
+
"description": "A permission of one Api granted by a role."
|
|
39144
|
+
},
|
|
39145
|
+
"description": "Api permissions granted to the users that hold this role at the account level (team roles grant none). Change them with `POST` / `DELETE /role/:role_id/permissions`; `GET /role/:role_id/permissions` lists them with their Api."
|
|
39146
|
+
},
|
|
39147
|
+
"account": {
|
|
39148
|
+
"type": "string",
|
|
39149
|
+
"description": "Object is related with this account"
|
|
39150
|
+
},
|
|
39151
|
+
"metadata": {
|
|
39152
|
+
"type": "object",
|
|
39153
|
+
"properties": {},
|
|
39154
|
+
"additionalProperties": true,
|
|
39155
|
+
"description": "RoleMetadata",
|
|
39156
|
+
"default": {}
|
|
39157
|
+
},
|
|
39158
|
+
"createdAt": {
|
|
39159
|
+
"type": "string",
|
|
39160
|
+
"description": "Role creation date"
|
|
39161
|
+
},
|
|
39162
|
+
"updatedAt": {
|
|
39163
|
+
"type": "string",
|
|
39164
|
+
"description": "Role updated date"
|
|
39165
|
+
}
|
|
39166
|
+
},
|
|
39167
|
+
"description": "Role"
|
|
39168
|
+
}
|
|
39169
|
+
}
|
|
39170
|
+
}
|
|
39171
|
+
}
|
|
37164
39172
|
},
|
|
37165
39173
|
"400": {
|
|
37166
|
-
"description": "`
|
|
39174
|
+
"description": "`validation_error` — The body, query or path failed schema validation. `details.issues` lists each failing field.",
|
|
37167
39175
|
"content": {
|
|
37168
39176
|
"application/json": {
|
|
37169
39177
|
"schema": {
|
|
@@ -37177,7 +39185,6 @@
|
|
|
37177
39185
|
"error_code": {
|
|
37178
39186
|
"type": "string",
|
|
37179
39187
|
"enum": [
|
|
37180
|
-
"invalid_role",
|
|
37181
39188
|
"validation_error"
|
|
37182
39189
|
]
|
|
37183
39190
|
}
|
|
@@ -37241,7 +39248,7 @@
|
|
|
37241
39248
|
}
|
|
37242
39249
|
},
|
|
37243
39250
|
"404": {
|
|
37244
|
-
"description": "`
|
|
39251
|
+
"description": "`not_found` — The resource does not exist in this account.\n\n`account_not_found` — No Auth Account matches the request (domain, header or token).",
|
|
37245
39252
|
"content": {
|
|
37246
39253
|
"application/json": {
|
|
37247
39254
|
"schema": {
|
|
@@ -37255,7 +39262,253 @@
|
|
|
37255
39262
|
"error_code": {
|
|
37256
39263
|
"type": "string",
|
|
37257
39264
|
"enum": [
|
|
37258
|
-
"
|
|
39265
|
+
"not_found",
|
|
39266
|
+
"account_not_found"
|
|
39267
|
+
]
|
|
39268
|
+
}
|
|
39269
|
+
}
|
|
39270
|
+
}
|
|
39271
|
+
]
|
|
39272
|
+
}
|
|
39273
|
+
}
|
|
39274
|
+
}
|
|
39275
|
+
},
|
|
39276
|
+
"429": {
|
|
39277
|
+
"description": "`too_many_requests` — Rate limit exceeded. Honour the `Retry-After` header.",
|
|
39278
|
+
"content": {
|
|
39279
|
+
"application/json": {
|
|
39280
|
+
"schema": {
|
|
39281
|
+
"allOf": [
|
|
39282
|
+
{
|
|
39283
|
+
"$ref": "#/components/schemas/ErrorResponse"
|
|
39284
|
+
},
|
|
39285
|
+
{
|
|
39286
|
+
"type": "object",
|
|
39287
|
+
"properties": {
|
|
39288
|
+
"error_code": {
|
|
39289
|
+
"type": "string",
|
|
39290
|
+
"enum": [
|
|
39291
|
+
"too_many_requests"
|
|
39292
|
+
]
|
|
39293
|
+
}
|
|
39294
|
+
}
|
|
39295
|
+
}
|
|
39296
|
+
]
|
|
39297
|
+
}
|
|
39298
|
+
}
|
|
39299
|
+
}
|
|
39300
|
+
},
|
|
39301
|
+
"500": {
|
|
39302
|
+
"description": "`internal_error` — Unexpected server error. Retry later; the request id is logged.",
|
|
39303
|
+
"content": {
|
|
39304
|
+
"application/json": {
|
|
39305
|
+
"schema": {
|
|
39306
|
+
"allOf": [
|
|
39307
|
+
{
|
|
39308
|
+
"$ref": "#/components/schemas/ErrorResponse"
|
|
39309
|
+
},
|
|
39310
|
+
{
|
|
39311
|
+
"type": "object",
|
|
39312
|
+
"properties": {
|
|
39313
|
+
"error_code": {
|
|
39314
|
+
"type": "string",
|
|
39315
|
+
"enum": [
|
|
39316
|
+
"internal_error"
|
|
39317
|
+
]
|
|
39318
|
+
}
|
|
39319
|
+
}
|
|
39320
|
+
}
|
|
39321
|
+
]
|
|
39322
|
+
}
|
|
39323
|
+
}
|
|
39324
|
+
}
|
|
39325
|
+
}
|
|
39326
|
+
}
|
|
39327
|
+
}
|
|
39328
|
+
},
|
|
39329
|
+
"/user/{user_id}/permissions": {
|
|
39330
|
+
"get": {
|
|
39331
|
+
"operationId": "user/permissions",
|
|
39332
|
+
"summary": "List a User's permissions",
|
|
39333
|
+
"tags": [
|
|
39334
|
+
"user"
|
|
39335
|
+
],
|
|
39336
|
+
"description": "Lists the Api permissions the User holds through their account-level roles, with the roles that grant each one. For an Api with `rbac` enabled, these are exactly what the User's tokens for that Api carry in `permissions`.",
|
|
39337
|
+
"parameters": [
|
|
39338
|
+
{
|
|
39339
|
+
"schema": {
|
|
39340
|
+
"type": "string"
|
|
39341
|
+
},
|
|
39342
|
+
"in": "path",
|
|
39343
|
+
"name": "user_id",
|
|
39344
|
+
"required": true
|
|
39345
|
+
}
|
|
39346
|
+
],
|
|
39347
|
+
"security": [
|
|
39348
|
+
{
|
|
39349
|
+
"bearerAuth": []
|
|
39350
|
+
}
|
|
39351
|
+
],
|
|
39352
|
+
"responses": {
|
|
39353
|
+
"200": {
|
|
39354
|
+
"description": "Default Response",
|
|
39355
|
+
"content": {
|
|
39356
|
+
"application/json": {
|
|
39357
|
+
"schema": {
|
|
39358
|
+
"type": "array",
|
|
39359
|
+
"items": {
|
|
39360
|
+
"type": "object",
|
|
39361
|
+
"required": [
|
|
39362
|
+
"api",
|
|
39363
|
+
"api_identifier",
|
|
39364
|
+
"api_name",
|
|
39365
|
+
"value",
|
|
39366
|
+
"roles"
|
|
39367
|
+
],
|
|
39368
|
+
"properties": {
|
|
39369
|
+
"api": {
|
|
39370
|
+
"type": "string",
|
|
39371
|
+
"description": "Id of the Api that defines it."
|
|
39372
|
+
},
|
|
39373
|
+
"api_identifier": {
|
|
39374
|
+
"type": "string",
|
|
39375
|
+
"description": "Audience of that Api: the `aud` of the tokens that carry this permission.",
|
|
39376
|
+
"example": "https://api.example.com"
|
|
39377
|
+
},
|
|
39378
|
+
"api_name": {
|
|
39379
|
+
"type": "string",
|
|
39380
|
+
"description": "Name of that Api."
|
|
39381
|
+
},
|
|
39382
|
+
"value": {
|
|
39383
|
+
"type": "string",
|
|
39384
|
+
"description": "The permission, as it appears in the `permissions` claim.",
|
|
39385
|
+
"example": "invites:write"
|
|
39386
|
+
},
|
|
39387
|
+
"description": {
|
|
39388
|
+
"type": "string",
|
|
39389
|
+
"description": "The permission's description in the Api."
|
|
39390
|
+
},
|
|
39391
|
+
"roles": {
|
|
39392
|
+
"type": "array",
|
|
39393
|
+
"items": {
|
|
39394
|
+
"type": "object",
|
|
39395
|
+
"required": [
|
|
39396
|
+
"id",
|
|
39397
|
+
"name"
|
|
39398
|
+
],
|
|
39399
|
+
"properties": {
|
|
39400
|
+
"id": {
|
|
39401
|
+
"type": "string"
|
|
39402
|
+
},
|
|
39403
|
+
"name": {
|
|
39404
|
+
"type": "string"
|
|
39405
|
+
}
|
|
39406
|
+
},
|
|
39407
|
+
"additionalProperties": false
|
|
39408
|
+
},
|
|
39409
|
+
"description": "The roles of the user that grant it."
|
|
39410
|
+
}
|
|
39411
|
+
},
|
|
39412
|
+
"additionalProperties": false,
|
|
39413
|
+
"description": "A permission the user holds through their account-level roles, with the roles that grant it."
|
|
39414
|
+
}
|
|
39415
|
+
}
|
|
39416
|
+
}
|
|
39417
|
+
}
|
|
39418
|
+
},
|
|
39419
|
+
"400": {
|
|
39420
|
+
"description": "`validation_error` — The body, query or path failed schema validation. `details.issues` lists each failing field.",
|
|
39421
|
+
"content": {
|
|
39422
|
+
"application/json": {
|
|
39423
|
+
"schema": {
|
|
39424
|
+
"allOf": [
|
|
39425
|
+
{
|
|
39426
|
+
"$ref": "#/components/schemas/ErrorResponse"
|
|
39427
|
+
},
|
|
39428
|
+
{
|
|
39429
|
+
"type": "object",
|
|
39430
|
+
"properties": {
|
|
39431
|
+
"error_code": {
|
|
39432
|
+
"type": "string",
|
|
39433
|
+
"enum": [
|
|
39434
|
+
"validation_error"
|
|
39435
|
+
]
|
|
39436
|
+
}
|
|
39437
|
+
}
|
|
39438
|
+
}
|
|
39439
|
+
]
|
|
39440
|
+
}
|
|
39441
|
+
}
|
|
39442
|
+
}
|
|
39443
|
+
},
|
|
39444
|
+
"401": {
|
|
39445
|
+
"description": "`unauthorized` — The request carries no valid credentials.",
|
|
39446
|
+
"content": {
|
|
39447
|
+
"application/json": {
|
|
39448
|
+
"schema": {
|
|
39449
|
+
"allOf": [
|
|
39450
|
+
{
|
|
39451
|
+
"$ref": "#/components/schemas/ErrorResponse"
|
|
39452
|
+
},
|
|
39453
|
+
{
|
|
39454
|
+
"type": "object",
|
|
39455
|
+
"properties": {
|
|
39456
|
+
"error_code": {
|
|
39457
|
+
"type": "string",
|
|
39458
|
+
"enum": [
|
|
39459
|
+
"unauthorized"
|
|
39460
|
+
]
|
|
39461
|
+
}
|
|
39462
|
+
}
|
|
39463
|
+
}
|
|
39464
|
+
]
|
|
39465
|
+
}
|
|
39466
|
+
}
|
|
39467
|
+
}
|
|
39468
|
+
},
|
|
39469
|
+
"403": {
|
|
39470
|
+
"description": "`forbidden` — The credentials are valid but do not allow this operation.\n\n`insufficient_scope` — The token lacks a scope this operation requires. `message` names it.\n\n`user_suspended` — The user is suspended and cannot sign in or be modified.",
|
|
39471
|
+
"content": {
|
|
39472
|
+
"application/json": {
|
|
39473
|
+
"schema": {
|
|
39474
|
+
"allOf": [
|
|
39475
|
+
{
|
|
39476
|
+
"$ref": "#/components/schemas/ErrorResponse"
|
|
39477
|
+
},
|
|
39478
|
+
{
|
|
39479
|
+
"type": "object",
|
|
39480
|
+
"properties": {
|
|
39481
|
+
"error_code": {
|
|
39482
|
+
"type": "string",
|
|
39483
|
+
"enum": [
|
|
39484
|
+
"forbidden",
|
|
39485
|
+
"insufficient_scope",
|
|
39486
|
+
"user_suspended"
|
|
39487
|
+
]
|
|
39488
|
+
}
|
|
39489
|
+
}
|
|
39490
|
+
}
|
|
39491
|
+
]
|
|
39492
|
+
}
|
|
39493
|
+
}
|
|
39494
|
+
}
|
|
39495
|
+
},
|
|
39496
|
+
"404": {
|
|
39497
|
+
"description": "`not_found` — The resource does not exist in this account.\n\n`account_not_found` — No Auth Account matches the request (domain, header or token).",
|
|
39498
|
+
"content": {
|
|
39499
|
+
"application/json": {
|
|
39500
|
+
"schema": {
|
|
39501
|
+
"allOf": [
|
|
39502
|
+
{
|
|
39503
|
+
"$ref": "#/components/schemas/ErrorResponse"
|
|
39504
|
+
},
|
|
39505
|
+
{
|
|
39506
|
+
"type": "object",
|
|
39507
|
+
"properties": {
|
|
39508
|
+
"error_code": {
|
|
39509
|
+
"type": "string",
|
|
39510
|
+
"enum": [
|
|
39511
|
+
"not_found",
|
|
37259
39512
|
"account_not_found"
|
|
37260
39513
|
]
|
|
37261
39514
|
}
|
|
@@ -48319,6 +50572,15 @@
|
|
|
48319
50572
|
"required": false,
|
|
48320
50573
|
"description": "Exact match on `enforce_policies`. Equivalent to `?query=enforce_policies:<value>`."
|
|
48321
50574
|
},
|
|
50575
|
+
{
|
|
50576
|
+
"schema": {
|
|
50577
|
+
"type": "string"
|
|
50578
|
+
},
|
|
50579
|
+
"in": "query",
|
|
50580
|
+
"name": "rbac",
|
|
50581
|
+
"required": false,
|
|
50582
|
+
"description": "Exact match on `rbac`. Equivalent to `?query=rbac:<value>`."
|
|
50583
|
+
},
|
|
48322
50584
|
{
|
|
48323
50585
|
"schema": {
|
|
48324
50586
|
"type": "string"
|
|
@@ -48636,6 +50898,10 @@
|
|
|
48636
50898
|
"type": "boolean",
|
|
48637
50899
|
"description": "When true, requested scopes are filtered against `permissions` at token issuance."
|
|
48638
50900
|
},
|
|
50901
|
+
"rbac": {
|
|
50902
|
+
"type": "boolean",
|
|
50903
|
+
"description": "When true, user tokens carry only the permissions granted to the user's roles. Defaults to false."
|
|
50904
|
+
},
|
|
48639
50905
|
"allow_offline_access": {
|
|
48640
50906
|
"type": "boolean",
|
|
48641
50907
|
"description": "When true, clients can request `offline_access` and receive a refresh_token for this API."
|
|
@@ -48741,6 +51007,7 @@
|
|
|
48741
51007
|
"token_dialect",
|
|
48742
51008
|
"token_lifetime",
|
|
48743
51009
|
"enforce_policies",
|
|
51010
|
+
"rbac",
|
|
48744
51011
|
"allow_offline_access",
|
|
48745
51012
|
"skip_consent",
|
|
48746
51013
|
"include_teams_in_access_token",
|
|
@@ -48818,6 +51085,10 @@
|
|
|
48818
51085
|
"type": "boolean",
|
|
48819
51086
|
"description": "When true, only scopes that match a permission in `permissions` are forwarded into the access_token. When false, requested scopes are echoed back verbatim with no filtering."
|
|
48820
51087
|
},
|
|
51088
|
+
"rbac": {
|
|
51089
|
+
"type": "boolean",
|
|
51090
|
+
"description": "Role-based access control. When true, a token issued to a user carries only the permissions of this API granted to the user's roles (account-level role assignments, not team roles): `permissions` lists all of them, and `scope` keeps only the requested ones the user holds. Machine-to-machine tokens (`client_credentials`) are not affected. The `permissions` claim requires `token_dialect: access_token_authz`."
|
|
51091
|
+
},
|
|
48821
51092
|
"allow_offline_access": {
|
|
48822
51093
|
"type": "boolean",
|
|
48823
51094
|
"description": "When true, the API is eligible to be the target of a `refresh_token` (i.e. clients can request `offline_access` against it)."
|
|
@@ -49116,6 +51387,7 @@
|
|
|
49116
51387
|
"token_dialect",
|
|
49117
51388
|
"token_lifetime",
|
|
49118
51389
|
"enforce_policies",
|
|
51390
|
+
"rbac",
|
|
49119
51391
|
"allow_offline_access",
|
|
49120
51392
|
"skip_consent",
|
|
49121
51393
|
"include_teams_in_access_token",
|
|
@@ -49193,6 +51465,10 @@
|
|
|
49193
51465
|
"type": "boolean",
|
|
49194
51466
|
"description": "When true, only scopes that match a permission in `permissions` are forwarded into the access_token. When false, requested scopes are echoed back verbatim with no filtering."
|
|
49195
51467
|
},
|
|
51468
|
+
"rbac": {
|
|
51469
|
+
"type": "boolean",
|
|
51470
|
+
"description": "Role-based access control. When true, a token issued to a user carries only the permissions of this API granted to the user's roles (account-level role assignments, not team roles): `permissions` lists all of them, and `scope` keeps only the requested ones the user holds. Machine-to-machine tokens (`client_credentials`) are not affected. The `permissions` claim requires `token_dialect: access_token_authz`."
|
|
51471
|
+
},
|
|
49196
51472
|
"allow_offline_access": {
|
|
49197
51473
|
"type": "boolean",
|
|
49198
51474
|
"description": "When true, the API is eligible to be the target of a `refresh_token` (i.e. clients can request `offline_access` against it)."
|
|
@@ -49519,6 +51795,10 @@
|
|
|
49519
51795
|
"type": "boolean",
|
|
49520
51796
|
"description": "When true, requested scopes are filtered against `permissions` at token issuance."
|
|
49521
51797
|
},
|
|
51798
|
+
"rbac": {
|
|
51799
|
+
"type": "boolean",
|
|
51800
|
+
"description": "When true, user tokens carry only the permissions granted to the user's roles. Applies to tokens issued after the update, including refreshes."
|
|
51801
|
+
},
|
|
49522
51802
|
"allow_offline_access": {
|
|
49523
51803
|
"type": "boolean",
|
|
49524
51804
|
"description": "When true, clients can request `offline_access` and receive a refresh_token for this API."
|
|
@@ -49636,6 +51916,7 @@
|
|
|
49636
51916
|
"token_dialect",
|
|
49637
51917
|
"token_lifetime",
|
|
49638
51918
|
"enforce_policies",
|
|
51919
|
+
"rbac",
|
|
49639
51920
|
"allow_offline_access",
|
|
49640
51921
|
"skip_consent",
|
|
49641
51922
|
"include_teams_in_access_token",
|
|
@@ -49713,6 +51994,10 @@
|
|
|
49713
51994
|
"type": "boolean",
|
|
49714
51995
|
"description": "When true, only scopes that match a permission in `permissions` are forwarded into the access_token. When false, requested scopes are echoed back verbatim with no filtering."
|
|
49715
51996
|
},
|
|
51997
|
+
"rbac": {
|
|
51998
|
+
"type": "boolean",
|
|
51999
|
+
"description": "Role-based access control. When true, a token issued to a user carries only the permissions of this API granted to the user's roles (account-level role assignments, not team roles): `permissions` lists all of them, and `scope` keeps only the requested ones the user holds. Machine-to-machine tokens (`client_credentials`) are not affected. The `permissions` claim requires `token_dialect: access_token_authz`."
|
|
52000
|
+
},
|
|
49716
52001
|
"allow_offline_access": {
|
|
49717
52002
|
"type": "boolean",
|
|
49718
52003
|
"description": "When true, the API is eligible to be the target of a `refresh_token` (i.e. clients can request `offline_access` against it)."
|
|
@@ -50011,6 +52296,7 @@
|
|
|
50011
52296
|
"token_dialect",
|
|
50012
52297
|
"token_lifetime",
|
|
50013
52298
|
"enforce_policies",
|
|
52299
|
+
"rbac",
|
|
50014
52300
|
"allow_offline_access",
|
|
50015
52301
|
"skip_consent",
|
|
50016
52302
|
"include_teams_in_access_token",
|
|
@@ -50088,6 +52374,10 @@
|
|
|
50088
52374
|
"type": "boolean",
|
|
50089
52375
|
"description": "When true, only scopes that match a permission in `permissions` are forwarded into the access_token. When false, requested scopes are echoed back verbatim with no filtering."
|
|
50090
52376
|
},
|
|
52377
|
+
"rbac": {
|
|
52378
|
+
"type": "boolean",
|
|
52379
|
+
"description": "Role-based access control. When true, a token issued to a user carries only the permissions of this API granted to the user's roles (account-level role assignments, not team roles): `permissions` lists all of them, and `scope` keeps only the requested ones the user holds. Machine-to-machine tokens (`client_credentials`) are not affected. The `permissions` claim requires `token_dialect: access_token_authz`."
|
|
52380
|
+
},
|
|
50091
52381
|
"allow_offline_access": {
|
|
50092
52382
|
"type": "boolean",
|
|
50093
52383
|
"description": "When true, the API is eligible to be the target of a `refresh_token` (i.e. clients can request `offline_access` against it)."
|
|
@@ -79381,11 +81671,11 @@
|
|
|
79381
81671
|
},
|
|
79382
81672
|
{
|
|
79383
81673
|
"name": "role",
|
|
79384
|
-
"description": "Account-wide roles. A Role
|
|
81674
|
+
"description": "Account-wide roles. A Role has a name (e.g. `admin`, `editor`) and a set of Api permissions. Assigned to a user at the account level (`POST /role/:role_id/users` or `POST /user/:user_id/roles`), it puts those permissions in the user's tokens for every Api with `rbac` enabled. The same Roles can be held inside a Team, where they are names only (the `roles` claim) and grant no permissions."
|
|
79385
81675
|
},
|
|
79386
81676
|
{
|
|
79387
81677
|
"name": "rolemember",
|
|
79388
|
-
"description": "Grants of a Role to a User at the account level. Each RoleMember binds one (role, user) pair.
|
|
81678
|
+
"description": "Grants of a Role to a User at the account level: what gives a user Api permissions. Each RoleMember binds one (role, user) pair. From the role side, `GET`, `POST` and `DELETE /role/:role_id/users`; from the user side, `GET`, `POST` and `DELETE /user/:user_id/roles`, and `GET /user/:user_id/permissions` for the resulting permissions."
|
|
79389
81679
|
},
|
|
79390
81680
|
{
|
|
79391
81681
|
"name": "team",
|