Setting up your development environment
This page covers how to set up your local environment before developing with Lattice.
Before you begin
Access Lattice using your environment URL: $YOUR_LATTICE_URL/c2
. For documentation that includes features to streamline your development process, go to $YOUR_LATTICE_URL/docs
.
To access an environment, request to join the Lattice SDK developer program.
Get an API bearer token
Generate a bearer token to authenticate to your Lattice environment:
- Go to the Account & Security page in Lattice:
$YOUR_LATTICE_URL/user-settings
- In the Bearer tokens section, click + New Token and enter the
following:
- For Bearer token name, enter a descriptive name for your bearer token.
- For Bearer token expiration, select an expiration time frame.
- Click Create to generate and copy your bearer token. After this step, the bearer token will not be visible again.
- Securely save the bearer token according to your company's practices.
Publish vessel to Lattice
In your terminal, enter the following command:
curl --location --request PUT 'https://$YOUR_LATTICE_URL/api/v1/entities' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer $YOUR_BEARER_TOKEN' \
--include \
--data '{
"entityId": "",
"description": "Quickstart example",
"isLive": true,
"createdTime": "undefined",
"expiryTime": "1970-01-04T00:00:00.000Z",
"aliases": {
"name": ""
},
"milView": {
"disposition": "DISPOSITION_FRIENDLY",
"environment": "ENVIRONMENT_SURFACE"
},
"location": {
"position": {
"latitudeDegrees": 0,
"longitudeDegrees": 0,
"altitudeHaeMeters": 0
}
},
"ontology": {
"template": "TEMPLATE_TRACK",
"platformType": "Surface_Vessel",
"specificType": "N/A"
},
"provenance": {
"dataType": "docs-example",
"integrationName": "quickstart-example",
"sourceUpdateTime": "undefined"
}
}'
$YOUR_LATTICE_URL
with the URL you use to access the Lattice common operational picture. For example,usa.anduril.com
.$YOUR_BEARER_TOKEN
with the bearer token you generated above. Make sure you keepBearer
in your request.
If the request is successful, you get a 200
status response with an empty body: {}
.
When refreshing this page, the code sample above dynamically updates values in the following fields to create unique objects in your environment:
entity_id
createdTime
expiryTime
aliases.name
provenance.sourceUpdateTime
Verify vessel in Lattice
The previous request publishes a track entity to your Lattice environment. You can verify the surface vessel in your Lattice environment:
- Go to your Lattice environment.
-
Open the Track panel by clicking Tracks in your environment's left-hand sidebar.
-
In the Track panel's search bar, find your published surface vessel by searching for the
aliases.name
value that you specified in your request. -
To center your view on the surface vessel, select the vessel in the Tracks panel and click Center.
You have successfully made a request using the Lattice SDK and published a surface vessel entity to Lattice.
Install the SDK or generate HTTP SDKs
Decide whether your application will communicate with the Lattice by using the gRPC SDK or HTTP APIs.
- gRPC
- REST
Install one of the following gRPC SDKs to connect to the Lattice APIs:
The Lattice SDK uses gRPC and protocol buffers to connect with Lattice APIs. If you would like to see support for a specific language, contact your Anduril representative.
To interact with the Lattice HTTP APIs, use curl or your preferred language's HTTP request framework. If you prefer to use a client SDK, you may generate a Lattice HTTP SDK for your language of choice.