feat: add regions endpoint for proxies feature (#7277)

* feat: add regions endpoint for proxies feature
This commit is contained in:
Dean Sheather
2023-04-25 07:37:52 -07:00
committed by GitHub
parent 6e8ff2d95c
commit a98341612c
13 changed files with 625 additions and 6 deletions

View File

@ -3480,6 +3480,56 @@ Parameter represents a set value for the scope.
| `api` | integer | false | | |
| `disable_all` | boolean | false | | |
## codersdk.Region
```json
{
"display_name": "string",
"healthy": true,
"icon_url": "string",
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"name": "string",
"path_app_url": "string",
"wildcard_hostname": "string"
}
```
### Properties
| Name | Type | Required | Restrictions | Description |
| ------------------- | ------- | -------- | ------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `display_name` | string | false | | |
| `healthy` | boolean | false | | |
| `icon_url` | string | false | | |
| `id` | string | false | | |
| `name` | string | false | | |
| `path_app_url` | string | false | | Path app URL is the URL to the base path for path apps. Optional unless wildcard_hostname is set. E.g. https://us.example.com |
| `wildcard_hostname` | string | false | | Wildcard hostname is the wildcard hostname for subdomain apps. E.g. _.us.example.com E.g. _--suffix.au.example.com Optional. Does not need to be on the same domain as PathAppURL. |
## codersdk.RegionsResponse
```json
{
"regions": [
{
"display_name": "string",
"healthy": true,
"icon_url": "string",
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"name": "string",
"path_app_url": "string",
"wildcard_hostname": "string"
}
]
}
```
### Properties
| Name | Type | Required | Restrictions | Description |
| --------- | ------------------------------------------- | -------- | ------------ | ----------- |
| `regions` | array of [codersdk.Region](#codersdkregion) | false | | |
## codersdk.Replica
```json

View File

@ -0,0 +1,42 @@
# WorkspaceProxies
## Get site-wide regions for workspace connections
### Code samples
```shell
# Example request using curl
curl -X GET http://coder-server:8080/api/v2/regions \
-H 'Accept: application/json' \
-H 'Coder-Session-Token: API_KEY'
```
`GET /regions`
### Example responses
> 200 Response
```json
{
"regions": [
{
"display_name": "string",
"healthy": true,
"icon_url": "string",
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"name": "string",
"path_app_url": "string",
"wildcard_hostname": "string"
}
]
}
```
### Responses
| Status | Meaning | Description | Schema |
| ------ | ------------------------------------------------------- | ----------- | -------------------------------------------------------------- |
| 200 | [OK](https://tools.ietf.org/html/rfc7231#section-6.3.1) | OK | [codersdk.RegionsResponse](schemas.md#codersdkregionsresponse) |
To perform this operation, you must be authenticated. [Learn more](authentication.md).