Back to API Overview

Open to anyone API

What is open to anyone, and making a table or file reachable only through your site.

2 endpoints

Endpoints

POST
/api/v1/accessSecurity/openAssets

List what in this workspace is open to anyone: every operation of a table, Drive file or folder, flow or function whose access rule lets anyone on the internet in, or still uses the older site-address setting. No params. Returns { anyoneOnInternet: [row], olderSiteAddress: [row], more } (more: true = a kind had more items than one answer holds; switch these, then list again for the rest), each row { kind (table, file, folder, flow, site_function, account_function), id, name, operation (read, create, update, delete or execute), levelName, siteNames, changedBy, stops }; stops says what would stop working if it were switched to "Only through this site" (tell the person before switching). Only reads; a person whose role may not change Access and security is refused.

Example Request

curl -X POST https://app.serenitiesai.com/api/v1/accessSecurity/openAssets \
  -H "Authorization: Bearer mk_live_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{}'
POST
/api/v1/accessSecurity/switchToOnlyThroughSite

Switch ONE operation of one item from the "Open to anyone" list (accessSecurity_openAssets) to "Only through this site": afterwards it opens only from its own site's pages, not from anywhere on the internet. Params: kind, id and operation, exactly as in a row of that list. It only narrows: it can never open anything wider or set "Anyone on the internet", an operation that is not open to anyone is refused, and every other operation of the item stays as it is. It goes through the item's own access setting, so its checks and its Activity entry apply. An item with no site yet is refused with what to do first. Tell the person what the row's stops says will stop working first, and switch only the items they chose. Returns { ok: true }; a person whose role may not change Access and security is refused.

Parameters

kindstringrequired
idstringrequired
operationstringrequired

Example Request

curl -X POST https://app.serenitiesai.com/api/v1/accessSecurity/switchToOnlyThroughSite \
  -H "Authorization: Bearer mk_live_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
  "kind": "example",
  "id": "example",
  "operation": "example"
}'