Attachment Service
...
- Create the attachment
- Get attachment information
- Download the attachment
- Update the attachment
- Delete the attachment
- Filter for getting project-only attachments & attachments that belong to a particular attachment-type
- Create a new version of an attachment
- Get all the versions of an attachment
- Share the attachment
- Download a particular version
- Delete a particular version
...
- Please use the Bimplus Project Service for creating an attachment or for getting/deleting all the attachments of a project
- Please use the Bimplus Object Service for creating an attachment or for getting/deleting all the attachments of an object, issue or slide
Anchor createAttachment createAttachment
Attachment Json
Create and update of attachments is using of calls with "multipart/form-data" content or by application/json.
The body of string format
Name | Mandatory/Optional | Type | Description |
---|---|---|---|
fileName | optional | string | Name of the attachment |
imageData | mandatory | string | data for image |
The responses of GET are jsons of json in following format :
Name | Type | Description |
---|---|---|
id | guid | Attachment Id |
relatedId | guid | ID of the object/project/issue the attachment is attached to. |
name | string | Attachment name |
fileName | string | Name of the attachment's file |
type | string | Attachment's content type |
size | int | File size in bytes |
sizeMB | int | FIle size in megabytes |
createAt | string ( Date ) | Date of creation |
creator | json ( User ) | User who created the attachment |
changed | string ( Date ) | Date of last modification |
changedBy | json ( User ) | User who did the modification |
attachmentType | string | Bimplus attachment type. Default type is "Document" |
hash | string | File hash |
classification | string | Bimplus internal attachment classification. |
tag | string | Optional value, for additional marking of the attachment. |
objectIds | array of guid | Obsolete. Replaced by "relatedId" |
version | int | Attachment version |
rights | json | User's right to the attachment, has following boolean properties : update, share, delete, download |
release | string(bool) | True if attachment is share or false if attachment is not share. |
...
Create the attachment
...
Get Attachment information
Deck of Cards | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Anchor | ||||
---|---|---|---|---|
|
Get Attachment information
Deck of Cards | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
...
Download the attachment
...
id | bimDownloadAttachment |
---|
Card | ||||
---|---|---|---|---|
| ||||
Resource: attachments/<attachment_id>/download URL: https://api-stage.bimplus.net/v2/<team_slug>/attachments/<attachment_id>/download OR https://api-stage.bimplus.net/v2/<team_slug>/attachments/<attachment_id>/download?api-token=token (If the client cannot use the token in the header request) Example: https://api-stage.bimplus.net/v2/bimplus/attachments/d0b3fc78-8f60-4e3f-ae72-65beb3dcb7d2/download OR https://api-stage.bimplus.net/v2/bimplus/attachments/d0b3fc78-8f60-4e3f-ae72-65beb3dcb7d2/download?api-token=9c1874a62c974dcfa75e0132c423a088 |
Card | ||
---|---|---|
| ||
GET |
Card | ||
---|---|---|
| ||
Download the content of a specified attachment. There is a support to download the list of all attachments for selection object (if selection type is 'Elements' and defined elements are attachments) or the list of all attachments for structure node (for type of structure 'Document Folder'). In this case (attachments/<selection_id>/download or attachments/<structure_id>/download) the downloaded content is a compressed zip file including these attachments. If there is not any attachment for selection/structure the return code is 404 Not Found. If Selection\Document Folder structure contains files with same names, the return code is 403 Forbidden. The token can be also provided as the query string for downloading the attachment(If the client cannot use the token in the header request). |
|
Anchor | ||||
---|---|---|---|---|
|
Download the attachment
Deck of Cards | |||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| |||||||||||||||||||||||||||||||||||||||||||||
|
Anchor | ||||
---|---|---|---|---|
|
Update the attachment
Deck of Cards | |||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| |||||||||||||||||||||
|
...
label | Request |
---|
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
Authorization: BimPlus 9c1874a62c974dcfa75e0132c423a088
Content-Type: application/json
|
...
label | Response |
---|
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
Status: 200 OK
|
The response format is application/octet-stream.
...
Update the attachment
Deck of Cards | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Where :
Card |
Bimplus supports creating and updating of attachments using requests with multipart/form-data content type or by application/json. By standard, multipart/form-data content consists of several parts, each part containing a file data. But Bimplus supports only one file sent per call, so only first part of multipart form data content is used, the rest are ignored. The parts are separated by boundaries, each part contains content headers and content data. Examples :
Where :
|
...
|
Anchor | ||||
---|---|---|---|---|
|
Delete the Attachment
Deck of Cards | |||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| |||||||||||||||
|
...
Delete the Attachment
Deck of Cards | |||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| |||||||||||||||||||||||||||||||||||||||||||||
|
...
Deck of Cards | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Anchor | ||||
---|---|---|---|---|
|
Share the attachment
Deck of Cards | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Anchor | ||||
---|---|---|---|---|
|
...
Deck of Cards | |||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| |||||||||||||||||||||||||||||||||||||||||||||
|
Anchor | ||||
---|---|---|---|---|
|
...