Elements

List all elements on a map

Returns a GeoJSON FeatureCollection containing all the elements in a map that are not in an element group

get
Authorizations
Path parameters
map_idstringRequired

The ID of the map to list elements from.

Responses
200
GeoJSON
application/json
get
GET /api/v2/maps/{map_id}/elements HTTP/1.1
Host: felt.com
Authorization: Bearer YOUR_API_KEY
Accept: */*
{
  "features": [
    {
      "geometry": {
        "felt:id": "luCHyMruTQ6ozGk3gPJfEB",
        "felt:parentId": "luCHyMruTQ6ozGk3gPJfEB"
      },
      "properties": {},
      "type": "Feature"
    }
  ],
  "type": "FeatureCollection"
}

List all elements in a group

Returns a GeoJSON FeatureCollection containing all the elements in a single group

get
Authorizations
Path parameters
map_idstringRequired

The ID of the map.

group_idstringRequired

The ID of the element group.

Responses
200
GeoJSON
application/json
get
GET /api/v2/maps/{map_id}/element_groups/{group_id} HTTP/1.1
Host: felt.com
Authorization: Bearer YOUR_API_KEY
Accept: */*
{
  "features": [
    {
      "geometry": {
        "felt:id": "luCHyMruTQ6ozGk3gPJfEB",
        "felt:parentId": "luCHyMruTQ6ozGk3gPJfEB"
      },
      "properties": {},
      "type": "Feature"
    }
  ],
  "type": "FeatureCollection"
}

List all element groups on a map

Returns a list of GeoJSON Feature Collections, one for each element group

get
Authorizations
Path parameters
map_idstringRequired

The ID of the map to list groups from.

Responses
200
ElementGroupList
application/json
get
GET /api/v2/maps/{map_id}/element_groups HTTP/1.1
Host: felt.com
Authorization: Bearer YOUR_API_KEY
Accept: */*
[
  {
    "color": "text",
    "elements": {
      "features": [
        {
          "geometry": {
            "felt:id": "luCHyMruTQ6ozGk3gPJfEB",
            "felt:parentId": "luCHyMruTQ6ozGk3gPJfEB"
          },
          "properties": {},
          "type": "Feature"
        }
      ],
      "type": "FeatureCollection"
    },
    "id": "text",
    "name": "text",
    "symbol": "text"
  }
]

Create or update new elements

Each element is represented by a feature in the POSTed GeoJSON Feature Collection.

For each feature, including an existing element ID will result in the element being updated on the map. If no element ID is provided (or a non-existent one) , a new element will be created.

The maximum payload size for any POST to the Felt API is 1MB. Additionally, complex element geometry may be automatically simplified. If you require large, complex geometries, consider uploading your data as a Data Layer.

post
Authorizations
Path parameters
map_idstringRequired

The ID of the map to create the element in

Body
typestring · enumRequiredPossible values:
Responses
200
GeoJSON
application/json
post
POST /api/v2/maps/{map_id}/elements HTTP/1.1
Host: felt.com
Authorization: Bearer YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 165

{
  "features": [
    {
      "geometry": {
        "felt:id": "luCHyMruTQ6ozGk3gPJfEB",
        "felt:parentId": "luCHyMruTQ6ozGk3gPJfEB"
      },
      "properties": {},
      "type": "Feature"
    }
  ],
  "type": "FeatureCollection"
}
{
  "features": [
    {
      "geometry": {
        "felt:id": "luCHyMruTQ6ozGk3gPJfEB",
        "felt:parentId": "luCHyMruTQ6ozGk3gPJfEB"
      },
      "properties": {},
      "type": "Feature"
    }
  ],
  "type": "FeatureCollection"
}

Create or update new element groups

For each Element Group, including an existing Element Group id will result in the Element Group being updated. If no id is provided, a new Element Group will be created.

You may assign Elements to an Element Group by setting the felt:parentId property of an Element to the ID of an Element Group.

post
Authorizations
Path parameters
map_idstringRequired

The ID of the map to create the group in

Body
colorstringOptionalDefault: #C93535
idstring · felt_idOptionalExample: luCHyMruTQ6ozGk3gPJfEB
namestringRequiredExample: My Element Group
symbolstringOptionalDefault: dot
Responses
200
Element group list
application/json
post
POST /api/v2/maps/{map_id}/element_groups HTTP/1.1
Host: felt.com
Authorization: Bearer YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 92

[
  {
    "color": "#C93535",
    "id": "luCHyMruTQ6ozGk3gPJfEB",
    "name": "My Element Group",
    "symbol": "dot"
  }
]
[
  {
    "color": "text",
    "elements": {
      "features": [
        {
          "geometry": {
            "felt:id": "luCHyMruTQ6ozGk3gPJfEB",
            "felt:parentId": "luCHyMruTQ6ozGk3gPJfEB"
          },
          "properties": {},
          "type": "Feature"
        }
      ],
      "type": "FeatureCollection"
    },
    "id": "text",
    "name": "text",
    "symbol": "text"
  }
]

Delete an element

Deletes the element with the ID specified in the path.

delete
Authorizations
Path parameters
map_idstringRequired

The ID of the map to delete the element from.

element_idstringRequired

The ID of the element to delete.

Responses
204
No Content
delete
DELETE /api/v2/maps/{map_id}/elements/{element_id} HTTP/1.1
Host: felt.com
Authorization: Bearer YOUR_API_KEY
Accept: */*

No content

Last updated

Was this helpful?