Versions Compared

Key

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

...

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
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": [ ... ]
}
 
NOTE :  Properties                                                       

The properties "inserted",

"deleted",

"changedGeometry"

and

"changed" will contain array of objects in following format:

Code Block
borderColorRed
themeFadeToGrey
langxml
titleThe comparison objects in response JSON has following format :
, all returns array of objects, e.g. :
 
{                                                             
 "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"                                          
 }                                                            


 

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 array of 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")