Versions Compared

Key

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

...

Deck of Cards
idbimUpdateModelRevision


Card
defaulttrue
labelURL / Resource / JSON Structure
Resource: projects revisions/<project<revision_id>

URLhttps://api-stage.bimplus.net/v2/<team_slug>/projectsrevisions/<project<revision_id>

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

JSON Structure

Name

Mandatory / Optional

Type

Description

name

mandatory

string

Name of the revision

description

optional

string

Short description of the revision

projectId

will be ignored

string (guid)

Creation date of the revision

divisionIdwill be ignoredstring (guid)Id of the model
revisionNrwill be ignoredintRevision number
createdwill be ignoredstring (date)Creation date
createdBywill be ignoreduser objectThe user who created it
applicationIdoptionalstring (guid)The id of the application
inputTypeoptionalstringType of upload (eg: "IFC_IMPORT")



Card
labelHTTP Method
 PUT


Card
labelDescription
 Update the revision info of a model.


Card
labelRequest


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


Code Block
borderColorRed
langxml
titleJSON
{
"name": "updated name"
}



Card
labelResponse


Code Block
borderColorGreen
langxml
titleStatus
Status: 200 OK


Code Block
borderColorRed
langxml
titleJSON
{
    "id": "d2d39bca-051e-48fa-ba23-4845087a071c",
    "name": "updated name",
    "divisionId": "00b54edd-c84c-4bd2-a08c-c93d1f28907a",
    "revisionNr": 6,
    "created": "2015-11-03T11:13:27",
    "createdby": {
        "id": "71e0ac3b-fa49-e540-ac2f-8caff3dd72ed",
        "email": "jayaraj.purushothaman@gmail.com"
    },
    "changed": "0001-01-01T00:00:00",
    "changedby": {
        "id": "71e0ac3b-fa49-e540-ac2f-8caff3dd72ed",
        "email": "jayaraj.purushothaman@gmail.com"
    },
    "applicationId": "0106c8ba-ad46-7c08-e26f-026852cb7525"
}



...

Deck of Cards
idbimCalculateModelRevisionsComparison


cardlabelHTTP Methodcardlabel
Card
defaulttrue
labelURL / Resource / JSON Structure
Resourcedivisions/<division_id>/revisionscomparison/<higher_revision_number>/<lower_revision_number>

URLhttps://api-stage.bimplus.net/v2/<team_slug>/divisions/<division_id>/revisionscomparison/<higher_revision_number>/<lower_revision_number>

Examplehttps://api-stage.bimplus.net/v2/bimplus/divisions/00b54edd-c84c-4bd2-a08c-c93d1f28907a/revisionscomparison/5/2


Optional query parameters


Name
Type
Default value
 POST
Description
filter
Guid
Description

This API call will calculate comparison between two revisions of the same model to provide revisions differences. The revisions numbers does not have to be consecutive, meaning you can compare revisions e.g. 5 vs 2. But revision numbers must be in correct order, revisions number higher_revision_number must be higher then lower_revision_number. The higher revision number maybe be also the latest revision.

Card
labelRequest
Code Block
borderColorGreen
langxml
titleHeaders
Authorization: BimPlus 9c1874a62c974dcfa75e0132c423a088
Content-Type: application/json
nullWhen "filter={{filterId}}" is defined the API will return only valid object's which meet a conditions of defined filter.
attributes    Stringnull

When "attributes={{attrubuteid1}};{{attributeId2}}" are defined the API will return only objects, for which the given attributes were changed. Only really changed attributes are touched by that, the new elements, deleted elements and also the modified geometry are returned always.

selectionobjectGuidnullWhen "selectionobject={{selectionObjectId}}" is defined the API will return only object's in selections.
allChangedAttributesBooleanfalseWhen "allChangedAttributes" are true the API will return also changes attributes in object.
page, pageSizeIntnullWhen "page=2&pageSize=3" are set the API will return defined page number (2) with defined number of objects per page (3 objects).



Card
labelHTTP Method
 POST


Card
labelDescription

This API call will calculate comparison between two revisions of the same model to provide revisions differences. The revisions numbers does not have to be consecutive, meaning you can compare revisions e.g. 5 vs 2. But revision numbers must be in correct order, revisions number higher_revision_number must be higher then lower_revision_number. The higher revision number maybe be also the latest revision.


Card
labelRequest


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



Card
labelResponse


Code Block
borderColorGreen
langxml
titleStatus
Status: 200 OK - when succeeded calculation of comparison of revisions of the model

Status : 400 BadRequest - if revision numbers are incorrect, or first revision is not 
Card
labelResponse
Code Block
borderColorGreen
langxml
titleStatus
Status: 200 OK - when succeeded calculation of comparison of revisions of the model

