> 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

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":[{"additionalProperties":false,"description":"Summarizes the layer into a single statistic, such as a feature count or an attribute average.","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`: sum, average, min, max, median, or count of distinct values.","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"},"title":{"description":"Display title.","type":"string"},"type":{"description":"The component type. Immutable after creation.","enum":["statistic"],"type":"string"}},"required":["type","data","config","id","layer_id"],"title":"Statistic","type":"object"},{"additionalProperties":false,"description":"Shows the distribution of a numeric attribute's values 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`: sum, average, min, max, median, or count of distinct values.","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"},"title":{"description":"Display title.","type":"string"},"type":{"description":"The component type. Immutable after creation.","enum":["histogram"],"type":"string"}},"required":["type","data","config","id","layer_id"],"title":"Histogram","type":"object"},{"additionalProperties":false,"description":"Shows the categories of an attribute 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`: sum, average, min, max, median, or count of distinct values.","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"},"title":{"description":"Display title.","type":"string"},"type":{"description":"The component type. Immutable after creation.","enum":["bar_chart"],"type":"string"}},"required":["type","data","config","id","layer_id"],"title":"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`: sum, average, min, max, median, or count of distinct values.","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"},"title":{"description":"Display title.","type":"string"},"type":{"description":"The component type. Immutable after creation.","enum":["time_series"],"type":"string"}},"required":["type","data","config","id","layer_id"],"title":"Time series","type":"object"},{"additionalProperties":false,"description":"An interactive dropdown or slider for filtering the layer by an attribute's values.","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"},"title":{"description":"Display title. Defaults to the attribute name.","type":"string"},"type":{"description":"The component type. Immutable after creation.","enum":["filter"],"type":"string"}},"required":["type","data","config","id","layer_id"],"title":"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":[{"description":"Summarizes the layer into a single statistic, such as a feature count or an attribute average.","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`: sum, average, min, max, median, or count of distinct values.","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."},"title":{"description":"Display title.","type":"string"},"type":{"description":"The component type. Immutable after creation.","enum":["statistic"],"type":"string"}},"required":["type","data"],"title":"Statistic","type":"object"},{"description":"Shows the distribution of a numeric attribute's values 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`: sum, average, min, max, median, or count of distinct values.","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."},"title":{"description":"Display title.","type":"string"},"type":{"description":"The component type. Immutable after creation.","enum":["histogram"],"type":"string"}},"required":["type","data"],"title":"Histogram","type":"object"},{"description":"Shows the categories of an attribute 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`: sum, average, min, max, median, or count of distinct values.","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."},"title":{"description":"Display title.","type":"string"},"type":{"description":"The component type. Immutable after creation.","enum":["bar_chart"],"type":"string"}},"required":["type","data"],"title":"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`: sum, average, min, max, median, or count of distinct values.","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."},"title":{"description":"Display title.","type":"string"},"type":{"description":"The component type. Immutable after creation.","enum":["time_series"],"type":"string"}},"required":["type","data"],"title":"Time series","type":"object"},{"description":"An interactive dropdown or slider for filtering the layer by an attribute's values.","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"},"title":{"description":"Display title. Defaults to the attribute name.","type":"string"},"type":{"description":"The component type. Immutable after creation.","enum":["filter"],"type":"string"}},"required":["type","data"],"title":"Filter","type":"object"}],"title":"LayerComponentCreateParams"},"LayerComponent":{"anyOf":[{"additionalProperties":false,"description":"Summarizes the layer into a single statistic, such as a feature count or an attribute average.","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`: sum, average, min, max, median, or count of distinct values.","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"},"title":{"description":"Display title.","type":"string"},"type":{"description":"The component type. Immutable after creation.","enum":["statistic"],"type":"string"}},"required":["type","data","config","id","layer_id"],"title":"Statistic","type":"object"},{"additionalProperties":false,"description":"Shows the distribution of a numeric attribute's values 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`: sum, average, min, max, median, or count of distinct values.","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"},"title":{"description":"Display title.","type":"string"},"type":{"description":"The component type. Immutable after creation.","enum":["histogram"],"type":"string"}},"required":["type","data","config","id","layer_id"],"title":"Histogram","type":"object"},{"additionalProperties":false,"description":"Shows the categories of an attribute 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`: sum, average, min, max, median, or count of distinct values.","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"},"title":{"description":"Display title.","type":"string"},"type":{"description":"The component type. Immutable after creation.","enum":["bar_chart"],"type":"string"}},"required":["type","data","config","id","layer_id"],"title":"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`: sum, average, min, max, median, or count of distinct values.","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"},"title":{"description":"Display title.","type":"string"},"type":{"description":"The component type. Immutable after creation.","enum":["time_series"],"type":"string"}},"required":["type","data","config","id","layer_id"],"title":"Time series","type":"object"},{"additionalProperties":false,"description":"An interactive dropdown or slider for filtering the layer by an attribute's values.","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"},"title":{"description":"Display title. Defaults to the attribute name.","type":"string"},"type":{"description":"The component type. Immutable after creation.","enum":["filter"],"type":"string"}},"required":["type","data","config","id","layer_id"],"title":"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":[{"additionalProperties":false,"description":"Summarizes the layer into a single statistic, such as a feature count or an attribute average.","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`: sum, average, min, max, median, or count of distinct values.","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"},"title":{"description":"Display title.","type":"string"},"type":{"description":"The component type. Immutable after creation.","enum":["statistic"],"type":"string"}},"required":["type","data","config","id","layer_id"],"title":"Statistic","type":"object"},{"additionalProperties":false,"description":"Shows the distribution of a numeric attribute's values 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`: sum, average, min, max, median, or count of distinct values.","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"},"title":{"description":"Display title.","type":"string"},"type":{"description":"The component type. Immutable after creation.","enum":["histogram"],"type":"string"}},"required":["type","data","config","id","layer_id"],"title":"Histogram","type":"object"},{"additionalProperties":false,"description":"Shows the categories of an attribute 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`: sum, average, min, max, median, or count of distinct values.","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"},"title":{"description":"Display title.","type":"string"},"type":{"description":"The component type. Immutable after creation.","enum":["bar_chart"],"type":"string"}},"required":["type","data","config","id","layer_id"],"title":"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`: sum, average, min, max, median, or count of distinct values.","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"},"title":{"description":"Display title.","type":"string"},"type":{"description":"The component type. Immutable after creation.","enum":["time_series"],"type":"string"}},"required":["type","data","config","id","layer_id"],"title":"Time series","type":"object"},{"additionalProperties":false,"description":"An interactive dropdown or slider for filtering the layer by an attribute's values.","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"},"title":{"description":"Display title. Defaults to the attribute name.","type":"string"},"type":{"description":"The component type. Immutable after creation.","enum":["filter"],"type":"string"}},"required":["type","data","config","id","layer_id"],"title":"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":"Summarizes the layer into a single statistic, such as a feature count or an attribute average.","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`: sum, average, min, max, median, or count of distinct values.","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."},"title":{"description":"Display title.","type":"string"}},"title":"Statistic","type":"object"},{"description":"Shows the distribution of a numeric attribute's values 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`: sum, average, min, max, median, or count of distinct values.","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."},"title":{"description":"Display title.","type":"string"}},"title":"Histogram","type":"object"},{"description":"Shows the categories of an attribute 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`: sum, average, min, max, median, or count of distinct values.","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."},"title":{"description":"Display title.","type":"string"}},"title":"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`: sum, average, min, max, median, or count of distinct values.","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."},"title":{"description":"Display title.","type":"string"}},"title":"Time series","type":"object"},{"description":"An interactive dropdown or slider for filtering the layer by an attribute's values.","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"},"title":{"description":"Display title.","type":"string"}},"title":"Filter","type":"object"}],"title":"LayerComponentUpdateParams"},"LayerComponent":{"anyOf":[{"additionalProperties":false,"description":"Summarizes the layer into a single statistic, such as a feature count or an attribute average.","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`: sum, average, min, max, median, or count of distinct values.","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"},"title":{"description":"Display title.","type":"string"},"type":{"description":"The component type. Immutable after creation.","enum":["statistic"],"type":"string"}},"required":["type","data","config","id","layer_id"],"title":"Statistic","type":"object"},{"additionalProperties":false,"description":"Shows the distribution of a numeric attribute's values 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`: sum, average, min, max, median, or count of distinct values.","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"},"title":{"description":"Display title.","type":"string"},"type":{"description":"The component type. Immutable after creation.","enum":["histogram"],"type":"string"}},"required":["type","data","config","id","layer_id"],"title":"Histogram","type":"object"},{"additionalProperties":false,"description":"Shows the categories of an attribute 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`: sum, average, min, max, median, or count of distinct values.","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"},"title":{"description":"Display title.","type":"string"},"type":{"description":"The component type. Immutable after creation.","enum":["bar_chart"],"type":"string"}},"required":["type","data","config","id","layer_id"],"title":"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`: sum, average, min, max, median, or count of distinct values.","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"},"title":{"description":"Display title.","type":"string"},"type":{"description":"The component type. Immutable after creation.","enum":["time_series"],"type":"string"}},"required":["type","data","config","id","layer_id"],"title":"Time series","type":"object"},{"additionalProperties":false,"description":"An interactive dropdown or slider for filtering the layer by an attribute's values.","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"},"title":{"description":"Display title. Defaults to the attribute name.","type":"string"},"type":{"description":"The component type. Immutable after creation.","enum":["filter"],"type":"string"}},"required":["type","data","config","id","layer_id"],"title":"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.
