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
+2 -2
View File
@@ -6,7 +6,7 @@
```shell
# Example request using curl
curl -X GET http://coder-server:8080/api/v2/audit \
curl -X GET http://coder-server:8080/api/v2/audit?limit=0 \
-H 'Accept: application/json' \
-H 'Coder-Session-Token: API_KEY'
```
@@ -18,7 +18,7 @@ curl -X GET http://coder-server:8080/api/v2/audit \
| Name | In | Type | Required | Description |
| -------- | ----- | ------- | -------- | ------------ |
| `q` | query | string | false | Search query |
| `limit` | query | integer | false | Page limit |
| `limit` | query | integer | true | Page limit |
| `offset` | query | integer | false | Page offset |
### Example responses
+24 -3
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