Hi there,
I’m currently working on a process to automatically export diagrams from lucid, to store the artifacts for regulatory purposes. However, I’m not able to marry the versioning observed in the UI and API.
High level overview is quite straight forward:
- User edits a document, (multiple diagrams in different pages)
- User using the ui, names the version
- User triggers tool to export the document
- Tool hits /documents/{id} to obtain:
- Number of pages
- Version
- Tool exports each individual page using same endpoint
- (since only one page can be exported per API call)
- Tool hits /documents/{id} to obtain:
My plan was to be able to confirm that the version of the document I’m fetching is the intended on (i.e. the named revision).
- However, named versions are not shown in the API. And numeric versions are not shown in the UI
- This means I can’t prove that the document I’m exporting is actually the indented one - there is no way to marry them.
- Imagining Alice and Bob:
- Alice updates the diagrams and named the latest document version 1.0 (as you can do in the revision history).
- Bob makes an accidental change, does not name the revision.
- Alice initiates export which includes Bob’s accidental change as the API only regards the latest version. Since there is no way to observe the numeric version in the UI, nor is it possible to observe the named version in the API, Alice can’t confirm the export was what she wanted.
- Imagining Alice and Bob:
- This means I can’t prove that the document I’m exporting is actually the indented one - there is no way to marry them.
- The page export via /documents/{id} doesn’t embed any versioning in the metadata
- Similar issue to the above, but on a more narrow time window, from the moment one obtains the version from /document/{id} endpoint, to running all API calls to export each page, a change could be made before each API call has run. There is no way to verify this.
Is there any way around this?
The only way I see is the following:
- Expose named versions in API or provide a way to show numeric versions in the UI
- Export of pages with image/png or any other format, should embed versions in the produced artifact.
With the current limitations, the API isn’t useful for us.
Thanks