Basic Queries
Get by ID
Retrieve a specific object by its ID:Get by Attribute
Retrieve an object by filtering on attributes:Get All Objects
Retrieve all objects of a specific kind:Filtering
Filter by Attributes
Use thefilters() method for complex filtering:
Filter Syntax
The SDK supports Django-style filter lookups:| Filter | Example | Description |
|---|---|---|
__value | name__value="router-01" | Exact value match |
__contains | name__value__contains="router" | Contains substring |
__in | status__value__in=["active", "maintenance"] | Value in list |
__gt | port_count__value__gt=24 | Greater than |
__gte | port_count__value__gte=24 | Greater than or equal |
__lt | port_count__value__lt=48 | Less than |
__lte | port_count__value__lte=48 | Less than or equal |
Relationship Filters
Filter by related objects:Working with Branches
Query in Specific Branch
Query data from a specific branch:Compare Across Branches
Query the same object in different branches:GraphQL Queries
Custom GraphQL Queries
Build custom GraphQL queries for advanced use cases:Query with Filters
Add filters to GraphQL queries:Nested Relationships
Query nested relationships:Accessing Node Attributes
Basic Attributes
Access attribute values:Relationship Attributes
Access related objects:Fetching Related Objects
Fetch related objects lazily:Pagination
Limit Results
Limit the number of results:Offset Results
Skip results for pagination:Sorting
Order Results
Sort query results:Multiple Sort Fields
Sort by multiple fields:Query Performance
Select Only Required Fields
Reduce payload size by selecting only needed fields:Batch Fetching
Fetch multiple objects efficiently:Error Handling
Handle query errors gracefully:Examples
Find Devices at a Site
Get Active Interfaces
Complex Query with Relationships
Next Steps
Mutations
Learn how to create and update data
Batch Operations
Perform efficient bulk operations