Data Management

Metadata API | Files Library

Summary

Hey there! In this guide, I'll walk you through how to use the powerful Metadata API to manage your files library in Xano programmatically. Whether you're a no-code enthusiast, citizen developer, traditional developer, or part of a startup/small business, this API unlocks new possibilities for streamlining your workflow and keeping your files library organized.

Uploading a File

Let's start by uploading a file to your Xano workspace using the Metadata API:

  1. Head over to the Metadata API documentation and navigate to the "Upload File" endpoint.
  2. Click "Try it out" and provide your workspace ID.
  3. Choose the file you want to upload and select the appropriate file type (e.g., image, document).
  4. Click "Execute" to initiate the upload process.

Once the upload is successful, you can check your Xano workspace's Files Library, and you'll see the newly uploaded file.

Listing Files

Instead of navigating to the Files Library, you can use the "List Files" endpoint to retrieve a list of all files in your workspace programmatically:

  1. In the Metadata API documentation, navigate to the "List Files" endpoint.
  2. Click "Try it out" and provide your workspace ID.
  3. Optionally, you can specify the page number, search for specific files, or sort/filter the results.
  4. Click "Execute" to retrieve the list of files.

The API response will contain the details of the files in your workspace, making it easier to manage them programmatically.

Deleting Files

One of the highly requested features is the ability to programmatically delete files from your Xano Files Library. The Metadata API has got you covered:

  1. In the Metadata API documentation, navigate to the "Delete File" endpoint.
  2. Click "Try it out" and provide your workspace ID and the file ID of the file you want to delete.
  3. Click "Execute" to initiate the deletion process.

After executing the request, you can check your Xano workspace's Files Library, and the file will be removed.

Bulk Deleting Files

If you need to delete multiple files at once, the Metadata API offers a "Bulk Delete Files" endpoint:

  1. In the Metadata API documentation, navigate to the "Bulk Delete Files" endpoint.
  2. Click "Try it out" and provide your workspace ID and the file IDs of the files you want to delete (separated by commas).
  3. Click "Execute" to initiate the bulk deletion process.

This endpoint allows you to streamline the process of keeping your Files Library lean and organized by removing unnecessary files in a single API call.

By leveraging the power of the Metadata API, you can programmatically manage your Xano Files Library, ensuring optimal organization and efficiency. Whether you're a no-code enthusiast, citizen developer, traditional developer, or part of a startup/small business, this API empowers you to streamline your workflow and focus on building amazing applications.

If you have any questions or need further assistance, feel free to reach out to the Xano support team via the support chat or join the Xano community forum. Happy coding (or no-coding)!

This transcript was AI generated to allow users to quickly answer technical questions about Xano.

Was this helpful?

I found it helpful

I need more support
Sign up for XanoSign up for Xano

Build without limits on a secure, scalable backend.

Unblock your team's progress and create a backend that will scale for free.

Start building for free