-
Notifications
You must be signed in to change notification settings - Fork 4
Comparison between Speckle Diff API Endpoint & AEC∆ Spec
Paul Poinet edited this page Feb 4, 2020
·
12 revisions
http://3drepo.github.io/3drepo.io/
https://speckleworks.github.io/SpeckleSpecs/
Diffing in speckle operates at an object collection level (speckle stream).
OpenAPI specification: link (source)
Anatomy:
https://hestia.speckle.works/api/streams/{streamId_A}/diff/{streamId_B})
^ ^
| |
"Revision 4" "Revision 2"
eq. "inA" eq. "inB"
It produces this response:
{
"success": true,
"objects": {
"common": [
"5d2e090831e15e1c74db6be0", // objectIds
"5d2e090831e15e1c74db6be1"
],
"inA": [
"5d2e091b5586481bfb9cdbfa", // objectIds
"5b058bcd49b3520b9a4701ba",
// ...
],
"inB": [
"5d2e090831e15e1c74db6bdf", // objectIds
"5d2e090831e15e1c74db6be2"
]
},
// ...
}
Equivalences with the current delta spec:
{
"project_id": n/a,
"created": inB,
"deleted": inA,
"updated": common,
"version": {
from: streamId_A,
to: streamId_B
},
}
Revision_A:
Revision_B:
Diffing between Revision_A and Revision_B:
The diffing response (between Revision_A and Revision_B) as specified in the REST API has been implemented here. Calling http://{server.com}/api/streams/{streamId}/delta/{streamId}
produces the following response:
{
"success": true,
"revision_datetime": "2/4/2020, 4:15:41 PM",
"autor": {
"name": "Paul",
"surname": "Poinet",
"_id": "5dfa34188b094663fcd94381",
"email": "[email protected]",
"company": "UCL"
},
"delta": {
"created": [530 items],
"deleted": [],
"common": [3401 items]
},
"revision_A": {
"id": "Zt0Jg36lp",
"updatedAt": "2/4/2020, 3:08:00 PM",
"sender": "Grasshopper"
},
"revision_B": {
"id": "F9UVibS-C",
"updatedAt": "2/4/2020, 3:08:00 PM",
"sender": "Grasshopper"
}
}