Create a Standard Endpoint
This guide walks you through building a GET endpoint that fetches data from a table, filters by a request parameter, and joins to a related table.
Step 1: Navigate to the Endpoints Page
Section titled “Step 1: Navigate to the Endpoints Page”Click API in the sidebar to open the endpoint editor.
Step 2: Create a New Endpoint
Section titled “Step 2: Create a New Endpoint”Click the “New” button in the top-right of the endpoint list.
A new route is created with a placeholder path like /_new/X7K2.
Step 3: Configure Basic Details
Section titled “Step 3: Configure Basic Details”In the API Details tab, set the following:
| Field | What to Enter |
|---|---|
| Type | ONE for a single record, ARRAY for a list |
| Name | A descriptive name for your endpoint |
| Description | What this endpoint does |
| Method | GET for read operations |
| Path | The URL path (e.g., /product/by-sku, /order/details) |
Step 4: Set the Base Table
Section titled “Step 4: Set the Base Table”Select your Base Table — the primary table this endpoint queries.
This determines which columns are available for filtering and response mapping.
| If you’re building… | Base table might be |
|---|---|
| User directory | user |
| Product catalog | product |
| Order lookup | order |
Step 5: Add a Request Parameter
Section titled “Step 5: Add a Request Parameter”Define parameters that callers must (or can) provide when calling the endpoint.
In the Parameters section:
- Enter a parameter name in the input field
- Click Add
- Check Required if the parameter is mandatory
- Set the validator (e.g.,
Type Check→stringorinteger)
| If filtering by… | Parameter name | Validator |
|---|---|---|
| Name | name | string |
| ID | id | integer |
| SKU | sku | string |
| Status | status | string |
Step 6: Add a Join (Optional)
Section titled “Step 6: Add a Join (Optional)”If your response needs data from a related table, add a join.
Click Add Join to open the join selector:
-
For foreign key relationships: You’ll see tables that have foreign key relationships with your base table. Click the ”+” button on the table you want to join.
-
For custom joins: Click the pencil icon to open the join editor and define a custom relationship.
The join appears with:
- Alias:
{localColumn}_{foreignTable}(e.g.,companyId_company) - Type:
INNER(only matching rows) orLEFT(include nulls)
To change the join type, click the dropdown menu and select your preferred option.
Step 7: Add a Where Clause
Section titled “Step 7: Add a Where Clause”Filter the results based on your request parameter.
Click Add Statement to add a filter condition:
- Select the table and column to filter on
- Set the operator (
=,LIKE,>, etc.) - Set the value to
$parameterNameto reference your request parameter
Step 8: Configure the Response
Section titled “Step 8: Configure the Response”Define which fields to return in the API response.
Click the Response tab at the top of the editor.
Click Add Property for each field:
- Enter the property name (how it appears in the JSON response)
- Select the column from the available tables
For joined tables, columns are available under the join alias:
| Source | Selector format |
|---|---|
| Base table column | {baseTable}.{column} |
| Joined table column | {localColumn}_{foreignTable}.{column} |
Step 9: Apply Changes
Section titled “Step 9: Apply Changes”- Click “Preview Schema” in the top bar to review your changes
- Verify the endpoint configuration looks correct
- Click “Submit” to save
Test Your Endpoint
Section titled “Test Your Endpoint”Call your endpoint with the required parameters:
curl "http://localhost:3001/api/v1/{your-path}?{parameter}={value}"Example request:
curl "http://localhost:3001/api/v1/user/by-name?firstName=John"Example response:
{ "data": { "id": 1, "firstName": "John", "lastName": "Doe", "companyName": "Acme Corp" }}For more configuration options, see the Endpoints Reference.