The Coda Admin API is a RESTful API that allows programmatic access to administrative reports & capabilities within Coda.
Access to the Admin API is limited to enterprise organizations. Only organization admins can use the Admin API for resources related to their organization.
As we update and release newer versions of the API, we reserve the right to remove older APIs and functionality with a 3-month deprecation notice. We will post about such changes as well as announce new features in the Developers Central section of our Community, and update the API updates doc.
Enterprise customers have access to the Organization, an object that contains policy, rules, and audit events for a set of workspaces and one or more domains. Users accessing Coda via an Organization-registered domain are subject to that Organization's policies including allowed forms of authentication, doc & pack sharing restrictions, etc.
A workspace is your home base for all things Coda. It will store your docs in an organized way, and you'll invite members into the workspace to help you get the job done. A workspace can be free or paid (depending on your plan), and as the workspace's Doc Maker or Doc Maker (Admin), you'll be able to dictate the rules for how it works.
Learn more about Workspaces in our help center.
We use folders to keep docs organized in the workspace (think departments, teams, and projects). Your docs are where the true work gets done with all of your tables, text, and app-like solutions. Folders contain docs within the workspace.
Learn more about Folders in our help center.
Coda docs are foundational, top-level collaborative projects that contain pages.
Pack configurations are the settings that define how a Pack may be used within an organization.
Pack configuration permissions are the settings that define which principals may use a Pack configuration.
When Pack configurations are turned on inside an organization. Pack requests are requests to use a Pack submitted by users in the organization.
Individual pages within a doc offer canvases containing rich text, tables, controls, and other objects.
Audit events contain records of user login/logout activities and other operations performed within a Coda organization. Audit events are critical to an enterprise’s Security Monitoring efforts. It enables Security professionals to proactively analyze the audit events for any suspicious behavior within a Coda organization and help them in forensic investigations in case of a security breach. Audit events also enable administrators to write their own applications to understand their users’ usage of Coda.
The following entity types and actions are audited.
Entity Type | Action Name | Description |
---|---|---|
apiToken | DeleteApiToken | Delete an API token |
apiToken | GenerateApiToken | Generate an API token |
billingAccount | AddBillingGroup | Add a billing group to a billing account |
billingAccount | AddBillingGroupAdmin | Assign a billing group admin |
billingAccount | DeleteBillingGroup | Delete a billing group from a billing account |
billingAccount | RemoveBillingGroupAdmin | Remove a billing group admin |
billingAccount | UpdateBillingAccountSettings | Update settings for a billing account |
brainQuery | BrainStructuredQuery | Query Coda Brain for structured data |
brainQuery | BrainUnstructuredQuery | Query Coda Brain for unstructured data |
doc | AddDocPack | Install a Pack within a doc |
doc | CopyDoc | Copy a doc to a new location |
doc | CopyPages | Copy pages and sub pages within a doc to a new location |
doc | CopyTemplate | Copy template to an existing doc |
doc | CreateDoc | Create a new doc |
doc | DeleteAllReferencingSyncPageTunnels | Delete all sync page tunnels referencing a doc |
doc | DeleteDoc | Delete a doc |
doc | DeleteDocPack | Remove usage of a Pack from a doc |
doc | EditDoc | Edit a doc |
doc | ExportDocContent | Export doc content |
doc | MoveDoc | Move a doc to a different folder |
doc | OpenDoc | Opening a doc for reading, commenting or editing. |
doc | ReviveDoc | Revive a deleted doc |
doc | SubmitForm | Submit through a form |
doc | UpdateDocPermissions | Update sharing permissions on a doc |
folder | CreateFolder | Create a new folder |
folder | DeleteFolder | Delete a folder |
folder | UpdateFolderMembership | Update membership on a folder |
folder | UpdateFolderPermissions | Update sharing permissions on a folder |
folder | UpdateFolderSettings | Update folder settings |
group | CreateGroup | Create a new group |
group | DeleteGroup | Delete a group |
group | UpdateGroup | Update group properties |
ingestion | CreateIngestion | Create a new Coda Brain ingestion |
ingestion | CreateIngestionPermissions | Create Coda Brain ingestion permissions |
ingestion | DeleteIngestion | Delete a Coda Brain ingestion |
ingestion | DeleteIngestionPermissions | Delete Coda Brain ingestion permissions |
ingestion | UpdateIngestion | Update a Coda Brain ingestion |
legalHold | CreateLegalHold | Create a new legal hold |
legalHold | DeleteLegalHold | Delete a legal hold |
legalHold | UpdateLegalHold | Update legal hold |
legalHoldExport | CreateLegalHoldExport | Create a new legal hold export |
legalHoldExport | DeleteLegalHoldExport | Delete a legal hold export |
organization | OrganizationPackAccessRequested | A user requested access to a Pack |
organization | TransferDocs | Transfer docs from one user to another |
organization | UpdateOrganizationPackAccess | Enable or disable usage of a Pack within an organization |
organization | UpdateOrganizationSettings | Update organization settings |
organization | UpdateOrganizationUserActivation | Update a user's activation status in an organization |
organization | UpdateOrganizationUserRole | Add or remove user from organization roles |
pack | AddPackConfigurationPermission | Add a Pack configuration permission |
pack | CreatePack | Create a new Pack |
pack | CreatePackConfiguration | Create a new Pack configuration |
pack | DeleteAllConfigurationsOnPack | Delete all configurations for a Pack |
pack | DeletePack | Delete a Pack |
pack | DeletePackConfiguration | Delete a Pack configuration |
pack | DeletePackConfigurationOAuth | Delete OAuth configuration metadata associated with a Pack configuration |
pack | RemovePackConfigurationPermission | Delete a Pack configuration permission |
pack | SetPackConfigurationOAuth | Set OAuth configuration metadata associated with the Pack configuration |
pack | SetPackConfigurationPermissions | Set permissions for a Pack configuration |
pack | UpdatePackConfiguration | Update a Pack configuration |
pack | UpdatePackPermissions | Update Pack permissions |
packControl | SetPackControl | Set Pack control for an organization |
syncPage | OpenSyncPage | Opening a sync page for reading. |
syncPageTunnel | CreateSyncPageTunnel | Create a sync page tunnel |
syncPageTunnel | DeleteSyncPageTunnel | Delete a sync page tunnel |
syncPageTunnel | UpdateSyncPageTunnel | Update a sync page tunnel |
user | CreateUser | Create a new user |
user | DeleteUser | Delete an existing user |
user | LogInUser | Login activity of a user |
user | LogOutUser | Logout activity of a user |
user | ResetUserPassword | Reset a user's password |
user | UpdateUserAccount | Update a user's account details |
user | UpdateUserPassword | Update a user's password |
webhook | CreateWebhook | Create a new webhook subscription |
webhook | DeleteWebhook | Delete a webhook subscription |
webhook | ResetWebhook | Resets a webhook subscription |
webhook | UpdateWebhook | Updates parameters for an existing webhook subscription |
workspace | CreateCustomIcon | Create a custom icon in a workspace |
workspace | CreateWorkspace | Create a new workspace |
workspace | DeleteCustomIcon | Delete a custom icon in a workspace |
workspace | DeleteWorkspace | Delete a workspace |
workspace | OffboardWorkspaceUser | Offboard a removed user from a workspace |
workspace | PinDocToWorkspace | Pin a doc to a workspace |
workspace | ReinstateWorkspaceUser | Allow a user to be re-added to a workspace |
workspace | UnpinDocFromWorkspace | Unpin a doc from a workspace |
workspace | UpdateWorkspaceSettings | Update workspace settings |
workspace | UpdateWorkspaceUserRole | Update a user's role in a workspace |
For more information about the Coda Admin API and these events, detailed information and examples are available.
Webhooks enable an application to receive notifications of audit events in Coda as they occur.
Rather than having to "poll" repeatedly for new audit events, a webhook will "push" events to your internet-accessible
endpoint via HTTP POST
requests. This can be much more efficient and convenient for an internet-accessible service.
It is important to note that webhooks do require a server or server-like endpoint accesible on the internet at all times to receive these notifications. For simpler scenarios, it may be easier to just poll for audit events rather than host and maintain a server on the internet.
This webhook implementation aims to deliver events within a few minutes of occurring under normal operating conditions.
The system will attempt retries when it detects failures, so it will be possible for you to receive the same events more than once depending on errors or timeouts occurring in your server or in the network infrastructure between Coda and your server. Once delivered successfully, it is not possible to replay webhook notifications.
Targets are expected to respond within 10 seconds before delivery times out and is considered a failure.
Failures are retried using exponential backoff timing; after 8 hours of consecutive failures, Coda will give up and place the webhook into a disabled state.
Once a new webhook connection is established, an initial handshake will be attempted in order to prove that the target is available on the internet and is owned by the registering entity. In addition, any time the webhook is updated to point to a new target URL, the handshake procedure will be kicked off.
After the initial handshake completes successfully, new audit events will immediately begin to flow to the target.
In the event that the handshake fails, the reset
API can be used to force the webhook to retry the handshake process.
To prove that the target URL is available on the internet and is a valid webhook target, a handshake process is started anytime a new target URL is set on on a webhook. This process is asynchronous to the webhook setup API call.
Coda will send a HTTP GET
request to the registered target URL with a HTTP header named X-Webhook-Code
. The
target must respond with a standard 200
or 204
HTTP response code and echo back the same header key and its value.
Once the webhook handshake has completed successfully, Coda will send batches of audit events to the target URL using
HTTP POST
requests.
Each notifications the target receives will include:
X-Webhook-Signature
header which enables the server to verify the payload is genuine and originated from Coda.
This code is a SHA-256 HMAC of the stringified body of the POST request using the Coda-generated secret key available
on the webhook object.events
which contains an array of audit events using the same format as
returned by the listEvents
endpoint detailed below.Sample javascript code fragment for verifying a webhook payload originated from Coda:
const crypto = require('crypto');
// This field is available on the Coda webhook object.
const signatureKey = 'some value';
// These come from the webhook `POST` request to your server
const headers = {'X-Webhook-Signature': 'abc123'};
const body = {events: []};
const calculatedSignature = crypto
.createHmac('SHA256', signatureKey)
.update(JSON.stringify(body))
.digest("hex");
const isValidSignature = crypto.timingSafeEqual(
Buffer.from(calculatedSignature),
Buffer.from(headers['X-Webhook-Signature']),
);
Endpoints supporting listing of resources have the following fields:
items
: An array containing the listed resources, limited by the limit
or pageToken
query parametersnextPageLink
: If more results are available, an API link to the next page of resultsnextPageToken
: If more results are available, a page token that can be passed into the pageToken
query parameterThe maximum page size may change at any time, and may be different for different endpoints. Please do not rely on it
for any behavior of your application. If you pass a limit
parameter that is larger than our maximum allowed limit,
we will only return as many results as our maximum limit. You should look for the presence of the nextPageToken
on the
response to see if there are more results available, rather than relying on a result set that matches your provided limit.
To fetch a subsequent page of results, pass the pageToken
parameter. Set this parameter to the value given to you as the nextPageToken
in a page response. If no value is provided, there are no more results available. You only need to pass the pageToken
to get
the next page of results, you don't need to pass any of the parameters from your original request, as they are all
implied by the pageToken
. Any other parameters provided alongside a pageToken
will be ignored.
The Coda Admin API sets a reasonable limit on the number of requests that can be made per minute. Once this limit is reached, calls to the API will start returning errors with an HTTP status code of 429.
In an effort to standardize our API and make it accessible, we offer an OpenAPI 3.0 specification:
Returns a list of API tokens created by users within an organization.
organizationId required | string Example: org-AbCDeFGHIj ID of the organization. |
limit | integer [ 1 .. 500 ] Default: 100 Example: limit=10 Maximum number of results to return in this query. |
pageToken | string Example: pageToken=eyJsaW1pd An opaque token used to fetch the next page of results. |
required | Array of objects (OrgUserApiToken) |
href required | string <url> API link to these results |
nextPageToken | string (NextPageToken) If specified, an opaque token used to fetch the next page of results. |
nextPageLink | string <url> If specified, a link that can be used to fetch the next page of results. |
import requests headers = {'Authorization': 'Bearer <your API token>'} uri = 'https://coda.io/apis/admin/v1/organizations/<your organization id>/apiTokens' res = requests.get(uri, headers=headers, params=params).json() print(f'First token is: {res["items"][0]["name"]}')
{- "items": [
- {
- "owner": {
- "type": "user",
- "id": 867102,
- "email": "user@example.com"
}, - "id": "AbCDeFGH",
- "name": "Cool Coda Integration",
- "createdAt": "2019-08-24T14:15:22Z",
- "lastUsedAt": "2018-04-11T00:18:57.946Z"
}
], - "href": "https://coda.io/apis/admin/v1/organizations/<your organization id>/apiTokens",
- "nextPageToken": "eyJsaW1pd",
- "nextPageLink": "https://coda.io/apis/admin/v1/organizations/<your organization id>/apiTokens?pageToken=eyJsaW1pd"
}
Revokes the given API token and prevents future use.
organizationId required | string Example: org-AbCDeFGHIj ID of the organization. |
apiTokenId required | string <uuid> Example: afe84ebf-4d06-44c5-b545-a8af5036bebf ID of the API token. |
The result of an API token revocation.
import requests headers = {'Authorization': 'Bearer <your API token>'} uri = 'https://coda.io/apis/admin/v1/organizations/<your organization id>/apiTokens/<api token id>' res = requests.delete(uri, headers=headers, params=params).json() print(f'Token was revoked')
{ }
Coda docs are foundational, top-level collaborative projects that contain pages. The API lets you list and search your docs.
Returns a list of docs in the organization
organizationId required | string Example: org-AbCDeFGHIj ID of the organization. |
limit | integer [ 1 .. 500 ] Default: 100 Example: limit=10 Maximum number of results to return in this query. |
pageToken | string Example: pageToken=eyJsaW1pd An opaque token used to fetch the next page of results. |
query | string Example: query=feature%parity Search terms used to narrow down results. |
docIds | Array of strings Example: docIds=Wd6s6JvqOg,2D3VqCFAyt List of IDs of docs to retrieve. |
folderIds | Array of strings Example: folderIds=fl-AbCDeFGHIj Comma-separated list of folder IDs |
workspaceIds | Array of strings Example: workspaceIds=ws-AbCDeFGHIj Comma-separated list of workspace IDs |
docAvailabilityState | string (DocAvailabilityState) Enum: "online" "deleted" If specified, filter docs by availability state. |
docTypes | Array of strings (DocType) Items Enum: "doc" "form" "template" Example: docTypes=doc,template Comma-separated list of doc types to include in results. If omitted, defaults to Doc. |
dateActivity | string (DateActivity) Enum: "lastModified" "created" Activity type to apply the date range filter to. Only available if a search query is provided. |
since | string Return docs with the specified date activity on or after the given date. Only available if a search query is provided. |
until | string Return docs with the specified date activity on or before the given date. Only available if a search query is provided. |
ownerUserEmails | Array of strings <email> Example: ownerUserEmails=april@example.com,june@example.com List of emails of doc owners whose docs to retrieve. |
title | string If specified, filter docs whose title contains this string. |
sharedWithWorkspace | boolean If true, filter docs shared with their workspace. All sharedWith params are ORed together. |
sharedWithDomains | Array of strings <domain> Example: sharedWithDomains=example.com Filter docs shared with the specified domains. All sharedWith params are ORed together. |
sharedWithAnyone | string (SharedWithAnyoneFilter) Enum: "all" "linkOnly" "discoverableViaWeb" Filter docs shared publicly if specified. All sharedWith params are ORed together. |
sharedWithExternalDomain | boolean or null (SharedWithExternalDomainFilter) Filter docs shared with a user external to the organization. All sharedWith params are ORed together. |
sortField | string (DocListSortField) Enum: "name" "createdAt" "lastActiveDate" "numPages" "numPageViewsLast90Days" "numCollaboratorsLast90Days" Sort the list of docs by the specified field. |
sortDirection | string (SortDirection) Enum: "asc" "desc" Sort by the specified direction. |
includeInstalledPackCount | boolean Include the count of installed packs in the response. |
fetchPermissionsMode | string (FetchPermissionsMode) Enum: "list" "summary" "none" How to fetch permissions for a doc. Defaults to list all permissions. |
required | Array of objects (Doc) |
href required | string <url> API link to these results |
nextPageToken | string (NextPageToken) If specified, an opaque token used to fetch the next page of results. |
nextPageLink | string <url> If specified, a link that can be used to fetch the next page of results. |
import requests headers = {'Authorization': 'Bearer <your API token>'} uri = 'https://coda.io/apis/admin/v1/organizations/<your organization id>/docs' res = requests.get(uri, headers=headers).json() print(f'First doc is: {res["items"][0]["name"]}')
{- "items": [
- {
- "type": "doc",
- "id": "AbCDeFGH",
- "name": "Product Launch Hub",
- "icon": "exclamation-circle-filled",
- "href": "https://coda.io/apis/admin/v1/docs/AbCDeFGH",
- "browserLink": "https://coda.io/d/_dAbCDeFGH",
- "folderId": "fl-es129308",
- "workspaceId": "ws-sdfmsdf9",
- "owner": "april@example.com",
- "ownerName": "April Jane",
- "createdAt": "2018-04-11T00:18:57.946Z",
- "updatedAt": "2018-04-11T00:18:57.946Z",
- "acl": [
- {
- "type": "permission",
- "principal": {
- "type": "email",
- "email": "example@domain.com"
}, - "id": "string",
- "access": "readonly"
}
], - "truncatedAcl": true,
- "aclSummary": {
- "worldwideAccess": "readonly",
- "domainShares": [
- "string"
], - "workspaceShares": [
- "string"
], - "numGroupPermissions": {
- "type": "exactCount",
- "exactCount": 0
}, - "numUserPermissions": {
- "type": "exactCount",
- "exactCount": 0
}
}, - "searchHit": {
- "matchText": "Objective: Key Results:\n* Reach <span class=\"hit\">feature parity</span> with previous version\n",
- "browserLink": "https://coda.io/d/_dAbCDeFGH"
}, - "docUsersLast90Days": 42,
- "isDeleted": false,
- "installedPackCount": 3,
- "discoverableViaWeb": true,
- "documentAnalytics": {
- "lastActiveDate": "2018-04-11T00:18:57.946Z",
- "numPages": 3,
- "numPageViewsLast90Days": 42,
- "numCollaboratorsLast90Days": 42,
- "externallySharedUserDomains": [
- "gmail.com",
- "outlook.com"
]
}
}
], - "href": "https://coda.io/apis/admin/v1/organizations/<your organization id>/docs",
- "nextPageToken": "eyJsaW1pd",
- "nextPageLink": "https://coda.io/apis/admin/v1/organizations/<your organization id>/docs?pageToken=eyJsaW1pd"
}
Returns metadata for a specific doc
organizationId required | string Example: org-AbCDeFGHIj ID of the organization. |
docId required | string Example: d-AbCDeFGHIj ID of the doc. |
type required | string Value: "doc" The type of this resource. |
id required | string ID of the Coda doc. |
name required | string Name of the doc. |
href required | string <url> API link to the Coda doc. |
browserLink required | string <url> Browser-friendly link to the Coda doc. |
folderId required | string ID of the Coda doc's folder. |
workspaceId required | string ID of the Coda doc's workspace. |
icon | string Name of the icon. |
owner | string <email> Email address of the doc owner |
ownerName | string Name of the doc owner |
createdAt | string <date-time> Timestamp for when the doc was created. |
updatedAt | string <date-time> Timestamp for when the doc was last modified. |
Array of objects (Permission) | |
truncatedAcl | boolean True if the inline ACL field was truncated; use a paginated ACL query to fetch all permissions. |
object (PermissionsSummary) Summary of permissions. | |
object (DocSearchHit) Details on where the search query appeared in the doc. | |
docUsersLast90Days | number Deprecated Deprecated, use documentAnalytics instead. |
isDeleted | boolean True if the doc has been deleted. |
installedPackCount | number Number of Packs installed in the doc. |
discoverableViaWeb | boolean True if the doc is published and discoverable via the web. |
object (DocumentAnalytics) Metrics for a doc. |
import requests headers = {'Authorization': 'Bearer <your API token>'} uri = 'https://coda.io/apis/admin/v1/organizations/<your organization id>/docs/<your doc id>' res = requests.get(uri, headers=headers).json() print(f'Doc name is: {res["name"]}')
{- "type": "doc",
- "id": "AbCDeFGH",
- "name": "Product Launch Hub",
- "icon": "exclamation-circle-filled",
- "href": "https://coda.io/apis/admin/v1/docs/AbCDeFGH",
- "browserLink": "https://coda.io/d/_dAbCDeFGH",
- "folderId": "fl-es129308",
- "workspaceId": "ws-sdfmsdf9",
- "owner": "april@example.com",
- "ownerName": "April Jane",
- "createdAt": "2018-04-11T00:18:57.946Z",
- "updatedAt": "2018-04-11T00:18:57.946Z",
- "acl": [
- {
- "type": "permission",
- "principal": {
- "type": "email",
- "email": "example@domain.com"
}, - "id": "string",
- "access": "readonly"
}
], - "truncatedAcl": true,
- "aclSummary": {
- "worldwideAccess": "readonly",
- "domainShares": [
- "string"
], - "workspaceShares": [
- "string"
], - "numGroupPermissions": {
- "type": "exactCount",
- "exactCount": 0
}, - "numUserPermissions": {
- "type": "exactCount",
- "exactCount": 0
}
}, - "searchHit": {
- "matchText": "Objective: Key Results:\n* Reach <span class=\"hit\">feature parity</span> with previous version\n",
- "browserLink": "https://coda.io/d/_dAbCDeFGH"
}, - "docUsersLast90Days": 42,
- "isDeleted": false,
- "installedPackCount": 3,
- "discoverableViaWeb": true,
- "documentAnalytics": {
- "lastActiveDate": "2018-04-11T00:18:57.946Z",
- "numPages": 3,
- "numPageViewsLast90Days": 42,
- "numCollaboratorsLast90Days": 42,
- "externallySharedUserDomains": [
- "gmail.com",
- "outlook.com"
]
}
}
Deletes an existing doc
organizationId required | string Example: org-AbCDeFGHIj ID of the organization. |
docId required | string Example: d-AbCDeFGHIj ID of the doc. |
The result of deleting a doc.
import requests headers = {'Authorization': 'Bearer <your API token>'} uri = 'https://coda.io/apis/admin/v1/organizations/<your organization id>/docs/<your doc id>' res = requests.delete(uri, headers=headers).json() # => Delete the doc
{ }
Revives a deleted doc in the organization
organizationId required | string Example: org-AbCDeFGHIj ID of the organization. |
docId required | string Example: d-AbCDeFGHIj ID of the doc. |
docUrl required | string URL of the revived doc |
import requests headers = {'Authorization': 'Bearer <your API token>'} uri = 'https://coda.io/apis/admin/v1/organizations/<your organization id>/docs/<your doc id>/revive' res = requests.post(uri, headers=headers, json=payload) res = requests.delete(uri, headers=headers).json() # => Revive the deleted doc
{- "docUrl": "string"
}
Moves a doc to another folder within the organization
organizationId required | string Example: org-AbCDeFGHIj ID of the organization. |
docId required | string Example: d-AbCDeFGHIj ID of the doc. |
Parameters for moving the doc.
destinationFolderId required | string The ID of the folder to move the doc to. |
The result of moving a doc.
{- "destinationFolderId": "fl-AbCDeFGHIj"
}
{ }
Returns a list of permissions for this doc
organizationId required | string Example: org-AbCDeFGHIj ID of the organization. |
docId required | string Example: d-AbCDeFGHIj ID of the doc. |
limit | integer [ 1 .. 500 ] Default: 100 Example: limit=10 Maximum number of results to return in this query. |
pageToken | string Example: pageToken=eyJsaW1pd An opaque token used to fetch the next page of results. |
required | Array of objects (Permission) |
href | string <url> API link to these results |
nextPageToken | string (NextPageToken) If specified, an opaque token used to fetch the next page of results. |
nextPageLink | string <url> If specified, a link that can be used to fetch the next page of results. |
import requests headers = {'Authorization': 'Bearer <your API token>'} uri = 'https://coda.io/apis/admin/v1/organizations/<your organization id>/docs/<your doc id>/acl/permissions' res = requests.get(uri, headers=headers).json() print(f'First user with access is {res["items"][0]["principal"]["email"]}') # => First user with access is foo@bar.com
{- "items": [
- {
- "type": "permission",
- "principal": {
- "type": "email",
- "email": "example@domain.com"
}, - "id": "string",
- "access": "readonly"
}
], - "href": "string",
- "nextPageToken": "eyJsaW1pd",
- "nextPageLink": "string"
}
Adds a new permission to the doc.
organizationId required | string Example: org-AbCDeFGHIj ID of the organization. |
docId required | string Example: d-AbCDeFGHIj ID of the doc. |
Parameters for adding the new permission.
access required | string (AccessTypeNotNone) Enum: "readonly" "write" "comment" Type of access (excluding none). |
required | any (AddedPrincipal) Metadata about a principal to add to a doc. |
suppressEmail | boolean When true suppresses email notification |
The result of adding a permission.
{- "access": "readonly",
- "principal": {
- "type": "email",
- "email": "example@domain.com"
}, - "suppressEmail": true
}
{ }
Deletes an existing permission.
organizationId required | string Example: org-AbCDeFGHIj ID of the organization. |
docId required | string Example: d-AbCDeFGHIj ID of the doc. |
docPermissionId required | string <uuid> Example: f88ba9d9-037d-41df-a49c-49798701ed41 ID of a permission on an doc. |
The result of deleting a permission.
import requests headers = {'Authorization': 'Bearer <your API token>'} uri = f'https://coda.io/apis/admin/v1/organizations/<your organization id>/docs/<doc ID>/acl/permissions/<permission ID>' res = requests.delete(uri, headers=headers, json=payload) # => Revoke access to the doc
{ }
Begins the export process for a doc; the response carries the request ID that can be polled for status & used to download the exported file once ready.
organizationId required | string Example: org-AbCDeFGHIj ID of the organization. |
docId required | string Example: d-AbCDeFGHIj ID of the doc. |
Parameters for the export.
format required | string (DocExportFormat) Enum: "PDF" "Plaintext" "HTML" Format of the doc export |
orientation | string (DocExportOrientation) Enum: "Landscape" "Portrait" Orientation of the doc export. Defaults to Portrait. |
paperSize | string (DocExportPaperSize) Enum: "A0" "A1" "A2" "A3" "A4" "A5" "A6" "Letter" "Legal" "Tabloid" Size of pages in the resulting export, if supported by the export format. Defaults to Letter. |
exportDocAsUserEmail | string The email address of the user to export the doc as. |
id required | string ID of the export request. |
status required | string (DocExportStatus) Enum: "InProgress" "Failed" "Complete" Status of a doc export request |
href | string <url> API link to these results |
error | string If the export failed, this field includes the reason. |
downloadLink | string Once the export completes, the location where the resulting file can be downloaded; this link typically expires after a short time. Call this method again to get a fresh link. |
{- "format": "PDF",
- "orientation": "Landscape",
- "paperSize": "A0",
- "exportDocAsUserEmail": "joe@example.com"
}
{- "id": "AbCDeFGH",
- "href": "https://coda.io/apis/admin/v1/organizations/<your organization id>/docs/<your doc id>/export/<your export request id>",
- "status": "InProgress",
- "error": "string",
- "downloadLink": "string"
}
Returns the status of a previous doc export request, including a file download link once ready. Download links are valid for 5 minutes and a new download link is returned on each call to this API once the export has completed.
organizationId required | string Example: org-AbCDeFGHIj ID of the organization. |
docId required | string Example: d-AbCDeFGHIj ID of the doc. |
exportId required | string <uuid> Example: 85d2fb03-2747-44c4-8b3b-7a05d37eec04 ID of the doc export request. |
id required | string ID of the export request. |
status required | string (DocExportStatus) Enum: "InProgress" "Failed" "Complete" Status of a doc export request |
href | string <url> API link to these results |
error | string If the export failed, this field includes the reason. |
downloadLink | string Once the export completes, the location where the resulting file can be downloaded; this link typically expires after a short time. Call this method again to get a fresh link. |
import requests headers = {'Authorization': 'Bearer <your API token>'} uri = 'https://coda.io/apis/admin/v1/organizations/<your organization id>/docs/<your doc id>/export/<export id>' res = requests.get(uri, headers=headers).json() print(f'Export status is {res["status"]}') # => Export status is InProgress
{- "id": "AbCDeFGH",
- "href": "https://coda.io/apis/admin/v1/organizations/<your organization id>/docs/<your doc id>/export/<your export request id>",
- "status": "InProgress",
- "error": "string",
- "downloadLink": "string"
}
Returns a list of pages in the doc
organizationId required | string Example: org-AbCDeFGHIj ID of the organization. |
docId required | string Example: d-AbCDeFGHIj ID of the doc. |
limit | integer [ 1 .. 500 ] Default: 100 Example: limit=10 Maximum number of results to return in this query. |
pageToken | string Example: pageToken=eyJsaW1pd An opaque token used to fetch the next page of results. |
required | Array of objects (Page) |
href required | string <url> API link to these results |
nextPageToken | string (NextPageToken) If specified, an opaque token used to fetch the next page of results. |
nextPageLink | string <url> If specified, a link that can be used to fetch the next page of results. |
import requests headers = {'Authorization': 'Bearer <your API token>'} uri = 'https://coda.io/apis/admin/v1/organizations/<your organization id>/docs/<your doc id>/pages' res = requests.get(uri, headers=headers).json() print(f'First page is: {res["items"][0]["name"]}')
{- "items": [
- {
- "type": "page",
- "id": "canvas-IjkLmnO",
- "href": "https://coda.io/apis/admin/v1/organizations/<your org id>/docs/<doc id>/pages/<page id>",
- "browserLink": "https://coda.io/d/_dAbCDeFGH/Launch-Status_sumnO",
- "name": "Launch Status",
- "subtitle": "See the status of launch-related tasks.",
- "parent": {
- "type": "page",
- "id": "canvas-IjkLmnO",
- "href": "https://coda.io/apis/admin/v1/organizations/<your org id>/docs/<doc id>/pages/<page id>",
- "browserLink": "https://coda.io/d/_dAbCDeFGH/Launch-Status_sumnO",
- "name": "Launch Status"
}
}
], - "href": "https://coda.io/apis/admin/v1/organizations/<your organization id>/docs/<your doc id>/pages",
- "nextPageToken": "eyJsaW1pd",
- "nextPageLink": "https://coda.io/apis/admin/v1/organizations/<your organization id>/docs/<your doc id>/pages?pageToken=eyJsaW1pd"
}
Returns information for a specific page
organizationId required | string Example: org-AbCDeFGHIj ID of the organization. |
docId required | string Example: d-AbCDeFGHIj ID of the doc. |
pageId required | string Example: canvas-AbCDeFGHIj ID of the page. |
outputFormat | string (OutputFormat) Default: "None" Enum: "None" "LossyPlainText" Example: outputFormat=LossyPlainText If specified, the format of the page or doc content to be returned. See export APIs for more output format options. |
type required | string Value: "page" The type of this resource. |
id required | string ID of the page. |
name required | string Name of the page. |
href required | string <url> API link to the page. |
browserLink required | string <url> Browser-friendly link to the page. |
subtitle | string Subtitle of the page. |
object (PageReference) Reference to a page. | |
object (PageContent) Content of a page |
import requests headers = {'Authorization': 'Bearer <your API token>'} uri = 'https://coda.io/apis/admin/v1/organizations/<your organization id>/docs/<your doc id>/pages/<your page id>' res = requests.get(uri, headers=headers).json() print(f'Page name is: {res["name"]}')
{- "type": "page",
- "id": "canvas-IjkLmnO",
- "href": "https://coda.io/apis/admin/v1/organizations/<your org id>/docs/<doc id>/pages/<page id>",
- "browserLink": "https://coda.io/d/_dAbCDeFGH/Launch-Status_sumnO",
- "name": "Launch Status",
- "subtitle": "See the status of launch-related tasks.",
- "parent": {
- "type": "page",
- "id": "canvas-IjkLmnO",
- "href": "https://coda.io/apis/admin/v1/organizations/<your org id>/docs/<doc id>/pages/<page id>",
- "browserLink": "https://coda.io/d/_dAbCDeFGH/Launch-Status_sumnO",
- "name": "Launch Status"
}, - "pageContent": {
- "createdAt": "2019-08-24T14:15:22Z",
- "content": "Some page contents.\\nAnd some more page contents!\\n"
}
}
Returns users who viewed the pages in a doc in a given time range
organizationId required | string Example: org-AbCDeFGHIj ID of the organization. |
docId required | string Example: d-AbCDeFGHIj ID of the doc. |
sinceDate required | string <date> Example: sinceDate=2020-08-01 Limit results to activity on or after this date. |
untilDate required | string <date> Example: untilDate=2020-08-05 Limit results to activity on or before this date. |
pageToken | string Example: pageToken=eyJsaW1pd An opaque token used to fetch the next page of results. |
limit | integer [ 1 .. 500 ] Default: 100 Example: limit=10 Maximum number of results to return in this query. |
pageViewersLimit | integer [ 1 .. 500 ] Default: 100 Limit number of users returned per page. |
required | Array of objects (PageViewersItem) |
href | string <url> API link to these results |
nextPageToken | string (NextPageToken) If specified, an opaque token used to fetch the next page of results. |
nextPageLink | string <url> If specified, a link that can be used to fetch the next page of results. |
import requests headers = {'Authorization': 'Bearer <your API token>'} uri = 'https://coda.io/apis/admin/v1/organizations/<your organization id>/docs/<your doc id>/pageViewers' res = requests.get(uri, headers=headers).json() print(f'Page name is: {res["name"]}')
{- "items": [
- {
- "pageId": "canvas-IjkLmnO",
- "pageName": "Launch Status",
- "viewers": [
- {
- "type": "user",
- "id": 867102,
- "email": "user@example.com"
}
]
}
], - "href": "https://coda.io/apis/admin/v1/organizations/<your organization id>/docs/<your doc id>/pageViewers",
- "nextPageToken": "eyJsaW1pd",
- "nextPageLink": "https://coda.io/apis/admin/v1/organizations/<your organization id>/docs/<your doc id>/pageViewers?pageToken=eyJsaW1pd"
}
Returns a list of audit events within an organization.
organizationId required | string Example: org-AbCDeFGHIj ID of the organization. |
startTime | integer Return audit events created on or after the given Unix timestamp. |
endTime | integer Return audit events created on or before the given Unix timestamp. |
action | Array of strings Name of the action(s) performed. |
userId | number The Coda ID of the user who initiated the action. |
Array of strings <email> The email address(es) of the user(s) who initiated the action. | |
entityType | string (Type) Enum: "apiToken" "billingAccount" "brainQuery" "doc" "docPackConnection" "event" "folder" "group" "ingestion" "legalHold" "legalHoldExport" "organization" "pack" "packControl" "packConfiguration" "packConfigurationOauth" "packConfigurationPermission" "packRequest" "page" "permission" "syncPage" "syncPageTunnel" "user" "webhook" "workspace" Target entity type of the action. |
entityId | string Target entity ID of the action. |
containerWorkspaceId | string ID of the workspace that contained the entity at the time the event was generated. |
containerFolderId | string ID of the folder that contained the entity at the time the event was generated. |
containerBillingAccountId | string ID of the billing account that contained the entity at the time the event was generated. |
order | string Enum: "asc" "desc" Defines the ordering of results. If unspecified, will default to 'asc' (ascending) order from oldest to most recent events. |
limit | integer [ 1 .. 500 ] Default: 100 Example: limit=10 Maximum number of results to return in this query. |
pageToken | string Example: pageToken=eyJsaW1pd An opaque token used to fetch the next page of results. |
required | Array of objects (Event) |
href | string <url> API link to these results |
nextPageToken | string (NextPageToken) If specified, an opaque token used to fetch the next page of results. |
nextPageLink | string <url> If specified, a link that can be used to fetch the next page of results. |
import requests headers = {'Authorization': 'Bearer <your API token>'} uri = 'https://coda.io/apis/admin/v1/organizations/<your organization id>/audit/events' params = { 'action': 'docAccessDenied', } res = requests.get(uri, headers=headers, params=params).json() print(f'First event is: {res["items"][0]["action"]}') # => TODO: add response
{- "items": [
- {
- "timestamp": 1614175261,
- "user": {
- "type": "user",
- "id": 867102,
- "email": "user@example.com"
}, - "userContext": {
- "source": "browser",
- "sessionId": "as-zxfl5qXkN2",
- "browser": {
- "ua": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.36",
- "ipAddress": "192.0.2.0"
}
}, - "action": "docAccessDenied",
- "entity": {
- "type": "apiToken",
- "apiToken": {
- "type": "apiToken",
- "id": "AbCDeFGH",
- "name": "Cool Coda Integration"
}
}, - "eventDetails": { },
- "result": "Success",
- "organizationId": "org-1AbcdeFgh1",
- "eventId": "c4515dc3-cb8d-4a57-9346-d37953f0a628"
}
], - "href": "https://coda.io/apis/admin/v1/organizations/org-1AbcdeFgh1/audit/events?limit=20",
- "nextPageToken": "eyJsaW1pd",
- "nextPageLink": "https://coda.io/apis/admin/v1/organizations/org-1AbcdeFgh1/audit/events?pageToken=eyJsaW1pd"
}
Returns a list of folders in the workspace
organizationId required | string Example: org-AbCDeFGHIj ID of the organization. |
workspaceId required | string Example: ws-AbCDeFGHIj ID of the workspace. |
limit | integer [ 1 .. 500 ] Default: 100 Example: limit=10 Maximum number of results to return in this query. |
pageToken | string Example: pageToken=eyJsaW1pd An opaque token used to fetch the next page of results. |
folderIds | Array of strings Example: folderIds=fl-AbCDeFGHIj Comma-separated list of folder IDs |
folderType | string (FolderType) Enum: "Standard" "Personal" Example: folderType=Standard Type of the folder |
query | string Example: query=feature%parity Search terms used to narrow down results. |
includeAcl | boolean Include permissions metadata on each folder. |
includeDeleted | boolean Include deleted folders |
required | Array of objects (Folder) |
href required | string <url> API link to these results |
nextPageToken | string (NextPageToken) If specified, an opaque token used to fetch the next page of results. |
nextPageLink | string <url> If specified, a link that can be used to fetch the next page of results. |
import requests headers = {'Authorization': 'Bearer <your API token>'} uri = 'https://coda.io/apis/admin/v1/organizations/<your organization id>/workspaces<your workspace id>/folders' res = requests.get(uri, headers=headers).json() print(f'First folder is: {res["items"][0]["name"]}')
{- "items": [
- {
- "type": "folder",
- "id": "fl-1Ab234",
- "name": "My docs",
- "icon": "exclamation-circle-filled",
- "description": "This folder holds my important docs.",
- "folderType": "Standard",
- "isPrivate": true,
- "acl": [
- {
- "type": "permission",
- "principal": {
- "type": "email",
- "email": "example@domain.com"
}, - "id": "string",
- "access": "readonly"
}
], - "truncatedAcl": true
}
], - "href": "https://coda.io/apis/admin/v1/organizations/<your organization id>/workspaces/<your workspace id>/folders",
- "nextPageToken": "eyJsaW1pd",
- "nextPageLink": "https://coda.io/apis/admin/v1/organizations/<your organization id>/workspaces/<your workspace id>/folders?pageToken=eyJsaW1pd"
}
Returns the requested folder.
organizationId required | string Example: org-AbCDeFGHIj ID of the organization. |
workspaceId required | string Example: ws-AbCDeFGHIj ID of the workspace. |
folderId required | string Example: fl-AbCDeFGHIj ID of the folder. |
type required | string Value: "folder" The type of this resource. |
id required | string ID of the Coda folder. |
name required | string Name of the Coda folder. |
folderType required | string (FolderType) Enum: "Standard" "Personal" |
icon | string Name of the Coda folder icon. |
description | string Description of the Coda folder. |
isPrivate | boolean Deprecated Deprecated, use folder permissions instead. |
Array of objects (Permission) | |
truncatedAcl | boolean True if the inline ACL field was truncated; use a paginated ACL query to fetch all permissions. |
import requests headers = {'Authorization': 'Bearer <your API token>'} uri = 'https://coda.io/apis/admin/v1/organizations/<your organization id>/workspaces/<your workspace id>/folders/<your folder id>' res = requests.get(uri, headers=headers).json() print(f'Folder name is: {res["name"]}')
{- "type": "folder",
- "id": "fl-1Ab234",
- "name": "My docs",
- "icon": "exclamation-circle-filled",
- "description": "This folder holds my important docs.",
- "folderType": "Standard",
- "isPrivate": true,
- "acl": [
- {
- "type": "permission",
- "principal": {
- "type": "email",
- "email": "example@domain.com"
}, - "id": "string",
- "access": "readonly"
}
], - "truncatedAcl": true
}
Returns a list of permissions for this folder
organizationId required | string Example: org-AbCDeFGHIj ID of the organization. |
workspaceId required | string Example: ws-AbCDeFGHIj ID of the workspace. |
folderId required | string Example: fl-AbCDeFGHIj ID of the folder. |
limit | integer [ 1 .. 500 ] Default: 100 Example: limit=10 Maximum number of results to return in this query. |
pageToken | string Example: pageToken=eyJsaW1pd An opaque token used to fetch the next page of results. |
required | Array of objects (Permission) |
href | string <url> API link to these results |
nextPageToken | string (NextPageToken) If specified, an opaque token used to fetch the next page of results. |
nextPageLink | string <url> If specified, a link that can be used to fetch the next page of results. |
import requests headers = {'Authorization': 'Bearer <your API token>'} uri = 'https://coda.io/apis/admin/v1/organizations/<your organization id>/workspaces/<your workspace id>/folders/<your folder id>/acl/permissions' res = requests.get(uri, headers=headers).json() print(f'First user with access is {res["items"][0]["principal"]["email"]}') # => First user with access is foo@bar.com
{- "items": [
- {
- "type": "permission",
- "principal": {
- "type": "email",
- "email": "example@domain.com"
}, - "id": "string",
- "access": "readonly"
}
], - "href": "string",
- "nextPageToken": "eyJsaW1pd",
- "nextPageLink": "string"
}
Adds a new permission to the folder.
organizationId required | string Example: org-AbCDeFGHIj ID of the organization. |
workspaceId required | string Example: ws-AbCDeFGHIj ID of the workspace. |
folderId required | string Example: fl-AbCDeFGHIj ID of the folder. |
Parameters for adding the new permission.
access required | string (AccessTypeNotNone) Enum: "readonly" "write" "comment" Type of access (excluding none). |
required | any (AddedPrincipal) Metadata about a principal to add to a doc. |
suppressEmail | boolean When true suppresses email notification |
The result of adding a permission.
{- "access": "readonly",
- "principal": {
- "type": "email",
- "email": "example@domain.com"
}, - "suppressEmail": true
}
{ }
Deletes an existing permission.
organizationId required | string Example: org-AbCDeFGHIj ID of the organization. |
workspaceId required | string Example: ws-AbCDeFGHIj ID of the workspace. |
folderId required | string Example: fl-AbCDeFGHIj ID of the folder. |
permissionId required | string Example: AbCDeFGH ID of a permission on an object. |
The result of deleting a permission.
import requests headers = {'Authorization': 'Bearer <your API token>'} uri = f'https://coda.io/apis/admin/v1/organizations/<your organization id>/workspaces/<your workspace id>/folders/<your folder id>/acl/permissions/<permission ID>' res = requests.delete(uri, headers=headers, json=payload) # => Revoke access to the folder
{ }
Returns a list of groups in the organization
organizationId required | string Example: org-AbCDeFGHIj ID of the organization. |
limit | integer [ 1 .. 500 ] Default: 100 Example: limit=10 Maximum number of results to return in this query. |
pageToken | string Example: pageToken=eyJsaW1pd An opaque token used to fetch the next page of results. |
required | Array of objects (Group) |
href required | string <url> API link to these results |
nextPageToken | string (NextPageToken) If specified, an opaque token used to fetch the next page of results. |
nextPageLink | string <url> If specified, a link that can be used to fetch the next page of results. |
import requests headers = {'Authorization': 'Bearer <your API token>'} uri = 'https://coda.io/apis/admin/v1/organizations/<your organization id>/groups' res = requests.get(uri, headers=headers).json() print(f'First group is: {res["items"][0]["name"]}')
{- "items": [
- {
- "type": "group",
- "id": "grp-6SM9xrKcqW",
- "name": "Engineering",
- "description": "All engineers."
}
], - "href": "https://coda.io/apis/admin/v1/organizations/<your organization id>/groups",
- "nextPageToken": "eyJsaW1pd",
- "nextPageLink": "https://coda.io/apis/admin/v1/organizations/<your organization id>/groups?pageToken=eyJsaW1pd"
}
Returns the requested group.
organizationId required | string Example: org-AbCDeFGHIj ID of the organization. |
groupId required | string Example: grp-AbCDeFGHIj ID of the group. |
type required | string Value: "group" The type of this resource. |
id required | string ID of the group. |
name required | string Name of the group. |
description | string Description of the group. |
import requests headers = {'Authorization': 'Bearer <your API token>'} uri = 'https://coda.io/apis/admin/v1/organizations/<your organization id>/groups/<your group id>' res = requests.get(uri, headers=headers).json() print(f'Group name is: {res["name"]}')
{- "type": "group",
- "id": "grp-6SM9xrKcqW",
- "name": "Engineering",
- "description": "All engineers."
}
Returns a list of members for this group
organizationId required | string Example: org-AbCDeFGHIj ID of the organization. |
groupId required | string Example: grp-AbCDeFGHIj ID of the group. |
limit | integer [ 1 .. 500 ] Default: 100 Example: limit=10 Maximum number of results to return in this query. |
pageToken | string Example: pageToken=eyJsaW1pd An opaque token used to fetch the next page of results. |
required | Array of objects (User) |
href | string <url> API link to these results |
nextPageToken | string (NextPageToken) If specified, an opaque token used to fetch the next page of results. |
nextPageLink | string <url> If specified, a link that can be used to fetch the next page of results. |
import requests headers = {'Authorization': 'Bearer <your API token>'} uri = 'https://coda.io/apis/admin/v1/organizations/<your organization id>/groups/<your group id>/members' res = requests.get(uri, headers=headers).json() print(f'First user in the group is {res["items"][0]["email"]}') # => First user in the group is foo@bar.com
{- "items": [
- {
- "type": "user",
- "id": 867102,
- "email": "user@example.com"
}
], - "href": "https://coda.io/apis/admin/v1/organizations/org-1AbcdeFgh1/groups/grp-1AbcdeFgh1/members?limit=20",
- "nextPageToken": "eyJsaW1pd",
- "nextPageLink": "https://coda.io/apis/admin/v1/organizations/org-1AbcdeFgh1/groups/grp-1AbcdeFgh1/members?pageToken=eyJsaW1pd"
}
Legal holds are used to ensure a given set of docs cannot be deleted and enables simplified export management of doc content.
Returns a list of legal holds in the organization
organizationId required | string Example: org-AbCDeFGHIj ID of the organization. |
limit | integer [ 1 .. 500 ] Default: 100 Example: limit=10 Maximum number of results to return in this query. |
pageToken | string Example: pageToken=eyJsaW1pd An opaque token used to fetch the next page of results. |
query | string Example: query=feature%parity Search terms used to narrow down results. |
required | Array of objects (LegalHold) |
href required | string <url> API link to these results |
nextPageToken | string (NextPageToken) If specified, an opaque token used to fetch the next page of results. |
nextPageLink | string <url> If specified, a link that can be used to fetch the next page of results. |
import requests headers = {'Authorization': 'Bearer <your API token>'} uri = 'https://coda.io/apis/admin/v1/organizations/<your organization id>/legalHolds' res = requests.get(uri, headers=headers).json() print(f'First legal hold's name is: {res["items"][0]["name"]}')
{- "items": [
- {
- "type": "legalHold",
- "id": "0d470e5b-d145-4440-a897-df57f4d72dfb",
- "name": "Investigation Matter 123",
- "description": "Holding docs for legal matter 123",
- "creator": "april@example.com",
- "creatorName": "April Jane",
- "rangeStart": "2024-01-08T00:00:00.000Z",
- "rangeEnd": "2024-04-11T00:00:00.000Z",
- "docCount": 143,
- "userCount": 12,
- "state": "indexing",
- "createdAt": "2024-04-13T00:18:57.946Z",
- "updatedAt": "2024-04-13T00:18:57.946Z"
}
], - "href": "https://coda.io/apis/admin/v1/organizations/<your organization id>/legalHolds",
- "nextPageToken": "eyJsaW1pd",
- "nextPageLink": "https://coda.io/apis/admin/v1/organizations/<your organization id>/legalHolds?pageToken=eyJsaW1pd"
}
Creates a new legal hold in the Organization.
organizationId required | string Example: org-AbCDeFGHIj ID of the organization. |
Parameters for adding the new legal hold.
name required | string The name of the new legal hold |
rangeStart required | string <date-time> Timestamp of the beginning of the hold range |
userEmails required | Array of strings <email> List of email addresses of users to include in the hold. |
description | string Description of the new legal hold |
rangeEnd | string <date-time> Timestamp of the end of the hold range |
id required | string <uuid> Id of the new legal hold |
{- "name": "Investigation Matter 123",
- "description": "Holding docs for legal matter 123",
- "rangeStart": "2024-01-08T00:00:00.000Z",
- "rangeEnd": "2024-04-11T00:00:00.000Z",
- "userEmails": [
- "user@example.com"
]
}
{- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08"
}
Returns metadata for a specific legal hold
organizationId required | string Example: org-AbCDeFGHIj ID of the organization. |
legalHoldId required | string <uuid> Example: 0d470e5b-d145-4440-a897-df57f4d72dfb ID of the legal hold. |
type required | string Value: "legalHold" The type of this resource. |
id required | string <uuid> ID of the legal hold. |
name required | string Name of the hold. |
creator required | string <email> Email address of the legal hold creator |
creatorName required | string Name of the legal hold creator |
rangeStart required | string <date-time> Timestamp of the beginning of the hold range |
userCount required | number Count of users included in the hold |
state required | string (LegalHoldState) Enum: "indexing" "active" |
createdAt required | string <date-time> Timestamp for when the legal hold was created. |
updatedAt required | string <date-time> Timestamp for when the legal hold was last modified. |
description | string Description of the hold. |
rangeEnd | string <date-time> Timestamp of the end of the hold range |
docCount | number Count of docs included in the hold, after indexing has stabilized |
import requests headers = {'Authorization': 'Bearer <your API token>'} uri = 'https://coda.io/apis/admin/v1/organizations/<your organization id>/legalHolds/<your legal hold id>' res = requests.get(uri, headers=headers).json() print(f'Legal hold's name is: {res["name"]}')
{- "type": "legalHold",
- "id": "0d470e5b-d145-4440-a897-df57f4d72dfb",
- "name": "Investigation Matter 123",
- "description": "Holding docs for legal matter 123",
- "creator": "april@example.com",
- "creatorName": "April Jane",
- "rangeStart": "2024-01-08T00:00:00.000Z",
- "rangeEnd": "2024-04-11T00:00:00.000Z",
- "docCount": 143,
- "userCount": 12,
- "state": "indexing",
- "createdAt": "2024-04-13T00:18:57.946Z",
- "updatedAt": "2024-04-13T00:18:57.946Z"
}
Updates the legal hold.
organizationId required | string Example: org-AbCDeFGHIj ID of the organization. |
legalHoldId required | string <uuid> Example: 0d470e5b-d145-4440-a897-df57f4d72dfb ID of the legal hold. |
Parameters for the legal hold.
name | string The name of the legal hold |
description | string Description of the legal hold |
rangeStart | string <date-time> Timestamp of the beginning of the hold range |
rangeEnd | string or null <date-time> Timestamp of the end of the hold range |
The result of updating a legal hold.
{- "name": "Investigation Matter 123",
- "description": "string",
- "rangeStart": "2024-01-08T00:00:00.000Z",
- "rangeEnd": "2024-04-11T00:00:00.000Z"
}
{ }
Deletes an existing legal hold.
organizationId required | string Example: org-AbCDeFGHIj ID of the organization. |
legalHoldId required | string <uuid> Example: 0d470e5b-d145-4440-a897-df57f4d72dfb ID of the legal hold. |
The result of deleting a legal hold.
import requests headers = {'Authorization': 'Bearer <your API token>'} uri = f'https://coda.io/apis/admin/v1/organizations/<your organization id>/legalHolds/<your legal hold id>' res = requests.delete(uri, headers=headers, json=payload) # => Delete the legal hold
{ }
Returns a list of docs held by the legal hold
organizationId required | string Example: org-AbCDeFGHIj ID of the organization. |
legalHoldId required | string <uuid> Example: 0d470e5b-d145-4440-a897-df57f4d72dfb ID of the legal hold. |
limit | integer [ 1 .. 500 ] Default: 100 Example: limit=10 Maximum number of results to return in this query. |
pageToken | string Example: pageToken=eyJsaW1pd An opaque token used to fetch the next page of results. |
query | string Example: query=feature%parity Search terms used to narrow down results. |
required | Array of objects (Doc) |
href required | string <url> API link to these results |
nextPageToken | string (NextPageToken) If specified, an opaque token used to fetch the next page of results. |
nextPageLink | string <url> If specified, a link that can be used to fetch the next page of results. |
import requests headers = {'Authorization': 'Bearer <your API token>'} uri = 'https://coda.io/apis/admin/v1/organizations/<your organization id>/legalHolds/<your legal hold id>/docs' res = requests.get(uri, headers=headers).json() print(f'First legal hold doc's name is: {res["items"][0]["name"]}')
{- "items": [
- {
- "type": "doc",
- "id": "AbCDeFGH",
- "name": "Product Launch Hub",
- "icon": "exclamation-circle-filled",
- "href": "https://coda.io/apis/admin/v1/docs/AbCDeFGH",
- "browserLink": "https://coda.io/d/_dAbCDeFGH",
- "folderId": "fl-es129308",
- "workspaceId": "ws-sdfmsdf9",
- "owner": "april@example.com",
- "ownerName": "April Jane",
- "createdAt": "2018-04-11T00:18:57.946Z",
- "updatedAt": "2018-04-11T00:18:57.946Z",
- "acl": [
- {
- "type": "permission",
- "principal": {
- "type": "email",
- "email": "example@domain.com"
}, - "id": "string",
- "access": "readonly"
}
], - "truncatedAcl": true,
- "aclSummary": {
- "worldwideAccess": "readonly",
- "domainShares": [
- "string"
], - "workspaceShares": [
- "string"
], - "numGroupPermissions": {
- "type": "exactCount",
- "exactCount": 0
}, - "numUserPermissions": {
- "type": "exactCount",
- "exactCount": 0
}
}, - "searchHit": {
- "matchText": "Objective: Key Results:\n* Reach <span class=\"hit\">feature parity</span> with previous version\n",
- "browserLink": "https://coda.io/d/_dAbCDeFGH"
}, - "docUsersLast90Days": 42,
- "isDeleted": false,
- "installedPackCount": 3,
- "discoverableViaWeb": true,
- "documentAnalytics": {
- "lastActiveDate": "2018-04-11T00:18:57.946Z",
- "numPages": 3,
- "numPageViewsLast90Days": 42,
- "numCollaboratorsLast90Days": 42,
- "externallySharedUserDomains": [
- "gmail.com",
- "outlook.com"
]
}
}
], - "href": "https://coda.io/apis/admin/v1/organizations/<your organization id>/docs",
- "nextPageToken": "eyJsaW1pd",
- "nextPageLink": "https://coda.io/apis/admin/v1/organizations/<your organization id>/docs?pageToken=eyJsaW1pd"
}
Returns a list of exports created for the legal hold
organizationId required | string Example: org-AbCDeFGHIj ID of the organization. |
legalHoldId required | string <uuid> Example: 0d470e5b-d145-4440-a897-df57f4d72dfb ID of the legal hold. |
limit | integer [ 1 .. 500 ] Default: 100 Example: limit=10 Maximum number of results to return in this query. |
pageToken | string Example: pageToken=eyJsaW1pd An opaque token used to fetch the next page of results. |
query | string Example: query=feature%parity Search terms used to narrow down results. |
required | Array of objects (LegalHoldExport) |
href required | string <url> API link to these results |
nextPageToken | string (NextPageToken) If specified, an opaque token used to fetch the next page of results. |
nextPageLink | string <url> If specified, a link that can be used to fetch the next page of results. |
import requests headers = {'Authorization': 'Bearer <your API token>'} uri = 'https://coda.io/apis/admin/v1/organizations/<your organization id>/legalHolds/<your legal hold id>/exports' res = requests.get(uri, headers=headers).json() print(f'First legal hold export's name is: {res["items"][0]["name"]}')
{- "items": [
- {
- "type": "legalHoldExport",
- "id": "0d470e5b-d145-4440-a897-df57f4d72dfb",
- "name": "Export of docs for investigation matter 123",
- "creator": "april@example.com",
- "creatorName": "April Jane",
- "exportAt": "2024-01-08T00:00:00.000Z",
- "format": "pdfzip",
- "docCount": 143,
- "state": "generating",
- "createdAt": "2024-04-13T00:18:57.946Z",
- "updatedAt": "2024-04-13T00:18:57.946Z",
- "downloadUrl": "string",
- "downloadSize": 0,
- "error": "string"
}
], - "href": "https://coda.io/apis/admin/v1/organizations/<your organization id>/legalHolds/<your legal hold id>/exports",
- "nextPageToken": "eyJsaW1pd",
- "nextPageLink": "https://coda.io/apis/admin/v1/organizations/<your organization id>/legalHolds/<your legal hold id>/exports?pageToken=eyJsaW1pd"
}
Creates a new legal hold export for the hold.
organizationId required | string Example: org-AbCDeFGHIj ID of the organization. |
legalHoldId required | string <uuid> Example: 0d470e5b-d145-4440-a897-df57f4d72dfb ID of the legal hold. |
Parameters for adding the new legal hold export.
name required | string The name of the new legal hold export |
exportAt | string <date-time> Exports docs in the state they were in as of this timestamp |
docIds | Array of strings List of doc IDs to include in the export |
id required | string <uuid> Id of the new legal hold export |
{- "name": "Export of docs for investigation matter 123",
- "exportAt": "2024-01-08T00:00:00.000Z",
- "docIds": [
- "string"
]
}
{- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08"
}
Returns metadata for a specific legal hold export
organizationId required | string Example: org-AbCDeFGHIj ID of the organization. |
legalHoldId required | string <uuid> Example: 0d470e5b-d145-4440-a897-df57f4d72dfb ID of the legal hold. |
legalHoldExportId required | string <uuid> Example: 0d470e5b-d145-4440-a897-df57f4d72dfb ID of the legal hold export. |
type required | string Value: "legalHoldExport" The type of this resource. |
id required | string <uuid> ID of the legal hold export. |
name required | string Name of the export. |
creator required | string <email> Email address of the legal hold export creator |
creatorName required | string Name of the legal hold export creator |
exportAt required | string <date-time> Docs are exported in the state corresponding to this timestamp |
format required | string (LegalHoldExportFormat) Value: "pdfzip" |
state required | string (LegalHoldExportState) Enum: "generating" "ready" "error" |
createdAt required | string <date-time> Timestamp for when the legal hold export was created. |
updatedAt required | string <date-time> Timestamp for when the legal hold export was last modified. |
docCount | number Count of docs included in the export |
downloadUrl | string <url> URL to download the exported doc package once the export is complete |
downloadSize | number Size of the exported doc package in bytes |
error | string Error message if the export failed |
import requests headers = {'Authorization': 'Bearer <your API token>'} uri = 'https://coda.io/apis/admin/v1/organizations/<your organization id>/legalHolds/<your legal hold id>/exports/<your export id>' res = requests.get(uri, headers=headers).json() print(f'Legal hold export's name is: {res["name"]}')
{- "type": "legalHoldExport",
- "id": "0d470e5b-d145-4440-a897-df57f4d72dfb",
- "name": "Export of docs for investigation matter 123",
- "creator": "april@example.com",
- "creatorName": "April Jane",
- "exportAt": "2024-01-08T00:00:00.000Z",
- "format": "pdfzip",
- "docCount": 143,
- "state": "generating",
- "createdAt": "2024-04-13T00:18:57.946Z",
- "updatedAt": "2024-04-13T00:18:57.946Z",
- "downloadUrl": "string",
- "downloadSize": 0,
- "error": "string"
}
Deletes an existing legal hold export.
organizationId required | string Example: org-AbCDeFGHIj ID of the organization. |
legalHoldId required | string <uuid> Example: 0d470e5b-d145-4440-a897-df57f4d72dfb ID of the legal hold. |
legalHoldExportId required | string <uuid> Example: 0d470e5b-d145-4440-a897-df57f4d72dfb ID of the legal hold export. |
The result of deleting a legal hold export.
import requests headers = {'Authorization': 'Bearer <your API token>'} uri = f'https://coda.io/apis/admin/v1/organizations/<your organization id>/legalHolds/<your legal hold id>/exports/<your export id>' res = requests.delete(uri, headers=headers, json=payload) # => Delete the legal hold export
{ }
Returns a list of users included in the legal hold
organizationId required | string Example: org-AbCDeFGHIj ID of the organization. |
legalHoldId required | string <uuid> Example: 0d470e5b-d145-4440-a897-df57f4d72dfb ID of the legal hold. |
limit | integer [ 1 .. 500 ] Default: 100 Example: limit=10 Maximum number of results to return in this query. |
pageToken | string Example: pageToken=eyJsaW1pd An opaque token used to fetch the next page of results. |
required | Array of objects (OrgUser) |
href required | string <url> API link to these results |
nextPageToken | string (NextPageToken) If specified, an opaque token used to fetch the next page of results. |
nextPageLink | string <url> If specified, a link that can be used to fetch the next page of results. |
import requests headers = {'Authorization': 'Bearer <your API token>'} uri = 'https://coda.io/apis/admin/v1/organizations/<your organization id>/legalHolds/<your legal hold id>/users' res = requests.get(uri, headers=headers).json() print(f'First legal hold user's email is: {res["items"][0]}')
{- "items": [
- {
- "id": 12345,
- "email": "hello@coda.io",
- "name": "Sally Jane",
- "pictureUrl": "codahosted.io/123",
- "status": "Active",
- "registeredAt": "2018-04-11T00:18:57.946Z",
- "deactivatedAt": "2018-04-11T00:18:57.946Z",
- "ownedDocCount": 12
}
], - "href": "https://coda.io/apis/admin/v1/organizations/<your organization id>/legalHolds/<your legal hold id>/users",
- "nextPageToken": "eyJsaW1pd",
- "nextPageLink": "https://coda.io/apis/admin/v1/organizations/<your organization id>/legalHolds/<your legal hold id>/users?pageToken=eyJsaW1pd"
}
Updates the users included in the legal hold.
organizationId required | string Example: org-AbCDeFGHIj ID of the organization. |
legalHoldId required | string <uuid> Example: 0d470e5b-d145-4440-a897-df57f4d72dfb ID of the legal hold. |
Parameters for the legal hold users update.
userEmailsToAdd | Array of strings <email> List of email addresses of users to add to the hold. |
userEmailsToRemove | Array of strings <email> List of email addresses of users to remove from the hold. |
The result of updating a legal hold's users.
{- "userEmailsToAdd": [
- "user@example.com"
], - "userEmailsToRemove": [
- "user@example.com"
]
}
{ }
Returns a list of organizations the caller is an administrator for
limit | integer [ 1 .. 500 ] Default: 100 Example: limit=10 Maximum number of results to return in this query. |
pageToken | string Example: pageToken=eyJsaW1pd An opaque token used to fetch the next page of results. |
required | Array of objects (Organization) |
href required | string <url> API link to these results |
nextPageToken | string (NextPageToken) If specified, an opaque token used to fetch the next page of results. |
nextPageLink | string <url> If specified, a link that can be used to fetch the next page of results. |
import requests headers = {'Authorization': 'Bearer <your API token>'} uri = 'https://coda.io/apis/admin/v1/organizations' res = requests.get(uri, headers=headers).json() print(f'First org is: {res["items"][0]["name"]}')
{- "items": [
- {
- "type": "organization",
- "id": "org-1AbcdeFgh1",
- "name": "Coda"
}
], - "href": "https://coda.io/apis/admin/v1/organizations",
- "nextPageToken": "eyJsaW1pd",
- "nextPageLink": "https://coda.io/apis/admin/v1/organizations?pageToken=eyJsaW1pd"
}
Returns the requested organization.
organizationId required | string Example: org-AbCDeFGHIj ID of the organization. |
type required | string Value: "organization" The type of this resource. |
id required | string ID of the Coda organization. |
name required | string Name of the organization. |
import requests headers = {'Authorization': 'Bearer <your API token>'} uri = 'https://coda.io/apis/admin/v1/organizations/<your organization id>' res = requests.get(uri, headers=headers).json() print(f'Org name is: {res["name"]}')
{- "type": "organization",
- "id": "org-1AbcdeFgh1",
- "name": "Coda"
}
This API enables viewing and modifying user information at the Organization level.
Returns a list of users within an organization, across all registered domains.
organizationId required | string Example: org-AbCDeFGHIj ID of the organization. |
limit | integer [ 1 .. 500 ] Default: 100 Example: limit=10 Maximum number of results to return in this query. |
pageToken | string Example: pageToken=eyJsaW1pd An opaque token used to fetch the next page of results. |
isActivated | boolean Filter results to users based on their activation status |
query | string Example: query=feature%parity Search terms used to narrow down results. |
emails | Array of strings <email> Example: emails=april@example.com,june@example.com List of emails of users to retrieve. |
deactivatedAfter | number Return users deactivated at or after the given Unix timestamp. |
includeOwnedDocCounts | boolean Include the count of docs owned by each user. |
required | Array of objects (OrgUser) |
href | string <url> API link to these results |
nextPageToken | string (NextPageToken) If specified, an opaque token used to fetch the next page of results. |
nextPageLink | string <url> If specified, a link that can be used to fetch the next page of results. |
import requests headers = {'Authorization': 'Bearer <your API token>'} uri = 'https://coda.io/apis/admin/v1/organizations/<your organization id>/users' res = requests.get(uri, headers=headers, params=params).json() print(f'First user is: {res["items"][0]["email"]}')
{- "items": [
- {
- "id": 12345,
- "email": "hello@coda.io",
- "name": "Sally Jane",
- "pictureUrl": "codahosted.io/123",
- "status": "Active",
- "registeredAt": "2018-04-11T00:18:57.946Z",
- "deactivatedAt": "2018-04-11T00:18:57.946Z",
- "ownedDocCount": 12
}
], - "href": "https://coda.io/apis/admin/v1/organizations/org-1AbcdeFgh1/users?limit=20",
- "nextPageToken": "eyJsaW1pd",
- "nextPageLink": "https://coda.io/apis/admin/v1/organizations/org-1AbcdeFgh1/users?pageToken=eyJsaW1pd"
}
Transfers resources such as docs and workspace membership from a deactivated user to an active user.
organizationId required | string Example: org-AbCDeFGHIj ID of the organization. |
Parameters for the resource transfer.
fromEmail required | string The email address of the user to transfer resources away from. |
toEmail required | string The email address of the user to transfer resources to. |
filterDocIds | Array of strings List of IDs of docs to transfer. Must be owned by the from user. If unspecified transfers all docs the from user owns. |
requestId required | string An opaque identifier that represents the request. |
{- "fromEmail": "joe@example.com",
- "toEmail": "april@example.com",
- "filterDocIds": [
- "AbCDeFGH"
]
}
{- "requestId": "c5cb3278-800e-4ae3-be53-19b0b794f8e1"
}
Activates a deactivated user.
organizationId required | string Example: org-AbCDeFGHIj ID of the organization. |
userEmail required | string <email> Example: april@example.com User to act upon. |
Parameters for activating a deactivated user.
bypassScim | boolean By default, requests to update org users' activation state are rejected if SCIM is enabled for the organization. Updating membership here may cause Coda to be out of sync with your identity provider and/or refreshes from SCIM may overwrite your changes here. Set this flag to bypass this protection. |
The result of a change to an org user's state.
{- "bypassScim": true
}
{ }
Deactivates a user, ensuring the user is no longer paid and allowing their docs to be reassigned to a new owner.
organizationId required | string Example: org-AbCDeFGHIj ID of the organization. |
userEmail required | string <email> Example: april@example.com User to act upon. |
Parameters for deactivating a user.
bypassScim | boolean By default, requests to update org users' activation state are rejected if SCIM is enabled for the organization. Updating membership here may cause Coda to be out of sync with your identity provider and/or refreshes from SCIM may overwrite your changes here. Set this flag to bypass this protection. |
The result of a change to an org user's state.
{- "bypassScim": true
}
{ }
Returns a list of Pack controls for the organization
organizationId required | string Example: org-AbCDeFGHIj ID of the organization. |
limit | integer [ 1 .. 500 ] Default: 100 Example: limit=10 Maximum number of results to return in this query. |
pageToken | string Example: pageToken=eyJsaW1pd An opaque token used to fetch the next page of results. |
required | Array of objects (PackControl) |
nextPageToken | string (NextPageToken) If specified, an opaque token used to fetch the next page of results. |
nextPageLink | string <url> If specified, a link that can be used to fetch the next page of results. |
import requests headers = {'Authorization': 'Bearer <your API token>'} uri = 'https://coda.io/apis/admin/v1/organization/<your organization id>/packs/controls' res = requests.get(uri, headers=headers).json() print(f'First Pack request is from: {res["items"][0]["pack"]["name"]}')
{- "items": [
- {
- "type": "packControl",
- "organizationId": "org-1AbcdeFgh1",
- "pack": {
- "type": "pack",
- "id": 1003,
- "name": "Cool Geometry Formulas"
}, - "access": "allow",
- "creationTimestamp": 0,
- "modificationTimestamp": 0
}
], - "nextPageToken": "eyJsaW1pd",
- "nextPageLink": "string"
}
Sets pack control for an Pack
organizationId required | string Example: org-AbCDeFGHIj ID of the organization. |
packId required | integer >= 1 Example: 123 ID of a Pack |
Parameters for setting a Pack control for a pack.
access required | string (PackAccess) Enum: "allow" "deny" "requiresConfiguration" Determines how the Pack can be used in the context of the organization. |
type required | string Value: "packControl" The type of this resource. |
organizationId required | string ID of the Coda organization. |
required | object (Pack) Info about a Pack. |
access required | string (PackAccess) Enum: "allow" "deny" "requiresConfiguration" Determines how the Pack can be used in the context of the organization. |
creationTimestamp required | number Timestamp when the Pack configuration was created. |
modificationTimestamp required | number Timestamp when the Pack configuration was last modified. |
{- "access": "allow"
}
{- "type": "packControl",
- "organizationId": "org-1AbcdeFgh1",
- "pack": {
- "type": "pack",
- "id": 1003,
- "name": "Cool Geometry Formulas"
}, - "access": "allow",
- "creationTimestamp": 0,
- "modificationTimestamp": 0
}
Pack configurations control fine grained access, scopes, feature sets, shareability of docs with installed Packs, and more settings.
Returns a list of Pack requests for the organization
organizationId required | string Example: org-AbCDeFGHIj ID of the organization. |
packIds | Array of integers Example: packIds=123,456 Comma-separated list of Pack IDs |
limit | integer [ 1 .. 500 ] Default: 100 Example: limit=10 Maximum number of results to return in this query. |
pageToken | string Example: pageToken=eyJsaW1pd An opaque token used to fetch the next page of results. |
required | Array of objects (PackRequest) |
nextPageToken | string (NextPageToken) If specified, an opaque token used to fetch the next page of results. |
nextPageLink | string <url> If specified, a link that can be used to fetch the next page of results. |
import requests headers = {'Authorization': 'Bearer <your API token>'} uri = 'https://coda.io/apis/admin/v1/organization/<your organization id>/packs/requests' res = requests.get(uri, headers=headers).json() print(f'First Pack request is from: {res["items"][0]["requestingUserName"]}')
{- "items": [
- {
- "type": "packRequest",
- "pack": {
- "type": "pack",
- "id": 1003,
- "name": "Cool Geometry Formulas"
}, - "packId": 0,
- "packName": "string",
- "requestingUserId": 0,
- "requestingUserEmail": "string",
- "requestingUserName": "string",
- "requestingUserPictureUrl": "string",
- "requestMessage": "string"
}
], - "nextPageToken": "eyJsaW1pd",
- "nextPageLink": "string"
}
Returns a list of Pack configurations for the organization
organizationId required | string Example: org-AbCDeFGHIj ID of the organization. |
packId | integer >= 1 Example: packId=123 ID of a Pack |
limit | integer [ 1 .. 500 ] Default: 100 Example: limit=10 Maximum number of results to return in this query. |
pageToken | string Example: pageToken=eyJsaW1pd An opaque token used to fetch the next page of results. |
required | Array of objects (PackConfiguration) |
nextPageToken | string (NextPageToken) If specified, an opaque token used to fetch the next page of results. |
nextPageLink | string <url> If specified, a link that can be used to fetch the next page of results. |
import requests headers = {'Authorization': 'Bearer <your API token>'} uri = 'https://coda.io/apis/admin/v1/organization/<your organization id>/packs/configurations' res = requests.get(uri, headers=headers).json() print(f'First Pack configuration is: {res["items"][0]["name"]}')
{- "items": [
- {
- "type": "packConfiguration",
- "organizationId": "org-1AbcdeFgh1",
- "packConfigurationId": "string",
- "packId": 123,
- "name": "string",
- "policy": { },
- "broadestSharing": "user",
- "creationTimestamp": 0,
- "modificationTimestamp": 0,
- "modificationUserId": 0
}
], - "nextPageToken": "eyJsaW1pd",
- "nextPageLink": "string"
}
Adds a Pack configuration for a Pack to an organization
organizationId required | string Example: org-AbCDeFGHIj ID of the organization. |
Parameters for adding a Pack configuration.
name required | string The name for the Pack configuration |
policy required | object (Policy) The Pack configuration policy that governs connection details and Pack resources that a principal is allowed to use. It also defines if doc sharing permissions will be enforced to match principals allowed to use this policy. |
packId required | number The ID of the Pack. |
type required | string Value: "packConfiguration" The type of this resource. |
organizationId required | string ID of the Coda organization. |
packConfigurationId required | string ID of the Pack configuration. |
packId required | number The ID of the Pack. |
name required | string Name of the Pack configuration. |
policy required | object (Policy) The Pack configuration policy that governs connection details and Pack resources that a principal is allowed to use. It also defines if doc sharing permissions will be enforced to match principals allowed to use this policy. |
broadestSharing required | string (BroadestSharedWith) Enum: "user" "group" "organization" "nobody" Broadest type of principal a Pack configuration is shared with. |
creationTimestamp required | number Timestamp when the Pack configuration was created. |
modificationTimestamp required | number Timestamp when the Pack configuration was last modified. |
modificationUserId required | number ID of the user who last modified the Pack configuration. |
{- "name": "string",
- "policy": { },
- "packId": 123
}
{- "type": "packConfiguration",
- "organizationId": "org-1AbcdeFgh1",
- "packConfigurationId": "string",
- "packId": 123,
- "name": "string",
- "policy": { },
- "broadestSharing": "user",
- "creationTimestamp": 0,
- "modificationTimestamp": 0,
- "modificationUserId": 0
}
Returns a Pack configuration
organizationId required | string Example: org-AbCDeFGHIj ID of the organization. |
packConfigurationId required | string Example: afe84ebf-4d06-44c5-b545-a8af5036bebf ID of the Pack configuration. |
type required | string Value: "packConfiguration" The type of this resource. |
organizationId required | string ID of the Coda organization. |
packConfigurationId required | string ID of the Pack configuration. |
packId required | number The ID of the Pack. |
name required | string Name of the Pack configuration. |
policy required | object (Policy) The Pack configuration policy that governs connection details and Pack resources that a principal is allowed to use. It also defines if doc sharing permissions will be enforced to match principals allowed to use this policy. |
broadestSharing required | string (BroadestSharedWith) Enum: "user" "group" "organization" "nobody" Broadest type of principal a Pack configuration is shared with. |
creationTimestamp required | number Timestamp when the Pack configuration was created. |
modificationTimestamp required | number Timestamp when the Pack configuration was last modified. |
modificationUserId required | number ID of the user who last modified the Pack configuration. |
import requests headers = {'Authorization': 'Bearer <your API token>'} uri = 'https://coda.io/apis/admin/v1/organizations/<your organization id>/packs/configurations/<the Pack configuration id>' res = requests.get(uri, headers=headers).json() print(f'Pack configuration name is: {res["name"]}')
{- "type": "packConfiguration",
- "organizationId": "org-1AbcdeFgh1",
- "packConfigurationId": "string",
- "packId": 123,
- "name": "string",
- "policy": { },
- "broadestSharing": "user",
- "creationTimestamp": 0,
- "modificationTimestamp": 0,
- "modificationUserId": 0
}
Updates a Pack configuration and asynchronously applies to the organization by updating any existing Pack installations using the now updated Pack configuration.
organizationId required | string Example: org-AbCDeFGHIj ID of the organization. |
packConfigurationId required | string Example: afe84ebf-4d06-44c5-b545-a8af5036bebf ID of the Pack configuration. |
Parameters for updating a Pack configuration.
name | string The name for the Pack configuration |
policy | object (Policy) The Pack configuration policy that governs connection details and Pack resources that a principal is allowed to use. It also defines if doc sharing permissions will be enforced to match principals allowed to use this policy. |
type required | string Value: "packConfiguration" The type of this resource. |
organizationId required | string ID of the Coda organization. |
packConfigurationId required | string ID of the Pack configuration. |
packId required | number The ID of the Pack. |
name required | string Name of the Pack configuration. |
policy required | object (Policy) The Pack configuration policy that governs connection details and Pack resources that a principal is allowed to use. It also defines if doc sharing permissions will be enforced to match principals allowed to use this policy. |
broadestSharing required | string (BroadestSharedWith) Enum: "user" "group" "organization" "nobody" Broadest type of principal a Pack configuration is shared with. |
creationTimestamp required | number Timestamp when the Pack configuration was created. |
modificationTimestamp required | number Timestamp when the Pack configuration was last modified. |
modificationUserId required | number ID of the user who last modified the Pack configuration. |
{- "name": "string",
- "policy": { }
}
{- "type": "packConfiguration",
- "organizationId": "org-1AbcdeFgh1",
- "packConfigurationId": "string",
- "packId": 123,
- "name": "string",
- "policy": { },
- "broadestSharing": "user",
- "creationTimestamp": 0,
- "modificationTimestamp": 0,
- "modificationUserId": 0
}
Deletes the given Pack configuration and asynchronously applies to the organization by updating any existing Pack installations using the deleted Pack configuration.
organizationId required | string Example: org-AbCDeFGHIj ID of the organization. |
packConfigurationId required | string Example: afe84ebf-4d06-44c5-b545-a8af5036bebf ID of the Pack configuration. |
Response indication a request to delete a Pack configuration was successful.
import requests headers = {'Authorization': 'Bearer <your API token>'} uri = 'https://coda.io/apis/admin/v1/organizations/<your organization id>/packs/configurations/<the configuration id>' res = requests.delete(uri, headers=headers, params=params).json() print(f'Pack configuration was deleted')
{ }
Returns a list of Pack configuration permissions
organizationId required | string Example: org-AbCDeFGHIj ID of the organization. |
packConfigurationId required | string Example: afe84ebf-4d06-44c5-b545-a8af5036bebf ID of the Pack configuration. |
limit | integer [ 1 .. 500 ] Default: 100 Example: limit=10 Maximum number of results to return in this query. |
pageToken | string Example: pageToken=eyJsaW1pd An opaque token used to fetch the next page of results. |
required | Array of objects (PackConfigurationPermission) |
nextPageToken | string (NextPageToken) If specified, an opaque token used to fetch the next page of results. |
nextPageLink | string <url> If specified, a link that can be used to fetch the next page of results. |
import requests headers = {'Authorization': 'Bearer <your API token>'} uri = 'https://coda.io/apis/admin/v1/organizations/<your organization id>/packs/configurations/<the configuration id>/permissions' res = requests.get(uri, headers=headers).json() print(f'First Pack configuration permission has id: {res["items"][0]["permissionId"]}')
{- "items": [
- {
- "principal": {
- "type": "email",
- "email": "example@domain.com"
}, - "id": "string",
- "access": "readonly",
- "creationTimestamp": 0,
- "modificationUserId": 0
}
], - "nextPageToken": "eyJsaW1pd",
- "nextPageLink": "string"
}
Adds a permission to use a Pack configuration
organizationId required | string Example: org-AbCDeFGHIj ID of the organization. |
packConfigurationId required | string Example: afe84ebf-4d06-44c5-b545-a8af5036bebf ID of the Pack configuration. |
Parameters for adding a permission to use a Pack configuration.
required | any (AddedPrincipal) Metadata about a principal to add to a doc. |
required | any (Principal) Metadata about a principal. |
id required | string ID for the Permission |
access required | string Value: "readonly" Type of access. Only readonly is supported for Pack configuration permissions. |
creationTimestamp required | number Timestamp when the Pack configuration permission was created. |
modificationUserId required | number ID of the user who last modified the Pack configuration permission. |
{- "principal": {
- "type": "email",
- "email": "example@domain.com"
}
}
{- "principal": {
- "type": "email",
- "email": "example@domain.com"
}, - "id": "string",
- "access": "readonly",
- "creationTimestamp": 0,
- "modificationUserId": 0
}
Replaces the permissions to use a Pack configuration
organizationId required | string Example: org-AbCDeFGHIj ID of the organization. |
packConfigurationId required | string Example: afe84ebf-4d06-44c5-b545-a8af5036bebf ID of the Pack configuration. |
Parameters for setting permissions to use a Pack configuration.
required | Array of any (AddedPrincipal) |
required | Array of objects (PackConfigurationPermission) |
{- "principals": [
- {
- "type": "email",
- "email": "example@domain.com"
}
]
}
{- "permissions": [
- {
- "principal": {
- "type": "email",
- "email": "example@domain.com"
}, - "id": "string",
- "access": "readonly",
- "creationTimestamp": 0,
- "modificationUserId": 0
}
]
}
Deletes the given Pack configuration and triggers necessarily workflows to update docs with the policy
organizationId required | string Example: org-AbCDeFGHIj ID of the organization. |
packConfigurationId required | string Example: afe84ebf-4d06-44c5-b545-a8af5036bebf ID of the Pack configuration. |
packConfigurationPermissionId required | string Example: afe84ebf-4d06-44c5-b545-a8af5036bebf ID of the Pack configuration permission. |
The result of deleting a Pack configuration permission.
import requests headers = {'Authorization': 'Bearer <your API token>'} uri = 'https://coda.io/apis/admin/v1/organizations/<your organization id>/packs/configurations/<the configuration id>/permissions/<the permission id>' res = requests.delete(uri, headers=headers, params=params).json() print(f'Pack configuration permission was deleted')
{ }
Returns OAuth configuration metadata associated with the pack configuration
organizationId required | string Example: org-AbCDeFGHIj ID of the organization. |
packConfigurationId required | string Example: afe84ebf-4d06-44c5-b545-a8af5036bebf ID of the Pack configuration. |
maskedClientId required | string Masked OAuth client id. If not set, empty string will be returned. |
maskedClientSecret required | string Masked OAuth client secret. If not set, empty string will be returned. |
authorizationUrl required | string Authorization URL of the OAuth provider. |
tokenUrl required | string Token URL of the OAuth provider. |
import requests headers = {'Authorization': 'Bearer <your API token>'} uri = 'https://coda.io/apis/admin/v1/organizations/<your organization id>/packs/configurations/<the configuration id>/oauth' res = requests.get(uri, headers=headers).json() print(f'Masked client ID: {res["maskedClientId"]}')
{- "maskedClientId": "string",
- "maskedClientSecret": "string",
- "authorizationUrl": "string",
- "tokenUrl": "string"
}
Sets OAuth configuration metadata associated with the pack configuration
organizationId required | string Example: org-AbCDeFGHIj ID of the organization. |
packConfigurationId required | string Example: afe84ebf-4d06-44c5-b545-a8af5036bebf ID of the Pack configuration. |
Parameters for adding a permission to use a Pack configuration.
clientId | string |
clientSecret | string |
authorizationUrl | string |
tokenUrl | string |
maskedClientId required | string Masked OAuth client id. If not set, empty string will be returned. |
maskedClientSecret required | string Masked OAuth client secret. If not set, empty string will be returned. |
authorizationUrl required | string Authorization URL of the OAuth provider. |
tokenUrl required | string Token URL of the OAuth provider. |
{- "clientId": "string",
- "clientSecret": "string",
- "authorizationUrl": "string",
- "tokenUrl": "string"
}
{- "maskedClientId": "string",
- "maskedClientSecret": "string",
- "authorizationUrl": "string",
- "tokenUrl": "string"
}
Removes any OAuth configuration metadata associated with the pack configuration
organizationId required | string Example: org-AbCDeFGHIj ID of the organization. |
packConfigurationId required | string Example: afe84ebf-4d06-44c5-b545-a8af5036bebf ID of the Pack configuration. |
The result of deleting OAuth configuration metadata associated with a Pack configuration.
import requests headers = {'Authorization': 'Bearer <your API token>'} uri = 'https://coda.io/apis/admin/v1/organizations/<your organization id>/packs/configurations/<the configuration id>/oauth' res = requests.delete(uri, headers=headers, params=params).json()
{ }
Returns a list of Pack connections linked to docs across the organization.
organizationId required | string Example: org-AbCDeFGHIj ID of the organization. |
workspaceId | string Example: workspaceId=ws-1Ab234 Filter down connections to docs within this workspace. |
readAccess | string (DocPackConnectionReadAccess) Enum: "Anyone" "None" Example: readAccess=Anyone Filter down connections to those with the specified access to pull in data. |
writeAccess | string (DocPackConnectionWriteAccess) Enum: "Anyone" "Self" "None" Example: writeAccess=Anyone Filter down connections to those with the specified access to perform actions. |
limit | integer [ 1 .. 500 ] Default: 100 Example: limit=10 Maximum number of results to return in this query. |
pageToken | string Example: pageToken=eyJsaW1pd An opaque token used to fetch the next page of results. |
required | Array of objects (DocPackConnection) |
href required | string <url> API link to these results |
nextPageToken | string (NextPageToken) If specified, an opaque token used to fetch the next page of results. |
nextPageLink | string <url> If specified, a link that can be used to fetch the next page of results. |
import requests headers = {'Authorization': 'Bearer <your API token>'} uri = 'https://coda.io/apis/admin/v1/organizations/<your organization id>/docs/packConnections' params = { 'readAccess': 'Anyone', } res = requests.get(uri, headers=headers, params=params).json() print(f'First connection is for Pack: {res["items"][0]["pack"]["id"]}') # => First connection is for Pack: 1003
{- "items": [
- {
- "type": "docPackConnection",
- "doc": {
- "type": "doc",
- "id": "AbCDeFGH",
- "name": "Product Launch Hub",
- "icon": "exclamation-circle-filled",
- "href": "https://coda.io/apis/admin/v1/docs/AbCDeFGH",
- "browserLink": "https://coda.io/d/_dAbCDeFGH",
- "folderId": "fl-es129308",
- "workspaceId": "ws-sdfmsdf9",
- "owner": "april@example.com",
- "ownerName": "April Jane",
- "createdAt": "2018-04-11T00:18:57.946Z",
- "updatedAt": "2018-04-11T00:18:57.946Z",
- "acl": [
- {
- "type": "permission",
- "principal": {
- "type": "email",
- "email": "example@domain.com"
}, - "id": "string",
- "access": "readonly"
}
], - "truncatedAcl": true,
- "aclSummary": {
- "worldwideAccess": "readonly",
- "domainShares": [
- "string"
], - "workspaceShares": [
- "string"
], - "numGroupPermissions": {
- "type": "exactCount",
- "exactCount": 0
}, - "numUserPermissions": {
- "type": "exactCount",
- "exactCount": 0
}
}, - "searchHit": {
- "matchText": "Objective: Key Results:\n* Reach <span class=\"hit\">feature parity</span> with previous version\n",
- "browserLink": "https://coda.io/d/_dAbCDeFGH"
}, - "docUsersLast90Days": 42,
- "isDeleted": false,
- "installedPackCount": 3,
- "discoverableViaWeb": true,
- "documentAnalytics": {
- "lastActiveDate": "2018-04-11T00:18:57.946Z",
- "numPages": 3,
- "numPageViewsLast90Days": 42,
- "numCollaboratorsLast90Days": 42,
- "externallySharedUserDomains": [
- "gmail.com",
- "outlook.com"
]
}
}, - "connectionId": "88648447-d2c3-4bdb-b476-2150596da2e4",
- "pack": {
- "type": "pack",
- "id": 1003,
- "name": "Cool Geometry Formulas"
}, - "owner": {
- "type": "user",
- "id": 867102,
- "email": "user@example.com"
}, - "workspace": {
- "type": "workspace",
- "id": "ws-1Ab234",
- "name": "coda.io",
- "featureSet": "Free",
- "autoJoinDomains": [
- "example.com"
], - "truncatedAutoJoinDomains": false,
- "numDocMakerAdmins": 3,
- "numDocMakers": 13,
- "numEditors": 5
}, - "description": "hello@coda.io (2)",
- "readAccess": "Anyone",
- "writeAccess": "Anyone"
}
], - "href": "https://coda.io/apis/admin/v1/organizations/{organizationId}/docs/packConnections",
- "nextPageToken": "eyJsaW1pd",
- "nextPageLink": "https://coda.io/apis/admin/v1/organizations/{organizationId}/docs/packConnections?pageToken=eyJsaW1pd"
}
Returns a list of webhooks in the organization
organizationId required | string Example: org-AbCDeFGHIj ID of the organization. |
limit | integer [ 1 .. 500 ] Default: 100 Example: limit=10 Maximum number of results to return in this query. |
pageToken | string Example: pageToken=eyJsaW1pd An opaque token used to fetch the next page of results. |
required | Array of objects (Webhook) |
href required | string <url> API link to these results |
nextPageToken | string (NextPageToken) If specified, an opaque token used to fetch the next page of results. |
nextPageLink | string <url> If specified, a link that can be used to fetch the next page of results. |
import requests headers = {'Authorization': 'Bearer <your API token>'} uri = 'https://coda.io/apis/admin/v1/organizations/<your organization id>/webhooks' res = requests.get(uri, headers=headers).json() print(f'First webhook is: {res["items"][0]["name"]}')
{- "items": [
- {
- "type": "webhook",
- "id": "f88ba9d9-037d-41df-a49c-49798701ed41",
- "name": "My webhook",
- "signatureKey": "string",
- "resource": "auditEvents",
- "filters": {
- "or": [
- {
- "action": "EditDoc"
}
]
}, - "createdAt": "2018-04-11T00:18:57.946Z",
- "state": "Active",
- "lastFailureAt": "2018-04-11T00:18:57.946Z",
- "lastFailureContent": "500 Server Error",
- "lastSuccessAt": "2018-04-11T00:18:57.946Z"
}
], - "href": "https://coda.io/apis/admin/v1/organizations/<your organization id>/webhooks",
- "nextPageToken": "eyJsaW1pd",
- "nextPageLink": "https://coda.io/apis/admin/v1/organizations/<your organization id>/webhooks?pageToken=eyJsaW1pd"
}
Creates a new webhook subscription for the organization.
organizationId required | string Example: org-AbCDeFGHIj ID of the organization. |
Parameters for adding the new webhook subscription.
resource required | string (WebhookWatchedResource) Value: "auditEvents" Type of resource a webhook is subscribed to. |
target required | string <url> The target URL where webhook payloads will be sent |
name | string Name of the webhook subscription. |
object (WebhookFilter) Filter set for the webhook subscription. |
type required | string Value: "webhook" The type of this resource. |
id required | string ID of the Coda webhook subscription. |
resource required | string (WebhookWatchedResource) Value: "auditEvents" Type of resource a webhook is subscribed to. |
target required | string <url> The target URL where webhook payloads will be sent |
createdAt required | string <date-time> Timestamp for when the webhook subscription was created. |
state required | string The current state of the webhook subscription. |
name | string Name of the webhook subscription. |
signatureKey | string Key used to generate HMAC payload signatures; should be used to verify the signature of incoming webhook notifications. |
object (WebhookFilter) Filter set for the webhook subscription. | |
lastFailureAt | string <date-time> Timestamp for when the webhook last received an error while attempting to send a payload to the target. |
lastFailureContent | string Last error reported by the target. |
lastSuccessAt | string <date-time> Timestamp for when the webhook last successfully sent a payload to the target. |
{- "name": "My webhook",
- "resource": "auditEvents",
- "filters": {
- "or": [
- {
- "action": "EditDoc"
}
]
}
}
{- "type": "webhook",
- "id": "f88ba9d9-037d-41df-a49c-49798701ed41",
- "name": "My webhook",
- "signatureKey": "string",
- "resource": "auditEvents",
- "filters": {
- "or": [
- {
- "action": "EditDoc"
}
]
}, - "createdAt": "2018-04-11T00:18:57.946Z",
- "state": "Active",
- "lastFailureAt": "2018-04-11T00:18:57.946Z",
- "lastFailureContent": "500 Server Error",
- "lastSuccessAt": "2018-04-11T00:18:57.946Z"
}
Returns the requested webhook subscription.
organizationId required | string Example: org-AbCDeFGHIj ID of the organization. |
webhookId required | string <uuid> Example: f88ba9d9-037d-41df-a49c-49798701ed41 ID of the webhook subscription. |
type required | string Value: "webhook" The type of this resource. |
id required | string ID of the Coda webhook subscription. |
resource required | string (WebhookWatchedResource) Value: "auditEvents" Type of resource a webhook is subscribed to. |
target required | string <url> The target URL where webhook payloads will be sent |
createdAt required | string <date-time> Timestamp for when the webhook subscription was created. |
state required | string The current state of the webhook subscription. |
name | string Name of the webhook subscription. |
signatureKey | string Key used to generate HMAC payload signatures; should be used to verify the signature of incoming webhook notifications. |
object (WebhookFilter) Filter set for the webhook subscription. | |
lastFailureAt | string <date-time> Timestamp for when the webhook last received an error while attempting to send a payload to the target. |
lastFailureContent | string Last error reported by the target. |
lastSuccessAt | string <date-time> Timestamp for when the webhook last successfully sent a payload to the target. |
import requests headers = {'Authorization': 'Bearer <your API token>'} uri = 'https://coda.io/apis/admin/v1/organizations/<your organization id>/webhooks/<your webhook id>' res = requests.get(uri, headers=headers).json() print(f'Webhook name is: {res["name"]}')
{- "type": "webhook",
- "id": "f88ba9d9-037d-41df-a49c-49798701ed41",
- "name": "My webhook",
- "signatureKey": "string",
- "resource": "auditEvents",
- "filters": {
- "or": [
- {
- "action": "EditDoc"
}
]
}, - "createdAt": "2018-04-11T00:18:57.946Z",
- "state": "Active",
- "lastFailureAt": "2018-04-11T00:18:57.946Z",
- "lastFailureContent": "500 Server Error",
- "lastSuccessAt": "2018-04-11T00:18:57.946Z"
}
Updates parameters for an existing webhook subscription.
organizationId required | string Example: org-AbCDeFGHIj ID of the organization. |
webhookId required | string <uuid> Example: f88ba9d9-037d-41df-a49c-49798701ed41 ID of the webhook subscription. |
Parameters for the webhook subscription.
name | string Name of the webhook subscription. |
target | string <url> The target URL where webhook payloads will be sent |
object (WebhookFilter) Filter set for the webhook subscription. |
type required | string Value: "webhook" The type of this resource. |
id required | string ID of the Coda webhook subscription. |
resource required | string (WebhookWatchedResource) Value: "auditEvents" Type of resource a webhook is subscribed to. |
target required | string <url> The target URL where webhook payloads will be sent |
createdAt required | string <date-time> Timestamp for when the webhook subscription was created. |
state required | string The current state of the webhook subscription. |
name | string Name of the webhook subscription. |
signatureKey | string Key used to generate HMAC payload signatures; should be used to verify the signature of incoming webhook notifications. |
object (WebhookFilter) Filter set for the webhook subscription. | |
lastFailureAt | string <date-time> Timestamp for when the webhook last received an error while attempting to send a payload to the target. |
lastFailureContent | string Last error reported by the target. |
lastSuccessAt | string <date-time> Timestamp for when the webhook last successfully sent a payload to the target. |
{- "name": "My webhook",
- "filters": {
- "or": [
- {
- "action": "EditDoc"
}
]
}
}
{- "type": "webhook",
- "id": "f88ba9d9-037d-41df-a49c-49798701ed41",
- "name": "My webhook",
- "signatureKey": "string",
- "resource": "auditEvents",
- "filters": {
- "or": [
- {
- "action": "EditDoc"
}
]
}, - "createdAt": "2018-04-11T00:18:57.946Z",
- "state": "Active",
- "lastFailureAt": "2018-04-11T00:18:57.946Z",
- "lastFailureContent": "500 Server Error",
- "lastSuccessAt": "2018-04-11T00:18:57.946Z"
}
Deletes a webhook subscription.
organizationId required | string Example: org-AbCDeFGHIj ID of the organization. |
webhookId required | string <uuid> Example: f88ba9d9-037d-41df-a49c-49798701ed41 ID of the webhook subscription. |
The result of deleting a webhook subscription.
import requests headers = {'Authorization': 'Bearer <your API token>'} uri = 'https://coda.io/apis/admin/v1/organizations/<your organization id>/webhooks/<your webhook id>' res = requests.delete(uri, headers=headers, params=params, json=body).json() print(f'Deleted the webhook subscription')
{ }
Resets a webhook subscription. Will force re-initialization of the webhook subscription, including the initial handshake process. Used to re-start a webhook that previously failed the initial handshake or that has become disabled due to the target failing too many consecutive webhook payloads.
organizationId required | string Example: org-AbCDeFGHIj ID of the organization. |
webhookId required | string <uuid> Example: f88ba9d9-037d-41df-a49c-49798701ed41 ID of the webhook subscription. |
type required | string Value: "webhook" The type of this resource. |
id required | string ID of the Coda webhook subscription. |
resource required | string (WebhookWatchedResource) Value: "auditEvents" Type of resource a webhook is subscribed to. |
target required | string <url> The target URL where webhook payloads will be sent |
createdAt required | string <date-time> Timestamp for when the webhook subscription was created. |
state required | string The current state of the webhook subscription. |
name | string Name of the webhook subscription. |
signatureKey | string Key used to generate HMAC payload signatures; should be used to verify the signature of incoming webhook notifications. |
object (WebhookFilter) Filter set for the webhook subscription. | |
lastFailureAt | string <date-time> Timestamp for when the webhook last received an error while attempting to send a payload to the target. |
lastFailureContent | string Last error reported by the target. |
lastSuccessAt | string <date-time> Timestamp for when the webhook last successfully sent a payload to the target. |
import requests headers = {'Authorization': 'Bearer <your API token>'} uri = 'https://coda.io/apis/admin/v1/organizations/<your organization id>/webhooks/<your webhook id>/reset' res = requests.post(uri, headers=headers).json() print(f'Webhook subscription has been reset')
{- "type": "webhook",
- "id": "f88ba9d9-037d-41df-a49c-49798701ed41",
- "name": "My webhook",
- "signatureKey": "string",
- "resource": "auditEvents",
- "filters": {
- "or": [
- {
- "action": "EditDoc"
}
]
}, - "createdAt": "2018-04-11T00:18:57.946Z",
- "state": "Active",
- "lastFailureAt": "2018-04-11T00:18:57.946Z",
- "lastFailureContent": "500 Server Error",
- "lastSuccessAt": "2018-04-11T00:18:57.946Z"
}
Returns a list of workspaces in the organization
organizationId required | string Example: org-AbCDeFGHIj ID of the organization. |
workspaceIds | Array of strings Example: workspaceIds=ws-AbCDeFGHIj Comma-separated list of workspace IDs |
limit | integer [ 1 .. 500 ] Default: 100 Example: limit=10 Maximum number of results to return in this query. |
pageToken | string Example: pageToken=eyJsaW1pd An opaque token used to fetch the next page of results. |
query | string Example: query=feature%parity Search terms used to narrow down results. |
includeAllWorkspaceData | boolean Include optional workspace data in the response. |
required | Array of objects (Workspace) |
href required | string <url> API link to these results |
nextPageToken | string (NextPageToken) If specified, an opaque token used to fetch the next page of results. |
nextPageLink | string <url> If specified, a link that can be used to fetch the next page of results. |
import requests headers = {'Authorization': 'Bearer <your API token>'} uri = 'https://coda.io/apis/admin/v1/organizations/<your organization id>/workspaces' res = requests.get(uri, headers=headers).json() print(f'First workspace is: {res["items"][0]["name"]}')
{- "items": [
- {
- "type": "workspace",
- "id": "ws-1Ab234",
- "name": "coda.io",
- "featureSet": "Free",
- "autoJoinDomains": [
- "example.com"
], - "truncatedAutoJoinDomains": false,
- "numDocMakerAdmins": 3,
- "numDocMakers": 13,
- "numEditors": 5
}
], - "href": "https://coda.io/apis/admin/v1/organizations/<your organization id>/workspaces",
- "nextPageToken": "eyJsaW1pd",
- "nextPageLink": "https://coda.io/apis/admin/v1/organizations/<your organization id>/workspaces?pageToken=eyJsaW1pd"
}
Returns the requested workspace.
organizationId required | string Example: org-AbCDeFGHIj ID of the organization. |
workspaceId required | string Example: ws-AbCDeFGHIj ID of the workspace. |
type required | string Value: "workspace" The type of this resource. |
id required | string ID of the Coda workspace. |
name required | string Name of the workspace. |
featureSet | string (FeatureSet) Deprecated Enum: "Free" "Pro" "Team" "Enterprise" Pricing plan associated with a workspace. |
autoJoinDomains | Array of strings <domain> When enabled for the org new users matching the specified auto-join domains will get added as workspace members. |
truncatedAutoJoinDomains | boolean Whether the auto-join domains list is truncated; if true use a paginated query to fetch all domains. |
numDocMakerAdmins | integer Number of Doc Maker Admins in the workspace. |
numDocMakers | integer Number of Doc Makers in the workspace. |
numEditors | integer Number of Editors in the workspace. |
import requests headers = {'Authorization': 'Bearer <your API token>'} uri = 'https://coda.io/apis/admin/v1/organizations/<your organization id>/workspaces/<your workspace id>' res = requests.get(uri, headers=headers).json() print(f'Workspace name is: {res["name"]}')
{- "type": "workspace",
- "id": "ws-1Ab234",
- "name": "coda.io",
- "featureSet": "Free",
- "autoJoinDomains": [
- "example.com"
], - "truncatedAutoJoinDomains": false,
- "numDocMakerAdmins": 3,
- "numDocMakers": 13,
- "numEditors": 5
}
Returns a list of users within a workspace.
organizationId required | string Example: org-AbCDeFGHIj ID of the organization. |
workspaceId required | string Example: ws-AbCDeFGHIj ID of the workspace. |
limit | integer [ 1 .. 500 ] Default: 100 Example: limit=10 Maximum number of results to return in this query. |
pageToken | string Example: pageToken=eyJsaW1pd An opaque token used to fetch the next page of results. |
workspaceUserRoles | Array of strings (WorkspaceUserRole) Items Enum: "Admin" "DocMaker" "Editor" Filter results to users based on their role in the workspace |
required | Array of objects (WorkspaceUser) |
href | string <url> API link to these results |
nextPageToken | string (NextPageToken) If specified, an opaque token used to fetch the next page of results. |
nextPageLink | string <url> If specified, a link that can be used to fetch the next page of results. |
import requests headers = {'Authorization': 'Bearer <your API token>'} uri = 'https://coda.io/apis/admin/v1/organizations/<your organization id>/workspaces/<your workspace id>/users' res = requests.get(uri, headers=headers, params=params).json() print(f'First user is: {res["items"][0]["email"]}')
{- "items": [
- {
- "id": 12345,
- "email": "hello@coda.io",
- "role": "Admin",
- "name": "Sally Jane",
- "pictureUrl": "codahosted.io/123",
- "registeredAt": "2018-04-11T00:18:57.946Z",
- "roleChangedAt": "2018-04-11T00:18:57.946Z",
- "lastActiveAt": "2018-04-11T00:18:57.946Z",
- "docsLastActiveAt": "2018-04-11T00:18:57.946Z",
- "totalDocs": 2,
- "totalCollaborators": 5
}
], - "href": "https://coda.io/apis/admin/v1/organizations/org-1AbcdeFgh1/workspaces/ws-n123897sfd/users?limit=20",
- "nextPageToken": "eyJsaW1pd",
- "nextPageLink": "https://coda.io/apis/admin/v1/organizations/org-1AbcdeFgh1/workspaces/ws-n123897sfd/users?pageToken=eyJsaW1pd"
}
Adds an existing user to a workspace.
organizationId required | string Example: org-AbCDeFGHIj ID of the organization. |
workspaceId required | string Example: ws-AbCDeFGHIj ID of the workspace. |
Parameters for the workspace user.
email required | string The email address of the existing user to add to the workspace. |
role required | string (WorkspaceUserRole) Enum: "Admin" "DocMaker" "Editor" |
id required | number Unique id of the user. |
email required | string Email of the user. |
role required | string (WorkspaceUserRole) Enum: "Admin" "DocMaker" "Editor" |
name required | string Name of the user. |
registeredAt required | string <date-time> Timestamp for when the user registered in this workspace |
pictureUrl | string <url> Picture url of the user. |
roleChangedAt | string <date-time> Timestamp for when the user's role last changed in this workspace. |
lastActiveAt | string <date-time> Member's last login date to Coda. |
docsLastActiveAt | string <date-time> The last date anyone used any of the member's Total docs. |
totalDocs | number Docs the member owns, is an admin of, or has taken a Doc Maker action on in the last 90 days. |
totalCollaborators | number Unique members who have viewed any of the member's Total docs in the last 90 days. |
{- "email": "joe@example.com",
- "role": "Admin"
}
{- "id": 12345,
- "email": "hello@coda.io",
- "role": "Admin",
- "name": "Sally Jane",
- "pictureUrl": "codahosted.io/123",
- "registeredAt": "2018-04-11T00:18:57.946Z",
- "roleChangedAt": "2018-04-11T00:18:57.946Z",
- "lastActiveAt": "2018-04-11T00:18:57.946Z",
- "docsLastActiveAt": "2018-04-11T00:18:57.946Z",
- "totalDocs": 2,
- "totalCollaborators": 5
}
Updates the role of the given user in the workspace.
organizationId required | string Example: org-AbCDeFGHIj ID of the organization. |
workspaceId required | string Example: ws-AbCDeFGHIj ID of the workspace. |
userEmail required | string <email> Example: april@example.com User to act upon. |
Parameters for the workspace user.
role required | string (WorkspaceUserRole) Enum: "Admin" "DocMaker" "Editor" |
id required | number Unique id of the user. |
email required | string Email of the user. |
role required | string (WorkspaceUserRole) Enum: "Admin" "DocMaker" "Editor" |
name required | string Name of the user. |
registeredAt required | string <date-time> Timestamp for when the user registered in this workspace |
pictureUrl | string <url> Picture url of the user. |
roleChangedAt | string <date-time> Timestamp for when the user's role last changed in this workspace. |
lastActiveAt | string <date-time> Member's last login date to Coda. |
docsLastActiveAt | string <date-time> The last date anyone used any of the member's Total docs. |
totalDocs | number Docs the member owns, is an admin of, or has taken a Doc Maker action on in the last 90 days. |
totalCollaborators | number Unique members who have viewed any of the member's Total docs in the last 90 days. |
{- "role": "Admin"
}
{- "id": 12345,
- "email": "hello@coda.io",
- "role": "Admin",
- "name": "Sally Jane",
- "pictureUrl": "codahosted.io/123",
- "registeredAt": "2018-04-11T00:18:57.946Z",
- "roleChangedAt": "2018-04-11T00:18:57.946Z",
- "lastActiveAt": "2018-04-11T00:18:57.946Z",
- "docsLastActiveAt": "2018-04-11T00:18:57.946Z",
- "totalDocs": 2,
- "totalCollaborators": 5
}
Removes a user from a workspace. Note this does not remove the user from Coda or from other workspaces.
organizationId required | string Example: org-AbCDeFGHIj ID of the organization. |
workspaceId required | string Example: ws-AbCDeFGHIj ID of the workspace. |
userEmail required | string <email> Example: april@example.com User to act upon. |
Result of the user workspace removal request
import requests headers = {'Authorization': 'Bearer <your API token>'} uri = 'https://coda.io/apis/admin/v1/organizations/<your organization id>/workspaces/<your workspace id>/users/<user email>' res = requests.delete(uri, headers=headers, params=params, json=body).json() print(f'Removed the user from the workspace')
{ }