Apito is a powerful open source headless CMS and API builder that helps you create both GraphQL and REST API endpoints effortlessly. This open source CMS platform serves as a modern alternative to traditional content management systems, enabling developers to build scalable APIs for any project.
This comprehensive guide will show you how to use Apito's API builder to create robust GraphQL and REST API solutions for your next application.
Once you log into the Apito Console, you'll see a Project Space where you can manage multiple projects. This open source platform allows you to switch between projects or create new ones seamlessly.
Click the Start a new Project
button to begin building your GraphQL and REST API with our API builder.
Jump-start your API builder experience with pre-configured project templates. These templates come with predefined data models and content, perfect for GraphQL and REST API development.
You can also start fresh by selecting an EMPTY PROJECT
to build your open source CMS from scratch.
Enter your project name and description. For the database option, select Apito Cloud
to get started quickly with our managed open source database solution.
:::info Apito Cloud is a managed database service that's free of charge. This open source CMS feature allows you to focus on building your GraphQL and REST API without infrastructure concerns. :::
Congratulations! Your API builder project is being created. Once complete, click Explore new project
to start building your GraphQL and REST API endpoints instantly.
Navigate to the Models tab in the top navigation menu. This is where Apito's API builder shines - creating database models that automatically generate both GraphQL and REST API endpoints.
Click Add a model
from the sidebar and name your model (e.g., "product"). This open source CMS will automatically create the corresponding GraphQL schema and REST API routes.
Add fields to your model using the API builder interface:
Create additional models like "Category" with fields for name, label, and icons. Apito's open source model builder supports complex and nested structures for both GraphQL and REST API generation.
Create relationships between models using the API builder. Click Add Field
and select Relations
to define how your GraphQL and REST API will handle data relationships.
For example, establish many-to-many relationships between Products and Categories. This open source CMS makes entity relations simple, automatically updating both GraphQL schema and REST API endpoints.
Navigate to the Contents tab to manage your data. This open source CMS auto-generates tables and forms based on your database model design, supporting both GraphQL and REST API data operations.
Click Add a new product
to see the auto-generated form. This API builder creates specialized input forms based on your model design, making content management intuitive.
Add products and categories through the interface. The open source CMS handles relationships automatically, ensuring data consistency across both GraphQL and REST API endpoints.
Your API builder has generated a complete API solution! Navigate to the API Explorer
to test both GraphQL and REST API endpoints.
The GraphQL explorer allows you to write and test queries in real-time. Try searching for products with specific criteria - your open source API is ready for integration!
For REST API integration, Apito generates comprehensive Swagger documentation compatible with OpenAPI standards. This open source CMS provides both GraphQL and REST API options for maximum flexibility.
Your open source API builder project is now complete with both GraphQL and REST API endpoints ready for production use!