Give a team access to a project
Creates or replaces the team's grant on the project; its members get it live, beside their own grants (each Postgres role at the level of the grant naming it). admin holds every role (the names in pg_roles are checked, then dropped). The grant is checked on every member's union of sources narrowed by their overrides, on every database of the project, as putProjectGrant checks one grant; a refusal names the member, the team and the database. Personal logins that stop qualifying are revoked, and every branch of the project reconciles its member roles. An unchanged grant writes nothing.
Authorization
bearer In: header
Path Parameters
Team id
uuidProject 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, a reserved name or a personal login. Below admin,
only NOLOGIN groups whose memberships reach no owner-level, LOGIN or reserved role, for
every member of the team on every database (with their own grant and overrides).
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/teams/497f6eca-6276-4993-bfeb-53cbbbba6f08/grants/497f6eca-6276-4993-bfeb-53cbbbba6f08" \ -H "Content-Type: application/json" \ -d '{ "platform_role": "viewer" }'{ "created_at": "2019-08-24T14:15:22Z", "description": "string", "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "member_count": 0, "member_ids": [ "6059d331-91d8-43de-a6af-f1a743933a5b" ], "name": "string", "projects": [ { "pg_roles": [ "string" ], "platform_role": "viewer", "project_id": "405d8375-3514-403b-8c43-83ae74cfe0e9" } ], "updated_at": "2019-08-24T14:15:22Z"}Take a team's access to a project away DELETE
Its members lose what the team gave them there, checked first on each member's remaining access. Also 204 when the team had no grant there (nothing is written).
Remove a member from a team DELETE
The member loses what the team gave them, checked first on their remaining access. Also 204 when they weren't in (nothing is written).