View all connectors

Augment Code

By integrating Augment Code with DX, you can import daily user activity and model-level credit consumption, link Augment Code users to DX users, and analyze adoption alongside your other AI tools. DX does not read or access your source code.

Prerequisites

To connect Augment Code to DX, you need:

  • an Augment Code Enterprise organization; the Analytics API is currently a preview feature available only to Enterprise customers
  • permission to create a service account and API token for your Augment Code organization

Setup instructions

Follow the steps below to connect Augment Code to DX.

Step 1

Create an Augment Code service account:

  1. Open your organization’s Service Accounts page.
  2. Select Add Service Account.
  3. Enter a unique service name, such as dx-integration, and optionally add a description.
  4. Select Create.

Step 2

Generate an API token:

  1. Find the new service account in the service accounts list.
  2. Select Create Token.
  3. Enter a description, such as DX Analytics API integration.
  4. Select Create, then copy and securely store the token. Augment Code shows the token only once.

Step 3

  1. In DX, navigate to Settings > Data connectors and select Add connector.
  2. Select Augment Code as the connector type.
  3. Enter the API token generated in Step 2.
  4. Select Add connection. DX verifies access to both user activity and model credit usage before completing setup.

API reference

DX sends requests to https://api.augmentcode.com and authenticates with the API token as a Bearer token.

Endpoint Documentation
GET /analytics/v0/user-activity Link
GET /analytics/v0/credit-usage-by-user Link

Errors

The table below lists potential error codes when adding an Augment Code connection in DX.

Error Description
invalid_credentials The API token is invalid, expired, or revoked.
invalid_permissions The service account cannot access the Analytics API, or the organization does not have Enterprise Analytics API access.
no_resources Augment Code returned an unexpected response while DX verified access to activity or credit data. An empty but valid response is accepted because your organization might not have recent activity.