General reference information that is useful when using JMap Cloud APIs
Organizations
Every user or API key must belong to an organization. By default, a user or an API key can only access resources that belong to the organization for which it is a member.
Most endpoints require the organization ID to be included in the requests.
curl --request GET \
--url https://dev.jmapcloud.io/api/mcs/rest/v1/organizations/78777605-8097-4cec-852e-709f124e7ca9/projects \
In this example, the organization ID is '78777605-8097-4cec-852e-709f124e7ca9'.
Roles
Security in JMap Cloud is managed with roles. There are 3 roles that control the access level when calling the API:
- ORG_ADMIN: Administrator for an organization. Typically for inviting new members or creating API keys. This role is not available when using an API key.
- ORG_EDITOR: Editor for an organisation. Typically for integrating data and preparing projects and layers.
- ORG_VIEWER: Viewer for an organisation. Typically for functions related to data querying and editing (when permission level is sufficient).
There is also a role called SYS_ADMIN that is reserved for platform management tasks.
If you are using an API key to call the API, your API key can only have role ORG_EDITOR or ORG_VIEWER. This means you cannot call endpoints that require ORG_ADMIN or SYS_ADMIN using your API key. This is intended for security reasons.
Roles are additive. If you have a higher role (e.g. ORG_EDITOR), you also have the privileges of the lower roles (e.g. ORG_VIEWER).
Each endpoint in this documentation states what role level is required for using it.
Text localization
Some resources (project, layer, style, …) can be localized like this:
{
"description": {
"EN": "This project is about an interesting subject!",
"FR": "Ce projet concerne un sujet intéressant !"
},
"name": {
"EN": "My project 1",
"FR": "Mon projet 1"
}
}
There languages are supported (EN
, ES
, FR
). Use the 2-letter language code defined in ISO 639.
Colour
A colour parameter is expressed with a HEX colour code:
{
"backgroundColor": "#FFFFFF"
}
Units
Available units are: MILLIMETER
, CENTIMETER
, METER
, KILOMETER
, FOOT
, YARD
, MILE
, NAUTICAL_MILE
, DEGREE
{
"displayUnit": "METER"
}