|
| 1 | +# WorkspaceProxies |
| 2 | + |
| 3 | +## Create workspace proxy |
| 4 | + |
| 5 | +### Code samples |
| 6 | + |
| 7 | +```shell |
| 8 | +# Example request using curl |
| 9 | +curl -X POST http://coder-server:8080/api/v2/workspaceproxies \ |
| 10 | + -H 'Content-Type: application/json' \ |
| 11 | + -H 'Accept: application/json' \ |
| 12 | + -H 'Coder-Session-Token: API_KEY' |
| 13 | +``` |
| 14 | + |
| 15 | +`POST /workspaceproxies` |
| 16 | + |
| 17 | +> Body parameter |
| 18 | +
|
| 19 | +```json |
| 20 | +{ |
| 21 | + "display_name": "string", |
| 22 | + "icon": "string", |
| 23 | + "name": "string", |
| 24 | + "url": "string", |
| 25 | + "wildcard_hostname": "string" |
| 26 | +} |
| 27 | +``` |
| 28 | + |
| 29 | +### Parameters |
| 30 | + |
| 31 | +| Name | In | Type | Required | Description | |
| 32 | +| ------ | ---- | -------------------------------------------------------------------------------------- | -------- | ------------------------------ | |
| 33 | +| `body` | body | [codersdk.CreateWorkspaceProxyRequest](schemas.md#codersdkcreateworkspaceproxyrequest) | true | Create workspace proxy request | |
| 34 | + |
| 35 | +### Example responses |
| 36 | + |
| 37 | +> 201 Response |
| 38 | +
|
| 39 | +```json |
| 40 | +{ |
| 41 | + "created_at": "2019-08-24T14:15:22Z", |
| 42 | + "deleted": true, |
| 43 | + "icon": "string", |
| 44 | + "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", |
| 45 | + "name": "string", |
| 46 | + "updated_at": "2019-08-24T14:15:22Z", |
| 47 | + "url": "string", |
| 48 | + "wildcard_hostname": "string" |
| 49 | +} |
| 50 | +``` |
| 51 | + |
| 52 | +### Responses |
| 53 | + |
| 54 | +| Status | Meaning | Description | Schema | |
| 55 | +| ------ | ------------------------------------------------------------ | ----------- | ------------------------------------------------------------ | |
| 56 | +| 201 | [Created](https://tools.ietf.org/html/rfc7231#section-6.3.2) | Created | [codersdk.WorkspaceProxy](schemas.md#codersdkworkspaceproxy) | |
| 57 | + |
| 58 | +To perform this operation, you must be authenticated. [Learn more](authentication.md). |
| 59 | + |
| 60 | +## Delete workspace proxy |
| 61 | + |
| 62 | +### Code samples |
| 63 | + |
| 64 | +```shell |
| 65 | +# Example request using curl |
| 66 | +curl -X DELETE http://coder-server:8080/api/v2/workspaceproxies/{workspaceproxy} \ |
| 67 | + -H 'Accept: application/json' \ |
| 68 | + -H 'Coder-Session-Token: API_KEY' |
| 69 | +``` |
| 70 | + |
| 71 | +`DELETE /workspaceproxies/{workspaceproxy}` |
| 72 | + |
| 73 | +### Parameters |
| 74 | + |
| 75 | +| Name | In | Type | Required | Description | |
| 76 | +| ---------------- | ---- | ------------ | -------- | ---------------- | |
| 77 | +| `workspaceproxy` | path | string(uuid) | true | Proxy ID or name | |
| 78 | + |
| 79 | +### Example responses |
| 80 | + |
| 81 | +> 200 Response |
| 82 | +
|
| 83 | +```json |
| 84 | +{ |
| 85 | + "detail": "string", |
| 86 | + "message": "string", |
| 87 | + "validations": [ |
| 88 | + { |
| 89 | + "detail": "string", |
| 90 | + "field": "string" |
| 91 | + } |
| 92 | + ] |
| 93 | +} |
| 94 | +``` |
| 95 | + |
| 96 | +### Responses |
| 97 | + |
| 98 | +| Status | Meaning | Description | Schema | |
| 99 | +| ------ | ------------------------------------------------------- | ----------- | ------------------------------------------------ | |
| 100 | +| 200 | [OK](https://tools.ietf.org/html/rfc7231#section-6.3.1) | OK | [codersdk.Response](schemas.md#codersdkresponse) | |
| 101 | + |
| 102 | +To perform this operation, you must be authenticated. [Learn more](authentication.md). |
0 commit comments