Knowledge base
Check file upload capability
Check whether a file can be uploaded based on size and type.
POST /knowledge_base /can_upload
Bearersession
Body
3 fields
·
Reseller keys only: act as one of your clients by its user id. Omit it to act on your own account. [How acting for a client works](/docs/reseller/your-clients/acting-as-clients).
Size in bytes.
File extension. Only pdf is accepted.
curl -X POST 'https://omnidim.io/api/v1/knowledge_base/can_upload' \ -H 'Authorization: Bearer YOUR_API_KEY' \ -H 'Content-Type: application/json' \ -d '{ "user_id": 1234, "file_size": 524288, "file_type": "pdf" }'
Example response
{ "success": true, "message": "File can be uploaded", "quota": { "total": 10, "used": 0, "remaining": 10 } }
BearerAuthheader
AuthorizationBearer <token>Bearer token authentication. Obtain your API key from the OmniDimension dashboard.
application/jsonuser_id?ClientUserIdReseller keys only: act as one of your clients by its user id. Omit it to act on your own account. How acting for a client works.
file_size*integerSize in bytes.
Range
1 <= valuefile_type*stringFile extension. Only pdf is accepted.
Response body
application/jsonUpload capability and quota information.
application/jsonsuccess?booleanmessage?stringquota?Knowledge-base storage quota in megabytes.
Was this page helpful?
