> For the complete documentation index, see [llms.txt](https://docs.octoxlabs.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.octoxlabs.com/adapters/l/lattice.md).

# Lattice

|                            |                                 |
| -------------------------- | ------------------------------- |
| Category                   | HR / people management          |
| Asset types                | Users                           |
| Authentication             | API key (Bearer)                |
| Direction                  | OctoXLabs → Lattice (read only) |
| Supported Lattice versions | Not specified                   |
| Available since            | Not specified                   |

Lattice is a people management platform. OctoXLabs reads the users of your Lattice account and adds them to the user inventory.

## Use cases

* **Find Lattice users with no directory account.** List Lattice users that are not found in Active Directory. How accounts are matched depends on your user merge settings.

```
Adapters = lattice AND NOT Adapters = active-directory
```

* **Find Lattice admins.** List users that have the admin flag.

```
Adapters = lattice AND AdminStatus = true
```

## Before you begin

### Network

| Source              | Destination                          | Port | Protocol |
| ------------------- | ------------------------------------ | ---- | -------- |
| OctoXLabs connector | api.latticehq.com (Domain parameter) | 443  | HTTPS    |

Clear **Is Secure?** to use HTTP.

### Required permissions

Not verified: the sources do not name a permission. The key must be able to list users.

## Create credentials in Lattice

{% stepper %}
{% step %}

### Open the admin dashboard

Sign in to Lattice as an admin.
{% endstep %}

{% step %}

### Create or copy an API key

View and manage API keys in the Lattice **admin dashboard**. Copy the key.
{% endstep %}
{% endstepper %}

## Connection parameters

| Parameter  | Required | Type    | Default           | Description                |
| ---------- | -------- | ------- | ----------------- | -------------------------- |
| Domain     | No       | String  | api.latticehq.com | Domain of the Lattice API. |
| API Key    | Yes      | String  | None              | Lattice API key.           |
| Is Secure? | No       | Boolean | True              | Connect over HTTPS.        |

## What the connection test does

The test requests one user (`limit` 1). It passes when the API answers with status 200.

## API endpoints called

| Method | Path      | Purpose                                                     |
| ------ | --------- | ----------------------------------------------------------- |
| GET    | /v1/users | Lists users, 100 per page, with the `startingAfter` cursor. |

When the API answers 429, the connector waits for the `Retry-After` header (60 seconds if missing) and retries, up to 5 times.

## Fields fetched

| Lattice field       | OctoXLabs field            |
| ------------------- | -------------------------- |
| email               | Email (primary identifier) |
| First word of name  | FirstName                  |
| Last word of name   | LastName                   |
| isAdmin             | AdminStatus                |
| createdAt (seconds) | CreatedTime                |

## Troubleshooting

| Error message                                                  | Cause                                                                                   | Fix                                                                                            |
| -------------------------------------------------------------- | --------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- |
| Request failed after {max\_retries} retries for url {url}      | The API kept answering 429 (rate limit). The page is skipped.                           | Run discovery again later.                                                                     |
| Status Code: `, followed by URL, Method and the response body` | The API answered with a status other than 200. This is the shared REST connector error. | Read the status code and body in the message, then check the credentials, permissions and URL. |

## Change history
