Thanks to visit codestin.com
Credit goes to github.com

Skip to content

feat: Add workspace agent lifecycle state reporting #5785

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 24 commits into from
Jan 24, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Hide report lifecycle endpoint from apidocs
  • Loading branch information
mafredri committed Jan 24, 2023
commit 2ccdcacc8ffca45d99b88e7182081fc1d3cad6ee
3 changes: 3 additions & 0 deletions coderd/apidoc/docs.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions coderd/apidoc/swagger.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions coderd/workspaceagents.go
Original file line number Diff line number Diff line change
Expand Up @@ -912,6 +912,7 @@ func (api *API) workspaceAgentReportStats(rw http.ResponseWriter, r *http.Reques
// @Param request body codersdk.PostWorkspaceAgentLifecycleRequest true "Workspace agent lifecycle request"
// @Success 204 "Success"
// @Router /workspaceagents/me/report-lifecycle [post]
// @x-apidocgen {"skip": true}
func (api *API) workspaceAgentReportLifecycle(rw http.ResponseWriter, r *http.Request) {
ctx := r.Context()

Expand Down
35 changes: 0 additions & 35 deletions docs/api/agents.md
Original file line number Diff line number Diff line change
Expand Up @@ -383,41 +383,6 @@ curl -X GET http://coder-server:8080/api/v2/workspaceagents/me/metadata \

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

## Submit workspace agent lifecycle state

### Code samples

```shell
# Example request using curl
curl -X POST http://coder-server:8080/api/v2/workspaceagents/me/report-lifecycle \
-H 'Content-Type: application/json' \
-H 'Coder-Session-Token: API_KEY'
```

`POST /workspaceagents/me/report-lifecycle`

> Body parameter

```json
{
"state": "created"
}
```

### Parameters

| Name | In | Type | Required | Description |
| ------ | ---- | ---------------------------------------------------------------------------------------------------- | -------- | --------------------------------- |
| `body` | body | [codersdk.PostWorkspaceAgentLifecycleRequest](schemas.md#codersdkpostworkspaceagentlifecyclerequest) | true | Workspace agent lifecycle request |

### Responses

| Status | Meaning | Description | Schema |
| ------ | --------------------------------------------------------------- | ----------- | ------ |
| 204 | [No Content](https://tools.ietf.org/html/rfc7231#section-6.3.5) | Success | |

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

## Submit workspace agent stats

### Code samples
Expand Down