Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Create a new API json file by clicking the New button and select selecting API file. The file will be opened and the Canvas, Parameters, API Routes, and Properties panel will be initialized.

                  

Set Properties

On the left hand lower panel select the General Info tab and fill on the following values

  • Name: employee
  • Summary: get employee information
  • HTTP Method: get

  • HTTP Path: /employee/:employeeNumber

    Info

    Notice the colon before the employeeNumber. This indicates that employeeNumber is a required path parameter.

    Specifying a parameter this way will automatically add it to the Input Parameters list.


  • Category, Sub Category, Tag, and Description all help improve documentation and organization. 

Image Added


Input Parameters

This example is a basic GET API that requires an Employee Number as a parameter and will return some information about the employee and the office they are associated with.

You will notice that adding the :employeeNumber to the end of the HTTP path automatically added an employeeNumber parameter to the Input Parameters. These autogenerated path parameters can only be removed by changing the path. The default Type is string so we need to change it integer.

Double click on employeeNumber in the Input Parameters tab to open the Edit Parameter dialog

  Image Added

Info


If you wish to use a query parameter instead of a path parameter or want to add additional parameters click the green plus sign in the Input Parameter panel to open the API Parameter dialog.

Image Added

Fill in the following properties:

  • Name: EmployeeNumber
  • From: query
  • Data Type: integer
  • Check the Required checkbox
  • Example: 1088
  • Description: Employee Number to request data about

Adding a valid example and description makes testing the API easier and improves the autogenerated documentation. 

Image Added

Output Parameters

Switch to the Output Parameters tab and add the following parameters

Image Added


Save

At this point you should save your API file by clicking the Save button in the menu ribbon. The first time you use save you will be presented a save dialog with the File Name defaulting to Unnamed.api.json. You should change the Unnamed portion to an appropriate file name, like Employee.api.json in this case. Click Save.

Image Added

Add Low Code Logic

Click on Add Step... in the canvas.

Image Added

In the What would you like to do? drop down expand the Database section and click on Retrieve One Database Record

Image Added

Image Added

Image Added

Image Added