MCPcopy Index your code
hub / github.com/coder/coder / groupsByOrganization

Method groupsByOrganization

enterprise/coderd/groups.go:540–548  ·  view source on GitHub ↗

@Summary Get groups by organization @ID get-groups-by-organization @Security CoderSessionToken @Produce json @Tags Enterprise @Param organization path string true "Organization ID" format(uuid) @Success 200 {array} codersdk.Group @Router /api/v2/organizations/{organization}/groups [get]

(rw http.ResponseWriter, r *http.Request)

Source from the content-addressed store, hash-verified

538// @Success 200 {array} codersdk.Group
539// @Router /api/v2/organizations/{organization}/groups [get]
540func (api *API) groupsByOrganization(rw http.ResponseWriter, r *http.Request) {
541 org := httpmw.OrganizationParam(r)
542
543 values := r.URL.Query()
544 values.Set("organization", org.ID.String())
545 r.URL.RawQuery = values.Encode()
546
547 api.groups(rw, r)
548}
549
550// @Summary Get groups
551// @ID get-groups

Callers

nothing calls this directly

Calls 5

groupsMethod · 0.95
OrganizationParamFunction · 0.92
EncodeMethod · 0.80
SetMethod · 0.65
StringMethod · 0.45

Tested by

no test coverage detected