List Files
For a better understanding of how you can implement the API into your software see Get Started
Description
This route is used to ask which files are available for a given field_name under a selected service name (ndvi,ndwi etc.).
When no service name is specified, this method returns a list of ndvi fields for the current user.
Endpoints
- /files/list/{service_name}
Method type
POST
Parameters
name | description | type | Required | Default Value |
---|---|---|---|---|
token | Your identification token | string | required | |
field_name | Name of the field | string | required | |
date | Filters files for the specified date and older. Format:YYYY-MM-DD | string | optional | |
month | Filters files for the specified month. Format:YYYY-MM | string | optional |
Responses
status code | description |
---|---|
200 | The resource has been fetched and is transmitted in the message body |
400 | The server could not understand the request due to invalid syntax |
Example Request
In this case the request is to filter by month.
POST https://spacesense-api.ew.r.appspot.com/files/list/ndvi?token=__myToken__&field_name=farm_1&month=2019-06
Example Response
{
"files": [
{
"date": "Mon, 03 Jun 2019 00:00:00 GMT",
"name": "20190603.json",
"type": "json"
},
{
"date": "Sat, 01 Jun 2019 00:00:00 GMT",
"name": "20190601.png",
"type": "png"
}
]
}