> For the complete documentation index, see [llms.txt](https://developers.felt.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://developers.felt.com/rest-api/api-reference/layers/layer-components.md).

# Layer Components

APIs to build dashboards

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

## List layer components

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

```json
{"openapi":"3.0.0","info":{"title":"Felt","version":"2.0"},"tags":[{"description":"With these APIs, you can create and edit a layer's components.\n","name":"Layer Components"}],"servers":[{"url":"https://felt.com","variables":{}}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"bearerFormat":"YOUR_API_KEY","scheme":"bearer","type":"http"}},"schemas":{"LayerComponentList":{"items":{"$ref":"#/components/schemas/LayerComponent"},"title":"LayerComponentList","type":"array"},"LayerComponent":{"anyOf":[{"anyOf":[{"additionalProperties":false,"description":"A single statistic over the layer's features.","properties":{"config":{"additionalProperties":false,"default":{"reactive":true,"viewport_mode":"global"},"description":"Component configuration.","properties":{"reactive":{"default":true,"description":"Whether this component reacts to other components' selections, filtering its result to match.","type":"boolean"},"viewport_mode":{"default":"global","description":"Compute over the whole layer (`global`) or only the features in the current viewport (`viewport`).","enum":["global","viewport"],"type":"string"}},"required":["reactive","viewport_mode"],"type":"object"},"data":{"anyOf":[{"additionalProperties":false,"properties":{"aggregate":{"description":"Count features.","enum":["count"],"type":"string"},"format":{"description":"numbrojs format object. See the [numbrojs format documentation](https://numbrojs.com/format.html)."}},"required":["aggregate"],"title":"Feature count","type":"object"},{"additionalProperties":false,"properties":{"aggregate":{"description":"The statistic to compute over `aggregate_by`.","enum":["sum","avg","min","max","median","count_distinct"],"type":"string"},"aggregate_by":{"description":"Attribute to aggregate.","type":"string"},"format":{"description":"numbrojs format object. See the [numbrojs format documentation](https://numbrojs.com/format.html)."}},"required":["aggregate","aggregate_by"],"title":"Aggregate","type":"object"}]},"id":{"description":"Server-assigned component id.","type":"string"},"layer_id":{"description":"The layer this component is bound to.","type":"string"},"layer_type":{"description":"The kind of layer this component is attached to.","enum":["vector"],"type":"string"},"title":{"description":"Display title.","type":"string"},"type":{"description":"The component type. Immutable after creation.","enum":["statistic"],"type":"string"}},"required":["type","layer_type","data","config","id","layer_id"],"title":"Vector statistic","type":"object"},{"additionalProperties":false,"description":"Distribution of a numeric attribute across bins.","properties":{"config":{"additionalProperties":false,"default":{"reactive":true,"viewport_mode":"global"},"description":"Component configuration.","properties":{"reactive":{"default":true,"description":"Whether this component reacts to other components' selections, filtering its result to match.","type":"boolean"},"selection":{"description":"Selected values of `data.group_by`. The visualized map layer and other components are filtered to match. Uses the same format as the [FSL filters block](https://developers.felt.com/felt-style-language/style-definition-blocks/the-filters-block)."},"viewport_mode":{"default":"global","description":"Compute over the whole layer (`global`) or only the features in the current viewport (`viewport`).","enum":["global","viewport"],"type":"string"}},"required":["reactive","viewport_mode"],"type":"object"},"data":{"anyOf":[{"additionalProperties":false,"properties":{"aggregate":{"description":"Count features.","enum":["count"],"type":"string"},"format":{"description":"numbrojs format object. See the [numbrojs format documentation](https://numbrojs.com/format.html)."},"group_by":{"description":"Numeric attribute to bin into the distribution.","type":"string"},"grouping":{"additionalProperties":false,"description":"How the attribute's values are binned.","properties":{"steps":{"additionalProperties":false,"properties":{"count":{"description":"Number of equal-width bins across the attribute's range.","exclusiveMinimum":true,"maximum":9007199254740991,"minimum":0,"type":"integer"},"type":{"enum":["equal-intervals"],"type":"string"}},"required":["type","count"],"type":"object"},"type":{"enum":["numeric"],"type":"string"}},"required":["type","steps"],"type":"object"}},"required":["aggregate","group_by","grouping"],"title":"Feature count","type":"object"},{"additionalProperties":false,"properties":{"aggregate":{"description":"The statistic to compute over `aggregate_by`.","enum":["sum","avg","min","max","median","count_distinct"],"type":"string"},"aggregate_by":{"description":"Attribute to aggregate.","type":"string"},"format":{"description":"numbrojs format object. See the [numbrojs format documentation](https://numbrojs.com/format.html)."},"group_by":{"description":"Numeric attribute to bin into the distribution.","type":"string"},"grouping":{"additionalProperties":false,"description":"How the attribute's values are binned.","properties":{"steps":{"additionalProperties":false,"properties":{"count":{"description":"Number of equal-width bins across the attribute's range.","exclusiveMinimum":true,"maximum":9007199254740991,"minimum":0,"type":"integer"},"type":{"enum":["equal-intervals"],"type":"string"}},"required":["type","count"],"type":"object"},"type":{"enum":["numeric"],"type":"string"}},"required":["type","steps"],"type":"object"}},"required":["aggregate","aggregate_by","group_by","grouping"],"title":"Aggregate","type":"object"}]},"id":{"description":"Server-assigned component id.","type":"string"},"layer_id":{"description":"The layer this component is bound to.","type":"string"},"layer_type":{"description":"The kind of layer this component is attached to.","enum":["vector"],"type":"string"},"title":{"description":"Display title.","type":"string"},"type":{"description":"The component type. Immutable after creation.","enum":["histogram"],"type":"string"}},"required":["type","layer_type","data","config","id","layer_id"],"title":"Vector histogram","type":"object"},{"additionalProperties":false,"description":"An attribute's distribution as a smoothed line.","properties":{"config":{"additionalProperties":false,"default":{"reactive":true,"viewport_mode":"global"},"description":"Component configuration.","properties":{"reactive":{"default":true,"description":"Whether this component reacts to other components' selections, filtering its result to match.","type":"boolean"},"selection":{"description":"Selected values of `data.domain`. The visualized map layer and other components are filtered to match. Uses the same format as the [FSL filters block](https://developers.felt.com/felt-style-language/style-definition-blocks/the-filters-block)."},"viewport_mode":{"default":"global","description":"Compute over the whole layer (`global`) or only the features in the current viewport (`viewport`).","enum":["global","viewport"],"type":"string"}},"required":["reactive","viewport_mode"],"type":"object"},"data":{"anyOf":[{"additionalProperties":false,"properties":{"aggregate":{"description":"Count features.","enum":["count"],"type":"string"},"domain":{"description":"Numeric attribute the line is plotted against — the horizontal axis.","type":"string"},"format":{"description":"numbrojs format object. See the [numbrojs format documentation](https://numbrojs.com/format.html)."}},"required":["aggregate","domain"],"title":"Feature count","type":"object"},{"additionalProperties":false,"properties":{"aggregate":{"description":"The statistic to compute over `aggregate_by`.","enum":["sum","avg","min","max","median","count_distinct"],"type":"string"},"aggregate_by":{"description":"Attribute to aggregate.","type":"string"},"domain":{"description":"Numeric attribute the line is plotted against — the horizontal axis.","type":"string"},"format":{"description":"numbrojs format object. See the [numbrojs format documentation](https://numbrojs.com/format.html)."}},"required":["aggregate","aggregate_by","domain"],"title":"Aggregate","type":"object"}]},"id":{"description":"Server-assigned component id.","type":"string"},"layer_id":{"description":"The layer this component is bound to.","type":"string"},"layer_type":{"description":"The kind of layer this component is attached to.","enum":["vector"],"type":"string"},"title":{"description":"Display title.","type":"string"},"type":{"description":"The component type. Immutable after creation.","enum":["line_chart"],"type":"string"}},"required":["type","layer_type","data","config","id","layer_id"],"title":"Vector line chart","type":"object"},{"additionalProperties":false,"description":"An attribute's categories as a bar chart.","properties":{"config":{"additionalProperties":false,"default":{"reactive":true,"viewport_mode":"global"},"description":"Component configuration.","properties":{"reactive":{"default":true,"description":"Whether this component reacts to other components' selections, filtering its result to match.","type":"boolean"},"selection":{"description":"Selected values of `data.group_by`. The visualized map layer and other components are filtered to match. Uses the same format as the [FSL filters block](https://developers.felt.com/felt-style-language/style-definition-blocks/the-filters-block)."},"viewport_mode":{"default":"global","description":"Compute over the whole layer (`global`) or only the features in the current viewport (`viewport`).","enum":["global","viewport"],"type":"string"}},"required":["reactive","viewport_mode"],"type":"object"},"data":{"anyOf":[{"additionalProperties":false,"properties":{"aggregate":{"description":"Count features.","enum":["count"],"type":"string"},"format":{"description":"numbrojs format object. See the [numbrojs format documentation](https://numbrojs.com/format.html)."},"group_by":{"description":"Attribute whose values become the categories.","type":"string"}},"required":["aggregate","group_by"],"title":"Feature count","type":"object"},{"additionalProperties":false,"properties":{"aggregate":{"description":"The statistic to compute over `aggregate_by`.","enum":["sum","avg","min","max","median","count_distinct"],"type":"string"},"aggregate_by":{"description":"Attribute to aggregate.","type":"string"},"format":{"description":"numbrojs format object. See the [numbrojs format documentation](https://numbrojs.com/format.html)."},"group_by":{"description":"Attribute whose values become the categories.","type":"string"}},"required":["aggregate","aggregate_by","group_by"],"title":"Aggregate","type":"object"}]},"id":{"description":"Server-assigned component id.","type":"string"},"layer_id":{"description":"The layer this component is bound to.","type":"string"},"layer_type":{"description":"The kind of layer this component is attached to.","enum":["vector"],"type":"string"},"title":{"description":"Display title.","type":"string"},"type":{"description":"The component type. Immutable after creation.","enum":["bar_chart"],"type":"string"}},"required":["type","layer_type","data","config","id","layer_id"],"title":"Vector bar chart","type":"object"},{"additionalProperties":false,"description":"Charts a statistic over time buckets of a date attribute.","properties":{"config":{"additionalProperties":false,"default":{"reactive":true,"viewport_mode":"global"},"description":"Component configuration.","properties":{"reactive":{"default":true,"description":"Whether this component reacts to other components' selections, filtering its result to match.","type":"boolean"},"selection":{"description":"Selected values of `data.group_by`. The visualized map layer and other components are filtered to match. Uses the same format as the [FSL filters block](https://developers.felt.com/felt-style-language/style-definition-blocks/the-filters-block)."},"viewport_mode":{"default":"global","description":"Compute over the whole layer (`global`) or only the features in the current viewport (`viewport`).","enum":["global","viewport"],"type":"string"}},"required":["reactive","viewport_mode"],"type":"object"},"data":{"anyOf":[{"additionalProperties":false,"properties":{"aggregate":{"description":"Count features.","enum":["count"],"type":"string"},"format":{"description":"numbrojs format object. See the [numbrojs format documentation](https://numbrojs.com/format.html)."},"group_by":{"description":"Date or datetime attribute which drives the time axis.","type":"string"},"grouping":{"additionalProperties":false,"description":"Time bucket per data point.","properties":{"interval":{"enum":["hour","day","week","month","year"],"type":"string"},"type":{"enum":["time-interval"],"type":"string"}},"required":["type","interval"],"type":"object"}},"required":["aggregate","group_by","grouping"],"title":"Feature count","type":"object"},{"additionalProperties":false,"properties":{"aggregate":{"description":"The statistic to compute over `aggregate_by`.","enum":["sum","avg","min","max","median","count_distinct"],"type":"string"},"aggregate_by":{"description":"Attribute to aggregate.","type":"string"},"format":{"description":"numbrojs format object. See the [numbrojs format documentation](https://numbrojs.com/format.html)."},"group_by":{"description":"Date or datetime attribute which drives the time axis.","type":"string"},"grouping":{"additionalProperties":false,"description":"Time bucket per data point.","properties":{"interval":{"enum":["hour","day","week","month","year"],"type":"string"},"type":{"enum":["time-interval"],"type":"string"}},"required":["type","interval"],"type":"object"}},"required":["aggregate","aggregate_by","group_by","grouping"],"title":"Aggregate","type":"object"}]},"id":{"description":"Server-assigned component id.","type":"string"},"layer_id":{"description":"The layer this component is bound to.","type":"string"},"layer_type":{"description":"The kind of layer this component is attached to.","enum":["vector"],"type":"string"},"title":{"description":"Display title.","type":"string"},"type":{"description":"The component type. Immutable after creation.","enum":["time_series"],"type":"string"}},"required":["type","layer_type","data","config","id","layer_id"],"title":"Vector time series","type":"object"},{"additionalProperties":false,"description":"A dropdown or slider filtering the layer by an attribute.","properties":{"config":{"additionalProperties":false,"default":{"control_type":"dropdown"},"description":"Component configuration.","properties":{"control_type":{"default":"dropdown","description":"The type of rendered interactive component. `slider` only works with numeric attributes.","enum":["dropdown","slider"],"type":"string"},"plurality":{"description":"Whether the `dropdown` allows filtering on multiple values or just one.","enum":["single","multiple"],"type":"string"},"selection":{"description":"Selected values of `data.filter_by`. The visualized map layer and other components are filtered to match. Uses the same format as the [FSL filters block](https://developers.felt.com/felt-style-language/style-definition-blocks/the-filters-block)."},"sorting":{"description":"The rendered order of `dropdown` options.","enum":["Alphabetically","By feature count"],"type":"string"}},"required":["control_type"],"type":"object"},"data":{"additionalProperties":false,"properties":{"filter_by":{"description":"Attribute to filter values from.","type":"string"}},"required":["filter_by"],"type":"object"},"id":{"description":"Server-assigned component id.","type":"string"},"layer_id":{"description":"The layer this component is bound to.","type":"string"},"layer_type":{"description":"The kind of layer this component is attached to.","enum":["vector"],"type":"string"},"title":{"description":"Display title. Defaults to `data.filter_by`.","type":"string"},"type":{"description":"The component type. Immutable after creation.","enum":["filter"],"type":"string"}},"required":["type","layer_type","data","config","id","layer_id"],"title":"Vector filter","type":"object"}]},{"anyOf":[{"additionalProperties":false,"description":"A single statistic over a band's pixels.","properties":{"config":{"additionalProperties":false,"default":{"reactive":true,"viewport_mode":"global"},"description":"Component configuration.","properties":{"reactive":{"default":true,"description":"Whether this component reacts to other components' selections, filtering its result to match.","type":"boolean"},"viewport_mode":{"default":"global","description":"Compute over the whole layer (`global`) or only the features in the current viewport (`viewport`).","enum":["global","viewport"],"type":"string"}},"required":["reactive","viewport_mode"],"type":"object"},"data":{"additionalProperties":false,"properties":{"aggregate":{"description":"The statistic to compute over `aggregate_by`.","enum":["avg","min","max","sum","stddev","majority","area"],"type":"string"},"aggregate_by":{"description":"A band id such as `band:1` or the styled index band `index:0`.","type":"string"},"format":{"description":"numbrojs format object. See the [numbrojs format documentation](https://numbrojs.com/format.html)."}},"required":["aggregate","aggregate_by"],"title":"Aggregate","type":"object"},"id":{"description":"Server-assigned component id.","type":"string"},"layer_id":{"description":"The layer this component is bound to.","type":"string"},"layer_type":{"description":"The kind of layer this component is attached to.","enum":["raster"],"type":"string"},"title":{"description":"Display title.","type":"string"},"type":{"description":"The component type. Immutable after creation.","enum":["statistic"],"type":"string"}},"required":["type","layer_type","data","config","id","layer_id"],"title":"Raster statistic","type":"object"},{"additionalProperties":false,"description":"Distribution of a band's pixels across bins, each bin shown as a percentage of all pixels.","properties":{"config":{"additionalProperties":false,"default":{"reactive":true,"viewport_mode":"global"},"description":"Component configuration.","properties":{"reactive":{"default":true,"description":"Whether this component reacts to other components' selections, filtering its result to match.","type":"boolean"},"selection":{"description":"Selected values of `data.group_by`. The visualized map layer and other components are filtered to match. Uses the same format as the [FSL filters block](https://developers.felt.com/felt-style-language/style-definition-blocks/the-filters-block)."},"viewport_mode":{"default":"global","description":"Compute over the whole layer (`global`) or only the features in the current viewport (`viewport`).","enum":["global","viewport"],"type":"string"}},"required":["reactive","viewport_mode"],"type":"object"},"data":{"additionalProperties":false,"properties":{"format":{"description":"numbrojs format object. See the [numbrojs format documentation](https://numbrojs.com/format.html)."},"group_by":{"description":"A band id such as `band:1` or the styled index band `index:0`.","type":"string"},"grouping":{"additionalProperties":false,"description":"How the attribute's values are binned.","properties":{"steps":{"additionalProperties":false,"properties":{"count":{"description":"Number of equal-width bins across the attribute's range.","exclusiveMinimum":true,"maximum":9007199254740991,"minimum":0,"type":"integer"},"type":{"enum":["equal-intervals"],"type":"string"}},"required":["type","count"],"type":"object"},"type":{"enum":["numeric"],"type":"string"}},"required":["type","steps"],"type":"object"}},"required":["group_by","grouping"],"title":"Raster band distribution","type":"object"},"id":{"description":"Server-assigned component id.","type":"string"},"layer_id":{"description":"The layer this component is bound to.","type":"string"},"layer_type":{"description":"The kind of layer this component is attached to.","enum":["raster"],"type":"string"},"title":{"description":"Display title.","type":"string"},"type":{"description":"The component type. Immutable after creation.","enum":["histogram"],"type":"string"}},"required":["type","layer_type","data","config","id","layer_id"],"title":"Raster histogram","type":"object"},{"additionalProperties":false,"description":"A band's pixel distribution as a smoothed line.","properties":{"config":{"additionalProperties":false,"default":{"reactive":true,"viewport_mode":"global"},"description":"Component configuration.","properties":{"reactive":{"default":true,"description":"Whether this component reacts to other components' selections, filtering its result to match.","type":"boolean"},"selection":{"description":"Selected values of `data.domain`. The visualized map layer and other components are filtered to match. Uses the same format as the [FSL filters block](https://developers.felt.com/felt-style-language/style-definition-blocks/the-filters-block)."},"viewport_mode":{"default":"global","description":"Compute over the whole layer (`global`) or only the features in the current viewport (`viewport`).","enum":["global","viewport"],"type":"string"}},"required":["reactive","viewport_mode"],"type":"object"},"data":{"additionalProperties":false,"properties":{"domain":{"description":"The band whose pixels are charted.","type":"string"},"format":{"description":"numbrojs format object. See the [numbrojs format documentation](https://numbrojs.com/format.html)."}},"required":["domain"],"type":"object"},"id":{"description":"Server-assigned component id.","type":"string"},"layer_id":{"description":"The layer this component is bound to.","type":"string"},"layer_type":{"description":"The kind of layer this component is attached to.","enum":["raster"],"type":"string"},"title":{"description":"Display title.","type":"string"},"type":{"description":"The component type. Immutable after creation.","enum":["line_chart"],"type":"string"}},"required":["type","layer_type","data","config","id","layer_id"],"title":"Raster line chart","type":"object"},{"additionalProperties":false,"description":"A categorical band's values or the style's classes as a bar chart.","properties":{"config":{"additionalProperties":false,"default":{"reactive":true,"viewport_mode":"global"},"description":"Component configuration.","properties":{"reactive":{"default":true,"description":"Whether this component reacts to other components' selections, filtering its result to match.","type":"boolean"},"selection":{"description":"Selected values of `data.group_by`. The visualized map layer and other components are filtered to match. Uses the same format as the [FSL filters block](https://developers.felt.com/felt-style-language/style-definition-blocks/the-filters-block)."},"viewport_mode":{"default":"global","description":"Compute over the whole layer (`global`) or only the features in the current viewport (`viewport`).","enum":["global","viewport"],"type":"string"}},"required":["reactive","viewport_mode"],"type":"object"},"data":{"additionalProperties":false,"properties":{"group_by":{"description":"A band id such as `band:1` or the styled index band `index:0`.","type":"string"}},"required":["group_by"],"title":"Raster categories","type":"object"},"id":{"description":"Server-assigned component id.","type":"string"},"layer_id":{"description":"The layer this component is bound to.","type":"string"},"layer_type":{"description":"The kind of layer this component is attached to.","enum":["raster"],"type":"string"},"title":{"description":"Display title.","type":"string"},"type":{"description":"The component type. Immutable after creation.","enum":["bar_chart"],"type":"string"}},"required":["type","layer_type","data","config","id","layer_id"],"title":"Raster bar chart","type":"object"},{"additionalProperties":false,"description":"A slider or dropdown filtering the layer by a band.","properties":{"config":{"additionalProperties":false,"default":{},"description":"Component configuration.","properties":{"control_type":{"description":"The type of rendered interactive component. A `dropdown` lists the band's values, so it needs a categorical band. Defaults to the band's control: `dropdown` for a categorical band, `slider` otherwise.","enum":["dropdown","slider"],"type":"string"},"plurality":{"description":"Whether the `dropdown` allows filtering on multiple values or just one.","enum":["single","multiple"],"type":"string"},"selection":{"description":"Selected values of `data.filter_by`. The visualized map layer and other components are filtered to match. Uses the same format as the [FSL filters block](https://developers.felt.com/felt-style-language/style-definition-blocks/the-filters-block)."},"sorting":{"description":"The rendered order of `dropdown` options.","enum":["Alphabetically","By feature count"],"type":"string"}},"type":"object"},"data":{"additionalProperties":false,"properties":{"filter_by":{"description":"A band id such as `band:1`.","type":"string"}},"required":["filter_by"],"title":"Raster band filter","type":"object"},"id":{"description":"Server-assigned component id.","type":"string"},"layer_id":{"description":"The layer this component is bound to.","type":"string"},"layer_type":{"description":"The kind of layer this component is attached to.","enum":["raster"],"type":"string"},"title":{"description":"Display title. Defaults to the band's name.","type":"string"},"type":{"description":"The component type. Immutable after creation.","enum":["filter"],"type":"string"}},"required":["type","layer_type","data","config","id","layer_id"],"title":"Raster filter","type":"object"}]}],"title":"LayerComponent"},"UnauthorizedError":{"properties":{"errors":{"items":{"properties":{"detail":{"type":"string"},"source":{"properties":{"header":{"enum":["authorization"],"type":"string"}},"type":"object"},"title":{"type":"string"}},"type":"object"},"type":"array"}},"title":"UnauthorizedError","type":"object"},"NotFoundError":{"properties":{"errors":{"items":{"properties":{"detail":{"type":"string"},"source":{"properties":{"parameter":{"type":"string"}},"type":"object"},"title":{"type":"string"}},"type":"object"},"type":"array"}},"title":"NotFoundError","type":"object"},"JsonErrorResponse":{"properties":{"errors":{"items":{"properties":{"detail":{"type":"string"},"source":{"properties":{"pointer":{"type":"string"}},"required":["pointer"],"type":"object"},"title":{"type":"string"}},"required":["title","source","detail"],"type":"object"},"type":"array"}},"required":["errors"],"title":"JsonErrorResponse","type":"object"},"InternalServerError":{"properties":{"errors":{"items":{"properties":{"detail":{"type":"string"},"source":{"properties":{"parameter":{"type":"string"}},"type":"object"},"title":{"type":"string"}},"type":"object"},"type":"array"}},"title":"InternalServerError","type":"object"}}},"paths":{"/api/v2/maps/{map_id}/layers/{layer_id}/components":{"get":{"callbacks":{},"description":"Returns all components on a layer, ordered as they appear in the app.\n","operationId":"list_layer_components","parameters":[{"description":"The ID of the map the layer belongs to.","in":"path","name":"map_id","required":true,"schema":{"type":"string"}},{"description":"The ID of the layer the components belong to.","in":"path","name":"layer_id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LayerComponentList"}}},"description":"Layer components list"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}},"description":"UnauthorizedError"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}},"description":"UnauthorizedError"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}},"description":"NotFoundError"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/JsonErrorResponse"}}},"description":"Unprocessable Entity"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/JsonErrorResponse"}}},"description":"Unprocessable Entity"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerError"}}},"description":"InternalServerError"}},"summary":"List layer components","tags":["Layer Components"]}}}}
```

## Create layer component

> Creates a component on a layer.\
> \
> {% hint style="info" %}\
> The component type is set at creation and cannot be changed later.\
> {% endhint %}<br>

```json
{"openapi":"3.0.0","info":{"title":"Felt","version":"2.0"},"tags":[{"description":"With these APIs, you can create and edit a layer's components.\n","name":"Layer Components"}],"servers":[{"url":"https://felt.com","variables":{}}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"bearerFormat":"YOUR_API_KEY","scheme":"bearer","type":"http"}},"schemas":{"LayerComponentCreateParams":{"anyOf":[{"anyOf":[{"description":"A single statistic over the layer's features.","properties":{"config":{"default":{"reactive":true,"viewport_mode":"global"},"description":"Component configuration.","properties":{"reactive":{"default":true,"description":"Whether this component reacts to other components' selections, filtering its result to match.","type":"boolean"},"viewport_mode":{"default":"global","description":"Compute over the whole layer (`global`) or only the features in the current viewport (`viewport`).","enum":["global","viewport"],"type":"string"}},"type":"object"},"data":{"anyOf":[{"properties":{"aggregate":{"description":"Count features.","enum":["count"],"type":"string"},"format":{"description":"numbrojs format object. See the [numbrojs format documentation](https://numbrojs.com/format.html)."}},"required":["aggregate"],"title":"Feature count","type":"object"},{"properties":{"aggregate":{"description":"The statistic to compute over `aggregate_by`.","enum":["sum","avg","min","max","median","count_distinct"],"type":"string"},"aggregate_by":{"description":"Attribute to aggregate.","type":"string"},"format":{"description":"numbrojs format object. See the [numbrojs format documentation](https://numbrojs.com/format.html)."}},"required":["aggregate","aggregate_by"],"title":"Aggregate","type":"object"}],"description":"How the statistic is computed."},"layer_type":{"default":"vector","description":"The kind of layer this component is attached to.","enum":["vector"],"type":"string"},"title":{"description":"Display title.","type":"string"},"type":{"description":"The component type. Immutable after creation.","enum":["statistic"],"type":"string"}},"required":["type","data"],"title":"Vector statistic","type":"object"},{"description":"Distribution of a numeric attribute across bins.","properties":{"config":{"default":{"reactive":true,"viewport_mode":"global"},"description":"Component configuration.","properties":{"reactive":{"default":true,"description":"Whether this component reacts to other components' selections, filtering its result to match.","type":"boolean"},"selection":{"description":"Selected values of `data.group_by`. The visualized map layer and other components are filtered to match. Uses the same format as the [FSL filters block](https://developers.felt.com/felt-style-language/style-definition-blocks/the-filters-block)."},"viewport_mode":{"default":"global","description":"Compute over the whole layer (`global`) or only the features in the current viewport (`viewport`).","enum":["global","viewport"],"type":"string"}},"type":"object"},"data":{"anyOf":[{"properties":{"aggregate":{"description":"Count features.","enum":["count"],"type":"string"},"format":{"description":"numbrojs format object. See the [numbrojs format documentation](https://numbrojs.com/format.html)."},"group_by":{"description":"Numeric attribute to bin into the distribution.","type":"string"},"grouping":{"description":"A suggestion on how the attribute's values are binned. The result may be different to better fit an attribute's range.","properties":{"steps":{"properties":{"count":{"description":"Number of equal-width bins across the attribute's range.","exclusiveMinimum":true,"maximum":9007199254740991,"minimum":0,"type":"integer"},"type":{"enum":["equal-intervals"],"type":"string"}},"required":["type","count"],"type":"object"},"type":{"enum":["numeric"],"type":"string"}},"required":["type","steps"],"type":"object"}},"required":["aggregate","group_by"],"title":"Feature count","type":"object"},{"properties":{"aggregate":{"description":"The statistic to compute over `aggregate_by`.","enum":["sum","avg","min","max","median","count_distinct"],"type":"string"},"aggregate_by":{"description":"Attribute to aggregate.","type":"string"},"format":{"description":"numbrojs format object. See the [numbrojs format documentation](https://numbrojs.com/format.html)."},"group_by":{"description":"Numeric attribute to bin into the distribution.","type":"string"},"grouping":{"description":"A suggestion on how the attribute's values are binned. The result may be different to better fit an attribute's range.","properties":{"steps":{"properties":{"count":{"description":"Number of equal-width bins across the attribute's range.","exclusiveMinimum":true,"maximum":9007199254740991,"minimum":0,"type":"integer"},"type":{"enum":["equal-intervals"],"type":"string"}},"required":["type","count"],"type":"object"},"type":{"enum":["numeric"],"type":"string"}},"required":["type","steps"],"type":"object"}},"required":["aggregate","aggregate_by","group_by"],"title":"Aggregate","type":"object"}],"description":"How to compute the histogram distribution."},"layer_type":{"default":"vector","description":"The kind of layer this component is attached to.","enum":["vector"],"type":"string"},"title":{"description":"Display title.","type":"string"},"type":{"description":"The component type. Immutable after creation.","enum":["histogram"],"type":"string"}},"required":["type","data"],"title":"Vector histogram","type":"object"},{"description":"An attribute's distribution as a smoothed line.","properties":{"config":{"default":{"reactive":true,"viewport_mode":"global"},"description":"Component configuration.","properties":{"reactive":{"default":true,"description":"Whether this component reacts to other components' selections, filtering its result to match.","type":"boolean"},"selection":{"description":"Selected values of `data.domain`. The visualized map layer and other components are filtered to match. Uses the same format as the [FSL filters block](https://developers.felt.com/felt-style-language/style-definition-blocks/the-filters-block)."},"viewport_mode":{"default":"global","description":"Compute over the whole layer (`global`) or only the features in the current viewport (`viewport`).","enum":["global","viewport"],"type":"string"}},"type":"object"},"data":{"anyOf":[{"properties":{"aggregate":{"description":"Count features.","enum":["count"],"type":"string"},"domain":{"description":"Numeric attribute the line is plotted against — the horizontal axis.","type":"string"},"format":{"description":"numbrojs format object. See the [numbrojs format documentation](https://numbrojs.com/format.html)."}},"required":["aggregate","domain"],"title":"Feature count","type":"object"},{"properties":{"aggregate":{"description":"The statistic to compute over `aggregate_by`.","enum":["sum","avg","min","max","median","count_distinct"],"type":"string"},"aggregate_by":{"description":"Attribute to aggregate.","type":"string"},"domain":{"description":"Numeric attribute the line is plotted against — the horizontal axis.","type":"string"},"format":{"description":"numbrojs format object. See the [numbrojs format documentation](https://numbrojs.com/format.html)."}},"required":["aggregate","aggregate_by","domain"],"title":"Aggregate","type":"object"}],"description":"How to compute the line's distribution."},"layer_type":{"default":"vector","description":"The kind of layer this component is attached to.","enum":["vector"],"type":"string"},"title":{"description":"Display title.","type":"string"},"type":{"description":"The component type. Immutable after creation.","enum":["line_chart"],"type":"string"}},"required":["type","data"],"title":"Vector line chart","type":"object"},{"description":"An attribute's categories as a bar chart.","properties":{"config":{"default":{"reactive":true,"viewport_mode":"global"},"description":"Component configuration.","properties":{"reactive":{"default":true,"description":"Whether this component reacts to other components' selections, filtering its result to match.","type":"boolean"},"selection":{"description":"Selected values of `data.group_by`. The visualized map layer and other components are filtered to match. Uses the same format as the [FSL filters block](https://developers.felt.com/felt-style-language/style-definition-blocks/the-filters-block)."},"viewport_mode":{"default":"global","description":"Compute over the whole layer (`global`) or only the features in the current viewport (`viewport`).","enum":["global","viewport"],"type":"string"}},"type":"object"},"data":{"anyOf":[{"properties":{"aggregate":{"description":"Count features.","enum":["count"],"type":"string"},"format":{"description":"numbrojs format object. See the [numbrojs format documentation](https://numbrojs.com/format.html)."},"group_by":{"description":"Attribute whose values become the categories.","type":"string"}},"required":["aggregate","group_by"],"title":"Feature count","type":"object"},{"properties":{"aggregate":{"description":"The statistic to compute over `aggregate_by`.","enum":["sum","avg","min","max","median","count_distinct"],"type":"string"},"aggregate_by":{"description":"Attribute to aggregate.","type":"string"},"format":{"description":"numbrojs format object. See the [numbrojs format documentation](https://numbrojs.com/format.html)."},"group_by":{"description":"Attribute whose values become the categories.","type":"string"}},"required":["aggregate","aggregate_by","group_by"],"title":"Aggregate","type":"object"}],"description":"How to compute the resulting categories."},"layer_type":{"default":"vector","description":"The kind of layer this component is attached to.","enum":["vector"],"type":"string"},"title":{"description":"Display title.","type":"string"},"type":{"description":"The component type. Immutable after creation.","enum":["bar_chart"],"type":"string"}},"required":["type","data"],"title":"Vector bar chart","type":"object"},{"description":"Charts a statistic over time buckets of a date attribute.","properties":{"config":{"default":{"reactive":true,"viewport_mode":"global"},"description":"Component configuration.","properties":{"reactive":{"default":true,"description":"Whether this component reacts to other components' selections, filtering its result to match.","type":"boolean"},"selection":{"description":"Selected values of `data.group_by`. The visualized map layer and other components are filtered to match. Uses the same format as the [FSL filters block](https://developers.felt.com/felt-style-language/style-definition-blocks/the-filters-block)."},"viewport_mode":{"default":"global","description":"Compute over the whole layer (`global`) or only the features in the current viewport (`viewport`).","enum":["global","viewport"],"type":"string"}},"type":"object"},"data":{"anyOf":[{"properties":{"aggregate":{"description":"Count features.","enum":["count"],"type":"string"},"format":{"description":"numbrojs format object. See the [numbrojs format documentation](https://numbrojs.com/format.html)."},"group_by":{"description":"Date or datetime attribute which drives the time axis.","type":"string"},"grouping":{"description":"Time bucket per data point.","properties":{"interval":{"enum":["hour","day","week","month","year"],"type":"string"},"type":{"enum":["time-interval"],"type":"string"}},"required":["type","interval"],"type":"object"}},"required":["aggregate","group_by"],"title":"Feature count","type":"object"},{"properties":{"aggregate":{"description":"The statistic to compute over `aggregate_by`.","enum":["sum","avg","min","max","median","count_distinct"],"type":"string"},"aggregate_by":{"description":"Attribute to aggregate.","type":"string"},"format":{"description":"numbrojs format object. See the [numbrojs format documentation](https://numbrojs.com/format.html)."},"group_by":{"description":"Date or datetime attribute which drives the time axis.","type":"string"},"grouping":{"description":"Time bucket per data point.","properties":{"interval":{"enum":["hour","day","week","month","year"],"type":"string"},"type":{"enum":["time-interval"],"type":"string"}},"required":["type","interval"],"type":"object"}},"required":["aggregate","aggregate_by","group_by"],"title":"Aggregate","type":"object"}],"description":"How to aggregate the chosen attribute into a time series."},"layer_type":{"default":"vector","description":"The kind of layer this component is attached to.","enum":["vector"],"type":"string"},"title":{"description":"Display title.","type":"string"},"type":{"description":"The component type. Immutable after creation.","enum":["time_series"],"type":"string"}},"required":["type","data"],"title":"Vector time series","type":"object"},{"description":"A dropdown or slider filtering the layer by an attribute.","properties":{"config":{"default":{"control_type":"dropdown"},"description":"Component configuration.","properties":{"control_type":{"default":"dropdown","description":"The type of rendered interactive component. `slider` only works with numeric attributes.","enum":["dropdown","slider"],"type":"string"},"plurality":{"description":"Whether the `dropdown` allows filtering on multiple values or just one.","enum":["single","multiple"],"type":"string"},"selection":{"description":"Selected values of `data.filter_by`. The visualized map layer and other components are filtered to match. Uses the same format as the [FSL filters block](https://developers.felt.com/felt-style-language/style-definition-blocks/the-filters-block)."},"sorting":{"description":"The rendered order of `dropdown` options.","enum":["Alphabetically","By feature count"],"type":"string"}},"type":"object"},"data":{"description":"The attribute which the interactive component filters on.","properties":{"filter_by":{"description":"Attribute to filter values from.","type":"string"}},"required":["filter_by"],"type":"object"},"layer_type":{"default":"vector","description":"The kind of layer this component is attached to.","enum":["vector"],"type":"string"},"title":{"description":"Display title. Defaults to `data.filter_by`.","type":"string"},"type":{"description":"The component type. Immutable after creation.","enum":["filter"],"type":"string"}},"required":["type","data"],"title":"Vector filter","type":"object"}]},{"anyOf":[{"description":"A single statistic over a band's pixels.","properties":{"config":{"default":{"reactive":true,"viewport_mode":"global"},"description":"Component configuration.","properties":{"reactive":{"default":true,"description":"Whether this component reacts to other components' selections, filtering its result to match.","type":"boolean"},"viewport_mode":{"default":"global","description":"Compute over the whole layer (`global`) or only the features in the current viewport (`viewport`).","enum":["global","viewport"],"type":"string"}},"type":"object"},"data":{"description":"How the statistic is computed over a band.","properties":{"aggregate":{"description":"The statistic to compute over `aggregate_by`.","enum":["avg","min","max","sum","stddev","majority","area"],"type":"string"},"aggregate_by":{"description":"A band id such as `band:1` or the styled index band `index:0`.","type":"string"},"format":{"description":"numbrojs format object. See the [numbrojs format documentation](https://numbrojs.com/format.html)."}},"required":["aggregate","aggregate_by"],"title":"Aggregate","type":"object"},"layer_type":{"description":"The kind of layer this component is attached to.","enum":["raster"],"type":"string"},"title":{"description":"Display title.","type":"string"},"type":{"description":"The component type. Immutable after creation.","enum":["statistic"],"type":"string"}},"required":["type","layer_type","data"],"title":"Raster statistic","type":"object"},{"description":"Distribution of a band's pixels across bins, each bin shown as a percentage of all pixels.","properties":{"config":{"default":{"reactive":true,"viewport_mode":"global"},"description":"Component configuration.","properties":{"reactive":{"default":true,"description":"Whether this component reacts to other components' selections, filtering its result to match.","type":"boolean"},"selection":{"description":"Selected values of `data.group_by`. The visualized map layer and other components are filtered to match. Uses the same format as the [FSL filters block](https://developers.felt.com/felt-style-language/style-definition-blocks/the-filters-block)."},"viewport_mode":{"default":"global","description":"Compute over the whole layer (`global`) or only the features in the current viewport (`viewport`).","enum":["global","viewport"],"type":"string"}},"type":"object"},"data":{"description":"Which band's pixels to bin.","properties":{"format":{"description":"numbrojs format object. See the [numbrojs format documentation](https://numbrojs.com/format.html)."},"group_by":{"description":"A band id such as `band:1` or the styled index band `index:0`.","type":"string"},"grouping":{"description":"A suggestion on how the attribute's values are binned. The result may be different to better fit an attribute's range.","properties":{"steps":{"properties":{"count":{"description":"Number of equal-width bins across the attribute's range.","exclusiveMinimum":true,"maximum":9007199254740991,"minimum":0,"type":"integer"},"type":{"enum":["equal-intervals"],"type":"string"}},"required":["type","count"],"type":"object"},"type":{"enum":["numeric"],"type":"string"}},"required":["type","steps"],"type":"object"}},"required":["group_by"],"title":"Raster band distribution","type":"object"},"layer_type":{"description":"The kind of layer this component is attached to.","enum":["raster"],"type":"string"},"title":{"description":"Display title.","type":"string"},"type":{"description":"The component type. Immutable after creation.","enum":["histogram"],"type":"string"}},"required":["type","layer_type","data"],"title":"Raster histogram","type":"object"},{"description":"A band's pixel distribution as a smoothed line.","properties":{"config":{"default":{"reactive":true,"viewport_mode":"global"},"description":"Component configuration.","properties":{"reactive":{"default":true,"description":"Whether this component reacts to other components' selections, filtering its result to match.","type":"boolean"},"selection":{"description":"Selected values of `data.domain`. The visualized map layer and other components are filtered to match. Uses the same format as the [FSL filters block](https://developers.felt.com/felt-style-language/style-definition-blocks/the-filters-block)."},"viewport_mode":{"default":"global","description":"Compute over the whole layer (`global`) or only the features in the current viewport (`viewport`).","enum":["global","viewport"],"type":"string"}},"type":"object"},"data":{"description":"Which band's pixels to chart.","properties":{"domain":{"description":"The band whose pixels are charted.","type":"string"},"format":{"description":"numbrojs format object. See the [numbrojs format documentation](https://numbrojs.com/format.html)."}},"required":["domain"],"type":"object"},"layer_type":{"description":"The kind of layer this component is attached to.","enum":["raster"],"type":"string"},"title":{"description":"Display title.","type":"string"},"type":{"description":"The component type. Immutable after creation.","enum":["line_chart"],"type":"string"}},"required":["type","layer_type","data"],"title":"Raster line chart","type":"object"},{"description":"A categorical band's values or the style's classes as a bar chart.","properties":{"config":{"default":{"reactive":true,"viewport_mode":"global"},"description":"Component configuration.","properties":{"reactive":{"default":true,"description":"Whether this component reacts to other components' selections, filtering its result to match.","type":"boolean"},"selection":{"description":"Selected values of `data.group_by`. The visualized map layer and other components are filtered to match. Uses the same format as the [FSL filters block](https://developers.felt.com/felt-style-language/style-definition-blocks/the-filters-block)."},"viewport_mode":{"default":"global","description":"Compute over the whole layer (`global`) or only the features in the current viewport (`viewport`).","enum":["global","viewport"],"type":"string"}},"type":"object"},"data":{"description":"The band whose values become the categories.","properties":{"group_by":{"description":"A band id such as `band:1` or the styled index band `index:0`.","type":"string"}},"required":["group_by"],"title":"Raster categories","type":"object"},"layer_type":{"description":"The kind of layer this component is attached to.","enum":["raster"],"type":"string"},"title":{"description":"Display title.","type":"string"},"type":{"description":"The component type. Immutable after creation.","enum":["bar_chart"],"type":"string"}},"required":["type","layer_type","data"],"title":"Raster bar chart","type":"object"},{"description":"A slider or dropdown filtering the layer by a band.","properties":{"config":{"default":{},"description":"Component configuration.","properties":{"control_type":{"description":"The type of rendered interactive component. A `dropdown` lists the band's values, so it needs a categorical band. Defaults to the band's control: `dropdown` for a categorical band, `slider` otherwise.","enum":["dropdown","slider"],"type":"string"},"plurality":{"description":"Whether the `dropdown` allows filtering on multiple values or just one.","enum":["single","multiple"],"type":"string"},"selection":{"description":"Selected values of `data.filter_by`. The visualized map layer and other components are filtered to match. Uses the same format as the [FSL filters block](https://developers.felt.com/felt-style-language/style-definition-blocks/the-filters-block)."},"sorting":{"description":"The rendered order of `dropdown` options.","enum":["Alphabetically","By feature count"],"type":"string"}},"type":"object"},"data":{"description":"The band which the interactive component filters on.","properties":{"filter_by":{"description":"A band id such as `band:1`.","type":"string"}},"required":["filter_by"],"title":"Raster band filter","type":"object"},"layer_type":{"description":"The kind of layer this component is attached to.","enum":["raster"],"type":"string"},"title":{"description":"Display title. Defaults to the band's name.","type":"string"},"type":{"description":"The component type. Immutable after creation.","enum":["filter"],"type":"string"}},"required":["type","layer_type","data"],"title":"Raster filter","type":"object"}]}],"title":"LayerComponentCreateParams"},"LayerComponent":{"anyOf":[{"anyOf":[{"additionalProperties":false,"description":"A single statistic over the layer's features.","properties":{"config":{"additionalProperties":false,"default":{"reactive":true,"viewport_mode":"global"},"description":"Component configuration.","properties":{"reactive":{"default":true,"description":"Whether this component reacts to other components' selections, filtering its result to match.","type":"boolean"},"viewport_mode":{"default":"global","description":"Compute over the whole layer (`global`) or only the features in the current viewport (`viewport`).","enum":["global","viewport"],"type":"string"}},"required":["reactive","viewport_mode"],"type":"object"},"data":{"anyOf":[{"additionalProperties":false,"properties":{"aggregate":{"description":"Count features.","enum":["count"],"type":"string"},"format":{"description":"numbrojs format object. See the [numbrojs format documentation](https://numbrojs.com/format.html)."}},"required":["aggregate"],"title":"Feature count","type":"object"},{"additionalProperties":false,"properties":{"aggregate":{"description":"The statistic to compute over `aggregate_by`.","enum":["sum","avg","min","max","median","count_distinct"],"type":"string"},"aggregate_by":{"description":"Attribute to aggregate.","type":"string"},"format":{"description":"numbrojs format object. See the [numbrojs format documentation](https://numbrojs.com/format.html)."}},"required":["aggregate","aggregate_by"],"title":"Aggregate","type":"object"}]},"id":{"description":"Server-assigned component id.","type":"string"},"layer_id":{"description":"The layer this component is bound to.","type":"string"},"layer_type":{"description":"The kind of layer this component is attached to.","enum":["vector"],"type":"string"},"title":{"description":"Display title.","type":"string"},"type":{"description":"The component type. Immutable after creation.","enum":["statistic"],"type":"string"}},"required":["type","layer_type","data","config","id","layer_id"],"title":"Vector statistic","type":"object"},{"additionalProperties":false,"description":"Distribution of a numeric attribute across bins.","properties":{"config":{"additionalProperties":false,"default":{"reactive":true,"viewport_mode":"global"},"description":"Component configuration.","properties":{"reactive":{"default":true,"description":"Whether this component reacts to other components' selections, filtering its result to match.","type":"boolean"},"selection":{"description":"Selected values of `data.group_by`. The visualized map layer and other components are filtered to match. Uses the same format as the [FSL filters block](https://developers.felt.com/felt-style-language/style-definition-blocks/the-filters-block)."},"viewport_mode":{"default":"global","description":"Compute over the whole layer (`global`) or only the features in the current viewport (`viewport`).","enum":["global","viewport"],"type":"string"}},"required":["reactive","viewport_mode"],"type":"object"},"data":{"anyOf":[{"additionalProperties":false,"properties":{"aggregate":{"description":"Count features.","enum":["count"],"type":"string"},"format":{"description":"numbrojs format object. See the [numbrojs format documentation](https://numbrojs.com/format.html)."},"group_by":{"description":"Numeric attribute to bin into the distribution.","type":"string"},"grouping":{"additionalProperties":false,"description":"How the attribute's values are binned.","properties":{"steps":{"additionalProperties":false,"properties":{"count":{"description":"Number of equal-width bins across the attribute's range.","exclusiveMinimum":true,"maximum":9007199254740991,"minimum":0,"type":"integer"},"type":{"enum":["equal-intervals"],"type":"string"}},"required":["type","count"],"type":"object"},"type":{"enum":["numeric"],"type":"string"}},"required":["type","steps"],"type":"object"}},"required":["aggregate","group_by","grouping"],"title":"Feature count","type":"object"},{"additionalProperties":false,"properties":{"aggregate":{"description":"The statistic to compute over `aggregate_by`.","enum":["sum","avg","min","max","median","count_distinct"],"type":"string"},"aggregate_by":{"description":"Attribute to aggregate.","type":"string"},"format":{"description":"numbrojs format object. See the [numbrojs format documentation](https://numbrojs.com/format.html)."},"group_by":{"description":"Numeric attribute to bin into the distribution.","type":"string"},"grouping":{"additionalProperties":false,"description":"How the attribute's values are binned.","properties":{"steps":{"additionalProperties":false,"properties":{"count":{"description":"Number of equal-width bins across the attribute's range.","exclusiveMinimum":true,"maximum":9007199254740991,"minimum":0,"type":"integer"},"type":{"enum":["equal-intervals"],"type":"string"}},"required":["type","count"],"type":"object"},"type":{"enum":["numeric"],"type":"string"}},"required":["type","steps"],"type":"object"}},"required":["aggregate","aggregate_by","group_by","grouping"],"title":"Aggregate","type":"object"}]},"id":{"description":"Server-assigned component id.","type":"string"},"layer_id":{"description":"The layer this component is bound to.","type":"string"},"layer_type":{"description":"The kind of layer this component is attached to.","enum":["vector"],"type":"string"},"title":{"description":"Display title.","type":"string"},"type":{"description":"The component type. Immutable after creation.","enum":["histogram"],"type":"string"}},"required":["type","layer_type","data","config","id","layer_id"],"title":"Vector histogram","type":"object"},{"additionalProperties":false,"description":"An attribute's distribution as a smoothed line.","properties":{"config":{"additionalProperties":false,"default":{"reactive":true,"viewport_mode":"global"},"description":"Component configuration.","properties":{"reactive":{"default":true,"description":"Whether this component reacts to other components' selections, filtering its result to match.","type":"boolean"},"selection":{"description":"Selected values of `data.domain`. The visualized map layer and other components are filtered to match. Uses the same format as the [FSL filters block](https://developers.felt.com/felt-style-language/style-definition-blocks/the-filters-block)."},"viewport_mode":{"default":"global","description":"Compute over the whole layer (`global`) or only the features in the current viewport (`viewport`).","enum":["global","viewport"],"type":"string"}},"required":["reactive","viewport_mode"],"type":"object"},"data":{"anyOf":[{"additionalProperties":false,"properties":{"aggregate":{"description":"Count features.","enum":["count"],"type":"string"},"domain":{"description":"Numeric attribute the line is plotted against — the horizontal axis.","type":"string"},"format":{"description":"numbrojs format object. See the [numbrojs format documentation](https://numbrojs.com/format.html)."}},"required":["aggregate","domain"],"title":"Feature count","type":"object"},{"additionalProperties":false,"properties":{"aggregate":{"description":"The statistic to compute over `aggregate_by`.","enum":["sum","avg","min","max","median","count_distinct"],"type":"string"},"aggregate_by":{"description":"Attribute to aggregate.","type":"string"},"domain":{"description":"Numeric attribute the line is plotted against — the horizontal axis.","type":"string"},"format":{"description":"numbrojs format object. See the [numbrojs format documentation](https://numbrojs.com/format.html)."}},"required":["aggregate","aggregate_by","domain"],"title":"Aggregate","type":"object"}]},"id":{"description":"Server-assigned component id.","type":"string"},"layer_id":{"description":"The layer this component is bound to.","type":"string"},"layer_type":{"description":"The kind of layer this component is attached to.","enum":["vector"],"type":"string"},"title":{"description":"Display title.","type":"string"},"type":{"description":"The component type. Immutable after creation.","enum":["line_chart"],"type":"string"}},"required":["type","layer_type","data","config","id","layer_id"],"title":"Vector line chart","type":"object"},{"additionalProperties":false,"description":"An attribute's categories as a bar chart.","properties":{"config":{"additionalProperties":false,"default":{"reactive":true,"viewport_mode":"global"},"description":"Component configuration.","properties":{"reactive":{"default":true,"description":"Whether this component reacts to other components' selections, filtering its result to match.","type":"boolean"},"selection":{"description":"Selected values of `data.group_by`. The visualized map layer and other components are filtered to match. Uses the same format as the [FSL filters block](https://developers.felt.com/felt-style-language/style-definition-blocks/the-filters-block)."},"viewport_mode":{"default":"global","description":"Compute over the whole layer (`global`) or only the features in the current viewport (`viewport`).","enum":["global","viewport"],"type":"string"}},"required":["reactive","viewport_mode"],"type":"object"},"data":{"anyOf":[{"additionalProperties":false,"properties":{"aggregate":{"description":"Count features.","enum":["count"],"type":"string"},"format":{"description":"numbrojs format object. See the [numbrojs format documentation](https://numbrojs.com/format.html)."},"group_by":{"description":"Attribute whose values become the categories.","type":"string"}},"required":["aggregate","group_by"],"title":"Feature count","type":"object"},{"additionalProperties":false,"properties":{"aggregate":{"description":"The statistic to compute over `aggregate_by`.","enum":["sum","avg","min","max","median","count_distinct"],"type":"string"},"aggregate_by":{"description":"Attribute to aggregate.","type":"string"},"format":{"description":"numbrojs format object. See the [numbrojs format documentation](https://numbrojs.com/format.html)."},"group_by":{"description":"Attribute whose values become the categories.","type":"string"}},"required":["aggregate","aggregate_by","group_by"],"title":"Aggregate","type":"object"}]},"id":{"description":"Server-assigned component id.","type":"string"},"layer_id":{"description":"The layer this component is bound to.","type":"string"},"layer_type":{"description":"The kind of layer this component is attached to.","enum":["vector"],"type":"string"},"title":{"description":"Display title.","type":"string"},"type":{"description":"The component type. Immutable after creation.","enum":["bar_chart"],"type":"string"}},"required":["type","layer_type","data","config","id","layer_id"],"title":"Vector bar chart","type":"object"},{"additionalProperties":false,"description":"Charts a statistic over time buckets of a date attribute.","properties":{"config":{"additionalProperties":false,"default":{"reactive":true,"viewport_mode":"global"},"description":"Component configuration.","properties":{"reactive":{"default":true,"description":"Whether this component reacts to other components' selections, filtering its result to match.","type":"boolean"},"selection":{"description":"Selected values of `data.group_by`. The visualized map layer and other components are filtered to match. Uses the same format as the [FSL filters block](https://developers.felt.com/felt-style-language/style-definition-blocks/the-filters-block)."},"viewport_mode":{"default":"global","description":"Compute over the whole layer (`global`) or only the features in the current viewport (`viewport`).","enum":["global","viewport"],"type":"string"}},"required":["reactive","viewport_mode"],"type":"object"},"data":{"anyOf":[{"additionalProperties":false,"properties":{"aggregate":{"description":"Count features.","enum":["count"],"type":"string"},"format":{"description":"numbrojs format object. See the [numbrojs format documentation](https://numbrojs.com/format.html)."},"group_by":{"description":"Date or datetime attribute which drives the time axis.","type":"string"},"grouping":{"additionalProperties":false,"description":"Time bucket per data point.","properties":{"interval":{"enum":["hour","day","week","month","year"],"type":"string"},"type":{"enum":["time-interval"],"type":"string"}},"required":["type","interval"],"type":"object"}},"required":["aggregate","group_by","grouping"],"title":"Feature count","type":"object"},{"additionalProperties":false,"properties":{"aggregate":{"description":"The statistic to compute over `aggregate_by`.","enum":["sum","avg","min","max","median","count_distinct"],"type":"string"},"aggregate_by":{"description":"Attribute to aggregate.","type":"string"},"format":{"description":"numbrojs format object. See the [numbrojs format documentation](https://numbrojs.com/format.html)."},"group_by":{"description":"Date or datetime attribute which drives the time axis.","type":"string"},"grouping":{"additionalProperties":false,"description":"Time bucket per data point.","properties":{"interval":{"enum":["hour","day","week","month","year"],"type":"string"},"type":{"enum":["time-interval"],"type":"string"}},"required":["type","interval"],"type":"object"}},"required":["aggregate","aggregate_by","group_by","grouping"],"title":"Aggregate","type":"object"}]},"id":{"description":"Server-assigned component id.","type":"string"},"layer_id":{"description":"The layer this component is bound to.","type":"string"},"layer_type":{"description":"The kind of layer this component is attached to.","enum":["vector"],"type":"string"},"title":{"description":"Display title.","type":"string"},"type":{"description":"The component type. Immutable after creation.","enum":["time_series"],"type":"string"}},"required":["type","layer_type","data","config","id","layer_id"],"title":"Vector time series","type":"object"},{"additionalProperties":false,"description":"A dropdown or slider filtering the layer by an attribute.","properties":{"config":{"additionalProperties":false,"default":{"control_type":"dropdown"},"description":"Component configuration.","properties":{"control_type":{"default":"dropdown","description":"The type of rendered interactive component. `slider` only works with numeric attributes.","enum":["dropdown","slider"],"type":"string"},"plurality":{"description":"Whether the `dropdown` allows filtering on multiple values or just one.","enum":["single","multiple"],"type":"string"},"selection":{"description":"Selected values of `data.filter_by`. The visualized map layer and other components are filtered to match. Uses the same format as the [FSL filters block](https://developers.felt.com/felt-style-language/style-definition-blocks/the-filters-block)."},"sorting":{"description":"The rendered order of `dropdown` options.","enum":["Alphabetically","By feature count"],"type":"string"}},"required":["control_type"],"type":"object"},"data":{"additionalProperties":false,"properties":{"filter_by":{"description":"Attribute to filter values from.","type":"string"}},"required":["filter_by"],"type":"object"},"id":{"description":"Server-assigned component id.","type":"string"},"layer_id":{"description":"The layer this component is bound to.","type":"string"},"layer_type":{"description":"The kind of layer this component is attached to.","enum":["vector"],"type":"string"},"title":{"description":"Display title. Defaults to `data.filter_by`.","type":"string"},"type":{"description":"The component type. Immutable after creation.","enum":["filter"],"type":"string"}},"required":["type","layer_type","data","config","id","layer_id"],"title":"Vector filter","type":"object"}]},{"anyOf":[{"additionalProperties":false,"description":"A single statistic over a band's pixels.","properties":{"config":{"additionalProperties":false,"default":{"reactive":true,"viewport_mode":"global"},"description":"Component configuration.","properties":{"reactive":{"default":true,"description":"Whether this component reacts to other components' selections, filtering its result to match.","type":"boolean"},"viewport_mode":{"default":"global","description":"Compute over the whole layer (`global`) or only the features in the current viewport (`viewport`).","enum":["global","viewport"],"type":"string"}},"required":["reactive","viewport_mode"],"type":"object"},"data":{"additionalProperties":false,"properties":{"aggregate":{"description":"The statistic to compute over `aggregate_by`.","enum":["avg","min","max","sum","stddev","majority","area"],"type":"string"},"aggregate_by":{"description":"A band id such as `band:1` or the styled index band `index:0`.","type":"string"},"format":{"description":"numbrojs format object. See the [numbrojs format documentation](https://numbrojs.com/format.html)."}},"required":["aggregate","aggregate_by"],"title":"Aggregate","type":"object"},"id":{"description":"Server-assigned component id.","type":"string"},"layer_id":{"description":"The layer this component is bound to.","type":"string"},"layer_type":{"description":"The kind of layer this component is attached to.","enum":["raster"],"type":"string"},"title":{"description":"Display title.","type":"string"},"type":{"description":"The component type. Immutable after creation.","enum":["statistic"],"type":"string"}},"required":["type","layer_type","data","config","id","layer_id"],"title":"Raster statistic","type":"object"},{"additionalProperties":false,"description":"Distribution of a band's pixels across bins, each bin shown as a percentage of all pixels.","properties":{"config":{"additionalProperties":false,"default":{"reactive":true,"viewport_mode":"global"},"description":"Component configuration.","properties":{"reactive":{"default":true,"description":"Whether this component reacts to other components' selections, filtering its result to match.","type":"boolean"},"selection":{"description":"Selected values of `data.group_by`. The visualized map layer and other components are filtered to match. Uses the same format as the [FSL filters block](https://developers.felt.com/felt-style-language/style-definition-blocks/the-filters-block)."},"viewport_mode":{"default":"global","description":"Compute over the whole layer (`global`) or only the features in the current viewport (`viewport`).","enum":["global","viewport"],"type":"string"}},"required":["reactive","viewport_mode"],"type":"object"},"data":{"additionalProperties":false,"properties":{"format":{"description":"numbrojs format object. See the [numbrojs format documentation](https://numbrojs.com/format.html)."},"group_by":{"description":"A band id such as `band:1` or the styled index band `index:0`.","type":"string"},"grouping":{"additionalProperties":false,"description":"How the attribute's values are binned.","properties":{"steps":{"additionalProperties":false,"properties":{"count":{"description":"Number of equal-width bins across the attribute's range.","exclusiveMinimum":true,"maximum":9007199254740991,"minimum":0,"type":"integer"},"type":{"enum":["equal-intervals"],"type":"string"}},"required":["type","count"],"type":"object"},"type":{"enum":["numeric"],"type":"string"}},"required":["type","steps"],"type":"object"}},"required":["group_by","grouping"],"title":"Raster band distribution","type":"object"},"id":{"description":"Server-assigned component id.","type":"string"},"layer_id":{"description":"The layer this component is bound to.","type":"string"},"layer_type":{"description":"The kind of layer this component is attached to.","enum":["raster"],"type":"string"},"title":{"description":"Display title.","type":"string"},"type":{"description":"The component type. Immutable after creation.","enum":["histogram"],"type":"string"}},"required":["type","layer_type","data","config","id","layer_id"],"title":"Raster histogram","type":"object"},{"additionalProperties":false,"description":"A band's pixel distribution as a smoothed line.","properties":{"config":{"additionalProperties":false,"default":{"reactive":true,"viewport_mode":"global"},"description":"Component configuration.","properties":{"reactive":{"default":true,"description":"Whether this component reacts to other components' selections, filtering its result to match.","type":"boolean"},"selection":{"description":"Selected values of `data.domain`. The visualized map layer and other components are filtered to match. Uses the same format as the [FSL filters block](https://developers.felt.com/felt-style-language/style-definition-blocks/the-filters-block)."},"viewport_mode":{"default":"global","description":"Compute over the whole layer (`global`) or only the features in the current viewport (`viewport`).","enum":["global","viewport"],"type":"string"}},"required":["reactive","viewport_mode"],"type":"object"},"data":{"additionalProperties":false,"properties":{"domain":{"description":"The band whose pixels are charted.","type":"string"},"format":{"description":"numbrojs format object. See the [numbrojs format documentation](https://numbrojs.com/format.html)."}},"required":["domain"],"type":"object"},"id":{"description":"Server-assigned component id.","type":"string"},"layer_id":{"description":"The layer this component is bound to.","type":"string"},"layer_type":{"description":"The kind of layer this component is attached to.","enum":["raster"],"type":"string"},"title":{"description":"Display title.","type":"string"},"type":{"description":"The component type. Immutable after creation.","enum":["line_chart"],"type":"string"}},"required":["type","layer_type","data","config","id","layer_id"],"title":"Raster line chart","type":"object"},{"additionalProperties":false,"description":"A categorical band's values or the style's classes as a bar chart.","properties":{"config":{"additionalProperties":false,"default":{"reactive":true,"viewport_mode":"global"},"description":"Component configuration.","properties":{"reactive":{"default":true,"description":"Whether this component reacts to other components' selections, filtering its result to match.","type":"boolean"},"selection":{"description":"Selected values of `data.group_by`. The visualized map layer and other components are filtered to match. Uses the same format as the [FSL filters block](https://developers.felt.com/felt-style-language/style-definition-blocks/the-filters-block)."},"viewport_mode":{"default":"global","description":"Compute over the whole layer (`global`) or only the features in the current viewport (`viewport`).","enum":["global","viewport"],"type":"string"}},"required":["reactive","viewport_mode"],"type":"object"},"data":{"additionalProperties":false,"properties":{"group_by":{"description":"A band id such as `band:1` or the styled index band `index:0`.","type":"string"}},"required":["group_by"],"title":"Raster categories","type":"object"},"id":{"description":"Server-assigned component id.","type":"string"},"layer_id":{"description":"The layer this component is bound to.","type":"string"},"layer_type":{"description":"The kind of layer this component is attached to.","enum":["raster"],"type":"string"},"title":{"description":"Display title.","type":"string"},"type":{"description":"The component type. Immutable after creation.","enum":["bar_chart"],"type":"string"}},"required":["type","layer_type","data","config","id","layer_id"],"title":"Raster bar chart","type":"object"},{"additionalProperties":false,"description":"A slider or dropdown filtering the layer by a band.","properties":{"config":{"additionalProperties":false,"default":{},"description":"Component configuration.","properties":{"control_type":{"description":"The type of rendered interactive component. A `dropdown` lists the band's values, so it needs a categorical band. Defaults to the band's control: `dropdown` for a categorical band, `slider` otherwise.","enum":["dropdown","slider"],"type":"string"},"plurality":{"description":"Whether the `dropdown` allows filtering on multiple values or just one.","enum":["single","multiple"],"type":"string"},"selection":{"description":"Selected values of `data.filter_by`. The visualized map layer and other components are filtered to match. Uses the same format as the [FSL filters block](https://developers.felt.com/felt-style-language/style-definition-blocks/the-filters-block)."},"sorting":{"description":"The rendered order of `dropdown` options.","enum":["Alphabetically","By feature count"],"type":"string"}},"type":"object"},"data":{"additionalProperties":false,"properties":{"filter_by":{"description":"A band id such as `band:1`.","type":"string"}},"required":["filter_by"],"title":"Raster band filter","type":"object"},"id":{"description":"Server-assigned component id.","type":"string"},"layer_id":{"description":"The layer this component is bound to.","type":"string"},"layer_type":{"description":"The kind of layer this component is attached to.","enum":["raster"],"type":"string"},"title":{"description":"Display title. Defaults to the band's name.","type":"string"},"type":{"description":"The component type. Immutable after creation.","enum":["filter"],"type":"string"}},"required":["type","layer_type","data","config","id","layer_id"],"title":"Raster filter","type":"object"}]}],"title":"LayerComponent"},"UnauthorizedError":{"properties":{"errors":{"items":{"properties":{"detail":{"type":"string"},"source":{"properties":{"header":{"enum":["authorization"],"type":"string"}},"type":"object"},"title":{"type":"string"}},"type":"object"},"type":"array"}},"title":"UnauthorizedError","type":"object"},"NotFoundError":{"properties":{"errors":{"items":{"properties":{"detail":{"type":"string"},"source":{"properties":{"parameter":{"type":"string"}},"type":"object"},"title":{"type":"string"}},"type":"object"},"type":"array"}},"title":"NotFoundError","type":"object"},"JsonErrorResponse":{"properties":{"errors":{"items":{"properties":{"detail":{"type":"string"},"source":{"properties":{"pointer":{"type":"string"}},"required":["pointer"],"type":"object"},"title":{"type":"string"}},"required":["title","source","detail"],"type":"object"},"type":"array"}},"required":["errors"],"title":"JsonErrorResponse","type":"object"},"InternalServerError":{"properties":{"errors":{"items":{"properties":{"detail":{"type":"string"},"source":{"properties":{"parameter":{"type":"string"}},"type":"object"},"title":{"type":"string"}},"type":"object"},"type":"array"}},"title":"InternalServerError","type":"object"}}},"paths":{"/api/v2/maps/{map_id}/layers/{layer_id}/components":{"post":{"callbacks":{},"description":"Creates a component on a layer.\n\n{% hint style=\"info\" %}\nThe component type is set at creation and cannot be changed later.\n{% endhint %}\n","operationId":"create_layer_component","parameters":[{"description":"The ID of the map the layer belongs to.","in":"path","name":"map_id","required":true,"schema":{"type":"string"}},{"description":"The ID of the layer the component belongs to.","in":"path","name":"layer_id","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LayerComponentCreateParams"}}},"description":"Layer component create params","required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LayerComponent"}}},"description":"Layer component"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}},"description":"UnauthorizedError"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}},"description":"UnauthorizedError"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}},"description":"NotFoundError"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/JsonErrorResponse"}}},"description":"Unprocessable Entity"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/JsonErrorResponse"}}},"description":"Unprocessable Entity"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerError"}}},"description":"InternalServerError"}},"summary":"Create layer component","tags":["Layer Components"]}}}}
```

## Get layer component

> Returns a single layer component. Includes all fields.<br>

```json
{"openapi":"3.0.0","info":{"title":"Felt","version":"2.0"},"tags":[{"description":"With these APIs, you can create and edit a layer's components.\n","name":"Layer Components"}],"servers":[{"url":"https://felt.com","variables":{}}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"bearerFormat":"YOUR_API_KEY","scheme":"bearer","type":"http"}},"schemas":{"LayerComponent":{"anyOf":[{"anyOf":[{"additionalProperties":false,"description":"A single statistic over the layer's features.","properties":{"config":{"additionalProperties":false,"default":{"reactive":true,"viewport_mode":"global"},"description":"Component configuration.","properties":{"reactive":{"default":true,"description":"Whether this component reacts to other components' selections, filtering its result to match.","type":"boolean"},"viewport_mode":{"default":"global","description":"Compute over the whole layer (`global`) or only the features in the current viewport (`viewport`).","enum":["global","viewport"],"type":"string"}},"required":["reactive","viewport_mode"],"type":"object"},"data":{"anyOf":[{"additionalProperties":false,"properties":{"aggregate":{"description":"Count features.","enum":["count"],"type":"string"},"format":{"description":"numbrojs format object. See the [numbrojs format documentation](https://numbrojs.com/format.html)."}},"required":["aggregate"],"title":"Feature count","type":"object"},{"additionalProperties":false,"properties":{"aggregate":{"description":"The statistic to compute over `aggregate_by`.","enum":["sum","avg","min","max","median","count_distinct"],"type":"string"},"aggregate_by":{"description":"Attribute to aggregate.","type":"string"},"format":{"description":"numbrojs format object. See the [numbrojs format documentation](https://numbrojs.com/format.html)."}},"required":["aggregate","aggregate_by"],"title":"Aggregate","type":"object"}]},"id":{"description":"Server-assigned component id.","type":"string"},"layer_id":{"description":"The layer this component is bound to.","type":"string"},"layer_type":{"description":"The kind of layer this component is attached to.","enum":["vector"],"type":"string"},"title":{"description":"Display title.","type":"string"},"type":{"description":"The component type. Immutable after creation.","enum":["statistic"],"type":"string"}},"required":["type","layer_type","data","config","id","layer_id"],"title":"Vector statistic","type":"object"},{"additionalProperties":false,"description":"Distribution of a numeric attribute across bins.","properties":{"config":{"additionalProperties":false,"default":{"reactive":true,"viewport_mode":"global"},"description":"Component configuration.","properties":{"reactive":{"default":true,"description":"Whether this component reacts to other components' selections, filtering its result to match.","type":"boolean"},"selection":{"description":"Selected values of `data.group_by`. The visualized map layer and other components are filtered to match. Uses the same format as the [FSL filters block](https://developers.felt.com/felt-style-language/style-definition-blocks/the-filters-block)."},"viewport_mode":{"default":"global","description":"Compute over the whole layer (`global`) or only the features in the current viewport (`viewport`).","enum":["global","viewport"],"type":"string"}},"required":["reactive","viewport_mode"],"type":"object"},"data":{"anyOf":[{"additionalProperties":false,"properties":{"aggregate":{"description":"Count features.","enum":["count"],"type":"string"},"format":{"description":"numbrojs format object. See the [numbrojs format documentation](https://numbrojs.com/format.html)."},"group_by":{"description":"Numeric attribute to bin into the distribution.","type":"string"},"grouping":{"additionalProperties":false,"description":"How the attribute's values are binned.","properties":{"steps":{"additionalProperties":false,"properties":{"count":{"description":"Number of equal-width bins across the attribute's range.","exclusiveMinimum":true,"maximum":9007199254740991,"minimum":0,"type":"integer"},"type":{"enum":["equal-intervals"],"type":"string"}},"required":["type","count"],"type":"object"},"type":{"enum":["numeric"],"type":"string"}},"required":["type","steps"],"type":"object"}},"required":["aggregate","group_by","grouping"],"title":"Feature count","type":"object"},{"additionalProperties":false,"properties":{"aggregate":{"description":"The statistic to compute over `aggregate_by`.","enum":["sum","avg","min","max","median","count_distinct"],"type":"string"},"aggregate_by":{"description":"Attribute to aggregate.","type":"string"},"format":{"description":"numbrojs format object. See the [numbrojs format documentation](https://numbrojs.com/format.html)."},"group_by":{"description":"Numeric attribute to bin into the distribution.","type":"string"},"grouping":{"additionalProperties":false,"description":"How the attribute's values are binned.","properties":{"steps":{"additionalProperties":false,"properties":{"count":{"description":"Number of equal-width bins across the attribute's range.","exclusiveMinimum":true,"maximum":9007199254740991,"minimum":0,"type":"integer"},"type":{"enum":["equal-intervals"],"type":"string"}},"required":["type","count"],"type":"object"},"type":{"enum":["numeric"],"type":"string"}},"required":["type","steps"],"type":"object"}},"required":["aggregate","aggregate_by","group_by","grouping"],"title":"Aggregate","type":"object"}]},"id":{"description":"Server-assigned component id.","type":"string"},"layer_id":{"description":"The layer this component is bound to.","type":"string"},"layer_type":{"description":"The kind of layer this component is attached to.","enum":["vector"],"type":"string"},"title":{"description":"Display title.","type":"string"},"type":{"description":"The component type. Immutable after creation.","enum":["histogram"],"type":"string"}},"required":["type","layer_type","data","config","id","layer_id"],"title":"Vector histogram","type":"object"},{"additionalProperties":false,"description":"An attribute's distribution as a smoothed line.","properties":{"config":{"additionalProperties":false,"default":{"reactive":true,"viewport_mode":"global"},"description":"Component configuration.","properties":{"reactive":{"default":true,"description":"Whether this component reacts to other components' selections, filtering its result to match.","type":"boolean"},"selection":{"description":"Selected values of `data.domain`. The visualized map layer and other components are filtered to match. Uses the same format as the [FSL filters block](https://developers.felt.com/felt-style-language/style-definition-blocks/the-filters-block)."},"viewport_mode":{"default":"global","description":"Compute over the whole layer (`global`) or only the features in the current viewport (`viewport`).","enum":["global","viewport"],"type":"string"}},"required":["reactive","viewport_mode"],"type":"object"},"data":{"anyOf":[{"additionalProperties":false,"properties":{"aggregate":{"description":"Count features.","enum":["count"],"type":"string"},"domain":{"description":"Numeric attribute the line is plotted against — the horizontal axis.","type":"string"},"format":{"description":"numbrojs format object. See the [numbrojs format documentation](https://numbrojs.com/format.html)."}},"required":["aggregate","domain"],"title":"Feature count","type":"object"},{"additionalProperties":false,"properties":{"aggregate":{"description":"The statistic to compute over `aggregate_by`.","enum":["sum","avg","min","max","median","count_distinct"],"type":"string"},"aggregate_by":{"description":"Attribute to aggregate.","type":"string"},"domain":{"description":"Numeric attribute the line is plotted against — the horizontal axis.","type":"string"},"format":{"description":"numbrojs format object. See the [numbrojs format documentation](https://numbrojs.com/format.html)."}},"required":["aggregate","aggregate_by","domain"],"title":"Aggregate","type":"object"}]},"id":{"description":"Server-assigned component id.","type":"string"},"layer_id":{"description":"The layer this component is bound to.","type":"string"},"layer_type":{"description":"The kind of layer this component is attached to.","enum":["vector"],"type":"string"},"title":{"description":"Display title.","type":"string"},"type":{"description":"The component type. Immutable after creation.","enum":["line_chart"],"type":"string"}},"required":["type","layer_type","data","config","id","layer_id"],"title":"Vector line chart","type":"object"},{"additionalProperties":false,"description":"An attribute's categories as a bar chart.","properties":{"config":{"additionalProperties":false,"default":{"reactive":true,"viewport_mode":"global"},"description":"Component configuration.","properties":{"reactive":{"default":true,"description":"Whether this component reacts to other components' selections, filtering its result to match.","type":"boolean"},"selection":{"description":"Selected values of `data.group_by`. The visualized map layer and other components are filtered to match. Uses the same format as the [FSL filters block](https://developers.felt.com/felt-style-language/style-definition-blocks/the-filters-block)."},"viewport_mode":{"default":"global","description":"Compute over the whole layer (`global`) or only the features in the current viewport (`viewport`).","enum":["global","viewport"],"type":"string"}},"required":["reactive","viewport_mode"],"type":"object"},"data":{"anyOf":[{"additionalProperties":false,"properties":{"aggregate":{"description":"Count features.","enum":["count"],"type":"string"},"format":{"description":"numbrojs format object. See the [numbrojs format documentation](https://numbrojs.com/format.html)."},"group_by":{"description":"Attribute whose values become the categories.","type":"string"}},"required":["aggregate","group_by"],"title":"Feature count","type":"object"},{"additionalProperties":false,"properties":{"aggregate":{"description":"The statistic to compute over `aggregate_by`.","enum":["sum","avg","min","max","median","count_distinct"],"type":"string"},"aggregate_by":{"description":"Attribute to aggregate.","type":"string"},"format":{"description":"numbrojs format object. See the [numbrojs format documentation](https://numbrojs.com/format.html)."},"group_by":{"description":"Attribute whose values become the categories.","type":"string"}},"required":["aggregate","aggregate_by","group_by"],"title":"Aggregate","type":"object"}]},"id":{"description":"Server-assigned component id.","type":"string"},"layer_id":{"description":"The layer this component is bound to.","type":"string"},"layer_type":{"description":"The kind of layer this component is attached to.","enum":["vector"],"type":"string"},"title":{"description":"Display title.","type":"string"},"type":{"description":"The component type. Immutable after creation.","enum":["bar_chart"],"type":"string"}},"required":["type","layer_type","data","config","id","layer_id"],"title":"Vector bar chart","type":"object"},{"additionalProperties":false,"description":"Charts a statistic over time buckets of a date attribute.","properties":{"config":{"additionalProperties":false,"default":{"reactive":true,"viewport_mode":"global"},"description":"Component configuration.","properties":{"reactive":{"default":true,"description":"Whether this component reacts to other components' selections, filtering its result to match.","type":"boolean"},"selection":{"description":"Selected values of `data.group_by`. The visualized map layer and other components are filtered to match. Uses the same format as the [FSL filters block](https://developers.felt.com/felt-style-language/style-definition-blocks/the-filters-block)."},"viewport_mode":{"default":"global","description":"Compute over the whole layer (`global`) or only the features in the current viewport (`viewport`).","enum":["global","viewport"],"type":"string"}},"required":["reactive","viewport_mode"],"type":"object"},"data":{"anyOf":[{"additionalProperties":false,"properties":{"aggregate":{"description":"Count features.","enum":["count"],"type":"string"},"format":{"description":"numbrojs format object. See the [numbrojs format documentation](https://numbrojs.com/format.html)."},"group_by":{"description":"Date or datetime attribute which drives the time axis.","type":"string"},"grouping":{"additionalProperties":false,"description":"Time bucket per data point.","properties":{"interval":{"enum":["hour","day","week","month","year"],"type":"string"},"type":{"enum":["time-interval"],"type":"string"}},"required":["type","interval"],"type":"object"}},"required":["aggregate","group_by","grouping"],"title":"Feature count","type":"object"},{"additionalProperties":false,"properties":{"aggregate":{"description":"The statistic to compute over `aggregate_by`.","enum":["sum","avg","min","max","median","count_distinct"],"type":"string"},"aggregate_by":{"description":"Attribute to aggregate.","type":"string"},"format":{"description":"numbrojs format object. See the [numbrojs format documentation](https://numbrojs.com/format.html)."},"group_by":{"description":"Date or datetime attribute which drives the time axis.","type":"string"},"grouping":{"additionalProperties":false,"description":"Time bucket per data point.","properties":{"interval":{"enum":["hour","day","week","month","year"],"type":"string"},"type":{"enum":["time-interval"],"type":"string"}},"required":["type","interval"],"type":"object"}},"required":["aggregate","aggregate_by","group_by","grouping"],"title":"Aggregate","type":"object"}]},"id":{"description":"Server-assigned component id.","type":"string"},"layer_id":{"description":"The layer this component is bound to.","type":"string"},"layer_type":{"description":"The kind of layer this component is attached to.","enum":["vector"],"type":"string"},"title":{"description":"Display title.","type":"string"},"type":{"description":"The component type. Immutable after creation.","enum":["time_series"],"type":"string"}},"required":["type","layer_type","data","config","id","layer_id"],"title":"Vector time series","type":"object"},{"additionalProperties":false,"description":"A dropdown or slider filtering the layer by an attribute.","properties":{"config":{"additionalProperties":false,"default":{"control_type":"dropdown"},"description":"Component configuration.","properties":{"control_type":{"default":"dropdown","description":"The type of rendered interactive component. `slider` only works with numeric attributes.","enum":["dropdown","slider"],"type":"string"},"plurality":{"description":"Whether the `dropdown` allows filtering on multiple values or just one.","enum":["single","multiple"],"type":"string"},"selection":{"description":"Selected values of `data.filter_by`. The visualized map layer and other components are filtered to match. Uses the same format as the [FSL filters block](https://developers.felt.com/felt-style-language/style-definition-blocks/the-filters-block)."},"sorting":{"description":"The rendered order of `dropdown` options.","enum":["Alphabetically","By feature count"],"type":"string"}},"required":["control_type"],"type":"object"},"data":{"additionalProperties":false,"properties":{"filter_by":{"description":"Attribute to filter values from.","type":"string"}},"required":["filter_by"],"type":"object"},"id":{"description":"Server-assigned component id.","type":"string"},"layer_id":{"description":"The layer this component is bound to.","type":"string"},"layer_type":{"description":"The kind of layer this component is attached to.","enum":["vector"],"type":"string"},"title":{"description":"Display title. Defaults to `data.filter_by`.","type":"string"},"type":{"description":"The component type. Immutable after creation.","enum":["filter"],"type":"string"}},"required":["type","layer_type","data","config","id","layer_id"],"title":"Vector filter","type":"object"}]},{"anyOf":[{"additionalProperties":false,"description":"A single statistic over a band's pixels.","properties":{"config":{"additionalProperties":false,"default":{"reactive":true,"viewport_mode":"global"},"description":"Component configuration.","properties":{"reactive":{"default":true,"description":"Whether this component reacts to other components' selections, filtering its result to match.","type":"boolean"},"viewport_mode":{"default":"global","description":"Compute over the whole layer (`global`) or only the features in the current viewport (`viewport`).","enum":["global","viewport"],"type":"string"}},"required":["reactive","viewport_mode"],"type":"object"},"data":{"additionalProperties":false,"properties":{"aggregate":{"description":"The statistic to compute over `aggregate_by`.","enum":["avg","min","max","sum","stddev","majority","area"],"type":"string"},"aggregate_by":{"description":"A band id such as `band:1` or the styled index band `index:0`.","type":"string"},"format":{"description":"numbrojs format object. See the [numbrojs format documentation](https://numbrojs.com/format.html)."}},"required":["aggregate","aggregate_by"],"title":"Aggregate","type":"object"},"id":{"description":"Server-assigned component id.","type":"string"},"layer_id":{"description":"The layer this component is bound to.","type":"string"},"layer_type":{"description":"The kind of layer this component is attached to.","enum":["raster"],"type":"string"},"title":{"description":"Display title.","type":"string"},"type":{"description":"The component type. Immutable after creation.","enum":["statistic"],"type":"string"}},"required":["type","layer_type","data","config","id","layer_id"],"title":"Raster statistic","type":"object"},{"additionalProperties":false,"description":"Distribution of a band's pixels across bins, each bin shown as a percentage of all pixels.","properties":{"config":{"additionalProperties":false,"default":{"reactive":true,"viewport_mode":"global"},"description":"Component configuration.","properties":{"reactive":{"default":true,"description":"Whether this component reacts to other components' selections, filtering its result to match.","type":"boolean"},"selection":{"description":"Selected values of `data.group_by`. The visualized map layer and other components are filtered to match. Uses the same format as the [FSL filters block](https://developers.felt.com/felt-style-language/style-definition-blocks/the-filters-block)."},"viewport_mode":{"default":"global","description":"Compute over the whole layer (`global`) or only the features in the current viewport (`viewport`).","enum":["global","viewport"],"type":"string"}},"required":["reactive","viewport_mode"],"type":"object"},"data":{"additionalProperties":false,"properties":{"format":{"description":"numbrojs format object. See the [numbrojs format documentation](https://numbrojs.com/format.html)."},"group_by":{"description":"A band id such as `band:1` or the styled index band `index:0`.","type":"string"},"grouping":{"additionalProperties":false,"description":"How the attribute's values are binned.","properties":{"steps":{"additionalProperties":false,"properties":{"count":{"description":"Number of equal-width bins across the attribute's range.","exclusiveMinimum":true,"maximum":9007199254740991,"minimum":0,"type":"integer"},"type":{"enum":["equal-intervals"],"type":"string"}},"required":["type","count"],"type":"object"},"type":{"enum":["numeric"],"type":"string"}},"required":["type","steps"],"type":"object"}},"required":["group_by","grouping"],"title":"Raster band distribution","type":"object"},"id":{"description":"Server-assigned component id.","type":"string"},"layer_id":{"description":"The layer this component is bound to.","type":"string"},"layer_type":{"description":"The kind of layer this component is attached to.","enum":["raster"],"type":"string"},"title":{"description":"Display title.","type":"string"},"type":{"description":"The component type. Immutable after creation.","enum":["histogram"],"type":"string"}},"required":["type","layer_type","data","config","id","layer_id"],"title":"Raster histogram","type":"object"},{"additionalProperties":false,"description":"A band's pixel distribution as a smoothed line.","properties":{"config":{"additionalProperties":false,"default":{"reactive":true,"viewport_mode":"global"},"description":"Component configuration.","properties":{"reactive":{"default":true,"description":"Whether this component reacts to other components' selections, filtering its result to match.","type":"boolean"},"selection":{"description":"Selected values of `data.domain`. The visualized map layer and other components are filtered to match. Uses the same format as the [FSL filters block](https://developers.felt.com/felt-style-language/style-definition-blocks/the-filters-block)."},"viewport_mode":{"default":"global","description":"Compute over the whole layer (`global`) or only the features in the current viewport (`viewport`).","enum":["global","viewport"],"type":"string"}},"required":["reactive","viewport_mode"],"type":"object"},"data":{"additionalProperties":false,"properties":{"domain":{"description":"The band whose pixels are charted.","type":"string"},"format":{"description":"numbrojs format object. See the [numbrojs format documentation](https://numbrojs.com/format.html)."}},"required":["domain"],"type":"object"},"id":{"description":"Server-assigned component id.","type":"string"},"layer_id":{"description":"The layer this component is bound to.","type":"string"},"layer_type":{"description":"The kind of layer this component is attached to.","enum":["raster"],"type":"string"},"title":{"description":"Display title.","type":"string"},"type":{"description":"The component type. Immutable after creation.","enum":["line_chart"],"type":"string"}},"required":["type","layer_type","data","config","id","layer_id"],"title":"Raster line chart","type":"object"},{"additionalProperties":false,"description":"A categorical band's values or the style's classes as a bar chart.","properties":{"config":{"additionalProperties":false,"default":{"reactive":true,"viewport_mode":"global"},"description":"Component configuration.","properties":{"reactive":{"default":true,"description":"Whether this component reacts to other components' selections, filtering its result to match.","type":"boolean"},"selection":{"description":"Selected values of `data.group_by`. The visualized map layer and other components are filtered to match. Uses the same format as the [FSL filters block](https://developers.felt.com/felt-style-language/style-definition-blocks/the-filters-block)."},"viewport_mode":{"default":"global","description":"Compute over the whole layer (`global`) or only the features in the current viewport (`viewport`).","enum":["global","viewport"],"type":"string"}},"required":["reactive","viewport_mode"],"type":"object"},"data":{"additionalProperties":false,"properties":{"group_by":{"description":"A band id such as `band:1` or the styled index band `index:0`.","type":"string"}},"required":["group_by"],"title":"Raster categories","type":"object"},"id":{"description":"Server-assigned component id.","type":"string"},"layer_id":{"description":"The layer this component is bound to.","type":"string"},"layer_type":{"description":"The kind of layer this component is attached to.","enum":["raster"],"type":"string"},"title":{"description":"Display title.","type":"string"},"type":{"description":"The component type. Immutable after creation.","enum":["bar_chart"],"type":"string"}},"required":["type","layer_type","data","config","id","layer_id"],"title":"Raster bar chart","type":"object"},{"additionalProperties":false,"description":"A slider or dropdown filtering the layer by a band.","properties":{"config":{"additionalProperties":false,"default":{},"description":"Component configuration.","properties":{"control_type":{"description":"The type of rendered interactive component. A `dropdown` lists the band's values, so it needs a categorical band. Defaults to the band's control: `dropdown` for a categorical band, `slider` otherwise.","enum":["dropdown","slider"],"type":"string"},"plurality":{"description":"Whether the `dropdown` allows filtering on multiple values or just one.","enum":["single","multiple"],"type":"string"},"selection":{"description":"Selected values of `data.filter_by`. The visualized map layer and other components are filtered to match. Uses the same format as the [FSL filters block](https://developers.felt.com/felt-style-language/style-definition-blocks/the-filters-block)."},"sorting":{"description":"The rendered order of `dropdown` options.","enum":["Alphabetically","By feature count"],"type":"string"}},"type":"object"},"data":{"additionalProperties":false,"properties":{"filter_by":{"description":"A band id such as `band:1`.","type":"string"}},"required":["filter_by"],"title":"Raster band filter","type":"object"},"id":{"description":"Server-assigned component id.","type":"string"},"layer_id":{"description":"The layer this component is bound to.","type":"string"},"layer_type":{"description":"The kind of layer this component is attached to.","enum":["raster"],"type":"string"},"title":{"description":"Display title. Defaults to the band's name.","type":"string"},"type":{"description":"The component type. Immutable after creation.","enum":["filter"],"type":"string"}},"required":["type","layer_type","data","config","id","layer_id"],"title":"Raster filter","type":"object"}]}],"title":"LayerComponent"},"UnauthorizedError":{"properties":{"errors":{"items":{"properties":{"detail":{"type":"string"},"source":{"properties":{"header":{"enum":["authorization"],"type":"string"}},"type":"object"},"title":{"type":"string"}},"type":"object"},"type":"array"}},"title":"UnauthorizedError","type":"object"},"NotFoundError":{"properties":{"errors":{"items":{"properties":{"detail":{"type":"string"},"source":{"properties":{"parameter":{"type":"string"}},"type":"object"},"title":{"type":"string"}},"type":"object"},"type":"array"}},"title":"NotFoundError","type":"object"},"JsonErrorResponse":{"properties":{"errors":{"items":{"properties":{"detail":{"type":"string"},"source":{"properties":{"pointer":{"type":"string"}},"required":["pointer"],"type":"object"},"title":{"type":"string"}},"required":["title","source","detail"],"type":"object"},"type":"array"}},"required":["errors"],"title":"JsonErrorResponse","type":"object"},"InternalServerError":{"properties":{"errors":{"items":{"properties":{"detail":{"type":"string"},"source":{"properties":{"parameter":{"type":"string"}},"type":"object"},"title":{"type":"string"}},"type":"object"},"type":"array"}},"title":"InternalServerError","type":"object"}}},"paths":{"/api/v2/maps/{map_id}/layers/{layer_id}/components/{component_id}":{"get":{"callbacks":{},"description":"Returns a single layer component. Includes all fields.\n","operationId":"show_layer_component","parameters":[{"description":"The ID of the map the layer belongs to.","in":"path","name":"map_id","required":true,"schema":{"type":"string"}},{"description":"The ID of the layer the component belongs to.","in":"path","name":"layer_id","required":true,"schema":{"type":"string"}},{"description":"The ID of the layer component.","in":"path","name":"component_id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LayerComponent"}}},"description":"Layer component"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}},"description":"UnauthorizedError"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}},"description":"UnauthorizedError"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}},"description":"NotFoundError"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/JsonErrorResponse"}}},"description":"Unprocessable Entity"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/JsonErrorResponse"}}},"description":"Unprocessable Entity"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerError"}}},"description":"InternalServerError"}},"summary":"Get layer component","tags":["Layer Components"]}}}}
```

## Update layer component

> Partially update the provided fields of a component.\
> \
> {% hint style="info" %}\
> Omitted fields keep their current value. A component's type is immutable and is not part of the update body.\
> {% endhint %}<br>

```json
{"openapi":"3.0.0","info":{"title":"Felt","version":"2.0"},"tags":[{"description":"With these APIs, you can create and edit a layer's components.\n","name":"Layer Components"}],"servers":[{"url":"https://felt.com","variables":{}}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"bearerFormat":"YOUR_API_KEY","scheme":"bearer","type":"http"}},"schemas":{"LayerComponentUpdateParams":{"anyOf":[{"description":"A single statistic over the layer's features.","properties":{"config":{"description":"Component configuration. Provided keys are updated; omitted keys keep their current value.","properties":{"reactive":{"description":"Whether this component reacts to other components' selections, filtering its result to match.","type":"boolean"},"viewport_mode":{"description":"Compute over the whole layer (`global`) or only the features in the current viewport (`viewport`).","enum":["global","viewport"],"type":"string"}},"type":"object"},"data":{"anyOf":[{"properties":{"aggregate":{"description":"Count features.","enum":["count"],"type":"string"},"format":{"description":"numbrojs format object. See the [numbrojs format documentation](https://numbrojs.com/format.html)."}},"required":["aggregate"],"title":"Feature count","type":"object"},{"properties":{"aggregate":{"description":"The statistic to compute over `aggregate_by`.","enum":["sum","avg","min","max","median","count_distinct"],"type":"string"},"aggregate_by":{"description":"Attribute to aggregate.","type":"string"},"format":{"description":"numbrojs format object. See the [numbrojs format documentation](https://numbrojs.com/format.html)."}},"required":["aggregate","aggregate_by"],"title":"Aggregate","type":"object"}],"description":"Change how the component computes its result. `data` replaces as a unit when provided. Partial updates are not supported."},"layer_type":{"default":"vector","description":"The kind of layer this component is attached to.","enum":["vector"],"type":"string"},"title":{"description":"Display title.","type":"string"}},"title":"Vector statistic","type":"object"},{"description":"Distribution of a numeric attribute across bins.","properties":{"config":{"description":"Component configuration. Provided keys are updated; omitted keys keep their current value.","properties":{"reactive":{"description":"Whether this component reacts to other components' selections, filtering its result to match.","type":"boolean"},"selection":{"description":"Selected values of `data.group_by`. The visualized map layer and other components are filtered to match. Uses the same format as the [FSL filters block](https://developers.felt.com/felt-style-language/style-definition-blocks/the-filters-block). Pass `null` to clear the selection."},"viewport_mode":{"description":"Compute over the whole layer (`global`) or only the features in the current viewport (`viewport`).","enum":["global","viewport"],"type":"string"}},"type":"object"},"data":{"anyOf":[{"properties":{"aggregate":{"description":"Count features.","enum":["count"],"type":"string"},"format":{"description":"numbrojs format object. See the [numbrojs format documentation](https://numbrojs.com/format.html)."},"group_by":{"description":"Numeric attribute to bin into the distribution.","type":"string"},"grouping":{"description":"A suggestion on how the attribute's values are binned. The result may be different to better fit an attribute's range.","properties":{"steps":{"properties":{"count":{"description":"Number of equal-width bins across the attribute's range.","exclusiveMinimum":true,"maximum":9007199254740991,"minimum":0,"type":"integer"},"type":{"enum":["equal-intervals"],"type":"string"}},"required":["type","count"],"type":"object"},"type":{"enum":["numeric"],"type":"string"}},"required":["type","steps"],"type":"object"}},"required":["aggregate","group_by"],"title":"Feature count","type":"object"},{"properties":{"aggregate":{"description":"The statistic to compute over `aggregate_by`.","enum":["sum","avg","min","max","median","count_distinct"],"type":"string"},"aggregate_by":{"description":"Attribute to aggregate.","type":"string"},"format":{"description":"numbrojs format object. See the [numbrojs format documentation](https://numbrojs.com/format.html)."},"group_by":{"description":"Numeric attribute to bin into the distribution.","type":"string"},"grouping":{"description":"A suggestion on how the attribute's values are binned. The result may be different to better fit an attribute's range.","properties":{"steps":{"properties":{"count":{"description":"Number of equal-width bins across the attribute's range.","exclusiveMinimum":true,"maximum":9007199254740991,"minimum":0,"type":"integer"},"type":{"enum":["equal-intervals"],"type":"string"}},"required":["type","count"],"type":"object"},"type":{"enum":["numeric"],"type":"string"}},"required":["type","steps"],"type":"object"}},"required":["aggregate","aggregate_by","group_by"],"title":"Aggregate","type":"object"}],"description":"Change how the component computes its result. `data` replaces as a unit when provided. Partial updates are not supported."},"layer_type":{"default":"vector","description":"The kind of layer this component is attached to.","enum":["vector"],"type":"string"},"title":{"description":"Display title.","type":"string"}},"title":"Vector histogram","type":"object"},{"description":"An attribute's distribution as a smoothed line.","properties":{"config":{"description":"Component configuration. Provided keys are updated; omitted keys keep their current value.","properties":{"reactive":{"description":"Whether this component reacts to other components' selections, filtering its result to match.","type":"boolean"},"selection":{"description":"Selected values of `data.domain`. The visualized map layer and other components are filtered to match. Uses the same format as the [FSL filters block](https://developers.felt.com/felt-style-language/style-definition-blocks/the-filters-block). Pass `null` to clear the selection."},"viewport_mode":{"description":"Compute over the whole layer (`global`) or only the features in the current viewport (`viewport`).","enum":["global","viewport"],"type":"string"}},"type":"object"},"data":{"anyOf":[{"properties":{"aggregate":{"description":"Count features.","enum":["count"],"type":"string"},"domain":{"description":"Numeric attribute the line is plotted against — the horizontal axis.","type":"string"},"format":{"description":"numbrojs format object. See the [numbrojs format documentation](https://numbrojs.com/format.html)."}},"required":["aggregate","domain"],"title":"Feature count","type":"object"},{"properties":{"aggregate":{"description":"The statistic to compute over `aggregate_by`.","enum":["sum","avg","min","max","median","count_distinct"],"type":"string"},"aggregate_by":{"description":"Attribute to aggregate.","type":"string"},"domain":{"description":"Numeric attribute the line is plotted against — the horizontal axis.","type":"string"},"format":{"description":"numbrojs format object. See the [numbrojs format documentation](https://numbrojs.com/format.html)."}},"required":["aggregate","aggregate_by","domain"],"title":"Aggregate","type":"object"}],"description":"Change how the component computes its result. `data` replaces as a unit when provided. Partial updates are not supported."},"layer_type":{"default":"vector","description":"The kind of layer this component is attached to.","enum":["vector"],"type":"string"},"title":{"description":"Display title.","type":"string"}},"title":"Vector line chart","type":"object"},{"description":"An attribute's categories as a bar chart.","properties":{"config":{"description":"Component configuration. Provided keys are updated; omitted keys keep their current value.","properties":{"reactive":{"description":"Whether this component reacts to other components' selections, filtering its result to match.","type":"boolean"},"selection":{"description":"Selected values of `data.group_by`. The visualized map layer and other components are filtered to match. Uses the same format as the [FSL filters block](https://developers.felt.com/felt-style-language/style-definition-blocks/the-filters-block). Pass `null` to clear the selection."},"viewport_mode":{"description":"Compute over the whole layer (`global`) or only the features in the current viewport (`viewport`).","enum":["global","viewport"],"type":"string"}},"type":"object"},"data":{"anyOf":[{"properties":{"aggregate":{"description":"Count features.","enum":["count"],"type":"string"},"format":{"description":"numbrojs format object. See the [numbrojs format documentation](https://numbrojs.com/format.html)."},"group_by":{"description":"Attribute whose values become the categories.","type":"string"}},"required":["aggregate","group_by"],"title":"Feature count","type":"object"},{"properties":{"aggregate":{"description":"The statistic to compute over `aggregate_by`.","enum":["sum","avg","min","max","median","count_distinct"],"type":"string"},"aggregate_by":{"description":"Attribute to aggregate.","type":"string"},"format":{"description":"numbrojs format object. See the [numbrojs format documentation](https://numbrojs.com/format.html)."},"group_by":{"description":"Attribute whose values become the categories.","type":"string"}},"required":["aggregate","aggregate_by","group_by"],"title":"Aggregate","type":"object"}],"description":"Change how the component computes its result. `data` replaces as a unit when provided. Partial updates are not supported."},"layer_type":{"default":"vector","description":"The kind of layer this component is attached to.","enum":["vector"],"type":"string"},"title":{"description":"Display title.","type":"string"}},"title":"Vector bar chart","type":"object"},{"description":"Charts a statistic over time buckets of a date attribute.","properties":{"config":{"description":"Component configuration. Provided keys are updated; omitted keys keep their current value.","properties":{"reactive":{"description":"Whether this component reacts to other components' selections, filtering its result to match.","type":"boolean"},"selection":{"description":"Selected values of `data.group_by`. The visualized map layer and other components are filtered to match. Uses the same format as the [FSL filters block](https://developers.felt.com/felt-style-language/style-definition-blocks/the-filters-block). Pass `null` to clear the selection."},"viewport_mode":{"description":"Compute over the whole layer (`global`) or only the features in the current viewport (`viewport`).","enum":["global","viewport"],"type":"string"}},"type":"object"},"data":{"anyOf":[{"properties":{"aggregate":{"description":"Count features.","enum":["count"],"type":"string"},"format":{"description":"numbrojs format object. See the [numbrojs format documentation](https://numbrojs.com/format.html)."},"group_by":{"description":"Date or datetime attribute which drives the time axis.","type":"string"},"grouping":{"description":"Time bucket per data point.","properties":{"interval":{"enum":["hour","day","week","month","year"],"type":"string"},"type":{"enum":["time-interval"],"type":"string"}},"required":["type","interval"],"type":"object"}},"required":["aggregate","group_by"],"title":"Feature count","type":"object"},{"properties":{"aggregate":{"description":"The statistic to compute over `aggregate_by`.","enum":["sum","avg","min","max","median","count_distinct"],"type":"string"},"aggregate_by":{"description":"Attribute to aggregate.","type":"string"},"format":{"description":"numbrojs format object. See the [numbrojs format documentation](https://numbrojs.com/format.html)."},"group_by":{"description":"Date or datetime attribute which drives the time axis.","type":"string"},"grouping":{"description":"Time bucket per data point.","properties":{"interval":{"enum":["hour","day","week","month","year"],"type":"string"},"type":{"enum":["time-interval"],"type":"string"}},"required":["type","interval"],"type":"object"}},"required":["aggregate","aggregate_by","group_by"],"title":"Aggregate","type":"object"}],"description":"Change how the component computes its result. `data` replaces as a unit when provided. Partial updates are not supported."},"layer_type":{"default":"vector","description":"The kind of layer this component is attached to.","enum":["vector"],"type":"string"},"title":{"description":"Display title.","type":"string"}},"title":"Vector time series","type":"object"},{"description":"A dropdown or slider filtering the layer by an attribute.","properties":{"config":{"description":"Component configuration. Provided keys are updated; omitted keys keep their current value.","properties":{"control_type":{"description":"The type of rendered interactive component. `slider` only works with numeric attributes.","enum":["dropdown","slider"],"type":"string"},"plurality":{"description":"Whether the `dropdown` allows filtering on multiple values or just one.","enum":["single","multiple"],"type":"string"},"selection":{"description":"Selected values of `data.filter_by`. The visualized map layer and other components are filtered to match. Uses the same format as the [FSL filters block](https://developers.felt.com/felt-style-language/style-definition-blocks/the-filters-block). Pass `null` to clear the selection."},"sorting":{"description":"The rendered order of `dropdown` options.","enum":["Alphabetically","By feature count"],"type":"string"}},"type":"object"},"data":{"description":"Change how the component computes its result. `data` replaces as a unit when provided. Partial updates are not supported.","properties":{"filter_by":{"description":"Attribute to filter values from.","type":"string"}},"required":["filter_by"],"type":"object"},"layer_type":{"default":"vector","description":"The kind of layer this component is attached to.","enum":["vector"],"type":"string"},"title":{"description":"Display title.","type":"string"}},"title":"Vector filter","type":"object"},{"description":"A single statistic over a band's pixels.","properties":{"config":{"description":"Component configuration. Provided keys are updated; omitted keys keep their current value.","properties":{"reactive":{"description":"Whether this component reacts to other components' selections, filtering its result to match.","type":"boolean"},"viewport_mode":{"description":"Compute over the whole layer (`global`) or only the features in the current viewport (`viewport`).","enum":["global","viewport"],"type":"string"}},"type":"object"},"data":{"description":"Change how the component computes its result. `data` replaces as a unit when provided. Partial updates are not supported.","properties":{"aggregate":{"description":"The statistic to compute over `aggregate_by`.","enum":["avg","min","max","sum","stddev","majority","area"],"type":"string"},"aggregate_by":{"description":"A band id such as `band:1` or the styled index band `index:0`.","type":"string"},"format":{"description":"numbrojs format object. See the [numbrojs format documentation](https://numbrojs.com/format.html)."}},"required":["aggregate","aggregate_by"],"title":"Aggregate","type":"object"},"layer_type":{"description":"The kind of layer this component is attached to.","enum":["raster"],"type":"string"},"title":{"description":"Display title.","type":"string"}},"required":["layer_type"],"title":"Raster statistic","type":"object"},{"description":"Distribution of a band's pixels across bins, each bin shown as a percentage of all pixels.","properties":{"config":{"description":"Component configuration. Provided keys are updated; omitted keys keep their current value.","properties":{"reactive":{"description":"Whether this component reacts to other components' selections, filtering its result to match.","type":"boolean"},"selection":{"description":"Selected values of `data.group_by`. The visualized map layer and other components are filtered to match. Uses the same format as the [FSL filters block](https://developers.felt.com/felt-style-language/style-definition-blocks/the-filters-block). Pass `null` to clear the selection."},"viewport_mode":{"description":"Compute over the whole layer (`global`) or only the features in the current viewport (`viewport`).","enum":["global","viewport"],"type":"string"}},"type":"object"},"data":{"description":"Change how the component computes its result. `data` replaces as a unit when provided. Partial updates are not supported.","properties":{"format":{"description":"numbrojs format object. See the [numbrojs format documentation](https://numbrojs.com/format.html)."},"group_by":{"description":"A band id such as `band:1` or the styled index band `index:0`.","type":"string"},"grouping":{"description":"A suggestion on how the attribute's values are binned. The result may be different to better fit an attribute's range.","properties":{"steps":{"properties":{"count":{"description":"Number of equal-width bins across the attribute's range.","exclusiveMinimum":true,"maximum":9007199254740991,"minimum":0,"type":"integer"},"type":{"enum":["equal-intervals"],"type":"string"}},"required":["type","count"],"type":"object"},"type":{"enum":["numeric"],"type":"string"}},"required":["type","steps"],"type":"object"}},"required":["group_by"],"title":"Raster band distribution","type":"object"},"layer_type":{"description":"The kind of layer this component is attached to.","enum":["raster"],"type":"string"},"title":{"description":"Display title.","type":"string"}},"required":["layer_type"],"title":"Raster histogram","type":"object"},{"description":"A band's pixel distribution as a smoothed line.","properties":{"config":{"description":"Component configuration. Provided keys are updated; omitted keys keep their current value.","properties":{"reactive":{"description":"Whether this component reacts to other components' selections, filtering its result to match.","type":"boolean"},"selection":{"description":"Selected values of `data.domain`. The visualized map layer and other components are filtered to match. Uses the same format as the [FSL filters block](https://developers.felt.com/felt-style-language/style-definition-blocks/the-filters-block). Pass `null` to clear the selection."},"viewport_mode":{"description":"Compute over the whole layer (`global`) or only the features in the current viewport (`viewport`).","enum":["global","viewport"],"type":"string"}},"type":"object"},"data":{"description":"Change how the component computes its result. `data` replaces as a unit when provided. Partial updates are not supported.","properties":{"domain":{"description":"The band whose pixels are charted.","type":"string"},"format":{"description":"numbrojs format object. See the [numbrojs format documentation](https://numbrojs.com/format.html)."}},"required":["domain"],"type":"object"},"layer_type":{"description":"The kind of layer this component is attached to.","enum":["raster"],"type":"string"},"title":{"description":"Display title.","type":"string"}},"required":["layer_type"],"title":"Raster line chart","type":"object"},{"description":"A categorical band's values or the style's classes as a bar chart.","properties":{"config":{"description":"Component configuration. Provided keys are updated; omitted keys keep their current value.","properties":{"reactive":{"description":"Whether this component reacts to other components' selections, filtering its result to match.","type":"boolean"},"selection":{"description":"Selected values of `data.group_by`. The visualized map layer and other components are filtered to match. Uses the same format as the [FSL filters block](https://developers.felt.com/felt-style-language/style-definition-blocks/the-filters-block). Pass `null` to clear the selection."},"viewport_mode":{"description":"Compute over the whole layer (`global`) or only the features in the current viewport (`viewport`).","enum":["global","viewport"],"type":"string"}},"type":"object"},"data":{"description":"Change how the component computes its result. `data` replaces as a unit when provided. Partial updates are not supported.","properties":{"group_by":{"description":"A band id such as `band:1` or the styled index band `index:0`.","type":"string"}},"required":["group_by"],"title":"Raster categories","type":"object"},"layer_type":{"description":"The kind of layer this component is attached to.","enum":["raster"],"type":"string"},"title":{"description":"Display title.","type":"string"}},"required":["layer_type"],"title":"Raster bar chart","type":"object"},{"description":"A slider or dropdown filtering the layer by a band.","properties":{"config":{"description":"Component configuration. Provided keys are updated; omitted keys keep their current value.","properties":{"control_type":{"description":"The type of rendered interactive component. A `dropdown` lists the band's values, so it needs a categorical band.","enum":["dropdown","slider"],"type":"string"},"plurality":{"description":"Whether the `dropdown` allows filtering on multiple values or just one.","enum":["single","multiple"],"type":"string"},"selection":{"description":"Selected values of `data.filter_by`. The visualized map layer and other components are filtered to match. Uses the same format as the [FSL filters block](https://developers.felt.com/felt-style-language/style-definition-blocks/the-filters-block). Pass `null` to clear the selection."},"sorting":{"description":"The rendered order of `dropdown` options.","enum":["Alphabetically","By feature count"],"type":"string"}},"type":"object"},"data":{"description":"Change how the component computes its result. `data` replaces as a unit when provided. Partial updates are not supported.","properties":{"filter_by":{"description":"A band id such as `band:1`.","type":"string"}},"required":["filter_by"],"title":"Raster band filter","type":"object"},"layer_type":{"description":"The kind of layer this component is attached to.","enum":["raster"],"type":"string"},"title":{"description":"Display title.","type":"string"}},"required":["layer_type"],"title":"Raster filter","type":"object"}],"title":"LayerComponentUpdateParams"},"LayerComponent":{"anyOf":[{"anyOf":[{"additionalProperties":false,"description":"A single statistic over the layer's features.","properties":{"config":{"additionalProperties":false,"default":{"reactive":true,"viewport_mode":"global"},"description":"Component configuration.","properties":{"reactive":{"default":true,"description":"Whether this component reacts to other components' selections, filtering its result to match.","type":"boolean"},"viewport_mode":{"default":"global","description":"Compute over the whole layer (`global`) or only the features in the current viewport (`viewport`).","enum":["global","viewport"],"type":"string"}},"required":["reactive","viewport_mode"],"type":"object"},"data":{"anyOf":[{"additionalProperties":false,"properties":{"aggregate":{"description":"Count features.","enum":["count"],"type":"string"},"format":{"description":"numbrojs format object. See the [numbrojs format documentation](https://numbrojs.com/format.html)."}},"required":["aggregate"],"title":"Feature count","type":"object"},{"additionalProperties":false,"properties":{"aggregate":{"description":"The statistic to compute over `aggregate_by`.","enum":["sum","avg","min","max","median","count_distinct"],"type":"string"},"aggregate_by":{"description":"Attribute to aggregate.","type":"string"},"format":{"description":"numbrojs format object. See the [numbrojs format documentation](https://numbrojs.com/format.html)."}},"required":["aggregate","aggregate_by"],"title":"Aggregate","type":"object"}]},"id":{"description":"Server-assigned component id.","type":"string"},"layer_id":{"description":"The layer this component is bound to.","type":"string"},"layer_type":{"description":"The kind of layer this component is attached to.","enum":["vector"],"type":"string"},"title":{"description":"Display title.","type":"string"},"type":{"description":"The component type. Immutable after creation.","enum":["statistic"],"type":"string"}},"required":["type","layer_type","data","config","id","layer_id"],"title":"Vector statistic","type":"object"},{"additionalProperties":false,"description":"Distribution of a numeric attribute across bins.","properties":{"config":{"additionalProperties":false,"default":{"reactive":true,"viewport_mode":"global"},"description":"Component configuration.","properties":{"reactive":{"default":true,"description":"Whether this component reacts to other components' selections, filtering its result to match.","type":"boolean"},"selection":{"description":"Selected values of `data.group_by`. The visualized map layer and other components are filtered to match. Uses the same format as the [FSL filters block](https://developers.felt.com/felt-style-language/style-definition-blocks/the-filters-block)."},"viewport_mode":{"default":"global","description":"Compute over the whole layer (`global`) or only the features in the current viewport (`viewport`).","enum":["global","viewport"],"type":"string"}},"required":["reactive","viewport_mode"],"type":"object"},"data":{"anyOf":[{"additionalProperties":false,"properties":{"aggregate":{"description":"Count features.","enum":["count"],"type":"string"},"format":{"description":"numbrojs format object. See the [numbrojs format documentation](https://numbrojs.com/format.html)."},"group_by":{"description":"Numeric attribute to bin into the distribution.","type":"string"},"grouping":{"additionalProperties":false,"description":"How the attribute's values are binned.","properties":{"steps":{"additionalProperties":false,"properties":{"count":{"description":"Number of equal-width bins across the attribute's range.","exclusiveMinimum":true,"maximum":9007199254740991,"minimum":0,"type":"integer"},"type":{"enum":["equal-intervals"],"type":"string"}},"required":["type","count"],"type":"object"},"type":{"enum":["numeric"],"type":"string"}},"required":["type","steps"],"type":"object"}},"required":["aggregate","group_by","grouping"],"title":"Feature count","type":"object"},{"additionalProperties":false,"properties":{"aggregate":{"description":"The statistic to compute over `aggregate_by`.","enum":["sum","avg","min","max","median","count_distinct"],"type":"string"},"aggregate_by":{"description":"Attribute to aggregate.","type":"string"},"format":{"description":"numbrojs format object. See the [numbrojs format documentation](https://numbrojs.com/format.html)."},"group_by":{"description":"Numeric attribute to bin into the distribution.","type":"string"},"grouping":{"additionalProperties":false,"description":"How the attribute's values are binned.","properties":{"steps":{"additionalProperties":false,"properties":{"count":{"description":"Number of equal-width bins across the attribute's range.","exclusiveMinimum":true,"maximum":9007199254740991,"minimum":0,"type":"integer"},"type":{"enum":["equal-intervals"],"type":"string"}},"required":["type","count"],"type":"object"},"type":{"enum":["numeric"],"type":"string"}},"required":["type","steps"],"type":"object"}},"required":["aggregate","aggregate_by","group_by","grouping"],"title":"Aggregate","type":"object"}]},"id":{"description":"Server-assigned component id.","type":"string"},"layer_id":{"description":"The layer this component is bound to.","type":"string"},"layer_type":{"description":"The kind of layer this component is attached to.","enum":["vector"],"type":"string"},"title":{"description":"Display title.","type":"string"},"type":{"description":"The component type. Immutable after creation.","enum":["histogram"],"type":"string"}},"required":["type","layer_type","data","config","id","layer_id"],"title":"Vector histogram","type":"object"},{"additionalProperties":false,"description":"An attribute's distribution as a smoothed line.","properties":{"config":{"additionalProperties":false,"default":{"reactive":true,"viewport_mode":"global"},"description":"Component configuration.","properties":{"reactive":{"default":true,"description":"Whether this component reacts to other components' selections, filtering its result to match.","type":"boolean"},"selection":{"description":"Selected values of `data.domain`. The visualized map layer and other components are filtered to match. Uses the same format as the [FSL filters block](https://developers.felt.com/felt-style-language/style-definition-blocks/the-filters-block)."},"viewport_mode":{"default":"global","description":"Compute over the whole layer (`global`) or only the features in the current viewport (`viewport`).","enum":["global","viewport"],"type":"string"}},"required":["reactive","viewport_mode"],"type":"object"},"data":{"anyOf":[{"additionalProperties":false,"properties":{"aggregate":{"description":"Count features.","enum":["count"],"type":"string"},"domain":{"description":"Numeric attribute the line is plotted against — the horizontal axis.","type":"string"},"format":{"description":"numbrojs format object. See the [numbrojs format documentation](https://numbrojs.com/format.html)."}},"required":["aggregate","domain"],"title":"Feature count","type":"object"},{"additionalProperties":false,"properties":{"aggregate":{"description":"The statistic to compute over `aggregate_by`.","enum":["sum","avg","min","max","median","count_distinct"],"type":"string"},"aggregate_by":{"description":"Attribute to aggregate.","type":"string"},"domain":{"description":"Numeric attribute the line is plotted against — the horizontal axis.","type":"string"},"format":{"description":"numbrojs format object. See the [numbrojs format documentation](https://numbrojs.com/format.html)."}},"required":["aggregate","aggregate_by","domain"],"title":"Aggregate","type":"object"}]},"id":{"description":"Server-assigned component id.","type":"string"},"layer_id":{"description":"The layer this component is bound to.","type":"string"},"layer_type":{"description":"The kind of layer this component is attached to.","enum":["vector"],"type":"string"},"title":{"description":"Display title.","type":"string"},"type":{"description":"The component type. Immutable after creation.","enum":["line_chart"],"type":"string"}},"required":["type","layer_type","data","config","id","layer_id"],"title":"Vector line chart","type":"object"},{"additionalProperties":false,"description":"An attribute's categories as a bar chart.","properties":{"config":{"additionalProperties":false,"default":{"reactive":true,"viewport_mode":"global"},"description":"Component configuration.","properties":{"reactive":{"default":true,"description":"Whether this component reacts to other components' selections, filtering its result to match.","type":"boolean"},"selection":{"description":"Selected values of `data.group_by`. The visualized map layer and other components are filtered to match. Uses the same format as the [FSL filters block](https://developers.felt.com/felt-style-language/style-definition-blocks/the-filters-block)."},"viewport_mode":{"default":"global","description":"Compute over the whole layer (`global`) or only the features in the current viewport (`viewport`).","enum":["global","viewport"],"type":"string"}},"required":["reactive","viewport_mode"],"type":"object"},"data":{"anyOf":[{"additionalProperties":false,"properties":{"aggregate":{"description":"Count features.","enum":["count"],"type":"string"},"format":{"description":"numbrojs format object. See the [numbrojs format documentation](https://numbrojs.com/format.html)."},"group_by":{"description":"Attribute whose values become the categories.","type":"string"}},"required":["aggregate","group_by"],"title":"Feature count","type":"object"},{"additionalProperties":false,"properties":{"aggregate":{"description":"The statistic to compute over `aggregate_by`.","enum":["sum","avg","min","max","median","count_distinct"],"type":"string"},"aggregate_by":{"description":"Attribute to aggregate.","type":"string"},"format":{"description":"numbrojs format object. See the [numbrojs format documentation](https://numbrojs.com/format.html)."},"group_by":{"description":"Attribute whose values become the categories.","type":"string"}},"required":["aggregate","aggregate_by","group_by"],"title":"Aggregate","type":"object"}]},"id":{"description":"Server-assigned component id.","type":"string"},"layer_id":{"description":"The layer this component is bound to.","type":"string"},"layer_type":{"description":"The kind of layer this component is attached to.","enum":["vector"],"type":"string"},"title":{"description":"Display title.","type":"string"},"type":{"description":"The component type. Immutable after creation.","enum":["bar_chart"],"type":"string"}},"required":["type","layer_type","data","config","id","layer_id"],"title":"Vector bar chart","type":"object"},{"additionalProperties":false,"description":"Charts a statistic over time buckets of a date attribute.","properties":{"config":{"additionalProperties":false,"default":{"reactive":true,"viewport_mode":"global"},"description":"Component configuration.","properties":{"reactive":{"default":true,"description":"Whether this component reacts to other components' selections, filtering its result to match.","type":"boolean"},"selection":{"description":"Selected values of `data.group_by`. The visualized map layer and other components are filtered to match. Uses the same format as the [FSL filters block](https://developers.felt.com/felt-style-language/style-definition-blocks/the-filters-block)."},"viewport_mode":{"default":"global","description":"Compute over the whole layer (`global`) or only the features in the current viewport (`viewport`).","enum":["global","viewport"],"type":"string"}},"required":["reactive","viewport_mode"],"type":"object"},"data":{"anyOf":[{"additionalProperties":false,"properties":{"aggregate":{"description":"Count features.","enum":["count"],"type":"string"},"format":{"description":"numbrojs format object. See the [numbrojs format documentation](https://numbrojs.com/format.html)."},"group_by":{"description":"Date or datetime attribute which drives the time axis.","type":"string"},"grouping":{"additionalProperties":false,"description":"Time bucket per data point.","properties":{"interval":{"enum":["hour","day","week","month","year"],"type":"string"},"type":{"enum":["time-interval"],"type":"string"}},"required":["type","interval"],"type":"object"}},"required":["aggregate","group_by","grouping"],"title":"Feature count","type":"object"},{"additionalProperties":false,"properties":{"aggregate":{"description":"The statistic to compute over `aggregate_by`.","enum":["sum","avg","min","max","median","count_distinct"],"type":"string"},"aggregate_by":{"description":"Attribute to aggregate.","type":"string"},"format":{"description":"numbrojs format object. See the [numbrojs format documentation](https://numbrojs.com/format.html)."},"group_by":{"description":"Date or datetime attribute which drives the time axis.","type":"string"},"grouping":{"additionalProperties":false,"description":"Time bucket per data point.","properties":{"interval":{"enum":["hour","day","week","month","year"],"type":"string"},"type":{"enum":["time-interval"],"type":"string"}},"required":["type","interval"],"type":"object"}},"required":["aggregate","aggregate_by","group_by","grouping"],"title":"Aggregate","type":"object"}]},"id":{"description":"Server-assigned component id.","type":"string"},"layer_id":{"description":"The layer this component is bound to.","type":"string"},"layer_type":{"description":"The kind of layer this component is attached to.","enum":["vector"],"type":"string"},"title":{"description":"Display title.","type":"string"},"type":{"description":"The component type. Immutable after creation.","enum":["time_series"],"type":"string"}},"required":["type","layer_type","data","config","id","layer_id"],"title":"Vector time series","type":"object"},{"additionalProperties":false,"description":"A dropdown or slider filtering the layer by an attribute.","properties":{"config":{"additionalProperties":false,"default":{"control_type":"dropdown"},"description":"Component configuration.","properties":{"control_type":{"default":"dropdown","description":"The type of rendered interactive component. `slider` only works with numeric attributes.","enum":["dropdown","slider"],"type":"string"},"plurality":{"description":"Whether the `dropdown` allows filtering on multiple values or just one.","enum":["single","multiple"],"type":"string"},"selection":{"description":"Selected values of `data.filter_by`. The visualized map layer and other components are filtered to match. Uses the same format as the [FSL filters block](https://developers.felt.com/felt-style-language/style-definition-blocks/the-filters-block)."},"sorting":{"description":"The rendered order of `dropdown` options.","enum":["Alphabetically","By feature count"],"type":"string"}},"required":["control_type"],"type":"object"},"data":{"additionalProperties":false,"properties":{"filter_by":{"description":"Attribute to filter values from.","type":"string"}},"required":["filter_by"],"type":"object"},"id":{"description":"Server-assigned component id.","type":"string"},"layer_id":{"description":"The layer this component is bound to.","type":"string"},"layer_type":{"description":"The kind of layer this component is attached to.","enum":["vector"],"type":"string"},"title":{"description":"Display title. Defaults to `data.filter_by`.","type":"string"},"type":{"description":"The component type. Immutable after creation.","enum":["filter"],"type":"string"}},"required":["type","layer_type","data","config","id","layer_id"],"title":"Vector filter","type":"object"}]},{"anyOf":[{"additionalProperties":false,"description":"A single statistic over a band's pixels.","properties":{"config":{"additionalProperties":false,"default":{"reactive":true,"viewport_mode":"global"},"description":"Component configuration.","properties":{"reactive":{"default":true,"description":"Whether this component reacts to other components' selections, filtering its result to match.","type":"boolean"},"viewport_mode":{"default":"global","description":"Compute over the whole layer (`global`) or only the features in the current viewport (`viewport`).","enum":["global","viewport"],"type":"string"}},"required":["reactive","viewport_mode"],"type":"object"},"data":{"additionalProperties":false,"properties":{"aggregate":{"description":"The statistic to compute over `aggregate_by`.","enum":["avg","min","max","sum","stddev","majority","area"],"type":"string"},"aggregate_by":{"description":"A band id such as `band:1` or the styled index band `index:0`.","type":"string"},"format":{"description":"numbrojs format object. See the [numbrojs format documentation](https://numbrojs.com/format.html)."}},"required":["aggregate","aggregate_by"],"title":"Aggregate","type":"object"},"id":{"description":"Server-assigned component id.","type":"string"},"layer_id":{"description":"The layer this component is bound to.","type":"string"},"layer_type":{"description":"The kind of layer this component is attached to.","enum":["raster"],"type":"string"},"title":{"description":"Display title.","type":"string"},"type":{"description":"The component type. Immutable after creation.","enum":["statistic"],"type":"string"}},"required":["type","layer_type","data","config","id","layer_id"],"title":"Raster statistic","type":"object"},{"additionalProperties":false,"description":"Distribution of a band's pixels across bins, each bin shown as a percentage of all pixels.","properties":{"config":{"additionalProperties":false,"default":{"reactive":true,"viewport_mode":"global"},"description":"Component configuration.","properties":{"reactive":{"default":true,"description":"Whether this component reacts to other components' selections, filtering its result to match.","type":"boolean"},"selection":{"description":"Selected values of `data.group_by`. The visualized map layer and other components are filtered to match. Uses the same format as the [FSL filters block](https://developers.felt.com/felt-style-language/style-definition-blocks/the-filters-block)."},"viewport_mode":{"default":"global","description":"Compute over the whole layer (`global`) or only the features in the current viewport (`viewport`).","enum":["global","viewport"],"type":"string"}},"required":["reactive","viewport_mode"],"type":"object"},"data":{"additionalProperties":false,"properties":{"format":{"description":"numbrojs format object. See the [numbrojs format documentation](https://numbrojs.com/format.html)."},"group_by":{"description":"A band id such as `band:1` or the styled index band `index:0`.","type":"string"},"grouping":{"additionalProperties":false,"description":"How the attribute's values are binned.","properties":{"steps":{"additionalProperties":false,"properties":{"count":{"description":"Number of equal-width bins across the attribute's range.","exclusiveMinimum":true,"maximum":9007199254740991,"minimum":0,"type":"integer"},"type":{"enum":["equal-intervals"],"type":"string"}},"required":["type","count"],"type":"object"},"type":{"enum":["numeric"],"type":"string"}},"required":["type","steps"],"type":"object"}},"required":["group_by","grouping"],"title":"Raster band distribution","type":"object"},"id":{"description":"Server-assigned component id.","type":"string"},"layer_id":{"description":"The layer this component is bound to.","type":"string"},"layer_type":{"description":"The kind of layer this component is attached to.","enum":["raster"],"type":"string"},"title":{"description":"Display title.","type":"string"},"type":{"description":"The component type. Immutable after creation.","enum":["histogram"],"type":"string"}},"required":["type","layer_type","data","config","id","layer_id"],"title":"Raster histogram","type":"object"},{"additionalProperties":false,"description":"A band's pixel distribution as a smoothed line.","properties":{"config":{"additionalProperties":false,"default":{"reactive":true,"viewport_mode":"global"},"description":"Component configuration.","properties":{"reactive":{"default":true,"description":"Whether this component reacts to other components' selections, filtering its result to match.","type":"boolean"},"selection":{"description":"Selected values of `data.domain`. The visualized map layer and other components are filtered to match. Uses the same format as the [FSL filters block](https://developers.felt.com/felt-style-language/style-definition-blocks/the-filters-block)."},"viewport_mode":{"default":"global","description":"Compute over the whole layer (`global`) or only the features in the current viewport (`viewport`).","enum":["global","viewport"],"type":"string"}},"required":["reactive","viewport_mode"],"type":"object"},"data":{"additionalProperties":false,"properties":{"domain":{"description":"The band whose pixels are charted.","type":"string"},"format":{"description":"numbrojs format object. See the [numbrojs format documentation](https://numbrojs.com/format.html)."}},"required":["domain"],"type":"object"},"id":{"description":"Server-assigned component id.","type":"string"},"layer_id":{"description":"The layer this component is bound to.","type":"string"},"layer_type":{"description":"The kind of layer this component is attached to.","enum":["raster"],"type":"string"},"title":{"description":"Display title.","type":"string"},"type":{"description":"The component type. Immutable after creation.","enum":["line_chart"],"type":"string"}},"required":["type","layer_type","data","config","id","layer_id"],"title":"Raster line chart","type":"object"},{"additionalProperties":false,"description":"A categorical band's values or the style's classes as a bar chart.","properties":{"config":{"additionalProperties":false,"default":{"reactive":true,"viewport_mode":"global"},"description":"Component configuration.","properties":{"reactive":{"default":true,"description":"Whether this component reacts to other components' selections, filtering its result to match.","type":"boolean"},"selection":{"description":"Selected values of `data.group_by`. The visualized map layer and other components are filtered to match. Uses the same format as the [FSL filters block](https://developers.felt.com/felt-style-language/style-definition-blocks/the-filters-block)."},"viewport_mode":{"default":"global","description":"Compute over the whole layer (`global`) or only the features in the current viewport (`viewport`).","enum":["global","viewport"],"type":"string"}},"required":["reactive","viewport_mode"],"type":"object"},"data":{"additionalProperties":false,"properties":{"group_by":{"description":"A band id such as `band:1` or the styled index band `index:0`.","type":"string"}},"required":["group_by"],"title":"Raster categories","type":"object"},"id":{"description":"Server-assigned component id.","type":"string"},"layer_id":{"description":"The layer this component is bound to.","type":"string"},"layer_type":{"description":"The kind of layer this component is attached to.","enum":["raster"],"type":"string"},"title":{"description":"Display title.","type":"string"},"type":{"description":"The component type. Immutable after creation.","enum":["bar_chart"],"type":"string"}},"required":["type","layer_type","data","config","id","layer_id"],"title":"Raster bar chart","type":"object"},{"additionalProperties":false,"description":"A slider or dropdown filtering the layer by a band.","properties":{"config":{"additionalProperties":false,"default":{},"description":"Component configuration.","properties":{"control_type":{"description":"The type of rendered interactive component. A `dropdown` lists the band's values, so it needs a categorical band. Defaults to the band's control: `dropdown` for a categorical band, `slider` otherwise.","enum":["dropdown","slider"],"type":"string"},"plurality":{"description":"Whether the `dropdown` allows filtering on multiple values or just one.","enum":["single","multiple"],"type":"string"},"selection":{"description":"Selected values of `data.filter_by`. The visualized map layer and other components are filtered to match. Uses the same format as the [FSL filters block](https://developers.felt.com/felt-style-language/style-definition-blocks/the-filters-block)."},"sorting":{"description":"The rendered order of `dropdown` options.","enum":["Alphabetically","By feature count"],"type":"string"}},"type":"object"},"data":{"additionalProperties":false,"properties":{"filter_by":{"description":"A band id such as `band:1`.","type":"string"}},"required":["filter_by"],"title":"Raster band filter","type":"object"},"id":{"description":"Server-assigned component id.","type":"string"},"layer_id":{"description":"The layer this component is bound to.","type":"string"},"layer_type":{"description":"The kind of layer this component is attached to.","enum":["raster"],"type":"string"},"title":{"description":"Display title. Defaults to the band's name.","type":"string"},"type":{"description":"The component type. Immutable after creation.","enum":["filter"],"type":"string"}},"required":["type","layer_type","data","config","id","layer_id"],"title":"Raster filter","type":"object"}]}],"title":"LayerComponent"},"UnauthorizedError":{"properties":{"errors":{"items":{"properties":{"detail":{"type":"string"},"source":{"properties":{"header":{"enum":["authorization"],"type":"string"}},"type":"object"},"title":{"type":"string"}},"type":"object"},"type":"array"}},"title":"UnauthorizedError","type":"object"},"NotFoundError":{"properties":{"errors":{"items":{"properties":{"detail":{"type":"string"},"source":{"properties":{"parameter":{"type":"string"}},"type":"object"},"title":{"type":"string"}},"type":"object"},"type":"array"}},"title":"NotFoundError","type":"object"},"JsonErrorResponse":{"properties":{"errors":{"items":{"properties":{"detail":{"type":"string"},"source":{"properties":{"pointer":{"type":"string"}},"required":["pointer"],"type":"object"},"title":{"type":"string"}},"required":["title","source","detail"],"type":"object"},"type":"array"}},"required":["errors"],"title":"JsonErrorResponse","type":"object"},"InternalServerError":{"properties":{"errors":{"items":{"properties":{"detail":{"type":"string"},"source":{"properties":{"parameter":{"type":"string"}},"type":"object"},"title":{"type":"string"}},"type":"object"},"type":"array"}},"title":"InternalServerError","type":"object"}}},"paths":{"/api/v2/maps/{map_id}/layers/{layer_id}/components/{component_id}":{"post":{"callbacks":{},"description":"Partially update the provided fields of a component.\n\n{% hint style=\"info\" %}\nOmitted fields keep their current value. A component's type is immutable and is not part of the update body.\n{% endhint %}\n","operationId":"update_layer_component","parameters":[{"description":"The ID of the map the layer belongs to.","in":"path","name":"map_id","required":true,"schema":{"type":"string"}},{"description":"The ID of the layer the component belongs to.","in":"path","name":"layer_id","required":true,"schema":{"type":"string"}},{"description":"The ID of the layer component.","in":"path","name":"component_id","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LayerComponentUpdateParams"}}},"description":"Layer component update params","required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LayerComponent"}}},"description":"Layer component"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}},"description":"UnauthorizedError"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}},"description":"UnauthorizedError"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}},"description":"NotFoundError"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/JsonErrorResponse"}}},"description":"Unprocessable Entity"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/JsonErrorResponse"}}},"description":"Unprocessable Entity"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerError"}}},"description":"InternalServerError"}},"summary":"Update layer component","tags":["Layer Components"]}}}}
```

## Delete layer component

> Deletes a component from the layer.\
> \
> {% hint style="warning" %}\
> This cannot be undone.\
> {% endhint %}<br>

```json
{"openapi":"3.0.0","info":{"title":"Felt","version":"2.0"},"tags":[{"description":"With these APIs, you can create and edit a layer's components.\n","name":"Layer Components"}],"servers":[{"url":"https://felt.com","variables":{}}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"bearerFormat":"YOUR_API_KEY","scheme":"bearer","type":"http"}},"schemas":{"UnauthorizedError":{"properties":{"errors":{"items":{"properties":{"detail":{"type":"string"},"source":{"properties":{"header":{"enum":["authorization"],"type":"string"}},"type":"object"},"title":{"type":"string"}},"type":"object"},"type":"array"}},"title":"UnauthorizedError","type":"object"},"NotFoundError":{"properties":{"errors":{"items":{"properties":{"detail":{"type":"string"},"source":{"properties":{"parameter":{"type":"string"}},"type":"object"},"title":{"type":"string"}},"type":"object"},"type":"array"}},"title":"NotFoundError","type":"object"},"JsonErrorResponse":{"properties":{"errors":{"items":{"properties":{"detail":{"type":"string"},"source":{"properties":{"pointer":{"type":"string"}},"required":["pointer"],"type":"object"},"title":{"type":"string"}},"required":["title","source","detail"],"type":"object"},"type":"array"}},"required":["errors"],"title":"JsonErrorResponse","type":"object"},"InternalServerError":{"properties":{"errors":{"items":{"properties":{"detail":{"type":"string"},"source":{"properties":{"parameter":{"type":"string"}},"type":"object"},"title":{"type":"string"}},"type":"object"},"type":"array"}},"title":"InternalServerError","type":"object"}}},"paths":{"/api/v2/maps/{map_id}/layers/{layer_id}/components/{component_id}":{"delete":{"callbacks":{},"description":"Deletes a component from the layer.\n\n{% hint style=\"warning\" %}\nThis cannot be undone.\n{% endhint %}\n","operationId":"delete_layer_component","parameters":[{"description":"The ID of the map the layer belongs to.","in":"path","name":"map_id","required":true,"schema":{"type":"string"}},{"description":"The ID of the layer the component belongs to.","in":"path","name":"layer_id","required":true,"schema":{"type":"string"}},{"description":"The ID of the layer component.","in":"path","name":"component_id","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"No Content"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}},"description":"UnauthorizedError"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}},"description":"UnauthorizedError"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}},"description":"NotFoundError"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/JsonErrorResponse"}}},"description":"Unprocessable Entity"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/JsonErrorResponse"}}},"description":"Unprocessable Entity"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerError"}}},"description":"InternalServerError"}},"summary":"Delete layer component","tags":["Layer Components"]}}}}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://developers.felt.com/rest-api/api-reference/layers/layer-components.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
