docs: fix /audit & /insights params (#12043)

This commit is contained in:
Eric Paulsen
2024-02-07 08:38:54 -05:00
committed by GitHub
parent 1cf4b62867
commit 1abe0cfa1a
6 changed files with 133 additions and 8 deletions

27
docs/api/insights.md generated
View File

@ -43,13 +43,20 @@ To perform this operation, you must be authenticated. [Learn more](authenticatio
```shell
# Example request using curl
curl -X GET http://coder-server:8080/api/v2/insights/templates \
curl -X GET http://coder-server:8080/api/v2/insights/templates?before=0&after=0 \
-H 'Accept: application/json' \
-H 'Coder-Session-Token: API_KEY'
```
`GET /insights/templates`
### Parameters
| Name | In | Type | Required | Description |
| -------- | ----- | ------- | -------- | ----------- |
| `before` | query | integer | true | Start time |
| `after` | query | integer | true | End time |
### Example responses
> 200 Response
@ -121,13 +128,20 @@ To perform this operation, you must be authenticated. [Learn more](authenticatio
```shell
# Example request using curl
curl -X GET http://coder-server:8080/api/v2/insights/user-activity \
curl -X GET http://coder-server:8080/api/v2/insights/user-activity?before=0&after=0 \
-H 'Accept: application/json' \
-H 'Coder-Session-Token: API_KEY'
```
`GET /insights/user-activity`
### Parameters
| Name | In | Type | Required | Description |
| -------- | ----- | ------- | -------- | ----------- |
| `before` | query | integer | true | Start time |
| `after` | query | integer | true | End time |
### Example responses
> 200 Response
@ -165,13 +179,20 @@ To perform this operation, you must be authenticated. [Learn more](authenticatio
```shell
# Example request using curl
curl -X GET http://coder-server:8080/api/v2/insights/user-latency \
curl -X GET http://coder-server:8080/api/v2/insights/user-latency?before=0&after=0 \
-H 'Accept: application/json' \
-H 'Coder-Session-Token: API_KEY'
```
`GET /insights/user-latency`
### Parameters
| Name | In | Type | Required | Description |
| -------- | ----- | ------- | -------- | ----------- |
| `before` | query | integer | true | Start time |
| `after` | query | integer | true | End time |
### Example responses
> 200 Response