Copy for LLM[View as Markdown](https://docs.planet.com/develop/apis/batch-statistical/reference/) # Batch Statistical API Reference * Batch Stats API * Statistical * postSubmit a new statistical batch request * getQuery statistical batch requests * getRetrieve a single batch statistical request * getRetrieve the status of a batch statistical request. * postRequest analysis of a batch statistical request * postStart (confirm) processing of a batch statistical request * postStop a batch statistical request [API docs by Redocly](https://redocly.com/redoc/) # API Reference (1.0.0) Download OpenAPI specification:[Download](https://docs.planet.com/redocusaurus/sh-prod-batch-statistical-api-spec.yaml) ## [](#tag/batch_statistical)Statistical ## [](#tag/batch_statistical/operation/createNewBatchStatisticsRequest)Submit a new statistical batch request ##### Authorizations: *OAuth2* ##### Request Body schema:application/jsonapplication/json | | | | ------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | inputrequired | object (BatchStatisticalInput) | | aggregationrequired | object (BatchStatisticalRequestAggregation)Specifies how data is aggregated and processed before statistics is calculated. `timeRange` and `aggregationInterval` combined define sampling intervals in time dimension. Width/height or resx/resy combined with `input.bounds` define a sample matrix (i.e. "image") in spatial dimension. | | calculations | 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. | | outputrequired | S3BucketInfoTemplated (object) or GSBucketInfoTemplated (object) (ObjectStorageOutputInfoV2) | ### Responses **201** Request submitted **400** Bad request **401** Unauthorized **403** Insufficient permissions post/statistics/batch/v1 https\://services.sentinel-hub.com/statistics/batch/v1 ### Request samples * Payload Content type application/jsonapplication/json Copy Expand all Collapse all `{ "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 }, "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 Content type application/json Copy Expand all Collapse all `{ "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "status": "CREATED", "error": "string", "completionPercentage": 0, "lastUpdated": "2019-08-24T14:15:22Z", "costPU": 0, "costMC": 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 }, "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" }` ## [](#tag/batch_statistical/operation/searchBatchStatisticsRequests)Query statistical batch requests ##### Authorizations: *OAuth2* ##### query Parameters | | | | --------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | count | integer \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 | stringWhen 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 | stringEnum: "created" "created:desc" "status" "status:desc"Sort the statistical batch requests by given field. Omit for default ordering. | ### Responses **200** Successful response **401** Unauthorized **403** Insufficient permissions get/statistics/batch/v1 https\://services.sentinel-hub.com/statistics/batch/v1 ### Response samples * 200 Content type application/json Copy Expand all Collapse all `{ "data": [ { "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "status": "CREATED", "error": "string", "completionPercentage": 0, "lastUpdated": "2019-08-24T14:15:22Z", "costPU": 0, "costMC": 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 }, "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", "@id": "http://example.com", "next": "http://example.com", "previous": "http://example.com" } }` ## [](#tag/batch_statistical/operation/getSingleBatchStatisticalRequestById)Retrieve a single batch statistical request ##### Authorizations: *OAuth2* ##### path Parameters | | | | ----------------- | ------------------------ | | requestIdrequired | string \Request ID | ### Responses **200** Successful response **401** Unauthorized **403** Insufficient permissions **404** Not found get/statistics/batch/v1/{requestId} https\://services.sentinel-hub.com/statistics/batch/v1/{requestId} ### Response samples * 200 * 404 Content type application/json Copy Expand all Collapse all `{ "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "status": "CREATED", "error": "string", "completionPercentage": 0, "lastUpdated": "2019-08-24T14:15:22Z", "costPU": 0, "costMC": 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 }, "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" }` ## [](#tag/batch_statistical/operation/batchStatisticalGetStatus)Retrieve the status of a batch statistical request. ##### Authorizations: *OAuth2* ##### path Parameters | | | | ----------------- | ------------------------ | | requestIdrequired | string \Request ID | ### Responses **200** Successful response **400** Bad request **401** Unauthorized **403** Insufficient permissions **404** Not found get/statistics/batch/v1/{requestId}/status https\://services.sentinel-hub.com/statistics/batch/v1/{requestId}/status ### Response samples * 200 * 400 * 404 Content type application/json Copy `{ "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "status": "CREATED", "error": "string", "completionPercentage": 0, "lastUpdated": "2019-08-24T14:15:22Z", "costPU": 0, "costMC": 0, "created": "2019-08-24T14:15:22Z", "stoppedStatusReason": "OUT_OF_PU" }` ## [](#tag/batch_statistical/operation/batchStatisticalAnalyse)Request analysis of a batch statistical request ##### Authorizations: *OAuth2* ##### path Parameters | | | | ----------------- | ------------------------ | | requestIdrequired | string \Request ID | ### Responses **204** Success **400** Bad request **401** Unauthorized **403** Insufficient permissions **404** Not found post/statistics/batch/v1/{requestId}/analyse https\://services.sentinel-hub.com/statistics/batch/v1/{requestId}/analyse ### Response samples * 400 * 404 Content type application/json Copy Expand all Collapse all `{ "error": { "status": 0, "reason": "string", "message": "string", "code": "COMMON_BAD_PAYLOAD", "errors": { } } }` ## [](#tag/batch_statistical/operation/batchStartStatisticalRequest)Start (confirm) processing of a batch statistical request ##### Authorizations: *OAuth2* ##### path Parameters | | | | ----------------- | ------------------------ | | requestIdrequired | string \Request ID | ### Responses **204** Success **400** Bad request **401** Unauthorized **403** Insufficient permissions **404** Not found post/statistics/batch/v1/{requestId}/start https\://services.sentinel-hub.com/statistics/batch/v1/{requestId}/start ### Response samples * 400 * 404 Content type application/json Copy Expand all Collapse all `{ "error": { "status": 0, "reason": "string", "message": "string", "code": "COMMON_BAD_PAYLOAD", "errors": { } } }` ## [](#tag/batch_statistical/operation/batchStopStatisticalRequest)Stop a batch statistical request ##### Authorizations: *OAuth2* ##### path Parameters | | | | ----------------- | ------------------------ | | requestIdrequired | string \Request ID | ### Responses **204** Success **401** Unauthorized **403** Insufficient permissions **404** Not found post/statistics/batch/v1/{requestId}/stop https\://services.sentinel-hub.com/statistics/batch/v1/{requestId}/stop ### Response samples * 404 Content type application/json Copy Expand all Collapse all `{ "error": { "status": 0, "reason": "string", "message": "string", "code": "COMMON_BAD_PAYLOAD", "errors": { } } }`