Skip to content

User Settings

jeremyosterhoudt edited this page May 10, 2017 · 5 revisions

Description: User Settings Service

This service is available on the iOS, MacOS, Android and JavaSDK for Windows platforms.

Allows storage and retrieval of device-specific setting information; essentially wraps NSUserDefaults (iOS/Mac), preference_defaults.properties (Android) and config.properties (JavaSDK).

Method: GET

URL: http://pmapi/usersettings/{settingkey}

Output: Standard HTTP status codes, 404 if settingkey is not found. Response data will be string of value returned from settingkey


Method: GET

URL: http://pmapi/usersettings

Output: Standard HTTP status codes, 404 if no settings are found. Response data will be JSON dictionary of key/value string pairs for all user settings for the App.


Method: POST or PUT

URL: http://pmapi/usersettings/{settingkey}

Input: String of value to store in key settingkey using UTF8 string encoding.

Output: HTTP status codes.

  • 200: Input body string given was successfully stored as settingkey
  • 400: Input body could not be decoded as a string using UTF8 string encoding, or no input body was found in the request.

Updates or adds string value for settingkey. POST and PUT methods are forgiving: In other words, if PUT is used and settingkey does not exist, it will be added. If POST is used and settingkey already exists it will be updated. Because of this forgiving nature, there is no difference between POST and PUT.


Method: POST or PUT

URL: http://pmapi/usersettings

Input: JSON dictionary of string key/value pairs to store

Output: Standard HTTP status codes.

Adds or updates all keys for given values in input dictionary. Again, POST and PUT methods are forgiving, there is no difference between POST and PUT.


Method: DELETE

URL: http://pmapi/usersettings/{settingkey}

Output: Standard HTTP status codes, 404 if settingkey is not found. If found the key and value for settingkey will be deleted from the settings dictionary.


Method: DELETE

URL: http://pmapi/usersettings/

Output: Standard HTTP status codes. If settings are found they will be deleted from the settings dictionary.