Overview
Kirby's Query Language API, or KQL, takes the power of GraphQL and integrates it with the flexibility of Kirby's data structures, all while maintaining the simplicity associated with REST APIs. This innovative API allows developers to handle complex queries and customize the results in a way that perfectly aligns with their application needs. By enabling smooth data retrieval through straightforward JSON POST requests, KQL stand out as a tool for those looking to enhance their Kirby installations.
The ability to interact with various elements of a Kirby site—from pages to users to files—opens up a realm of possibilities, making it an essential resource for developers aiming to leverage the full potential of their content. The setup process is simplified, and with the help of the KQL sandbox, users can explore and test queries effectively.
Features
- Custom Query Endpoint: KQL introduces a dedicated query API endpoint (/api/query) for tailored data fetching, backed by authentication options for added security.
- Flexible Query Options: This API allows for fetching data using both straightforward and complex queries, adapting to simple requests or detailed data extraction needs.
- Result Customization: Utilize the select option to specify exactly which properties and fields to return, offering high control over the results.
- Pagination Support: Easily manage large datasets with built-in pagination capabilities, allowing users to limit results and navigate through multiple pages seamlessly.
- Subqueries and Nested Data: Enhance data retrieval by supporting subqueries, enabling access to nested data structures within the site.
- Multiple Queries: Initiate comprehensive data operations by executing multiple queries in a single call, maximizing efficiency and minimizing request overhead.
- Sandbox Environment: Users can experiment and refine their queries in the KQL sandbox, fostering a practical learning experience before implementation.
- Access Control Options: Authentication settings can be configured in the API, allowing developers to manage access and secure sensitive data effectively.