| Warning | ||
|---|---|---|
Introduced in v5, the API Domain Whitelist setting in General Settings needs to be configured to allow JSON API requests. If a request is from a non-whitelisted domain, the response will be a HTTP 400 Bad Request.
|
| Panel | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||
Form Data API and List Data API are newly added feature in Joget Workflow v6.
|
Table of Contents indent 30px style circle
App
| Thai |
|---|
แอป |
web/json/app/(*:appId)/(~:version)/form/(*:formId)/columns
Description
| Thai |
|---|
ลักษณะ |
Retrieves all columns for a form
| Thai |
|---|
ดึงคอลัมน์ทั้งหมดสำหรับฟอร์ม |
User Role
| Thai |
|---|
บทบาทของผู้ใช้ |
Admin
| Thai |
|---|
ผู้ดูแลระบบ |
Method
| Thai |
|---|
กระบวนการ |
HTTP GET/POST
Parameters
| Thai |
|---|
พารามิเตอร์ |
appId - App definition id
Thai appId - รหัสนิยามแอป
version - (Optional) App definition version
Thai เวอร์ชัน - (เป็นตัวเลือก) เวอร์ชันคำจำกัดความของแอป
formId - Form definition Id
Thai formId - รหัสคำจำกัดความของแบบฟอร์ม
Sample URL
| Thai |
|---|
ตัวอย่าง URL |
http://localhost:8080/jw/web/json/app/crm/form/crm_account/columns
Sample Result
| Thai |
|---|
ตัวอย่างผลลัพธ์ |
| Code Block | ||
|---|---|---|
| ||
[{
"value": "accountName",
"label": "Account Name"
}, {
"value": "address",
"label": "address"
}, {
"value": "city",
"label": "City"
}, {
"value": "country",
"label": "Country"
}, {
"value": "dateCreated",
"label": "Date Created"
}, {
"value": "dateModified",
"label": "Date Modified"
}, {
"value": "id",
"label": "ID"
}, {
"value": "state",
"label": "State"
}] |
web/json/app/(*:appId)/(~:version)/generator/(*:formId)/generate
Description
| Thai |
|---|
ลักษณะ |
Executes a generator plugin based on a form
| Thai |
|---|
เรียกใช้ปลั๊กอินตัวสร้างโดยยึดตามฟอร์ม |
User Role
| Thai |
|---|
บทบาทของผู้ใช้ |
Admin
| Thai |
|---|
ผู้ดูแลระบบ |
Method
| Thai |
|---|
กระบวนการ |
HTTP POST
Parameters
| Thai |
|---|
พารามิเตอร์ |
callback - (Optional) a function (in JavaScript) to call back after invoking this method
Thai callback - (เป็นตัวเลือก) ฟังก์ชั่น (ใน JavaScript) เพื่อโทรกลับหลังจากเรียกใช้วิธีนี้
plugin - Class name of generator plugin to execute
Thai appId - รหัสนิยามแอป
appId - App Definition id
Thai พารามิเตอร์
version - (Optional) App definition version
Thai เวอร์ชัน - (เป็นตัวเลือก) เวอร์ชันคำจำกัดความของแอป
formId - Form defintion id
Thai formId - id การกำหนดรูปแบบ
Sample URL
| Thai |
|---|
ตัวอย่าง URL |
http://localhost:8080/jw/web/json/app/crm/generator/crm_account/generate?plugin=org.joget.plugin.enterprise.CrudGenerator
Sample Result
| Thai |
|---|
ตัวอย่างผลลัพธ์ |
| Code Block | ||
|---|---|---|
| ||
{
"message": "CRUD generated. Click <a href=\"/jw/web/console/app/crm/2/userview/builder/crm_userview_sales?menuId=c4a0c79c-c0a83810-5291318b-96650e7d\" target=\"_blank\">here<\/a> to continue edit CRUD in Userview Builder.",
"error": false,
"pluginDisabled": false
} |
web/json/apps/install
Description
| Thai |
|---|
ลักษณะ |
Downloads and imports an app form an URL
| Thai |
|---|
ดาวน์โหลดและนำเข้าแอปเป็น URL |
User Role
| Thai |
|---|
บทบาทของผู้ใช้ |
Admin
| Thai |
|---|
ผู้ดูแลระบบ |
Method
| Thai |
|---|
กระบวนการ |
HTTP POST
Parameters
| Thai |
|---|
พารามิเตอร์ |
callback - (Optional) a function (in JavaScript) to call back after invoking this method
Thai callback - (เป็นตัวเลือก) ฟังก์ชั่น (ใน JavaScript) เพื่อโทรกลับหลังจากเรียกใช้วิธีนี้
url - Url to download an app
Thai url - Url เพื่อดาวน์โหลดแอป
Sample URL
| Thai |
|---|
ตัวอย่าง URL |
http://localhost:8080/jw/web/json/apps/install?url= http%3A%2F%2Fwww.joget.org%2Fdownloads%2Fsimple_crm.jwa
Sample Result
| Thai |
|---|
ตัวอย่างผลลัพธ์ |
| Code Block | ||
|---|---|---|
| ||
{
"appId" : "mcrm",
"appName" : "Simple CRM",
"appVersion: : "1"
} |
web/json/apps/published/processes
Description
| Thai |
|---|
ลักษณะ |
Retrieves all published processes based on logged in user
| Thai |
|---|
ดึงกระบวนการเผยแพร่ทั้งหมดขึ้นอยู่กับผู้ใช้ที่เข้าสู่ระบบ |
User RoleRole
| Thai |
|---|
บทบาทของผู้ใช้ |
Anyone (Including anonymous)
| Thai |
|---|
ทุกคน (รวมที่ไม่ระบุชื่อ) |
Method
| Thai |
|---|
กระบวนการ |
HTTP GET/POST
Parameters
| Thai |
|---|
พารามิเตอร์ |
callback - (Optional) a function (in JavaScript) to call back after invoking this method
Thai callback - (เป็นตัวเลือก) ฟังก์ชั่น (ใน JavaScript) เพื่อเรียกกลับหลังจากเรียกใช้วิธีนี้
appId - (Optional) App definition Id to filter the list
Thai appId - (เป็นตัวเลือก) รหัสคำจำกัดความแอปเพื่อกรองรายการ
Sample URL
| Thai |
|---|
ตัวอย่าง URL |
http://localhost:8080/jw/web/json/apps/published/processes?appId=crm
Sample Result
| Thai |
|---|
ตัวอย่างผลลัพธ์ |
| Code Block | ||
|---|---|---|
| ||
{
"apps": [{
"processes": [{
"id": "crm#3#process1",
"processVersion": "3",
"appVersion": 2,
"name": "Proposal Approval Process",
"idWithoutVersion": "process1",
"url": "/jw/web/client/app/crm/2/process/process1?start=true"
}],
"id": "crm",
"name": "CRM",
"version": 2
}]
} |
web/json/apps/published/userviews
Description
| Thai |
|---|
ลักษณะ |
Retrieves all published userviews based on logged in user
| Thai |
|---|
ดึง userviews ที่เผยแพร่ทั้งหมดขึ้นอยู่กับผู้ใช้ที่เข้าสู่ระบบ |
User Role
| Thai |
|---|
บทบาทของผู้ใช้ |
Anyone (Including anonymous)
| Thai |
|---|
ทุกคน (รวมที่ไม่ระบุชื่อ) |
Method
| Thai |
|---|
กระบวนการ |
HTTP GET/POST
Parameters
| Thai |
|---|
พารามิเตอร์ |
callback - (Optional) a function (in JavaScript) to call back after invoking this method
Thai callback - (เป็นตัวเลือก) ฟังก์ชั่น (ใน JavaScript) เพื่อเรียกกลับหลังจากเรียกใช้วิธีนี้
appId - (Optional) App definition Id to filter the list
Thai appId - (เป็นตัวเลือก) รหัสคำจำกัดความแอปเพื่อกรองรายการ
Sample URL
| Thai |
|---|
ตัวอย่าง URL |
http://localhost:8080/jw/web/json/apps/published/userviews?appId=crm
Sample Result
| Thai |
|---|
ตัวอย่างผลลัพธ์ |
| Code Block | ||
|---|---|---|
| ||
{
"apps": [{
"id": "crm",
"name": "CRM",
"userviews": [{
"id": "crm_userview_sales",
"description": "",
"name": "CRM: Sales Force Automation",
"url": "/jw/web/userview/crm/crm_userview_sales",
"version": 2
}],
"version": 2
}]
} |
web/json/console/app/list
Description
| Thai |
|---|
ลักษณะ |
Retrieves all apps
User Role
...
- callback - (Optional) a function (in JavaScript) to call back after invoking this method
- name - (Optional) name filter
sort - (Optional) column name to be sorted
desc - (Optional) Boolean value to determine whether to sort by ascending or descending order (true equals to descending)
start - (Optional) where rows start from
rows - (Optional) number of rows per page
Sample URL
| Thai |
|---|
ตัวอย่าง URL |
http://localhost:8080/jw/web/json/console/app/list?name=crm
Sample Result
| Thai |
|---|
ตัวอย่างผลลัพธ์ |
| Code Block | ||
|---|---|---|
| ||
{
"total": 2,
"data": [{
"id": "crm",
"name": "CRM",
"version": 2
}, {
"id": "mcrm",
"name": "Simple CRM",
"version": 1
}]
} |
web/json/console/app/(*:appId)/version/list
Description
| Thai |
|---|
ลักษณะ |
Retrieves all version of an app
...
web/json/console/app/(*:appId)/(~:version)/builder/actions
Description
| Thai |
|---|
ลักษณะ |
Retrieves all Datalist Actions plugins
...
web/json/console/app/(*:appId)/(~:version)/envVariable/list
Description
| Thai |
|---|
ลักษณะ |
Retrieves all environment variable of an app
...
web/json/console/app/(*:appId)/(~:version)/datalist/list
Description
| Thai |
|---|
ลักษณะ |
Retrieves all datalist of an app
...
web/json/console/app/(*:appId)/(~:version)/datalist/options
Description
| Thai |
|---|
ลักษณะ |
Retrieves all datalist of an app in value-label pair.
...
web/json/console/app/(*:appId)/(~:version)/form/tableNameList
Description
| Thai |
|---|
ลักษณะ |
Retrieves all table name used in an app
...
web/json/console/app/(*:appId)/(~:version)/forms
Description
| Thai |
|---|
ลักษณะ |
Retrieves all forms in an app
...
web/json/console/app/(*:appId)/(~:version)/forms/options
Description
| Thai |
|---|
ลักษณะ |
Retrieves all form in an app in value-label pair
...
web/json/console/app/(*:appId)/(~:version)/package/deploy
Description
| Thai |
|---|
ลักษณะ |
Deploy a new version of XPDL to an app
...
web/json/console/app/(*:appId)/(~:version)/package/xpdl
Description
| Thai |
|---|
ลักษณะ |
Retrieves XPDL file of an app
...
web/json/console/app/(*:appId)/(~:version)/pluginDefault/list
Description
| Thai |
|---|
ลักษณะ |
Retrieves all configured default plugin properties of an app
...
web/json/console/app/(*:appId)/(~:version)/message/list
Description
| Thai |
|---|
ลักษณะ |
Retrieves all created custom i18n message of an app
...
web/json/console/app/(*:appId)/(~:version)/userview/list
Description
| Thai |
|---|
ลักษณะ |
Retrieves all userviews of an app
...
Sample URL
http:/localhost:8080/jw/web/json/workflow/process/list/package
Sample Result
...
| Code Block |
|---|
{
"data": [{
"id": "hr_expense",
"count": 2,
"processVersion": "3",
"packageName": "HR Expenses Claim App",
"processId": "hr_expense#3#process1",
"processName": "Expense Approval Process",
"packageId": "hr_expense",
"label": "HR Expenses Claim App",
"url": "/json/workflow/process/list?packageId=hr_expense"
}, {
"id": "isr",
"count": 1,
"processVersion": "2",
"packageName": "ISR",
"processId": "isr#2#isr",
"processName": "ISR Process",
"packageId": "isr",
"label": "ISR",
"url": "/json/workflow/process/list?packageId=isr"
}, {
"id": "hrleave",
"count": 2,
"processVersion": "1",
"packageName": "JINC Leave Solution",
"processId": "hrleave#1#la",
"processName": "Leave Application System",
"packageId": "hrleave",
"label": "JINC Leave Solution",
"url": "/json/workflow/process/list?packageId=hrleave"
}]
} |
web/json/workflow/process/start/(*:processDefId)
Description
Starts a process based on process start whitelist
User Role
Anyone (Including anonymous)
Method
HTTP POST
Parameters
- callback - (Optional) a function (in JavaScript) to call back after invoking this method
processDefId - Process Definition Id (Replace '#' with ':' in the id)
Info title Obtaining Latest Published Process Version Instead of specifying crm:3:process1 in the call, we can use the keyword latest in the processDefId - crm:latest:process1 to automatically set to the published app's process version.
- processInstanceId - (Optional) used to start the previous created but haven't start process instance
- recordId - (Optional) used to start a process instance with existing record
- var_* - (Optional) parameters prefixed with "var_" will be used to set workflow variable
Sample URL
http://localhost:8080/jw/web/json/workflow/process/start/crm:3:process1
Sample Result
| Code Block | ||
|---|---|---|
| ||
{"activityId":"885_224_crm_process1_approve_proposal","processId":"224_crm_process1"} |
| Note |
|---|
For "activityId" to be returned, please ensure the "Show The Next Assignment When Completed" is checked under the Run Process activity in Map Activities to Forms tab and the next activity after the start of process is assigned to the same person that starts the process. |
web/json/workflow/process/variable/(*:processId)/(*:variable)
Description
Sets workflow variable of a process instance
User Role
Admin
Method
HTTP POST
Parameters
- callback - (Optional) a function (in JavaScript) to call back after invoking this method
- processId - process instnace id
- variable - workflow variable name
- value - value of workflow variable to be set
Sample URL
http://localhost:8080/jw/web/json/workflow/process/variable/208_crm_process1/status?value=test
Sample Result
| Code Block | ||
|---|---|---|
| ||
{"status" : "variableSet"} |
web/json/workflow/process/view/(*:processId)
Description
Retrieves information of a process definition
User Role
Admin
Method
HTTP GET/POST
Parameters
- callback - (Optional) a function (in JavaScript) to call back after invoking this method
- processId - Process Definition Id (Replace '#' with ':' in the id)
Sample URL
http://localhost:8080/jw/web/json/workflow/process/view/crm:3:process1
Sample Result
| Code Block | ||
|---|---|---|
| ||
{
"packageName": "CRM",
"processId": "crm#3#process1",
"name": "Proposal Approval Process",
"packageId": "crm",
"version": "3"
} |
web/json/workflow/variable/list/(*:processId)
Description
Retrieves all variables of a process instance
User Role
Admin
Method
HTTP GET/POST
Parameters
- callback - (Optional) a function (in JavaScript) to call back after invoking this method
- processId - process instance id
Sample URL
http://localhost:8080/jw/web/json/workflow/variable/list/208_crm_process1
Sample Result
| Code Block | ||
|---|---|---|
| ||
{
"processId": "208_crm_process1",
"variable": {
"status": "approved"
}
} |
Monitoring
web/json/monitoring/activity/abort/(*:processId)/(*:activityDefId)
...
http://localhost:8080/jw/web/json/monitoring/activity/reevaluate?activityId=841_206_crm_process1_send_proposal
web/json/monitoring/activity/start/(*:processId)/(*:activityDefId)
...