Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface Agent

Notion API agent instance.

Hierarchy

  • Agent

Index

Properties

getActivityLog

getActivityLog: (req: Request) => Promise<Response>

POST /api/v3/getActivityLog

Get user activities of a navigable block, e.g. a page. Equivalent to the "Updates" button in Notion's UI.

remark

Must be authenticated even for public blocks.

Type declaration

getAssetsJson

getAssetsJson: (req: Request) => Promise<Response>

POST /api/v3/getAssetsJson

Get a list of static asset paths, current version number, and more.

Type declaration

getRecordValues

getRecordValues: (req: Request) => Promise<Response>

POST /api/v3/getRecordValues

Get records by table name and id.

If a RecordRequest is the ith element of GetRecordValues.Request.requests, its result is the ith element of GetRecordValues.Response.results.

Type declaration

getSnapshotsList

getSnapshotsList: (req: Request) => Promise<Response>

POST /api/v3/getSnapshotsList

remark

Must be authenticated even for public blocks.

Type declaration

getUserSharedPages

getUserSharedPages: (req: Request) => Promise<Response>

POST /api/v3/getUserSharedPages

Get ids of pages created with + New Page button at the top level of the user's workspace AND those not created at the top level of the user's workspace but had been moved to the top level some time after created.

To always get the top level pages of the user's workspace, use Agent.loadUserContent.

Type declaration

loadPageChunk

loadPageChunk: (req: Request) => Promise<Response>

POST /api/v3/loadPageChunk

Load some data related to a page.

Type declaration

loadUserContent

loadUserContent: (req: Request) => Promise<Response>

POST /api/v3/loadUserContent

Get top level page blocks (block in LoadUserContent.Response.recordMap), user information, and workspace information.

Type declaration

queryCollection

queryCollection: (req: Request) => Promise<Response>

POST /api/v3/queryCollection

Query a collection by id, view id, with aggregate, filter, sort functions.

To configure aggregate, filter, sort parameters, see {@link QueryCollection.Request.query}.

Set limit in QueryCollection.Request.loader to limit maximum number of items in response data.

Type declaration

submitTransaction

submitTransaction: (req: Request) => Promise<Response>

POST /api/v3/submitTransaction

Make changes to documents and settings.

Type declaration

Generated using TypeDoc