Struct Client

Source
pub struct Client { /* private fields */ }
Expand description

Client for Coda API

§Introduction

The Coda API is a RESTful API that lets you programmatically interact with Coda docs:

  • List and search Coda docs
  • Create new docs and copy existing ones
  • Share and publish docs
  • Discover pages, tables, formulas, and controls
  • Read, insert, upsert, update, and delete rows

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.

§Getting Started

Our Getting Started Guide helps you learn the basic of working with the API and shows a few ways you can use it. Check it out, and learn how to:

  • Read data from Coda tables and write back to them
  • Build a one-way sync from one Coda doc to another
  • Automate reminders
  • Sync your Google Calendar to Coda

§Using the API

Coda’s REST API is designed to be straightforward to use. You can use the language and platform of your choice to make requests. To get a feel for the API, you can also use a tool like Postman or Insomnia.

§API Endpoint

This API uses a base path of https://coda.io/apis/v1.

Each resource instance retrieved via the API has the following fields:

  • id: The resource’s immutable ID, which can be used to refer to it within its context
  • type: The type of resource, useful for identifying it in a heterogenous collection of results
  • href: A fully qualified URI that can be used to refer to and get the latest details on the resource

Most resources can be queried by their name or ID. We recommend sticking with IDs where possible, as names are fragile and prone to being changed by your doc’s users.

§List Endpoints

Endpoints supporting listing of resources have the following fields:

  • items: An array containing the listed resources, limited by the limit or pageToken query parameters
  • nextPageLink: If more results are available, an API link to the next page of results
  • nextPageToken: If more results are available, a page token that can be passed into the pageToken query parameter

The 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.

§Doc IDs

While most object IDs will have to be discovered via the API, you may find yourself frequently wanting to get the ID of a specific Coda doc.

Here’s a handy tool that will extract it for you. (See if you can find the pattern!)

Doc ID Extractor Your doc ID is:   

§Rate Limiting

The Coda 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.

These are the current rate limits. They are subject to change at any time without notice. For robustness, all API scripts should check for HTTP 429 Too Many Requests errors and back off and retry the request. Limits apply per-user across all endpoints that share the same limit and across all docs.

Reading data (with the exceptions below): {{READ_RATE_LIMIT}}
Writing data (POST/PUT/PATCH): {{WRITE_RATE_LIMIT}}
Writing doc content data (POST/PUT/PATCH): {{WRITE_DOC_CONTENT_RATE_LIMIT}}
Listing docs: {{LIST_DOCS_RATE_LIMIT}}
Reading analytics: {{ANALYTICS_RATE_LIMIT}}

§Consistency

While edits made in Coda are shared with other collaborators in real-time, it can take a few seconds for them to become available via the API. You may also notice that changes made via the API, such as updating a row, are not immediate. These endpoints all return an HTTP 202 status code, instead of a standard 200, indicating that the edit has been accepted and queued for processing. This generally takes a few seconds, and the edit may fail if invalid. Each such edit will return a requestId in the response, and you can pass this requestId to the [#getMutationStatus](#operation/ getMutationStatus) endpoint to find out if it has been applied.

Similarly, when you get doc data from the API (rows, pages, columns, etc), the data you receive comes from the most recent “snapshot” of the doc, which might be slightly stale relative to the data you observe in your browser. If you want to ensure that the data you receive is up to date and are ok getting an error if not, you can pass this header in your request: X-Coda-Doc-Version: latest. If the API’s view of the doc is not up to date, the API will return an HTTP 400 response.

§Volatile Formulas

Coda exposes a number of “volatile” formulas, as as Today(), Now(), and User(). When used in a live Coda doc, these formulas affect what’s visible in realtime, tailored to the current user.

Such formulas behave differently with the API. Time-based values may only be current to the last edit made to the doc. User-based values may be blank or invalid.

§Free and Paid Workspaces

We make the Coda API available to all of our users free of charge, in both free and paid workspaces. However, API usage is subject to the role of the user associated with the API token in the workspace applicable to each API request. What this means is:

  • For the #createDoc endpoint specifically, the owner of the API token must be a Doc Maker (or Admin) in the workspace. If the “Any member can create docs” option in enabled in the workspace settings, they can be an Editor and will get auto-promoted to Doc Maker upon using this endpoint. Lastly, if in addition, the API key owner matches the “Auto-join email domains” setting, they will be auto-added to the workspace and promoted to Doc Maker upon using this endpoint

This behavior applies to the API as well as any integrations that may use it, such as Zapier.

§Examples

To help you get started, this documentation provides code examples in Python, Unix shell, and Google Apps Script. These examples are based on a simple doc that looks something like this:

§Python examples

These examples use Python 3.6+. If you don’t already have the requests module, use pip or easy_install to get it.

§Shell examples

The shell examples are intended to be run in a Unix shell. If you’re on Windows, you will need to install WSL.

These examples use the standard cURL utility to pull from the API, and then process it with jq to extract and format example output. If you don’t already have it, you can either install it or run the command without it to see the raw JSON output.

§Google Apps Script examples

Google Apps Script makes it easy to write code in a JavaScript-like syntax and easily access many Google products with built-in libraries. You can set up your scripts to run periodically, which makes it a good environment for writing tools without maintaining your own server.

Coda provides a library for Google Apps Script. To use it, go into Resources -> Libraries... and enter the following library ID: 15IQuWOk8MqT50FDWomh57UqWGH23gjsWVWYFms3ton6L-UHmefYHS9Vl. If you want to see the library’s source code, it’s available here.

Google provides autocomplete for API functions as well as generated docs. You can access these docs via the Libraries dialog by clicking on the library name. Required parameters that would be included in the URL path are positional arguments in each of these functions, followed by the request body, if applicable. All remaining parameters can be specified in the options object.

§OpenAPI/Swagger Spec

In an effort to standardize our API and make it accessible, we offer an OpenAPI 3.0 specification:

§Postman collection

To get started with prototyping the API quickly in Postman, you can use one of links above to import the Coda API into a collection. You’ll then need to set the appropriate header and environment variables.

§Client libraries

We do not currently support client libraries apart from Google Apps Script. To work with the Coda API, you can either use standard network libraries for your language, or use the appropriate Swagger Generator tool to auto-generate Coda API client libraries for your language of choice. We do not provide any guarantees that these autogenerated libraries are compatible with our API (e.g., some libraries may not work with Bearer authentication).

§OpenAPI 3.0

Swagger Generator 3 (that link takes you to the docs for the generator API) can generate client libraries for these languages. It’s relatively new and thus only has support for a limited set of languages at this time.

§Third-party client libraries

Some members of our amazing community have written libraries to work with our API. These aren’t officially supported by Coda, but are listed here for convenience. (Please let us know if you’ve written a library and would like to have it included here.)

  • PHP by Daniel Stieber
  • Node-RED by Mori Sugimoto
  • NodeJS by Parker McMullin
  • Ruby by Carlos Muñoz at Getro
  • Python by Mikhail Beliansky
  • Go by Artur Safin

https://coda.io/trust/tos

Version: 1.4.17

Implementations§

Source§

impl Client

Source

pub fn new(baseurl: &str) -> Self

Create a new client.

baseurl is the base URL provided to the internal reqwest::Client, and should include a scheme and hostname, as well as port and a path stem if applicable.

Source

pub fn new_with_client(baseurl: &str, client: Client) -> Self

Construct a new client with an existing reqwest::Client, allowing more control over its configuration.

baseurl is the base URL provided to the internal reqwest::Client, and should include a scheme and hostname, as well as port and a path stem if applicable.

Source

pub fn baseurl(&self) -> &String

Get the base URL to which requests are made.

Source

pub fn client(&self) -> &Client

Get the internal reqwest::Client used to make requests.

Source

pub fn api_version(&self) -> &'static str

Get the version of this API.

This string is pulled directly from the source OpenAPI document and may be in any format the API selects.

Source§

impl Client

Source

pub async fn list_categories<'a>( &'a self, ) -> Result<ResponseValue<DocCategoryList>, Error<ListCategoriesResponse>>

Get doc categories

Gets all available doc categories.

Sends a GET request to /categories

Source

pub async fn list_docs<'a>( &'a self, folder_id: Option<&'a str>, in_gallery: Option<bool>, is_owner: Option<bool>, is_published: Option<bool>, is_starred: Option<bool>, limit: Option<NonZeroU64>, page_token: Option<&'a str>, query: Option<&'a str>, source_doc: Option<&'a str>, workspace_id: Option<&'a str>, ) -> Result<ResponseValue<DocList>, Error<ListDocsResponse>>

List available docs

Returns a list of Coda docs accessible by the user, and which they have opened at least once. These are returned in the same order as on the docs page: reverse chronological by the latest event relevant to the user (last viewed, edited, or shared).

Sends a GET request to /docs

Arguments:

  • folder_id: Show only docs belonging to the given folder.
  • in_gallery: Show only docs visible within the gallery.
  • is_owner: Show only docs owned by the user.
  • is_published: Show only published docs.
  • is_starred: If true, returns docs that are starred. If false, returns docs that are not starred.
  • limit: Maximum number of results to return in this query.
  • page_token: An opaque token used to fetch the next page of results.
  • query: Search term used to filter down results.
  • source_doc: Show only docs copied from the specified doc ID.
  • workspace_id: Show only docs belonging to the given workspace.
Source

pub async fn create_doc<'a>( &'a self, body: &'a DocCreate, ) -> Result<ResponseValue<DocumentCreationResult>, Error<CreateDocResponse>>

Create doc

Creates a new Coda doc, optionally copying an existing doc. Note that creating a doc requires you to be a Doc Maker in the applicable workspace (or be auto-promoted to one).

Sends a POST request to /docs

Arguments:

  • body: Parameters for creating the doc.
Source

pub async fn get_doc<'a>( &'a self, doc_id: &'a str, ) -> Result<ResponseValue<Doc>, Error<GetDocResponse>>

Get info about a doc

