Manage geospatial data in your storage.
Constants
Constant | Description | Value |
---|---|---|
OrderSortBy | Sorting fields for orders. | Literal["createdAt", "updatedAt", "dataProvider", "type", "status"] |
OrderType | Order types:
| Literal["TASKING", "ARCHIVE"] |
An enumeration class that defines possible statuses for an order.
Constants
Constant | Description | Value |
---|---|---|
CREATED | The order has been created, but not yet placed. | CREATED |
BEING_PLACED | The order is being placed. | BEING_PLACED |
PLACED | The order has been placed. | PLACED |
PLACEMENT_FAILED | An error occurred while placing the order. Please wait until it’s resolved. | PLACEMENT_FAILED |
DELIVERY_INITIALIZATION_FAILED | An error occurred while delivering the order assets. Please wait until it’s resolved. | DELIVERY_INITIALIZATION_FAILED |
BEING_FULFILLED | The order is in progress. Some assets may already be delivered to your storage. | BEING_FULFILLED |
DOWNLOAD_FAILED | An error occurred while delivering the order assets. Please wait until it’s resolved. | DOWNLOAD_FAILED |
DOWNLOADED | The order assets are being delivered to your storage. | DOWNLOADED |
FULFILLED | The order is complete, and all assets have been delivered to your storage. | FULFILLED |
FAILED_PERMANENTLY | The order has permanently failed or has been canceled. | FAILED_PERMANENTLY |
A class that represents storage in the system.
Functions
Retrieves assets from storage. Returns Union[list[Asset], dict]
.
To get assets from a specific order, use get_assets from the Order class.
Parameter | Description |
---|---|
created_after | Optional[Union[str, datetime.datetime]] A time condition for search. Use to search for assets created after the timestamp specified in the YYYY-MM-DD format. |
created_before | Optional[Union[str, datetime.datetime]] A time condition for search. Use to search for assets created before the timestamp specified in the YYYY-MM-DD format. |
workspace_id | Optional[str] The workspace ID. Use to get assets from a specific workspace. Otherwise, assets from the entire account will be returned. |
collection_names | Optional[List[str]] The names of geospatial collections. Use to search for assets from any of the provided collections. |
producer_names | Optional[List[str]] The names of producers. Use to search for assets from any of the provided producers. A producer is the type of geospatial collection provider that initially acquired and processed the source data. Data acquired by a producer can be distributed to various hosts. |
tags | Optional[List[str]] Asset tags. Use to search for assets with any of the provided tags. A tag can consist of letters, numbers, spaces, and special characters ( . , - , _ , / , : ). |
sources | Optional[List[str]] Asset sources. Use to search for assets from any of the provided sources. The allowed values are as follows:
|
search | Optional[str] Additional search terms. Use to search for assets that contain the provided search query in their name, title, or ID. |
limit | Optional[str] The number of assets on a result page. |
sortby | str Arranges elements in the order specified in descending based on a chosen field. The allowed values are as follows:
createdAt . |
descending | bool Determines the sorting order of elements.
True . |
return_json | bool Determines how to return assets.
False . |
Python
storage = up42.initialize_storage()
storage.get_assets(
created_after="2021-01-01",
created_before="2023-01-01",
workspace_id="68567134-27ad-7bd7-4b65-d61adb11fc78",
collection_names=["phr"],
producer_names=["airbus"],
tags=["optical", "us"],
sources=["ARCHIVE"],
search="NY Central Park",
limit=5,
sortby="productId",
descending=False,
return_json=True,
)
Retrieves tasking and catalog orders. Returns Union[list[Order], dict]
.
Parameter | Description |
---|---|
workspace_orders | bool Determines the scope of orders to return.
True . |
return_json | bool Determines how to return orders.
False . |
limit | Optional[int] The number of orders on a result page. |
sortby | OrderSortBy Arranges elements in the order specified in descending based on a chosen field. The default value is createdAt . |
descending | bool Determines the arrangement of elements:
True . |
order_type | Optional[OrderType] The type of orders to return. To get orders of all types, omit the parameter. |
statuses | Optional[List[str]] The status of the order. |
name | Optional[str] The name of the order. |
tags | Optional[List[str]] Order tags. Use to search for orders with any of the provided tags. A tag can consist of letters, numbers, spaces, and special characters ( . , - , _ , / , : ). |
Python
storage = up42.initialize_storage()
storage.get_orders(
workspace_orders=False,
return_json=True,
limit=2,
sortby="status",
descending=False,
order_type="ARCHIVE",
statuses=["FULFILLED"],
name="Spot 6/7 Central Park",
tags=["optical","us"],
)