Search documentation
karat

+

K

User Documentation ↗
Version 2.0

Add Artifacts To Map

POST/api/v2/gaia/maps/{mapRid}/addArtifactsTo
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 artifacts 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 IDs of the layers created.

Third-party applications using this endpoint via OAuth2 must request the following operation scope: api:map-write.

Path parameters

mapRid
string

The RID of a Gaia map.

Query parameters

preview
boolean
optional

Enables the use of preview functionality.

Request body

AddArtifactsToMapRequest
object
Hide child attributes

Hide child attributes

artifactGids
list<ArtifactGid>
optional

The GIDs of artifacts to be added to the map.

Show child attributes

Show child attributes

label
string

The name of the layer to be created

Response body

AddArtifactsToMapResponse
object

The response body to add artifacts to a map, containing the IDs of the created layers.

Hide child attributes

Hide child attributes

dataLayerIds
list<GaiaLayerId>
optional
Show child attributes

Show child attributes

Examples

Request

Copied!
1 2 3 4 5 curl -X POST \ \t-H "Content-type: application/json" \ \t-H "Authorization: Bearer $TOKEN" \ "https://$HOSTNAME/api/v2/gaia/maps/ri.gotham-artifact.0-1.gaia-map.a1A2bcD3e45fg6h7ij/addArtifactsTo?preview=true" \ -d '{"label":"Example layer"}'

Error responses

Error Name
ExpectedMapGidError CodeINVALID_ARGUMENT
Status Code400
DescriptionExpected a map Gid.
ParametersmapId
AddArtifactsToMapPermissionDeniedError CodePERMISSION_DENIED
Status Code403
DescriptionCould not addArtifactsTo the Map.
ParametersmapRid