Returns metadata for the specified doc.

Sends a GET request to /docs/{docId}

Arguments:

  • doc_id: ID of the doc.
Source

pub async fn delete_doc<'a>( &'a self, doc_id: &'a str, ) -> Result<ResponseValue<DocDelete>, Error<DeleteDocResponse>>

Delete doc

Deletes a doc.

Sends a DELETE request to /docs/{docId}

Arguments:

  • doc_id: ID of the doc.
Source

pub async fn update_doc<'a>( &'a self, doc_id: &'a str, body: &'a DocUpdate, ) -> Result<ResponseValue<DocUpdateResult>, Error<UpdateDocResponse>>

Update doc

Updates metadata for a doc. Note that updating a doc title requires you to be a Doc Maker in the applicable workspace.

Sends a PATCH request to /docs/{docId}

Arguments:

  • doc_id: ID of the doc.
  • body: Parameters for updating the doc.
Source

pub async fn get_sharing_metadata<'a>( &'a self, doc_id: &'a str, ) -> Result<ResponseValue<AclMetadata>, Error<GetSharingMetadataResponse>>

Get sharing metadata

Returns metadata associated with sharing for this Coda doc.

Sends a GET request to /docs/{docId}/acl/metadata

Arguments:

  • doc_id: ID of the doc.
Source

pub async fn get_permissions<'a>( &'a self, doc_id: &'a str, limit: Option<NonZeroU64>, page_token: Option<&'a str>, ) -> Result<ResponseValue<Acl>, Error<GetPermissionsResponse>>

List permissions

Returns a list of permissions for this Coda doc.

Sends a GET request to /docs/{docId}/acl/permissions

Arguments:

  • doc_id: ID of the doc.
  • limit: Maximum number of results to return in this query.
  • page_token: An opaque token used to fetch the next page of results.
Source

pub async fn add_permission<'a>( &'a self, doc_id: &'a str, body: &'a AddPermissionRequest, ) -> Result<ResponseValue<AddPermissionResult>, Error<AddPermissionResponse>>

Add permission

Adds a new permission to the doc.

Sends a POST request to /docs/{docId}/acl/permissions

Arguments:

  • doc_id: ID of the doc.
  • body: Parameters for adding the new permission.
Source

pub async fn delete_permission<'a>( &'a self, doc_id: &'a str, permission_id: &'a str, ) -> Result<ResponseValue<DeletePermissionResult>, Error<DeletePermissionResponse>>

Delete permission

Deletes an existing permission.

Sends a DELETE request to /docs/{docId}/acl/permissions/{permissionId}

Arguments:

  • doc_id: ID of the doc.
  • permission_id: ID of a permission on a doc.
Source

pub async fn search_principals<'a>( &'a self, doc_id: &'a str, query: Option<&'a str>, ) -> Result<ResponseValue<SearchPrincipalsResponse>, Error<SearchPrincipalsResponse>>

Search principals

Searches for user and group principals matching the query that this doc can be shared with. At most 20 results will be returned for both users and groups. If no query is given then no results are returned.

Sends a GET request to /docs/{docId}/acl/principals/search

Arguments:

  • doc_id: ID of the doc.
  • query: Search term used to filter down results.
Source

pub async fn get_acl_settings<'a>( &'a self, doc_id: &'a str, ) -> Result<ResponseValue<AclSettings>, Error<GetAclSettingsResponse>>

Get ACL settings

Returns settings associated with ACLs for this Coda doc.

Sends a GET request to /docs/{docId}/acl/settings

Arguments:

  • doc_id: ID of the doc.
Source

pub async fn update_acl_settings<'a>( &'a self, doc_id: &'a str, body: &'a UpdateAclSettingsRequest, ) -> Result<ResponseValue<AclSettings>, Error<UpdateAclSettingsResponse>>

Update ACL settings

Update settings associated with ACLs for this Coda doc.

Sends a PATCH request to /docs/{docId}/acl/settings

Arguments:

  • doc_id: ID of the doc.
  • body: Parameters for updating the ACL settings.
Source

pub async fn publish_doc<'a>( &'a self, doc_id: &'a str, body: &'a DocPublish, ) -> Result<ResponseValue<PublishResult>, Error<PublishDocResponse>>

Publish doc

Update publish settings for a doc.

Sends a PUT request to /docs/{docId}/publish

Arguments:

  • doc_id: ID of the doc.
  • body: Parameters for changing publish settings.
Source

pub async fn unpublish_doc<'a>( &'a self, doc_id: &'a str, ) -> Result<ResponseValue<UnpublishResult>, Error<UnpublishDocResponse>>

Unpublish doc

Unpublishes a doc.

Sends a DELETE request to /docs/{docId}/publish

Arguments:

  • doc_id: ID of the doc.
Source

pub async fn list_pages<'a>( &'a self, doc_id: &'a str, limit: Option<NonZeroU64>, page_token: Option<&'a str>, ) -> Result<ResponseValue<PageList>, Error<ListPagesResponse>>

List pages

Returns a list of pages in a Coda doc.

Sends a GET request to /docs/{docId}/pages

Arguments:

  • doc_id: ID of the doc.
  • limit: Maximum number of results to return in this query.
  • page_token: An opaque token used to fetch the next page of results.
Source

pub async fn create_page<'a>( &'a self, doc_id: &'a str, body: &'a PageCreate, ) -> Result<ResponseValue<PageCreateResult>, Error<CreatePageResponse>>

Create a page

Create a new page in a doc. Note that creating a page requires you to be a Doc Maker in the applicable workspace.

Sends a POST request to /docs/{docId}/pages

Arguments:

  • doc_id: ID of the doc.
  • body: Parameters for creating a page.
Source

pub async fn get_page<'a>( &'a self, doc_id: &'a str, page_id_or_name: &'a str, ) -> Result<ResponseValue<Page>, Error<GetPageResponse>>

Get a page

Returns details about a page.

Sends a GET request to /docs/{docId}/pages/{pageIdOrName}

Arguments:

  • doc_id: ID of the doc.
  • page_id_or_name: ID or name of the page. Names are discouraged because they’re easily prone to being changed by users. If you’re using a name, be sure to URI-encode it. If you provide a name and there are multiple pages with the same name, an arbitrary one will be selected.
Source

pub async fn update_page<'a>( &'a self, doc_id: &'a str, page_id_or_name: &'a str, body: &'a PageUpdate, ) -> Result<ResponseValue<PageUpdateResult>, Error<UpdatePageResponse>>

Update a page

Update properties for a page. Note that updating a page title or icon requires you to be a Doc Maker in the applicable workspace.

Sends a PUT request to /docs/{docId}/pages/{pageIdOrName}

Arguments:

  • doc_id: ID of the doc.

  • page_id_or_name: ID or name of the page. Names are discouraged because they’re easily prone to being changed by users. If you’re using a name, be sure to URI-encode it. If you provide a name and there are multiple pages with the same name, an arbitrary one will be selected.

  • body: Parameters for updating a page.

Source

pub async fn delete_page<'a>( &'a self, doc_id: &'a str, page_id_or_name: &'a str, ) -> Result<ResponseValue<PageDeleteResult>, Error<DeletePageResponse>>

Delete a page

Deletes the specified page.

Sends a DELETE request to /docs/{docId}/pages/{pageIdOrName}

Arguments:

  • doc_id: ID of the doc.
  • page_id_or_name: ID or name of the page. Names are discouraged because they’re easily prone to being changed by users. If you’re using a name, be sure to URI-encode it. If you provide a name and there are multiple pages with the same name, an arbitrary one will be selected.
Source

pub async fn begin_page_content_export<'a>( &'a self, doc_id: &'a str, page_id_or_name: &'a str, body: &'a BeginPageContentExportRequest, ) -> Result<ResponseValue<BeginPageContentExportResponse>, Error<BeginPageContentExportResponse>>

Begin content export

Initiate an export of content for the given page.

Sends a POST request to /docs/{docId}/pages/{pageIdOrName}/export

Arguments:

  • doc_id: ID of the doc.

  • page_id_or_name: ID or name of the page. Names are discouraged because they’re easily prone to being changed by users. If you’re using a name, be sure to URI-encode it. If you provide a name and there are multiple pages with the same name, an arbitrary one will be selected.

  • body: Parameters for requesting a page content export.

Source

pub async fn get_page_content_export_status<'a>( &'a self, doc_id: &'a str, page_id_or_name: &'a str, request_id: &'a str, ) -> Result<ResponseValue<PageContentExportStatusResponse>, Error<GetPageContentExportStatusResponse>>

Content export status

Check the status of a page content export

Sends a GET request to /docs/{docId}/pages/{pageIdOrName}/export/{requestId}

Arguments:

  • doc_id: ID of the doc.

  • page_id_or_name: ID or name of the page. Names are discouraged because they’re easily prone to being changed by users. If you’re using a name, be sure to URI-encode it. If you provide a name and there are multiple pages with the same name, an arbitrary one will be selected.

  • request_id: ID of the request.

Source

pub async fn list_tables<'a>( &'a self, doc_id: &'a str, limit: Option<NonZeroU64>, page_token: Option<&'a str>, sort_by: Option<SortBy>, table_types: Option<&'a Vec<TableTypeEnum>>, ) -> Result<ResponseValue<TableList>, Error<ListTablesResponse>>

List tables

Returns a list of tables in a Coda doc.

Sends a GET request to /docs/{docId}/tables

Arguments:

  • doc_id: ID of the doc.
  • limit: Maximum number of results to return in this query.
  • page_token: An opaque token used to fetch the next page of results.
  • sort_by: Determines how to sort the given objects.
  • table_types: Comma-separated list of table types to include in results. If omitted, includes both tables and views.
Source

pub async fn get_table<'a>( &'a self, doc_id: &'a str, table_id_or_name: &'a str, use_updated_table_layouts: Option<bool>, ) -> Result<ResponseValue<Table>, Error<GetTableResponse>>

Get a table

Returns details about a specific table or view.

