notexOPENOverview
Notex/Systems/APIs
15.05LESSON 05 OF 18 · 1 MIN READ

APIs

Always free to read
SECTION VIDEOAPIs

Video coming soon. Start with the reading below.

COMING SOON

What do the APIs look like? We primary need 3 APIs: upload a file, download a file, and get file revisions.

  1. 1. Upload a file to Google Drive Two types of uploads are supported:
  • Simple upload. Use this upload type when the file size is small.
  • Resumable upload. Use this upload type when the file size is large and there is high chance of network interruption.

Here is an example of resumable upload API: https://api.example.com/files/upload?uploadType=resumable

Params:

  • uploadType=resumable
  • data: Local file to be uploaded.

A resumable upload is achieved by the following 3 steps [2]:

  • Send the initial request to retrieve the resumable URL.
  • Upload the data and monitor upload state.
  • If upload is disturbed, resume the upload.
  1. 2. Download a file from Google Drive Example API: https://api.example.com/files/download

Params:

  • path: download file path. Example params: {

"path": "/recipes/soup/best_soup.txt" }

  1. 3. Get file revisions Example API: https://api.example.com/files/list_revisions

Params:

  • path: The path to the file you want to get the revision history.
  • limit: The maximum number of revisions to return. Example params: {

"path": "/recipes/soup/best_soup.txt", "limit": 20 }

All the APIs require user authentication and use HTTPS. Secure Sockets Layer (SSL) protects data transfer between the client and backend servers.

Progress is saved on this device.
KEEP EXPLORING

One note leads to another.

Back to the library →
⌕
Search across the entire library ⌘ K