AppPackages
POST
AppPackages(‘:id’)/Operations.SetVersion

Sets the AppPackage to the specified version.
When an Activity or other AppPackage references this AppPackage, the version set by this method will be used. This method can be used to roll back to a previous version after an update has introduced a regression.
By default, the current version that the client sees is always the latest version.
Resource Information
Method and URI | POST https://developer.api.autodesk.com/autocad.io/us-east/v2/AppPackages(‘:id’)/Operations.SetVersion |
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 |
Content-Type* string | Must be application/json |
* Required
Request
Body Structure
Version int | Version number of the AppPackage; must be a valid AppPackage version that was previously created |
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 |
Example
Version of the AppPackage successfully set (200)
Request
curl -v "https://developer.api.autodesk.com/autocad.io/us-east/v2/AppPackages('SampleApp')/Operations.SetVersion" \
-X 'POST' \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer Pn43z2DJnsYuaAxI4R2iT84b3UPy' \
-d '
{
"Version":1
}'
Show More
Response
HTTP/1.1 200 OK
Cache-Control: no-cache
Date: Wed, 20 May 2015 16:52:41 GMT
Expires: -1
Pragma: no-cache
Server: Microsoft-IIS/8.5
X-AspNet-Version: 4.0.30319
X-Powered-By: ASP.NET
Content-Length: 0
Connection: keep-alive
Show More