@Summary Get provisioner jobs @ID get-provisioner-jobs @Security CoderSessionToken @Produce json @Tags Organizations @Param organization path string true "Organization ID" format(uuid) @Param limit query int false "Page limit" @Param ids query []string false "Filter results by job IDs" format(uuid)
(rw http.ResponseWriter, r *http.Request)
| 80 | // @Success 200 {array} codersdk.ProvisionerJob |
| 81 | // @Router /api/v2/organizations/{organization}/provisionerjobs [get] |
| 82 | func (api *API) provisionerJobs(rw http.ResponseWriter, r *http.Request) { |
| 83 | ctx := r.Context() |
| 84 | |
| 85 | jobs, ok := api.handleAuthAndFetchProvisionerJobs(rw, r, nil) |
| 86 | if !ok { |
| 87 | return |
| 88 | } |
| 89 | |
| 90 | httpapi.Write(ctx, rw, http.StatusOK, slice.List(jobs, convertProvisionerJobWithQueuePosition)) |
| 91 | } |
| 92 | |
| 93 | // handleAuthAndFetchProvisionerJobs is an internal method shared by |
| 94 | // provisionerJob and provisionerJobs. If ok is false the caller should |
nothing calls this directly
no test coverage detected