canonical: https://jentic.com/apis/netboxdemo.com/netboxdemo

# Netboxdemo NetBox API

This is the NetBox 2.4 API spec captured from the public netboxdemo.com demo install. NetBox is the open-source source-of-truth platform for network and data centre infrastructure: device inventory, IP address management, VLANs, circuits, racks, and tenancy. The 357 endpoints in this older 2.4 release cover the original DCIM, IPAM, circuits, secrets, and tenancy modules and are useful for teams still running pre-3.x NetBox installs that need a structured spec.

## For AI agents

Read and write NetBox 2.4 inventory: devices, IPs, VLANs, circuits, secrets, and tenancy on legacy installs.

## Scope

Does not handle device configuration push, network monitoring, or DHCP issuance - use as a source-of-truth read and write API for legacy NetBox 2.4 inventory only.

## Capabilities

- Allocate, reserve, and release IP addresses and prefixes through the IPAM endpoints
- Inventory devices, racks, and modules across one or many sites
- Manage circuits and circuit terminations from upstream providers
- Track VLANs and routing prefixes per site or tenant
- Read encrypted secrets through the NetBox 2.4 secrets module endpoints
- Use the _choices endpoints to discover valid enum values for each model

## Use cases

### Legacy NetBox 2.4 IP Allocation

Operators still running NetBox 2.4 use `/ipam/prefixes`/ and `/ipam/ip-addresses`/ to allocate IPs from a structured inventory rather than a wiki. The 2.4 spec lacks some 3.x-only fields, but the IPAM allocation endpoints behave the same way and slot into the existing Ansible or Terraform NetBox modules.

Example prompt: Reserve the next available /32 from prefix 10.20.0.0/24 in NetBox 2.4 and return the address record.

### Inventory Reads on Legacy Installs

Teams that have not yet upgraded to NetBox 3.x use the 2.4 API to read device, rack, and circuit inventory from automation scripts. The /_choices/ endpoints expose the enum vocabulary for every model, which legacy 2.4 callers need because the full schema is not embedded in each list response.

Example prompt: List the valid status choices for the circuits model, then list every active circuit at site dc-east.

### Tenant Source-of-Truth Reads

Multi-tenant environments use `/tenancy/tenants`/ to scope reads to one tenant on the 2.4 install. The endpoint returns tenant id, name, and group, which scripts then use to filter device, IP, and circuit reads to one customer's footprint.

Example prompt: List every tenant on the install and return the count of devices assigned to each.

### AI Agent Integration via Jentic

An AI agent uses Jentic to call the NetBox 2.4 API on installs that have not yet upgraded. Jentic exposes the dcim, ipam, circuits, and tenancy operations by intent, so the same agent code can target either a 2.4 or 3.4 install by switching the spec it loads.

Example prompt: Use Jentic to search for allocate next available ip in netbox, load the 2.4 schema, and reserve the next /32 from prefix 10.20.0.0/24.

## Key endpoints

| Method | Path | Description |
| --- | --- | --- |
| GET | `/circuits/circuits/` | List provider circuits |
| GET | `/circuits/circuit-terminations/` | List circuit terminations |
| GET | `/circuits/circuit-types/` | List circuit type definitions |
| GET | `/circuits/_choices/` | List enum choices for the circuits model |
| GET | `/circuits/circuits/{id}/` | Get a circuit by id |

## Key resources

- **DCIM** — Devices, racks, sites, interfaces, and console connections
- **IPAM** — Prefixes, IP addresses, VLANs, and aggregates
- **Circuits** — Provider circuits, circuit terminations, and circuit types
- **Secrets** — Encrypted secrets module specific to NetBox 2.4
- **Tenancy** — Tenants and tenant groups
- **_choices** — Enum value catalogues for each model

## Why Jentic

- **Setup:** Wiring this legacy NetBox 2.4 inventory API by hand means setting up its Authorization bearer token, pointing at the netboxdemo.com host, and handling paging and retries across circuits, devices, and IPAM yourself. Through Jentic you install once, import NetBox from the API Directory, store the token once, and your agent calls it.
- **Permission scoping:** NetBox puts the object id in the URL path (`/circuits/circuits/{id}`/), so a rule can pin your agent to specific resources such as one circuit record. You choose the operations it may call, so write and delete operations are not included unless you add them.
- **Credential handling:** Your NetBox 2.4 bearer token is stored once, encrypted, by your own Jentic One instance and injected at execution time. It never enters the agent's prompt, logs, or context.
- **Discovery method:** Agents search Jentic by intent such as 'allocate an IP in NetBox' or 'list circuits', and Jentic returns the matching 2.4 operation with its input schema so the agent calls the right endpoint without browsing the reference docs.

## Related APIs

- **NetBox 3.4 API** — Current NetBox 3.4 spec with 844 endpoints and the modern model
- **NetBox 3.4 API (alternate import)** — Sibling 3.4 spec import sourced from YAML rather than JSON
- **DigitalOcean API** — Cloud provider API used to provision compute that is then registered in NetBox
- **Cloudflare API** — DNS and edge platform commonly fed by NetBox-derived inventory

## FAQ

### What authentication does the NetBox 2.4 API use?

NetBox 2.4 uses bearer token authentication - generate a token in the NetBox UI under your user profile and pass it as Authorization: Token <key>. Jentic stores the token encrypted in your Jentic One instance so it is injected at execution time rather than passed through the agent context.

### How is this spec different from the NetBox 3.4 spec?

NetBox 2.4 has 357 endpoints versus 844 in 3.4. The 2.4 release includes the secrets module that was removed in 3.x, lacks the modules and journal entries added later, and uses /_choices/ endpoints to expose enum values rather than embedding them in each list response.

### Can I allocate the next available IP from a NetBox 2.4 prefix?

Yes. `/ipam/prefixes`/ exposes an available-ips action that returns the next free address. Combine it with a write to `/ipam/ip-addresses`/ to allocate and assign the address. The behaviour is the same as in NetBox 3.x.

### How do I list devices at a site on NetBox 2.4 through Jentic?

Search Jentic for list netbox devices at a site, load the 2.4 schema for the dcim devices endpoint, then execute with the site filter. The full flow is pip install jentic, search, load, execute.

### What are the rate limits for the NetBox 2.4 API?

NetBox does not impose API rate limits in the spec - limits depend on the operator's deployment. Treat large list calls as paginated; on 2.4, the /_choices/ endpoints are cheap reads you can cache locally rather than refetching for every script run.

### Should I use this spec or the netbox.dev/main spec?

Use this 2.4 spec only when targeting an install still on NetBox 2.4. For modern NetBox 3.4 deployments, use the netbox.dev/main or netbox.dev/netbox-api specs which cover the current model.

### Can I limit what my agent is allowed to do with the NetBox 2.4 API?

Yes. Because you run Jentic One yourself, your own rules decide which NetBox 2.4 operations and credentials the agent may use. You can allow read-only calls such as GET `/circuits/circuits`/ or GET `/ipam/prefixes`/ while withholding writes and deletes, since those are not included unless you add them. NetBox also puts the object id in the URL path, for example `/circuits/circuits/{id}`/, so a rule can pin the agent to a specific record rather than the whole install.
