DataTable

Create a data table view

Creates a new view of this data table, defined by a filter on its rows. The view's filter conditions cannot be changed after the view is created (although the view can be renamed or deleted).

Telerivet will automatically store the count of rows matching each data view once a day, making it possible to retrieve historical statistics for the number of rows matching the filter, but only for dates after the view is created.

post/v1/projects/{project_id}/tables/{id}/views

Request

  • Base URL: https://api.telerivet.com
  • URL: https://api.telerivet.com/v1/projects/{project_id}/tables/{id}/views
  • Auth: one of:
    • HTTP basic
    • OAuth 2 (authorization code, authorization URL https://telerivet.com/oauth/authorize, token URL https://api.telerivet.com/oauth/token)

Path parameters

project_idstring required

ID of the Project

idstring required

ID of the DataTable

Request body

namestring required

Name of the view (must be unique within the data table)

filtersobject required

Key-value pairs of conditions that rows must match to be included in the view. To filter by a custom variable, precede the variable name with 'vars.' (conditions on custom variables may also be provided as a nested object under a vars key, e.g. {"vars": {"q1": "yes"}}); other supported keys are id, time_created, time_updated, contact_id, contact_name, and from_number. Each value is either a value to match exactly, or an object with an operator such as ne, prefix, gte, gt, lte, lt, exists, or not_exists as the key (e.g. {"gte": 10}).

varsobject

Custom variables to store with the data view

Example request

{
  "name": "Completed Responses"
}

Response

Successful response

idstring

ID of the data view

namestring

Name of the data view

num_rowsinteger

Number of rows matching the view filter. For performance reasons, this number may sometimes be out-of-date.

filtersobject

Key-value pairs of conditions that rows must match to be included in the view, in the same format as the filters parameter of table.createView

varsobject

Custom variables stored for this data view. Variable names may be up to 32 characters in length and can contain the characters a-z, A-Z, 0-9, and _. Values may be strings, numbers, or boolean (true/false). String values may be up to 4096 bytes in length when encoded as UTF-8. Up to 100 variables are supported per object. Setting a variable to null will delete the variable.

table_idstring

ID of the table this view belongs to

project_idstring

ID of the project this view belongs to

urlstring

URL to this view in the Telerivet web app

Example response

{
  "id": "DV81c9612b4b4d4c4e",
  "name": "Completed Responses",
  "num_rows": 122,
  "table_id": "DTf9f77c9ba69cce50",
  "project_id": "PJ2ad0100821a98bea",
  "url": "https://telerivet.com/p/asdf/data/Poll_20Responses?f[view]=DV81c9612b4b4d4c4e"
}

Changes

No recorded changes to this operation across all 1 revision of this API.