Create a new index
Creates a new custom index with the provided parameters. This endpoint is for creating custom indices only; preset indices are pre-generated and can be viewed using the list indices endpoint.
POST/v0/indices
Authorisations
AuthorizationString
Request Body
namestringrequired
Example: "NDVI"descriptionstringrequired
Example: "This formula will give insights about vegetation"rescaleinteger[]required
Example: [0,1]expressionstringrequired
Example: "(B04-B08)/(B04+B08)"colormapstringrequired
Example: "rplumbho"satellite_idstringrequired
Example: "0002a3a3-00a2-4b55-842b-44d8202c6d60"expression_typestringrequired
Example: "index"Response
Createdapplication/json
bandsstring[]
Example: ["B01","B02","B03"]colormapstring
Example: "rplumbho"created_atstring
Example: "2022-11-14 12:55:49.125928+00:00"descriptionstring
Example: "This formula will give insights about vegetation"expressionstring
Example: "(B04-B08)/(B04+B08)"expression_typestring
Example: "index"idstring
Example: "e9767554-550e-4464-a677-b8cf096073ab"namestring
Example: "NDVI"rescaleinteger[]
Example: [0,1]satellite_idstring
Example: "0002a3a3-00a2-4b55-842b-44d8202c6d60"typestring
Example: "custom"updated_atstring
Example: "2022-11-14 12:55:49.125928+00:00"Create a new index
1curl -X POST 'https://api.pixxel.space/v0/indices' \2 -H 'Authorization: YOUR_API_KEY' \3 -H 'Content-Type: application/json' \4 -d '{5 "name": "NDVI",6 "description": "This formula will give insights about vegetation",7 "rescale": [8 0,9 110 ],11 "expression": "(B04-B08)/(B04+B08)",12 "colormap": "rplumbho",13 "satellite_id": "0002a3a3-00a2-4b55-842b-44d8202c6d60",14 "expression_type": "index"15}'
Response:
{"bands": ["B01","B02","B03"],"colormap": "rplumbho","created_at": "2022-11-14 12:55:49.125928+00:00","description": "This formula will give insights about vegetation","expression": "(B04-B08)/(B04+B08)","expression_type": "index","id": "e9767554-550e-4464-a677-b8cf096073ab","name": "NDVI","rescale": [0,1],"satellite_id": "0002a3a3-00a2-4b55-842b-44d8202c6d60","type": "custom","updated_at": "2022-11-14 12:55:49.125928+00:00"}