Setting up your development environment
This page shows how to access your Lattice environment, get your bearer token, and set system environment variables. We recommend completing the following steps before installing and developing with the Lattice SDK.
Before you begin
-
If you do not have access to Lattice Sandboxes, or an existing Lattice deployment configured by Anduril, request to join the Lattice SDK developer program.
-
If you are using Lattice Sandboxes, complete the steps in Developing with Lattice Sandboxes to onboard and create an environment.
-
If you are using another deployment of Lattice, verify access to Lattice using your environment URL. If you can't access the environment, contact your Anduril representative for help.
Get the bearer token
If you are developing using Lattice Sandboxes, you can use the token generated for you when you create an environment, or create a new token using the following steps. For more information, see Create an environment.
To create a new environment bearer token:
- Open the Account & Security page in Lattice:
https://&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 a bearer token, then save your bearer token.
infoAfter this step, the bearer token will not be visible again.
Securely save the bearer tokens according to your company's practices. In the next step, you'll store the tokens as system environment variables and access them in your application code.
Set your system environment variable
Add the following system environment variables to provide your bearer tokens and Lattice environment URL:
- Linux, macOS, or Unix
- Windows Command Prompt
export LATTICE_URL=$YOUR_LATTICE_URL
export ENVIRONMENT_TOKEN=$YOUR_ENVIRONMENT_TOKEN
setx LATTICE_URL $YOUR_LATTICE_URL
setx ENVIRONMENT_TOKEN $YOUR_ENVIRONMENT_TOKEN
Add your Sandboxes bearer token to your environment variables:
- Linux, macOS, or Unix
- Windows Command Prompt
export SANDBOXES_TOKEN=$YOUR_SANDBOXES_TOKEN
setx SANDBOXES_TOKEN $YOUR_SANDBOXES_TOKEN
To set persistent environment variables across all existing and future sessions, add the
export
statements to your startup script, then restart your session. Depending on your system,
your startup script might be ~/.bash_profile
, ~/.bashrc
, ~/.zshrc
, or a similar file.
You can now access these variables when you interact with Lattice using the Lattice SDK.
Install the SDK or generate HTTP SDKs
Choose whether your application will communicate with Lattice by using the gRPC SDK or HTTP SDKs.
- gRPC
- HTTP
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 SDKs for HTTP, 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.