Analytics
Run
POST/analytics/run
- subjectRequired
- In the JSON body: one of sales, inventory, work_orders.
- measureRequired
- In the JSON body: text, up to 40 characters.
- intervalRequired
- In the JSON body: one of hour, day, week, month, year.
- fromRequired
- In the JSON body: text.
- toRequired
- In the JSON body: text.
- groupBy
- In the JSON body: text, up to 40 characters.
- filters
- In the JSON body: object.
- compare
- In the JSON body: one of previous, year.
- byInterval
- In the JSON body: true or false. Default false.
curl -X POST "http://app.telltailhq.com/api/v1/analytics/run" \
-H "Authorization: Bearer tt_pat_your_token" \
-H "Content-Type: application/json" \
-d '{"subject":"sales","measure":"…","interval":"hour","from":"…","to":"…"}'Export
POST/analytics/export
- paramsRequired
- In the JSON body: object.
- format
- In the JSON body: one of csv, xlsx, pdf. Default csv.
- sort
- In the JSON body: text, up to 80 characters.
curl -X POST "http://app.telltailhq.com/api/v1/analytics/export" \
-H "Authorization: Bearer tt_pat_your_token" \
-H "Content-Type: application/json" \
-d '{"params":{"subject":"sales","measure":"…","interval":"hour","from":"…","to":"…"}}'Values
GET/analytics/values
- subjectRequired
- In the query: one of sales, inventory, work_orders.
- dimensionRequired
- In the query: text, up to 40 characters.
- q
- In the query: text, up to 80 characters.
- ids
- In the query: list of text, up to 80 characters, up to 200.
curl "http://app.telltailhq.com/api/v1/analytics/values" \
-H "Authorization: Bearer tt_pat_your_token"