This guide uses the Retrieve list data API as an example.

Do ensure that there are records present in "Manage Sample Data" CRUD menu.


To call this API, we must know these values:

  1. API URL: http://localhost:8080/jw/api/list/list_sampleForm (Change the domain/port as needed according to your Joget server)
  2. HTTP Method (In this case, it is a GET call)
  3. Mandatory parameter(s) to fill up.
    This API only requires 1 mandatory path parameter --> datalistId (Path parameter is to be keyed into the API URL itself)
    Optionally, you can also fill in values for the optional query string parameters to alter the API response.
  4. API Document ID: API-0f6e9f1f-6e1d-4e9e-9bd2-fb34c67b2696 (You can find this value by editing the API document > Properties)
  5. API Key (unique API Key that you've created in your API access)

Reference: https://dev.joget.org/community/display/marketplace/List

 

Now to construct the API call, these are the required request header fields:

  • api_id
  • api_key

Reference: https://dev.joget.org/community/display/marketplace/Manage+API+Key+Menu#ManageAPIKeyMenu-ConfigureAPIAccess

Now with the information above, this is how it looks like in Postman.


The expected reponse returned:

{
    "total": 7,
    "size": 7,
    "data": [
        {
            "quantity": "100",
            "price": "1.05",
            "name": "Lemon",
            "id": "6e09998c-54f2-4369-b0b9-0a14e5e15315"
        },
        {
            "quantity": "4",
            "price": "8.88",
            "name": "Butter",
            "id": "5e654d11-714b-4b7e-b60f-1ad9f48e90f7"
        },
        {
            "quantity": "2",
            "price": "2.79",
            "name": "Chocolate",
            "id": "7353c0a5-70ed-408b-a440-0f169b161653"
        },
        {
            "quantity": "69",
            "price": "4.20",
            "name": "Eggs",
            "id": "f4fd80be-dcd1-4744-93fd-f5e47e9c85d7"
        },
        {
            "quantity": "20",
            "price": "0.5",
            "name": "Salt",
            "id": "fb15d830-79ea-4be4-8fd5-cc0ce72566e3"
        },
        {
            "quantity": "12",
            "price": "1.25",
            "name": "Sugar",
            "id": "66ed9ee1-cd36-4703-a5a0-9d9d2fdac738"
        },
        {
            "quantity": "5",
            "price": "5.99",
            "name": "Flour",
            "id": "81a11eaa-8f9e-4c36-aab6-ffef6406a0e4"
        }
    ]
}