CLIInsights

CLI

Insights

Read the statistics of an establishment from the terminal over the last 24 hours, 7 days or 28 days, as JSON ready for jq.

insights:get takes the id of an establishment and returns its statistics as JSON. The metrics are described in Insights.

sofia insights:get $ESTABLISHMENT_ID

Choose a period

--period accepts three values:

  • last24Hours: the last 24 hours.
  • last7Days: the last 7 days.
  • last28Days: the last 28 days, the default of the API.
sofia insights:get $ESTABLISHMENT_ID --period last7Days

Pipe the answer into jq to keep one number, for a dashboard or a weekly report.

Was this page helpful?