Retrieve a Checklists Section Signature
This tutorial demonstrate how to download a section item signature of a checklist. Each section of a checklist includes the sectionSignatures
object, which contains an array of section signatures.
The BIM 360 checklist signatures are stored in S3 as images of actual signatures in Scalable Vector Graphics (SVG) format. Each signature object contains an object key that you can use to retrieve the associated SVG signature image.
Note that individual checklists are known as instances, so an instanceId
is the ID of a checklist.
Before You Begin
- Register an app
- Acquire a 3-legged OAuth token with the
data:read
scope. - Verify that you have access to the relevant BIM 360 account and BIM 360 project.
- Have your project’s checklists
containerId
, or acquire it using the Retrieve a Checklists Container ID tutorial. - Have the appropriate
instanceId
of the checklist you want to retrieve the signature from, or acquire one using the GET instances endpoint.
Step 1: Find the object key of the section signature
Use the GET instances/:instanceId endpoint to retrieve the section signature using containerId
and instanceId
.
Request
curl -X GET "https://developer.api.autodesk.com/bim360/checklists/v1/containers/:containerId/instances/:instanceId?include=sections%2Csections.items%2Csections.items.attachments%2Csections.items.supplementalAttachments" \
-H "Authorization: Bearer cKLfhoInUNxFF0F0Eu7fZ187HUml"
Response
{
"jsonapi": {
"version": "1.0"
},
"meta": {},
"links": {
"...": "..."
},
"data": {
"...": "..."
},
"included": [
{
"type": "instance_sections",
"id": "12526088",
"attributes": {
"urn": "urn:adsk.checklists.cs.instance.section:edbd4b32-afef-452d-84a2-5e4269e36155/12526088",
"templateSectionId": 4646162,
"modifiedBy": "AUR8JHCWYTJG",
"updatedAt": "2022-09-07T10:11:04.763Z",
"status": "Completed",
"instructions": null,
"title": "SECTION 1",
"index": 1,
"number": 1,
"itemsNumbering": {
"...": "..."
},
"sectionNumbering": {
"...": "..."
},
"assignees": [{
"...": "..."
}],
"permittedActions": [
"canEdit"
],
"permittedAttributes": [
"...": "..."
],
"sectionSignatures": [
{
"id": "6a2bc2e8-db7b-41a2-9a6d-d05b4bd4f299",
"urn": "urn:adsk.checklists.cs.item.signature:edbd4b32-afef-452d-84a2-5e4269e36155/6a2bc2e8-db7b-41a2-9a6d-d05b4bd4f299",
"ossUrn": "urn:adsk.objects:os.object:checklists.prod.us/6a2bc2e8-db7b-41a2-9a6d-d05b4bd4f299",
"instanceSectionId": 12526088,
"index": 2,
"requiredBy": "",
"isRequired": true,
"signedName": "Anuj ",
"signedCompany": "alentica",
"submittedBy": "AUR8JHCWYTJG",
"signedAt": "2022-09-07T15:40:52.936Z",
"createdAt": "2022-09-07T10:10:36.447Z",
"updatedAt": "2022-09-07T10:11:00.772Z",
"deletedAt": null,
"instructions": "",
"uploadStatus": "Completed",
"uuid": "002c1c04-380d-40ca-8f0c-01863d4ce31d"
}
],
"uuid": "49000563-dcd2-4b2e-a57e-658b3b251bd9"
},
"links": {
"...": "..."
},
"relationships": {
"...": "..."
}
},
{
"type": "instance_items",
"id": "78347147",
"attributes": {
"...": "..."
},
"links": {
"self": "/containers/edbd4b32-afef-452d-84a2-5e4269e36155/instance_items/78347147"
},
"relationships": {
"...": "..."
}
}
]
}
In the response, you’ll find the relevant signature inside the included.sections.attributes.sectionSignatures
array. The signature’s ossUrn
attribute value of urn:adsk.objects:os.object:checklists.prod.us/6a2bc2e8-db7b-41a2-9a6d-d05b4bd4f299
parses into three substrings:
urn:adsk.objects:os.object
(the Object Storage Service)checklists.prod.us
(the bucket key)6a2bc2e8-db7b-41a2-9a6d-d05b4bd4f299
(the signature object key)
You’ll use these keys to access the storage service in the next step.
Step 2: Generate a signed S3 URL for the section signature
Use the Data Management API’s POST buckets/:bucketKey/objects/batchsigneds3download endpoint to generate a signed URL that you can use to download the signature SVG directly from S3. Include the bucket key (checklists.prod.us
) in the endpoint URI, and the object key (6a2bc2e8-db7b-41a2-9a6d-d05b4bd4f299
) in the payload.
Request
curl --request POST 'https://developer.api.autodesk.com/oss/v2/buckets/checklists.prod.us/objects/batchsigneds3download' \
--header 'Authorization: Bearer 5CsDfQ83YgS49Jp9reGoTiFNwozS' \
--header 'Content-Type: application/json' \
--header 'Cookie: PF=mgLuMdDrunrpwPh51y1Zva' \
--data-raw '{
"requests": [{
"objectKey": "6a2bc2e8-db7b-41a2-9a6d-d05b4bd4f299"
}]
}'
Response
{
"results": {
"6a2bc2e8-db7b-41a2-9a6d-d05b4bd4f299": {
"status": "complete",
"url": "https://s3.amazonaws.com/com.autodesk.oss-persistent/52/fe/88/bcb1c05c58e97f0e2aed6b4554f97c6739/checklists.prod.us?response-content-disposition=attachment%3B%20filename%3D%226a2bc2e8-db7b-41a2-9a6d-d05b4bd4f299%22&response-content-type=application%2Foctet-stream&X-Amz-Security-Token=IQoJb3JpZ2luX2VjEHoaCXVzLWVhc3QtMSJGMEQCIBMXw8rUAyCdRKFCF5dA0%2B84T5bAdI%2Bbk0QVrIyHprTdAiAR5MHrqc%2BFyXZ479pTLJXNC4L%2FBldZocv1JLGu90l34yrMBAgTEAAaDDYwNDczMzAwOTQwMyIMfXrMpUHMNFeZz0mPKqkE%2FOuIUOi3PxZp5ca7owgxWCiRPM4JCftDRAVTVAw7sm%2FpxsFcJ0fdIX0mmsr4P58B8vdiBHEzBlqW06nmYKbmbWpv%2BDKV%2FKtaOKdW7pfqpFsuuUFaNQnnF8ZqnFGtkpBBLtDCmCB6Rym18EIOnO4L1C5q607zNF5qM9fSebvgCJwGHjIOSkisJixcfzZLpLP2lrGvqtCCgN1l8vQqFRlkLo7Uq41dZAH7ZjCGnDIfC5z34sSFR14FglWNlgP9%2BF8w8kiW8LWGtjNVoLPasH1gbN01OXLDN5rdIVIohTcUVG4OGJVpuovWC3g2LlkeALDaoQp64gmwaculq19Nbtivk3j1aFfo0dn37licc6%2BxUn3SI71h128JmgAr102d1XBP7pLRL89Z4x9j7mGMTq4dKDt2bsaTZKfii%2FRkpZTzMPGNTVwsCzUFRPiG016mxD8GifKoo7KnQM26SiRtT7EAU6H%2FsiqOKt%2BRO2oal2OmO%2FWpOEwyaTlTdftsp2yI%2BzPDJ%2B28wq3m%2FkMPSvZ3Re8WsrL9Nj8%2FIWgJh0ArICa8IQZYeZgKQNKpcREGVLAWF0WhSvfFPp9U9csrP%2F89Ym%2F9fbnfT2%2BqFqNON%2BfSi4%2F6QI1H%2FYL5IdD8DhzL9Y2q740uI5ja%2Buvy%2BwxO80gbRPazHlSMTNzroieVJplHhIKTv0Xz2ZMVrVPGToa8%2B8drr%2FT7LOEcdZKBMnl2IYMbmEHTt%2BbB6uQK9qW0pDC90eGYBjqqAczuHMmVXVRC60ffCYjARQwFsryC3o1vk8M6V4cd%2BLNuTd5m5coSF130f1F%2B9ymt10TuNvuIBYV9Yg3hwW9dfLNLvRtQLzvceTwxUC5arJH5LoV4TYEeHQv6%2BXtw%2Bm%2FkhFGBN1gMCJ8Uarl8ROCCMVVk5hPBNKKd3hoU11RZuRt5PEEfVnmRojLtnBPzSmQn79NqeTDTq5ja%2BlJE34pdpywkH2aRTteit1E3&X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Date=20220907T101906Z&X-Amz-SignedHeaders=host&X-Amz-Expires=119&X-Amz-Credential=ASIAYZTHFNX5XBYMIFNO%2F20220907%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Signature=4c3a63fea6791e280cb3d28060f036b7dff60875208c9eae9eedf238a4872cb2",
"params": {
"content-type": "application/octet-stream",
"content-disposition": "attachment; filename=\"6a2bc2e8-db7b-41a2-9a6d-d05b4bd4f299\""
},
},
"size": 737,
"sha1": "52fe88bcb1c05c58e97f0e2aed6b4554f97c6739"
}
}
The value of results.6a2bc2e8-db7b-41a2-9a6d-d05b4bd4f299.url
is the signed S3 URL that you can use to retrieve the signature image.
Step 3: Fetch the section signature using the S3 URL
Make a GET request using the URL returned in the previous step to download the signature SVG.
Note that this call does not require an authorization token.
Request
curl --request GET 'https://s3.amazonaws.com/com.autodesk.oss-persistent/52/fe/88/bcb1c05c58e97f0e2aed6b4554f97c6739/checklists.prod.us?response-content-disposition=attachment%3B%20filename%3D%226a2bc2e8-db7b-41a2-9a6d-d05b4bd4f299%22&response-content-type=application%2Foctet-stream&X-Amz-Security-Token=IQoJb3JpZ2luX2VjEHoaCXVzLWVhc3QtMSJHMEUCIQCeifG847t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BI6j8spt%2Fy4%2F9ojg2XyNUml%2FYeFqhUY6Z785IumPSIj90i%2FviDOAckG26woNGADNyvZw%2BPMwiE3FL0GRGLQHONy2GJAxrDocxMHUs9%2FCy9DzM%2BO3lPuJZfvjCbwt8M3593y7AE5j&X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Date=20220907T102227Z&X-Amz-SignedHeaders=host&X-Amz-Expires=119&X-Amz-Credential=ASIAYZTHFNX5ROZAZSGV%2F20220907%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Signature=ab747902cf0125d7323b54d46e7ad522a0e2fcd2efc5cb57483f026280eeb4e9'
Response
<svg width=”566” height=”150” viewbox=”0 0 566 150” version=”1.2” xmlns=”http://www.w3.org/2000/svg”><g stroke=”black” fill=”none” stroke-linecap=”round” stroke-linejoin=”round” stroke-width=”5”><path d=”M 122 117.703125 L 122 114.703125 L 122 106.703125 L 122 95.703125 L 128 79.703125 L 139 59.703125 L 155 42.703125 L 167 36.703125 L 186 31.703125 L 198 31.703125 L 205 36.703125 L 210 47.703125 L 210 59.703125 L 206 68.703125 L 197 78.703125 L 182 85.703125 L 169 87.703125 L 157 82.703125 L 150 68.703125 L 149 54.703125 L 157 45.703125 L 177 38.703125 L 224 37.703125 L 242 39.703125 L 250 42.703125 L 255 45.703125 L 258 48.703125 L 259 51.703125 L 259 52.703125 L 259 52.703125 L 259 52.703125 L 260 52.703125”></path></g></svg>