# Settings

View and manage configuration settings for your organization.

## GET /api/v1/security/settings

> Get idm settings

```json
{"openapi":"3.0.3","info":{"title":"Runai API","version":"2.21"},"tags":[{"name":"Settings","description":"View and manage configuration settings for your organization.\n"}],"servers":[{"url":"https://app.run.ai"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"Bearer authentication"}},"schemas":{"SettingsGetResponse":{"type":"object","properties":{"autoRedirectSSO":{"$ref":"#/components/schemas/AutoRedirectSsoSetting"},"excludeGroupsFromTokens":{"$ref":"#/components/schemas/ExcludeGroupsFromTokenSetting"}}},"AutoRedirectSsoSetting":{"type":"object","properties":{"enabled":{"type":"boolean","nullable":true},"idpAlias":{"type":"string","nullable":true}}},"ExcludeGroupsFromTokenSetting":{"type":"object","properties":{"enabled":{"type":"boolean","nullable":true}}},"Error":{"required":["code","message"],"properties":{"code":{"type":"integer","minimum":100,"maximum":599},"message":{"type":"string"},"details":{"type":"string"}}}},"responses":{"401Unauthorized":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403Forbidden":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500InternalServerError":{"description":"unexpected error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503ServiceUnavailable":{"description":"unexpected error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"paths":{"/api/v1/security/settings":{"get":{"summary":"Get idm settings","operationId":"get_idm_settings","tags":["Settings"],"responses":{"200":{"description":"Executed successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SettingsGetResponse"}}}},"401":{"$ref":"#/components/responses/401Unauthorized"},"403":{"$ref":"#/components/responses/403Forbidden"},"500":{"$ref":"#/components/responses/500InternalServerError"},"503":{"$ref":"#/components/responses/503ServiceUnavailable"}}}}}}
```

## GET /api/v1/security/settings/{key}

> Get idm setting by key

```json
{"openapi":"3.0.3","info":{"title":"Runai API","version":"2.21"},"tags":[{"name":"Settings","description":"View and manage configuration settings for your organization.\n"}],"servers":[{"url":"https://app.run.ai"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"Bearer authentication"}},"parameters":{"settingsKey":{"name":"key","in":"path","required":true,"description":"The settings key","schema":{"$ref":"#/components/schemas/settingsKeyEnum"}}},"schemas":{"settingsKeyEnum":{"type":"string","enum":["autoRedirectSSO","excludeGroupsFromToken"]},"Settings":{"type":"object","properties":{"key":{"type":"string"},"data":{"type":"object","nullable":true}}},"Error":{"required":["code","message"],"properties":{"code":{"type":"integer","minimum":100,"maximum":599},"message":{"type":"string"},"details":{"type":"string"}}}},"responses":{"400BadRequest":{"description":"Bad request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401Unauthorized":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403Forbidden":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404NotFound":{"description":"The specified resource was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500InternalServerError":{"description":"unexpected error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503ServiceUnavailable":{"description":"unexpected error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"paths":{"/api/v1/security/settings/{key}":{"get":{"summary":"Get idm setting by key","operationId":"get_idm_setting_by_key","tags":["Settings"],"parameters":[{"$ref":"#/components/parameters/settingsKey"}],"responses":{"200":{"description":"Executed successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Settings"}}}},"400":{"$ref":"#/components/responses/400BadRequest"},"401":{"$ref":"#/components/responses/401Unauthorized"},"403":{"$ref":"#/components/responses/403Forbidden"},"404":{"$ref":"#/components/responses/404NotFound"},"500":{"$ref":"#/components/responses/500InternalServerError"},"503":{"$ref":"#/components/responses/503ServiceUnavailable"}}}}}}
```

## PUT /api/v1/security/settings/{key}

> Update idm setting by key

```json
{"openapi":"3.0.3","info":{"title":"Runai API","version":"2.21"},"tags":[{"name":"Settings","description":"View and manage configuration settings for your organization.\n"}],"servers":[{"url":"https://app.run.ai"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"Bearer authentication"}},"parameters":{"settingsKey":{"name":"key","in":"path","required":true,"description":"The settings key","schema":{"$ref":"#/components/schemas/settingsKeyEnum"}}},"schemas":{"settingsKeyEnum":{"type":"string","enum":["autoRedirectSSO","excludeGroupsFromToken"]},"AutoRedirectSsoSetting":{"type":"object","properties":{"enabled":{"type":"boolean","nullable":true},"idpAlias":{"type":"string","nullable":true}}},"ExcludeGroupsFromTokenSetting":{"type":"object","properties":{"enabled":{"type":"boolean","nullable":true}}},"Error":{"required":["code","message"],"properties":{"code":{"type":"integer","minimum":100,"maximum":599},"message":{"type":"string"},"details":{"type":"string"}}}},"responses":{"400BadRequest":{"description":"Bad request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401Unauthorized":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403Forbidden":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404NotFound":{"description":"The specified resource was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500InternalServerError":{"description":"unexpected error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503ServiceUnavailable":{"description":"unexpected error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"paths":{"/api/v1/security/settings/{key}":{"put":{"summary":"Update idm setting by key","operationId":"update_idm_setting_by_key","tags":["Settings"],"parameters":[{"$ref":"#/components/parameters/settingsKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/AutoRedirectSsoSetting"},{"$ref":"#/components/schemas/ExcludeGroupsFromTokenSetting"}]}}}},"responses":{"200":{"description":"Setting successfully updated"},"400":{"$ref":"#/components/responses/400BadRequest"},"401":{"$ref":"#/components/responses/401Unauthorized"},"403":{"$ref":"#/components/responses/403Forbidden"},"404":{"$ref":"#/components/responses/404NotFound"},"500":{"$ref":"#/components/responses/500InternalServerError"},"503":{"$ref":"#/components/responses/503ServiceUnavailable"}}}}}}
```
