GET
/
files
/
{path}
Read file or get metadata
curl --request GET \
  --url https://api.openfiles.ai/functions/v1/api/files/{path} \
  --header 'x-api-key: <api-key>'
{
  "success": true,
  "data": {
    "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "path": "<string>",
    "content": "<string>",
    "version": 123,
    "mimeType": "<string>",
    "size": 123,
    "createdAt": "2023-11-07T05:31:56Z",
    "updatedAt": "2023-11-07T05:31:56Z"
  },
  "operation": "read_file",
  "message": "File read successfully"
}

Authorizations

x-api-key
string
header
required

API key for authentication. Get your API key from the console.

Path Parameters

path
string
required

File path (S3-style, no leading slash)

Query Parameters

version
integer

Specific version to read

Required range: x >= 1
metadata
enum<string>

Get file metadata instead of content

Available options:
versions
enum<string>

List all versions of the file

Available options:
limit
integer
default:10

Limit for versions listing

Required range: 1 <= x <= 100
offset
integer
default:0

Offset for versions listing

Required range: x >= 0

Response

200
application/json

Success

The response is of type object.