I am currently trying to do a request with the Statistical API on a BOYC endpoint.
The endoint is available as a WMS layer, so there is definitly data.
However, I always get:
{
"error": {
"status": 400,
"reason": "Bad Request",
"message": "Processing error.",
"code": "COMMON_EXCEPTION"
}
}
This is my request:
body:
{
"input": {
"bounds": {
"bbox": [1097203.75176, 7306941.069933, 1113874.402104, 7326203.236361],
"properties": {
"crs": "http://www.opengis.net/def/crs/EPSG/0/3857"
}
},
"data": [
{ "dataFilter": {}, "type": "byoc-CollectionID" }
]
},
"aggregation": {
"timeRange": {
"from": "2020-03-01T00:00:00Z",
"to": "2020-08-01T23:59:59Z"
},
"aggregationInterval": {
"of": "P30D"
},
"width": 512,
"height": 445.005,
"evalscript": "//VERSION=3\nfunction setup() {\n return {\n input: [\n {\n bands: [\"DM\", \"dataMask\"],\n },\n ],\n output: {\n bands: 2,\n },\n };\n}\nfunction evaluatePixel(samples) {\nreturn {\n data: [samples.DM],\n dataMask: [samples.dataMask],\n };\n}\n"
},
"calculations": {
"default": {}
}
}
evalscript:
//VERSION=3
function setup() {
return {
input: [
{
bands: ["DM", "dataMask"],
},
],
output: {
bands: 2,
},
};
}
function evaluatePixel(samples) {
return {
data: [samples.DM],
dataMask: [samples.dataMask],
};
}
I am testing using Postman.