mirror of
https://github.com/netbox-community/netbox.git
synced 2024-05-10 07:54:54 +00:00
Use _list appendix for GraphQL list queries
This commit is contained in:
@@ -42,8 +42,10 @@ The response will include the requested data formatted as JSON:
|
||||
|
||||
NetBox provides both a singular and plural query field for each object type:
|
||||
|
||||
* `object`: Returns a single object. Must specify the object's unique ID as `(id: 123)`.
|
||||
* `objects`: Returns a list of objects, optionally filtered by given parameters.
|
||||
* `$OBJECT`: Returns a single object. Must specify the object's unique ID as `(id: 123)`.
|
||||
* `$OBJECT_list`: Returns a list of objects, optionally filtered by given parameters.
|
||||
|
||||
For example, query `device(id:123)` to fetch a specific device (identified by its unique ID), and query `device_list` (with an optional set of fitlers) to fetch all devices.
|
||||
|
||||
For more detail on constructing GraphQL queries, see the [Graphene documentation](https://docs.graphene-python.org/en/latest/).
|
||||
|
||||
|
||||
Reference in New Issue
Block a user