Files API in Wasabi AiR

Prev Next

Files generated during harvest, such as thumbnails, can be accessed using the Files API.

Getting a File

To get a file, request it by its path:

GET /api/files/{path}
  • {path} - (string) The path of the file to retrieve.

Response

The response will be the file. For more detail on retrieving the thumbnail image associated with an item that has been harvested, see the Thumbnails API.

Requirements

Wasabi AiR requires that you host your own files API and database backup in your Wasabi account. In Wasabi Console, you must create:

  • Dedicated bucket

  • IAM policy

  • Programmatic user

Instructions are provided below.

Creating a Dedicated Bucket

Follow the steps in Creating a Bucket to create the Files API bucket. Be sure to set:

  • Bucket Name: Use the naming convention file-api-organization name.

  • Region: Select the region closest to the Wasabi AiR deployment. (This information will be provided by the Wasabi AiR Team. Currently, all deployments are in us-east-2.)

  • Properties: Enable bucket versioning.

Creating an IAM Policy

Follow the steps in Creating a Policy to create the Files API policy. Be sure to set:

  • Policy name: Provide a name using the convention file-api-organization-policy.

  • Policy Editor: Paste the following script into the Policy Editor.

    {
      "Version": "2012-10-17",
       "Statement": [
         {
           "Effect": "Allow",
           "Action": "s3:*",
           "Resource": [
              "arn:aws:s3:::your-bucket-name/*",
              "arn:aws:s3:::your-bucket-name"
            ]
         },
         {
            "Effect": "Allow",
            "Action": "s3:ListAllMyBuckets",
            "Resource": "*"
         }
       ]
     }

Creating a Programmatic User

Follow the steps in Creating a User to create the Files API user. Be sure to set:

  • Specify user access as Programmatic. 

  • Search your newly created policy name to apply it to the user.

  • Copy and securely store the Access Key and Secret Key. You will need these for Wasabi AiR.