Get Started With the File Management API

Discover how to easily manage your files and collections with the File Management API.

Employee App
Front Door Intranet

The File Management API offers a range of methods to streamline file management tasks on your platform, such as adding files to your File Manager and creating, updating, or deleting collections. Whether you need to import assets from an external source, set up files for a new editor, or manage collections centrally as an administrator, the File Management API makes it simple and efficient.

This guide will help you get started with adding files and managing collections using the File Management API.

Prerequisites

  • You have a good understanding of how File Manager and Collections work on your platform. Learn more.
  • You have the Collections feature activated on your platform.
  • You have uploaded the files you want to add to the File Manager using the Media API. Learn more.
  • You have generated an API token with editorial access via the Staffbase Studio. Learn more.

Overview of creating a collection to manage your files

A simple workflow for creating a collection and adding files to it in a nutshell.

Manage File With Collections
  1. Add a file, that was previously uploaded to the platform via Media API, to the File Manager by sending the POST request to /medialibrary/entries/{mediumId}
  2. Create a collection by sending the POST request to /medialibrary/collections by providing the collection name and who can access and manage it in the request body
  3. Add files to a collection by sending the POST request to /medialibrary/collections/{collectionId}/entries
  4. Optionally, get the list of files added to the collection by sending the GET request to /medialibrary/collections/{collectionId}/entries

Overview of managing collections

A simple workflow for managing collections. Most steps are optional and you can use them according to your requirements.

Managing Collection
  1. Get the details of a collection by sending the GET request to /medialibrary/collections/{collectionId}
  2. Update a collection by sending the PUT request to /medialibrary/collections/{collectionId} by providing the collection name and who can access and manage it in the request body
  3. List all the files in a collection by sending the GET request to /medialibrary/collections/{collectionId}/entries and see which files you want to remove or add
  4. Remove files by sending the POST request to /medialibrary/collections/{collectionId}/entries/delete
    Or
    Add files by sending the POST request to /medialibrary/collections/{collectionId}/entries

For request and response samples, see the File Management API.