Update User Preference

Update User Preference

This API is used for updating the existing user-preference configuration. Update API expects all parameters retrived via get API. Fields "id", "is_predefined" and "created_by" are read-only and can't be updated. Any missing non mandatory field in udpate request, will be set to default values.

Request
URI
PUT
https://{api_host}/tcsa/api/configuration-management/v1/user-preferences/{id}
COPY
Path Parameters
string
id
Required

Unique id, to indentify the user-preference


Request Body
UserPreferenceUpdateRequest of type(s) application/json
Required

Show optional properties

{
    "name": "Default notification console",
    "type": "NOTIFICATION_CONSOLE",
    "sequence_number": 349,
    "primary_term": 1
}
{
    "id": "1jldkjdfjrr",
    "name": "Default notification console",
    "type": "NOTIFICATION_CONSOLE",
    "assign_to": [
        "Operator"
    ],
    "is_default": true,
    "parent_id": "string",
    "data": {},
    "sequence_number": 349,
    "primary_term": 1,
    "create_timestamp": 1660635421552
}
string
id
Optional

unique id for the user preference.

string
name
Required

Display name for the user preference.

string
type
Required

The type user-preference. There are 4 types supported.

  1. "NOTIFICATION_CONSOLE"
  2. "NOTIFICATION_SUMMARY_CONSOLE"
  3. "TOPOLOGY_CONSOLE"
  4. "COLORS_PREF"
array of string
assign_to
Optional

The console is assigned to which ROLE. For logged in user , this field value will be populated automatically, but if Admin user wants to assign, the console to any ROLE then it needs to be sent in the request payload. Non admin user won't be able to assign any ROLE.

boolean
is_default
Optional

This defines wheather the "user-preference" is default.

string
parent_id
Optional

Parent id of the console. In case of the root, value would be null.

object
data
Optional

This will contain all UI specific user-preference details. This is free object and can contain any thing UI wants to store.

integer
sequence_number
Required

The seq_no and primary_term together, helps to achieve optimized concurrency control. This two field value, must be sent along with update request, if user want to avoid accidental concurrent changes.

integer
primary_term
Required

The seq_no and primary_term together, helps to achieve optimized concurrency control. This two field value, must be sent along with update request, if user want to avoid accidental concurrent changes.

number
create_timestamp
Optional

Timestamp in epoch milliseconds, notifies the value when user preference is created

Authentication
This operation uses the following authentication methods.
Responses
200

Created

Returns UserPreference of type(s) application/json
"UserPreference Object"
string
id
Optional

The id, uniquely identified the user-preference.

integer
sequence_number
Optional

The seq_no and primary_term together, helps to achieve optimized concurrency control. This two field value, must be sent along with update request, if user want to avoid accidental concurrent changes.

integer
primary_term
Optional

The seq_no and primary_term together, helps to achieve optimized concurrency control. This two field value, must be sent along with update request, if user want to avoid accidental concurrent changes.

string
type
Required

The type user-preference. The below types are supported.

  1. "NOTIFICATION_CONSOLE"
  2. "NOTIFICATION_SUMMARY_CONSOLE"
  3. "TOPOLOGY_CONSOLE"
  4. "COLORS_PREF"
  5. "LOG_VIEWS"
  6. "BAR_CHARTS"
array of string
assign_to
Optional

The console is assigned to which ROLE. For logged in user , this field value will be populated automatically, but if Admin user wants to assign the console to any ROLE then it needs to be sent in the request payload. Non admin user won't be able assign any ROLE.

string
name
Required

Display name for the console.

string
description
Optional

This is notification console preference, created for admin.

boolean
is_predefined
Optional

system created user preferences.

boolean
is_default
Optional

used to show default user prefereces for user

string
parent_id
Optional

Parent id of the console. In case of the root, value would be null.

object
data
Optional

This will contain all UI specific user-preference details. This is free object and can contain any thing UI wants to store.

string
created_by
Optional

The user responsible for creation of object.

sub_preferences
Optional

This object represent children of user-preference.

number
create_timestamp
Optional

Timestamp in epoch milliseconds, notifies the value when user preference is created

number
update_timestamp
Optional

Timestamp in epoch milliseconds, notifies the value when user preference is updated

Response Headers

string
Location

Provide information about the location of a cloned resource.


401

Unauthorized

Operation doesn't return any data structure

404

Resource not found

Operation doesn't return any data structure

409

Conflicting

Operation doesn't return any data structure

500

Internal server error

Operation doesn't return any data structure

Code Samples
COPY
                    curl -X PUT -H 'Authorization: <value>' -H 'Content-Type: application/json' -d '{"type:"string","name:"string","sequence_number:"integer","primary_term:"integer"}' https://{api_host}/tcsa/api/configuration-management/v1/user-preferences/{id}