The document library in BIM 360 Field has seen a lot of improvements in recent times including mark up improvements and linking documents, etc. and according to the team - we're not done yet! Last week saw updates to how Document versions are managed in Library and this update also improved the Publish API for importing documents to the library. Let us take a quick look at the most recent updates.
BIM 360 Field now automatically maintains new versions of a document each time a file with a matching name is uploaded to the Project Library folders. This new version of the document keeps the same tags and location links as the older versions. In keeping with our previous behavior, the most recent document will appear in the library thumbnails, in Pushpins view, and on attachments from the Library to issues, tasks, checklists, and equipment. Any markup on attachments or Library will appear over the new version.
All users can browse thumbnails of previous versions (click on the thumbnail for a preview) and see when each version was uploaded (along with the document's tags and locations) as shown in the below figure.
Document managers can remove versions by clicking the Delete icon next to the currently selected version.
Updates to Publish API:
When using the Publish API, in the past users had to decide whether to use a "replace =1" parameter to force replacing an existing document with a newer version. Or else the filename had to be unique in the directory for the call to successfully upload.
With the recent update, the Publish API is now consistent with the upload functionality from UI (in-product). If a file with the same name in a folder is being uploaded then the systems checks if the contents are the same then we skip and don’t do anything, otherwise we create a new version of the file and all associated data (file links, locations, document references, pushpins) will be linked with the new version. (Replace parameter is now ignored.) If document_id is provided, then it will create a version irrespective of the existing file contents or name.
Example of publishing a revision (using CURL):
Return: JSON - Returns either the new document's, or the new revision's metadata.
- project_id : string - The ID of the project to publish the document to.
- ticket : string - Authentication token. Must be acquired from a call to /api/login
- directory : string - The directory to publish the document into.
- filename : string - The name of the file to publish
- Filedata : binary - The contents of the published document. The parameter may optionally be referred to as "file".
- document_id : (Optional) string - If specified, a new revision of document_id will be created (regardless of the name/path).
- tags : (Optional) string - A set of comma separated tags which can be used to categorize this document.
- caption : (Optional) string - A caption for the document.
Those who worked with the Publish API in the past would note that the recall parameter is ignored now.
To learn more about the Library Improvements, please visit the "New in BIM 360 Field" page.