---
title: "Get Workspace Files"
method: GET
path: "/studio/v1/library/files"
tags: ["Library management"]
---

# Get Workspace Files

`GET /studio/v1/library/files`

Get metadata about a specific file by file ID. The file ID is generated by
AI21 when you upload the file.

## Query parameters

- `name` string
- `path` string
- `status` 'DB_RECORD_CREATED' | 'UPLOADED' | 'UPLOAD_FAILED' | 'PROCESSED' | 'PROCESSING_FAILED' — An enumeration.
- `label` string[]
- `limit` integer
- `offset` integer

## Response `200`

Successful Response

- FileResponse[]
  - `fileId` string, uuid, required — The unique identifier of the file, generated by AI21.
  - `name` string, required — The name of the file. This is the local file name from when the file was uploaded. It cannot be modified.
  - `path` string — An arbitrary file-path-like string to indicate the content of a file. This has nothing to do with the location of the file in storage or on disk, and is only another label that you can assign to the file in path-like format to help you organize the contents of the file or filter queries against your files. Example paths might be `pets/fish` or `pets/dogs`. Then, when searching your library, you can filter files by the full path or path prefix. So to search only files in the "dog folder", filter by the path `/pets/dogs`. To search all files in the "pet folder", filter your search by the path `pets/` when searching by path. There isn't a restriction on whether a path must start or end with a / mark, but be consistent in your usage, and all matches are prefix matching, not substring matching. So filtering by `dog/` matches `dog/` and `dog/setter` but not `pets/dog/`.
  - `fileType` string, required — The file type. See the file upload method to learn what file types are supported.
  - `sizeBytes` integer, required — The size of the file, in bytes.
  - `labels` string[] — Any string labels you have associated with the file. You can apply arbitrary string labels to your files and limit queries to files with one or more labels. Similar to paths, but labels do not prefix match. Labels are case-sensitive. There can be a maximum of 20 unique labels per account.
  - `publicUrl` string — The public URL of the file, if any. This URL is not validated by AI21 or used in any way. It is strictly a piece of metadata that you can optionally attach to a file.
  - `createdBy` string, uuid, required — An internal identifier of the user who uploaded the file.
  - `creationDate` string, date, required — The date when the file was uploaded.
  - `lastUpdated` string, date, required — When the file data or metadata was last changed.
  - `status` string, required — File status. One of the following values: "DB_RECORD_CREATED", "UPLOADED", "UPLOAD_FAILED", "PROCESSED", "PROCESSING_FAILED"
  - `dataSource` string

## Other responses

- `422` — Validation Error

---

[API](https://skmtc.net/ai21/apis/ai21-studio-api.md) · [All operations](https://skmtc.net/ai21/apis/ai21-studio-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/ai21/ai21-studio-api/versions/4105747cd57d/schema)
