containers/{containerId}/issues/{issueId}/attachments
Create new Issue Attachment.
You can attach documents using the Forge Data Management API or attach local attachments to an issue.
See the Attach BIM 360 Document Management Files to Issues tutorial and the Attach local attachment to an Issue tutorial for more details.
Note that for uploading photo
(using OSS) one should use a file name with a photo suffix format (.jpeg, .png, etc.) in lowercase.
Note that this endpoint is ONLY compatible with BIM 360 projects. It is not compatible with Autodesk Construction Cloud (ACC) projects. For more information about compatibility between between BIM 360 and ACC, see the Compatibility section.
Resource Information
Method and URI | POST https://developer.api.autodesk.com/issues/v2/containers/:containerId/issues/:issueId/attachments |
Authentication Context | user context required |
Required OAuth Scopes | data:read 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 |
Request
URI Parameters
containerId string | The ID of the container.
Each project is assigned to a container that stores all the issues for the project. Use the Data Management API to retrieve the container ID. For more information, see the Retrieve Issues Container ID tutorial. |
issueId string | The unique issue ID |
Request
Body Structure
Attachment to add
name* string | |
urn string | Use this attribute if urnType=dm .
Note that response format can be either dm - |
urnType* enum:string | urnType attribute indicates the type of storage where the attachment will be stored.
If urnType is set to If urnType is set to Possible Values: |
Response
HTTP Status Code Summary
201 Created | Created |
400 Bad Request | Invalid input |
401 Unauthorized | The supplied Authorization header was not valid. Verify Authentication and try again |
403 Forbidden | The request was successfully validated but permission is not granted |
404 Not Found | Container or Issue not found |
Response
Body Structure (201)
id string: UUID | |
issueId string: UUID | |
name string | |
urn string | Use this attribute if urnType=dm .
Note that response format can be either dm - |
createdBy string | The unique identifier of the user who created the attachment. |
updatedBy string | The unique identifier of the user who updated the attachment. |
deletedBy string | The unique identifier of the user who deleted the attachment. |
createdAt datetime: ISO 8601 | The date and time the attachment was created (attached), in ISO8601 format. |
updatedAt datetime: ISO 8601 | The date and time the attachment was updated, in ISO8601 format. |
deletedAt datetime: ISO 8601 | The date and time the attachment was deleted, in ISO8601 format. |
markupMetadata object | Not relevant |
attachmentType enum:string | The attachmentType attribute indicates the type of file that is being attached.
The value of attachmentType is determined by the file suffix of the attached file. If the file has a suffix that corresponds to a lowercase photo format (such as .jpg, .png etc.), then attachmentType is set to photo. Otherwise, it is set to document. Possible Values: |
status enum:string | The status of an attachment file to an issue.
Possible Values: |
clientCreatedAt string | Not relevant |
clientUpdatedAt datetime: ISO 8601 | Not relevant |
urnType enum:string | urnType attribute indicates the type of storage where the attachment will be stored.
If urnType is set to If urnType is set to Possible Values: |
wipUrn object | Not relevant |
permittedActions array: string | The list of actions permitted for the user for attachment.
Possible Values: |
permittedAttributes array: string | A list of attributes you are allowed to edit regard the attachment.
Possible Values: |
urnVersion string | Not relevant |
resourceUrns string | Not relevant |
urnPage int | Not relevant |
setWipUrnRetries int | Not relevant |
clientVersion object | |
origin string | Not relevant |
appName string | Not relevant |
browser string | Not relevant |
isIosApp boolean | Not relevant |
serviceId string | Not relevant |
appVersion string | Not relevant |
user_agent string | Not relevant |
isAndroidApp boolean | Not relevant |
browserVersion string | Not relevant |
Example
Created
Request
curl -v 'https://developer.api.autodesk.com/issues/v2/containers/a5f49f04-59bb-477c-97e6-6833cb50bdac/issues/a5f49f04-59bb-477c-97e6-6833cb50bdac/attachments' \
-X 'POST' \
-H 'Authorization: Bearer AuIPTf4KYLTYGVnOHQ0cuolwCW2a' \
-H 'Content-Type: application/json' \
-d '{
"name": "Darth Vader",
"urn": "urn:adsk.wipqa:fs.folder:co.LymIC3w5SEOE6jXChqmkqg",
"urnType": "dm"
}'
Response
{
"id": "1110f111-6c54-4b01-90e6-d701748f1111",
"issueId": "1110f111-6c54-4b01-90e6-d701748f1111",
"name": "Darth Vader",
"urn": "urn:adsk.wipqa:fs.folder:co.LymIC3w5SEOE6jXChqmkqg",
"createdBy": "A3RGM375QTZ7",
"updatedBy": "A3RGM375QTZ7",
"deletedBy": "A3RGM375QTZ7",
"createdAt": "2018-07-22T15:05:58.033Z",
"updatedAt": "2018-07-22T15:05:58.033Z",
"deletedAt": "2018-07-22T15:05:58.033Z",
"markupMetadata": {},
"attachmentType": "photo",
"status": "completed",
"clientCreatedAt": "A3RGM375QTZ7",
"clientUpdatedAt": "2018-07-22T15:05:58.033Z",
"urnType": "dm",
"wipUrn": {},
"permittedActions": [
"remove_attachment"
],
"permittedAttributes": [
"name"
],
"urnVersion": 1,
"resourceUrns": "",
"urnPage": 1,
"setWipUrnRetries": 0,
"clientVersion": {
"origin": "",
"appName": "test app",
"browser": "",
"isIosApp": false,
"serviceId": "Tgpk4Y3oSYOJyA6qkC9v4PGlASt2HqO3",
"appVersion": "",
"user_agent": "PostmanRuntime/7.29.2",
"isAndroidApp": true,
"browserVersion": ""
}
}