Atlas Brex API Integration
This guide will help you configure Atlas to authenticate and proxy requests to the Brex API.
Brex is a corporate credit card and banking platform for startups. The Brex API provides developers with programmatic access to the Brex platform. This includes APIs for onboarding, teams, payments, and transactions.
At the end of this guide, your running instance of Atlas will be configured to:
Proxy HTTP requests to the Brex API.
Authenticate these requests using one or more Brex API tokens.
Availability
Public beta. This integration is available to all Atlas users, but the API may change.
Prerequisites
A running instance of Atlas. See installation guides for more details.
Provision a Brex API token
Click your profile picture in the upper right-hand side of the Brex UI. Choose the settings button in the dropdown menu.
Click the Developer tab.
Click the Create Token.
Provide a name for the Brex API token, and select the permissions you want to grant.
Click the Allow Access button.
Click the Copy button to copy the API token to your clipboard. You will need this token to configure Atlas in the next step.
Add Brex Integration to Atlas
Step 1: Add Brex API token to Atlas Deployment as an Environment Variable
Choose an environment variable name for the Brex API token. Generally this is something like
BREX_API_TOKEN
.Add the Brex API token you provisioned as an environment variables to your Atlas deployment. The install guides have instructions for how to do this for each deployment method. For example, if you deployed Atlas using ECS, you might add an environment variable
BREX_API_TOKEN
to the Pulumi configuration. If you deployed using Kubernetes, you might add theBREX_API_TOKEN
environment variable to a.env
file.Note the name of the environment variable you chose. We will use this in the next step to configure the HTTP adapter.
Step 2: Add Brex API token to Atlas Configuration
We can use the mom
CLI to add the Brex API token to the Atlas configuration. Run this command, changing
YOUR_ATLAS_CONFIG.yml
with the path to your Atlas configuration fileBREX_API_TOKEN
to the name of the environment variable you chose in the previous stepYOUR_ADAPTER_NAME
to the name you want to use for the HTTP adapter in Atlas, e.g.,brex
orbrex-viewer
The diff in your version control system should look something like this:
Step 3: Deploy the Updated Atlas Config
The install guides have instructions for how to deploy Atlas into a variety of environments, including Kubernetes and ECS.
Step 4: Test the Integration
Once deployed, we can use the mom curl
command to test the integration. Be sure to replace brex
with the name you chose in the previous step if it is different.
Using the integration in a canvas
This integration can be used in Moment by creating a new cell in a Moment canvas, and pasting the following code. Note that you will need to assign httpAdapterName
to the name you chose for the HTTP adapter in the previous step, e.g., brex
or brex-viewer
.
If the integration is working, you should see a JSON object with a list of Brex users.
Last updated