Skip to content
getgeolens.com

Set Map Groups Endpoint

PUT
/maps/{map_id}/groups/
curl --request PUT \
--url https://example.com/maps/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/groups/ \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "group_ids": [ "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0" ], "confirm": "share_datasets" }'

Share a map with exactly these sharing groups (owner or admin).

An owner may add only groups they belong to (403); an admin may add any. A private map shared with a group becomes restricted and its members can read it; a restricted one left with no group becomes private. Internal and public maps keep their audience. Becoming restricted revokes the map’s share link and embed tokens. 404 for an unknown group.

409 (detail.code layers_hidden_from_groups, the layers under detail.layers) when new groups can’t read some layers; see confirm. A lock wait that times out also answers 409, without detail.code.

map_id
required
Map Id
string format: uuid
Media type application/json
MapGroupsUpdate
object
group_ids
required
Group Ids

Every group the map is shared with afterwards; an empty list unshares it. An owner may add only groups they belong to, and an admin any group.

Array<string>
<= 100 items
confirm
Any of:
string
Allowed values: share_datasets map_only

Successful Response

Media type application/json
MapGroupsResponse
object
visibility
required
MapVisibility

The map’s visibility after the change: a private map shared with a group becomes restricted, and a restricted one left with no group becomes private.

string
Allowed values: private internal public restricted
groups
required
Groups

The sharing groups the map is shared with, by name.

Array<object>
GroupRef
object
id
required
Id

Unique group identifier.

string format: uuid
name
required
Name

Group name.

string
shared_dataset_ids
Shared Dataset Ids

Datasets this request shared with the map’s new groups.

Array<string>
hidden_layers
Hidden Layers

Layers that some of the map’s new groups still can’t read; the same shape a 409 lists under detail.layers.

Array<object>
MapLayerAccessGap
object
layer_id
required
Layer Id
string format: uuid
layer_title
required
Layer Title
string
dataset_id
required
Dataset Id
string format: uuid
dataset_title
required
Dataset Title
string
group_ids
required
Group Ids

The map’s groups that have a member who can’t read it.

Array<string>
can_share
required
Can Share

Whether confirm: share_datasets would share the dataset with those groups.

boolean

Example

{
"visibility": "private"
}

Bad request — invalid payload

Media type application/problem+json
ProblemDetail
object
type
Type
string
default: about:blank
title
required
Title
string
status
required
Status
integer
detail
required
Any of:
string

Example

{
"detail": "Dataset not found",
"status": 404,
"title": "Not Found",
"type": "about:blank"
}

Unauthorized — missing or invalid credentials

Media type application/problem+json
ProblemDetail
object
type
Type
string
default: about:blank
title
required
Title
string
status
required
Status
integer
detail
required
Any of:
string

Example

{
"detail": "Dataset not found",
"status": 404,
"title": "Not Found",
"type": "about:blank"
}

Forbidden — caller lacks access to this resource

Media type application/problem+json
ProblemDetail
object
type
Type
string
default: about:blank
title
required
Title
string
status
required
Status
integer
detail
required
Any of:
string

Example

{
"detail": "Dataset not found",
"status": 404,
"title": "Not Found",
"type": "about:blank"
}

Not found

Media type application/problem+json
ProblemDetail
object
type
Type
string
default: about:blank
title
required
Title
string
status
required
Status
integer
detail
required
Any of:
string

Example

{
"detail": "Dataset not found",
"status": 404,
"title": "Not Found",
"type": "about:blank"
}

Layers some new groups can’t read (detail.code layers_hidden_from_groups), or another change to the map holding its lock (no detail.code); branch on detail.code.

Media type application/problem+json
ProblemDetail
object
type
Type
string
default: about:blank
title
required
Title
string
status
required
Status
integer
detail
required
Any of:
string

Example

{
"detail": "Dataset not found",
"status": 404,
"title": "Not Found",
"type": "about:blank"
}

Validation error

Media type application/problem+json
ProblemDetail
object
type
Type
string
default: about:blank
title
required
Title
string
status
required
Status
integer
detail
required
Any of:
string

Example

{
"detail": "Dataset not found",
"status": 404,
"title": "Not Found",
"type": "about:blank"
}

Too many requests — retry after the advertised interval

Media type application/problem+json
ProblemDetail
object
type
Type
string
default: about:blank
title
required
Title
string
status
required
Status
integer
detail
required
Any of:
string

Example

{
"detail": "Dataset not found",
"status": 404,
"title": "Not Found",
"type": "about:blank"
}
Retry-After
integer

Seconds until the request may be retried

Internal server error

Media type application/problem+json
ProblemDetail
object
type
Type
string
default: about:blank
title
required
Title
string
status
required
Status
integer
detail
required
Any of:
string

Example

{
"detail": "Dataset not found",
"status": 404,
"title": "Not Found",
"type": "about:blank"
}

Service unavailable — the database could not serve the request

Media type application/problem+json
ProblemDetail
object
type
Type
string
default: about:blank
title
required
Title
string
status
required
Status
integer
detail
required
Any of:
string

Example

{
"detail": "Dataset not found",
"status": 404,
"title": "Not Found",
"type": "about:blank"
}