Update system settings
const url = 'https://example.com/api/admin/settings';const options = { method: 'PUT', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"preferences":{"view":{"defaultView":"grid"}}}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request PUT \ --url https://example.com/api/admin/settings \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "preferences": { "view": { "defaultView": "grid" } } }'Updates system-wide settings. Requires the admin.settings.update permission.
Authorizations
Section titled “Authorizations”Request Body
Section titled “Request Body”object
object
object
Default view mode
Example
gridSaved table column selections
Recently visited repositories
object
Repository namespace
Example
my-repoDisplay name
Timestamp of last visit
Recently visited sites
object
Site ID
Site name
Timestamp of last visit
Number of grid columns visible when detail pane is open
Example
2UI theme mode
Example
darkUI version preference
Example
content2Responses
Section titled “Responses”Settings updated successfully
object
object
object
Default view mode
Saved table column selections
Recently visited repositories
object
Repository namespace
Display name
Timestamp of last visit
Recently visited sites
object
Site ID
Site name
Timestamp of last visit
Number of grid columns visible when detail pane is open
UI theme mode
UI version preference
Example
{ "preferences": { "view": { "defaultView": "grid" } }}Invalid preferences
object
Indicates an error occurred
Error message describing what went wrong
Example
{ "error": true, "message": "Item not found"}Access denied
object
Indicates an error occurred
Error message describing what went wrong
Example
{ "error": true, "message": "Item not found"}