App API

Introduction

The App API allows you to interact with the design and configuration of the current app within Joget. This API is contextually aware of the current app, enabling you to manage environment variables, create new versions, deploy processes, and more.

Plugin information

This API is part of the Joget platform and is designed for app development and management tasks.

Get started

To use the App API, ensure you have met the following prerequisites.

Prerequisites

  • Joget Platform: You should have a working Joget installation.
  • API Access: Ensure that API access is enabled and you have the necessary credentials.
  • App Context: You must work within the context of an existing Joget app.

Where to get the plugin

The API is part of the core Joget platform and does not require a separate download.

How to install

The App API is built into the Joget platform, so no installation is required. Ensure your Joget instance is up-to-date to access the latest features.

How to use It

  1. Drag and drop the APP API from the Palette to the Canvas.
  2. Select the endpoints

 

List of API Endpoints

Add environment variable

Add a new environment variable to the current app.

URL: /app/environment

HTTP Method: POST

Body Parameters
Parameter Description
id Environment variable ID.
value Environment variable value.
remarks Description of environment variable.
Sample Response
{
  "value": "I exist via API.",
  "remarks": "This is an environment variable created with API Builder.",
  "id": "apiEnvVar"
}

 

Create new version

Create a new app version based on the specified version of the current app.

URL: /app/new/{version}

HTTP Method: POST

Body Parameters
Parameter Description
version Version of current app to base on. Expect an integer value.
Use 0 value to use the latest app version.
Sample Response
{
  "published": false,
  "description": null,
  "meta": null,
  "id": "expenseclaim",
  "version": 2,
  "name": "Expenses Claim",
  "dateCreated": "Aug 26, 2019 4:37:19 PM",
  "dateModified": "Aug 26, 2019 4:37:22 PM"
}

 

Delete environment variable

Delete the specified environment variable in the current app.

URL: /app/environment/{id}

HTTP Method: DELETE

Body Parameters
Parameter Description
id ID of environment variable to remove. Expect a string.
Sample Response
{
  "date": "Mon Aug 26 16:57:53 SGT 2019",
  "code": "200",
  "message": "Successful operation"
}

 

Delete version

Delete the specified app version of the current app.

URL: /app/delete/{version}

HTTP Method: DELETE

Body Parameters
Parameter Description
version Version of current app to remove. Expect an integer value.
Sample Response
{
  "date": "Mon Aug 26 17:02:35 SGT 2019",
  "code": "200",
  "message": "Successful operation"
}

 

Deploy XPDL

Deploy a XPDL file as a new/updated process design to the current app.

URL: /app/deploy/xpdl

HTTP Method: POST

Body Parameters
Parameter Description
File Expect an XPDL file.
Sample Response
{
  "date": "Mon Aug 26 18:17:30 SGT 2019",
  "code": "200",
  "message": "Successful operation"
}

 

Download XPDL

Download the process definition of all process(es) as an XPDL file.

URL: /app/xpdl

HTTP Method: GET

Body Parameters
Parameter Description
- -
Sample Response

Definition of all process(es) as XPDL.

 

Download addon builder definition

Download the specified addon builder page JSON definition.

URL: /app/{builder}/definition/{id}

HTTP Method: GET

Body Parameters
Parameter Description
builder Builder's ID. (e.g: "api" for API Builder)
id Builder page's ID.
Sample Response

JSON definition of the builder's page.

 

Download datalist definition

Download the specified datalist JSON definition.

URL: /app/datalist/definition/{id}

HTTP Method: GET

Body Parameters
Parameter Description
id Datalist ID.
Sample Response

JSON definition of the Datalist.

 

Download form definition

Download the specified form JSON definition.

URL: /app/form/definition/{id}

HTTP Method: GET

Body Parameters
Parameter Description
id Environment variable ID.
value Environment variable value.
remarks Description of environment variable.
Sample Response

JSON definition of the Form.

 

Download userview definition

Download the specified userview JSON definition.

URL: /app/userview/definition/{id}

HTTP Method: GET

Body Parameters
Parameter Description
id Userview ID.
Sample Response

JSON definition of the Userview.

 

Find environment variable

Get values of all environment variable(s) in the current app by default.

Able to filter or sort the returned results via parameters.

URL: /app/environment/find

HTTP Method: GET

Query String Parameters
Parameter Description
nameFilter Environment variable ID.
sort Environment variable value.
sortDescending Sort the specified sort parameter value in ascending or descending order. Expect a boolean value. Must be used in conjunction with sort parameter.
startOffset Starting position of records to start query. Expect an integer.
pageSize Number of results to return. Expect an integer.
Sample Response
[
  {
    "value": "Expenses Claim",
    "remarks": null,
    "id": "AppName"
  },
  {
    "value": "4",
    "remarks": null,
    "id": "counter"
  },
  {
    "value": "8",
    "remarks": "string",
    "id": "string"
  }
]

 

