Skip to content

ArchiveAPI

Harrison Steyn edited this page Jul 11, 2022 · 15 revisions

Description

The ArchiveAPI object allows for access to searching and ordering methods.

Methods

search()

Used to execute SearchRequest objects.

Arguments

Name Type Default Behaviour Description
request SearchRequest required The search to execute

Return Value

Returns a list of SearchResult objects.

order()

Used to execute OrderRequest objects. Note: some scenes may require payment.

Arguments

Name Type Default Behaviour Description
request OrderRequest required The order to execute

Return Value

Returns an OrderResult

Examples

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]"])
)
Clone this wiki locally