Sends a GET request to /docs/{docId}/tables/{tableIdOrName}

Arguments:

  • doc_id: ID of the doc.
  • table_id_or_name: ID or name of the table. Names are discouraged because they’re easily prone to being changed by users. If you’re using a name, be sure to URI-encode it.
  • use_updated_table_layouts: Return “detail” and “form” for the layout field of detail and form layouts respectively (instead of “masterDetail” for both)
Source

pub async fn list_columns<'a>( &'a self, doc_id: &'a str, table_id_or_name: &'a str, limit: Option<NonZeroU64>, page_token: Option<&'a str>, visible_only: Option<bool>, ) -> Result<ResponseValue<ColumnList>, Error<ListColumnsResponse>>

List columns

Returns a list of columns in a table.

Sends a GET request to /docs/{docId}/tables/{tableIdOrName}/columns

Arguments:

  • doc_id: ID of the doc.
  • table_id_or_name: ID or name of the table. Names are discouraged because they’re easily prone to being changed by users. If you’re using a name, be sure to URI-encode it.
  • limit: Maximum number of results to return in this query.
  • page_token: An opaque token used to fetch the next page of results.
  • visible_only: If true, returns only visible columns for the table. This parameter only applies to base tables, and not views.
Source

pub async fn list_rows<'a>( &'a self, doc_id: &'a str, table_id_or_name: &'a str, limit: Option<NonZeroU64>, page_token: Option<&'a str>, query: Option<&'a str>, sort_by: Option<RowsSortBy>, sync_token: Option<&'a str>, use_column_names: Option<bool>, value_format: Option<ValueFormat>, visible_only: Option<bool>, ) -> Result<ResponseValue<RowList>, Error<ListRowsResponse>>

List table rows

Returns a list of rows in a table.

§Value results

The valueFormat parameter dictates in what format the API should return values for individual cells.

  • simple (default): Returns cell values as the following JSON values: string, number, or boolean. Array values (like multiselects) are returned as comma-delimited strings.
  • simpleWithArrays: Singleton values are returned as simple. Array values are returned as JSON arrays and the values within are simple values (including nested arrays).
  • rich: If applicable, returns many values with further encoding, allowing API users to have lossless access to data in Coda.
  • For text values, returns data in Markdown syntax. If the text field is simple text (e.g. has no formatting), the field will be fully escaped with triple-ticks. E.g ```This is plain text```
  • For currency, lookup, image, person and hyperlink values, the value will be encoded in JSON-LD format.
  // Currency
  {
    "@context": "http://schema.org",
    "@type": "MonetaryAmount",
    "currency": "USD",
    "amount": 42.42
  }

  // Lookup
  {
    "@context": "http://schema.org",
    "@type": "StructuredValue",
    "additionalType": "row",
    "name": "Row Name",
    "rowId": "i-123456789",
    "tableId": "grid-123456789",
    "tableUrl": "https://coda.io/d/_d123456789/grid-123456789",
    "url": "https://coda.io/d/_d123456789/grid-123456789#_r42",
  }

  // Hyperlink
  {
    "@context": "http://schema.org",
    "@type": "WebPage",
    "name": "Coda",
    "url": "https://coda.io"
  }

  // Image
  {
    "@context": "http://schema.org",
    "@type": "ImageObject",
    "name": "Coda logo",
    "url": "https://coda.io/logo.jpg"
  }

  // People
  {
    "@context": "http://schema.org",
    "@type": "Person",
    "name": "Art Vandalay",
    "email": "art@vandalayindustries.com"
  }

Sends a GET request to /docs/{docId}/tables/{tableIdOrName}/rows

Arguments:

  • doc_id: ID of the doc.

  • table_id_or_name: ID or name of the table. Names are discouraged because they’re easily prone to being changed by users. If you’re using a name, be sure to URI-encode it.

  • limit: Maximum number of results to return in this query.

  • page_token: An opaque token used to fetch the next page of results.

  • query: Query used to filter returned rows, specified as <column_id_or_name>:<value>. If you’d like to use a column name instead of an ID, you must quote it (e.g., "My Column":123). Also note that value is a JSON value; if you’d like to use a string, you must surround it in quotes (e.g., "groceries").

  • sort_by: Specifies the sort order of the rows returned. If left unspecified, rows are returned by creation time ascending. “UpdatedAt” sort ordering is the order of rows based upon when they were last updated. This does not include updates to calculated values. “Natural” sort ordering is the order that the rows appear in the table view in the application. This ordering is only meaningfully defined for rows that are visible (unfiltered). Because of this, using this sort order will imply visibleOnly=true, that is, to only return visible rows. If you pass sortBy=natural and visibleOnly=false explicitly, this will result in a Bad Request error as this condition cannot be satisfied.

  • sync_token: An opaque token returned from a previous call that can be used to return results that are relevant to the query since the call where the syncToken was generated.

  • use_column_names: Use column names instead of column IDs in the returned output. This is generally discouraged as it is fragile. If columns are renamed, code using original names may throw errors.

  • value_format: The format that cell values are returned as.

  • visible_only: If true, returns only visible rows and columns for the table.

Source

pub async fn upsert_rows<'a>( &'a self, doc_id: &'a str, table_id_or_name: &'a str, disable_parsing: Option<bool>, body: &'a RowsUpsert, ) -> Result<ResponseValue<RowsUpsertResult>, Error<UpsertRowsResponse>>

Insert/upsert rows

Inserts rows into a table, optionally updating existing rows if any upsert key columns are provided. This endpoint will always return a 202, so long as the doc and table exist and are accessible (and the update is structurally valid). Row inserts/upserts are generally processed within several seconds. Note: this endpoint only works for base tables, not views. When upserting, if multiple rows match the specified key column(s), they will all be updated with the specified value.

Sends a POST request to /docs/{docId}/tables/{tableIdOrName}/rows

Arguments:

  • doc_id: ID of the doc.
  • table_id_or_name: ID or name of the table. Names are discouraged because they’re easily prone to being changed by users. If you’re using a name, be sure to URI-encode it.
  • disable_parsing: If true, the API will not attempt to parse the data in any way.
  • body: Rows to insert or upsert.
Source

pub async fn delete_rows<'a>( &'a self, doc_id: &'a str, table_id_or_name: &'a str, body: &'a RowsDelete, ) -> Result<ResponseValue<RowsDeleteResult>, Error<DeleteRowsResponse>>

Delete multiple rows

Deletes the specified rows from the table or view. This endpoint will always return a 202. Row deletions are generally processed within several seconds.

Sends a DELETE request to /docs/{docId}/tables/{tableIdOrName}/rows

Arguments:

  • doc_id: ID of the doc.
  • table_id_or_name: ID or name of the table. Names are discouraged because they’re easily prone to being changed by users. If you’re using a name, be sure to URI-encode it.
  • body: Rows to delete.
Source

pub async fn get_row<'a>( &'a self, doc_id: &'a str, table_id_or_name: &'a str, row_id_or_name: &'a str, use_column_names: Option<bool>, value_format: Option<ValueFormat>, ) -> Result<ResponseValue<RowDetail>, Error<GetRowResponse>>

Get a row

Returns details about a row in a table.

Sends a GET request to /docs/{docId}/tables/{tableIdOrName}/rows/{rowIdOrName}

Arguments:

  • doc_id: ID of the doc.

  • table_id_or_name: ID or name of the table. Names are discouraged because they’re easily prone to being changed by users. If you’re using a name, be sure to URI-encode it.

  • row_id_or_name: ID or name of the row. Names are discouraged because they’re easily prone to being changed by users. If you’re using a name, be sure to URI-encode it. If there are multiple rows with the same value in the identifying column, an arbitrary one will be selected.

  • use_column_names: Use column names instead of column IDs in the returned output. This is generally discouraged as it is fragile. If columns are renamed, code using original names may throw errors.

  • value_format: The format that cell values are returned as.

Source

pub async fn update_row<'a>( &'a self, doc_id: &'a str, table_id_or_name: &'a str, row_id_or_name: &'a str, disable_parsing: Option<bool>, body: &'a RowUpdate, ) -> Result<ResponseValue<RowUpdateResult>, Error<UpdateRowResponse>>

Update row

Updates the specified row in the table. This endpoint will always return a 202, so long as the row exists and is accessible (and the update is structurally valid). Row updates are generally processed within several seconds. When updating using a name as opposed to an ID, an arbitrary row will be affected.

Sends a PUT request to /docs/{docId}/tables/{tableIdOrName}/rows/{rowIdOrName}

Arguments:

  • doc_id: ID of the doc.

  • table_id_or_name: ID or name of the table. Names are discouraged because they’re easily prone to being changed by users. If you’re using a name, be sure to URI-encode it.

  • row_id_or_name: ID or name of the row. Names are discouraged because they’re easily prone to being changed by users. If you’re using a name, be sure to URI-encode it. If there are multiple rows with the same value in the identifying column, an arbitrary one will be selected.

  • disable_parsing: If true, the API will not attempt to parse the data in any way.

  • body: Row update.

Source

pub async fn delete_row<'a>( &'a self, doc_id: &'a str, table_id_or_name: &'a str, row_id_or_name: &'a str, ) -> Result<ResponseValue<RowDeleteResult>, Error<DeleteRowResponse>>

Delete row

Deletes the specified row from the table or view. This endpoint will always return a 202, so long as the row exists and is accessible (and the update is structurally valid). Row deletions are generally processed within several seconds. When deleting using a name as opposed to an ID, an arbitrary row will be removed.

Sends a DELETE request to /docs/{docId}/tables/{tableIdOrName}/rows/{rowIdOrName}

Arguments:

  • doc_id: ID of the doc.
  • table_id_or_name: ID or name of the table. Names are discouraged because they’re easily prone to being changed by users. If you’re using a name, be sure to URI-encode it.
  • row_id_or_name: ID or name of the row. Names are discouraged because they’re easily prone to being changed by users. If you’re using a name, be sure to URI-encode it. If there are multiple rows with the same value in the identifying column, an arbitrary one will be selected.
