Gives permissions on a project of your organization. Permissions are added to the ones the principals already have; nothing is removed. To remove permissions, use PUT .../permissions or DELETE .../permissions/{permission}/members/{member}.
Required role: ORG_EDITOR, and the current user must have the OWNER permission on the project.
The body is a list of { "principal": "...", "permissions": [ ... ] }. A permission the principal already has is ignored.
When it fails
Nothing is changed if any item is invalid. 400 if:
principalorpermissionsis missing or empty, orprincipalis not an email- a permission isn't a project permission, or isn't allowed for the kind of principal (see the tables below)
- after adding,
MODIFYwould be set withoutVIEW, orOWNERwithoutVIEWandMODIFY. Send them together (["OWNER", "MODIFY", "VIEW"]) unless the principal already has them. - an organization principal isn't yours
principalis[email protected]
404 if a member or group isn't a member or group of your organization.
Response
result is the complete list of permissions of the project, one entry per principal, including [email protected] (VIEW) when the project is public.
Principals
A principal is the email of who gets the permissions:
| Principal | Format | Allowed permissions |
|---|---|---|
| Member | The member's email ([email protected]). Must be a member of your organization. | All |
| Group | <id>@group.jmapcloud.io. Must be a group of your organization. | VIEW, MODIFY |
| Your organization (every member) | <first 8 characters of your organization id>@org.jmapcloud.io | VIEW |
Projects can't be shared with other organizations ([email protected] or a trusted organization). [email protected] can't be set here: make the project public with PATCH .../projects/{project} ("public": true).
Permissions
| Permission | Grants |
|---|---|
VIEW | Seeing the project and its content |
MODIFY | Changing the project, its layers, layer groups, layers order and tags (requires VIEW) |
OWNER | Deleting the project, copying it, and managing its permissions (requires VIEW and MODIFY) |
Permission names are case-insensitive.
Data sources of the project
A principal with a permission on the project also gets, inherited from the project, VIEW and the matching extract permission (EXTRACT_FEATURE, EXTRACT_ROW or EXTRACT_RASTER) on the data sources of its layers and tables and of its terrain. They are removed when the principal loses its last permission on the project.
Organization
organization must be the organization of the access token, and the project must belong to it; otherwise the request returns 404.
| Time | Status | User Agent | |
|---|---|---|---|
Retrieving recent requests… | |||