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

Method PatchOrganizationIDPSyncMapping

codersdk/idpsync.go:250–262  ·  view source on GitHub ↗
(ctx context.Context, req PatchOrganizationIDPSyncMappingRequest)

Source from the content-addressed store, hash-verified

248}
249
250func (c *Client) PatchOrganizationIDPSyncMapping(ctx context.Context, req PatchOrganizationIDPSyncMappingRequest) (OrganizationSyncSettings, error) {
251 res, err := c.Request(ctx, http.MethodPatch, "/api/v2/settings/idpsync/organization/mapping", req)
252 if err != nil {
253 return OrganizationSyncSettings{}, xerrors.Errorf("make request: %w", err)
254 }
255 defer res.Body.Close()
256
257 if res.StatusCode != http.StatusOK {
258 return OrganizationSyncSettings{}, ReadBodyAsError(res)
259 }
260 var resp OrganizationSyncSettings
261 return resp, json.NewDecoder(res.Body).Decode(&resp)
262}
263
264func (c *Client) GetAvailableIDPSyncFields(ctx context.Context) ([]string, error) {
265 res, err := c.Request(ctx, http.MethodGet, "/api/v2/settings/idpsync/available-fields", nil)

Callers 1

Calls 4

RequestMethod · 0.95
ReadBodyAsErrorFunction · 0.85
CloseMethod · 0.65
ErrorfMethod · 0.45

Tested by 1