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,
      "thumbnail": "<string>",
      "user": "<string>",
      "institution": "<string>",
      "account_shared": true,
      "file_summary": "<string>",
      "file_title": "<string>",
      "file_url": "<string>",
      "tokens_used": 123,
      "is_public": false,
      "is_private": false,
      "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",
      "vaultHealthScore": 123,
      "fileOnDisk": true,
      "owner_data": {
        "email": "jsmith@example.com",
        "fname": "<string>",
        "lname": "<string>",
        "institution": "<string>"
      },
      "institution_data": {
        "name": "<string>",
        "ainame": "<string>"
      },
      "institution_name": "<string>",
      "institution_display_name": "<string>",
      "index": 123,
      "collection": "<string>",
      "collection_path": [
        {
          "_id": "<string>",
          "name": "<string>",
          "color": "<string>"
        }
      ]
    }
  ],
  "total": 123,
  "hasMore": true,
  "page": 123,
  "pageSize": 123,
  "vaultCounts": {
    "personal": {
      "total": 123,
      "active": 123
    },
    "instance": {
      "total": 123,
      "active": 123
    },
    "account": {
      "total": 123,
      "active": 123
    }
  }
}

Documentation Index

Fetch the complete documentation index at: https://docs.praxis-ai.com/llms.txt

Use this file to discover all available pages before exploring further.

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
enum<string>

Filter by status. Real DB values (inactive/selected/active/error/deleted) match exactly. Pseudo-values:

  • excluded: expands to status $nin:['selected','deleted']
  • processing: matches ingestion.phase ∈ {extract, chunk, sanitize, embed, kag} AND status $ne:'deleted'. Use this to surface files currently mid-ingestion regardless of their literal status (in-flight files usually carry status:'inactive' until the pipeline finishes). When omitted, defaults to $ne:'deleted'.
Available options:
inactive,
selected,
active,
error,
deleted,
excluded,
processing

Case-insensitive regex search term applied to originalname

uploadId
string

Return only the upload with this specific ID

uploadIds
string[]

Batch fetch — return only uploads whose _id is in this list. Capped to 50. Used by the UI to poll in-flight ingestion uploads without re-running the full list query.

Maximum array length: 50
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
includeCollectionFiles
boolean

When true, includes files that belong to a vault-scoped collection in the results. Default false — files in collections are excluded from root vault listings to avoid duplicates with the CollectionStrip render. Auto-bypassed (treated as true) for the attention filters status: 'processing' and status: 'error' so the user can see every file needing attention from the vault root, regardless of its container.

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)