Search documentation
karat

+

K

User Documentation ↗

Add Objects To Map

POST/api/gotham/v1/maps/{mapRid}/layers/objects
Warning

This endpoint is in preview and may be modified or removed at any time. To use this endpoint, add preview=true to the request query parameters.

Add objects to a map. Currently only Foundry-managed object types may be added. If unknown objects or objects that don't satisfy the security requirements are provided, the entire request will fail. This creates a new layer that includes all the provided objects per request, thus not idempotent. Returns the ID of the layer created.

Path parameters

mapRid
string

The RID of the Gaia map that you wish to add objects to.

Query parameters

preview
boolean
optional

Represents a boolean value that restricts an endpoint to preview mode when set to true.

Request body

AddObjectsToMapRequest
object

The request body to add objects to a map.

Hide children

Hide children

objectRids
list<rid>
optional
label
string

The name of the layer to be created

Response body

AddObjectsToMapResponse
object

Success response.

Hide children

Hide children

dataLayerIds
list<GaiaLayerId>
optional
Show children

Show children

GaiaLayerId
string

The ID of a layer in a Gaia map.

Examples

Request

Copied!
1 2 3 4 5 curl -X POST \ -H "Content-type: application/json" \ -H "Authorization: Bearer $TOKEN" \ "https://$HOSTNAME/api/gotham/v1/maps/ri.gaia..map.a1A2bcD3e45fg6h7ij/layers/objects?preview=true" \ -d '{"objectRids":["ri.phonograph2-objects.main.object.example1","ri.phonograph2-objects.main.object.example2"],"label":"Example layer name."}'

Response

Copied!
1 2 3 4 5 { "dataLayerIds": [ "exampleLayerId" ] }