Logo
  • NAV documentation
  • Overview
  • Installing NAV
  • Getting started with NAV
  • Getting organized
  • Howtos
    • Command line utilities provided in NAV
    • Installing NAV from source code
    • Install from source on Debian
    • Installing Graphite for use with NAV on Debian
    • Integrating Graphite with NAV
    • Migrating RRD data to Graphite (from NAV 3 to NAV 4)
    • Troubleshooting topology problems in NAV
    • Robustifying e-mail
    • Migrating data from one NAV installation to another
    • Authenticating with OIDC/OAuth2 by using a local settings file
    • Authenticating with the apache plugin mod_auth_openidc and Feide
    • Authenticating with the apache plugin mod_auth_mellon and Feide
    • Controlling log output from NAV
    • The NAV API
    • NAV API Parameters
      • Searches
      • Filters
      • Detailed endpoint specifications
        • api/alert/
        • api/arp/[<id>]
        • api/cam/[<id>]
        • api/interface/[<id>]
        • api/maintenance/
        • api/organization/[<id>]
        • api/netbox/[<id>]
        • api/netboxentity/[<id>]
        • api/room/[<id>]
        • api/prefix/[<id>]
        • api/prefix/routed
        • api/prefix/usage/[<prefix>]
        • api/unrecognized-neighbors/[<id>]
        • api/vendor/
    • Securing NAV in production
    • Migrating DHCP stats collected with NAV 5.14.x through NAV 5.16.x
  • FAQ
  • Reference material
  • Network Administration Visualized release notes
  • Glossary
  • Hacking NAV
Logo
  • Howtos
  • NAV API Parameters
Previous Next

NAV API Parameters

Here you will find documentation about each endpoint in NAVs API.

Searches

On some endpoints you can do searches. This is done by using the search parameter:

api/netbox?search=some-sw

The list of fields used in the search are defined for each endpoint. Searches are case-insensitive and do partial matches.

Filters

Almost all endpoints supports filtering. This is done by specifying a value for the field you want to filter on:

api/netbox?room=a-room
api/netbox?category=GSW

Detailed endpoint specifications

api/alert/

Provides access to NAVs alert status. This is the same as viewing NAV status

Search:

None

Filters:

event_type, not_event_type, organization, not_organization, category, not_category, alert_type, not_alert_type, device_group, not_device_group

Additional parameters:
  • acknowledged=on - also list acknowledged alerts

  • on_maintenance=on - also list alerts regarding subjects on maintenance

  • stateless=on - also list stateless alerts (from the last 24 hours)

  • stateless_threshold=<hours> - adjust stateless interval

api/arp/[<id>]

Provides access to NAVs ARP data

Search:

None

Filters:

ip, mac, netbox, prefix

Additional parameters:
  • active=on - list only entries that are active now (end_time = infinity)

api/cam/[<id>]

Provides access to NAVs CAM data

Search:

None

Filters:

mac, netbox, ifindex, port

Additional parameters:
  • active=on - list only entries that are active now (end_time = infinity)

api/interface/[<id>]

Provides access to NAVs interface data

Search:

ifalias, ifdescr, ifname

Filters:

ifname, ifindex, ifoperstatus, netbox, trunk, ifadminstatus, iftype, baseport

api/maintenance/

Create a maintenance task with the given components.

Supports GET, POST and DELETE requests:

GET: Returns maintenance tasks.

Search:

description

Filters:

id, description, author, state (scheduled, active, passed, canceled), current, past, future, endless

POST: Returns the created maintenance task or an error. Requires a dict of the form:

{
  "start_time": "2025-09-29T11:11:11",
  "end_time": "2025-09-29T13:11:11",
  "description": "Changing out old equipment in serverroom",
  "author": "exampleuser",
  "components": {
    "location": ["mylocation", "secondlocation"],
    "room": ["myroom", "secondroom"],
    "netbox": [1, 2],
    "service": [1, 2],
    "netboxgroup": ["AD", "BACKUP"]
  }
}

Remove the end_time entry if the maintenance task does not have a determined end time yet.

The required fields are start_time, description, author and components with at least one component of the type location, room, netbox, service or netboxgroup.

DELETE: Delete maintenance task with given id.

api/organization/[<id>]

Provides access to NAVs organization data

Search:

description

Filters:

id, parent, description

api/netbox/[<id>]

Provides access to NAVs netbox data

Search:

sysname

Filters:

ip, sysname, room, room_alias, room_location_alias, organization, category

api/netboxentity/[<id>]

Provides access to NAV’s collected physical entities information (I.e. physical contents of IP Devices, in most cases collected from ENTITY-MIB::entPhysicalTable)

Search:

None

Filters:

netbox, physical_class

api/room/[<id>]

Provides access to NAVs room data

Search:

description, aliases

Filters:

id, location, description, alias

api/prefix/[<id>]

Provides access to NAVs prefix data

Search:

None

Filters:

vlan, net_address, vlan__vlan, contains_address

Note

The vlan__vlan is used to filter on vlan number as the vlan field references the primary key only. e.g. prefix?vlan__vlan=<vlan-number>

api/prefix/routed

List all prefixes that are routed

Search:

None

Filters:

None

Additional parameters:
  • family=<4|6> - List only prefixes within the specified family

api/prefix/usage/[<prefix>]

List usage statistics for prefixes. This fetches the number of active IP-addresses for each prefix and compares it to the number of possible addresses on each prefix. If no time interval is specified, fetches the current status

Search:

None

Filters:

None

Additional parameters:
  • start_time=<iso8601> - set start time

  • end_time=<iso8601> - set end time

api/unrecognized-neighbors/[<id>]

Provide access to NAVs unrecognized neighbor data.

Search:

remote_name

Filters:

netbox, source

api/vendor/

Returns the vendor(s) for a given MAC address or list of MAC addresses. This is done by comparing the MAC addresses with a registry of known OUIs.

Supports GET and POST requests:

GET: Returns the vendor for the given MAC address. Requires the MAC address

as a query parameter mac=<str>.

POST: Returns the vendors for given MAC addresses. Requires the MAC addresses

as a JSON array.

In either case the MAC addresses must be in a valid format. Responds with a JSON dict mapping the MAC addresses to the corresponding vendors. The MAC addresses will have the format aa:bb:cc:dd:ee:ff. If the vendor for a given MAC address is not found, it will be omitted from the response. If no mac address was supplied, an empty dict will be returned.

Previous Next

© Copyright 2012-2021 Uninett AS, 2022-2026 Sikt.

Built with Sphinx using a theme provided by Read the Docs.