Update questions of the user.
put
/oaa-kba/runtime/kba/v1/getquestionssecurely
Questions that are associated with the user are returned. If user information
is present, questions associated with the user is returned. These are questions
preselected by the system to be used for KBA challenge.
Request
There are no request parameters for this operation.
Supported Media Types
- application/xml
- application/json
Root Schema : schema
Type:
Show Source
object
-
group: string
Default Value:
default
group to which user belongs -
uniqueUserId: string
Immutable ID of the user in the external systems. If this is present, then it takes precedence over userId + groupId combination.
-
userid: string
userid unique in group.
Root Schema : schema
Type:
Show Source
object
-
group: string
Default Value:
default
group to which user belongs -
uniqueUserId: string
Immutable ID of the user in the external systems. If this is present, then it takes precedence over userId + groupId combination.
-
userid: string
userid unique in group.
Response
Supported Media Types
- application/xml
- application/json
200 Response
Success
Root Schema : QuestionsResponse
Type:
Show Source
object
-
choices: array
choices
-
message: string
Message related to the status of the request
-
status: string
Status of the request
Nested Schema : Question
Type:
Show Source
object
-
active: boolean
Default Value:
true
If true, this question is associated with user and will be used to challenge the user. -
answer: string
User's answer to question associated with user
-
question: string
question text associated with user
-
questionId: integer
(int64)
unique identifier of question associated with user
401 Response
Unauthorized. User credentials invalid or not provided.
422 Response
failed to get user questions for requested user.
500 Response
Server error.
Examples
The following example shows a sample request and response for retrieving questions securely for a user. The questions associated with the user are returned if the user information is present. The system has preselected these questions to be used for the KBA challenge.
cURL Command to Retrieve a List of Questions Securely in JSON Format
curl --location --request PUT '<OAAService>/oaa-kba/runtime/kba/v1/getquestionssecurely' \ --header 'Content-Type: application/json' \ --header 'Authorization: Basic <Base64Encoded(<username>:<password>)>' \ --data '{ "userid": "testuser4", "group": "testfinanceapp4" }'
Sample Response in JSON Format
{ "status": "0", "message": "Successfully processed the request.", "choices": [ { "questions": [ { "questionId": 52, "question": "What is your eldest child's nickname?", "active": true }, { "questionId": 21, "question": "What is the first name of your significant other's eldest sibling?", "active": false }, { "questionId": 6, "question": "What is your maternal grandfather's first name?", "active": false }, { "questionId": 44, "question": "What was your favorite elective subject in high school?", "active": false }, { "questionId": 90, "question": "What is your favorite childhood song?", "active": false } ] }, { "questions": [ { "questionId": 89, "question": "What was your favorite restaurant in high school?", "active": true }, { "questionId": 34, "question": "What year did you purchase your first car?", "active": false }, { "questionId": 61, "question": "Other than where you live, what's your favorite city?", "active": false }, { "questionId": 124, "question": "What was the year of your favorite soccer World Cup?", "active": false }, { "questionId": 57, "question": "What color was your first pet?", "active": false } ] }, { "questions": [ { "questionId": 56, "question": "Where did you get your first pet?", "active": true }, { "questionId": 4, "question": "What was the first street you lived on?", "active": false }, { "questionId": 13, "question": "What is the most unusual job you have had?", "active": false }, { "questionId": 53, "question": "What was the name of the hospital your youngest child was born in?", "active": false }, { "questionId": 22, "question": "What is your significant other's favorite color?", "active": false } ] } ] }
cURL Command to Retrieve a List of Questions Securely in XML Format
curl --location --request PUT '<OAAService>/oaa-kba/runtime/kba/v1/getquestionssecurely' \ --header 'Content-Type: application/xml' \ --header 'Accept: application/xml' \ --header 'Authorization: Basic <Base64Encoded(<username>:<password>)>' \ --data ' <?xml version="1.0" encoding="UTF-8" ?> <User> <userid>testuser4</userid> <group>testfinanceapp4</group> </User> '
Sample Response in XML Format
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <QuestionsResponse> <status>0</status> <message>Successfully processed the request.</message> <choices> <questions> <questionId>52</questionId> <question>What is your eldest child's nickname?</question> <active>true</active> </questions> <questions> <questionId>21</questionId> <question>What is the first name of your significant other's eldest sibling?</question> <active>false</active> </questions> <questions> <questionId>6</questionId> <question>What is your maternal grandfather's first name?</question> <active>false</active> </questions> <questions> <questionId>44</questionId> <question>What was your favorite elective subject in high school?</question> <active>false</active> </questions> <questions> <questionId>90</questionId> <question>What is your favorite childhood song?</question> <active>false</active> </questions> </choices> <choices> <questions> <questionId>89</questionId> <question>What was your favorite restaurant in high school?</question> <active>true</active> </questions> <questions> <questionId>34</questionId> <question>What year did you purchase your first car?</question> <active>false</active> </questions> <questions> <questionId>61</questionId> <question>Other than where you live, what's your favorite city?</question> <active>false</active> </questions> <questions> <questionId>124</questionId> <question>What was the year of your favorite soccer World Cup?</question> <active>false</active> </questions> <questions> <questionId>57</questionId> <question>What color was your first pet?</question> <active>false</active> </questions> </choices> <choices> <questions> <questionId>56</questionId> <question>Where did you get your first pet?</question> <active>true</active> </questions> <questions> <questionId>4</questionId> <question>What was the first street you lived on?</question> <active>false</active> </questions> <questions> <questionId>13</questionId> <question>What is the most unusual job you have had?</question> <active>false</active> </questions> <questions> <questionId>53</questionId> <question>What was the name of the hospital your youngest child was born in?</question> <active>false</active> </questions> <questions> <questionId>22</questionId> <question>What is your significant other's favorite color?</question> <active>false</active> </questions> </choices> </QuestionsResponse>