简体   繁体   中英

Design Automation For Revit: Unable to Add AppBundle Zip File

I'm following the Design Automation APIv3 Tutorial for Revit at the following link: Forge Tutorial . Using postman I got up to task 4/step 3 before getting stuck. The error message i'm getting is the following:

'Invalid according to Policy: Policy Condition failed: ["eq", "$key", "apps/ForgeTest/DeleteWallsApp3/1"]'

I'm using the formData returned from the post request I made for creating a new app bundle. What could the problem be?

In the endpoint response to POST appbundles there's a key attribute (your access key for temporary access to our bucket) that needs to go into your post fields when uploading the bundle to your AWS S3 signed URL:

{
    "uploadParameters": {
        "endpointURL": "https://dasprod-store.s3.amazonaws.com",
        "formData": {
            "key": "apps/ForgeTest/DeleteWallsApp3/1", //find your access key here
...

Create another bundle or a new version of the current bundle through POST appbundles/:id/versions and make sure in your cURL command to upload the bundle the keys match:

curl https://bucketname.s3.amazonaws.com/
-F key = apps/ForgeTest/DeleteWallsApp3/1 // access key goes here
-F content-type = application/octet-stream
-F policy = eyJleHBpcmF0aW9uIjoiMjAxOC0wNi0yMVQxMzo...(trimmed)
-F x-amz-signature = 800e52d73579387757e1c1cd88762...(trimmed)
-F x-amz-credential = AKIAIOSFODNN7EXAMPLE/20180621/us-west-2/s3/aws4_request/
-F x-amz-algorithm = AWS4-HMAC-SHA256
-F x-amz-date = 20180621T091656Z
-F file=@E:myfile.zip

See here for details on how AWS pre-signed URL (the URL to upload the appbundle to Forge's AWS cloud storage) works.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM