User Setting API

This article describes the endpoint for User Settings management:

  • /api/user_setting: Retrieve User Settings for all Users or for a specified User, update User Settings for a specified User.

PREREQUISITES:

TABLE OF CONTENTS:

  1. Access Admin > System > API Toolkit
  2. Retrieve User Settings for All Users or for a Specific User
  3. Update User Settings

1. Access Admin > System > API Toolkit

2. Retrieve User Settings for All Users or for a Specific User

  • GET request to /api/user_setting returns a list of all User Settings.
  • GET request to /api/user_setting/id/<ID> and /api/user_setting?user=<ID> returns settings information of a specified User.
    • NOTE: Power Users can only retrieve their own settings. Attempting to retrieve another User's settings will return 403 Forbidden.
  1. Item: user_setting.
  2. Method: GET.
  3. user: Optionally, filter results by User ID.
  4. Enter an API Token.
  5. [Run request]

Example Response

Example for /api/user_setting and/api/user_setting?user=<ID>

{
  "user_settings": [
    {
      "id": 177,
      "user_id": 177,
      "user_notifications": "Y",
      "language": "en",
      "show_tile_preview": "Y",
      "show_categories_on_homepage": "Y",
      "content_layout": "tile",
      "column_count": 1,
      "default_folder": "",
      "default_filter": "",
      "default_tag": "",
      "default_grouping": "",
      "start_page": 267
    }
  ]
}

Example for /api/user_setting/id/<ID>

{
  "user_setting": {
    "language": "en",
    "id": 118,
    "user_id": 118,
    "user_notifications": "N",
    "show_tile_preview": "N",
    "show_categories_on_homepage": "N",
    "content_layout": "list",
    "start_page": 0,
    "column_count": 6
  }
}

 

Fields Description

Parameter NameValue TypeDescription
idintegerThe ID of the User Preference record.
user_idintegerThe ID of the User these settings belong to.
user_notificationsstringWhether email notifications are enabled for the User. ("Y"/"N")
languagestringThe abbreviation of the User's language preference.
show_tile_previewstringWhether tile previews are displayed. ("Y"/"N")
show_categories_on_homepagestringWhether Categories are shown on the User's homepage. ("Y"/"N")
content_layoutstringThe layout preference for content display. ("tile" / "list")
column_countintegerThe number of columns displayed when content_layout is "list". Inherited from the system theme if not explicitly set.
default_folderintegerThe ID of the default Folder shown on the User's homepage.
default_filterstringThe default filter applied on the User's homepage.
default_tagstringThe default Tag applied on the User's homepage.
default_groupingstringThe default grouping applied on the User's homepage.
start_pageintegerThe ID of the default App (Portal Page) the User lands on after login.

3. Update User Settings

  • PUT request to /api/user_setting/<user_id> updates settings for an existing User.
  1. Item: user_setting.
  2. Method: PUT.
  3. user_id: Enter the ID of the User whose settings you want to update.
  4. Select JSON request and provide the parameters to update:
    • user_notifications: Whether email notifications are enabled for the User. ("Y"/"N").
      • If changed, email notification status is updated across all Favorites.
    • language: The abbreviation of the User's language preference.
    • show_tile_preview: Whether tile previews are displayed. ("Y"/"N")
    • show_categories_on_homepage: Whether Categories are shown on the User's homepage. ("Y"/"N")
    • content_layout: The layout preference for content display. ("tile" / "list")
    • column_count: The number of columns displayed when content_layout is "list".
  5. Enter an API Token.
  6. [Run request]