List API

Introduction

The List API lets you retrieve data from a specified list within the Joget application. This API interacts with the list selected in the current app context, enabling efficient data retrieval and manipulation.

Plugin information

  • Plugin Name: List API
  • Category: Data Management
  • Version: BETA4

Get started

To begin using the List API, you must have access to a Joget application with a configured datalist. This guide details setting up and using the API to retrieve list data.

How to use It

  1. Drag and drop the List API from the Palette to the Canvas.
  2. Select List
  3. Enter Short Description (optional)
  4. Select the endpoints

  • List: Select any list present in the current app for interaction with API.
  • Short Description: Any description

List of API Endpoints

Retrieve list data

Get all records from the specified list.

URL: /list/{datalistId}

HTTP Method: GET

Path Parameter
Parameter Description
datalistId Datalist ID to get records from.
Query String Parameters
Parameter Description
filters

Filters the returned datalist records by querying the search terms with the datalist columns.

Similar to the LIKE operator for database querying.

Tip
From API Builder plugin BETA4 onwards, here supports Date Range filtering.
Multiple values for the date range filter can be split with the ("|") symbol.
It will look like this:
http://localhost:8080/jw/api/list/ExpensesListAll?d-114034-fn_dateCreated=2021-12-25|2021-12-30
Note that when calling this API externally, special characters must be encoded before performing the API call. So after encoding URL special characters, it should look like this below:
http://localhost:8080/jw/api/list/ExpensesListAll?d-114034-fn_dateCreated=2021-12-25%7C2021-12-30
startOffset Starting position of records to start query. Expect an integer.
pageSize Number of results to return. Expect an integer.
Sample Response
{
  "total": 4,
  "size": 4,
  "data": [
    {
      "ref": "0003",
      "total": "5.00",
      "dateCreated": "Aug 21, 2019",
      "remark": "",
      "title": "Business Trip CEO",
      "claimant": "Admin Admin",
      "SelectApprover": "admin",
      "status": "<span style='color:orange;font-weight:bold;'>Submitted</span>"
    },
      .....
  ]
}
Created by Julieth Last modified by Aadrian on Dec 03, 2024