Skip to content

Tasking

The Tasking class enables access to the UP42 tasking functionality.

tasking = up42.initialize_tasking()

This class also inherits functions from the CatalogBase class.

Orders

construct_order_parameters()

The construct_order_parameters() function allows you to fill out an order form for a new tasking order.

construct_order_parameters(
    data_product_id,
    name,
    acquisition_start,
    acquisition_end,
    geometry,
    tags,
)

The returned format is dict.

Arguments
Argument Overview
data_product_id str / required
The data product ID.
name str / required
The tasking order name.
acquisition_start Union[str, datetime] / required
The start date of the acquisition period in the YYYY-MM-DD format.
acquisition_end Union[str, datetime] / required
The end date of the acquisition period in the YYYY-MM-DD format.
geometry Union[FeatureCollection, Feature, dict, list, GeoDataFrame, Polygon, Point] / required
The geometry of the area to be captured. It can be a POI or an AOI depending on the collection.
tags List[str]
A list of tags that categorize the order.
Example
tasking.construct_order_parameters(
    data_product_id="123eabab-0511-4f36-883a-80928716c3db",
    name="PNeo tasking order",
    acquisition_start="2023-11-01",
    acquisition_end="2023-12-20",
    geometry = {
        "type": "Polygon",
        "coordinates": (
            (
                (13.375966, 52.515068),
                (13.375966, 52.516639),
                (13.378314, 52.516639),
                (13.378314, 52.515068),
                (13.375966, 52.515068),
            ),
        ),
    },
    tags=["project-7", "optical"],
)

Feasibility studies

get_feasibility()

The get_feasibility() function returns a list of feasibility studies for tasking orders.

get_feasibility(
    feasibility_id,
    workspace_id,
    order_id,
    decision,
    sortby,
    descending,
)

The returned format is list.

Arguments
Argument Overview
feasibility_id str
The feasibility study ID.
workspace_id str
The workspace ID. Use to get objects from a specific workspace. Otherwise, objects from the entire account will be returned.
order_id str
The order ID.
decision List[str]
The status of feasibility studies. The allowed values:
  • NOT_DECIDED
  • ACCEPTED
sortby str
Arrange 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: arrange elements in descending order based on the field specified in sortby.
  • False: arrange elements in ascending order based on the field specified in sortby.
The default value is True.
Example
tasking.get_feasibility(
    workspace_id="68567134-27ad-7bd7-4b65-d61adb11fc78",
    decision="NOT_DECIDED",
    sortby="updatedAt",
    descending=False,
)

choose_feasibility()

The choose_feasibility() function allows you to accept one of the proposed feasibility study options.

You can only perform actions with feasibility studies with the NOT_DECIDED status.

choose_feasibility(
    feasibility_id,
    accepted_option_id,
)

The returned format is dict.

Arguments
Argument Overview
feasibility_id str / required
The feasibility study ID.
accepted_option_id str / required
The ID of the feasibility option to accept.
Example
tasking.choose_feasibility(
    feasibility_id="68567134-27ad-7bd7-4b65-d61adb11fc78",
    accepted_option_id="a0d443a2-41e8-4995-8b54-a5cc4c448227",
)

Quotations

get_quotations()

The get_quotations() function returns a list of all quotations for tasking orders.

get_quotations(
    quotation_id,
    workspace_id,
    order_id,
    decision,
    sortby,
    descending,
)

The returned format is list.

Arguments
Argument Overview
quotation_id str
The quotation ID.
workspace_id str
The workspace ID. Use to get objects from a specific workspace. Otherwise, objects from the entire account will be returned.
order_id str
The order ID.
decision List[str]
The status of quotations. The allowed values:
  • NOT_DECIDED
  • ACCEPTED
  • REJECTED
sortby str
Arrange 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: arrange elements in descending order based on the field specified in sortby.
  • False: arrange elements in ascending order based on the field specified in sortby.
The default value is True.
Example
tasking.get_quotations(
    workspace_id="68567134-27ad-7bd7-4b65-d61adb11fc78",
    decision="NOT_DECIDED",
    sortby="updatedAt",
    descending=False,
)

decide_quotation()

The decide_quotation() function allows you to accept or reject a quotation for a tasking order.

You can only perform actions with feasibility studies with the NOT_DECIDED status.

decide_quotation(
    quotation_id,
    decision,
)

The returned format is dict.

Arguments
Argument Description
quotation_id str / required
The quotation ID.
decision str / required
The decision made for this quotation. The allowed values:
  • ACCEPTED
  • REJECTED
Example
tasking.decide_quotation(
    quotation_id="68567134-27ad-7bd7-4b65-d61adb11fc78",
    decision="ACCEPTED",
)