-
Notifications
You must be signed in to change notification settings - Fork 2
ArchiveAPI
Harrison Steyn edited this page Jul 5, 2023
·
15 revisions
The ArchiveAPI
object allows for access to searching and ordering methods.
Used to execute SearchRequest
objects.
Name | Type | Default Behaviour | Description |
---|---|---|---|
request |
SearchRequest |
required | The search to execute |
Returns a SearchResponse
objects.
Used to execute OrderRequest
objects. Note: some scenes may require payment.
Name | Type | Default Behaviour | Description |
---|---|---|---|
request |
OrderRequest |
required | The order to execute |
Returns an OrderResult
Used to execute BatchOrderRequest
objects. Note: some scenes may require payment.
Name | Type | Default Behaviour | Description |
---|---|---|---|
request |
BatchOrderRequest |
required | The orders to execute |
Returns an list of OrderResult
A SearchRequest
can be executed as follows. Note: an ArlulaAPI
object and Session
will need to have been created.
arlula_session = arlulacore.Session("key, "secret")
api = arlulacore.ArlulaAPI(arlula_session)
archive = api.archiveAPI()
# Search for imagery around sydney between 2020-Jan-1 and 2020-Feb-1
# With at least 10m resolution (gsd)
search_result = archive.search(
arlulacore.SearchRequest(
start=date(2020, 1, 1),
gsd=10,
)
.set_point_of_interest(-33.8688, 151.2093)
.set_end(date(2020, 2, 1))
)
# Order a specific image from the archive, using the id from above,
# the eula that applies to you, the bundle you want, and (optionally)
# email [email protected] and [email protected] when it is complete.
order_result = archive.order(
arlulacore.OrderRequest(
id="cade11f4-8b4d-43e1-8cb1-3bce85111a01",
eula="Supplier's EULA",
bundle_key="default",
)
.set_emails(["[email protected]", "[email protected]"])
)