Add data source permissions

Gives permissions on a data source 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 data source.

The body is a list of { "principal": "...", "permissions": [ ... ] }. A permission the principal already has is ignored. A permission the principal only inherits from a project is added: it is then given explicitly too, and stays when the inherited one goes away with its project.

When it fails

Nothing is changed if any item is invalid. 400 if:

  • principal or permissions is missing or empty, or principal is not an email
  • a permission doesn't apply to the data source type, or to the kind of principal (see the tables below)
  • after adding, MODIFY would be set without VIEW, or OWNER without VIEW and MODIFY. Send them together (["OWNER", "MODIFY", "VIEW"]) unless the principal already has them. Inherited permissions don't count: an inherited VIEW doesn't allow adding MODIFY alone.
  • an organization principal is not yours, a trusted organization or [email protected]
  • principal is [email protected]

404 if a member or group is not a member or group of your organization.

Principals

A principal is the email of who gets the permissions:

PrincipalFormatAllowed permissions
MemberThe 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.All except OWNER
Your organization (every member)<first 8 characters of your organization id>@org.jmapcloud.ioVIEW, EXTRACT_FEATURE, EXTRACT_RASTER, EXTRACT_ROW
A trusted organizationThe trusted organization's email ([email protected])VIEW, EXTRACT_FEATURE, EXTRACT_RASTER, EXTRACT_ROW
All organizations[email protected]VIEW, EXTRACT_FEATURE, EXTRACT_RASTER, EXTRACT_ROW

[email protected] can't be set here: anonymous access comes from a public project that uses the data source.

Permissions

PermissionData source typesGrants
VIEWAllSeeing the data source and displaying its data
MODIFYAllChanging the data source (requires VIEW)
OWNERAllDeleting the data source and managing its permissions (requires VIEW and MODIFY)
EXTRACT_FEATUREAll except raster and tabularReading features
CREATE_FEATURE, EDIT_FEATURE_GEOMETRY, EDIT_FEATURE_ATTRIBUTES, DELETE_FEATUREAll except raster, tabular and custom_viewEditing features
EXTRACT_RASTERraster, wmswmtsReading raster data
EXTRACT_ROWtabularReading rows
CREATE_ROW, EDIT_ROW, DELETE_ROWtabularEditing rows

Permission names are case-insensitive.

Response

result is the complete list of permissions of the data source, one entry per principal:

  • principal: the email of the member, group or organization (see above), or [email protected].
  • permissions: all the permissions of the principal, including inherited ones.
  • inheritedPermissions: only present if some permissions are inherited. Each item gives the permission and where it comes from (fromResourceType, fromResourceId).

A permission is inherited from a project when a layer or table that uses the data source is added to the project: the principals of the project get VIEW and the matching extract permission on the data source. Inherited permissions are removed with the project, layer or table, not with these endpoints.

Data sources shared by another organization

Only the owning organization can change a data source's permissions. organization must be the organization of the access token: with the owner's organization id the request returns 403, and with yours it returns 404.

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…
Path Params
uuid
required

Id of your organization (must match the access token)

uuid
required

Id of the data source

Body Params

Permissions to add, by principal

Responses

Language
Credentials
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json