Storage

Access your storage using the SDK.


Overview

Manage geospatial data in your storage.

View repository

Class: AllowedStatuses

An enumeration class that defines possible statuses for an order.

Constants
ConstantDescriptionValue
CREATEDThe order has been created, but not yet placed.CREATED
BEING_PLACEDThe order is being placed.BEING_PLACED
PLACEDThe order has been placed.PLACED
PLACEMENT_FAILEDAn error occurred while placing the order. Please wait until it’s resolved.PLACEMENT_FAILED
DELIVERY_INITIALIZATION_FAILEDAn error occurred while delivering the order assets. Please wait until it’s resolved.DELIVERY_INITIALIZATION_FAILED
BEING_FULFILLEDThe order is in progress. Some assets may already be delivered to your storage.BEING_FULFILLED
DOWNLOAD_FAILEDAn error occurred while delivering the order assets. Please wait until it’s resolved.DOWNLOAD_FAILED
DOWNLOADEDThe order assets are being delivered to your storage.DOWNLOADED
FULFILLEDThe order is complete, and all assets have been delivered to your storage.FULFILLED
FAILED_PERMANENTLYThe order has permanently failed or has been canceled.FAILED_PERMANENTLY

Class: Storage

A class that represents storage in the system.

Examples

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

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

  

Functions

get_assets

Retrieves assets from storage. Returns Union[list[Asset], dict].

To get assets from a specific order, use get_assets from the Order class.

ParameterDescription
created_afterOptional[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_beforeOptional[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_idOptional[str]
The workspace ID. Use to get assets from a specific workspace. Otherwise, assets from the entire account will be returned.
collection_namesOptional[List[str]]
The names of geospatial collections. Use to search for assets from any of the provided collections.
producer_namesOptional[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.
tagsOptional[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 (., -, _, /, :).
sourcesOptional[List[str]]
Asset sources. Use to search for assets from any of the provided sources. The allowed values are as follows:
  • ARCHIVE: assets from catalog orders
  • TASKING: assets from tasking orders
  • PROCESSING: assets resulting from processing
searchOptional[str]
Additional search terms. Use to search for assets that contain the provided search query in their name, title, or ID.
limitOptional[str]
The number of assets on a result page.
sortbystr
Arranges elements in the order specified in descending based on a chosen field. The allowed values are as follows:
  • id
  • workspaceId
  • accountId
  • createdAt
  • updatedAt
  • name
  • size
  • contentType
  • geospatialMetadataExtractionStatus
  • productId
  • orderId
  • producerName
  • collectionName
  • source
The default value is createdAt.
descendingbool
Determines the sorting order 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.
return_jsonbool
Determines how to return assets.
  • True: Returns JSON.
  • False: Returns a list of asset objects.
The default value is False.

get_orders

Retrieves tasking and catalog orders. Returns Union[list[Order], dict].

ParameterDescription
workspace_ordersbool
Determines the scope of orders to return.
  • True: Returns orders from your workspace.
  • False: Returns orders from the entire account.
The default value is True.
return_jsonbool
Determines how to return orders.
  • True: Returns JSON.
  • False: Returns a list of order objects.
The default value is False.
limitOptional[int]
The number of orders on a result page.
sortbystr
Arranges elements in the order specified in descending based on a chosen field. The allowed values are as follows:
  • createdAt
  • updatedAt
  • status
  • dataProvider
  • type
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.
order_typeOptional[str]
The type of orders to return. To get orders of all types, omit the parameter. The allowed values are as follows:
  • TASKING: use to get only tasking orders.
  • ARCHIVE: use to get only catalog orders.
statusesOptional[List[AllowedStatuses]]
The status of the order.
nameOptional[str]
The name of the order.
tagsOptional[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 (., -, _, /, :).

Learn more