Create tasking and catalog orders.
View repositoryConstants
Constant | Description | Value |
---|---|---|
OrderType | Order types:
| Literal["TASKING", "ARCHIVE"] |
OrderDetails | Order details of both order types. | Union[ArchiveOrderDetails, TaskingOrderDetails] |
A class that represents the schema for the order parameters.
Attributes
Attribute | Description |
---|---|
dataProduct | str The data product ID. |
displayName | str A human-readable name that describes the order. |
params | Dict[str, Any] Order parameters. |
featureCollection | Dict[str, Any] A GeoJSON FeatureCollection representing the order’s geometry. |
tags | List[str] A list of tags that categorize the order. A tag can consist of letters, numbers, spaces, and special characters ( . , - , _ , / , : ). |
A class that contains predefined sorting fields.
Attributes
Attribute | Description |
---|---|
created_at | utils.SortingField Sorts by creation date. The default order is ascending. |
updated_at | utils.SortingField Sorts by update date. The default order is ascending. |
type | utils.SortingField Sorts by order type. The default order is catalog orders first, tasking second. |
status | utils.SortingField Sorts by order status. The default order is ascending. |
# Sort by creation date, from the most recent to the earliestup42.Order.all(sort_by=up42.OrderSorting.created_at.desc)
A data class that represents catalog order details.
Attributes
Attribute | Description |
---|---|
aoi | dict Geometry in the GeoJSON format. |
image_id | Optional[str] The ID of the image scene. |
A data class that represents tasking order details.
Attributes
Attribute | Description |
---|---|
acquisition_start | str The date and time when the sensor started the acquisition process. |
acquisition_end | str The date and time when the sensor finished the acquisition process. |
geometry | dict Geometry in the GeoJSON format. |
extra_description | Optional[str] An additional order description. |
sub_status | Optional[OrderSubStatus] An additional status for the tasking order. |
A data class that represents an order in the system.
Attributes
Attribute | Description |
---|---|
id | str The order ID. |
display_name | str A human-readable name that describes the order. |
status | OrderStatus The order status. |
workspace_id | str The workspace ID. |
account_id | str The account ID. |
type | OrderType The order type. |
details | Optional[OrderDetails] Order details. |
data_product_id | Optional[str] The data product ID. |
tags | Optional[list[str]] A list of tags that categorize the order. A tag can consist of letters, numbers, spaces, and special characters ( . , - , _ , / , : ). |
Properties
3.0.0
. Use Order.details
. Retrieves the details of a specific order. Returns dict
.
order = up42.Order.get(order_id="ea36dee9-fed6-457e-8400-2c20ebd30f44")order.order_details
3.0.0
. Use Order.id
. Retrieves the order ID. Returns str
.
order = up42.Order.get(order_id="ea36dee9-fed6-457e-8400-2c20ebd30f44")order.order_id
Checks if the order is fulfilled. Returns bool
:
True
: the order has theFULFILLED
status.False
: the order has any other status.
order = up42.Order.get(order_id="ea36dee9-fed6-457e-8400-2c20ebd30f44")order.is_fulfilled
Methods
Retrieves a specific order by its ID. Returns Order
.
Parameter | Description |
---|---|
order_id | str The order ID. |
up42.Order.get(order_id="ea36dee9-fed6-457e-8400-2c20ebd30f44")
Retrieves all orders, with optional filtering. Returns Iterator["Order"]
. Use itertools.islice
to offset and limit the results.
Parameter | Description |
---|---|
workspace_id | Optional[str] The workspace ID. Use to get jobs from a specific workspace. Otherwise, jobs from the entire account will be returned. |
order_type | Optional[OrderType] The type of orders to return. To get orders of all types, omit the parameter. |
status | Optional[List[OrderStatus]] Order statuses. Use to search for orders with any of the provided statuses. |
sub_status | Optional[List[OrderSubStatus]] Order sub-statuses. Use to search for orders with any of the provided sub-statuses. |
display_name | Optional[str] Additional search terms. Use to search for orders that contain the provided search query in their name. |
tags | Optional[List[str]] A list of tags that categorize the order. |
sort_by | Optional[utils.SortingField] The results sorting method that arranges elements in ascending or descending order based on a chosen field. To view the list of possible values, see OrderSorting . |
all_orders = up42.Order.all( sort_by=up42.OrderSorting.status)orders = islice(all_orders, offset, limit)
Retrieves assets from orders that have FULFILLED
or BEING_FULFILLED
statuses. Returns List[asset.Asset]
.
Use this function to retrieve multiple assets from the same order. To search across all assets in your storage, use the get_assets function from the Storage class.
order = up42.Order.get(order_id="ea36dee9-fed6-457e-8400-2c20ebd30f44")order.get_assets()
Tracks the order status by retrying until the status changes to FULFILLED
or FAILED_PERMANENTLY
. It will query the order every 120 seconds.
Parameter | Description |
---|---|
report_time | float An interval between queries, in seconds. The default value is 120 . |
order = up42.Order.get(order_id="ea36dee9-fed6-457e-8400-2c20ebd30f44")order.track(report_time=150)
3.0.0
. Use Order.track
. Tracks the order status by retrying until the status changes to FULFILLED
or FAILED_PERMANENTLY
. It will query the order every 120 seconds. Returns str
.
Parameter | Description |
---|---|
report_time | float An interval between queries, in seconds. The default value is 120 . |
order = up42.initialize_order(order_id="ea36dee9-fed6-457e-8400-2c20ebd30f44")order.track_status(report_time=150)