OverviewProductsPlatformsAPI ReferenceResources
Files

List files in a folder or search the drive

GEThttps://zernio.com/api/v1/files

Lists the children of folderId (the root by default), folders first.

With q and no folderId the whole drive is searched by name (on Google, every drive the app can see, shared drives included).

  • The account must have been connected with scopes=files (412 account_scope_missing otherwise).
  • Cursors are opaque and provider-issued.
  • Google Drive returns only files Zernio created or the user picked (see the Files tag): an unpicked folder lists empty.

Authentication

AuthorizationBearer tokenRequired

API key authentication: send your Zernio API key in the Authorization header, prefixed with Bearer.

Query parameters

accountIdstringRequired

The connected Google, Microsoft or IMAP account.

folderIdstring

Provider folder id; omit for the root.

qstring, max 200

Name search.

cursorstring
limitintegerDefault 50

Responses

Success· the request worked

Errors· the request failed

GET/v1/files
import Zernio from '@zernio/node';const zernio = new Zernio({ apiKey: process.env.ZERNIO_API_KEY });const { data } = await zernio.files.listFiles({  query: {    accountId: 'account_abc123',  },});console.log(data);
{  "data": [    {      "id": "string",      "accountId": "string",      "provider": "google",      "name": "string",      "kind": "file",      "mimeType": "string",      "size": 0,      "parentId": "string",      "webUrl": "string",      "downloadable": true,      "exportMimeType": "string",      "createdAt": "2019-08-24T14:15:22Z",      "modifiedAt": "2019-08-24T14:15:22Z",      "trashed": true    }  ],  "pagination": {    "hasMore": true,    "nextCursor": "string"  }}
OpenAPI specification
Was this page helpful?