Try It!

Layer ID

If you are unsure where to find the Layer ID we've got you covered. A layer is essentially what we refer to as a group in the web application.

You can utilize our APIs to retrieve Layer Ids. Fetch all available layers by using the following API and passing your API key, map ID and the type. Once obtained, you can retrieve the specific layer ID you need.

Try fetch the layer ids related to your Atlas map(s) in the "Sandbox":

Get Layer IDs

This is the request Curl

curl --request GET \
     --url 'https://app-api.geposit.se/v2.0/layer/map/<map_id>/area?api_key=<your_api_key>' \
     --header 'accept: application/json'

Here is how the respose looks like!

{
  "layers": [
    {
      "layer": {
        "id": "layer1",
        "user_id": "user1",
        "tenant_id": "tenant1",
        "map_id": "map1",
        "created_at": "2023-05-03T07:51:55.662017Z",
        "updated_at": "2023-05-16T10:53:17.644495Z",
        "name": "Name1",
        "type": "area",
        "sharable": true,
        "description": ""
      },
      "container": [
        {
          "id": "cont1",
          "map_id": "map1",
          "layer_id": "layer1",
          "name": "Name1C",
          "color": "",
          "description": "",
          "visible": false,
          "created_at": "2023-05-03T07:52:49.44583Z",
          "updated_at": "2023-05-30T12:53:42.085973Z",
          "user_id": "user1",
          "updated_by": "",
          "geo_ids_ref_groups": [
            {
              "ref_id": "ref1",
              "geo_ids": [
                {
                  "polygon_id": "poly1",
                  "feature_id": "fea1"
                },
                {
                  "polygon_id": "poly2",
                  "feature_id": "fea2"
                }...
              ],
              "custom_ids": null
            }
          ],
          "custom_polygons": []
        }
      ]
    },
    {
      "layer": {
        "id": "layer2",
        "user_id": "user1",
        "tenant_id": "tenant2",
        "map_id": "map2",
        "created_at": "2023-04-26T14:36:17.610941Z",
        "updated_at": "2023-04-26T14:36:17.610878Z",
        "name": "name2",
        "type": "area",
        "sharable": true,
        "description": ""
      },
      "container": [
        {
          "id": "cont2",
          "map_id": "map2",
          "layer_id": "layer2",
          "name": "NameC2",
          "color": "#8ED1FC",
          "description": "",
          "visible": true,
          "created_at": "2024-02-02T09:54:32.797814Z",
          "updated_at": "2024-02-02T09:54:32.797794Z",
          "user_id": "user2",
          "updated_by": "",
          "geo_ids_ref_groups": [
            {
              "ref_id": "ref2",
              "geo_ids": [
                {
                  "polygon_id": "poly3",
                  "feature_id": "fea3"
                },
                {
                  "polygon_id": "poly4",
                  "feature_id": "ref4"
                }...
              ],
              "custom_ids": null
            }
          ],
          "custom_polygons": []
        },
        ]
       ...
      ]
   ...
  ]
}

If you are unaware how to get the Map Id, check How to get Map IDs

Also, you can switch on the Show Object Idsand retrieve the Layer Id from the web application itself. Once you navigate to the map, you will obtain the relavent Layer ID as follows.