Layers
Last updated
Was this helpful?
Last updated
Was this helpful?
Check our Upload Anything docs to see what URLs are supported.
The /upload
endpoint can be used for both URL and file uploads:
For URL uploads, simply making a single POST
request to the upload endpoint is enough
For file uploads, the response of the initial POST
request will include a target URL and some pre-signed attributes, which will be used to upload the new file to Amazon S3.
This endpoint is used to create a layer, and obtain a pre-signed url to upload the layer files to S3.
Uploading a file is a single function call using the felt-python
library.
Layer files aren’t uploaded directly to the Felt API. Instead, they are uploaded by your client directly to an S3 bucket.
You will receive a single set of URL and pre-signed params to upload the file. Only a single file may be uploaded — if you wish to upload several files at once, consider wrapping them in a zip file.
To upload the file using the pre-signed params, you must perform a multipart upload, and include the file contents in the file
field:
Refreshing a file is a single function call using the felt-python
library.
After uploading a file or URL, you may want to update the resulting layer with some new data. The process is quite similar to the above:
For URL uploads, simply making a single POST
request to the refresh endpoint is enough
For file uploads, the response of the initial POST
request will include a URL and some presigned attributes, which will be used to upload the new file to Amazon S3. See Uploading the file to Amazon S3 for more details.
A layer's style may be updated by providing a new Felt Style Language object. Learn more in the guide:
Get the details of all the layer on the map that are not within a layer group.
Get the details of a single layer on the map. These details include:
Name of the layer
Upload status and progress
Style, expressed in the Felt Style Language
Other metadata, such as the geometry type, visibility state in the legend, etc
Update a layer's name or move it into or out of a layer group.
To move a layer into a group, set the layer_group_id
to the id
of the layer group you want to move the layer into. To move a layer out of a group, set the layer_group_id
to null
.
Provide an array of layer group objects to create new groups or update existing ones.
For each layer group object, including an existing ID will result in the group's details (name, subtitle and legend order) being updated. If no layer group ID is provided (or a non-existent one is provided), a new layer group will be created.
List all layers in your workspace's Library
Publish a layer to your workspace's library
Publish a layer group to your workspace's library
Get a link to export a layer as a GeoPackage (vector layers) or GeoTIFF (raster layers)
Create an export request of a layer as a GeoPackage, GeoJSON, or CSV. Optionally include filters with the layer. Export requests are asynchronous. A successful response will return a poll_endpoint to check the status of the export.
Check the status of an Custom Export. If successful, the response will include a download_url
Duplicate an array of layers or layer groups to a map
/api/v2/maps/{map_id}/upload
The ID of the map to upload the layer to.
A public URL containing geodata to import, in place of uploading a file.
(Image uploads only) The latitude of the image center.
(Image uploads only) The longitude of the image center.
The display name for the new layer.
(Image uploads only) The zoom level of the image.
/api/v2/maps/{map_id}/layers/{layer_id}/refresh
The ID of the map hosting the layer to refresh
The ID of the layer to refresh
/api/v2/maps/{map_id}/layers/{layer_id}
The ID of the map to delete the layer from
The ID of the layer to delete
No body
/api/v2/maps/{map_id}/layers/{layer_id}/update_style
The ID of the map where the layer is located
The ID of the layer to update the style of
The new layer style, specified in Felt Style Language format
/api/v2/maps/{map_id}/layers
/api/v2/maps/{map_id}/layers/{layer_id}
/api/v2/maps/{map_id}/layers
nOFB8jOFSne1DuDr2uFn4A
KFFhKAbvS4anD3wxtwNEpD
My Layer
A very interesting dataset
15 min
, 30 min
, hour
, 3 hours
, 6 hours
, 12 hours
, day
, week
, month
, disabled
/api/v2/maps/{map_id}/layer_groups/{layer_group_id}
/api/v2/maps/{map_id}/layer_groups/{layer_group_id}
The ID of the map to delete the layer group from
The ID of the layer group to delete
No body
/api/v2/maps/{map_id}/layer_groups
OI22G7wJRzOo2p1RQeHIPB
My Layer Group
A very interesting group
/api/v2/library
Defaults to listing library layers for your "workspace". Use "felt" to list layers from the Felt data library. Use "all" to list layers from both sources.
workspace
, felt
, all
/api/v2/maps/{map_id}/layers/{layer_id}/publish
The ID of the map where the layer is located
The ID of the layer to publish
The name to publish the layer under
My Layer
/api/v2/maps/{map_id}/layer_groups/{layer_group_id}/publish
The ID of the map where the layer group is located
The ID of the layer group to publish
The name to publish the layer group under
My Layer Group
/api/v2/maps/{map_id}/layers/{layer_id}/get_export_link
The ID of the map where the layer is located
The ID of the layer to export
/api/v2/maps/{map_id}/layers/{layer_id}/custom_export
The ID of the map where the layer is located
The ID of the layer to export
csv
csv
, gpkg
, geojson
Send an email to the requesting user when the export completes. Defaults to true
Filters for the layer in specified in Felt Style Language filter format
/api/v2/maps/{map_id}/layers/{layer_id}/custom_exports/{export_id}
The ID of the map where the layer is located
The ID of the layer to export
The ID of the export
/api/v2/duplicate_layers