sat-archive API (0.1)

Download OpenAPI specification:Download

API Support: support@kisanhub.com

SatArchive acts as a one-stop shop for accessing KisanHub's satellite data. It provides an intuitive set of APIs for managing the downloading and processing of satellite imagery for ingestion into the KisanHub webapp, as well as for use in research activities.

dateband

Interacting with dateband records

Create a DateBandRecord

Request Body schema: application/json
mission
required
string (Mission)

Mission shortcode

date
required
string <date> (Date)

Date of entry

band
required
string (Band)

Band shortcode

key
required
string (Key)

File key on storage

rowcol_id
required
integer (PrimaryKey) >= 1

Primary key

Responses

201

OK

post /dateband

SatArchive server

https://sat-archive-wp4a3kxs2q-ew.a.run.app/dateband

Request samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "mission": "string",
  • "date": "2020-04-09",
  • "band": "string",
  • "key": "string",
  • "rowcol_id": 1
}

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "id": 1,
  • "rowcol_id":
    {
    },
  • "mission": "string",
  • "date": "2020-04-09",
  • "band": "string",
  • "key": "string"
}

List all DateBandRecords

query Parameters
rowcol_id
integer

ID of the rowcol to query

Responses

200

OK

get /dateband

SatArchive server

https://sat-archive-wp4a3kxs2q-ew.a.run.app/dateband

Response samples

Content type
application/json
Copy
Expand all Collapse all
[
  • {
    }
]

Retrieve a DateBandRecord by id

path Parameters
id
required
integer

ID of the dateband to query

Responses

200

OK

get /dateband/{id}

SatArchive server

https://sat-archive-wp4a3kxs2q-ew.a.run.app/dateband/{id}

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "id": 1,
  • "rowcol_id":
    {
    },
  • "mission": "string",
  • "date": "2020-04-09",
  • "band": "string",
  • "key": "string"
}

Deletes the given DateBandRecord

path Parameters
id
required
integer

ID of the dateband to query

Responses

204

No content

delete /dateband/{id}

SatArchive server

https://sat-archive-wp4a3kxs2q-ew.a.run.app/dateband/{id}

dates

Dates of satellite imagery

Get provisioned dates for a given rowcol id

path Parameters
rowcol_id
required
integer

ID of the rowcol to query

Responses

200

OK

get /provisioned-dates/{rowcol_id}

SatArchive server

https://sat-archive-wp4a3kxs2q-ew.a.run.app/provisioned-dates/{rowcol_id}

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "S1":
    [
    ],
  • "S2":
    [
    ]
}

Show all dates available via the SentinelHub API for a given rowcol

path Parameters
rowcol_id
required
integer

ID of the rowcol to query

start_date
required
string <date>
Example: 2018-02-01

Start date to search from

end_date
required
string <date>
Example: 2018-05-01

End date to search to

Responses

200

OK

get /available-dates/{rowcol_id}/{start_date}/{end_date}

SatArchive server

https://sat-archive-wp4a3kxs2q-ew.a.run.app/available-dates/{rowcol_id}/{start_date}/{end_date}

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "S1":
    [
    ],
  • "S2":
    [
    ]
}

health-check

Health check to ensure service is running

Health check to ensure service is running

Responses

200

OK

get /health-check

SatArchive server

https://sat-archive-wp4a3kxs2q-ew.a.run.app/health-check

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "status": "online"
}

intersects

Queries for polygons intersecting rowcols

Get ids of rowcols which intersect with a given geometry

Request Body schema: application/json
geojson
object (Polygon)

A geojson polygon

Responses

200

OK

400

Bad request

post /intersects

SatArchive server

https://sat-archive-wp4a3kxs2q-ew.a.run.app/intersects

Request samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "geojson":
    {
    }
}

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "rowcol_ids":
    [
    ]
}

migrate

Migration operations

Runs migrations

Responses

200

OK

get /migrate

SatArchive server

https://sat-archive-wp4a3kxs2q-ew.a.run.app/migrate

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "message": "migration successful"
}

provision

Provision data to the SatArchive

Provision a tile for a given date, mission and band using sentinelhub as the data source.

Request Body schema: application/json
band
required
string (Band)

Band shortcode

date
required
string <date> (Date)

Date of entry

rowcol_id
required
integer (PrimaryKey) >= 1

