> ## Documentation Index
> Fetch the complete documentation index at: https://docs.myrmex.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# NetBox

> Connect NetBox to Myrmex with a REST API token — create the token and add the integration.

import { Note, Steps, Step, CardGroup, Card, Tip } from '@mintlify/components';

Connect your **NetBox** IPAM/DCIM so Myrmex can read your source-of-truth inventory in real time — sites, racks, devices, IP addresses, prefixes, and VLANs. Myrmex connects over the **NetBox REST API** using an API token.

## What Myrmex Can Do

<CardGroup cols={2}>
  <Card title="Read inventory" icon="boxes-stacked">
    Pull sites, racks, devices, IP addresses, prefixes, and VLANs from your source of truth, on demand.
  </Card>

  <Card title="Health & metrics" icon="chart-line">
    Check NetBox IPAM/DCIM health and metrics via the API.
  </Card>

  <Card title="Cross-reference" icon="diagram-project">
    Correlate NetBox records with data from your other integrations during investigations.
  </Card>

  <Card title="Ask in the Workspace" icon="magnifying-glass">
    Query your inventory in plain language.
  </Card>
</CardGroup>

## Before You Start

* A reachable **NetBox** instance (Myrmex connects over HTTPS; optionally through a [Collector](/documentation/agent-endpoint-security/collector-mode) if NetBox is on a private network).
* A NetBox **user account** whose permissions cover the objects you want Myrmex to read (read-only is enough for analysis).
* Permission to create an **API token** for that user.

## Step 1 — Create the API Token in NetBox

<Steps>
  <Step title="Open your API tokens">
    In NetBox, open your user menu and go to **API Tokens** (or **Admin → API Tokens**).
  </Step>

  <Step title="Add a token">
    Click **Add a token** and assign it to the read-only account. Clear **Write enabled** to keep the token read-only.
  </Step>

  <Step title="Copy the full token">
    Copy the complete token string, including the prefix, name, and dot separator — the format is `nbt_{name}.{token}`. Store it securely; you'll paste it into Myrmex.
  </Step>
</Steps>

<Tip>
  Scope the token to a read-only account and, if supported, restrict it by source IP so it can only be used from your Collector or Myrmex.
</Tip>

## Step 2 — Add the Integration in Myrmex

From the **Directory**, choose **Add Integration → NetBox**, then fill in:

| Field           | Description                                                                                             |
| --------------- | ------------------------------------------------------------------------------------------------------- |
| **Name**        | A unique name for this NetBox instance.                                                                 |
| **Description** | Optional note to identify it.                                                                           |
| **API Token**   | The full token string in the format `nbt_{name}.{token}` — include the prefix, name, and dot separator. |
| **URL**         | The NetBox host or base URL Myrmex should call.                                                         |
| **Protocol**    | `https` or `http` (HTTPS recommended).                                                                  |
| **Port**        | The API port (`443` or `80`).                                                                           |
| **Collector**   | Optional [Collector](/documentation/agent-endpoint-security/collector-mode) to reach a private NetBox.  |

## Connect

Click **Connect** to validate the token and finish. NetBox then appears under **Environment → Integrations**, ready to query in the Workspace.

<Note>
  Myrmex reads from NetBox in real time over the API each time you ask — nothing from your NetBox instance is stored on the Myrmex side.
</Note>
