Read the Drive client configuration
const url = 'https://work.optidata.cloud/api/drives/config.json';const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url https://work.optidata.cloud/api/drives/config.json \ --header 'Authorization: Bearer <token>'Bootstrap configuration for a Drive client: the numeric drive id, upload limits, the node types and permission constants the server recognises, and which Drive actions are denied to the caller by company policy.
Read drive.id from here instead of hard-coding the {drive} path
parameter. The exact set of keys evolves with the product, so treat the
document as an open object and read only the keys you need.
Authorizations
Section titled “Authorizations”Responses
Section titled “ Responses ”Client configuration for the calling user.
Open configuration document.
object
true when the caller’s company policy denies use of Drive
altogether.
object
Which Drive actions are denied to the caller, keyed by action name.
object
Examples
{ "is_restricted": false, "permissions": { "deny": { "download_content": false, "update_content": false, "share_link": true, "share_users_and_groups": false } }}Missing, malformed or expired authentication key.
Authentication failures use an error key rather than message.
object
Examples
No bearer token sent
{ "error": "JWT passport exception: Missing bearer token in request"}Rate limit exceeded. Retry after the window resets.
Generic error envelope used by policy, binding and framework failures.
object
Human-readable description of the failure.
Examples
{ "message": "Too Many Attempts."}