Examples for Skysat
To request data using any of the request below, you will need to replace the string <your access token>
with your Sentinel Hub access token. Sentinel Hub access token can be obtained as described in the Authentication chapter. It will look something like this:
ayJhbGciOiJSUzI1NiJ9.ayJzdWIiOiI0MmYwODZjCy1kMzI3LTRlOTMtYWMxNS00ODAwOGFiZjI0YjIiLCJhdWQiOiJlY2I1MGM1Zi1iMWM1LTQ3ZTgtYWE4NC0zZTU4NzJlM2I2MTEiLCJqdGkiOiI5MzYxMWE4ODEyNTM4Y2M0MmU0NDJjYjUyMTY0YmJlNyIsImV4cCI6MTU1NTQyMzk3MiwibmFtZSI6ImFuamEudnJlY2tvQHNpbmVyZ2lzZS5jb20iLCJlbWFpbCI6ImFuamEudnJlY2tvQHNpbmVyZ2lzZS5jb20iLCJzaWQiOiIzZjVjZDVkNS04MjRiLTQ3ZjYtODgwNy0wNDMyNWY4ODQxZmQifQ.U7FPOy_2jlEOFxXSjyN5KEdBROna3-Dyec0feShIbUOY1p9lEXdNaMmR5euiINi2RXDayX9Kr47CuSTsvq1zHFvZs1YgkFr1iH6kDuX-t_-wfWpqu5oPjoPVKZ4Rj0Ms_dxAUTQFTXR0rlbLuO-KSgnaeLVb5iiv_qY3Ctq2XKdIRcFRQLFziFcP4yZJl-NZMlwzsiiwjakcpYpI5jSYAdU2hpZLHRzceseeZt5YfZOe5Px1kZXro9Nd0L2GPC-qzOXw_V1saMGFa2ov8qV6Dvk92iv2SDDdGhOdII_JOf8XkK4E3g2z0EEFdWhG9F4Iky4ukNsqBPgE8LRb31s0hg
A Postman collection with the examples can be downloaded here. Our Postman collections are deprecated and are not being updated since July 2022.
When your Skysat data is imported into Sentinel Hub using our Third Party Data Import API, you will receive the collection ID, with which you need to replace the collection ID bff11d69-5262-4fff-9263-a5d4ecf65909
(or 7402d0eb-0987-4f05-a8e6-e4c69645a505
) used in the examples in "type": "byoc-bff11d69-5262-4fff-9263-a5d4ecf65909"
(or "type": "byoc-7402d0eb-0987-4f05-a8e6-e4c69645a505
). You will also need to adjust the values of bounds and timeRange parameters, so that they correspond to your data.
True Color
curl -X POST \https://services.sentinel-hub.com/api/v1/process \-H 'Authorization: Bearer <your access token>' \-F 'request={"input": {"bounds": {"properties": {"crs": "http://www.opengis.net/def/crs/EPSG/0/32633"},"bbox": [455436.85, 5096625.41, 455500.63, 5096671.07]},"data": [{"type": "byoc-bff11d69-5262-4fff-9263-a5d4ecf65909","dataFilter": {"timeRange": {"from": "2021-06-01T00:00:00Z","to": "2021-06-30T23:59:59Z"}}}]},"output": {"resx": 0.5,"resy": 0.5}}' \-F 'evalscript=//VERSION=3function setup() {return {input: [{"bands": ["blue", "red", "green","dataMask"]}],output: { bands: 4}}}var f = 2.5 / 10000function evaluatePixel(sample) {return [sample.red*f, sample.green*f, sample.blue*f, sample.dataMask]}'
Panchromatic Image
curl -X POST \https://services.sentinel-hub.com/api/v1/process \-H 'Authorization: Bearer <your access token>' \-F 'request={"input": {"bounds": {"properties": {"crs": "http://www.opengis.net/def/crs/EPSG/0/32633"},"bbox": [455436.85, 5096625.41, 455500.63, 5096671.07]},"data": [{"type": "byoc-7402d0eb-0987-4f05-a8e6-e4c69645a505","dataFilter": {"timeRange": {"from": "2021-06-01T00:00:00Z","to": "2021-06-30T23:59:59Z"}}}]},"output": {"resx": 0.5,"resy": 0.5}}' \-F 'evalscript=//VERSION=3function setup() {return {input: [{"bands": ["pan","dataMask"]}],output: { bands: 4}}}var f = 10000function evaluatePixel(sample) {return [sample.pan/f, sample.pan/f, sample.pan/f, sample.dataMask]}'
NDVI visualized using valueInterpolate function
curl -X POST \https://services.sentinel-hub.com/api/v1/process \-H 'Authorization: Bearer <your access token>' \-F 'request={"input": {"bounds": {"properties": {"crs": "http://www.opengis.net/def/crs/EPSG/0/32633"},"bbox": [455436.85, 5096625.41, 455500.63, 5096671.07]},"data": [{"type": "byoc-bff11d69-5262-4fff-9263-a5d4ecf65909","dataFilter": {"timeRange": {"from": "2021-06-01T00:00:00Z","to": "2021-06-30T23:59:59Z"}}}]},"output": {"resx": 0.5,"resy": 0.5}}' \-F 'evalscript=//VERSION=3function setup() {return {input: [{"bands": ["red", "nir","dataMask"]}],output: { bands: 4}}}var f = 10000function evaluatePixel(sample) {var NDWI = index (sample.nir/f, sample.red/f)return valueInterpolate (NDWI,[-1, -0.5, 0.2, 0.3, 0.4, 0.5, 1.0],[[1, 0, 1, sample.dataMask],[1, 0.5, 0, sample.dataMask],[1, 1, 0, sample.dataMask],[0.2, 1, 0.5, sample.dataMask],[0,0, 1, sample.dataMask],[0, 0, 0.3, sample.dataMask],[0, 0, 0, sample.dataMask],])}'
Multispectral and panchromatic raw bands in one request (data fusion)
curl -X POST \https://services.sentinel-hub.com/api/v1/process \-H 'Authorization: Bearer <your access token>' \-F 'request={"input": {"bounds": {"properties": {"crs": "http://www.opengis.net/def/crs/EPSG/0/32633"},"bbox": [455436.85, 5096625.41, 455500.63, 5096671.07]},"data": [{"id": "MS","type": "byoc-bff11d69-5262-4fff-9263-a5d4ecf65909","dataFilter": {"timeRange": {"from": "2021-06-01T00:00:00Z","to": "2021-06-30T23:59:59Z"}}},{"id": "Pan","type": "byoc-7402d0eb-0987-4f05-a8e6-e4c69645a505","dataFilter": {"timeRange": {"from": "2021-06-01T00:00:00Z","to": "2021-06-30T23:59:59Z"}}}]},"output": {"resx": 0.5,"resy": 0.5,"responses": [{"identifier": "default","format": {"type": "image/tiff"}}]}}' \-F 'evalscript=//VERSION=3function setup() {return {input: [{datasource: "MS", "bands": ["blue", "green", "red", "nir"]},{datasource: "Pan", "bands": ["pan"]}],output: { bands: 5, sampleType: "UINT16"}}}var f = 65535 / 10000function evaluatePixel(samples) {var sampleMS = samples.MS[0]var samplePan = samples.Pan[0]return [sampleMS.red*f, sampleMS.green*f, sampleMS.blue*f, sampleMS.nir*f, samplePan.pan*f]}'