You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 9 Next »

Definition

You can preview your generated APIs via the OAS3 Document button located on the API Builder's top menu bar, similar to other Builders in Joget.

Here you can quickly visualize and directly interact with the API’s resources for testing, without using external API client software nor having any implementation logic in place.

On the top right of the page, you can also download the generated APIs as a YAML-formatted OpenAPI 3.0 document.

This preview interface is created with Swagger UI.


API Testing Tutorial

In this example, we would like to test a sample List API we created in the default Expenses Claims App.


First, click on the desired API to test. This will expand the configurations available for the API.

In this case, we are testing an API method that lists all or partial records of the "Expense All" datalist.

In the "Parameters" section, we can observe all the available parameters of this API, along with its data type, parameter type, and a short description about its function/purpose.

In the "Responses" section, here shows all the possible responses that this API may return. In the 'Example Value' field, we can expect the JSON value that this API will return, depending on a successful or unsuccessful/misconfigured request.


Now let's try out this API method! Click on "Try it out" button located on the right side of the "Parameter" section header.

Depending on the parameter requirements of an API element, some parameters may be mandatory. Do fill up sample data into any mandatory parameter(s).

In this case, the List API by default will return all records found in a datalist, if none of the parameters contain a value.





  • No labels