Source

pub async fn push_button<'a>( &'a self, doc_id: &'a str, table_id_or_name: &'a str, row_id_or_name: &'a str, column_id_or_name: &'a str, ) -> Result<ResponseValue<PushButtonResult>, Error<PushButtonResponse>>

Push a button

Pushes a button on a row in a table. Authorization note: This action is available to API tokens that are authorized to write to the table. However, the underlying button can perform any action on the document, including writing to other tables and performing Pack actions.

Sends a POST request to /docs/{docId}/tables/{tableIdOrName}/rows/{rowIdOrName}/buttons/ {columnIdOrName}

Arguments:

  • doc_id: ID of the doc.

  • table_id_or_name: ID or name of the table. Names are discouraged because they’re easily prone to being changed by users. If you’re using a name, be sure to URI-encode it.

  • row_id_or_name: ID or name of the row. Names are discouraged because they’re easily prone to being changed by users. If you’re using a name, be sure to URI-encode it. If there are multiple rows with the same value in the identifying column, an arbitrary one will be selected.

  • column_id_or_name: ID or name of the column. Names are discouraged because they’re easily prone to being changed by users. If you’re using a name, be sure to URI-encode it.

Source

pub async fn get_column<'a>( &'a self, doc_id: &'a str, table_id_or_name: &'a str, column_id_or_name: &'a str, ) -> Result<ResponseValue<ColumnDetail>, Error<GetColumnResponse>>

Get a column

Returns details about a column in a table.

Sends a GET request to /docs/{docId}/tables/{tableIdOrName}/columns/{columnIdOrName}

Arguments:

  • doc_id: ID of the doc.
  • table_id_or_name: ID or name of the table. Names are discouraged because they’re easily prone to being changed by users. If you’re using a name, be sure to URI-encode it.
  • column_id_or_name: ID or name of the column. Names are discouraged because they’re easily prone to being changed by users. If you’re using a name, be sure to URI-encode it.
Source

pub async fn list_formulas<'a>( &'a self, doc_id: &'a str, limit: Option<NonZeroU64>, page_token: Option<&'a str>, sort_by: Option<SortBy>, ) -> Result<ResponseValue<FormulaList>, Error<ListFormulasResponse>>

List formulas

Returns a list of named formulas in a Coda doc.

Sends a GET request to /docs/{docId}/formulas

Arguments:

  • doc_id: ID of the doc.
  • limit: Maximum number of results to return in this query.
  • page_token: An opaque token used to fetch the next page of results.
  • sort_by: Determines how to sort the given objects.
Source

pub async fn get_formula<'a>( &'a self, doc_id: &'a str, formula_id_or_name: &'a str, ) -> Result<ResponseValue<Formula>, Error<GetFormulaResponse>>

Get a formula

Returns info on a formula.

Sends a GET request to /docs/{docId}/formulas/{formulaIdOrName}

Arguments:

  • doc_id: ID of the doc.
  • formula_id_or_name: ID or name of the formula. Names are discouraged because they’re easily prone to being changed by users. If you’re using a name, be sure to URI-encode it.
Source

pub async fn list_controls<'a>( &'a self, doc_id: &'a str, limit: Option<NonZeroU64>, page_token: Option<&'a str>, sort_by: Option<SortBy>, ) -> Result<ResponseValue<ControlList>, Error<ListControlsResponse>>

List controls

Returns a list of controls in a Coda doc.

Sends a GET request to /docs/{docId}/controls

Arguments:

  • doc_id: ID of the doc.
  • limit: Maximum number of results to return in this query.
  • page_token: An opaque token used to fetch the next page of results.
  • sort_by: Determines how to sort the given objects.
Source

pub async fn get_control<'a>( &'a self, doc_id: &'a str, control_id_or_name: &'a str, ) -> Result<ResponseValue<Control>, Error<GetControlResponse>>

Get a control

Returns info on a control.

Sends a GET request to /docs/{docId}/controls/{controlIdOrName}

Arguments:

  • doc_id: ID of the doc.
  • control_id_or_name: ID or name of the control. Names are discouraged because they’re easily prone to being changed by users. If you’re using a name, be sure to URI-encode it.
Source

pub async fn list_custom_doc_domains<'a>( &'a self, doc_id: &'a str, ) -> Result<ResponseValue<CustomDocDomainList>, Error<ListCustomDocDomainsResponse>>

List custom doc domains

List all custom domains for a published doc.

Sends a GET request to /docs/${docId}/domains

Arguments:

  • doc_id: ID of the doc.
Source

pub async fn add_custom_doc_domain<'a>( &'a self, doc_id: &'a str, body: &'a AddCustomDocDomainRequest, ) -> Result<ResponseValue<AddCustomDocDomainResponse>, Error<AddCustomDocDomainResponse>>

Add custom domain

Add a custom domain to a published doc.

Sends a POST request to /docs/${docId}/domains

Arguments:

  • doc_id: ID of the doc.
  • body: Parameters for adding a custom domain to a published doc.
Source

pub async fn delete_custom_doc_domain<'a>( &'a self, doc_id: &'a str, custom_doc_domain: &'a str, ) -> Result<ResponseValue<DeleteCustomDocDomainResponse>, Error<DeleteCustomDocDomainResponse>>

Deletes a custom domain

Deletes a custom domain from a published doc.

Sends a DELETE request to /docs/{docId}/domains/{customDocDomain}

Arguments:

  • doc_id: ID of the doc.
  • custom_doc_domain: A custom domain for a published doc.
Source

pub async fn update_custom_doc_domain<'a>( &'a self, doc_id: &'a str, custom_doc_domain: &'a str, body: &'a UpdateCustomDocDomainRequest, ) -> Result<ResponseValue<UpdateCustomDocDomainResponse>, Error<UpdateCustomDocDomainResponse>>

Updates a custom domain

Updates properties of a document’s custom domain.

Sends a PATCH request to /docs/{docId}/domains/{customDocDomain}

Arguments:

  • doc_id: ID of the doc.
  • custom_doc_domain: A custom domain for a published doc.
  • body: Properties of a custom domain to update.
Source

pub async fn get_custom_doc_domain_provider<'a>( &'a self, custom_doc_domain: &'a str, ) -> Result<ResponseValue<CustomDocDomainProviderResponse>, Error<GetCustomDocDomainProviderResponse>>

Gets custom doc domains providers

Gets the provider (ie. GoDaddy) of a custom domain.

Sends a GET request to /domains/provider/{customDocDomain}

Arguments:

  • custom_doc_domain: A custom domain for a published doc.
Source

pub async fn whoami<'a>( &'a self, ) -> Result<ResponseValue<User>, Error<WhoamiResponse>>

Get user info

Returns basic info about the current user.

Sends a GET request to /whoami

Resolve browser link

Given a browser link to a Coda object, attempts to find it and return metadata that can be used to get more info on it. Returns a 400 if the URL does not appear to be a Coda URL or a 404 if the resource cannot be located with the current credentials.

Sends a GET request to /resolveBrowserLink

Arguments:

  • degrade_gracefully: By default, attempting to resolve the Coda URL of a deleted object will result in an error. If this flag is set, the next-available object, all the way up to the doc itself, will be resolved.

  • url: The browser link to try to resolve.

Source

pub async fn get_mutation_status<'a>( &'a self, request_id: &'a str, ) -> Result<ResponseValue<MutationStatus>, Error<GetMutationStatusResponse>>

Get mutation status

Get the status for an asynchronous mutation to know whether or not it has been completed. Each API endpoint that mutates a document will return a request id that you can pass to this endpoint to check the completion status. Status information is not guaranteed to be available for more than one day after the mutation was completed. It is intended to be used shortly after the request was made.

Sends a GET request to /mutationStatus/{requestId}

Arguments:

  • request_id: ID of the request.
Source

pub async fn trigger_webhook_automation<'a>( &'a self, doc_id: &'a str, rule_id: &'a str, body: &'a WebhookTriggerPayload, ) -> Result<ResponseValue<WebhookTriggerResult>, Error<TriggerWebhookAutomationResponse>>

Trigger automation

Triggers webhook-invoked automation

Sends a POST request to /docs/{docId}/hooks/automation/{ruleId}

Arguments:

  • doc_id: ID of the doc.
  • rule_id: ID of the automation rule.
  • body: Payload for webhook
Source

pub async fn list_doc_analytics<'a>( &'a self, direction: Option<SortDirection>, doc_ids: Option<&'a Vec<String>>, is_published: Option<bool>, limit: Option<NonZeroU64>, order_by: Option<DocAnalyticsOrderBy>, page_token: Option<&'a str>, query: Option<&'a str>, scale: Option<AnalyticsScale>, since_date: Option<&'a NaiveDate>, until_date: Option<&'a NaiveDate>, workspace_id: Option<&'a str>, ) -> Result<ResponseValue<DocAnalyticsCollection>, Error<ListDocAnalyticsResponse>>

List doc analytics

Returns analytics data for available docs per day.

Sends a GET request to /analytics/docs

Arguments:

  • direction: Direction to sort results in.
  • doc_ids: List of docIds to fetch.
  • is_published: Limit results to only published items.
  • limit: Maximum number of results to return in this query.
  • order_by: Use this parameter to order the doc analytics returned.
  • page_token: An opaque token used to fetch the next page of results.
  • query: Search term used to filter down results.
  • scale: Quantization period over which to view analytics. Defaults to daily.
  • since_date: Limit results to activity on or after this date.
  • until_date: Limit results to activity on or before this date.
  • workspace_id: ID of the workspace.
Source

pub async fn list_page_analytics<'a>( &'a self, doc_id: &'a str, limit: Option<NonZeroU64>, page_token: Option<&'a str>, since_date: Option<&'a NaiveDate>, until_date: Option<&'a NaiveDate>, ) -> Result<ResponseValue<PageAnalyticsCollection>, Error<ListPageAnalyticsResponse>>

