User APIs

Get User System Preferences

OVERVIEW

Overview

Get the System Preferences of a User from Publisher

This API call is used to retrieve the system preferences of a particular user from the system. The user identifier is the user id of the user or their email address.

Since v4.6

HTTP Request

GET  /api/2/users/<ID>/systempreferences

OR

GET  /api/2/users/<EMAIL>/systempreferences

URL Parameters
Parameter Description
ID The ID of the user 
EMAIL The email address of the user 

 

HTTP Headers
HTTP Request Header Description Example
Authorization The API Authorisation token. "Bearer XXXXXXXXXXXXX"
Accept

The format of the expected response. 

  • "application/json"
  • "application/xml"

If no parameter is set, JSON is the default response given.

"application/xml"
Content-Type

The format of the provided content.

  • "application/json"
  • "application/xml"

If no parameter is set, JSON is the expected content by default.

"application/json"

 

HTTP Response

Success

HTTP response 200 with System Preferences object

(Example below)

 

Error

See  API Error messages 

 

Example HTTP Request & Response

GET http://example.com/context/api/2/users/3/systempreferences

 

JSON Response

{

    "systempreferences": {

        "userid": 3,  

        "language": "en_GB",

        "metadatanodes": [

            {

                "node": "Countries",

                "metadata": [

                    "Algeria",

                    "Angola",

                    "Benin",

                    ....

                ]

            },

            {

                "node": "American States",

                "metadata": [

                    "Alabama",

                    "Alaska",

                    "Arizona",

                    ....

                ]

            }

        ]

    }

}

 

 

XML Response

<systempreferences>

    <userid>3</userid>

    <language>en_GB</language>

    <metadatanodes>

        <metadatanode>

            <node>Countries</node>

            <metadata>Algeria</metadata>

            <metadata>Angola</metadata>

            <metadata>Benin</metadata>

            <metadata>...</metadata>

        </metadatanode>

        <metadatanode>

            <node>American States</node>

            <metadata>Alabama</metadata>

            <metadata>Alaska</metadata>

            <metadata>Arizona</metadata>

            <metadata>...</metadata>

        </metadatanode>

    </metadatanodes>

</systempreferences>

 

Comments


0 Comments

Last Updated: Nov 08,2024