Updates the server's Mapbox integration settings. Every field is optional; an omitted field keeps its stored value. In particular, omit api_key to keep the stored key.
After the merge, api_key, user and map_type must all be non-empty, and map_type must be one of the server's map_types. profile_default_threshold must be an integer of 0 or more, unless server_mapview_limit is negative.
Authorization
Same as GET /mapbox/settings: internal API clients only; COMPANY or SERVER users on a ZWS-integrated server, SERVER users only otherwise.
Responses
-
OK - the settings were saved. The body is the updated settings, in the same shape as
GET. -
Bad Request - the body is not a JSON object, a field is empty or of the wrong type,
map_typeis not one ofmap_types, orprofile_default_thresholdis below 0 whileserver_mapview_limitis 0 or more. -
Unauthorized - missing or invalid bearer token.
-
Forbidden - the client is not internal, or the user's role is not allowed (see Authorization).
-
Conflict - Mapbox is not enabled on this server.
curl \
--request PUT 'https://api.iformbuilder.com/exzact/api/v81/[servername]/mapbox/settings' \
--header "Content-Type: application/json" \
--header "Authorization: Bearer {access_token}" \
--data '{
"api_key": "sk.eyJ1IjoiemVyaW9uIiwiYSI6ImV4YW1wbGUifQ.Ab12",
"user": "zerion",
"map_type": "satellite-v9",
"profile_default_threshold": 250
}'
{
"api_key": "sk.eyJ1IjoiemVyaW9uIiwiYSI6ImV4YW1wbGUifQ.Ab12",
"user": "zerion",
"map_type": "satellite-v9",
"profile_default_threshold": 250
}
{
"enabled": true,
"user": "zerion",
"api_key_last4": "Ab12",
"map_type": "satellite-v9",
"map_types": [
"streets-v11",
"satellite-v9"
],
"profile_default_threshold": 250,
"server_mapview_limit": 2000
}