From 9e4e3a8dfaba1e4a3c5c4a7cad8ba6b0ffed7673 Mon Sep 17 00:00:00 2001 From: Jeremy Stretch Date: Mon, 13 Mar 2017 10:00:13 -0400 Subject: [PATCH] Updated API docs --- docs/api/structure.md | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/docs/api/structure.md b/docs/api/structure.md index 437ba9bfd..f61082b38 100644 --- a/docs/api/structure.md +++ b/docs/api/structure.md @@ -1,21 +1,23 @@ # 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/circuits/ * /api/dcim/sites/ * /api/dcim/racks/ * /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/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: -* /api/dcim/interfaces/?device_id=123 +``` +GET /api/dcim/interfaces/?device_id=123 +``` # Serializers