Status : 400 BadRequest - if revision numbers are incorrect, or first revision is not greater than second
Status : 400 NotFound - if any of the revisions does not exist


Code Block
borderColorRed
langxml
titleJSON
The response is similar to the GET <Url>/<TeamSlug>/divisions/<division_id>/revisionscomparison/<higher_revision_number>/<lower_revision_number>. 
For details see "Get calculated comparison of revisions of the model" below.



...

Deck of Cards
idbimModelRevisionsComparision


Card
defaulttrue
labelURL / Resource / JSON Structure

Resourcedivisions/<division_id>/revisionscomparison/<higher_revision_number>/<lower_revision_number>

URLhttps://api-stage.bimplus.net/v2/<team_slug>/divisions/<division_id>/revisionscomparison/<higher_revision_number>/<lower_revision_number>

Examplehttps://api-stage.bimplus.net/v2/bimplus/divisions/00b54edd-c84c-4bd2-a08c-c93d1f28907a/revisionscomparison/5/2

Card
labelHTTP Method
 GET
Card
labelDescription

This api returns already calculated comparison of revisions of the model. In returned json is very important property "IsUpToDate" which provide information if revision comparison is actual or not.
In response are most important four sets of objects - inserted, deleted, changedGeometry, changed.
The unaffected & hidden objects are not returned in the response.

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


Optional query parameters

NameTypeDefault valueDescription
filterGuidnull

When "filter={{filterId}}" is defined the API will return only valid object's which meet a conditions of defined filter.

attributes    Stringnull

When "attributes={{attrubuteid1}},{{,attributeId2}}" are defined the API will return only objects, for which the given attributes were changed. Only really changed attributes are touched by that, the new elements, deleted elements and also the modified geometry are returned always.

allChangedAttributesBooleanfalseWhen "allChangedAttributes" are true the API will return also changes attributes in object.
page, pageSizeIntnullWhen "page=2&pageSize=3" are set the API will return defined page number (2) with defined number of objects per page (3 objects).




Card
labelHTTP Method
 GET


Card
labelDescription

This api returns already calculated comparison of revisions of the model. In returned json is very important property "IsUpToDate" which provide information if revision comparison is actual or not.
In response are most important four sets of objects - inserted, deleted, changedGeometry, changed.
The unaffected & hidden objects are not returned in the response.


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
titleIn general, the response JSON has following format :
{
  "divisionId": "958ee96f-12c6-4684-928c-7119ad7090ab",
  "firstRevision": 3,
  "secondRevision": 2,
  "status": "DONE",
  "isUpToDate": true,
  "calculatedAt": "2016-10-19T09:05:39.8138934",
  "calculatedBy": {
    "id": "7c555899-5a5f-44d1-930e-284930678bed",
    "email": "user@allplan.com"
  },
  "inserted": [ ... ],
  "deleted": [ ... ],
  "changedGeometry": [ ... ],
  "changed": [ ... ]
}                                                      

The properties "inserted", "deleted", "changedGeometry" and "changed" will contain array of comparison objects in following format:

