Metrics

Get Preview Data

POST
/v0/project/{idOrSlug}/metrics/preview

Authorization

apiKeyAuth
x-api-key<token>

FastStats API key. Pass it in the x-api-key header or as a Bearer token in the Authorization header.

In: header

Path Parameters

idOrSlug*string

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/v0/project/string/metrics/preview" \  -H "Content-Type: application/json" \  -d '{    "queryConfig": {},    "chartType": "widget",    "flowNodes": [      {        "id": "string"      }    ],    "flowEdges": [      {        "id": "string",        "source": "string",        "target": "string"      }    ]  }'
{  "data": null,  "flowMeta": {    "outputs": [      {        "id": "string",        "index": 0,        "name": "string",        "explicitName": "string",        "iconSetId": "string",        "color": "string",        "colors": [          "string"        ],        "splitPattern": "string",        "splitDataSource": "string",        "groupField": "string",        "groupFields": [          "string"        ],        "primaryMetric": {          "field": "string",          "aggregation": "string"        }      }    ],    "hasTimeGroup": true,    "hasBreakdownTimeSeries": true,    "datasourceFields": [      "string"    ],    "splitLabelSeparator": "string",    "timeGroupInterval": "minute"  },  "markers": [    {      "id": "string",      "collectionId": "string",      "collectionName": "string",      "timestamp": "string",      "title": "string",      "description": "string",      "icon": "string",      "emoji": "string",      "color": "string"    }  ],  "markerCollectionGrouping": {    "property1": "auto",    "property2": "auto"  }}
{  "_tag": "UnauthorizedError",  "message": "string"}
{  "_tag": "ForbiddenError",  "message": "string",  "code": "string"}
{  "_tag": "NotFoundError",  "message": "string"}
{  "_tag": "InternalServerError",  "message": "string"}