mirror of
https://github.com/netbox-community/netbox.git
synced 2025-07-17 04:32:51 -06:00
Updated API docs
This commit is contained in:
parent
4d4441217f
commit
9e4e3a8dfa
@ -1,21 +1,23 @@
|
|||||||
# URL Hierarchy
|
# URL Hierarchy
|
||||||
|
|
||||||
The API's URL structure is divided at the root level by application: circuits, DCIM, IPAM, secrets, and tenancy. Within each application, each model has its own path. For example:
|
NetBox's entire REST API is housed under the API root, `/api/`. The API's URL structure is divided at the root level by application: circuits, DCIM, extras, IPAM, secrets, and tenancy. Within each application, each model has its own path. For example:
|
||||||
|
|
||||||
* /api/circuits/circuits/
|
|
||||||
* /api/circuits/providers/
|
* /api/circuits/providers/
|
||||||
|
* /api/circuits/circuits/
|
||||||
* /api/dcim/sites/
|
* /api/dcim/sites/
|
||||||
* /api/dcim/racks/
|
* /api/dcim/racks/
|
||||||
* /api/dcim/devices/
|
* /api/dcim/devices/
|
||||||
|
|
||||||
Each model generally has two URLs associated with it: a list URL, and a detail URL. the list URL is used to request a list of multiple objects or to create a new object. The detail URL is used to retrieve, update, or delete an existing object.
|
Each model generally has two URLs associated with it: a list URL and a detail URL. The list URL is used to request a list of multiple objects or to create a new object. The detail URL is used to retrieve, update, or delete an existing object.
|
||||||
|
|
||||||
* /api/dcim/devices/ - List devices or create a new device
|
* /api/dcim/devices/ - List devices or create a new device
|
||||||
* /api/dcim/devices/123/ - Retrieve, update, or delete the device with ID 123
|
* /api/dcim/devices/123/ - Retrieve, update, or delete the device with ID 123
|
||||||
|
|
||||||
Lists of objects can be filtered using a set of query parameters. For example, to find all interfaces belonging to the device with ID 123:
|
Lists of objects can be filtered using a set of query parameters. For example, to find all interfaces belonging to the device with ID 123:
|
||||||
|
|
||||||
* /api/dcim/interfaces/?device_id=123
|
```
|
||||||
|
GET /api/dcim/interfaces/?device_id=123
|
||||||
|
```
|
||||||
|
|
||||||
# Serializers
|
# Serializers
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user