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
The ID of the map to list elements from.
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
The ID of the map.
The ID of the element group.
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
The ID of the map to list groups from.
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 POST
ed 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 ID of the map to create the element in
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.
The ID of the map to create the group in
#C93535
luCHyMruTQ6ozGk3gPJfEB
My Element Group
dot
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.
The ID of the map to delete the element from.
The ID of the element to 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?