ObertObert
Analytics

Run Analytics Query

POST
/api/analytics/query
AuthorizationBearer <token>

In: header

query

A live query over outbound facts. Saved on reports as query_json.

dashboard_filters?|null
timezone?string
Default"UTC"

Response Body

application/json

application/json

curl -X POST "https://api.obert.io/api/analytics/query" \  -H "Content-Type: application/json" \  -d '{    "query": {      "metrics": [        "actions"      ]    }  }'
{
  "chart_type": "line",
  "dimensions": [
    {
      "id": "date",
      "label": "string"
    }
  ],
  "metrics": [
    {
      "id": "actions",
      "label": "string",
      "format": "number",
      "empty_hint": "string"
    }
  ],
  "rows": [
    {
      "keys": {
        "property1": "string",
        "property2": "string"
      },
      "labels": {
        "property1": "string",
        "property2": "string"
      },
      "values": {
        "property1": 0,
        "property2": 0
      },
      "colors": {
        "property1": "string",
        "property2": "string"
      }
    }
  ],
  "totals": {
    "property1": 0,
    "property2": 0
  },
  "previous_totals": {
    "property1": 0,
    "property2": 0
  },
  "series_totals": [
    {
      "keys": {
        "property1": "string",
        "property2": "string"
      },
      "labels": {
        "property1": "string",
        "property2": "string"
      },
      "values": {
        "property1": 0,
        "property2": 0
      },
      "colors": {
        "property1": "string",
        "property2": "string"
      }
    }
  ],
  "window": {
    "start": "2019-08-24T14:15:22Z",
    "end": "2019-08-24T14:15:22Z",
    "timezone": "string",
    "interval": "day",
    "previous_start": "2019-08-24T14:15:22Z",
    "previous_end": "2019-08-24T14:15:22Z"
  },
  "truncated_dimensions": [
    "date"
  ],
  "warnings": [
    "string"
  ],
  "effective_query": {
    "metrics": [
      "actions"
    ],
    "dimensions": [
      "date"
    ],
    "chart_type": "line",
    "date_range": {
      "kind": "preset",
      "preset": "today"
    },
    "interval": "day",
    "filters": [
      {
        "dimension": "date",
        "operator": "in",
        "values": [
          "string"
        ]
      }
    ],
    "breakdown_limit": 10,
    "compare_previous": false
  },
  "computed_at": "2019-08-24T14:15:22Z"
}
{
  "detail": [
    {
      "loc": [
        "string"
      ],
      "msg": "string",
      "type": "string",
      "input": null,
      "ctx": {}
    }
  ]
}