Scopes
Scopes are permissions required to perform actions in a specified Deepgram Project. Scopes can be associated with Keys or Users. When associated with a Key, Scopes determine the actions that the Key can be used to perform in the Key’s associated Project. When associated with a Member, Scopes determine what the user can do in their assigned Project. For more information, see Working with Roles.
Get Member Scopes
Lists the specified project scopes assigned to the specified member. If the authenticated account has access to the members:read:scopes
, admins:read:scopes
, and owners:read:scopes
project scopes, it will retrieve project scopes for any member of the specified project. Otherwise, it will retrieve project scopes for only the authenticated account.
Required account scope(s): account:read
, project:read
. Required project scope(s): project:read
. Optional project scope(s): members:read:scopes
, admins:read:scopes
, owners:read:scopes
.
Path Parameters
project_id: uuid
Identifier of the project that contains the member for whom you want to get scopes.
member_id: uuid
Unique identifier of the member for whom you want to get scopes.
Responses
Status | Description |
---|---|
200 Success | Scopes found. |
Response Schema
scopes: array
Array of scopes associated with the member.
Update Scope
Updates the specified project scopes assigned to the specified member.
If the specified member has the scope member
or the scope being added is member
, the requesting account must have the scope members:write:scopes
. If the specified member has the scope admin
or the scope being added is admin
, the requesting account must have the scope admins:write:scopes
. If the specified member has the scope owner
or the scope being added is owner
, the requesting account must have the scope owners:write:scopes
.
If the scope being added is member
, admin
, or owner
, it will replace the existing member
, admin
, or owner
scope of the specified member unless the specified member is the only member with the owner
scope. In this case, the request will fail.
If the scope being added is not member
, admin
, or owner
, then the requesting account must also have the scope that it is trying to add to the specified member. For example, if the requesting account tries to add the project:write:settings
project scope to a specified member, but the requesting account itself does not have the scope project:write:settings
, then the request will fail.
Required account scope(s): project:write
. Optional project scope(s): See the description.
Path Parameters
project_id: uuid
Unique identifier of the project that contains the specified member and scope that you want to update.
member_id: uuid
Unique identifier of the member for whom you want to update the scope.
Request Body Schema
scope: string
Scope for the specified member and project.
Responses
Status | Description |
---|---|
200 Success | Scope updated. |
Response Schema
message: string
Success message.