Insights

Get insights about templates

Changed on
get/api/v2/insights/templates

Request

  • Base URL
    / (relative, and the document was published on a file host, not at the API’s origin)
  • URL
    /api/v2/insights/templates
  • Auth
    API key in header Coder-Session-Token

Query parameters

start_timestring date-time required

Start time

end_timestring date-time required

End time

interval'week' | 'day' required

Interval

template_idsstring[]

Template IDs

Response

OK

Example response

{
  "interval_reports": [
    {
      "active_users": 14
    }
  ],
  "report": {
    "active_users": 22,
    "apps_usage": [
      {
        "display_name": "VS Code",
        "seconds": 80500,
        "slug": "vscode",
        "times_used": 2
      }
    ],
    "usage_total_seconds": 120000
  }
}

Changes