GET
/
v4
/
beta
/
files
JavaScript
import SGPClient from 'sgp';

const client = new SGPClient({
  apiKey: 'My API Key',
});

// Automatically fetches more pages as needed.
for await (const file of client.beta.files.list()) {
  console.log(file.id);
}
{
  "object": "list",
  "items": [
    {
      "id": "<string>",
      "object": "file",
      "size": 123,
      "md5_checksum": "<string>",
      "filename": "<string>",
      "mime_type": "<string>",
      "tags": {},
      "created_at": "2023-11-07T05:31:56Z",
      "created_by": {
        "id": "<string>",
        "object": "identity",
        "type": "user"
      }
    }
  ],
  "limit": 100,
  "total": 123,
  "has_more": true
}

Authorizations

x-api-key
string
header
required

Headers

x-selected-account-id
string

Query Parameters

starting_after
string
ending_before
string
limit
integer
default:100
Required range: 1 <= x <= 1000
sort_order
enum<string>
Available options:
asc,
desc

Response

Successful Response

items
Items · object[]
required
total
integer
required

The total of items that match the query. This is greater than or equal to the number of items returned.

has_more
boolean
required

Whether there are more items left to be fetched.

object
enum<string>
default:list
Available options:
TitleConst
Objectlist
limit
integer
default:100

The maximum number of items to return.