For the complete documentation index, see llms.txt. This page is also available as Markdown.

Layer Components

APIs to build dashboards

With these APIs, you can create and edit a layer's components.

List layer components

get

Returns all components on a layer, ordered as they appear in the app.

Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Path parameters
map_idstringRequired

The ID of the map the layer belongs to.

layer_idstringRequired

The ID of the layer the components belong to.

Responses
200

Layer components list

application/json
or
or
or
or
get/api/v2/maps/{map_id}/layers/{layer_id}/components
GET /api/v2/maps/{map_id}/layers/{layer_id}/components HTTP/1.1
Host: felt.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
[
  {
    "config": {
      "reactive": true,
      "viewport_mode": "global"
    },
    "data": {
      "aggregate": "count",
      "format": null
    },
    "id": "text",
    "layer_id": "text",
    "title": "text",
    "type": "statistic"
  }
]

Create layer component

post

Creates a component on a layer.

The component type is set at creation and cannot be changed later.

Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Path parameters
map_idstringRequired

The ID of the map the layer belongs to.

layer_idstringRequired

The ID of the layer the component belongs to.

Body
or
or
or
or
Responses
200

Layer component

application/json
or
or
or
or
post/api/v2/maps/{map_id}/layers/{layer_id}/components
POST /api/v2/maps/{map_id}/layers/{layer_id}/components HTTP/1.1
Host: felt.com
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 215

{
  "config": {
    "selection": [
      "zoning",
      "in",
      [
        "residential"
      ]
    ]
  },
  "data": {
    "aggregate": "sum",
    "aggregate_by": "area_sqm",
    "format": {
      "thousandSeparated": true
    },
    "group_by": "zoning"
  },
  "title": "Total area by zoning",
  "type": "bar_chart"
}
{
  "config": {
    "reactive": true,
    "viewport_mode": "global"
  },
  "data": {
    "aggregate": "count",
    "format": null
  },
  "id": "text",
  "layer_id": "text",
  "title": "text",
  "type": "statistic"
}

Get layer component

get

Returns a single layer component. Includes all fields.

Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Path parameters
map_idstringRequired

The ID of the map the layer belongs to.

layer_idstringRequired

The ID of the layer the component belongs to.

component_idstringRequired

The ID of the layer component.

Responses
200

Layer component

application/json
or
or
or
or
get/api/v2/maps/{map_id}/layers/{layer_id}/components/{component_id}
GET /api/v2/maps/{map_id}/layers/{layer_id}/components/{component_id} HTTP/1.1
Host: felt.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
  "config": {
    "reactive": true,
    "viewport_mode": "global"
  },
  "data": {
    "aggregate": "count",
    "format": null
  },
  "id": "text",
  "layer_id": "text",
  "title": "text",
  "type": "statistic"
}

Update layer component

post

Partially update the provided fields of a component.

Omitted fields keep their current value. A component's type is immutable and is not part of the update body.

Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Path parameters
map_idstringRequired

The ID of the map the layer belongs to.

layer_idstringRequired

The ID of the layer the component belongs to.

component_idstringRequired

The ID of the layer component.

Body
or
or
or
or
Responses
200

Layer component

application/json
or
or
or
or
post/api/v2/maps/{map_id}/layers/{layer_id}/components/{component_id}
POST /api/v2/maps/{map_id}/layers/{layer_id}/components/{component_id} HTTP/1.1
Host: felt.com
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 111

{
  "config": {
    "reactive": true,
    "viewport_mode": "global"
  },
  "data": {
    "aggregate": "count",
    "format": null
  },
  "title": "text"
}
{
  "config": {
    "reactive": true,
    "viewport_mode": "global"
  },
  "data": {
    "aggregate": "count",
    "format": null
  },
  "id": "text",
  "layer_id": "text",
  "title": "text",
  "type": "statistic"
}

Delete layer component

delete

Deletes a component from the layer.

Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Path parameters
map_idstringRequired

The ID of the map the layer belongs to.

layer_idstringRequired

The ID of the layer the component belongs to.

component_idstringRequired

The ID of the layer component.

Responses
204

No Content

No content

delete/api/v2/maps/{map_id}/layers/{layer_id}/components/{component_id}
DELETE /api/v2/maps/{map_id}/layers/{layer_id}/components/{component_id} HTTP/1.1
Host: felt.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*

No content

Last updated

Was this helpful?