Layouts
Retrieve Layouts
Retrieve Single Layout
Retrieve detailed information about a specific layout within your location.
List Layouts
Retrieves a paginated list of layouts with comprehensive filtering, sorting, and searching capabilities. This endpoint provides flexible querying options to find layouts based on various criteria.
Basic Layout Retrieval
Response Structure
Filtering
The API supports comprehensive filtering of layouts through query parameters. Multiple filters can be combined to refine your results.
Filtering Examples
Filter by Path:
Retrieve layouts based on their hierarchical structure. Here's what it does:- When
path=all
: Returns all layouts for the location without filtering by parent-child relationships. - When
path=some-specific-path
: Returns only layouts that are direct children of the layout identified by the last component of the specified path. - Without the
path
parameter: It defaults to showing only top-level layouts (those with no parent).
- When
This parameter is useful for navigating through hierarchical layout structures, allowing you to either view the entire layout hierarchy at once (path=all
) or to view specific levels of the hierarchy (by specifying a path to that level).
Another example request with path=all
When using path filters with forward slashes (/), ensure proper URL encoding. Most modern HTTP clients handle this automatically, but you may need to manually encode "/" as "%2F" in some cases.
- Filter by Layout Code:
Retrieve layouts with a specific code
- Filter by metadata:
Retrieve layouts by metadata
Pagination
The API implements pagination to manage large result sets efficiently. The API response includes a pagination object with the following properties:
- has_more - Indicates if there are more layouts available
- page - Current page number (default: 1)
- limit - Number of results per page (default: 1000)
- total_count - Total number of layouts in the database.
To retrieve the next page of results:
Sorting
Control the order of results using:
If no sorting parameter is specified, the system defaults to sorting by hierarchy
in ascending order asc
Example with sorting:
Search
The API provides advanced full-text search capabilities through the search parameter, allowing you to search layouts using fuzzy, typo-tolerant matching across multiple fields. The search functionality examines key layout properties including:
name
nested_name
metadata
You can also include search_strategy
parameter along with search
. The search_strategy
parameter determines how multiple search terms are combined when performing searches across database records.
Available Strategies
match_all
(Default):- Require ALL search terms to be present in results.
match_some
- Allows ANY search term to match results.
Impact on Search Results
When using
match_all
- Smaller, more precise result sets.
When using
match_some
- Larger, more diverse result sets.
Example Scenarios
- Using
match_all
- Using
match_some