projects/{projectId}/uploads
Creates an ACC upload object. This endpoint splits the files into separate sheets. It is typically used during the process of uploading files to ACC Sheets tool.
Note that before uploading the file, you need to create a version set and create a storage object.
This endpoint is asynchronous and initiates a job that runs in the background rather than halting execution of your program. You can track the progress of the upload by using the GET uploads/:id endpoint.
For more details about uploading sheets, see the Upload Sheets tutorial.
Resource Information
Method and URI | POST https://developer.api.autodesk.com/construction/sheets/v1/projects/{projectId}/uploads |
Authentication Context | user context optional |
Required OAuth Scopes | data:write |
Data Format | JSON |
Request
Headers
Authorization* string | Must be Bearer <token> , where <token> is obtained via either a two-legged or three-legged OAuth flow. |
x-user-id string | The ID of the user on whose behalf the API request is made. This header is optional when using a 2-legged OAuth2, but required if using 2-legged OAuth2 with user impersonation.
When using 2-legged OAuth2 without user impersonation, your app has access to all users defined by the administrator in the SaaS integrations UI. However, when user impersonation is enabled, the API call is restricted to act only on behalf of the specified user. This header is not relevant for 3-legged OAuth2. You can use either the user’s ACC ID (id), or their Autodesk ID (autodeskId). |
Content-Type* string | Must be application/json |
Request
URI Parameters
projectId string: UUID | The ID of the project. Use the Data Management API to retrieve the project ID. For more information, see the Retrieve a Project ID tutorial. You can use a project ID either with a “b.” prefix or without a “b.” prefix. For instance, a project ID of “b.a4be0c34a-4ab7” can also be referred to as “a4be0c34a-4ab7”. |
Request
Body Structure
versionSetId* string | The ID of the version set you want to upload the sheets to. To create a new version set, call POST version-sets. To find the ID of an existing version set, call GET version-sets. |
files* array: object | The list of files to be processed by the upload. |
storageType* enum:string | The storage type of the file. Will always be OSS . |
storageUrn* string | The storage URN of the file. |
name* string | The name of the file.
Currently the Sheets tool only supports PDF files. To create a storage URN, call POST storage. Max length: 255 |
Response
HTTP Status Code Summary
201 Created | Successfully started the upload. |
400 Bad Request | The parameters of the requested operation are invalid. |
403 Forbidden | The user or client represented by the bearer token does not have permission to perform this operation. |
404 Not Found | The requested resource cannot be found. |
429 Too Many Requests | The server has received too many requests. |
500 Internal Server Error | An unexpected error occurred on the server. |
Response
Body Structure (201)
id string: UUID | The ID of the upload. |
versionSetId string: UUID | The ID of the version set where the upload creates sheets to. |
status enum:string | The status of the upload. Possible values:
|
createdAt datetime: ISO 8601 | The time when the upload was created, in ISO-8601 format (YYYY-MM-DDTHH:mm:ss.SSSZ). |
createdBy string | The ID of the user who created the upload. |
createdByName string | The name of the user who created the upload. |
updatedAt datetime: ISO 8601 | The time when the upload was last updated, in ISO-8601 format (YYYY-MM-DDTHH:mm:ss.SSSZ). |
updatedBy string | The ID of the user who last updated the upload. |
updatedByName string | The name of the user who last updated the upload. |
publishedAt datetime: ISO 8601 | The time when all the review sheets of the upload were published, in ISO-8601 format (YYYY-MM-DDTHH:mm:ss.SSSZ). |
publishedBy string | The ID of the user who published all the review sheets of the upload. |
publishedByName string | The name of the user who published all the review sheets of the upload. |
publishedCount int | The number of files that have been published by the upload. |
Example
Successfully started the upload.
Request
curl -v 'https://developer.api.autodesk.com/construction/sheets/v1/projects/9ba6681e-1952-4d54-aac4-9de6d9858dd4/uploads' \
-X 'POST' \
-H 'Authorization: Bearer AuIPTf4KYLTYGVnOHQ0cuolwCW2a' \
-H 'Content-Type: application/json' \
-d '{
"versionSetId": "7c2ecde0-2406-49f9-9199-50176848a0b7",
"files": [
{
"storageType": "OSS",
"storageUrn": "urn:adsk.objects:os.object:bimdocs.9ba6681e-1952-4d54-aac4-9de6d9858dd4/67a2d96a-b1d7-474f-86ba-9e01a5c0f5be.pdf",
"name": "example.pdf"
}
]
}'
Response
{
"id": "5cb5d9da-060e-421e-bca9-97dd8b5cd800",
"versionSetId": "7c2ecde0-2406-49f9-9199-50176848a0b7",
"status": "PENDING",
"createdAt": "2021-07-01T05:21:05.391Z",
"createdBy": "45GPJ4KAX789",
"createdByName": "John Smith",
"updatedAt": "2021-07-01T05:21:05.391Z",
"updatedBy": "45GPJ4KAX789",
"updatedByName": "John Smith",
"publishedAt": "2021-07-01T05:21:05.391Z",
"publishedBy": "45GPJ4KAX789",
"publishedByName": "John Smith",
"publishedCount": 1
}