Get environment variable by ID

Get values of an environment variable by its specified ID.

URL: /app/environment/{id}

HTTP Method: GET

Path Parameters
Parameter Description
id Environment variable ID.
Sample Response
{
  "value": "Expenses Claim",
  "remarks": null,
  "id": "AppName"
}

 

Increase environment variable counter value

Increments the specified environment variable counter value.

URL: /app/environment/increaseCounter

HTTP Method: PUT

Query String Parameters
Parameter Description
id Environment variable ID with a number value only.
amount Amount to increment environment variable. Increments by 1 by default.
Sample Response
{
  "value": "6",
  "remarks": null,
  "id": "counter"
}

 

List created addon builder element

List details of all created addon builder element(s) present in the current app.

URL: /app/list/{builder}

HTTP Method: GET

Path Parameters
Parameter Description
builder Builder's ID. (e.g: "api" for API Builder).
Query String Parameters
Parameter Description
nameFilter Builder page ID.
sort Builder data column to sort. Must be used in conjunction with sortDescending parameter.
sortDescending Sort the specified sort parameter value in ascending or descending order. Expect a boolean value. Must be used in conjunction with sort parameter. 
startOffset Starting position of records to start query. Expect an integer.
pageSize Number of results to return. Expect an integer.
Sample Response
[
  {
    "name": null,
    "type": "api",
    "description": null,
    "dateCreated": null,
    "dateModified": null,
    "id": "API-c12135da-a5f6-41c4-ba99-bfaa16bbe636"
  },
  {
    "name": null,
    "type": "api",
    "description": null,
    "dateCreated": null,
    "dateModified": null,
    "id": "API-5bc8e093-00cd-455a-a6b0-d94aa92a446f"
  }
]

 

List created datalist

List details of all created datalist(s) present in the current app.

URL: /app/list/datalist

HTTP Method: GET

Query String Parameters
Parameter Description
nameFilter Datalist ID.
sort Datalist data column to sort. Must be used in conjunction with sortDescending parameter.
sortDescending Sort the specified sort parameter value in ascending or descending order. Expect a boolean value. Must be used in conjunction with sort parameter. 
startOffset Starting position of records to start query. Expect an integer.
pageSize Number of results to return. Expect an integer.
Sample Response
[
  {
    "name": null,
    "description": null,
    "dateCreated": null,
    "dateModified": null,
    "id": "ExpensesListAll"
  },
  {
    "name": null,
    "description": null,
    "dateCreated": null,
    "dateModified": null,
    "id": "ExpensesApproved"
  },
    .....
]

 

List created form

List details of all created form(s) present in the current app.

URL: /app/list/form

HTTP Method: GET

Query String Parameters
Parameter Description
nameFilter Form ID.
sort Form data column to sort. Must be used in conjunction with sortDescending parameter.
sortDescending Sort the specified sort parameter value in ascending or descending order. Expect a boolean value. Must be used in conjunction with sort parameter. 
startOffset Starting position of records to start query. Expect an integer.
pageSize Number of results to return. Expect an integer.
Sample Response
[
  {
    "name": null,
    "tableName": "j_expense_claim",
    "description": null,
    "dateCreated": null,
    "dateModified": null,
    "id": "ExpensesApprovalDetail"
  },
  {
    "name": null,
    "tableName": "j_expense_approval",
    "description": null,
    "dateCreated": null,
    "dateModified": null,
    "id": "ExpensesApprovalEntry"
  },
    .....
]

 

List created userview

List details of all created userview(s) present in the current app.

URL: /app/list/userview

HTTP Method: GET

Query String Parameters
Parameter Description
nameFilter Userview ID.
sort Userview data column to sort. Must be used in conjunction with sortDescending parameter.
sortDescending Sort the specified sort parameter value in ascending or descending order. Expect a boolean value. Must be used in conjunction with sort parameter. 
startOffset Starting position of records to start query. Expect an integer.
pageSize Number of results to return. Expect an integer.
Sample Response
[
  {
    "name": null,
    "description": null,
    "dateCreated": null,
    "dateModified": null,
    "thumbnail": null,
    "id": "home"
  },
  {
    "name": null,
    "description": null,
    "dateCreated": null,
    "dateModified": null,
    "thumbnail": null,
    "id": "dashboard"
  }
]

 

List versions

List details of all app version(s) of the current app.

URL: /app/versions

HTTP Method: GET

Query String Parameters
Parameter Description
sort App version data column to sort. Must be used in conjunction with sortDescending parameter.
sortDescending Sort the specified sort parameter value in ascending or descending order. Expect a boolean value. Must be used in conjunction with sort parameter. 
startOffset Starting position of records to start query. Expect an integer.
pageSize Number of results to return. Expect an integer.
Sample Response
[
  {
    "published": true,
    "description": null,
    "meta": null,
    "id": "expenseclaim",
    "version": 1,
    "name": "Expenses Claim",
    "dateCreated": "Nov 14, 2018 2:20:33 PM",
    "dateModified": "Aug 26, 2019 7:29:43 PM"
  }
]

 

