v1/containers/{containerId}/attachment-folders
Find or create an attachment folder in BIM 360 Docs for a given item. That folder will save local files as attachments to the item. Files are saved using the Storage service.
Resource Information
Method and URI | POST https://developer.api.autodesk.com/cost/v1/containers/:containerId/attachment-folders |
Authentication Context | user context required |
Required OAuth Scopes | data:write |
Data Format | JSON |
Request
Headers
Authorization* string | Must be Bearer <token> , where <token> is obtained via a three-legged OAuth flow. |
Content-Type* string | Must be application/json |
region string | The region where the project data resides, to which this request is routed.
This header is optional because the request is automatically routed to a target region based on the project ID or container ID. Using the header, though, can save lookup time on each API call. For information about verifying the region the data resides in, see the Working with BIM 360 Services in Different Regions section on the API Basics page. Possible values: |
Request
URI Parameters
containerId string: UUID | The ID of the cost container for the project. Each project is assigned a container that stores all of the cost data for the project.
To find the container ID, see the Retrieve a Cost Container ID tutorial. In ACC projects, the container ID is the same as the project ID. To obtain a project ID, use GET projects. |
Request
Body Structure
The associated item of the folder.
associationId* string: UUID | The object ID of the item is associated to. For example, ID of the budget, contract or cost item. |
associationType* string | The type of the item with which the attachment is associated. Possible values: Budget , Contract , FormInstance , CostItem , Payment , MainContract , BudgetPayment . |
Response
HTTP Status Code Summary
201 Created | Success |
400 Bad Request | The parameters are invalid. |
401 Unauthorized | The provided bearer token is invalid. |
403 Forbidden | Forbidden. The user or service represented by the bearer token does not have permission to perform this operation. |
404 Not Found | The resource or endpoint cannot be found. |
409 Conflict | The request could not be completed due to a conflict with the current state of the resource. |
429 Too Many Requests | Rate limit exceeded. Retry your request after a few minutes. |
500 Internal Server Error | An unexpected error occurred on the server. |
503 Service Unavailable | Service unavailable. |
Response
Body Structure (201)
id string: UUID | System identifier of the folder. |
creatorId string | The user who created the folder. This is the ID of a user managed by BIM 360 Admin. |
scope string | Scope of the folder’s use. For example, Attachment, Template, and so on. |
urn string | Object URN of the folder in the Autodesk Data Management service. |
createdAt datetime: ISO 8601 | The date and time that the item was created, in ISO 8601 format. |
updatedAt datetime: ISO 8601 | The date and time that the item was last updated, in ISO 8601 format. |
Example
Success
Request
curl -v 'https://developer.api.autodesk.com/cost/v1/containers/e94b9bc8-1775-4d76-9b1d-c613e120ccff/attachment-folders' \
-X 'POST' \
-H 'Authorization: Bearer AuIPTf4KYLTYGVnOHQ0cuolwCW2a' \
-H 'Content-Type: application/json' \
-d '{
"associationId": "269F7D1E-2343-48E8-9B8E-45C45C976DC6",
"associationType": "Budget"
}'
Response
{
"id": "3A7432BB-8CA5-444A-B327-EE010E1D89DF",
"creatorId": "CED9LVTLHNXV",
"scope": "Contract-00000000-0000-0000-0000-000000000000",
"urn": "urn:adsk.wipprod:fs.file:vf.PMbRnoPZR2mKDhau2uw4SQ?version=1",
"createdAt": "2019-01-06T01:24:22.678Z",
"updatedAt": "2019-09-05T01:00:12.989Z"
}