AppPackages/Operations.GetUploadUrl(RequireContentType=:require)

Requests a pre-signed URL for uploading a zip file that contains the binaries for this AppPackage.
The zip file must be formatted in autoloader format used by the Autodesk Exchange appstore. The URL obtained should be used to issue an HTTP PUT operation with the zip contents as the request body.
Unlike the GetUploadUrl
method that takes no parameters, this method allows the client to request that the pre-signed URL to be issued so that the subsequent HTTP PUT operation will require Content-Type=binary/octet-stream
. Some clients prefer to specify the content type explicitly and they must use RequireContentType=true
to be able to do that.
Resource Information
Method and URI | GET https://developer.api.autodesk.com/autocad.io/us-east/v2/AppPackage/Operations.GetUploadUrl(RequireContentType=:require) |
Authentication Context | app only |
Required OAuth Scopes | code:all |
Data Format | JSON |
Request
Headers
Authorization* string | Must be Bearer <token> , where <token> is obtained
via OAuth |
Request
URI Parameters
require* bool | Indicates whether you want to specify a
Content-Type header when uploading your AppPackage.false :Content-Type header is not requiredtrue :Content-Type header is required; defaultWhen required, the |
Response
HTTP Status Code Summary
200 OK | Request has succeeded |
400 Bad Request | Request could not be understood by the server due to malformed syntax |
401 Unauthorized | Access token is invalid |
404 Not Found | Resource cannot be found |
429 Too Many Requests | Rate limit exceeded; wait some time before retrying |
500 Internal Server Error | An unexpected error occurred on the server |
Response
Body Structure (200)
value string | Upload URL |
Example
Module Successfully Uploaded (200)
Request
curl -v 'https://developer.api.autodesk.com/autocad.io/us-east/v2/AppPackages/Operations.GetUploadUrl(RequireContentType=true)'
-X 'GET'
-H 'Content-Type: application/json'
-H 'Authorization: Bearer Pn43z2DJnsYuaAxI4R2iT84b3UPy'
Note that line breaks have been added to the cURL command above for ease of reading, but should be removed before executing the command in a terminal.
Response
{
"@odata.context":"https://developer.api.autodesk.com/autocad.io/us-east/v2/$metadata#Edm.String",
"value":"https://acadio.s3.amazonaws.com/aces-apppackages/201e3370-4e58-4396-8996-280bf52cc924/4200a3df-640d-45ba-aedf-85da2771d81a?AWSAccessKeyId=ASIAIBVFP2BWXA3VIXWQ&Expires=1465327543&x-amz-security-token=FQoDYXdzEMP%2F%2F%2F%2F%2F%2F%2F%2F%2F%2FwEaDLXcDBHiIZdluy8GkiKZA5W%2FT6a4clzw63WH9%2Fn5T9nxRWsC7dJTgxvFhpXrQqttzQhuPSRf%2FGn5rS3fTLqb2er4PIUKzp%2FFNOkCnDctFvt2lNjXEqe98XMgnJsgpgf3xemt2TdwxKWi5bh%2FaWi37nf0%2Bgqf9fQ9kdRp63UqTbN%2Fi0tVuDd6tbMR%2FvAtpDuLi%2BiaA7YDM8xYHoPCV5hWoCgl7xGkO7WG%2BhLE16e8wKwSA9%2BKH9T5g1LAKsO8zRruZ42OCPtjjaCfZeTRZrnxnw5IO4M%2BwCZvxsHLTM9LGSu5ru%2Fmv9voVlbXSD2zviOV6DPGqTn8IZmdq4t%2F%2FD676%2F1y%2BpuTygybAeL9JFewOOzKMg6GWiD5fGvusMvXS00Cdg15ZMU1ILzEKevWFWmcLrk2KMlFlmhgqzknDnznxUqfpEyuNiv7jHcUleqtV5r8v1w4vFjdJVz63Ci4OwNnnqPpHYJ4Our8bFrc72AHgp3YuWUEV4p4lxUKX9DvYMSXHqkKKL70cNexbvDUhZBlnBs9Lt8tQn7sxp0k2iYYZ%2F1XOoZLiWBfxH4ohIbcugU%3D&Signature=%2F%2FFgqA665RlwLoEaRn4Q9mQhNlk%3D"
}