Grant a member access to a project
Creates or replaces the member's grant. admin holds every role on the project, the database owner included (the names in pg_roles are checked, then dropped, and it is answered as "all"; overrides still narrow it per database), so owner (or the owner's name) is never listed. Below admin, each role must be a NOLOGIN group whose memberships (every one, whatever its options) reach no owner-level role (the owner, neon_superuser, cloud_admin, or SUPERUSER, CREATEROLE, CREATEDB, REPLICATION, BYPASSRLS), LOGIN role, reserved role or role that holds the ADMIN option on another role, on any branch. The same holds on each database for what the member's overrides there leave of the grant; a grant that breaks it is refused naming the database. Every branch of the project then reconciles its member roles.
Authorization
bearer In: header
Path Parameters
Project id
uuidMember id
uuidRequest Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Postgres role names; for admin, which holds every role (R17), checked and dropped.
Never owner or the database's owner (the admin platform role includes it), nor a
reserved name. Below admin, only NOLOGIN groups whose memberships reach no owner-level,
LOGIN or reserved role.
A member's platform role on a project. Ordered: Viewer < Developer < Admin.
Value in
- "viewer"
- "developer"
- "admin"
Response Body
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
curl -X PUT "https://example.com/v1/projects/497f6eca-6276-4993-bfeb-53cbbbba6f08/grants/497f6eca-6276-4993-bfeb-53cbbbba6f08" \ -H "Content-Type: application/json" \ -d '{ "platform_role": "viewer" }'{ "member_id": "435a4844-006a-4cfc-a644-e8eb2dd2ca43", "overrides": [ { "database_id": "91088904-0b92-46ad-9240-e1afa0da22df", "pg_roles": [ "string" ], "platform_role": "viewer" } ], "pg_roles": "all", "platform_role": "viewer"}