Preferences Operations Get By Key

Preferences Operations Get By Key
Get a specific user preference by key

Returns the stored value of a specific preference key. Accessible to every authenticated role. The path /api/v1/users/preferences/{key} is an alias of /api/v1/user/preferences/{key} for every method. The value is returned as parsed JSON of any type, or as the raw string when it was stored but is not JSON.

Request
URI
GET
https://{api_host}/api/v1/user/preferences/{key}
COPY
Path Parameters
string
key
Required  

Preference key. Free-form: any non-blank name of 1 to 256 characters; the server keeps no allow-list. The console itself uses names such as tabs., panels. and dashboard.layout.v1

key example
tabs.endpoints

Authentication
This operation uses the following authentication methods.
Responses
200

200 OK successful response envelope. The stored value of the key, which can be any JSON value

{
    "order": [
        "name",
        "status"
    ],
    "visibility": {
        "name": true,
        "status": true
    }
}

401

401 Unauthorized: UNAUTHENTICATED when the VTP_SESSION cookie is missing, unknown, expired or revoked

Returns Unauthenticated of type(s) application/json
{
    "errorCode": "string",
    "message": "string",
    "path": "string",
    "timestamp": "string",
    "reason": "string"
}
errorCode
Required  

Stable machine-readable error code. The known values are listed in ApiErrorCode; the set is not closed, so a client must tolerate an unlisted value.

string
message
Required  

Human-readable error description

string
path
Required  

Request URI path that produced the error

string As date-time As date-time
timestamp
Required  

Timestamp when the error occurred as an ISO 8601 date-time with offset

string
reason
Optional

A finer code, present only where an endpoint documents it. The Rule Pack endpoints' PACK_ENTRY_INVALID carries the import core's code here.


404

404 Not Found: PREFERENCE_NOT_FOUND when the signed-in user has no stored value for the key

Returns ApiErrorResponse of type(s) application/json
{
    "errorCode": "string",
    "message": "string",
    "path": "string",
    "timestamp": "string",
    "reason": "string"
}
errorCode
Required  

Stable machine-readable error code. The known values are listed in ApiErrorCode; the set is not closed, so a client must tolerate an unlisted value.

string
message
Required  

Human-readable error description

string
path
Required  

Request URI path that produced the error

string As date-time As date-time
timestamp
Required  

Timestamp when the error occurred as an ISO 8601 date-time with offset

string
reason
Optional

A finer code, present only where an endpoint documents it. The Rule Pack endpoints' PACK_ENTRY_INVALID carries the import core's code here.


Code Samples
COPY
                    curl -H 'Authorization: <value>' https://{api_host}/api/v1/user/preferences/{key}