Skip to main content
GET
/
file
/
Get File Upload Info
curl --request GET \
  --url https://server26-dot-royalti-project.uc.r.appspot.com/file/ \
  --header 'Authorization: Bearer <token>'
{
  "success": true,
  "message": "Files retrieved successfully",
  "files": [
    {
      "id": "file-uuid-123",
      "name": "export.csv",
      "originalname": "export.csv",
      "type": "royalty",
      "size": 1024000,
      "mimetype": "text/csv",
      "uploadType": "royalty",
      "status": "processed",
      "royaltySource": "testsource",
      "accountingPeriod": "2017-05-01",
      "salePeriod": "2017-01-01",
      "createdAt": "2024-12-12T10:30:00.000Z",
      "updatedAt": "2024-12-12T10:35:00.000Z",
      "downloadUrl": "https://storage.googleapis.com/royalti-uploads/processed/export.csv"
    }
  ],
  "total": 50,
  "page": 1,
  "size": 10,
  "totalPages": 5
}
Retrieves information about uploaded files with various filtering and pagination options. Query Parameters:
  • q: Search term to filter files by various fields
  • type: Filter files by type (royalty, invoice, receipt, report)
  • column: The column to sort by (createdAt, updatedAt, name, size, type)
  • order: The order of sorting (asc, desc)
  • attributes: Comma-separated list of attributes to include in the response
  • page: The page number for pagination (>= 1)
  • size: The number of records per page (>= 0)

Authentication

This endpoint requires authentication. Include your bearer token in the Authorization header.

Query Parameters

ParameterTypeInRequiredDescription
qstringqueryāŒSearch term to filter files by various fields
typestringqueryāŒFilter files by type
columnstringqueryāŒThe column to sort by
orderstringqueryāŒThe order of sorting
attributesstringqueryāŒComma-separated list of attributes to include
pageintegerqueryāŒThe page number for pagination
sizeintegerqueryāŒThe number of records per page

Responses

āœ… 200 - Success

āš ļø 401 - undefined

āŒ 500 - undefined

Tags

File

Authorizations

Authorization
string
header
required

JWT Authorization header using the Bearer scheme. Format: "Bearer {token}"

Query Parameters

q
string

Search term to filter files by various fields

type
enum<string>

Filter files by type

Available options:
royalty,
invoice,
receipt,
report
column
enum<string>
default:createdAt

The column to sort by

Available options:
createdAt,
updatedAt,
name,
size,
type
order
enum<string>
default:desc

The order of sorting

Available options:
asc,
desc
attributes
string

Comma-separated list of attributes to include

page
integer
default:1

The page number for pagination

Required range: x >= 1
size
integer
default:10

The number of records per page

Required range: x >= 0

Response

Success

success
boolean
default:true
message
string
files
object[]
total
integer
page
integer
size
integer
totalPages
integer
⌘I