List page analytics

Returns analytics data for a given doc within the day. This method will return a 401 if the given doc is not in an Enterprise workspace.

Sends a GET request to /analytics/docs/{docId}/pages

Arguments:

  • doc_id: ID of the doc.
  • limit: Maximum number of results to return in this query.
  • page_token: An opaque token used to fetch the next page of results.
  • since_date: Limit results to activity on or after this date.
  • until_date: Limit results to activity on or before this date.
Source

pub async fn list_doc_analytics_summary<'a>( &'a self, is_published: Option<bool>, since_date: Option<&'a NaiveDate>, until_date: Option<&'a NaiveDate>, workspace_id: Option<&'a str>, ) -> Result<ResponseValue<DocAnalyticsSummary>, Error<ListDocAnalyticsSummaryResponse>>

Get doc analytics summary

Returns summarized analytics data for available docs.

Sends a GET request to /analytics/docs/summary

Arguments:

  • is_published: Limit results to only published items.
  • since_date: Limit results to activity on or after this date.
  • until_date: Limit results to activity on or before this date.
  • workspace_id: ID of the workspace.
Source

pub async fn list_pack_analytics<'a>( &'a self, direction: Option<SortDirection>, is_published: Option<bool>, limit: Option<NonZeroU64>, order_by: Option<PackAnalyticsOrderBy>, pack_ids: Option<&'a Vec<i64>>, page_token: Option<&'a str>, query: Option<&'a str>, scale: Option<AnalyticsScale>, since_date: Option<&'a NaiveDate>, until_date: Option<&'a NaiveDate>, workspace_id: Option<&'a str>, ) -> Result<ResponseValue<PackAnalyticsCollection>, Error<ListPackAnalyticsResponse>>

List Pack analytics

Returns analytics data for Packs the user can edit.

Sends a GET request to /analytics/packs

Arguments:

  • direction: Direction to sort results in.

  • is_published: Limit results to only published items. If false or unspecified, returns all items including published ones.

  • limit: Maximum number of results to return in this query.

  • order_by: Use this parameter to order the Pack analytics returned.

  • pack_ids: Which Pack IDs to fetch.

  • page_token: An opaque token used to fetch the next page of results.

  • query: Search term used to filter down results.

  • scale: Quantization period over which to view analytics. Defaults to daily.

  • since_date: Limit results to activity on or after this date.

  • until_date: Limit results to activity on or before this date.

  • workspace_id: ID of the workspace.

Source

pub async fn list_pack_analytics_summary<'a>( &'a self, is_published: Option<bool>, pack_ids: Option<&'a Vec<i64>>, since_date: Option<&'a NaiveDate>, until_date: Option<&'a NaiveDate>, workspace_id: Option<&'a str>, ) -> Result<ResponseValue<PackAnalyticsSummary>, Error<ListPackAnalyticsSummaryResponse>>

Get Pack analytics summary

Returns summarized analytics data for Packs the user can edit.

Sends a GET request to /analytics/packs/summary

Arguments:

  • is_published: Limit results to only published items. If false or unspecified, returns all items including published ones.

  • pack_ids: Which Pack IDs to fetch.

  • since_date: Limit results to activity on or after this date.

  • until_date: Limit results to activity on or before this date.

  • workspace_id: ID of the workspace.

Source

pub async fn list_pack_formula_analytics<'a>( &'a self, pack_id: NonZeroU64, direction: Option<SortDirection>, limit: Option<NonZeroU64>, order_by: Option<PackFormulaAnalyticsOrderBy>, pack_formula_names: Option<&'a Vec<String>>, pack_formula_types: Option<&'a Vec<PackFormulaType>>, page_token: Option<&'a str>, scale: Option<AnalyticsScale>, since_date: Option<&'a NaiveDate>, until_date: Option<&'a NaiveDate>, ) -> Result<ResponseValue<PackFormulaAnalyticsCollection>, Error<ListPackFormulaAnalyticsResponse>>

List Pack formula analytics

Returns analytics data for Pack formulas.

Sends a GET request to /analytics/packs/{packId}/formulas

Arguments:

  • pack_id: ID of a Pack
  • direction: Direction to sort results in.
  • limit: Maximum number of results to return in this query.
  • order_by: Use this parameter to order the Pack formula analytics returned.
  • pack_formula_names: A list of Pack formula names (case-sensitive) for which to retrieve analytics.
  • pack_formula_types: A list of Pack formula types corresponding to the packFormulaNames. If specified, this must have the same length as packFormulaNames.
  • page_token: An opaque token used to fetch the next page of results.
  • scale: Quantization period over which to view analytics. Defaults to daily.
  • since_date: Limit results to activity on or after this date.
  • until_date: Limit results to activity on or before this date.
Source

pub async fn get_analytics_last_updated<'a>( &'a self, ) -> Result<ResponseValue<AnalyticsLastUpdatedResponse>, Error<GetAnalyticsLastUpdatedResponse>>

Get analytics last updated day

Returns days based on Pacific Standard Time when analytics were last updated.

Sends a GET request to /analytics/updated

Source

pub async fn list_workspace_members<'a>( &'a self, workspace_id: &'a str, included_roles: Option<&'a Vec<WorkspaceUserRole>>, page_token: Option<&'a str>, ) -> Result<ResponseValue<WorkspaceMembersList>, Error<ListWorkspaceMembersResponse>>

List workspace users

Returns a list of members in the given workspace. This list will be ordered with the requesting user first and then ordered by role.

Sends a GET request to /workspaces/{workspaceId}/users

Arguments:

  • workspace_id: ID of the workspace.
  • included_roles: Show only the members that match the included roles. Multiple roles can be specified with a comma-delimited list.
  • page_token: An opaque token used to fetch the next page of results.
Source

pub async fn change_user_role<'a>( &'a self, workspace_id: &'a str, body: &'a ChangeRole, ) -> Result<ResponseValue<ChangeRoleResult>, Error<ChangeUserRoleResponse>>

Updates user role

Updates the workspace user role of a user that matches the parameters. Only succeeds if the requesting user has admin permissions in the workspace.

Sends a POST request to /workspaces/{workspaceId}/users/role

Arguments:

  • workspace_id: ID of the workspace.
  • body: Parameters for changing the user role.
Source

pub async fn list_workspace_role_activity<'a>( &'a self, workspace_id: &'a str, ) -> Result<ResponseValue<GetWorkspaceRoleActivity>, Error<ListWorkspaceRoleActivityResponse>>

List workspace roles

Returns a list of the counts of users over time by role for the workspace.

Sends a GET request to /workspaces/{workspaceId}/roles

Arguments:

  • workspace_id: ID of the workspace.
Source

pub async fn list_packs<'a>( &'a self, access_type: Option<PackAccessType>, access_types: Option<&'a Vec<PackAccessType>>, direction: Option<SortDirection>, exclude_individual_acls: Option<bool>, exclude_public_packs: Option<bool>, exclude_workspace_acls: Option<bool>, include_brain_only_packs: Option<bool>, limit: Option<NonZeroU64>, only_workspace_id: Option<&'a str>, page_token: Option<&'a str>, parent_workspace_ids: Option<&'a Vec<String>>, sort_by: Option<PacksSortBy>, ) -> Result<ResponseValue<PackSummaryList>, Error<ListPacksResponse>>

List Packs

Get the list of accessible Packs.

Sends a GET request to /packs

Arguments:

  • access_type: Deprecated, use accessTypes instead. Filter to only return the Packs for which the current user has this access type
  • access_types: Filter to only return the Packs for which the current user has these access types.
  • direction: Direction to sort results in.
  • exclude_individual_acls: Do not include Packs that are only shared with the user individually.
  • exclude_public_packs: Only get Packs shared with users/workspaces, not publicly.
  • exclude_workspace_acls: Do not include Packs that are only shared with workspaces.
  • include_brain_only_packs: Include Packs that only support Coda Brain.
  • limit: Maximum number of results to return in this query.
  • only_workspace_id: Use only this workspace (not all of a user’s workspaces) to check for Packs shared via workspace ACL.
  • page_token: An opaque token used to fetch the next page of results.
  • parent_workspace_ids: Filter to only Packs whose parent workspace is one of the given IDs.
  • sort_by: The sort order of the Packs returned.
Source

pub async fn create_pack<'a>( &'a self, body: &'a CreatePackRequest, ) -> Result<ResponseValue<CreatePackResponse>, Error<CreatePackResponse>>

Create Pack

Creates a new Pack, essentially registering a new Pack ID. The contents of the Pack will be uploaded separately.

Sends a POST request to /packs

Arguments:

  • body: Parameters for creating the Pack.
Source

pub async fn get_pack<'a>( &'a self, pack_id: NonZeroU64, ) -> Result<ResponseValue<Pack>, Error<GetPackResponse>>

Get a single Pack

Returns a single Pack.

Sends a GET request to /packs/{packId}

Arguments:

  • pack_id: ID of a Pack
Source

pub async fn delete_pack<'a>( &'a self, pack_id: NonZeroU64, ) -> Result<ResponseValue<DeletePackResponse>, Error<DeletePackResponse>>

Delete Pack

Delete a given Pack.

Sends a DELETE request to /packs/{packId}

Arguments:

  • pack_id: ID of a Pack
Source

pub async fn update_pack<'a>( &'a self, pack_id: NonZeroU64, body: &'a UpdatePackRequest, ) -> Result<ResponseValue<Pack>, Error<UpdatePackResponse>>

Update Pack

Update an existing Pack for non-versioned fields.

Sends a PATCH request to /packs/{packId}

Arguments:

  • pack_id: ID of a Pack
  • body: Parameters for updating the Pack.
Source

pub async fn get_pack_configuration_schema<'a>( &'a self, pack_id: NonZeroU64, ) -> Result<ResponseValue<GetPackConfigurationJsonSchemaResponse>, Error<GetPackConfigurationSchemaResponse>>

