Skip to main content
PATCH
/
api
/
v1
/
contexts
/
{context_key}
Update file context
curl --request PATCH \
  --url https://api.uplint.dev/api/v1/contexts/{context_key} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "max_file_size_mb": 50,
  "allowed_extensions": [
    "pdf",
    "png",
    "jpg",
    "jpeg",
    "docx"
  ]
}
'
{
  "status": "SUCCESS",
  "message": "<string>",
  "data": {
    "context_id": "<string>",
    "context_key": "<string>",
    "tenant_id": "<string>",
    "display_name": "<string>",
    "description": "<string>",
    "allowed_extensions": [
      "<string>"
    ],
    "max_file_size_mb": 123,
    "storage_path_template": "<string>",
    "reject_blank_files": true,
    "reject_corrupt_files": true,
    "scan_for_viruses": true,
    "upload_rate_limit": {
      "max_uploads": 5000,
      "window_seconds": 1800
    },
    "storage_quota_mb": 123,
    "storage_used_bytes": 123,
    "status": "active",
    "metadata": {}
  },
  "timestamp": "2023-11-07T05:31:56Z"
}

Authorizations

Authorization
string
header
required

Pass an API key or JWT token. API keys can be sent as Authorization: Bearer <key> or Authorization: <key>.

Path Parameters

context_key
string
required

The file context's unique key (e.g. patient_reports).

Body

application/json
display_name
string
Required string length: 1 - 255
description
string | null
Maximum string length: 1000
allowed_extensions
string[]
max_file_size_mb
integer
Required range: 1 <= x <= 500
storage_path_template
string | null
Maximum string length: 500
reject_blank_files
boolean
reject_corrupt_files
boolean
scan_for_viruses
boolean
upload_rate_limit
object
storage_quota_mb
integer | null
Required range: 1 <= x <= 10485760
status
enum<string>
Available options:
active,
inactive
metadata
object

Response

File context updated.

status
enum<string>
Available options:
SUCCESS
message
string
data
object
timestamp
string<date-time>