Manage Preferences v2

post

/jderest/v2/preference

Enables management of preference records in the User Overrides Table (F98950).

Request

Supported Media Types
Header Parameters
Body ()
The input to the preference service, which stores records in the F98950.
Root Schema : PreferenceRequest
Type: object
The input to the preference service, which stores records in the F98950.
Show Source
Back to Top

Response

Supported Media Types

200 Response

Successful Execution

400 Response

Bad Request - Invalid JSON Input

403 Response

Authorization Failure

415 Response

Invalid Content-Type Header - Must use application/json

444 Response

Invalid Token
Body ()
Root Schema : ServiceErrorResponse
Type: object
Error Response
Show Source

500 Response

Server Failed to Process Request
Body ()
Root Schema : ServiceErrorResponse
Type: object
Error Response
Show Source
Back to Top

Examples

Example Request PUT Action

The following shows an example of a preference request to save preferences. The data is passed and stored as a JSON string in this example. Any string value is acceptable. The token passed in this example was recieved from a separate token request. The key fields are objectName, formName, version, sequence, idList, and language. In this example only the objectName part of the key is used.


curl -i -X POST -H "Content-Type:application/json" http://ais_server_url/jderest/preference/ -d
{
    "token": "044Q1K8vjSvpc9VPrS1m6GyNIx375L0FCdftSDOQ356lEc=MDE5MDEyNjAyNzYyNTEzMjk4OTEwMzUyNTEwLjE1OS45OS43MzE0NzkxNTA2NTY1NzU=",
    "action": "GETPUT",
    "objectName": "M55100",
    "preferenceData": "{\"pref2\":15.45,\"pref1\":\"Preference 1 String\",\"pref3\":8,\"pref4\":1443645908933}"
}

        

Example PUT Response

The following example shows the contents of the response body.

{
   "objectName": "M55100",
   "type": "PS",
   "preferenceData": "{\"pref2\":15.45,\"pref1\":\"Preference 1 String\",\"pref3\":8,\"pref4\":1443645908933}"
}       

Example Request GET Action

The following shows an example of a preference request to get stored preferences.


curl -i -X POST -H "Content-Type:application/json" http://ais_server_url/jderest/preference/ -d
{
    "token": "044Q1K8vjSvpc9VPrS1m6GyNIx375L0FCdftSDOQ356lEc=MDE5MDEyNjAyNzYyNTEzMjk4OTEwMzUyNTEwLjE1OS45OS43MzE0NzkxNTA2NTY1NzU=",
    "action": "GET",
    "objectName": "M55100"
}

        

Example GET Response

The following example shows the contents of the response body.

{
   "objectName": "M55100",
   "type": "PS",
   "preferenceData": "{\"pref2\":15.45,\"pref1\":\"Preference 1 String\",\"pref3\":8,\"pref4\":1443645908933}"
}       
Back to Top