Gets the JSON Schema for Pack configuration

Returns a JSON Schema applicable for customizing the pack using Pack configurations.

Sends a GET request to /packs/{packId}/configurations/schema

Arguments:

  • pack_id: ID of a Pack
Source

pub async fn list_pack_versions<'a>( &'a self, pack_id: NonZeroU64, limit: Option<NonZeroU64>, page_token: Option<&'a str>, ) -> Result<ResponseValue<PackVersionList>, Error<ListPackVersionsResponse>>

List the versions for a Pack

Get the list of versions of a Pack.

Sends a GET request to /packs/{packId}/versions

Arguments:

  • pack_id: ID of a Pack
  • limit: Maximum number of results to return in this query.
  • page_token: An opaque token used to fetch the next page of results.
Source

pub async fn get_next_pack_version<'a>( &'a self, pack_id: NonZeroU64, body: &'a GetNextPackVersionRequest, ) -> Result<ResponseValue<NextPackVersionInfo>, Error<GetNextPackVersionResponse>>

Get the next valid version for a Pack

Get the next valid version based on the proposed metadata.

Sends a POST request to /packs/{packId}/nextVersion

Arguments:

  • pack_id: ID of a Pack
  • body
Source

pub async fn get_pack_version_diffs<'a>( &'a self, pack_id: NonZeroU64, base_pack_version: &'a str, target_pack_version: &'a str, ) -> Result<ResponseValue<PackVersionDiffs>, Error<GetPackVersionDiffsResponse>>

Get the difference between two pack versions

Gets information about the difference between the specified previous version and next version of a Pack.

Sends a GET request to /packs/{packId}/versions/{basePackVersion}/diff/{targetPackVersion}

Arguments:

  • pack_id: ID of a Pack
  • base_pack_version: Semantic version of the previous Pack version.
  • target_pack_version: Semantic version of the new Pack version.
Source

pub async fn register_pack_version<'a>( &'a self, pack_id: NonZeroU64, pack_version: &'a str, body: &'a RegisterPackVersionRequest, ) -> Result<ResponseValue<PackVersionUploadInfo>, Error<RegisterPackVersionResponse>>

Register Pack version

Registers a new Pack version. This simply returns a signed URL to use for uploading the Pack version definition. Following the completion of the upload, POST to /apis/v1/packs/{packId}/versions/{packVersion} trigger the rest of the creation process.

Sends a POST request to /packs/{packId}/versions/{packVersion}/register

Arguments:

  • pack_id: ID of a Pack
  • pack_version: Semantic version of a Pack
  • body: Parameters for registering the Pack.
Source

pub async fn pack_version_upload_complete<'a>( &'a self, pack_id: NonZeroU64, pack_version: &'a str, body: &'a CreatePackVersionRequest, ) -> Result<ResponseValue<CreatePackVersionResponse>, Error<PackVersionUploadCompleteResponse>>

Pack version upload complete

Note the completion of the upload of a Pack version bundle in order to create that Pack version.

Sends a POST request to /packs/{packId}/versions/{packVersion}/uploadComplete

Arguments:

  • pack_id: ID of a Pack
  • pack_version: Semantic version of a Pack
  • body: Parameters for Pack version upload complete.
Source

pub async fn list_pack_releases<'a>( &'a self, pack_id: NonZeroU64, limit: Option<NonZeroU64>, page_token: Option<&'a str>, ) -> Result<ResponseValue<PackReleaseList>, Error<ListPackReleasesResponse>>

List the releases for a Pack

Get the list of releases of a Pack.

Sends a GET request to /packs/{packId}/releases

Arguments:

  • pack_id: ID of a Pack
  • limit: Maximum number of results to return in this query.
  • page_token: An opaque token used to fetch the next page of results.
Source

pub async fn create_pack_release<'a>( &'a self, pack_id: NonZeroU64, body: &'a CreatePackReleaseRequest, ) -> Result<ResponseValue<PackRelease>, Error<CreatePackReleaseResponse>>

Create a new Pack release

Creates a new Pack release based on an existing Pack version.

Sends a POST request to /packs/{packId}/releases

Arguments:

  • pack_id: ID of a Pack
  • body: Parameters to create the Pack release.
Source

pub async fn update_pack_release<'a>( &'a self, pack_id: NonZeroU64, pack_release_id: NonZeroU64, body: &'a UpdatePackReleaseRequest, ) -> Result<ResponseValue<PackRelease>, Error<UpdatePackReleaseResponse>>

Update an existing Pack release

Update details of a Pack release.

Sends a PUT request to /packs/{packId}/releases/{packReleaseId}

Arguments:

  • pack_id: ID of a Pack
  • pack_release_id: ID of a Pack release
  • body: Parameters to update the Pack release.
Source

pub async fn get_pack_oauth_config<'a>( &'a self, pack_id: NonZeroU64, ) -> Result<ResponseValue<PackOauthConfigMetadata>, Error<GetPackOauthConfigResponse>>

Retrieve the OAuth configuration of the Pack

Retrieve the OAuth configuration of the Pack for display purpose. Secrets will be returned with masks.

Sends a GET request to /packs/{packId}/oauthConfig

Arguments:

  • pack_id: ID of a Pack
Source

pub async fn set_pack_oauth_config<'a>( &'a self, pack_id: NonZeroU64, body: &'a SetPackOauthConfigRequest, ) -> Result<ResponseValue<PackOauthConfigMetadata>, Error<SetPackOauthConfigResponse>>

Set the OAuth configurations of the Pack

Set the OAuth configurations of the Pack, including client id and secret.

Sends a PUT request to /packs/{packId}/oauthConfig

Arguments:

  • pack_id: ID of a Pack
  • body: Parameters to set the Pack OAuth configuration.
Source

pub async fn get_pack_system_connection<'a>( &'a self, pack_id: NonZeroU64, ) -> Result<ResponseValue<PackSystemConnectionMetadata>, Error<GetPackSystemConnectionResponse>>

Retrieve the system connection metadata of the Pack

Retrieve the system connection metadata of the Pack.

Sends a GET request to /packs/{packId}/systemConnection

Arguments:

  • pack_id: ID of a Pack
Source

pub async fn set_pack_system_connection<'a>( &'a self, pack_id: NonZeroU64, body: &'a SetPackSystemConnectionRequest, ) -> Result<ResponseValue<PackSystemConnectionMetadata>, Error<SetPackSystemConnectionResponse>>

Set the system connection credentials of the Pack

Set the system connection credentials of the Pack.

Sends a PUT request to /packs/{packId}/systemConnection

Arguments:

  • pack_id: ID of a Pack
  • body: Parameters to set the Pack system connection credentials.
Source

pub async fn patch_pack_system_connection<'a>( &'a self, pack_id: NonZeroU64, body: &'a PatchPackSystemConnectionRequest, ) -> Result<ResponseValue<PackSystemConnectionMetadata>, Error<PatchPackSystemConnectionResponse>>

Patch the system connection credentials of the Pack

Patch the system connection credentials of the Pack.

Sends a PATCH request to /packs/{packId}/systemConnection

Arguments:

  • pack_id: ID of a Pack
  • body: Parameters to patch the Pack system connection credentials.
Source

pub async fn get_pack_permissions<'a>( &'a self, pack_id: NonZeroU64, ) -> Result<ResponseValue<PackPermissionList>, Error<GetPackPermissionsResponse>>

List permissions for a Pack

Get user, workspace, and/or global permissions for a given Pack.

Sends a GET request to /packs/{packId}/permissions

Arguments:

  • pack_id: ID of a Pack
Source

pub async fn add_pack_permission<'a>( &'a self, pack_id: NonZeroU64, body: &'a AddPackPermissionRequest, ) -> Result<ResponseValue<AddPackPermissionResponse>, Error<AddPackPermissionResponse>>

Add a permission for Pack

Create or modify user, workspace, or global permissions for a given Pack.

Sends a POST request to /packs/{packId}/permissions

Arguments:

  • pack_id: ID of a Pack
  • body: Parameters for creating/updating Pack permissions.
Source

pub async fn delete_pack_permission<'a>( &'a self, pack_id: NonZeroU64, permission_id: &'a str, ) -> Result<ResponseValue<DeletePackPermissionResponse>, Error<DeletePackPermissionResponse>>

Delete a permission for Pack

Delete user, workspace, or global permissions for a given Pack.

Sends a DELETE request to /packs/{packId}/permissions/{permissionId}

Arguments:

  • pack_id: ID of a Pack
  • permission_id: ID of a permission on a doc.
Source

pub async fn list_pack_makers<'a>( &'a self, pack_id: NonZeroU64, ) -> Result<ResponseValue<ListPackMakersResponse>, Error<ListPackMakersResponse>>

List makers for Pack

List makers for a given pack.

Sends a GET request to /packs/{packId}/makers

Arguments:

  • pack_id: ID of a Pack
Source

pub async fn add_pack_maker<'a>( &'a self, pack_id: NonZeroU64, body: &'a AddPackMakerRequest, ) -> Result<ResponseValue<AddPackMakerResponse>, Error<AddPackMakerResponse>>

Add a maker for Pack

Set a maker for a given Pack. Used to display makers for a pack in the corresponding packs page.

Sends a POST request to /packs/{packId}/maker

Arguments:

  • pack_id: ID of a Pack
  • body: Payload for adding a Pack maker.
Source

pub async fn delete_pack_maker<'a>( &'a self, pack_id: NonZeroU64, login_id: &'a str, ) -> Result<ResponseValue<DeletePackMakerResponse>, Error<DeletePackMakerResponse>>

Delete a maker for Pack

Delete a maker for a given Pack, who will not be displayed in the corresponding packs page.

Sends a DELETE request to /packs/{packId}/maker/{loginId}

Arguments:

  • pack_id: ID of a Pack
  • login_id: Email of a Coda user.
Source

pub async fn list_pack_categories<'a>( &'a self, pack_id: NonZeroU64, ) -> Result<ResponseValue<ListPackCategoriesResponse>, Error<ListPackCategoriesResponse>>

