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 annotations to a map. Currently only Line, Polygon, Rectangle, Point, and tactical graphic annotations may be added. If any provided parameters are unknown, invalid, or do not satisfy the security requirements, the entire request will fail. For each request, a new element is created for each annotation, as well as a new layer if no parent layer is specified; thus not idempotent. Returns the ID of the layer created.
booleanRepresents a boolean value that restricts an endpoint to preview mode when set to true.
objectThe request body to add annotations to a map
stringThe ID of a layer in a Gaia map.
stringIf provided AND no existing parentLayerId is provided, the new layer created will be set with the provided label.
list<GaiaAnnotation>The annotations to be added to the map.
objectSuccess response.
stringThe ID of a layer in a Gaia map.
list<string>The IDs of the created annotations
1
2
3
4
5
curl -X POST \
\t-H "Content-type: application/json" \
\t-H "Authorization: Bearer $TOKEN" \
"https://$HOSTNAME/api/gotham/v1/maps/ri.gaia..map.a1A2bcD3e45fg6h7ij/layers/annotations?preview=true" \
-d '{"layerLabel":"Example layer name.","annotations":[{"title":"Example line annotation name.","annotationDescription":"Example description.","annotationType":{"type":"LineAnnotation","coordinates":[{"lon":0,"lat":0},{"lon":1,"lat":1},{"lon":2,"lat":2}]},"style":{"fill":{"opacity":0.5,"color":"#000000"}}}]}'1
2
3
4
5
6
7
{
"parentLayerId": "exampleLayerId",
"annotationIds": [
"exampleAnnotationId1",
"exampleAnnotationId2"
]
}