Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Deck of Cards
idbimUpdateAttachment


Card
defaulttrue
labelURL / Resource / JSON Structure
 Resource: attachments/<attachment_id> 

URLhttps://api-stage.bimplus.net/v2/<team_slug>/attachments/<attachment_id>

Example: https://api-stage.bimplus.net/v2/bimplus/attachments/e092b3ae-c022-46fd-aaea-a7b070142235



Card
labelHTTP Method
PUT


Card
labelDescription
 Update or replace a specified existing attachment with a new one.


Card
labelRequest

Bimplus supports creating and updating of attachments only 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 :

Code Block
borderColorGreen
langxml
titleHeaders
Authorization: BimPlus 9c1874a62c974dcfa75e0132c423a088
Content-Type: multipart/form-data; boundary=----MyFormBoundarytlTJWL8i2mvYwGPW


Code Block
titleContent
------MyFormBoundarytlTJWL8i2mvYwGPW
Content-Disposition: form-data; name="TestFile"; filename="TestFile.xml"; classification="Report"; tag="ABCDE"
Content-Type: application/xml
 
**** Here are file data  ******
 
------MyFormBoundarytlTJWL8i2mvYwGPW

Where :

  • name and filename are mandatory saved as attachment's "name" and "filename" properties
  • classification and tag are optional, and are saved as attachment's properties "tag" and "classification"
  • Content-Type is mandatory and is saved as attachment's property "type"


Card
labelResponse


Code Block
borderColorGreen
langxml
titleStatus
Status: 200 OK


Code Block
titleJson
{
     "objectIds": [
         "0d2ce2cc-3588-45d6-a59a-f6b89ebed34e"
     ],
     "fileName": "TestFile.xml",
     "type": "application/xml",
     "size": 211258,
     "createdAt": "2013-12-11T10:47:39",
     "creator": {
         "id": "e18941f4-a809-2d01-d27d-cd251f2b6cb6",
         "email": "test@bimplus.net",
         "firstname": "First Name",
         "lastname": "Second Name",
         "company": "Best-Company",
         "fullname": "First Name Second Name",
         "displayname": "Best-Company",
     },
     "changed" : "2013-12-11T10:47:39",
     "changedBy" : {
         "id": "e18941f4-a809-2d01-d27d-cd251f2b6cb6",
         "email": "test@bimplus.net",
     },
     "hash": "68a59c1f-1914-43b8-92fc-1cee4ad1c90c",
     "attachmentType" : "Document",
     "classification" : "Report",
     "tag" : "ABCDE",
     "sizeMB" : "0,21",
     "version" : "1",
	 "release": "false"
     "relatedId" : "0d2ce2cc-3588-45d6-a59a-f6b89ebed34e",
     "rights" : {
         "update" : true,
         "share" : true,
         "delete" : true,
         "download" : true
     }
     "id": "6cea110a-88f4-43ac-9a00-ebaf677be333"
}



...

Deck of Cards
idbimCreateVersion


Card
defaulttrue
labelURL / Resource / JSON Structure
Resource: attachments/<attachment_id>/versions

URLhttps://api-stage.bimplus.net/v2/<team_slug>/attachments/<attachment_id>/versions

Examplehttps://api-stage.bimplus.net/v2/bimplus/attachments/0d2ce2cc-3588-45d6-a59a-f6b89ebed34e/versions

JSON Structure: Please note that all the information required for this call will be taken from the document that you attach and hence the request of this call has no body. The request Content-Type is multipart/form-data


Card
labelHTTP Method
 POST


Card
labelDescription
 Create a new version of an attachment. The request headers and content are identical with that of update attachment ( see above ).


Card
labelRequest


Code Block
borderColorGreen
langxml
titleHeaders
Authorization: BimPlus 9c1874a62c974dcfa75e0132c423a088
Content-Type: multipart/form-data



Card
labelResponse


Code Block
borderColorGreen
langxml
titleStatus
Status: 201 Created


Code Block
borderColorRed
langxml
titleJSON
   {
        "objectIds": [
            "00000000-0000-0000-0000-000000000000"
        ],
        "fileName": "CommentDTO.png",
        "type": "image/png",
        "size": 19565,
        "createdAt": "2014-02-18T14:26:26",
        "creator": {
            "id": "71e0ac3b-fa49-e540-ac2f-8caff3dd72ed",
            "email": "jayaraj.purushothaman@gmail.com",
            "status": "Active",
            "firstname": "Jayaraj",
            "lastname": "Purushothaman",
            "company": "Jay Company",
            "fullname": "Jayaraj Purushothaman",
            "displayname": "Jayaraj Purushothaman [Jay Company]",
            "info": null,
            "gender": "MR",
            "phoneWork": null,
            "phoneHome": null,
            "fax": null,
            "mobile": "",
            "birthDate": null,
            "address": {
                "street": "",
                "streetNr": "",
                "zip": "",
                "city": "",
                "country": ""
            },
            "preferedLanguage": "en"
        },
        "changed": "2014-02-18T14:26:26",
        "changedBy": {
            "id": "71e0ac3b-fa49-e540-ac2f-8caff3dd72ed",
            "email": "jayaraj.purushothaman@gmail.com"
        },
        "hash": "8ca75220-5580-4413-b29f-0e93267a6524",
        "classification": "",
        "tag": "",
        "sizeMB": "0,02",
        "version": 1,
        "id": "f40a22a0-5c53-4d1b-8e93-e1556514828d"
    }



