Librarian API

The Librarian API provides REST endpoints that you can use to manage the spaces, folders, and files that comprise Librarian, which is the document management system for BarTender Cloud.

By default, every Librarian repository comes with two spaces: “Main,” which is intended for typical document storage, and “$temp,” which is a hidden space that is intended for temporary files.

Temporary files are automatically deleted after approximately a month has passed. If the “$temp” space begins to run low on storage, it might proactively delete files that are less than a month old to make more storage available.

Note: For more information, you can view the API reference by using ReDoc. In ReDoc, you can expand the items in the left navigation pane and then scroll to find the commands that you want. You can copy each command to your development environment and customize it as needed. To view the API reference in ReDoc, enter the following URL in the browser address bar:

https://am1.bartendercloud.com/api/librarian_reference/redoc

The following Librarian APIs are available.

ClosedConfiguration

The Configuration API includes commands that you can use to get configuration information for all spaces and to update the space configuration.

When you configure Librarian spaces, you can customize your experience with them. This can include using file path aliases to simplify lengthy content URIs.

Action

Command

Description

Get the Current Configuration Settings

Gets the current configuration settings.

Update the Current Configuration Settings

Updates the current configuration settings.

ClosedFiles

The Files API includes commands that you can use to create, update, delete, and otherwise manage your files and their associated permissions, attachments, properties, and metadata.

Action

Command

Description

Add a File

Adds a file.

Add a Temporary File

Creates a temporary file in a specified location in Librarian.

Add a Temporary File by Path

Creates a temporary file in a specified location in Librarian. The location is specified by the file path.

Update a File

Updates a file.

Check Out a File

Checks out a file.

Clone a File

Clones a file.

Copy a File

Copies a file.

Move a File

Moves a file and all of its associated versions from one folder to another.

Hide or Show a File

Hides or shows a file.

Rename a File

Renames a file.

Delete a File

Deletes a file.

Restore a Deleted File

Restores a deleted file.

Revert a File

Reverts a file.

Purge a File

Purges a file.

Search All Files

Searches all files.

Add a File Attachment

Adds a file attachment.

Update a File Attachment

Updates an existing file attachment.

Rename a File Attachment

Renames a file attachment.

Delete a File Attachment

Deletes a file attachment.

Get an Attachment's Content

Gets the content of a file attachment.

Get a File's Content

Gets the content of a file.

Get a File's Content by the File Path

Gets the content of a file by using the file path.

Get a File's Metadata

Gets the metadata for a file.

Get a File's Metadata by the File Path

Gets metadata for a file by using the file path.

Get a Metadata Item's Value

Gets the value of a metadata item.

Add a Metadata Item

Adds a metadata item.

Update a Metadata Item

Updates a metadata item.

Remove All Metadata Items

Removes all metadata items.

Remove a Metadata Item

Removes a metadata item.

Get a File's Permissions

Gets a file's permissions.

Get a File's Permissions by the File Path

Gets a file's permissions by using the file path.

Get File Permissions for the Calling User

Gets the file permissions for the calling user.

Update a File's Permissions

Updates the permissions that are explicitly applied to a target file version.

Get a File's Properties

Gets a file's properties.

Get a File's Properties by the File Path

Gets a file's properties by using the file path.

 

ClosedFile Changes

The File Changes API includes commands that you can use to retrieve file changes and create and update file change comments.

Action

Command

Description

Get a Collection of File Changes

Gets the changes that are associated with a file.

Update a File Change Comment

Updates a file change comment.

Create a File Change Comment

Creates a new file change comment.

 

ClosedFolders

The Folders API includes commands that you can use to create, update, delete, and otherwise manage your folders and their associated permissions, properties, and metadata.

Action

Command

Description

Create a Folder

Creates a new folder.

Update a Folder

Updates an existing folder.

Rename a Folder

Renames an existing folder.

Restore a Folder

Restores a folder that was previously deleted.

Copy a Folder to Another Folder

Copies a folder to another folder.

Move a Folder to Another Folder

Moves a folder to another folder.

Delete a Folder

Deletes a folder.

Get a Folder by the Folder ID

Gets a folder by using the folder ID.

Get a Folder's Properties by the Folder Path

Gets the properties of a folder by using the folder path.

Get the Folder Hierarchy

Gets the folder hierarchy for a specified folder.

Search All Folders

Searches all folders that match the user-provided criteria.

Get a Folder's Permissions

Gets the permissions that are associated with a folder.

Get a Folder's Permissions by the Folder Path

Gets permissions for a folder by using the folder path.

Get Folder Permissions for the Calling User

Gets the permissions that are associated with a folder for a specific user.

Update a Folder's Permissions

Updates a folder's permissions.

Get a Folder's Metadata

Gets the metadata for a folder.

Get a Folder's Metadata by the Folder Path

Gets the metadata for a folder by using the folder path.

Add a Metadata Item

Adds a metadata item for a folder.

Get a Metadata Item's Value

Gets the value of a metadata item for a folder.

Update a Metadata Item

Updates a metadata item for a folder.

Remove a Metadata Item

Removes a metadata item for a folder.

Remove All Metadata Items

Removes all of the metadata items for a folder.

 

ClosedItems

The Items API includes commands that you can use to list or purge (permanently delete) files, folders, and subfolders.

Action

Command

Description

List Items by Folder ID

Lists items in a folder by using the folder ID.

List Items by Folder or File Path

Lists items in a folder by using the folder or file path.

Purge Items by Folder ID

Purges items in the target folder by using the folder ID.

 

ClosedSpaces

The Spaces API includes commands that you can use to retrieve and update space information, properties, and permissions.

Action

Command

Description

Get All Spaces

Gets all spaces.

Get a Space's Properties by the Space Name

Gets a space's properties by name.

Get a Space's Properties

Gets a space's properties.

Update a Space

Updates a space.

Get a Space's Permissions

Gets the permissions for a space.

Update a Space's Permissions

Updates the permissions for a space.