Manage database roles

The Snowflake REST Database Role API provides the following endpoints to access, update, and perform certain actions on Database Role resources.

Snowflake REST Database Role API endpoints

EndpointDescription
GET /api/v2/databases/database/
database-roles
Lists available database roles.
POST /api/v2/databases/database/
database-roles
Creates a database role.
DELETE /api/v2/databases/database/
database-roles/name
Deletes a database role.
POST /api/v2/databases/database/
database-roles/name:clone
Creates a new database role by cloning from the specified resource.
GET /api/v2/databases/database/database-roles/name/grantsLists all grants to the role.
POST /api/v2/databases/database/database-roles/name/grantsGrants privileges to the specified role.
POST /api/v2/databases/database/database-roles/name/grants:revokeRevokes grants from the specified role.
GET /api/v2/databases/database/database-roles/name/future-grantsLists all future grants to the specified role.
POST /api/v2/databases/database/database-roles/name/future-grantsGrants future privileges to the specified role.
POST /api/v2/databases/database/database-roles/name/future-grants:revokeRevokes future grants from the specified role

For reference documentation, see Snowflake Database Role API reference.