Docs

Update Analytics Data Source

Change one of the creator's data sources. Only what you send changes. Changing what it fetches (the app, action, connection, arguments, options or query of a sync or live source; the inputs or code of a merge; the rows of a fixed source) saves it and fetches again, and the panels that read it follow. Changing how it is kept (name, description, date keys, schedule, a spreadsheet's options, incremental refreshes) fetches nothing. Incremental refreshes fetch only changed records between full refreshes; they stay off until you send incrementalDetails with status active, which are checked against the stored rows and the app first, and isIncrementalEnabled true. A change that reaches published embeds asks you to confirm it first: see confirmationReceipt.

PUT

Path

Path parameters
stringrequired

The data source id, from List Analytics Data Sources.

Headers

Optional headers
string

Optional. The id of the organization to act in. Leave it out to act in the API key's own organization. Here a key acts in another organization only as one of its members: with "Use this key across all of your organizations" on, in an organization its creator belongs to with a role. Child organizations and MindCloud staff access do not reach this endpoint. Every response's X-Company-Id header names the organization it acted in. See Organizations.

Body

Arguments
string

A new name.

A name for the source. Left out, one is written from what it fetches.

string

A new description, or null to clear it.

What the data holds, in a sentence. Left out, one is written from the data.

string

A sync or live source: another app, by id or slug.

The app to fetch from, by id or slug, from List Universal Apps.

string

A sync or live source: another read action, by id or slug.

The app's read action, by id or slug, from List Universal Actions.

string

A sync or live source: another connection, from List Connections.

The connection to fetch with, from List Connections.

object

A sync or live source: the arguments, replacing them all.

The action's arguments, { argumentKey: value }, as Get Universal Action lists them. Values may use date expressions such as {{now-2y}}.

object

A sync or live source: the options, replacing them all.

The action's options, such as { "pagination": { "mode": "all" } }.

object

A sync or live source: the filter and sort, or null to remove them.

A filter and sort the app applies before the rows are stored. The action must support them exactly, or the request is refused.

  • filterany

    The filter the app applies, as Get Universal Action describes it. Values must be literals.

  • sortany

    The sort the app applies.

array of object

A merge: its inputs, replacing them all.

For a merge source: the sources it combines.

  • dataSourceIdstringrequired

    The input source, a sync or fixed source of yours, from List Analytics Data Sources.

  • aliasstringrequired

    The name the merge SQL and code read this input by.

  • querystring

    SQL that shapes this input before the merge, reading it as `src`. Leave it out to use the input as is.

string

A merge: its code.

For a merge source: JavaScript that receives each input by its alias and returns the combined rows. Required when there is more than one input.

array of object

A fixed source: rows that replace its data. To change some rows, use Update Analytics Data Source Table.

For a fixed source: the rows, as objects with the same keys, up to 1000. They replace the source's data.

object

Which columns hold dates, or null to have them worked out from the data again.

Which columns hold dates, for page date filters. Left out (or null on update), they are worked out from the data after each refresh.

  • primaryDateKeystring

    The column page date filters use.

  • primaryDateKeyGrainstring

    That column's grain, such as day or month.

  • createdDateKeystring

    The column holding when each record was created.

  • updatedDateKeystring

    The column holding when each record last changed.

  • hasNoDatesboolean

    True when the source has no date column.

string

A fixed source from a spreadsheet: the sheet to read.

For a fixed source made from a spreadsheet file: the sheet to read.

boolean

A fixed source from a spreadsheet: whether the first row holds the column names.

For a fixed source made from a spreadsheet file: whether its first row holds the column names.

number

A fixed source from a spreadsheet: rows above the header to skip.

For a fixed source made from a spreadsheet file: how many rows above the header to skip.

number

A sync or merge source: how often it refreshes in full, in seconds.

How often a sync or merge source refreshes in full, in seconds, up to 604800. A source that takes long to fetch may be held to a longer interval; the answer says what was set.

boolean

A sync source: switch incremental refreshes on or off.

For a sync source: switch incremental refreshes on or off. On needs incremental details whose status is active, saved now or before.

number

A sync source: how often incremental refreshes run, in seconds.

For a sync source: how often incremental refreshes run, in seconds. Held between the shortest and longest the app allows, and shorter than the full refresh.

object

A sync source: how it fetches only changed records.

How this sync source fetches only changed records. Setting status active checks the dedupKey and sinceArguments against the stored rows and the app first, and saves nothing if they fail.

  • statusstring

    Whether this source can fetch only changed records: active or unavailable.

    • activeThis source can fetch only changed records.
    • unavailableIt cannot.
  • dedupKeyarray of strings

    The field paths that identify a record, such as ["id"].

  • sinceArgumentsobject

    The extra action arguments that ask the app for records changed since the last check, keyed like the source's arguments, such as { "updatedAfter": "{{since}}" }.

  • catchesstring

    What the change check finds: newAndChanged or newOnly. Left out, it is measured.

    • newAndChangedThe check finds new and edited records.
    • newOnlyIt finds new records only.
  • overlapSecondsnumber

    How far back before the last check each check looks, in seconds: one of 300, 900, 1800, 3600, 7200, 21600.

string

The receipt a 409 ANALYTICS_EMBED_CONFIRMATION_REQUIRED answered, to confirm the change to published embeds.

Only after a 409 ANALYTICS_EMBED_CONFIRMATION_REQUIRED for the same request: the confirmationReceipt from its error.details, confirming the change to the published embeds it lists.

Response fields

idstring

