mirror of
https://github.com/coder/coder.git
synced 2026-09-24 15:04:27 +08:00
refactor: generate application URL on backend side (#9618)
This commit is contained in:
Generated
+2
@@ -389,6 +389,7 @@ curl -X GET http://coder-server:8080/api/v2/workspaceagents/me/manifest \
|
||||
"sharing_level": "owner",
|
||||
"slug": "string",
|
||||
"subdomain": true,
|
||||
"subdomain_name": "string",
|
||||
"url": "string"
|
||||
}
|
||||
],
|
||||
@@ -658,6 +659,7 @@ curl -X GET http://coder-server:8080/api/v2/workspaceagents/{workspaceagent} \
|
||||
"sharing_level": "owner",
|
||||
"slug": "string",
|
||||
"subdomain": true,
|
||||
"subdomain_name": "string",
|
||||
"url": "string"
|
||||
}
|
||||
],
|
||||
|
||||
Generated
+8
@@ -74,6 +74,7 @@ curl -X GET http://coder-server:8080/api/v2/users/{user}/workspace/{workspacenam
|
||||
"sharing_level": "owner",
|
||||
"slug": "string",
|
||||
"subdomain": true,
|
||||
"subdomain_name": "string",
|
||||
"url": "string"
|
||||
}
|
||||
],
|
||||
@@ -237,6 +238,7 @@ curl -X GET http://coder-server:8080/api/v2/workspacebuilds/{workspacebuild} \
|
||||
"sharing_level": "owner",
|
||||
"slug": "string",
|
||||
"subdomain": true,
|
||||
"subdomain_name": "string",
|
||||
"url": "string"
|
||||
}
|
||||
],
|
||||
@@ -539,6 +541,7 @@ curl -X GET http://coder-server:8080/api/v2/workspacebuilds/{workspacebuild}/res
|
||||
"sharing_level": "owner",
|
||||
"slug": "string",
|
||||
"subdomain": true,
|
||||
"subdomain_name": "string",
|
||||
"url": "string"
|
||||
}
|
||||
],
|
||||
@@ -640,6 +643,7 @@ Status Code **200**
|
||||
| `»»» sharing_level` | [codersdk.WorkspaceAppSharingLevel](schemas.md#codersdkworkspaceappsharinglevel) | false | | |
|
||||
| `»»» slug` | string | false | | Slug is a unique identifier within the agent. |
|
||||
| `»»» subdomain` | boolean | false | | Subdomain denotes whether the app should be accessed via a path on the `coder server` or via a hostname-based dev URL. If this is set to true and there is no app wildcard configured on the server, the app will not be accessible in the UI. |
|
||||
| `»»» subdomain_name` | string | false | | Subdomain name is the application domain exposed on the `coder server`. |
|
||||
| `»»» url` | string | false | | URL is the address being proxied to inside the workspace. If external is specified, this will be opened on the client. |
|
||||
| `»» architecture` | string | false | | |
|
||||
| `»» connection_timeout_seconds` | integer | false | | |
|
||||
@@ -798,6 +802,7 @@ curl -X GET http://coder-server:8080/api/v2/workspacebuilds/{workspacebuild}/sta
|
||||
"sharing_level": "owner",
|
||||
"slug": "string",
|
||||
"subdomain": true,
|
||||
"subdomain_name": "string",
|
||||
"url": "string"
|
||||
}
|
||||
],
|
||||
@@ -966,6 +971,7 @@ curl -X GET http://coder-server:8080/api/v2/workspaces/{workspace}/builds \
|
||||
"sharing_level": "owner",
|
||||
"slug": "string",
|
||||
"subdomain": true,
|
||||
"subdomain_name": "string",
|
||||
"url": "string"
|
||||
}
|
||||
],
|
||||
@@ -1103,6 +1109,7 @@ Status Code **200**
|
||||
| `»»»» sharing_level` | [codersdk.WorkspaceAppSharingLevel](schemas.md#codersdkworkspaceappsharinglevel) | false | | |
|
||||
| `»»»» slug` | string | false | | Slug is a unique identifier within the agent. |
|
||||
| `»»»» subdomain` | boolean | false | | Subdomain denotes whether the app should be accessed via a path on the `coder server` or via a hostname-based dev URL. If this is set to true and there is no app wildcard configured on the server, the app will not be accessible in the UI. |
|
||||
| `»»»» subdomain_name` | string | false | | Subdomain name is the application domain exposed on the `coder server`. |
|
||||
| `»»»» url` | string | false | | URL is the address being proxied to inside the workspace. If external is specified, this will be opened on the client. |
|
||||
| `»»» architecture` | string | false | | |
|
||||
| `»»» connection_timeout_seconds` | integer | false | | |
|
||||
@@ -1314,6 +1321,7 @@ curl -X POST http://coder-server:8080/api/v2/workspaces/{workspace}/builds \
|
||||
"sharing_level": "owner",
|
||||
"slug": "string",
|
||||
"subdomain": true,
|
||||
"subdomain_name": "string",
|
||||
"url": "string"
|
||||
}
|
||||
],
|
||||
|
||||
Generated
+21
-13
@@ -198,6 +198,7 @@
|
||||
"sharing_level": "owner",
|
||||
"slug": "string",
|
||||
"subdomain": true,
|
||||
"subdomain_name": "string",
|
||||
"url": "string"
|
||||
}
|
||||
],
|
||||
@@ -5438,6 +5439,7 @@ If the schedule is empty, the user will be updated to use the default schedule.|
|
||||
"sharing_level": "owner",
|
||||
"slug": "string",
|
||||
"subdomain": true,
|
||||
"subdomain_name": "string",
|
||||
"url": "string"
|
||||
}
|
||||
],
|
||||
@@ -5581,6 +5583,7 @@ If the schedule is empty, the user will be updated to use the default schedule.|
|
||||
"sharing_level": "owner",
|
||||
"slug": "string",
|
||||
"subdomain": true,
|
||||
"subdomain_name": "string",
|
||||
"url": "string"
|
||||
}
|
||||
],
|
||||
@@ -5939,25 +5942,27 @@ If the schedule is empty, the user will be updated to use the default schedule.|
|
||||
"sharing_level": "owner",
|
||||
"slug": "string",
|
||||
"subdomain": true,
|
||||
"subdomain_name": "string",
|
||||
"url": "string"
|
||||
}
|
||||
```
|
||||
|
||||
### Properties
|
||||
|
||||
| Name | Type | Required | Restrictions | Description |
|
||||
| --------------- | ---------------------------------------------------------------------- | -------- | ------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| `command` | string | false | | |
|
||||
| `display_name` | string | false | | Display name is a friendly name for the app. |
|
||||
| `external` | boolean | false | | External specifies whether the URL should be opened externally on the client or not. |
|
||||
| `health` | [codersdk.WorkspaceAppHealth](#codersdkworkspaceapphealth) | false | | |
|
||||
| `healthcheck` | [codersdk.Healthcheck](#codersdkhealthcheck) | false | | Healthcheck specifies the configuration for checking app health. |
|
||||
| `icon` | string | false | | Icon is a relative path or external URL that specifies an icon to be displayed in the dashboard. |
|
||||
| `id` | string | false | | |
|
||||
| `sharing_level` | [codersdk.WorkspaceAppSharingLevel](#codersdkworkspaceappsharinglevel) | false | | |
|
||||
| `slug` | string | false | | Slug is a unique identifier within the agent. |
|
||||
| `subdomain` | boolean | false | | Subdomain denotes whether the app should be accessed via a path on the `coder server` or via a hostname-based dev URL. If this is set to true and there is no app wildcard configured on the server, the app will not be accessible in the UI. |
|
||||
| `url` | string | false | | URL is the address being proxied to inside the workspace. If external is specified, this will be opened on the client. |
|
||||
| Name | Type | Required | Restrictions | Description |
|
||||
| ---------------- | ---------------------------------------------------------------------- | -------- | ------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| `command` | string | false | | |
|
||||
| `display_name` | string | false | | Display name is a friendly name for the app. |
|
||||
| `external` | boolean | false | | External specifies whether the URL should be opened externally on the client or not. |
|
||||
| `health` | [codersdk.WorkspaceAppHealth](#codersdkworkspaceapphealth) | false | | |
|
||||
| `healthcheck` | [codersdk.Healthcheck](#codersdkhealthcheck) | false | | Healthcheck specifies the configuration for checking app health. |
|
||||
| `icon` | string | false | | Icon is a relative path or external URL that specifies an icon to be displayed in the dashboard. |
|
||||
| `id` | string | false | | |
|
||||
| `sharing_level` | [codersdk.WorkspaceAppSharingLevel](#codersdkworkspaceappsharinglevel) | false | | |
|
||||
| `slug` | string | false | | Slug is a unique identifier within the agent. |
|
||||
| `subdomain` | boolean | false | | Subdomain denotes whether the app should be accessed via a path on the `coder server` or via a hostname-based dev URL. If this is set to true and there is no app wildcard configured on the server, the app will not be accessible in the UI. |
|
||||
| `subdomain_name` | string | false | | Subdomain name is the application domain exposed on the `coder server`. |
|
||||
| `url` | string | false | | URL is the address being proxied to inside the workspace. If external is specified, this will be opened on the client. |
|
||||
|
||||
#### Enumerated Values
|
||||
|
||||
@@ -6051,6 +6056,7 @@ If the schedule is empty, the user will be updated to use the default schedule.|
|
||||
"sharing_level": "owner",
|
||||
"slug": "string",
|
||||
"subdomain": true,
|
||||
"subdomain_name": "string",
|
||||
"url": "string"
|
||||
}
|
||||
],
|
||||
@@ -6363,6 +6369,7 @@ If the schedule is empty, the user will be updated to use the default schedule.|
|
||||
"sharing_level": "owner",
|
||||
"slug": "string",
|
||||
"subdomain": true,
|
||||
"subdomain_name": "string",
|
||||
"url": "string"
|
||||
}
|
||||
],
|
||||
@@ -6577,6 +6584,7 @@ If the schedule is empty, the user will be updated to use the default schedule.|
|
||||
"sharing_level": "owner",
|
||||
"slug": "string",
|
||||
"subdomain": true,
|
||||
"subdomain_name": "string",
|
||||
"url": "string"
|
||||
}
|
||||
],
|
||||
|
||||
Generated
+4
@@ -1585,6 +1585,7 @@ curl -X GET http://coder-server:8080/api/v2/templateversions/{templateversion}/d
|
||||
"sharing_level": "owner",
|
||||
"slug": "string",
|
||||
"subdomain": true,
|
||||
"subdomain_name": "string",
|
||||
"url": "string"
|
||||
}
|
||||
],
|
||||
@@ -1686,6 +1687,7 @@ Status Code **200**
|
||||
| `»»» sharing_level` | [codersdk.WorkspaceAppSharingLevel](schemas.md#codersdkworkspaceappsharinglevel) | false | | |
|
||||
| `»»» slug` | string | false | | Slug is a unique identifier within the agent. |
|
||||
| `»»» subdomain` | boolean | false | | Subdomain denotes whether the app should be accessed via a path on the `coder server` or via a hostname-based dev URL. If this is set to true and there is no app wildcard configured on the server, the app will not be accessible in the UI. |
|
||||
| `»»» subdomain_name` | string | false | | Subdomain name is the application domain exposed on the `coder server`. |
|
||||
| `»»» url` | string | false | | URL is the address being proxied to inside the workspace. If external is specified, this will be opened on the client. |
|
||||
| `»» architecture` | string | false | | |
|
||||
| `»» connection_timeout_seconds` | integer | false | | |
|
||||
@@ -1978,6 +1980,7 @@ curl -X GET http://coder-server:8080/api/v2/templateversions/{templateversion}/r
|
||||
"sharing_level": "owner",
|
||||
"slug": "string",
|
||||
"subdomain": true,
|
||||
"subdomain_name": "string",
|
||||
"url": "string"
|
||||
}
|
||||
],
|
||||
@@ -2079,6 +2082,7 @@ Status Code **200**
|
||||
| `»»» sharing_level` | [codersdk.WorkspaceAppSharingLevel](schemas.md#codersdkworkspaceappsharinglevel) | false | | |
|
||||
| `»»» slug` | string | false | | Slug is a unique identifier within the agent. |
|
||||
| `»»» subdomain` | boolean | false | | Subdomain denotes whether the app should be accessed via a path on the `coder server` or via a hostname-based dev URL. If this is set to true and there is no app wildcard configured on the server, the app will not be accessible in the UI. |
|
||||
| `»»» subdomain_name` | string | false | | Subdomain name is the application domain exposed on the `coder server`. |
|
||||
| `»»» url` | string | false | | URL is the address being proxied to inside the workspace. If external is specified, this will be opened on the client. |
|
||||
| `»» architecture` | string | false | | |
|
||||
| `»» connection_timeout_seconds` | integer | false | | |
|
||||
|
||||
Generated
+5
@@ -104,6 +104,7 @@ curl -X POST http://coder-server:8080/api/v2/organizations/{organization}/member
|
||||
"sharing_level": "owner",
|
||||
"slug": "string",
|
||||
"subdomain": true,
|
||||
"subdomain_name": "string",
|
||||
"url": "string"
|
||||
}
|
||||
],
|
||||
@@ -294,6 +295,7 @@ curl -X GET http://coder-server:8080/api/v2/users/{user}/workspace/{workspacenam
|
||||
"sharing_level": "owner",
|
||||
"slug": "string",
|
||||
"subdomain": true,
|
||||
"subdomain_name": "string",
|
||||
"url": "string"
|
||||
}
|
||||
],
|
||||
@@ -483,6 +485,7 @@ curl -X GET http://coder-server:8080/api/v2/workspaces \
|
||||
"sharing_level": "owner",
|
||||
"slug": "string",
|
||||
"subdomain": true,
|
||||
"subdomain_name": "string",
|
||||
"url": "string"
|
||||
}
|
||||
],
|
||||
@@ -674,6 +677,7 @@ curl -X GET http://coder-server:8080/api/v2/workspaces/{workspace} \
|
||||
"sharing_level": "owner",
|
||||
"slug": "string",
|
||||
"subdomain": true,
|
||||
"subdomain_name": "string",
|
||||
"url": "string"
|
||||
}
|
||||
],
|
||||
@@ -944,6 +948,7 @@ curl -X PUT http://coder-server:8080/api/v2/workspaces/{workspace}/dormant \
|
||||
"sharing_level": "owner",
|
||||
"slug": "string",
|
||||
"subdomain": true,
|
||||
"subdomain_name": "string",
|
||||
"url": "string"
|
||||
}
|
||||
],
|
||||
|
||||
Reference in New Issue
Block a user