autodesk-designautomation

Failed sending workitem with azure blob storage


I'm trying to use design automation api using postman with this sample appBundle from https://github.com/augustogoncalves/forge-customproperty-revit but I'm using azure blob storage to store the revit file and upload the resulting json file, I was able to send the workitem, however the result returns failedupload. Looking into the log, it looks like execution was successful but the resulting json file was not uploaded to the azure blob storage due to missing required header. Kindly see the part of the log below:

<?xml version="1.0" encoding="utf-8"?>
<Error><Code>MissingRequiredHeader</Code><Message>An HTTP header that&apos;s mandatory for this request is not specified.
RequestId:538e885c-001e-0061-38b0-fa8bac000000
Time:2023-10-09T13:02:55.6873032Z</Message><HeaderName>x-ms-blob-type</HeaderName></Error>

I tried to add the header x-ms-blob-type with value BlockBlob in postman but still got the same error at the end.enter image description here

I really appreciate your help on this.

Thanks


Solution

  • You have to add the header x-ms-blob-type to the workitem argument instead of adding it to the workitem call. See example in workitem documentation.

    "OutputIpt": {
        "url": "https://developer.api.autodesk.com/oss/v2/signedresources/2922c578-da22-4a35-a943-6cfeb4484009?region=US",
        "headers": {
            "Authorization": "",
            "Content-type": "application/octet-stream"
        },
    }
    

    In your case you will have:

    "jsonArgName": {
        "url": "https://azure.com/url/path",
        "headers": {
            "x-ms-blob-type": "BlockBlob",
        },
    }