Statistical API Reference
API Reference (1.0.0)
Download OpenAPI specification:Download
This page contains the documentation on how to use sentinel hub services through API calls.
Note: This documentation is not complete
Submit statistical request
Authorizations:
OAuth2
Request Body schema:
required | object (ProcessRequestInput) |
required | object (StatisticalRequestAggregation) Specifies how data is aggregated and processed before statistics is calculated. |
object (StatisticalRequestCalculations) Define which statistics and histogram to calculate. It can be specified differently for each evalscript output. If omitted only the basic statistic (min, max, mean, stDev) will be calculated. |
Responses
Request samples
- Payload
Content type
{- "input": {
- "bounds": {
- "bbox": {
- "0": 13.822174072265625,
- "1": 45.85080395917834,
- "2": 14.55963134765625,
- "3": 46.29191774991382
}, - "geometry": {
- "type": "Polygon",
- "coordinates": {
- "0": {
- "0": {
- "0": 14.000701904296873,
- "1": 46.23685258143992
}, - "1": {
- "0": 13.822174072265625,
- "1": 46.09037664604301
}, - "2": {
- "0": 14.113311767578125,
- "1": 45.85080395917834
}, - "3": {
- "0": 14.55963134765625,
- "1": 46.038922598236
}, - "4": {
- "0": 14.441528320312498,
- "1": 46.28717293114449
}, - "5": {
- "0": 14.17236328125,
- "1": 46.29191774991382
}, - "6": {
- "0": 14.000701904296873,
- "1": 46.23685258143992
}
}
}
},
}, - "data": [
- {
- "type": "sentinel-2-l1c",
- "id": "string",
- "dataFilter": {
- "timeRange": {
- "from": "2018-10-01T00:00:00.000Z",
- "to": "2018-11-01T00:00:00.000Z"
}, - "mosaickingOrder": "mostRecent",
- "maxCloudCoverage": 100,
- "previewMode": "DETAIL"
}, - "processing": {
- "upsampling": "NEAREST",
- "downsampling": "NEAREST",
- "harmonizeValues": true
}
}
]
}, - "aggregation": {
- "timeRange": {
- "from": "2019-08-24T14:15:22Z",
- "to": "2019-08-24T14:15:22Z"
}, - "aggregationInterval": {
- "of": "string",
- "lastIntervalBehavior": "SKIP"
}, - "width": 512,
- "height": 512,
- "resx": 0.1,
- "resy": 0.1,
- "evalscript": "string"
}, - "calculations": {
- "output name1": {
- "histograms": {
- "band name1": {
- "nBins": 0,
- "binWidth": 0,
- "lowEdge": 0,
- "highEdge": 0,
- "bins": [
- 0
]
}, - "band name2": {
- "nBins": 0,
- "binWidth": 0,
- "lowEdge": 0,
- "highEdge": 0,
- "bins": [
- 0
]
}
}, - "statistics": {
- "band name1": {
- "percentiles": {
- "k": [
- 1
]
}
}, - "band name2": {
- "percentiles": {
- "k": [
- 1
]
}
}
}
}, - "output name2": {
- "histograms": {
- "band name1": {
- "nBins": 0,
- "binWidth": 0,
- "lowEdge": 0,
- "highEdge": 0,
- "bins": [
- 0
]
}, - "band name2": {
- "nBins": 0,
- "binWidth": 0,
- "lowEdge": 0,
- "highEdge": 0,
- "bins": [
- 0
]
}
}, - "statistics": {
- "band name1": {
- "percentiles": {
- "k": [
- 1
]
}
}, - "band name2": {
- "percentiles": {
- "k": [
- 1
]
}
}
}
}
}
}Response samples
- 200
- 400
Content type
application/json
{- "data": [
- {
- "interval": {
- "from": "2019-08-24T14:15:22Z",
- "to": "2019-08-24T14:15:22Z"
}, - "outputs": {
- "output name1": {
- "bands": {
- "band name1": {
- "histogram": {
- "overflow": 0,
- "underflow": 0,
- "bins": [
- {
- "lowEdge": null,
- "highEdge": null,
- "count": null
}
]
}, - "stats": {
- "min": 0,
- "max": 0,
- "mean": 0,
- "stDev": 0,
- "sampleCount": 0,
- "noDataCount": 0,
- "percentiles": {
- "percentile [0,1]1": 0.1,
- "percentile [0,1]2": 0.1
}
}
}, - "band name2": {
- "histogram": {
- "overflow": 0,
- "underflow": 0,
- "bins": [
- {
- "lowEdge": null,
- "highEdge": null,
- "count": null
}
]
}, - "stats": {
- "min": 0,
- "max": 0,
- "mean": 0,
- "stDev": 0,
- "sampleCount": 0,
- "noDataCount": 0,
- "percentiles": {
- "percentile [0,1]1": 0.1,
- "percentile [0,1]2": 0.1
}
}
}
}
}, - "output name2": {
- "bands": {
- "band name1": {
- "histogram": {
- "overflow": 0,
- "underflow": 0,
- "bins": [
- {
- "lowEdge": null,
- "highEdge": null,
- "count": null
}
]
}, - "stats": {
- "min": 0,
- "max": 0,
- "mean": 0,
- "stDev": 0,
- "sampleCount": 0,
- "noDataCount": 0,
- "percentiles": {
- "percentile [0,1]1": 0.1,
- "percentile [0,1]2": 0.1
}
}
}, - "band name2": {
- "histogram": {
- "overflow": 0,
- "underflow": 0,
- "bins": [
- {
- "lowEdge": null,
- "highEdge": null,
- "count": null
}
]
}, - "stats": {
- "min": 0,
- "max": 0,
- "mean": 0,
- "stDev": 0,
- "sampleCount": 0,
- "noDataCount": 0,
- "percentiles": {
- "percentile [0,1]1": 0.1,
- "percentile [0,1]2": 0.1
}
}
}
}
}
}, - "error": {
- "type": "BAD_REQUEST"
}
}
]
}