Panel |
---|
borderColor | green |
---|
borderWidth | 1 |
---|
titleBGColor | #ddffcc |
---|
borderStyle | solid |
---|
title | Definition |
---|
|
Form API can interact with form data of the specified form. |
Note |
---|
The APIs here This API is based on the specified form in the current app context. |
| Name | Description |
---|
1 | Form | Panel |
---|
borderColor | black |
---|
bgColor | #fbfff5 |
---|
borderStyle | solid |
---|
| Select any form present in the current app, for interaction with API. |
|
2 | Short Description | Panel |
---|
borderColor | black |
---|
bgColor | #fbfff5 |
---|
borderStyle | solid |
---|
| Any description here. |
|
3 | Ignore Form Permission | Panel |
---|
borderColor | black |
---|
bgColor | #fbfff5 |
---|
borderStyle | solid |
---|
| Check this option to ignore form & form section permission for current user when storing/retrieving form data. |
|
4 | Anchor |
---|
| Add form data |
---|
| Add form data |
---|
| Add form data
| Panel |
---|
borderColor | black |
---|
bgColor | #fbfff5 |
---|
borderStyle | solid |
---|
| Add a new record to the specified form. |
|
*yourFormId*{formId} | HTTP Method | POST | Path Parameters | Parameter | Description |
---|
formId | Form ID. |
| Body Parameters | The parameters required here is highly dependent on the form data schema of the specified form. For example, for "Expense Claim Form" in Expenses Claim app found in most default Joget installations, it may look like this: Code Block |
---|
| {
"id": "string",
"sfD": {
"ref": "string",
"title": "string",
"remark": "string",
"SelectApprover": "string",
"claimant": "string",
"username": "string",
"status": "string",
"id": "string"
},
"spECD": [
{
"id": "string",
"category": "string",
"date": "string",
"purpose": "string",
"amount": "string"
}
],
"total": "string",
"receipt": "string",
"CreatedDate": "string",
"dateCreated": "2019-08-28",
"dateModified": "2019-08-28",
"createdBy": "string",
"createdByName": "string",
"modifiedBy": "string",
"modifiedByName": "string"
} |
| Sample Response |
|
A uniquely generated form The record ID will be returned as the success response. If no record ID is specified, a uniquely generated UUID will be created. Code Block |
---|
| {
"id": "d6cc05e4-c0a86310-60e35ca0-9dd035a0",
"errors": {}
} |
|
|
5 | Anchor |
---|
| Add form data with file upload |
---|
| Add form data with file upload |
---|
| Add form data with file upload | Panel |
---|
borderColor | black |
---|
bgColor | #fbfff5 |
---|
borderStyle | solid |
---|
| Add a new record to the specified form, with support for file handling. |
|
URL *yourFormId*{formId}/addWithFiles | HTTP Method | POST | Path Parameters | Parameter | Description |
---|
formId | Form ID. |
| Body Parameters | The parameters required here is highly dependent on the form data schema of the specified form. |
|
A uniquely generated form | Sample Response | The record ID will be returned as the success response. |
|
Sample Response | A uniquely generated form record ID will be returned as the success responseIf no record ID is specified, a uniquely generated UUID will be created. Code Block |
---|
| {
"id": "cd0f9c53-1e08-437f-868a-c8a76a9fad7f",
"errors": {}
} |
|
|
6 | Anchor |
---|
| Delete form data |
---|
| Delete form data |
---|
| Delete form data
| Panel |
---|
borderColor | black |
---|
bgColor | #fbfff5 |
---|
borderStyle | solid |
---|
| Delete a record of the specified form, via record ID. |
|
*yourFormId*{formId}/{recordId} | HTTP Method | DELETE | Path Parameters | Parameter | Description |
---|
formId | Form ID. | recordId | Form record ID. |
| Sample Response | Code Block |
---|
| {
"date": "Wed Aug 28 14:07:37 SGT 2019",
"code": "200",
"message": "Successful operation"
} |
|
|
7 | Anchor |
---|
| Download all uploaded files in zip |
---|
| Download all uploaded files in zip |
---|
| Download all uploaded files in zip | Panel |
---|
borderColor | black |
---|
bgColor | #fbfff5 |
---|
borderStyle | solid |
---|
| Download all uploaded |
|
file in zip by record id & field idfiles from a specified form upload field, compressed into a zip file. Commonly used for form upload fields that support multiple file uploads. |
|
*yourFormId*{formId}/{recordId}/{fieldId}/ |
|
files files | HTTP Method | GET | Path Parameters | Parameter | Description |
---|
formId | Form ID | recordId | Form Record ID | fieldId | Upload Field ID |
| Sample Response |
|
A link will appear for you to download the file that you have specified All files found will be bundled and downloaded as a zip file. |
|
8 | Anchor |
---|
| Download uploaded file |
---|
| Download uploaded file |
---|
| Download uploaded file | Panel |
---|
borderColor | black |
---|
bgColor | #fbfff5 |
---|
borderStyle | solid |
---|
| Download |
|
uploaded file by record id & file namean uploaded file from a specified form upload field. |
Warning |
---|
Please ensure that the File Upload > Advanced Options > Permission is set accordingly as this determines who can access the file |
|
*yourFormId*{formId}/{recordId}/download/{fileName} | HTTP Method | GET | Path Parameters | Parameter | Description |
---|
formId | Form ID | recordId | Form |
|
|
record Record ID | fileName | File name to be download |
| Query String Parameters | Parameter | Description |
---|
attachment |
|
|
Set Option to set the file as attachment. Expects a boolean value. |
| Sample Response |
|
A link will appear for you to download the file that you have specifiedThe file will be downloaded. |
|
9 | Anchor |
---|
| Get form data by record ID |
---|
| Get form data by record ID |
---|
| Get form data by record ID
| Panel |
---|
borderColor | black |
---|
bgColor | #fbfff5 |
---|
borderStyle | solid |
---|
| Retrieve data of a record from the specified form, via record ID. |
|
*yourFormId*{formId}/{recordId} | HTTP Method | GET | Path Parameters | Parameter | Description |
---|
formId | Form ID | recordId | Form record ID. |
| Query String Parameters | Parameter | Description |
---|
includeSubformData | Include all subform(s) data present in the specified form, into the response. | includeReferenceElements | Include all referenced elements present in the specified form, into the response. (e.g: select box element referencing a datalist record) | flattenData | Option to flatten all JSON objects to a single-level key-value map. |
| Sample Response | Code Block |
---|
| {
"createdByName": "Admin Admin",
"dateModified": "2019-08-15 15:43:35.0",
"remark": "",
"title": "Spend everything",
"SelectApprover": "admin",
"ref": "0001",
"total": "0.00",
"modifiedByName": "Admin Admin",
"dateCreated": "2019-04-25 20:14:28.0",
"createdBy": "admin",
"CreatedDate": "2019-08-15",
"modifiedBy": "admin",
"receipt": "",
"id": "44_expenseclaim_process1",
"claimant": "Admin Admin",
"status": "Submitted",
"username": "admin"
} |
|
|
10 | Anchor |
---|
| Update form data |
---|
| Update form data |
---|
| Update form data
| Panel |
---|
borderColor | black |
---|
bgColor | #fbfff5 |
---|
borderStyle | solid |
---|
| Update a record |
|
of *yourFormId*{formId} | HTTP Method | PUT | Path Parameters | Parameter | Description |
---|
formId | Form ID. |
| Body Parameters | The parameters required here is highly dependent on the form data schema of the specified form. Note |
---|
The record ID specified must be of an existing record of the form, to update its records successfully. |
| Sample Response | |
|
same form as specified in the body parameters will be returned as the success response.
Code Block |
---|
| {
"id": "d6cc05e4-c0a86310-60e35ca0-9dd035a0",
"errors": {}
} |
|
|
11 | Anchor |
---|
| Update form data with file upload |
---|
| Update form data with file upload |
---|
| Update form data with file upload | Panel |
---|
borderColor | black |
---|
bgColor | #fbfff5 |
---|
borderStyle | solid |
---|
| Update a record |
|
of in the specified form, with support for file handling. |
Name | Description |
---|
URL | /form/ |
|
*yourFormId*{formId}/updateWithFiles | HTTP Method | POST | Path Parameters | Parameter | Description |
---|
formId | Form ID. |
| Body Parameters | The parameters required here is highly dependent on the form data schema of the specified form. Note |
---|
The record ID specified must be of an existing record of the form, to update its records successfully. |
|
|
The same form record ID as specified in the body parameters will be returned as the success response.
same form as specified in the body parameters will be returned as the success response. Code Block |
---|
| {
"id": "d6cc05e4-c0a86310-60e35ca0-9dd035a0",
"errors": {}
} |
|
|