Creating Routes
> Define endpoints that respond to HTTP requests with visual logic.
A route is a single endpoint within an api. Each route has an HTTP method, a URL path, and a flow that defines what happens when the route is called.
Step-by-step
1. Open your API
Navigate to Dashboard > APIs and click on the API you want to add a route to.
2. Click "Create Route"
You will see a form asking for the route details.
3. Choose an HTTP method
Select the appropriate method for your route:
- GET -- Retrieve data
- POST -- Create new data
- PUT -- Update existing data
- DELETE -- Remove data
If you are unsure which method to use, see the Methods guide for detailed guidance.
4. Define the path
Enter the URL path for your route. This is appended to your API's base path.
Examples:
| Path | Description | |------|-------------| | /users | List or create users | | /users/:id | Get, update, or delete a specific user | | /search | Search endpoint | | /orders/:orderId/items | Nested resource |
Path segments starting with : are path parameters -- they capture dynamic values from the URL. See Parameters for more details.
5. Open the Builder
After creating your route, click on it to open the Builder. This is the visual editor where you define your route's logic using nodes.
You will see a Start Node on the canvas. This is where execution begins when the route receives a request.
6. Build your flow
1. Drag from the Start Node's sequence output to open the quick menu. 2. Add nodes to process the request -- read input, query the database, transform data. 3. End with a response node (e.g., Return JSON) to send data back to the caller.
7. Save and deploy
1. Click Save in the builder toolbar. 2. Click Deploy to publish your route. 3. Your route is now live and accepting requests.
Route settings
Each route has additional settings you can configure:
- Description -- A human-readable description of what the route does
- Authentication -- Whether the route requires an API key
- Rate limiting -- Limit how many requests the route accepts per time period
Deploying a route makes it publicly accessible. Make sure your logic is complete and tested before deploying.
What's next?
| Topic | Description | |-------|-------------| | Methods | Understand HTTP methods in depth | | Parameters | Work with dynamic path segments and query strings | | Builder | Learn the visual editor |