CREATE a new DBFile, mention the file Name and Type in the URL
|
CALL Type: POST
URL Example:
http://<WebApp URL>/restapi/component/dbfile?name=InspectionImage&filetype=png
Include the binary file data in the POST payload.
The response returns the UniqueId of the DBFile, which can then be used in subsequent calls.
|
CREATE parent record and questionnaire with attachments
|
To attach the DBFile you have created in the previous step to a specific question in the questionnaire, you need the UniqueId of the DBfile created in the previous step.
CALL Type: POST
URL Example:
http://<WebApp URL>/E360/restapi/component/inspections
Payload Example:
{
"inspection_summary": "7 Point Fire Check",
"inspection_date": "2026-01-20",
"inspection_type": "Safety",
"rel_inspection_checklist": "{Simplified Questionnaire JSON}"
}
|
UPDATE questionnaire record with attachments
|
To attach the DBFile you have created in the previous step to a specific question in the questionnaire, you need the UniqueId of the DBfile created in the previous step and the Unique ID of the questionnaire record that needs to be updated.
CALL Type: PATCH
URL Example:
http://<WebApp URL>/E360/restapi/component/questionnaire ('UniqueId of Questionnaire Record')
Payload Example:
{
"name": "7 Point Fire Check",
"json": "{Simplified Questionnaire JSON}"
}
Important:
If the original question has 3 attachments but the PATCH request includes only 2, the missing one will be deleted. Therefore, always include all existing attachments and any new ones.
|