Docs

Preview Analytics Panel Transform

Try transform code on a panel's sources before you save it with Update Analytics Panel. Nothing is saved.

POST

Path

Path parameters
stringrequired

The page id, from List Analytics Pages.

stringrequired

The panel id, from Get Analytics Page.

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
stringrequired

The code to try.

JavaScript function body receiving each source as a named input ({ alias }) and returning rows, as transformCode on Update Analytics Panel.

number

How many rows to answer, 1-1000.

How many rows to answer, 1-1000. Defaults to 100.

Default: 100

number

How many rows to skip.

How many rows to skip. Defaults to 0.

Default: 0

Response fields

columnsarray of string

The column names the rows carry, in order.

rowsarray of objects

The rows in this window, as objects keyed by column.

rowCountnumber

How many rows there are in all.

offsetnumber

Where this window starts.

nextOffsetnumber

The offset of the next window, or null when this is the last.