All operations
The 20 operations that an API key can call, by job, with the scope that each one needs.
Each operation's name is its operationId in the OpenAPI file.
A key with the Search scope can call every operation that reads. A key with the Read and write scope can call all of them.
Search
| Operation | Name | Scope | What it does |
|---|---|---|---|
POST /v1/search | search | Search | Returns the passages that answer a question. |
Drives
| Operation | Name | Scope | What it does |
|---|---|---|---|
GET /v1/drives | listDrives | Search | Lists the drives the key reaches. |
GET /v1/drives/{driveId} | getDrive | Search | Gets one drive, with its file counts and status. |
Folders
| Operation | Name | Scope | What it does |
|---|---|---|---|
GET /v1/drives/{driveId}/folders | listFolders | Search | Lists a drive's folders, with the number of documents directly in each. |
POST /v1/drives/{driveId}/folders | createFolder | Read and write | Creates a folder, along with any parent folders it needs. |
POST /v1/drives/{driveId}/folders/move | moveFolder | Read and write | Renames or moves a folder, including its subfolders and their documents. |
DELETE /v1/drives/{driveId}/folders | deleteFolder | Read and write | Deletes a folder that has no documents. |
Documents
| Operation | Name | Scope | What it does |
|---|---|---|---|
GET /v1/drives/{driveId}/documents | listDocuments | Search | Lists a drive's documents, one page at a time. |
GET /v1/documents/{documentId} | getDocument | Search | Gets one document: its name, path, status, revision and tags. |
GET /v1/documents/{documentId}/revisions | listDocumentRevisions | Search | Lists the revisions of a document, newest first. |
POST /v1/documents/{documentId}/read | readDocument | Search | Reads the text of one page, slide, sheet, section, or range. |
GET /v1/documents/{documentId}/content | None | Search | Downloads the original file of the current revision, or of ?revision=N. It returns bytes, so it has no operation name. See Download the original file. |
PUT /v1/drives/{driveId}/documents/by-path | putDocumentInline | Read and write | Adds a small text document, or a new revision of the document at that path. |
PATCH /v1/documents/{documentId}/metadata | updateDocumentMetadata | Read and write | Replaces the tags of a document, renames it or moves it. |
POST /v1/documents/{documentId}/copy | copyDocument | Read and write | Copies a document's current revision into a drive, or moves it there. |
DELETE /v1/documents/{documentId} | deleteDocument | Read and write | Deletes a document and its revisions. |
Uploads
| Operation | Name | Scope | What it does |
|---|---|---|---|
POST /v1/drives/{driveId}/uploads | createUpload | Read and write | Starts an upload of up to 1 GB and returns an address for each part. |
GET /v1/uploads/{uploadId}/parts | listUploadParts | Read and write | Returns more part addresses, or fresh ones after the first ones expire. |
POST /v1/uploads/{uploadId}/complete | completeUpload | Read and write | Completes an upload, which makes the file a document revision. |
Operations
| Operation | Name | Scope | What it does |
|---|---|---|---|
GET /v1/operations/{operationId} | getOperation | Search | Reports the progress of an upload, a delete, or a tag change. |
API key
| Operation | Name | Scope | What it does |
|---|---|---|---|
GET /v1/key | getApiKeyInfo | Search | Returns the key that made the request and the drives it reaches. |
What is not here
The app uses other operations for members, roles, API keys, agent connections, usage, and billing. Those need a person's session in the app and can't be called with an API key, so do that work in the app.