Batch 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 a new statistical batch request
Authorizations:
Request Body schema:
required | object (BatchStatisticalInput) |
required | object (BatchStatisticalRequestAggregation) 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. | |
required | object (ObjectStorageOutputInfo) Storage location where the results shall be written. |
Responses
Request samples
- Payload
{- "input": {
- "features": {
- "s3": {
- "url": "string",
- "iamRoleARN": "string",
- "accessKey": "string",
- "secretAccessKey": "string",
- "region": "string"
}
}, - "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",
- "evalscriptReference": {
- "s3": {
- "url": "string",
- "iamRoleARN": "string",
- "accessKey": "string",
- "secretAccessKey": "string",
- "region": "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
]
}
}
}
}
}, - "output": {
- "s3": {
- "url": "string",
- "iamRoleARN": "string",
- "accessKey": "string",
- "secretAccessKey": "string",
- "region": "string"
}
}
}Response samples
- 201
- 400
{- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "status": "CREATED",
- "error": "string",
- "completionPercentage": 0,
- "lastUpdated": "2019-08-24T14:15:22Z",
- "costPu": 0,
- "created": "2019-08-24T14:15:22Z",
- "stoppedStatusReason": "OUT_OF_PU",
- "request": {
- "input": {
- "features": {
- "s3": {
- "url": "string",
- "iamRoleARN": "string",
- "accessKey": "string",
- "secretAccessKey": "string",
- "region": "string"
}
}, - "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",
- "evalscriptReference": {
- "s3": {
- "url": "string",
- "iamRoleARN": "string",
- "accessKey": "string",
- "secretAccessKey": "string",
- "region": "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
]
}
}
}
}
}, - "output": {
- "s3": {
- "url": "string",
- "iamRoleARN": "string",
- "accessKey": "string",
- "secretAccessKey": "string",
- "region": "string"
}
}
}, - "userAction": "NONE",
- "userActionUpdated": "2019-08-24T14:15:22Z",
- "domainAccountId": "4e1699b2-af74-455a-818d-6f1ec31a6d19",
- "projectId": "5a8591dd-4039-49df-9202-96385ba3eff8",
- "workspaceId": "ef0efa32-d1c1-43d4-a5e2-fe7b4f00403c"
}Query statistical batch requests
Authorizations:
query Parameters
| count | integer <int32> Upper limit to the number of items to retrieve. It cannot be larger than the endpoint-specific limit. If omitted, the endpoint-specific limit is used. For more records, use viewtoken to page through. |
| viewtoken | string When the total number of items is larger than count, the response contains viewtoken. This viewtoken can be used in the next request to retrieve the next page of items. The next page can be retrieved by repeating the query. However, replace your URL with the next URL in the returned links object. |
| sort | string Enum: "created" "created:desc" "status" "status:desc" Sort the statistical batch requests by given field. Omit for default ordering. |
Responses
Response samples
- 200
{- "data": [
- {
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "status": "CREATED",
- "error": "string",
- "completionPercentage": 0,
- "lastUpdated": "2019-08-24T14:15:22Z",
- "costPu": 0,
- "created": "2019-08-24T14:15:22Z",
- "stoppedStatusReason": "OUT_OF_PU",
- "request": {
- "input": {
- "features": {
- "s3": {
- "url": "string",
- "iamRoleARN": "string",
- "accessKey": "string",
- "secretAccessKey": "string",
- "region": "string"
}
}, - "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",
- "evalscriptReference": {
- "s3": {
- "url": "string",
- "iamRoleARN": "string",
- "accessKey": "string",
- "secretAccessKey": "string",
- "region": "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": [
- null
]
}
}, - "band name2": {
- "percentiles": {
- "k": [
- null
]
}
}
}
}, - "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": [
- null
]
}
}, - "band name2": {
- "percentiles": {
- "k": [
- null
]
}
}
}
}
}, - "output": {
- "s3": {
- "url": "string",
- "iamRoleARN": "string",
- "accessKey": "string",
- "secretAccessKey": "string",
- "region": "string"
}
}
}, - "userAction": "NONE",
- "userActionUpdated": "2019-08-24T14:15:22Z",
- "domainAccountId": "4e1699b2-af74-455a-818d-6f1ec31a6d19",
- "projectId": "5a8591dd-4039-49df-9202-96385ba3eff8",
- "workspaceId": "ef0efa32-d1c1-43d4-a5e2-fe7b4f00403c"
}
], - "links": {
- "currentToken": "string",
- "nextToken": "string",
- "previousToken": "string",
}
}Retrieve a single batch statistical request
Authorizations:
path Parameters
| requestId required | string <uuid> Request ID |
Responses
Response samples
- 200
- 404
{- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "status": "CREATED",
- "error": "string",
- "completionPercentage": 0,
- "lastUpdated": "2019-08-24T14:15:22Z",
- "costPu": 0,
- "created": "2019-08-24T14:15:22Z",
- "stoppedStatusReason": "OUT_OF_PU",
- "request": {
- "input": {
- "features": {
- "s3": {
- "url": "string",
- "iamRoleARN": "string",
- "accessKey": "string",
- "secretAccessKey": "string",
- "region": "string"
}
}, - "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",
- "evalscriptReference": {
- "s3": {
- "url": "string",
- "iamRoleARN": "string",
- "accessKey": "string",
- "secretAccessKey": "string",
- "region": "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
]
}
}
}
}
}, - "output": {
- "s3": {
- "url": "string",
- "iamRoleARN": "string",
- "accessKey": "string",
- "secretAccessKey": "string",
- "region": "string"
}
}
}, - "userAction": "NONE",
- "userActionUpdated": "2019-08-24T14:15:22Z",
- "domainAccountId": "4e1699b2-af74-455a-818d-6f1ec31a6d19",
- "projectId": "5a8591dd-4039-49df-9202-96385ba3eff8",
- "workspaceId": "ef0efa32-d1c1-43d4-a5e2-fe7b4f00403c"
}Retrieve the status of a batch statistical request.
Authorizations:
path Parameters
| requestId required | string <uuid> Request ID |
Responses
Response samples
- 200
- 400
- 404
{- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "status": "CREATED",
- "error": "string",
- "completionPercentage": 0,
- "lastUpdated": "2019-08-24T14:15:22Z",
- "costPu": 0,
- "created": "2019-08-24T14:15:22Z",
- "stoppedStatusReason": "OUT_OF_PU"
}Start (confirm) processing of a batch statistical request
Authorizations:
path Parameters
| requestId required | string <uuid> Request ID |
Responses
Response samples
- 400
- 404
{- "error": {
- "status": 0,
- "reason": "string",
- "message": "string",
- "code": "COMMON_BAD_PAYLOAD",
- "errors": { }
}
}