OAS3 Document - Preview APIs

Introduction

Similar to other builders in Joget, you can preview your generated APIs through the OAS3 Document button located in the API Builder's top menu bar. This feature allows you to visualize and interact with API resources for testing without using external API client software or implementing any logic.

On the preview page's top right, you can download the generated APIs as a YAML-formatted OpenAPI 3.0 document. The preview interface is built with Swagger UI.

Plugin information

This documentation covers the API preview feature within the API Builder in Joget. The feature is essential for testing and interacting with your API resources before implementing logic or deploying them to production.

Get started

How to use it

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

  1. Click on the API you want to test. This expands the available configurations for the API.
    In this case, you are testing an API method that retrieves all or some records from the Expense All datalist.
  2. In the Parameters section, you will see all the available API parameters, their data types, parameter types, and a short description of their function/purpose.
  3. The Responses section shows all the possible responses the API may return. In the Example Value field, you can expect the JSON value that this API will return, depending on whether the request is successful or unsuccessful/misconfigured.
  4. Click the Try it out button in the Parameters section header.


    Note: Some parameters may be mandatory. Ensure you fill in sample data where required.
  5. The List API will default return all records found in a datalist if none of the parameters contain a value.
  6. Clear the auto-filled sample format in the filters parameter and click Execute to call the API method with your configuration.
  7. You have successfully called this API method and received a successful response.
  8. In the test response section, you can observe this API call's sample cURL, request URL, and server response.
  9. The API will return the response value in JSON format in the server response body. You can inspect the value here and determine how your external application can consume this API.
Created by Julieth Last modified by Aadrian on Nov 19, 2024