Skip to content

Commit dbd37ac

Browse files
committed
fmt
1 parent 2608bbc commit dbd37ac

File tree

2 files changed

+126
-4
lines changed

2 files changed

+126
-4
lines changed

docs/api/enterprise.md

Lines changed: 125 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1192,7 +1192,7 @@ curl -X GET http://coder-server:8080/api/v2/workspaceproxies \
11921192
"errors": ["string"],
11931193
"warnings": ["string"]
11941194
},
1195-
"status": "reachable"
1195+
"status": "ok"
11961196
},
11971197
"updated_at": "2019-08-24T14:15:22Z",
11981198
"url": "string",
@@ -1216,6 +1216,7 @@ Status Code **200**
12161216
| `[array item]` | array | false | | |
12171217
| `» created_at` | string(date-time) | false | | |
12181218
| `» deleted` | boolean | false | | |
1219+
| `» display_name` | string | false | | |
12191220
| `» icon` | string | false | | |
12201221
| `» id` | string(uuid) | false | | |
12211222
| `» name` | string | false | | |
@@ -1233,7 +1234,7 @@ Status Code **200**
12331234

12341235
| Property | Value |
12351236
| -------- | -------------- |
1236-
| `status` | `reachable` |
1237+
| `status` | `ok` |
12371238
| `status` | `unreachable` |
12381239
| `status` | `unhealthy` |
12391240
| `status` | `unregistered` |
@@ -1278,6 +1279,7 @@ curl -X POST http://coder-server:8080/api/v2/workspaceproxies \
12781279
{
12791280
"created_at": "2019-08-24T14:15:22Z",
12801281
"deleted": true,
1282+
"display_name": "string",
12811283
"icon": "string",
12821284
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
12831285
"name": "string",
@@ -1287,7 +1289,7 @@ curl -X POST http://coder-server:8080/api/v2/workspaceproxies \
12871289
"errors": ["string"],
12881290
"warnings": ["string"]
12891291
},
1290-
"status": "reachable"
1292+
"status": "ok"
12911293
},
12921294
"updated_at": "2019-08-24T14:15:22Z",
12931295
"url": "string",
@@ -1303,6 +1305,59 @@ curl -X POST http://coder-server:8080/api/v2/workspaceproxies \
13031305

13041306
To perform this operation, you must be authenticated. [Learn more](authentication.md).
13051307

1308+
## Get workspace proxy
1309+
1310+
### Code samples
1311+
1312+
```shell
1313+
# Example request using curl
1314+
curl -X GET http://coder-server:8080/api/v2/workspaceproxies/{workspaceproxy} \
1315+
-H 'Accept: application/json' \
1316+
-H 'Coder-Session-Token: API_KEY'
1317+
```
1318+
1319+
`GET /workspaceproxies/{workspaceproxy}`
1320+
1321+
### Parameters
1322+
1323+
| Name | In | Type | Required | Description |
1324+
| ---------------- | ---- | ------------ | -------- | ---------------- |
1325+
| `workspaceproxy` | path | string(uuid) | true | Proxy ID or name |
1326+
1327+
### Example responses
1328+
1329+
> 200 Response
1330+
1331+
```json
1332+
{
1333+
"created_at": "2019-08-24T14:15:22Z",
1334+
"deleted": true,
1335+
"display_name": "string",
1336+
"icon": "string",
1337+
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
1338+
"name": "string",
1339+
"status": {
1340+
"checked_at": "2019-08-24T14:15:22Z",
1341+
"report": {
1342+
"errors": ["string"],
1343+
"warnings": ["string"]
1344+
},
1345+
"status": "ok"
1346+
},
1347+
"updated_at": "2019-08-24T14:15:22Z",
1348+
"url": "string",
1349+
"wildcard_hostname": "string"
1350+
}
1351+
```
1352+
1353+
### Responses
1354+
1355+
| Status | Meaning | Description | Schema |
1356+
| ------ | ------------------------------------------------------- | ----------- | ------------------------------------------------------------ |
1357+
| 200 | [OK](https://tools.ietf.org/html/rfc7231#section-6.3.1) | OK | [codersdk.WorkspaceProxy](schemas.md#codersdkworkspaceproxy) |
1358+
1359+
To perform this operation, you must be authenticated. [Learn more](authentication.md).
1360+
13061361
## Delete workspace proxy
13071362

13081363
### Code samples
@@ -1346,3 +1401,70 @@ curl -X DELETE http://coder-server:8080/api/v2/workspaceproxies/{workspaceproxy}
13461401
| 200 | [OK](https://tools.ietf.org/html/rfc7231#section-6.3.1) | OK | [codersdk.Response](schemas.md#codersdkresponse) |
13471402

13481403
To perform this operation, you must be authenticated. [Learn more](authentication.md).
1404+
1405+
## Update workspace proxy
1406+
1407+
### Code samples
1408+
1409+
```shell
1410+
# Example request using curl
1411+
curl -X PATCH http://coder-server:8080/api/v2/workspaceproxies/{workspaceproxy} \
1412+
-H 'Content-Type: application/json' \
1413+
-H 'Accept: application/json' \
1414+
-H 'Coder-Session-Token: API_KEY'
1415+
```
1416+
1417+
`PATCH /workspaceproxies/{workspaceproxy}`
1418+
1419+
> Body parameter
1420+
1421+
```json
1422+
{
1423+
"display_name": "string",
1424+
"icon": "string",
1425+
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
1426+
"name": "string",
1427+
"regenerate_token": true
1428+
}
1429+
```
1430+
1431+
### Parameters
1432+
1433+
| Name | In | Type | Required | Description |
1434+
| ---------------- | ---- | ---------------------------------------------------------------------- | -------- | ------------------------------ |
1435+
| `workspaceproxy` | path | string(uuid) | true | Proxy ID or name |
1436+
| `body` | body | [codersdk.PatchWorkspaceProxy](schemas.md#codersdkpatchworkspaceproxy) | true | Update workspace proxy request |
1437+
1438+
### Example responses
1439+
1440+
> 200 Response
1441+
1442+
```json
1443+
{
1444+
"created_at": "2019-08-24T14:15:22Z",
1445+
"deleted": true,
1446+
"display_name": "string",
1447+
"icon": "string",
1448+
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
1449+
"name": "string",
1450+
"status": {
1451+
"checked_at": "2019-08-24T14:15:22Z",
1452+
"report": {
1453+
"errors": ["string"],
1454+
"warnings": ["string"]
1455+
},
1456+
"status": "ok"
1457+
},
1458+
"updated_at": "2019-08-24T14:15:22Z",
1459+
"url": "string",
1460+
"wildcard_hostname": "string"
1461+
}
1462+
```
1463+
1464+
### Responses
1465+
1466+
| Status | Meaning | Description | Schema |
1467+
| ------ | ------------------------------------------------------- | ----------- | ------------------------------------------------------------ |
1468+
| 200 | [OK](https://tools.ietf.org/html/rfc7231#section-6.3.1) | OK | [codersdk.WorkspaceProxy](schemas.md#codersdkworkspaceproxy) |
1469+
1470+
To perform this operation, you must be authenticated. [Learn more](authentication.md).

enterprise/coderd/workspaceproxy.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -419,7 +419,7 @@ func (api *API) workspaceProxyRegister(rw http.ResponseWriter, r *http.Request)
419419
// Log: api.Logger,
420420
// Request: r,
421421
// Action: database.AuditActionWrite,
422-
//})
422+
// })
423423
)
424424
// aReq.Old = proxy
425425
// defer commitAudit()

0 commit comments

Comments
 (0)