The data source's id.

namestring

The data source's name.

descriptionstring

What the data holds, in a sentence.

createdBystring

The userId of the member who created it, from List Members: the key's creator for their own sources.

typestring

sync: fetched from an app action on a schedule and stored; live: fetched from an app action when a drill-down opens, with its values, and never stored; merge: combines other sources with SQL and code; fixed: rows you supply, never refetched.

  • sync
  • live
  • merge
  • fixed
appIdstring

The app a sync or live source fetches from, from List Universal Apps. Null for merge and fixed sources.

actionIdstring

The app action it fetches with, from List Universal Actions. Null for merge and fixed sources.

actionNamestring

The app action's name.

connectionIdstring

The connection it fetches with, from List Connections. Null for merge and fixed sources.

statusstring

Where its data stands. live: a live source, which has no stored data; neverFetched: no fetch has run yet; noData: a fixed source with no rows yet; draft: waiting for its first fetch; queued: a fetch is waiting to start; refreshing: a fetch is running; ready: its rows are stored; empty: the last fetch returned no rows; failed: the last fetch failed (see message).

  • live
  • neverFetched
  • noData
  • draft
  • queued
  • refreshing
  • ready
  • empty
  • failed
rowCountnumber

How many rows the last fetch stored.

fetchedOndate

When the stored rows were fetched.

messagestring

Why the last fetch failed, when it did.

refreshIntervalSecondsnumber

How often a sync or merge source refreshes in full, in seconds. Null for live and fixed sources.

isIncrementalEnabledboolean

For a sync source, whether incremental refreshes (fetching only changed records between full refreshes) are switched on. Null for other types.

incrementalIntervalSecondsnumber

How often incremental refreshes run, in seconds, while they run. Null otherwise.

isPausedboolean

True when every page that uses it is paused or deleted, so its scheduled refresh is skipped.

panelCountnumber

How many panels on its owner's pages read it.

isUnusedboolean

True when no panel reads it and it has not changed for a day: the sources the app's cleanup offers to delete.

createdOndate

When it was created.

updatedOndate

When it last changed.

appVersionstring

The app version a sync or live source is pinned to.

latestAppVersionstring

The app's current published version, when the source is pinned to an older one. Null when it is current.

argumentsobject

The action's arguments, as stored: each value in its stored form. Send them back as they are, or as plain values. Null for merge and fixed sources.

optionsobject

The action's options, such as pagination. Null for merge and fixed sources.

queryobject

The filter and sort the app applies before the rows are stored: { filter, sort }. Null when there is none.

inputsarray of objects

For a merge source, the sources it combines. Null for other types.

  • dataSourceIdstring

    The input source, from List Analytics Data Sources.

  • aliasstring

    The name the merge SQL and code read this input by.

  • querystring

    The SQL that shapes this input, reading it as `src`. Empty when it is used as is.

transformCodestring

For a merge source, the code that combines its inputs. Null for other types.

fileobject

For a fixed source, the data it holds. Null for other types, or before any data is stored.

  • originstring

    Where the rows came from. rows: rows sent in a request; attachment: an uploaded file; tableEditor: an edit to the table.

    • rows
    • attachment
    • tableEditor
  • filenamestring

    The file's name, or the label given to rows sent in a request.

  • formatstring

    The file format, such as csv, xlsx or json.

  • mimeTypestring

    The file's media type.

  • sizeBytesnumber

    The size of the stored data in bytes.

  • uploadedOndate

    When the data was stored.

  • rowCountnumber

    How many rows the data holds.

  • sheetNamestring

    For a spreadsheet, the sheet the rows are read from.

  • useHeaderboolean

    For a spreadsheet, whether its first row holds the column names.

  • removeTopRowsnumber

    For a spreadsheet, how many rows above the header are skipped.

dateKeysobject

Which columns hold dates, for page date filters. Null until they are known.

  • primaryDateKeystring

    The column page date filters use for this source.

  • primaryDateKeyGrainstring

    The primary date column's grain: day for dates, timestamp for dates with times.

  • createdDateKeystring

    The column holding when each record was created.

  • updatedDateKeystring

    The column holding when each record last changed.

  • hasNoDatesboolean

    True when the source has no date column.

isIncrementalActiveboolean

For a sync source, whether incremental refreshes actually run: switched on, and the source can fetch only changed records. Null for other types.

incrementalobject

For a sync source, how it fetches only changed records. Null when that was never set up.

  • statusstring

    Whether this source can fetch only changed records. active: it can; unavailable: it cannot.

    • active
    • unavailable
  • dedupKeyarray

    The field paths that identify a record, used to replace changed records.

  • sinceArgumentsobject

    The extra action arguments that ask the app for records changed since the last check.

  • catchesstring

    What the change check finds. newAndChanged: new and edited records; newOnly: new records only.

    • newAndChanged
    • newOnly
  • overlapSecondsnumber

    How far back before the last check each check looks, in seconds.

  • reasonstring

    Why changed records cannot be fetched, when status is unavailable.

  • checkedOndate

    When these details were last checked against the source.

coverageobject

For a sync source, how much time its stored rows span. Null when not measured.

  • codestring

    The coverage verdict, such as COVERED, TRUNCATED or FILTER_NOT_APPLIED.

  • levelstring

    How the verdict reads: ok, info or warn.

    • ok
    • info
    • warn
  • messagestring

    The verdict in words.

  • coverageFromdate

    The earliest record date the data holds.

  • coverageTodate

    The latest record date the data holds.