Download an object
Getting data from Lattice using the SDK
This page explains how to download an object from Lattice.
Before you begin
- To configure your app to upload objects, set up your Lattice environment.
- See an overview of the Object schema and the Object Store API in Lattice.
Download an object
In Lattice, an object is a data model that represents a single file or a piece of data. To download a specific binary object from Lattice using its unique object path, do the following:
Get the object path
When using the DownloadObject API, you must specify the object path of the object you want to download at runtime.
In the previous procedure, you uploaded the following objects:
- Image: A
.jpg
image at the following path:/api/v1/objects/cessna.jpg
. This image is a thumbnail of its associated track entity. - CSV: A
.csv
file at the following path:/api/v1/objects/manifest.csv
. This serves as metadata, in this case, a vessel manifest for the associated entity. Choose one, and note the object path.
Download the object
Run the following code from the same folder where you saved the image.
To upload, the example calls the UploadObject
operation.
Replace the following:
object_path
: the unique path of the object in Lattice.
What’s next?
- Learn more about the Objects API.