Skip to content

ArchiveAPI

Harrison Steyn edited this page Jan 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 order specific scenes. Note: some scenes may require payment.

Arguments

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

Return Value

Returns a OrderResult

Examples

A search can be executed as follows. Note a session will need to have been created.

api = arlulacore.ArlulaAPI(arlula_session)

archive = api.archiveAPI()

# Search for imagery around sydney between 2020-Jan-1 and 2020-Feb-1
# With at most 10m resolution
search_result = archive.search(
    arlulacore.SearchRequest(
        start=date(2020, 1, 1), 
        res=10,
    )
    .set_point_of_interest(-33.8688, 151.2093)
    .set_end(date(2020, 2, 1))
)

An order can be executed as follows, by taking an id and corresponding eula from a SearchResponse object.

# Order a specific image from the archive, using the id from above, 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",
        seats=1,
    )
    .set_emails(["[email protected]", "[email protected]"])
)
Clone this wiki locally