List categories for Pack

List publishing categories for a given pack.

Sends a GET request to /packs/{packId}/categories

Arguments:

  • pack_id: ID of a Pack
Source

pub async fn add_pack_category<'a>( &'a self, pack_id: NonZeroU64, body: &'a AddPackCategoryRequest, ) -> Result<ResponseValue<AddPackCategoryResponse>, Error<AddPackCategoryResponse>>

Add a category for Pack

Add a publishing category for a given pack.

Sends a POST request to /packs/{packId}/category

Arguments:

  • pack_id: ID of a Pack
  • body: Payload for adding a Pack category.
Source

pub async fn delete_pack_category<'a>( &'a self, pack_id: NonZeroU64, category_name: &'a str, ) -> Result<ResponseValue<DeletePackCategoryResponse>, Error<DeletePackCategoryResponse>>

Delete a category for Pack

Delete a publishing category for a given pack.

Sends a DELETE request to /packs/{packId}/category/{categoryName}

Arguments:

  • pack_id: ID of a Pack
  • category_name: Name of a publishing category
Source

pub async fn upload_pack_asset<'a>( &'a self, pack_id: NonZeroU64, body: &'a UploadPackAssetRequest, ) -> Result<ResponseValue<PackAssetUploadInfo>, Error<UploadPackAssetResponse>>

Upload a Pack asset

Request a signed s3 URL to upload your Pack asset.

Sends a POST request to /packs/{packId}/uploadAsset

Arguments:

  • pack_id: ID of a Pack
  • body: Parameters to specify the asset being uploaded.
Source

pub async fn upload_pack_source_code<'a>( &'a self, pack_id: NonZeroU64, body: &'a UploadPackSourceCodeRequest, ) -> Result<ResponseValue<PackSourceCodeUploadInfo>, Error<UploadPackSourceCodeResponse>>

Upload Pack source code

Request a signed s3 URL to upload your Pack source code.

Sends a POST request to /packs/{packId}/uploadSourceCode

Arguments:

  • pack_id: ID of a Pack
  • body: Parameters to specify the source code being uploaded.
Source

pub async fn pack_asset_upload_complete<'a>( &'a self, pack_id: NonZeroU64, pack_asset_id: &'a str, pack_asset_type: PackAssetType, ) -> Result<ResponseValue<PackAssetUploadCompleteResponse>, Error<PackAssetUploadCompleteResponse>>

Pack asset upload complete

Note the completion of the upload of a Pack asset.

Sends a POST request to /packs/{packId}/assets/{packAssetId}/assetType/{packAssetType}/ uploadComplete

Arguments:

  • pack_id: ID of a Pack
  • pack_asset_id: Unique identifier for a Pack asset.
  • pack_asset_type: Pack asset type.
Source

pub async fn pack_source_code_upload_complete<'a>( &'a self, pack_id: NonZeroU64, pack_version: &'a str, body: &'a PackSourceCodeUploadCompleteRequest, ) -> Result<ResponseValue<PackSourceCodeUploadCompleteResponse>, Error<PackSourceCodeUploadCompleteResponse>>

Pack source code upload complete

Note the completion of the upload of a Pack source code.

Sends a POST request to /packs/{packId}/versions/{packVersion}/sourceCode/uploadComplete

Arguments:

  • pack_id: ID of a Pack
  • pack_version: Semantic version of a Pack
  • body: Parameters to specify the source code being uploaded.
Source

pub async fn get_pack_source_code<'a>( &'a self, pack_id: NonZeroU64, pack_version: &'a str, ) -> Result<ResponseValue<PackSourceCodeInfo>, Error<GetPackSourceCodeResponse>>

get the source code for a Pack version

Get temporary links used to download the source code for the given packId and version

Sends a GET request to /packs/{packId}/versions/{packVersion}/sourceCode

Arguments:

  • pack_id: ID of a Pack
  • pack_version: Semantic version of a Pack
Source

pub async fn list_pack_listings<'a>( &'a self, direction: Option<SortDirection>, exclude_individual_acls: Option<bool>, exclude_public_packs: Option<bool>, exclude_workspace_acls: Option<bool>, include_brain_only_packs: Option<bool>, install_context: Option<PackListingInstallContextType>, limit: Option<NonZeroU64>, only_workspace_id: Option<&'a str>, order_by: Option<PackListingsSortBy>, pack_access_types: Option<&'a PackAccessTypes>, pack_ids: Option<&'a Vec<i64>>, page_token: Option<&'a str>, parent_workspace_ids: Option<&'a Vec<String>>, sort_by: Option<PackListingsSortBy>, ) -> Result<ResponseValue<PackListingList>, Error<ListPackListingsResponse>>

List the Pack listings accessible to a user

Get listings of public Packs and Packs created by you.

Sends a GET request to /packs/listings

Arguments:

  • direction: Direction to sort results in.
  • exclude_individual_acls: Do not include Packs that are only shared with the user individually.
  • exclude_public_packs: Only get Packs shared with users/workspaces, not publicly.
  • exclude_workspace_acls: Do not include Packs that are only shared with workspaces.
  • include_brain_only_packs: Include Packs that only support Coda Brain.
  • install_context: Type of installation context for which Pack information is being requested.
  • limit: Maximum number of results to return in this query.
  • only_workspace_id: Use only this workspace (not all of a user’s workspaces) to check for Packs shared via workspace ACL.
  • order_by: Deprecated: use sortBy instead.
  • pack_access_types: Pack access types.
  • pack_ids: Which Pack IDs to fetch.
  • page_token: An opaque token used to fetch the next page of results.
  • parent_workspace_ids: Filter to only Packs whose parent workspace is one of the given IDs.
  • sort_by: Specify a sort order for the returned Pack listings returned.
Source

pub async fn get_pack_listing<'a>( &'a self, pack_id: NonZeroU64, doc_id: Option<&'a str>, install_context: Option<PackListingInstallContextType>, release_channel: Option<IngestionPackReleaseChannel>, workspace_id: Option<&'a str>, ) -> Result<ResponseValue<PackListingDetail>, Error<GetPackListingResponse>>

Get detailed listing information for a Pack

Get detailed listing information for a Pack.

Sends a GET request to /packs/{packId}/listing

Arguments:

  • pack_id: ID of a Pack
  • doc_id: ID of the target document for checking installation privileges
  • install_context: Type of installation context for which Pack information is being requested.
  • release_channel: Release channel for which Pack information is being requested.
  • workspace_id: ID of the target workspace (if applicable) for checking installation privileges.
Source

pub async fn list_pack_logs<'a>( &'a self, pack_id: NonZeroU64, doc_id: &'a str, after_timestamp: Option<&'a DateTime<Utc>>, before_timestamp: Option<&'a DateTime<Utc>>, limit: Option<NonZeroU64>, log_types: Option<&'a Vec<PackLogType>>, order: Option<ListPackLogsOrder>, page_token: Option<&'a str>, q: Option<&'a str>, request_ids: Option<&'a Vec<String>>, ) -> Result<ResponseValue<PackLogsList>, Error<ListPackLogsResponse>>

Retrieve the logs of a Pack

Retrieve the logs of a Pack for debugging purpose.

Sends a GET request to /packs/{packId}/docs/{docId}/logs

Arguments:

  • pack_id: ID of a Pack

  • doc_id: ID of the doc.

  • after_timestamp: Only return logs after the given time (non-inclusive).

  • before_timestamp: Only return logs before the given time (non-inclusive).

  • limit: Maximum number of results to return in this query.

  • log_types: Only return logs of the given types.

  • order: Specifies if the logs will be returned in time desc or asc. Default is desc.

  • page_token: An opaque token used to fetch the next page of results.

  • q: A search query that follows Lucene syntax.

  • request_ids: Only return logs matching provided request IDs.

Source

pub async fn list_ingestion_logs<'a>( &'a self, pack_id: NonZeroU64, tenant_id: &'a str, root_ingestion_id: &'a Uuid, after_timestamp: Option<&'a DateTime<Utc>>, before_timestamp: Option<&'a DateTime<Utc>>, ingestion_execution_id: Option<&'a Uuid>, limit: Option<NonZeroU64>, log_types: Option<&'a Vec<PackLogType>>, order: Option<ListIngestionLogsOrder>, page_token: Option<&'a str>, q: Option<&'a str>, request_ids: Option<&'a Vec<String>>, ) -> Result<ResponseValue<PackLogsList>, Error<ListIngestionLogsResponse>>

Retrieve the logs of a Ingestion

Retrieve the logs of a Ingestion for debugging purpose.

Sends a GET request to /packs/{packId}/tenantId/{tenantId}/rootIngestionId/{rootIngestionId}/ logs

Arguments:

  • pack_id: ID of a Pack

  • tenant_id: ID of the tenant.

  • root_ingestion_id: ID of the root ingestion.

  • after_timestamp: Only return logs after the given time (non-inclusive).

  • before_timestamp: Only return logs before the given time (non-inclusive).

  • ingestion_execution_id: ID of the ingestion execution.

  • limit: Maximum number of results to return in this query.

  • log_types: Only return logs of the given types.

  • order: Specifies if the logs will be returned in time desc or asc. Default is desc.

  • page_token: An opaque token used to fetch the next page of results.

  • q: A search query that follows Lucene syntax.

  • request_ids: Only return logs matching provided request IDs.

Source

pub async fn list_grouped_pack_logs<'a>( &'a self, pack_id: NonZeroU64, doc_id: &'a str, after_timestamp: Option<&'a DateTime<Utc>>, before_timestamp: Option<&'a DateTime<Utc>>, limit: Option<NonZeroU64>, order: Option<ListGroupedPackLogsOrder>, page_token: Option<&'a str>, q: Option<&'a str>, ) -> Result<ResponseValue<GroupedPackLogsList>, Error<ListGroupedPackLogsResponse>>

Retrieve the grouped logs of a Pack

