Retrieve attachment metadata from Form Builder using the API
Overview
This guide shows you how to use the API to retrieve form details and access or download attachment files from each attachment or signature component in a form response.
Retrieve forms details
Use the API to retrieve form details and its component metadata.
Operation: GET
Endpoint: form-builder/external/forms/<form_uid>
It requires one path parameter:
form_uid
: The UID of the form associated with the object.
Example request:
curl 'https://api.skedulo.com/form-builder/external/forms/6d0df39b-b700-4046-8c96-35b8f6d559ff' \
-H 'accept: */*' \
-H 'accept-language: en-US,en;q=0.9,vi-VN;q=0.8,vi;q=0.7' \
-H 'authorization: <Tenant_token>'
Example response:
{
"uid": "6d0df39b-b700-4046-8c96-35b8f6d559ff",
"name": "HOANG Basic Job Form All Components",
"defId": "f_hoang_basic_job_form_all_components",
"order": 0,
"pages": [
{
"uid": "72cbae6f-25e7-4ed0-8645-c972c4fabc52",
"data": {
"JobId": "${metadata.contextObjectId}"
},
"name": "DefaultPage",
"type": "flat",
"components": [
{
"uid": "e7484580-0c1a-4727-83a0-09ec09168845",
"type": "attachmentsEditor",
"label": {
"defaultContent": "Some attachment just for testing"
}
},
{
"uid": "47602c5b-b1a2-45a7-9b74-cd55a61302b2",
"type": "signatureEditor",
"label": {
"defaultContent": "You put your name on it, you handle it."
}
}
],
"objectName": "f_hoang_basic_job_form_all_components",
"recordingJobIdField": "JobId",
"recordingFormUIDField": "FormUID"
}
],
...
}
In this example, there is an attachment component:
{
"uid": "e7484580-0c1a-4727-83a0-09ec09168845",
"type": "attachmentsEditor",
"label": {
"defaultContent": "Some attachment just for testing"
}
}
The component uid
here represents the attachmentCategoryName
for this attachment. In this example, “e7484580-0c1a-4727-83a0-09ec09168845” is the component category name (attachmentCategoryName
). Note this component uid
to cross-reference with the fileName later.
Retrieve attachment files
Each time a resource submits a form, a new response is created with its own UID. You can use this UID with the API to retrieve attachment files for each attachment component in that form response.
Operation: GET
Endpoint: /files/attachments/<record_uid>
It requires one path parameter:
record_uid
: The UID of a form response. Each submission by a resource creates a new response with its own UID. Use this UID to retrieve attachment files from the form’s attachment components.
Example request:
curl 'https://api.skedulo.com/files/attachments/03e89bf4-394d-4364-84f5-6971eeb2b4ef' \
-H 'accept: */*' \
-H 'accept-language: en-US,en;q=0.9,vi-VN;q=0.8,vi;q=0.7' \
-H 'authorization: <Tenant_token>'
Example response:
[
{
"filePtr": "00c8c4cc-f789-4de1-a3bd-7ea3b316f526",
"size": 94850,
"contentType": "image/jpeg",
"fileName": "e7484580-0c1a-4727-83a0-09ec09168845__5FD68E9F-B919-4124-AA6B-B30EFF367936.jpg",
"uploadDate": "2025-03-06T09:04:26.694688Z",
"parentId": "2ad65eec-db26-4fba-a500-f65f29ce8ee1",
"createdBy": null,
"createdById": "00019cab-5a1a-4e2f-995a-17eb6cf1a650",
"description": "",
"downloadUrl": "https://dev-api.test.skl.io/files/direct/auth0%7C0001ad0a-4805-49bc-9faf-9519378eefa4/sk_f4a0ef170801443f98aa68b0854a18ac/00c8c4cc-f789-4de1-a3bd-7ea3b316f526?expiry=2025-03-26T06%3A31%3A12.290446925Z&signature=99f27f34d57758c5f14105f7c09baf88395ea31cc80ddd31c33a69ab0d8b1746"
},
...
]
fileName
The following table shows the format of the fileName
field:
Component | File name format | Example |
---|---|---|
Attachment component | <Component category name>__<Original File name>.<File Type> |
e7484580-0c1a-4727-83a0-09ec09168845__5FD68E9F-B919-4124-AA6B-B30EFF367936.jpg |
Signature component | signature_<Component category name>__<Original File name>.<File Type> |
signature_47602c5b-b1a2-45a7-9b74-cd55a61302b2__5FD68E9F-B919-4124-AA6B-B30EFF367936.jpg |
In the example above, we have this field:
{
"fileName": "e7484580-0c1a-4727-83a0-09ec09168845__5FD68E9F-B919-4124-AA6B-B30EFF367936.jpg"
}
Based on the fileName
format, you can determine which component the file belongs to by looking at the component category name (attachmentCategoryName
), which is the component UID retrieved from this section.
You can also distinguish between an attachment component and a signature component.
Feedback
Was this page helpful?