Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...


NameDescription
1Form
Panel
borderColorblack
bgColor#fbfff5
borderStylesolid

Select any form present in the current app, for interaction with API.

2Short Description
Panel
borderColorblack
bgColor#fbfff5
borderStylesolid

Any description here.

3

Anchor
Add form data
Add form data
Add form data

Panel
borderColorblack
bgColor#fbfff5
borderStylesolid
Add a new record to the specified form.

Name

Description
URL/form/*yourFormId*
HTTP MethodPOST
Body Parameters

The parameters required here is highly dependent on the form data schema of the selected 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
languagejs
collapsetrue
{
  "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 record ID will be returned as the success response.

Code Block
languagejs
{
  "id": "d6cc05e4-c0a86310-60e35ca0-9dd035a0",
  "errors": {}
}
4

Anchor
Delete form data
Delete form data
Delete form data

Panel
borderColorblack
bgColor#fbfff5
borderStylesolid
Delete a record of the specified form, via record ID.

Name

Description
URL/form/*yourFormId*/{recordId}
HTTP MethodDELETE
Path Parameters
ParameterDescription
recordIdForm record ID.
Sample Response
Code Block
languagejs
{
  "date": "Wed Aug 28 14:07:37 SGT 2019",
  "code": "200",
  "message": "Successful operation"
}
5

Anchor
Get form data by record ID
Get form data by record ID
Get form data by record ID

Panel
borderColorblack
bgColor#fbfff5
borderStylesolid

Retrieve all data of a record from the specified form, via record ID.Able to filter or sort the returned results via additional parameters.

Name

Description
URL/form/*yourFormId*/{recordId}
HTTP MethodGET
Path Parameters
ParameterDescription
recordIdForm record ID.
Query String Parameters
ParameterDescription
includeSubformDataInclude 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)

flattenDataOption to flatten all JSON objects to a single-level key-value map.
Sample Response
Code Block
languagejs
{
  "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"
}
6

Anchor
Update form data
Update form data
Update form data

Panel
borderColorblack
bgColor#fbfff5
borderStylesolid
Update a record of the specified form.

Name

Description
URL/form/*yourFormId*
HTTP MethodPUT
Body Parameters

The parameters required here is highly dependent on the form data schema of the specified form.

The record ID specified must be of an existing record of the form, to update its records successfully.

Sample Response
The same form record ID as specified in the body parameters will be returned as the success response.
Code Block
languagejs
{
  "id": "d6cc05e4-c0a86310-60e35ca0-9dd035a0",
  "errors": {}
}