How to Add a Custom API Endpoint

  1. Let's go to our newly added API group.

2. Click add in the upper right corner.

3. We can choose one of 3 options: CRUD Database Operations. Authentication. Start from scratch.

Let's select Start from scratch:

4. Enter the name, choose the verb, enter a description(optional), and choose whether or not Authentication is required.

5. Our API Endpoint is created, you can view the documentation of the endpoint URL and see the characteristics of the endpoint. Let's start by adding an Input. We will use the option Database Link to add all of the columns from our Tutorial table.

6. Next, let's focus on the Function Stack, what actions we want to perform and what data we want to end up with. Let's try to populate the tags array of objects on the first record of the tutorial table. First, we create a variable called "tags" that is an Array of objects, we could do this the long way with push and set filters or we could use a feature that can save us time called Import JSON.

7. After creating our variable, "tags", we then need to edit the record that we want. We can use the database request, Edit Record. Since we know which record we want to change we can enter the ID as a constant.


8. We can set the tags Input to our new variable.

9. We can then set the output and store the Response as a new variable called, "tutorial_1".

10. Then we edit our Response to return the "tutorial_1" variable.

11. We can click on documentation and then run our Endpoint in Swagger.

12. We have successfully added 3 tags to the first tutorial record.