Skip to content

GET   /files/{table_name}/{id}

List entity files

List files for an entity.

Access Control

  • Users with entity access
  • Filtered by permissions
  • Includes file metadata

Authentication Required

Authorization: Bearer {token}   header string

This header is required to access this endpoint

Required Parameters

table_name   path string

Entity type

id   path string

Entity ID

Optional Parameters

Click here to view an exhaustive list of all available parameters
additionalKey   query string

An additional key to categorize or organize your file uploads against this entity. ie additional_documents, photos, etc... defaults to __ALL__

Try it out

Loading...

Output:

Responses

Description

Files retrieved

[
{
"id": "string",
"tableName": "string",
"entityId": "string",
"fileName": "string",
"displayName": "string",
"description": "string",
"mimeType": "string",
"size": 0,
"checksum": "string",
"s3Bucket": "string",
"s3Key": "string",
"status": "pending",
"scanStatus": "string",
"metadata": {},
"createdBy": "string",
"updatedBy": "string",
"createdAt": "string",
"updatedAt": "string"
}
]

References

#/components/schemas/FileMetadata

type: object
required:
- id
- tableName
- entityId
- fileName
- mimeType
- size
properties:
id:
type: string
readOnly: true
tableName:
type: string
description: Entity type (e.g., applications, merchants)
entityId:
type: string
description: ID of parent entity
fileName:
type: string
description: Original file name
displayName:
type: string
description: User-friendly name
description:
type: string
mimeType:
type: string
size:
type: integer
description: File size in bytes
checksum:
type: string
description: SHA-256 hash
s3Bucket:
type: string
readOnly: true
s3Key:
type: string
readOnly: true
status:
type: string
enum:
- pending
- available
- deleted
default: pending
scanStatus:
type: string
enum:
- pending
- clean
- infected
readOnly: true
metadata:
type: object
additionalProperties: true
createdBy:
type: string
readOnly: true
updatedBy:
type: string
readOnly: true
createdAt:
type: string
format: date-time
readOnly: true
updatedAt:
type: string
format: date-time
readOnly: true

Route Source Code

Check out the source code for this route entrypoint here: /files/[table_name]/[id]/route.ts

Or the swagger.yaml spec this documentation was generated from: /files/swagger.yaml