Tasking in SDK

Create and manage tasking orders using the SDK.


Overview

Order new geospatial data to be captured over a specific area and at a given time.

View repository

Constants

ConstantDescriptionValue
GeometryGeometry types.Union[catalog.Geometry, geom.Point]
QuotationDecisionAn acceptable decision for a not decided quotation.Literal["ACCEPTED", "REJECTED"]
QuotationStatusDecision statuses for quotations.Union[Literal["NOT_DECIDED"], QuotationDecision]
FeasibilityStatusDecision statuses for feasibility studies.Literal["NOT_DECIDED", "ACCEPTED"]

Class: Tasking

A class that enables access to the tasking functionality. This class also inherits methods from the CatalogBase class.

Methods

construct_order_parameters

This method is deprecated and will be removed in 3.0.0. Use BatchOrderTemplate.

Constructs an order form for a specific data product. Returns order.OrderParams.

ParameterDescription
data_product_idstr
The data product ID.
namestr
The order name.
acquisition_startUnion[str, datetime.datetime]
The start date of the acquisition period in the YYYY-MM-DD format.
acquisition_endUnion[str, datetime.datetime]
The end date of the acquisition period in the YYYY-MM-DD format.
geometryGeometry
The order geometry.
tagsOptional[List[str]]
A list of tags that categorize the order.

Python

    tasking = up42.initialize_tasking()

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"],
)

  

get_quotations

This method is deprecated and will be removed in 3.0.0. Use Quotation.all.

Retrieves quotations for tasking orders. Returns list[dict].

ParameterDescription
quotation_idOptional[str]
The quotation ID.
workspace_idOptional[str]
The workspace ID. Use to get quotations from a specific workspace. Otherwise, quotations from the entire account will be returned.
order_idOptional[str]
The order ID.
decisionOptional[List[QuotationStatus]]
The status of quotations.
sortbystr
Arranges elements in the order specified in descending based on a chosen field. The default value is createdAt.
descendingbool
Determines the arrangement of elements:
  • True: Arranges elements in descending order based on the field specified in sortby.
  • False: Arranges elements in ascending order based on the field specified in sortby.
The default value is True.

Python

    tasking = up42.initialize_tasking()

tasking.get_quotations(
    workspace_id="68567134-27ad-7bd7-4b65-d61adb11fc78",
    decision="NOT_DECIDED",
    sortby="updatedAt",
    descending=False,
)

  

decide_quotation

This method is deprecated and will be removed in 3.0.0. Use Quotation.accept/Quotation.reject and Quotation.save.

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. Returns dict.

ParameterDescription
quotation_idstr
The quotation ID.
decisionQuotationDecision
The decision made for this quotation.

Python

    tasking = up42.initialize_tasking()

tasking.decide_quotation(
    quotation_id="68567134-27ad-7bd7-4b65-d61adb11fc78",
    decision="ACCEPTED",
)

  

get_feasibility

This method is deprecated and will be removed in 3.0.0.

Retrieves feasibility studies for tasking orders. Returns list[dict].

ParameterDescription
feasibility_idOptional[str]
The feasibility study ID.
workspace_idOptional[str]
The workspace ID. Use to get feasibility studies from a specific workspace. Otherwise, feasibility studies from the entire account will be returned.
order_idOptional[str]
The order ID.
decisionOptional[List[FeasibilityStatus]]
The status of feasibility studies.
sortbystr
Arranges elements in the order specified in descending based on a chosen field. The default value is createdAt.
descendingbool
Determines the arrangement of elements:
  • True: Arranges elements in descending order based on the field specified in sortby.
  • False: Arranges elements in ascending order based on the field specified in sortby.
The default value is True.

Python

    tasking = up42.initialize_tasking()

tasking.get_feasibility(
    workspace_id="68567134-27ad-7bd7-4b65-d61adb11fc78",
    decision="NOT_DECIDED",
    sortby="updatedAt",
    descending=False,
)

  

choose_feasibility

This method is deprecated and will be removed in 3.0.0.

Allows you to accept one of the proposed feasibility study options. You can only perform actions with feasibility studies with the NOT_DECIDED status. Returns dict.

ParameterDescription
feasibility_idstr
The feasibility study ID.
accepted_option_idstr
The ID of the feasibility option to accept.

Python

    tasking = up42.initialize_tasking()

tasking.choose_feasibility(
    feasibility_id="68567134-27ad-7bd7-4b65-d61adb11fc78",
    accepted_option_id="a0d443a2-41e8-4995-8b54-a5cc4c448227",
)

  

Class: QuotationSorting

A class that contains predefined sorting fields.

Attributes

AttributeDescription
created_atutils.SortingField
Sorts by creation date. The default order is ascending.
updated_atutils.SortingField
Sorts by update date. The default order is ascending.
decided_atutils.SortingField
Sorts by decision date. The default order is ascending.
credits_priceutils.SortingField
Sorts by price, in credits. The default order is ascending.

Python

    # Sort by creation date, from the most recent to the earliest
up42.Quotation.all(sort_by=up42.QuotationSorting.created_at.desc)

  

Class: Quotation

A data class that represents a quotation for a tasking order.

Attributes

AttributeDescription
idstr
The quotation ID.
created_atstr
The time the quotation was created.
updated_atstr
The last time the quotation data was changed.
decided_atOptional[str]
The time the decision was made on this quotation.
account_idstr
The account ID.
workspace_idstr
The workspace ID.
order_idstr
The order ID.
credits_priceint
The amount of credits that will be charged.
decisionQuotationStatus
The decision for this quotation.

Methods

accept

Marks the quotation as accepted by setting its decision attribute to ACCEPTED. Use save to apply the change.


reject

Marks the quotation as accepted by setting its decision attribute to REJECTED. Use save to apply the change.


save

Saves any changes to the decision status of the quotation and updates the properties.


all

Retrieves quotations based on optional filter parameters. Returns Iterator["Quotation"]. Use itertools.islice to offset and limit the results.

ParameterDescription
quotation_idOptional[str]
The quotation ID.
workspace_idOptional[str]
The workspace ID. Use to get objects from a specific workspace. Otherwise, objects from the entire account will be returned.
order_idOptional[str]
The order ID.
decisionOptional[List[QuotationStatus]]
The status of quotations.
sort_byOptional[utils.SortingField]
The results sorting method that arranges elements in ascending or descending order based on a chosen field.

Python

    all_quotations = up42.Quotation.all(
  order_id = "68567134-27ad-7bd7-4b65-d61adb11fc78",
  sort_by = up42.QuotationSorting.created_at.desc
)
quotations = itertools.islice(all_quotations, offset, limit)

  

Learn more


Last updated: