0

I am following the Tutorial Download File on Forge Api Support Page , my goal is to download the files , and verify their integrity.

I thought I could get a checksum in response from the server at the "Download Endpoint" but I don't get any. Let me know if there is another way or I am missing something in the Documents.

I see a article on Internet regarding "Upload File Checksum" Here but that does not answers my query.

Thanks,

Newbee
  • 45
  • 1
  • 9

1 Answers1

0

To get sha1 checksum after uploading the file, you need to call GET buckets/:bucketKey/objects/:objectName/details instead, not GET buckets/:bucketKey/objects/:objectName.

For example,

curl -v "https://developer.api.autodesk.com/oss/v2/buckets/wip.dm.prod/objects/977d69b1-43e7-40fa-8ece-6ec4602892f3.rvt/details"
  -X GET

{
  "bucketKey" : "wipdm.prod",
  "objectId" : "urn:adsk.objects:os.object:wip.dm.prod/objects/977d69b1-43e7-40fa-8ece-6ec4602892f3.rvt",
  "objectKey" : "977d69b1-43e7-40fa-8ece-6ec4602892f3.rvt",
  "sha1" : "33a16388013ce310564af70b0ef5320d8fd85444", //!<<< HERE
  "size": 36544512,
  "contentType" : "application/octet-stream",
  "location" : "https://developer.api.autodesk.com/oss/v2/buckets/wip.dm.prod/objects/977d69b1-43e7-40fa-8ece-6ec4602892f3.rvt"
}

ref: https://forge.autodesk.com/en/docs/data/v2/reference/http/buckets-:bucketKey-objects-:objectName-details-GET/#example

Eason Kang
  • 6,155
  • 1
  • 7
  • 24