Skip to content

Commit 944c42d

Browse files
docs: add docs for the available query filter for workspaces and users (#7875)
* Add docs for user filtering * Add filter for workspace * Apply suggestions from code review Co-authored-by: Muhammad Atif Ali <atif@coder.com> --------- Co-authored-by: Muhammad Atif Ali <atif@coder.com>
1 parent 3121ccc commit 944c42d

File tree

2 files changed

+25
-0
lines changed

2 files changed

+25
-0
lines changed

docs/admin/users.md

+12
Original file line numberDiff line numberDiff line change
@@ -129,3 +129,15 @@ kubectl exec -it deployment/coder /bin/bash -n coder
129129

130130
coder reset-password <username>
131131
```
132+
133+
## User filtering
134+
135+
In the Coder UI, you can filter your users using pre-defined filters or by utilizing the Coder's filter query. The examples provided below demonstrate how to use the Coder's filter query:
136+
137+
- To find active users, use the filter `status:active`.
138+
- To find admin users, use the filter `role:admin`.
139+
140+
The following filters are supported:
141+
142+
- `status` - Indicates the status of the user. It can be either `active` or `suspended`.
143+
- `role` - Represents the role of the user. You can refer to the [TemplateRole documentation](https://pkg.go.dev/github.com/coder/coder/codersdk#TemplateRole) for a list of supported user roles.

docs/workspaces.md

+13
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,19 @@ Coder stores macOS and Linux logs at the following locations:
9090

9191
> Note: Logs are truncated once they reach 5MB in size.
9292
93+
## Workspace filtering
94+
95+
In the Coder UI, you can filter your workspaces using pre-defined filters or employing the Coder's filter query. Take a look at the following examples to understand how to use the Coder's filter query:
96+
97+
- To find the workspaces that you own, use the filter `owner:me`.
98+
- To find workspaces that are currently running, use the filter `status:running`.
99+
100+
The following filters are supported:
101+
102+
- `owner` - Represents the `username` of the owner. You can also use `me` as a convenient alias for the logged-in user.
103+
- `template` - Specifies the name of the template.
104+
- `status` - Indicates the status of the workspace. For a list of supported statuses, please refer to the [WorkspaceStatus documentation](https://pkg.go.dev/github.com/coder/coder/codersdk#WorkspaceStatus).
105+
93106
---
94107

95108
## Up next

0 commit comments

Comments
 (0)