...

Deck of Cards
idbimGetAllVersions


Card
defaulttrue
labelURL / Resource / JSON Structure
Resource: attachments/<attachment_id>/versions

URLhttps://api-stage.bimplus.net/v2/<team_slug>/attachments/<attachment_id>/versions

Examplehttps://api-stage.bimplus.net/v2/bimplus/attachments/0d2ce2cc-3588-45d6-a59a-f6b89ebed34e/versions


Card
labelHTTP Method
 GET


Card
labelDescription
 Get all the version of an attachment


Card
labelRequest


Code Block
borderColorGreen
langxml
titleHeaders
Authorization: BimPlus 9c1874a62c974dcfa75e0132c423a088
Content-Type: application/json



Card
labelResponse


Code Block
borderColorGreen
langxml
titleStatus
Status: 200 OK


Code Block
borderColorRed
langxml
titleJSON
    [
    {
        "objectIds": [
            "9022417d-261f-4dfa-83d3-66405232722f"
        ],
        "fileName": "CommentDTO.png",
        "type": "image/png",
        "size": 107633,
        "createdAt": "2014-02-18T14:26:26",
        "creator": {
            "id": "71e0ac3b-fa49-e540-ac2f-8caff3dd72ed",
            "email": "jayaraj.purushothaman@gmail.com",
            "status": "Active",
            "firstname": "Jayaraj",
            "lastname": "Purushothaman",
            "company": "Jay Company",
            "fullname": "Jayaraj Purushothaman",
            "displayname": "Jayaraj Purushothaman [Jay Company]",
            "info": null,
            "gender": "MR",
            "phoneWork": null,
            "phoneHome": null,
            "fax": null,
            "mobile": "",
            "birthDate": null,
            "address": {
                "street": "",
                "streetNr": "",
                "zip": "",
                "city": "",
                "country": ""
            },
            "preferedLanguage": "en"
        },
        "changed": "2015-11-18T10:16:32.233",
        "changedBy": {
            "id": "71e0ac3b-fa49-e540-ac2f-8caff3dd72ed",
            "email": "jayaraj.purushothaman@gmail.com"
        },
        "hash": "59c2b69d-fb99-4b62-8c2b-5f3c7531ffb2",
        "attachmentType": "NonModel",
        "classification": "",
        "tag": "",
        "sizeMB": "0,1",
        "version": 2,
        "id": "f40a22a0-5c53-4d1b-8e93-e1556514828d"
    },
    {
        "objectIds": [
            "00000000-0000-0000-0000-000000000000"
        ],
        "fileName": "CommentDTO.png",
        "type": "image/png",
        "size": 19565,
        "createdAt": "2014-02-18T14:26:26",
        "creator": {
            "id": "71e0ac3b-fa49-e540-ac2f-8caff3dd72ed",
            "email": "jayaraj.purushothaman@gmail.com",
            "status": "Active",
            "firstname": "Jayaraj",
            "lastname": "Purushothaman",
            "company": "Jay Company",
            "fullname": "Jayaraj Purushothaman",
            "displayname": "Jayaraj Purushothaman [Jay Company]",
            "info": null,
            "gender": "MR",
            "phoneWork": null,
            "phoneHome": null,
            "fax": null,
            "mobile": "",
            "birthDate": null,
            "address": {
                "street": "",
                "streetNr": "",
                "zip": "",
                "city": "",
                "country": ""
            },
            "preferedLanguage": "en"
        },
        "changed": "2014-02-18T14:26:26",
        "changedBy": {
            "id": "71e0ac3b-fa49-e540-ac2f-8caff3dd72ed",
            "email": "jayaraj.purushothaman@gmail.com"
        },
        "hash": "8ca75220-5580-4413-b29f-0e93267a6524",
        "classification": "",
        "tag": "",
        "sizeMB": "0,02",
        "version": 1,
        "id": "f40a22a0-5c53-4d1b-8e93-e1556514828d"
    }
]



...

Deck of Cards
idbimDeleteAttachment


Card
defaulttrue
labelURL / Resource / JSON Structure
Resourceattachments/<attachment_id>/versions/<version_no>

URLhttps://api-stage.bimplus.net/v2/<team_slug>/attachments/<attachment_id>/versions/<version_no>

Examplehttps://api-stage.bimplus.net/v2/bimplus/attachments/d0b3fc78-8f60-4e3f-ae72-65beb3dcb7d2/versions/1


Card
labelHTTP Method
 DELETE


Card
labelDescription
 Delete a particular version of the attachment


Card
labelRequest


Code Block
borderColorGreen
langxml
titleHeaders
Authorization: BimPlus 9c1874a62c974dcfa75e0132c423a088
Content-Type: application/json



Card
labelResponse


Code Block
borderColorGreen
langxml
titleStatus
Status: 200 OK



...