Code Block
borderColorRed
langxml
titleThe comparison objects in response JSON has following format :
{                                                             
 "comparisonObjectId": "870c9ced-63fb-4fdf-beaf-ebd19507c072",
 "first": { 																									
 "id": "3a2d82dc-325c-4369-a083-02e3535d850d", 								
 "type": "Beam", 																							
 "name": "Beam_1-01" 																					
 },                                                           
 "second": { 																									
 "id": "3a2d82dc-325c-4369-a083-02e3535d850d",                
 "type": "Beam",                                              
 "name": "Beam_1-01"                                          
 }                                                            


Code Block
borderColorRed
langxml
titleThe comparison objects with specified attributes in response JSON has following format :
{
            "divisionId": "14d59026-a26f-4c75-8e96-5ea535ca1cdc",
            "firstRevision": 2,
            "secondRevision": 1,
            "status": "DONE",
            "isUpToDate": true,
            "calculatedAt": "2019-06-27T05:54:59.9898647",
            "calculatedBy": {"id": "c739304f-68c3-461f-b580-bb706226852b","email": "UserProjectEditor@allplan.com"},
            "inserted": {"id": "3957ab72-08ee-4a1e-b6e0-23ece985009c", "resultObjects": []},
            "deleted": {"id": "4c731362-a113-4df1-8702-e4a7d0bc0872",  "resultObjects": []},
            "changedGeometry": {  "id": "de790796-62be-4cc3-bc17-5d06563c041f","resultObjects": []},
            "changed": {                 "id": "193fb85e-72bd-435f-9b9d-28441c297f2a",
                        "resultObjects": [{
                                                "comparisonObjectId": "13e07edd-373d-428b-ab16-925e15ad0bd4",
                                                "disciplineId": "f8a4b995-4c06-4b0e-b4d2-4e68f56a8496",
                                                "lastTopologyId": "a29657af-1ce5-4a78-9cea-c13cd8bd8acb",
                                                "first": {
                                                            "id": "9160d574-cf22-4609-b16d-13892aef350d",
                                                            "type": "StructuralCurveMember",
                                                            "name": "TestBeam-A updated to B",
                                                            "attributes": {
                                                                        "name": "TestBeam-A updated to B",
                                                                        "coefficientofperformancecurve": "B"
                                                            }
                                                },
                                                "second": {
                                                            "id": "9160d574-cf22-4609-b16d-13892aef350d",
                                                            "type": "StructuralCurveMember",
                                                            "name": "TestBeam-A",
                                                            "attributes": {
                                                                        "name": "TestBeam-A",
                                                                        "coefficientofperformancecurve": "A"
                                                            }
                                                }
                                    }, {
                                                "comparisonObjectId": "8b8e1843-54a6-4df1-8397-34f8e673e888",
                                                "disciplineId": "0f106af0-a919-44c5-b211-15bd5ef620b6",
                                                "lastTopologyId": "a29657af-1ce5-4a78-9cea-c13cd8bd8acb",
                                                "first": {
                                                            "id": "f809c169-375f-4a41-9e73-13d5a396ff06",
                                                            "type": "Wall",
                                                            "name": "TestWall-A updated to B",
                                                            "attributes": {
                                                                        "name": "TestWall-A updated to B"
                                                            }
                                                },
                                                "second": {
                                                            "id": "f809c169-375f-4a41-9e73-13d5a396ff06",
                                                            "type": "Wall",
                                                            "name": "TestWall-A",
                                                            "attributes": {
Card
labelResponse
Code Block
borderColorGreen
langxml
titleStatus
Status: 200 OK
Code Block
borderColorRed
langxml
titleJSON
{
  "divisionId": "958ee96f-12c6-4684-928c-7119ad7090ab",
  "firstRevision": 3,
  "secondRevision": 2,
  "status": "DONE",
  "isUpToDate": true,
  "calculatedAt": "2016-10-19T09:05:39.8138934",
  "calculatedBy": {
    "id": "7c555899-5a5f-44d1-930e-284930678bed",
    "email": "user@allplan.com"
  },
  "inserted": [ ... ],
  "deleted": [ ... ],
  "changedGeometry": [ ... ],
  "changed": [ ... ]
}
 
NOTE :  Properties "inserted", "deleted", "changedGeometry" and "changed", all returns array of objects, e.g. :
 
{                                                             
 "comparisonObjectId": "870c9ced-63fb-4fdf-beaf-ebd19507c072",
 "first": { 																									
 "id": "3a2d82dc-325c-4369-a083-02e3535d850d", 								
 "type": "Beam", 																							
           "name": "Beam_1TestWall-01" 																					
 },A"
                                                            }
 "second":  { 																									
 "id": "3a2d82dc-325c-4369-a083-02e3535d850d",                
 "type": "Beam",                        }
                      
 "name": "Beam_1-01"            }
                        ]
      
 }     }
}


                                                       


 


JSON Structure:

Name

Mandatory / Optional

Type

Description

divisionId string(guid)The id of the model
firstRevision inthigher revision number between whose the calculation was done
secondRevision intlower revision number between whose the calculation was done
status stringCan be "DONE" => ok, or "PENDING" => calculation was not yet completed

isUpToDate

 

bool

Should be be true.

False means that the model was changed after the revision comparison was calculated, so the revision comparison is not actual, and it will be better to recalculate again with POST (see api call above)

calculatedAt

 

string (date)

The date and time of the calculation

calculatedBy string (user)The user which performed the calculation
inserted objectsObjects that exists only in in first (higher) revision but not in the second
deleted objects

Objets that exist only in the second (lower) revision, but are already deleted in the first (higher) revision

changedGeometry objects Objects that exists in both revisions, but with different geometry 
changed objects Objects that exist in both revisions, have identical geometry, but some other properties are changed, (objects identical in both revisions are not present in this response)

 

NOTE : Properties "inserted", "deleted", "changedGeometry" and "changed", all returns will contain array of comparison objects, with following properties:

comparisonObjectId string(guid)id of the comparison object
first object

Object from revision with higher revision number. This object is not present in the "deleted" list.

Object has following properties:

  • id of the compared element ("id")
  • element type name ("type")
  • element name ("name")
second object

Object from revision with lower revision number. This object is not present in the "inserted" list.

Object has following properties:

  • id of the compared element ("id")
  • element type name ("type")
  • element name ("name")



...