mirror of
https://github.com/coder/coder.git
synced 2026-09-24 15:04:27 +08:00
fix: correct swagger description for Insights API (#13442)
This commit is contained in:
Generated
+33
-16
@@ -6,13 +6,19 @@
|
||||
|
||||
```shell
|
||||
# Example request using curl
|
||||
curl -X GET http://coder-server:8080/api/v2/insights/daus \
|
||||
curl -X GET http://coder-server:8080/api/v2/insights/daus?tz_offset=0 \
|
||||
-H 'Accept: application/json' \
|
||||
-H 'Coder-Session-Token: API_KEY'
|
||||
```
|
||||
|
||||
`GET /insights/daus`
|
||||
|
||||
### Parameters
|
||||
|
||||
| Name | In | Type | Required | Description |
|
||||
| ----------- | ----- | ------- | -------- | -------------------------- |
|
||||
| `tz_offset` | query | integer | true | Time-zone offset (e.g. -2) |
|
||||
|
||||
### Example responses
|
||||
|
||||
> 200 Response
|
||||
@@ -43,7 +49,7 @@ 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?before=0&after=0 \
|
||||
curl -X GET http://coder-server:8080/api/v2/insights/templates?start_time=2019-08-24T14%3A15%3A22Z&end_time=2019-08-24T14%3A15%3A22Z&interval=week \
|
||||
-H 'Accept: application/json' \
|
||||
-H 'Coder-Session-Token: API_KEY'
|
||||
```
|
||||
@@ -52,10 +58,19 @@ curl -X GET http://coder-server:8080/api/v2/insights/templates?before=0&after=0
|
||||
|
||||
### Parameters
|
||||
|
||||
| Name | In | Type | Required | Description |
|
||||
| -------- | ----- | ------- | -------- | ----------- |
|
||||
| `before` | query | integer | true | Start time |
|
||||
| `after` | query | integer | true | End time |
|
||||
| Name | In | Type | Required | Description |
|
||||
| -------------- | ----- | ----------------- | -------- | ------------ |
|
||||
| `start_time` | query | string(date-time) | true | Start time |
|
||||
| `end_time` | query | string(date-time) | true | End time |
|
||||
| `interval` | query | string | true | Interval |
|
||||
| `template_ids` | query | array[string] | false | Template IDs |
|
||||
|
||||
#### Enumerated Values
|
||||
|
||||
| Parameter | Value |
|
||||
| ---------- | ------ |
|
||||
| `interval` | `week` |
|
||||
| `interval` | `day` |
|
||||
|
||||
### Example responses
|
||||
|
||||
@@ -129,7 +144,7 @@ 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?before=0&after=0 \
|
||||
curl -X GET http://coder-server:8080/api/v2/insights/user-activity?start_time=2019-08-24T14%3A15%3A22Z&end_time=2019-08-24T14%3A15%3A22Z \
|
||||
-H 'Accept: application/json' \
|
||||
-H 'Coder-Session-Token: API_KEY'
|
||||
```
|
||||
@@ -138,10 +153,11 @@ curl -X GET http://coder-server:8080/api/v2/insights/user-activity?before=0&afte
|
||||
|
||||
### Parameters
|
||||
|
||||
| Name | In | Type | Required | Description |
|
||||
| -------- | ----- | ------- | -------- | ----------- |
|
||||
| `before` | query | integer | true | Start time |
|
||||
| `after` | query | integer | true | End time |
|
||||
| Name | In | Type | Required | Description |
|
||||
| -------------- | ----- | ----------------- | -------- | ------------ |
|
||||
| `start_time` | query | string(date-time) | true | Start time |
|
||||
| `end_time` | query | string(date-time) | true | End time |
|
||||
| `template_ids` | query | array[string] | false | Template IDs |
|
||||
|
||||
### Example responses
|
||||
|
||||
@@ -180,7 +196,7 @@ 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?before=0&after=0 \
|
||||
curl -X GET http://coder-server:8080/api/v2/insights/user-latency?start_time=2019-08-24T14%3A15%3A22Z&end_time=2019-08-24T14%3A15%3A22Z \
|
||||
-H 'Accept: application/json' \
|
||||
-H 'Coder-Session-Token: API_KEY'
|
||||
```
|
||||
@@ -189,10 +205,11 @@ curl -X GET http://coder-server:8080/api/v2/insights/user-latency?before=0&after
|
||||
|
||||
### Parameters
|
||||
|
||||
| Name | In | Type | Required | Description |
|
||||
| -------- | ----- | ------- | -------- | ----------- |
|
||||
| `before` | query | integer | true | Start time |
|
||||
| `after` | query | integer | true | End time |
|
||||
| Name | In | Type | Required | Description |
|
||||
| -------------- | ----- | ----------------- | -------- | ------------ |
|
||||
| `start_time` | query | string(date-time) | true | Start time |
|
||||
| `end_time` | query | string(date-time) | true | End time |
|
||||
| `template_ids` | query | array[string] | false | Template IDs |
|
||||
|
||||
### Example responses
|
||||
|
||||
|
||||
Reference in New Issue
Block a user