Primary key

mission
required
string (Mission)

Mission shortcode

Responses

200

OK

400

Bad request

post /provision/sentinelhub

SatArchive server

https://sat-archive-wp4a3kxs2q-ew.a.run.app/provision/sentinelhub

Request samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "band": "string",
  • "date": "2020-04-09",
  • "rowcol_id": 1,
  • "mission": "string"
}

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "key": "file_key.tif"
}

Provision a tile for a given date, mission and band using AWS as the datasource.

Request Body schema: application/json
band
required
string (Band)

Band shortcode

date
required
string <date> (Date)

Date of entry

rowcol_id
required
integer (PrimaryKey) >= 1

Primary key

mission
required
string (Mission)

Mission shortcode

Responses

200

OK

400

Bad request

post /provision/aws

SatArchive server

https://sat-archive-wp4a3kxs2q-ew.a.run.app/provision/aws

Request samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "band": "string",
  • "date": "2020-04-09",
  • "rowcol_id": 1,
  • "mission": "string"
}

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "key": "file_key.tif"
}

Provision a rowcol for a given date range.

Request Body schema: application/json
start_date
required
string <date> (StartDate)

Start date of search

end_date
required
string <date> (EndDate)

End date of search

rowcol_id
required
integer (PrimaryKey) >= 1

Primary key

bands
required
object (BandsParam)

Dictionary specifying which bands to provision for the request

Responses

200

OK

400

Bad request

post /provision-dates

SatArchive server

https://sat-archive-wp4a3kxs2q-ew.a.run.app/provision-dates

Request samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "start_date": "2020-04-09",
  • "end_date": "2020-04-09",
  • "rowcol_id": 1,
  • "bands":
    {
    }
}

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "key": "file_key.tif"
}

retrieve

Retrieve data from the SatArchive

Retrieve data for a given polygon

Request Body schema: application/json
geojson
required
object (Polygon)

A geojson polygon

poly_id
required
string

Id of the polygon for use in creating the path to save to

dst_bucket
required
string

Bucket to write the clipped files to

bands
required
object (BandsParam)

Dictionary specifying which bands to provision for the request

date_range
Array of strings <date>

Start and end date to provision

Responses

200

OK

400

Bad request

post /retrieve

SatArchive server

https://sat-archive-wp4a3kxs2q-ew.a.run.app/retrieve

Request samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "geojson":
    {
    },
  • "poly_id": "string",
  • "dst_bucket": "string",
  • "bands":
    {
    },
  • "date_range":
    [
    ]
}

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "file_keys":
    [
    ]
}

rowcol

Interacting with rowcol records

Get ids of active rowcols

Responses

200

OK

get /active-rowcols

SatArchive server

https://sat-archive-wp4a3kxs2q-ew.a.run.app/active-rowcols

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "rowcol_ids":
    [
    ]
}

Retrieve a RowColRecord

path Parameters
id
required
string

ID of the rowcol to query

Responses

200

OK

get /rowcol/{id}

SatArchive server

https://sat-archive-wp4a3kxs2q-ew.a.run.app/rowcol/{id}

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "id": 1,
  • "row": 0,
  • "col": 0,
  • "geom":
    {
    }
}

Set a grid cell to active

Patch endpoint to activate a given gridcell

Request Body schema: application/json
rowcol_id
required
integer

Responses

200

OK

400

Bad request

patch /activate

SatArchive server

https://sat-archive-wp4a3kxs2q-ew.a.run.app/activate

Request samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "rowcol_id": 100
}

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "message": "rowcol 100 activated"
}

Set a grid cell to inactive

Patch endpoint to deactivate a given gridcell

Request Body schema: application/json
rowcol_id
required
integer

Responses

200

OK

400

Bad request

patch /deactivate

SatArchive server

https://sat-archive-wp4a3kxs2q-ew.a.run.app/deactivate

Request samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "rowcol_id": 100
}

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "message": "rowcol 100 deactivated"
}

update

Update records

Updates rowcols with latest data

Request Body schema: application/json
bands
object (BandsParam)

Dictionary specifying which bands to provision for the request

Responses

200

OK

post /update

SatArchive server

https://sat-archive-wp4a3kxs2q-ew.a.run.app/update

Request samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "bands":
    {
    }
}

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "message": "100 cloud tasks created"
}