Published version

Get details of the currently published app version of the current app.

URL: /app/published

HTTP Method: GET

Parameters
Parameter Description
- -
Sample Response
{
  "published": true,
  "description": null,
  "meta": null,
  "id": "expenseclaim",
  "version": 1,
  "name": "Expenses Claim",
  "dateCreated": "Nov 14, 2018 2:20:33 PM",
  "dateModified": "Aug 26, 2019 7:29:43 PM"
}

 

Retrieve created addon builder element as options

List label & value of all addon builder element(s) present in the current app.

URL: /app/{builder}/options

HTTP Method: GET

Path Parameters
Parameter Description
builder Builder's ID. (e.g: "api" for API Builder)
Query String Parameters
Parameter Description
nameFilter Builder page ID.
sort Builder data column to sort. Must be used in conjunction with sortDescending parameter.
sortDescending Sort the specified sort parameter value in ascending or descending order. Expect a boolean value. Must be used in conjunction with sort parameter. 
startOffset Starting position of records to start query. Expect an integer.
pageSize Number of results to return. Expect an integer.
Sample Response
[
  {
    "label": "",
    "value": ""
  },
  {
    "label": "Expense Claim Data",
    "value": "API-c12135da-a5f6-41c4-ba99-bfaa16bbe636"
  },
  {
    "label": "Test API Document KB",
    "value": "API-5bc8e093-00cd-455a-a6b0-d94aa92a446f"
  }
]

 

Retrieve created datalist as options

List label & value of all datalist(s) present in the current app.

URL: /app/datalist/options

HTTP Method: GET

Query String Parameters
Parameter Description
nameFilter Datalist ID.
sort Datalist data column to sort. Must be used in conjunction with sortDescending parameter.
sortDescending Sort the specified sort parameter value in ascending or descending order. Expect a boolean value. Must be used in conjunction with sort parameter. 
startOffset Starting position of records to start query. Expect an integer.
pageSize Number of results to return. Expect an integer.
Sample Response
[
  {
    "label": "",
    "value": ""
  },
  {
    "label": "Expense All",
    "value": "ExpensesListAll"
  },
  {
    "label": "Expense Approved",
    "value": "ExpensesApproved"
  },
    .....
]

 

Retrieve created form as options

List label & value of all form(s) present in the current app.

URL: /app/form/options

HTTP Method: GET

Query String Parameters
Parameter Description
nameFilter Form ID.
sort Form data column to sort. Must be used in conjunction with sortDescending parameter.
sortDescending Sort the specified sort parameter value in ascending or descending order. Expect a boolean value. Must be used in conjunction with sort parameter. 
startOffset Starting position of records to start query. Expect an integer.
pageSize Number of results to return. Expect an integer.
Sample Response
[
  {
    "label": "",
    "value": ""
  },
  {
    "label": "Expense Approval Detail",
    "value": "ExpensesApprovalDetail"
  },
  {
    "label": "Expense Approval Entry",
    "value": "ExpensesApprovalEntry"
  },
    .....
]

 

Retrieve created userview as options

List label & value of all userview(s) present in the current app.

URL: /app/userview/options

HTTP Method: GET

Query String Parameters
Parameter Description
nameFilter Userview ID.
sort Userview data column to sort. Must be used in conjunction with sortDescending parameter.
sortDescending Sort the specified sort parameter value in ascending or descending order. Expect a boolean value. Must be used in conjunction with sort parameter. 
startOffset Starting position of records to start query. Expect an integer.
pageSize Number of results to return. Expect an integer.
Sample Response
[
  {
    "label": "",
    "value": ""
  },
  {
    "label": " Expenses Claims App",
    "value": "home"
  },
  {
    "label": "Dashboard Template",
    "value": "dashboard"
  }
]

 

Retrieve processes as options

List label & value of all process(es) present in the current app.

URL: /app/process/options

HTTP Method: GET

Parameters
Parameter Description
- -
Sample Response
[
  {
    "label": "",
    "value": ""
  },
  {
    "label": "Expense Approval Process (process1)",
    "value": "process1"
  },
  {
    "label": "Process 2 TEST (testprocess2)",
    "value": "testprocess2"
  }
]

 

Update environment variable

Update the value of an environment variable in the current app.

URL: /app/environment

HTTP Method: PUT

Body Parameters
Parameter Description
id Any existing environment variable ID.
value Environment variable value to overwrite.
remarks Description of environment variable to overwrite.
Sample Response
{
  "value": "string",
  "remarks": "string",
  "id": "string"
}
Created by Julieth Last modified by Aadrian on Dec 03, 2024