list_netbox_servers
const url = 'https://example.com/api/v1/netbox/servers';const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url https://example.com/api/v1/netbox/servers \ --header 'Authorization: Bearer <token>'Authorizations
Section titled “Authorizations”Responses
Section titled “Responses”Every configured NetBox server. The API token is never included; the CA certificate is, because it is not a secret
A configured server as the API exposes it.
🚨 credential_id is here but the token is not, and cannot be — the token lives sealed in
credentials and this type has no field that could carry it. ca_cert_pem is returned, on
purpose: a CA certificate is public-key material, and an operator who cannot read back what
they pasted cannot tell a stored certificate from a lost one.
object
netbox-version learned from the last successful connection, so the screen can state the
supported range rather than guessing at it.
Active sites the last successful run wrote as folders, or null before one has run. A site
in any other status is not counted (ADR-100 decision 11).
Of those, how many had no usable Site ID. 0 when no Site ID field is configured —
nothing was asked for, so nothing is missing.
Folders this server owns that the last successful run no longer synced: NetBox no longer lists the object, or lists the site as anything but Active (ADR-100 decision 11). Never auto-deleted (decision 5) — surfaced so the operator can decide.
Which NetBox field prefixes a Site’s folder name, or null for none. Encoded as stored:
a built-in name, or cf: and a custom field’s key.
A “Sync now” not finished yet, or a run in flight; null when neither (ADR-172 decision 1).
object
When “Sync now” asked; null when nothing is asked for. A second press keeps the first time.
When the run in flight began; null while the request waits for the leader’s loop.
Examplegenerated
[ { "api_version": "example", "base_url": "example", "ca_cert_pem": "example", "credential_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "enabled": true, "id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "last_sync_at": "example", "last_sync_error": "example", "last_sync_ok": true, "last_sync_sites": 1, "last_sync_sites_without_site_id": 1, "missing_folders": 1, "name": "example", "site_id_field": "example", "sync": { "requested_at": "example", "started_at": "example" }, "sync_interval_secs": 1 }]No valid bearer token
The ADR-019 envelope every failure renders as. pub(crate) and schema-bearing so the OpenAPI
document can name one error shape for every endpoint (ADR-035) instead of leaving 4xx/5xx bodies
undescribed — a client that has to guess the failure shape ends up parsing the success shape and
reading undefined.
object
object
Stable machine-readable code. Clients branch on this, never on the message.
Operator-facing sentence. Safe to display; never carries an internal error’s own text.
Examplegenerated
{ "error": { "code": "example", "message": "example" }}Role lacks View
The ADR-019 envelope every failure renders as. pub(crate) and schema-bearing so the OpenAPI
document can name one error shape for every endpoint (ADR-035) instead of leaving 4xx/5xx bodies
undescribed — a client that has to guess the failure shape ends up parsing the success shape and
reading undefined.
object
object
Stable machine-readable code. Clients branch on this, never on the message.
Operator-facing sentence. Safe to display; never carries an internal error’s own text.
Examplegenerated
{ "error": { "code": "example", "message": "example" }}Inventory storage is unavailable (skeleton mode)
The ADR-019 envelope every failure renders as. pub(crate) and schema-bearing so the OpenAPI
document can name one error shape for every endpoint (ADR-035) instead of leaving 4xx/5xx bodies
undescribed — a client that has to guess the failure shape ends up parsing the success shape and
reading undefined.
object
object
Stable machine-readable code. Clients branch on this, never on the message.
Operator-facing sentence. Safe to display; never carries an internal error’s own text.
Examplegenerated
{ "error": { "code": "example", "message": "example" }}