Skip to main content
POST
/
api
/
user
/
uploads
curl --request POST \
  --url https://pria.praxislxp.com/api/user/uploads \
  --header 'Content-Type: application/json' \
  --header 'x-access-token: <api-key>' \
  --data '
{
  "lean": true,
  "status": {
    "$ne": "deleted"
  },
  "fileNameSearch": "report"
}
'
{
  "success": true,
  "data": [
    {
      "_id": "<string>",
      "filename": "<string>",
      "originalname": "<string>",
      "mimetype": "<string>",
      "created": "2023-11-07T05:31:56Z",
      "filesize": 123,
      "status": "inactive",
      "thumbnail": "<string>",
      "user": "<string>",
      "institution": "<string>",
      "account_shared": true,
      "file_summary": "<string>",
      "file_title": "<string>",
      "file_url": "<string>",
      "tokens_used": 123,
      "is_private": true,
      "file_dimensions": "<string>",
      "file_authors": "<string>",
      "embeddings_model": "<string>",
      "summary_model": "<string>",
      "image_analysis_model": "<string>",
      "googleDriveFileId": "<string>",
      "googleDriveModifiedTime": "2023-11-07T05:31:56Z",
      "ragHitCount": 0,
      "lastRagHitAt": "2023-11-07T05:31:56Z",
      "garbageScore": 123,
      "owner_data": {
        "email": "jsmith@example.com",
        "fname": "<string>",
        "lname": "<string>",
        "institution": "<string>"
      },
      "institution_data": {
        "name": "<string>",
        "ainame": "<string>"
      },
      "index": 123
    }
  ],
  "total": 123,
  "hasMore": true,
  "page": 123,
  "pageSize": 123,
  "vaultCounts": {
    "personal": {
      "total": 123,
      "active": 123
    },
    "instance": {
      "total": 123,
      "active": 123
    },
    "account": {
      "total": 123,
      "active": 123
    }
  }
}

Authorizations

x-access-token
string
header
required

JWT token passed in x-access-token header

Body

application/json
lean
boolean

When true, omits file_summary, filename, file_authors, mimetype, owner_data, and institution_data

compact
boolean

When true, omits file_title, file_summary, thumbnail, owner_data, and institution_data

all
boolean

When true, retrieves uploads from all institution members instead of just the current user (requires institution to be set)

status

Filter by status. If omitted, defaults to {$ne: "deleted"}

Case-insensitive regex search term applied to originalname

uploadId
string

Return only the upload with this specific ID

vault
enum<string>

Filter by vault type. personal: user-owned files with no institution. instance: institution files that are not account-shared. account: account-shared files across all institutions.

Available options:
personal,
instance,
account
institution
string

Institution ID to scope the query. Used with vault or all to target a specific institution.

page
integer
default:1

Page number for pagination (1-based)

Required range: x >= 1
pageSize
integer
default:25

Number of items per page (clamped to 1-50)

Required range: 1 <= x <= 50
sortAscending
boolean
default:false

When true, sorts in ascending order; otherwise descending

nameOrder
boolean

When truthy, sorts by created date instead of the default case-insensitive originalname sort

sortBy
enum<string>

Sort field. When provided, overrides nameOrder. ragHitCount sorts by usage count, lastRagHitAt sorts by recency of RAG matches (nulls first when ascending).

Available options:
ragHitCount,
lastRagHitAt
includeCounts
boolean

When true, appends a vaultCounts object to the response with total and active counts per vault (personal, instance, account)

Response

Successfully retrieved user uploads

success
boolean
required

Whether the request succeeded

data
object[]
required

Array of upload records for the requested page

total
integer
required

Total number of matching uploads across all pages

hasMore
boolean
required

Whether more pages exist beyond the current page

page
integer
required

Current page number (mirrors the request value)

pageSize
integer
required

Items per page used (mirrors the resolved request value)

vaultCounts
object

Vault-level counts (only present when includeCounts: true)