Retrieve the grouped logs of a Pack for debugging purpose.

Sends a GET request to /packs/{packId}/docs/{docId}/groupedLogs

Arguments:

  • pack_id: ID of a Pack

  • doc_id: ID of the doc.

  • after_timestamp: Only return logs after the given time (non-inclusive).

  • before_timestamp: Only return logs before the given time (non-inclusive).

  • limit: Maximum number of results to return in this query.

  • order: Specifies if the logs will be returned in time desc or asc. Default is desc.

  • page_token: An opaque token used to fetch the next page of results.

  • q: A search query that follows Lucene syntax.

Source

pub async fn list_grouped_ingestion_logs<'a>( &'a self, pack_id: NonZeroU64, tenant_id: &'a str, root_ingestion_id: &'a Uuid, after_timestamp: Option<&'a DateTime<Utc>>, before_timestamp: Option<&'a DateTime<Utc>>, ingestion_execution_id: Option<&'a Uuid>, limit: Option<NonZeroU64>, order: Option<ListGroupedIngestionLogsOrder>, page_token: Option<&'a str>, q: Option<&'a str>, ) -> Result<ResponseValue<GroupedPackLogsList>, Error<ListGroupedIngestionLogsResponse>>

Retrieve the grouped logs of a Pack for a specific ingestionExecutionId

Retrieve the grouped logs of a Pack for debugging purpose.

Sends a GET request to /packs/{packId}/tenantId/{tenantId}/rootIngestionId/{rootIngestionId}/ groupedLogs

Arguments:

  • pack_id: ID of a Pack

  • tenant_id: ID of the tenant.

  • root_ingestion_id: ID of the root ingestion.

  • after_timestamp: Only return logs after the given time (non-inclusive).

  • before_timestamp: Only return logs before the given time (non-inclusive).

  • ingestion_execution_id: ID of the ingestion execution.

  • limit: Maximum number of results to return in this query.

  • order: Specifies if the logs will be returned in time desc or asc. Default is desc.

  • page_token: An opaque token used to fetch the next page of results.

  • q: A search query that follows Lucene syntax.

Source

pub async fn list_ingestion_batch_executions<'a>( &'a self, pack_id: NonZeroU64, tenant_id: &'a str, root_ingestion_id: &'a Uuid, datasource: Option<&'a str>, execution_type: Option<IngestionExecutionType>, include_deleted_ingestions: Option<bool>, ingestion_execution_id: Option<&'a str>, ingestion_id: Option<&'a str>, ingestion_status: Option<IngestionStatus>, limit: Option<NonZeroU64>, page_token: Option<&'a str>, ) -> Result<ResponseValue<IngestionBatchExecutionsList>, Error<ListIngestionBatchExecutionsResponse>>

Retrieve a list of ingestion batch executions for the given root ingestion id

Retrieve the ingestion batch executions of a root ingestion for debugging purpose.

Sends a GET request to /packs/{packId}/tenantId/{tenantId}/rootIngestionId/{rootIngestionId}/ ingestionBatchExecutions

Arguments:

  • pack_id: ID of a Pack
  • tenant_id: ID of the tenant.
  • root_ingestion_id: ID of the root ingestion.
  • datasource: Only show batch executions for this datasource (sync table).
  • execution_type: Only show batch executions with this execution type.
  • include_deleted_ingestions: Include deleted ingestion executions in the response
  • ingestion_execution_id: Only retrieve this single batch execution.
  • ingestion_id: Only show batch executions for this sync table ingestion.
  • ingestion_status: Only show batch executions with this status.
  • limit: Maximum number of results to return in this query.
  • page_token: An opaque token used to fetch the next page of results.
Source

pub async fn list_ingestion_parent_items<'a>( &'a self, pack_id: NonZeroU64, tenant_id: &'a str, root_ingestion_id: &'a Uuid, ingestion_execution_id: &'a Uuid, ingestion_id: &'a Uuid, ingestion_status: Option<IngestionStatus>, limit: Option<NonZeroU64>, page_token: Option<&'a str>, ) -> Result<ResponseValue<IngestionParentItemsList>, Error<ListIngestionParentItemsResponse>>

Retrieve a list of parent items for the given ingestion batch execution id

Retrieve the parent items of a ingestion batch execution for debugging purpose.

Sends a GET request to /packs/{packId}/tenantId/{tenantId}/rootIngestionId/{rootIngestionId}/ ingestionBatchExecutions/{ingestionExecutionId}/parentItems

Arguments:

  • pack_id: ID of a Pack
  • tenant_id: ID of the tenant.
  • root_ingestion_id: ID of the root ingestion.
  • ingestion_execution_id: Only show parent items for this ingestion batch execution.
  • ingestion_id: The ID of the sync table ingestion. Enables faster lookup.
  • ingestion_status: Only show parent items with this status.
  • limit: Maximum number of results to return in this query.
  • page_token: An opaque token used to fetch the next page of results.
Source

pub async fn list_ingestion_executions<'a>( &'a self, pack_id: NonZeroU64, tenant_id: &'a str, root_ingestion_id: &'a Uuid, after_timestamp: Option<&'a DateTime<Utc>>, before_timestamp: Option<&'a DateTime<Utc>>, csb_ingestion_execution_id: Option<&'a str>, csb_ingestion_id: Option<&'a str>, datasource: Option<&'a str>, execution_type: Option<IngestionExecutionType>, include_deleted_ingestions: Option<bool>, ingestion_status: Option<IngestionStatus>, limit: Option<NonZeroU64>, order: Option<ListIngestionExecutionsOrder>, page_token: Option<&'a str>, ) -> Result<ResponseValue<IngestionExecutionsList>, Error<ListIngestionExecutionsResponse>>

Retrieve a list of ingestion execution ids for the given root ingestion id

Retrieve the ingestion execution ids of a root ingestion for debugging purpose.

Sends a GET request to /packs/{packId}/tenantId/{tenantId}/rootIngestionId/{rootIngestionId}/ ingestionExecutions

Arguments:

  • pack_id: ID of a Pack

  • tenant_id: ID of the tenant.

  • root_ingestion_id: ID of the root ingestion.

  • after_timestamp: Only return logs after the given time (non-inclusive).

  • before_timestamp: Only return logs before the given time (non-inclusive).

  • csb_ingestion_execution_id: Ingestion execution id of the ingestion execution to filter to

  • csb_ingestion_id: Ingestion id of the ingestion execution to filter to

  • datasource: Datasource of the ingestion execution to filter to

  • execution_type: Execution type of the ingestion execution to filter to

  • include_deleted_ingestions: Include deleted ingestion executions in the response

  • ingestion_status: Status of the ingestion execution to filter to

  • limit: Maximum number of results to return in this query.

  • order: Specifies if the logs will be returned in time desc or asc. Default is desc.

  • page_token: An opaque token used to fetch the next page of results.

Source

pub async fn list_ingestion_execution_attempts<'a>( &'a self, pack_id: NonZeroU64, tenant_id: &'a str, root_ingestion_id: &'a Uuid, ingestion_execution_id: &'a Uuid, limit: Option<NonZeroU64>, order: Option<ListIngestionExecutionAttemptsOrder>, page_token: Option<&'a str>, ) -> Result<ResponseValue<IngestionExecutionAttemptsList>, Error<ListIngestionExecutionAttemptsResponse>>

Retrieve a list of ingestion execution ids for the given root ingestion id

Retrieve the ingestion execution ids of a root ingestion for debugging purpose.

Sends a GET request to /packs/{packId}/tenantId/{tenantId}/rootIngestionId/{rootIngestionId}/ ingestionExecutionId/{ingestionExecutionId}/attempts

Arguments:

  • pack_id: ID of a Pack

  • tenant_id: ID of the tenant.

  • root_ingestion_id: ID of the root ingestion.

  • ingestion_execution_id: ID of the ingestion execution.

  • limit: Maximum number of results to return in this query.

  • order: Specifies if the logs will be returned in time desc or asc. Default is desc.

  • page_token: An opaque token used to fetch the next page of results.

Source

pub async fn get_pack_log_details<'a>( &'a self, pack_id: NonZeroU64, tenant_id: &'a str, root_ingestion_id: &'a Uuid, log_id: &'a str, details_key: &'a str, ) -> Result<ResponseValue<PackLogDetails>, Error<GetPackLogDetailsResponse>>

Retrieve the information for a specific log

Retrieve the ingestion execution ids of a root ingestion for debugging purpose.

Sends a GET request to /packs/{packId}/tenantId/{tenantId}/rootIngestionId/{rootIngestionId}/ logs/{logId}

Arguments:

  • pack_id: ID of a Pack

  • tenant_id: ID of the tenant.

  • root_ingestion_id: ID of the root ingestion.

  • log_id: The id of the log to retrieve.

  • details_key: The key of the details to retrieve.

List featured docs for a Pack

Returns a list of featured doc ids for a Pack.

Sends a GET request to /packs/{packId}/featuredDocs

Arguments:

  • pack_id: ID of a Pack

Update featured docs for a Pack

Create or replace the featured docs for a Pack.

Sends a PUT request to /packs/{packId}/featuredDocs

Arguments:

  • pack_id: ID of a Pack
  • body: Parameters for updating the Pack’s featured docs.

Add a go link

Adds a new go link for the organization.

Sends a POST request to /organizations/{organizationId}/goLinks

Arguments:

  • organization_id: ID of the organization.
  • body: The request body for creating a go link.

Trait Implementations§

Source§

impl Clone for Client

Source§

fn clone(&self) -> Client

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Client

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl Freeze for Client

§

impl !RefUnwindSafe for Client

§

impl Send for Client

§

impl Sync for Client

§

impl Unpin for Client

§

impl !UnwindSafe for Client

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> PolicyExt for T
where T: ?Sized,

Source§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow only if self and other return Action::Follow. Read more
Source§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow if either self or other returns Action::Follow. Read more
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

impl<T> ErasedDestructor for T
where T: 'static,