Complete File Upload (Beta)
POST
vaults/{vaultId}/file-uploads/{uploadId}:complete
Completes a temporary upload and returns the server-calculated content size, checksum, and opaque UploadTicket required by subsequent file creation or check-in requests.
Resource Information
| Method and URI | POST /AutodeskDM/Services/api/vault/v2/vaults/{vaultId}/file-uploads/{uploadId}:complete |
| Authentication Context | User context required |
| Required OAuth Scopes | No scopes required |
| Data Format | JSON |
Request
Headers
| Authorization* string | Must be Bearer <token>, where <token> is a three-legged access token obtained via an Authorization Code flow or a Secure Service Account (SSA) flow.
The SSA flow is designed for headless server-to-server operations. While it functions like a two-legged flow (no user interaction), it is classified as three-legged because it preserves user context. |
| X-Vault-Upload-Session* string | The opaque continuation token returned by the previous upload response. |
* Required
Request
URI Parameters
| vaultId string | The unique identifier of a Knowledge Vault. |
| uploadId string: UUID | The stable identifier of the upload session. |
Response
HTTP Status Code Summary
| 200 OK | The file upload was successfully completed. |
| 400 Bad Request | The server was unable to process the request. The syntax of the request is malformed or the request is missing a required header. Do not repeat the request without fixing the issue. The response body may indicate what is wrong with the request. |
| 401 Unauthorized | The supplied authorization header was not valid or the supplied token scope was not acceptable. Verify authentication and try again. |
| 403 Forbidden | The request was successfully validated but lacking the required permissions. Verify your credentials and permissions before you send this request again. |
Response
Body Structure (200)
| uploadId string: UUID | Stable identifier of the upload session. |
| state enum:string | Will always be: completed |
| size int | Content size in bytes calculated by Vault. |
| checksum int | Content checksum calculated by Vault. |
| uploadTicket string | Opaque UploadTicket required by a subsequent file creation or check-in request. |
Example
This example illustrates how to complete a file upload and obtain an upload ticket.
Note: {VaultServerAddress} is used as a placeholder in the example(s) and could represent one of the following:
- Vault Server IP address or hostname. Ex: http://10.41.110.49.
- Vault Gateway URL if gateway is configured. Ex: https://test.vg.autodesk.com.
Request
curl -v '{VaultServerAddress}/AutodeskDM/Services/api/vault/v2/vaults/9/file-uploads/2e3a6deb-7480-4c2c-a5cf-17a48522590d:complete' \
-X 'POST' \
-H 'X-Vault-Upload-Session: y75f-k~TOvDdLtkKm6wn5KvqG8X-u4qOjuFkWD2zbH6nL0V5VYIXkkmMUhu2U1nffsAvJZYrtNBlgamJExBlzO1dcjLZzu9kCHyNbCPauITUL4PyHpnA6VzqGS4BscHuvWICTIdLb2Hn8sWedDqOcRoBTRBOjrAjCFGGp7gj5lqKQqjMmDfNX2T5I4rJPA6Koxmsyf61sc84w-f92Vl8HagF03D40pyg9WNl4b1~UMF5DdSQp8TJlwdCwhULGpE7bqV1Q~HWine045yrMzf-bsEc7MZHv6hBFFAY5F07l5OqB2HeEh70rcDYqrJ62FtxBLfHdYSWbCzNXxS~ZrOo5AHgXRg6upBUbaeBrCORdTHmnZ~r1lEX-tebUnh4a1RN'\
-H 'Authorization: Bearer AuIPTf4KYLTYGVnOHQ0cuolwCW2a...'
Response
{
"uploadId": "2e3a6deb-7480-4c2c-a5cf-17a48522590d",
"state": "completed",
"size": 33,
"checksum": -163330337,
"uploadTicket": "MFwwnjb48ETlXWVLaPlVgJdPYl2IozfU95yzdINCqJ0HTgTyVFU8idx6vJ7~AcJwnbyH8Nd6yusMopPQQ15gLU2SgSuaX1~~LGDNOTMCZUd~xS8jtTvgFJ0U12HTE2HAz2cbMhO8bzLxSKUBIU-K5Fayh1Ke035bfH9gcVFmIzBA8XxmvnlgO1~fNx26KFGru1LKx38KnhpxfCTzMJo7RxHT-dvHD8~EScfl20455CwdGkx3y0EBENP7RH7mAyNk4k7CxROOeheZsydKsEpq7zOYfzWStbYoXp3XtJzOl7TWAtifYOSgpw~zZ4zNsJ6i-GbK4LuAmoVT~DpcB3TIB52HDMHwuGmoQuGlRPrHvpn0UO1f-k74UYIx0A57s6xy619dTYvMCJ8x3h~I~zGoc5-CNCsRiLUHtzZTEtsvCa4_"
}