Skip to content
Skip to Content
Coder Docs

Get insights about user activity

GET
/api/v2/insights/user-activity

Authorization

CoderSessionToken
headerCoder-Session-Token<token>

Query Parameters

start_time*string

Start time

Formatdate-time
end_time*string

End time

Formatdate-time
template_ids?array<string>

Template IDs

Response Body

OK

application/json
  1. response
report?

The samples read CODER_URL and CODER_SESSION_TOKEN: set up your environment.

curl -X GET \	"$CODER_URL/api/v2/insights/user-activity?start_time={start_time}&end_time={end_time}" \	-H "Coder-Session-Token: $CODER_SESSION_TOKEN"
Example Response200
{  "report": {    "end_time": "2019-08-24T14:15:22Z",    "start_time": "2019-08-24T14:15:22Z",    "template_ids": [      "711c30a3-6011-4cbe-a63a-23cdf9bb9ce1"    ],    "users": [      {        "avatar_url": "http://example.com",        "seconds": 80500,        "template_ids": [          "711c30a3-6011-4cbe-a63a-23cdf9bb9ce1"        ],        "user_id": "a169451c-8525-4352-b8ca-070dd449a1a5",        "username": "string"      }    ]  }}