@@ -13,6 +13,14 @@ import (
13
13
"github.com/coder/coder/v2/codersdk"
14
14
)
15
15
16
+ // @Summary Create provisioner key
17
+ // @ID create-provisioner-key
18
+ // @Security CoderSessionToken
19
+ // @Produce json
20
+ // @Tags Enterprise
21
+ // @Param organization path string true "Organization ID"
22
+ // @Success 201 {object} codersdk.CreateProvisionerKeyResponse
23
+ // @Router /organizations/{organization}/provisionerkey [post]
16
24
func (api * API ) postProvisionerKey (rw http.ResponseWriter , r * http.Request ) {
17
25
ctx := r .Context ()
18
26
organization := httpmw .OrganizationParam (r )
@@ -71,6 +79,14 @@ func (api *API) postProvisionerKey(rw http.ResponseWriter, r *http.Request) {
71
79
})
72
80
}
73
81
82
+ // @Summary List provisioner key
83
+ // @ID list-provisioner-key
84
+ // @Security CoderSessionToken
85
+ // @Produce json
86
+ // @Tags Enterprise
87
+ // @Param organization path string true "Organization ID"
88
+ // @Success 200 {object} []codersdk.ProvisionerKey
89
+ // @Router /organizations/{organization}/provisionerkey [get]
74
90
func (api * API ) provisionerKeys (rw http.ResponseWriter , r * http.Request ) {
75
91
ctx := r .Context ()
76
92
organization := httpmw .OrganizationParam (r )
@@ -84,6 +100,15 @@ func (api *API) provisionerKeys(rw http.ResponseWriter, r *http.Request) {
84
100
httpapi .Write (ctx , rw , http .StatusOK , convertProvisionerKeys (pks ))
85
101
}
86
102
103
+ // @Summary Delete provisioner key
104
+ // @ID delete-provisioner-key
105
+ // @Security CoderSessionToken
106
+ // @Produce json
107
+ // @Tags Enterprise
108
+ // @Param organization path string true "Organization ID"
109
+ // @Param provisionerkey path string true "Provisioner key name"
110
+ // @Success 204
111
+ // @Router /organizations/{organization}/provisionerkey/{provisionerkey} [delete]
87
112
func (api * API ) deleteProvisionerKey (rw http.ResponseWriter , r * http.Request ) {
88
113
ctx := r .Context ()
89
114
organization := httpmw .OrganizationParam (r )
0 commit comments