Versions Compared

Key

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

...

Deck of Cards
idbimCalculateModelRevisionsComparison


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


NameTypeDefault valueDescription
filterGuidnullWhen "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 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


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": {
                                                                        "name": "TestWall-A"
                                                            }
                                                }
                                    }
                        ]
            }
}


                                                       


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", 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")



...