Revision Service
- Create a new revision or update/overwrite a model
- Get the list of revisions of a model
- Get the info about a revision
- Update a revision
- List of APIs for retrieving info from a particular revision (3D objects, attachments etc)
- Calculate revisions comparison of the model
- Get calculated comparison of revisions of the model
Revision Service
Use this service for creating revisions of models or attachments.
Create a new revision or update/overwrite a model
URL: https://api-stage.bimplus.net/v2/<team_slug>/divisions/<id>/revisions
Example: https://api-stage.bimplus.net/v2/bimplus/divisions/00b54edd-c84c-4bd2-a08c-c93d1f28907a/revisions
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 |
divisionId | will be ignored | string (guid) | Id of the model |
revisionNr | will be ignored | int | Revision number |
created | will be ignored | string (date) | Creation date |
createdBy | will be ignored | user object | The user who created it |
changed | will be ignored | string (date) | Modification date |
changedby | will be ignored | user object | The user who did the modification |
applicationId | will be ignored | string (guid) | The id of the application |
inputType | optional | string | Type of upload (eg: "IFC_IMPORT") |
Note: The import/upload is always done only for the latest revision.
Authorization: BimPlus 9c1874a62c974dcfa75e0132c423a088 Content-Type: application/json
{ "name": "Ballo.ifc" }
Status: 201 Created
{ "id": "d2d39bca-051e-48fa-ba23-4845087a071c", "name": "Ballo.ifc", "description": "", "projectId": "e31c3480-5633-4506-b717-8dd97c0f0ab3", "divisionId": "00b54edd-c84c-4bd2-a08c-c93d1f28907a", "revisionNr": 6, "created": "2015-11-03T11:13:27.2", "createdby": { "id": "71e0ac3b-fa49-e540-ac2f-8caff3dd72ed", "email": "jayaraj.purushothaman@gmail.com" }, "changed": "2015-11-03T11:13:27.2", "changedby": { "id": "71e0ac3b-fa49-e540-ac2f-8caff3dd72ed", "email": "jayaraj.purushothaman@gmail.com" }, "applicationId": "0106c8ba-ad46-7c08-e26f-026852cb7525", "inputType": "IFC_IMPORT" }
Get the list of revisions of a model
URL: https://api-stage.bimplus.net/v2/ <team_slug>/divisions/<id>/revisions
Example: https://api-stage.bimplus.net/v2/bimplus/divisions/00b54edd-c84c-4bd2-a08c-c93d1f28907a/revisions
Authorization: BimPlus 9c1874a62c974dcfa75e0132c423a088 Content-Type: application/json
Status: 200 OK
[ { "id": "d2d39bca-051e-48fa-ba23-4845087a071c", "name": "Ballo.ifc", "description": "", "projectId": "e31c3480-5633-4506-b717-8dd97c0f0ab3", "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": "2015-11-03T11:13:36", "changedby": { "id": "71e0ac3b-fa49-e540-ac2f-8caff3dd72ed", "email": "jayaraj.purushothaman@gmail.com" }, "applicationId": "0106c8ba-ad46-7c08-e26f-026852cb7525", "topologyId": "abef74ce-869d-4c6f-9fbc-e8b6102cbb4a", "inputType": "IFC_IMPORT" }, { "id": "314075f5-2eaa-409f-a5b2-2de9a9b3f1a0", "name": "Ballo.ifc", "description": "", "projectId": "e31c3480-5633-4506-b717-8dd97c0f0ab3", "divisionId": "00b54edd-c84c-4bd2-a08c-c93d1f28907a", "revisionNr": 5, "created": "2015-11-02T16:09:51", "createdby": { "id": "71e0ac3b-fa49-e540-ac2f-8caff3dd72ed", "email": "jayaraj.purushothaman@gmail.com" }, "changed": "2015-11-02T16:09:54", "changedby": { "id": "71e0ac3b-fa49-e540-ac2f-8caff3dd72ed", "email": "jayaraj.purushothaman@gmail.com" }, "applicationId": "0106c8ba-ad46-7c08-e26f-026852cb7525", "topologyId": "abef74ce-869d-4c6f-9fbc-e8b6102cbb4a", "inputType": "IFC_IMPORT" }, { "id": "4566ccbb-e9d1-4deb-a0ef-72b6847c050e", "name": "Ballo.ifc", "description": "", "projectId": "e31c3480-5633-4506-b717-8dd97c0f0ab3", "divisionId": "00b54edd-c84c-4bd2-a08c-c93d1f28907a", "revisionNr": 4, "created": "2015-11-02T16:00:46", "createdby": { "id": "71e0ac3b-fa49-e540-ac2f-8caff3dd72ed", "email": "jayaraj.purushothaman@gmail.com" }, "changed": "2015-11-02T16:00:55", "changedby": { "id": "71e0ac3b-fa49-e540-ac2f-8caff3dd72ed", "email": "jayaraj.purushothaman@gmail.com" }, "applicationId": "0106c8ba-ad46-7c08-e26f-026852cb7525", "topologyId": "abef74ce-869d-4c6f-9fbc-e8b6102cbb4a", "inputType": "IFC_IMPORT" }, { "id": "c913054e-b4c2-44e8-8e92-602f6c9256ce", "name": "Ballo.ifc", "description": "", "projectId": "e31c3480-5633-4506-b717-8dd97c0f0ab3", "divisionId": "00b54edd-c84c-4bd2-a08c-c93d1f28907a", "revisionNr": 3, "created": "2015-11-02T15:53:49", "createdby": { "id": "71e0ac3b-fa49-e540-ac2f-8caff3dd72ed", "email": "jayaraj.purushothaman@gmail.com" }, "changed": "2015-11-02T15:54:18", "changedby": { "id": "71e0ac3b-fa49-e540-ac2f-8caff3dd72ed", "email": "jayaraj.purushothaman@gmail.com" }, "applicationId": "0106c8ba-ad46-7c08-e26f-026852cb7525", "topologyId": "abef74ce-869d-4c6f-9fbc-e8b6102cbb4a", "inputType": "IFC_IMPORT" }, { "id": "7806506b-d506-46a2-8d18-a7addb196e1d", "name": "Model revision", "projectId": "e31c3480-5633-4506-b717-8dd97c0f0ab3", "divisionId": "00b54edd-c84c-4bd2-a08c-c93d1f28907a", "revisionNr": 2, "created": "2015-06-18T13:23:03", "createdby": { "id": "71e0ac3b-fa49-e540-ac2f-8caff3dd72ed", "email": "jayaraj.purushothaman@gmail.com" }, "changed": "2015-06-18T13:23:14", "changedby": { "id": "71e0ac3b-fa49-e540-ac2f-8caff3dd72ed", "email": "jayaraj.purushothaman@gmail.com" }, "applicationId": "a1621259-a32f-e517-d0cb-aba5f07e5ffa", "topologyId": "abef74ce-869d-4c6f-9fbc-e8b6102cbb4a", "inputType": "IFC_IMPORT" }, { "id": "a94c9494-a32c-4bfa-b8ac-a1aebb78b5fe", "name": "m1", "projectId": "e31c3480-5633-4506-b717-8dd97c0f0ab3", "divisionId": "00b54edd-c84c-4bd2-a08c-c93d1f28907a", "revisionNr": 1, "created": "2015-06-18T13:14:51", "createdby": { "id": "71e0ac3b-fa49-e540-ac2f-8caff3dd72ed", "email": "jayaraj.purushothaman@gmail.com" }, "changed": "2015-06-18T13:14:51", "changedby": { "id": "71e0ac3b-fa49-e540-ac2f-8caff3dd72ed", "email": "jayaraj.purushothaman@gmail.com" }, "applicationId": "a1621259-a32f-e517-d0cb-aba5f07e5ffa", "topologyId": "7a7a68c9-a26c-4cd9-84d9-96af4e86c0d1", "inputType": "IFC_IMPORT" } ]
Get the info about a revision
URL: https://api-stage.bimplus.net/v2/<team_slug>/revisions/<id>
Example: https://api-stage.bimplus.net/v2/bimplus/revisions/d2d39bca-051e-48fa-ba23-4845087a071c
Authorization: BimPlus 9c1874a62c974dcfa75e0132c423a088 Content-Type: application/json
Status: 200 OK
{ "id": "d2d39bca-051e-48fa-ba23-4845087a071c", "name": "Ballo.ifc", "description": "", "projectId": "e31c3480-5633-4506-b717-8dd97c0f0ab3", "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": "2015-11-03T11:13:36", "changedby": { "id": "71e0ac3b-fa49-e540-ac2f-8caff3dd72ed", "email": "jayaraj.purushothaman@gmail.com" }, "applicationId": "0106c8ba-ad46-7c08-e26f-026852cb7525", "inputType": "IFC_IMPORT" }
Update the revision info
URL: https://api-stage.bimplus.net/v2/<team_slug>/revisions/<revision_id>
Example: https://api-stage.bimplus.net/v2/bimplus/revisions/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 |
divisionId | will be ignored | string (guid) | Id of the model |
revisionNr | will be ignored | int | Revision number |
created | will be ignored | string (date) | Creation date |
createdBy | will be ignored | user object | The user who created it |
applicationId | optional | string (guid) | The id of the application |
inputType | optional | string | Type of upload (eg: "IFC_IMPORT") |
Authorization: BimPlus 9c1874a62c974dcfa75e0132c423a088 Content-Type: application/json
{ "name": "updated name" }
Status: 200 OK
{ "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" }
List of APIs for retrieving info from a particular revision (3D objects, attachments etc)
Please note that all resources(eg: objects, attachments etc) of a model revision can be accessed using the revision query string(i.e "?revision=<revisionNr>")
eg: GET /<TeamSlug>/objects/<ObjectID>/disciplines/<DisciplineID>/geometries/threejs?revision=2
GET /<TeamSlug>/objects/<ObjectID>/attachments?revision=2
Calculate revisions comparison of the model
URL: https://api-stage.bimplus.net/v2/<team_slug>/divisions/<division_id>/revisionscomparison/<higher_revision_number>/<lower_revision_number>
Example: https://api-stage.bimplus.net/v2/bimplus/divisions/00b54edd-c84c-4bd2-a08c-c93d1f28907a/revisionscomparison/5/2
Optional query parameters
Name | Type | Default value | Description |
---|---|---|---|
filter | Guid | null | When "filter={{filterId}}" is defined the API will return only valid object's which meet a conditions of defined filter. |
attributes | String | null | 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. |
selectionobject | Guid | null | When "selectionobject={{selectionObjectId}}" is defined the API will return only object's in selections. |
allChangedAttributes | Boolean | false | When "allChangedAttributes" are true the API will return also changes attributes in object. |
page, pageSize | Int | null | When "page=2&pageSize=3" are set the API will return defined page number (2) with defined number of objects per page (3 objects). |
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.
Authorization: BimPlus 9c1874a62c974dcfa75e0132c423a088 Content-Type: application/json
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
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.
Get calculated comparison of revisions of the model
Resource: divisions/<division_id>/revisionscomparison/<higher_revision_number>/<lower_revision_number>
URL: https://api-stage.bimplus.net/v2/<team_slug>/divisions/<division_id>/revisionscomparison/<higher_revision_number>/<lower_revision_number>
Example: https://api-stage.bimplus.net/v2/bimplus/divisions/00b54edd-c84c-4bd2-a08c-c93d1f28907a/revisionscomparison/5/2
Optional query parameters
Name | Type | Default value | Description |
---|---|---|---|
filter | Guid | null | When "filter={{filterId}}" is defined the API will return only valid object's which meet a conditions of defined filter. |
attributes | String | null | 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. |
allChangedAttributes | Boolean | false | When "allChangedAttributes" are true the API will return also changes attributes in object. |
page, pageSize | Int | null | When "page=2&pageSize=3" are set the API will return defined page number (2) with defined number of objects per page (3 objects). |
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.
Authorization: BimPlus 9c1874a62c974dcfa75e0132c423a088 Content-Type: application/json
Status: 200 OK
{ "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:
{ "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" }
{ "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 | int | higher revision number between whose the calculation was done | |
secondRevision | int | lower revision number between whose the calculation was done | |
status | string | Can 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 | objects | Objects 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:
|
|
second | object | Object from revision with lower revision number. This object is not present in the "inserted" list. Object has following properties:
|