Get questions of the user securely.

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
Request Body - application/xml ()
Root Schema : schema
Type: object
Show Source
Request Body - application/json ()
Root Schema : schema
Type: object
Show Source
Back to Top

Response

Supported Media Types

200 Response

Success
Body ()
Root Schema : QuestionsResponse
Type: object
Show Source
Nested Schema : choices
Type: array
Show Source
Nested Schema : Choice
Type: object
Show Source
Nested Schema : questions
Type: array
Show Source
Nested Schema : Question
Type: object
Show Source

401 Response

Unauthorized. User credentials invalid or not provided.
Body ()
Root Schema : KBAAPIResponse
Type: object
Show Source

422 Response

failed to get user questions for requested user.
Body ()
Root Schema : KBAAPIResponse
Type: object
Show Source

500 Response

Server error.
Body ()
Root Schema : KBAAPIResponse
Type: object
Show Source
Back to Top

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": "user1",
        "group": "financeapp",
        "uniqueUserId": "user1"
}'

Sample Response in JSON Format

{
    "status": "0",
    "message": "Successfully processed the request.",
    "choices": [
        {
            "questions": [
                {
                    "questionId": 3,
                    "question": "What was your birth weight?",
                    "active": true
                },
                {
                    "questionId": 2,
                    "question": "What was your father's profession when you were born?",
                    "active": false
                },
                {
                    "questionId": 4,
                    "question": "What was the first street you lived on?",
                    "active": false
                },
                {
                    "questionId": 20,
                    "question": "What industry was your first job in?",
                    "active": false
                },
                {
                    "questionId": 61,
                    "question": "Other than where you live, what's your favorite city?",
                    "active": false
                }
            ]
        },
        {
            "questions": [
                {
                    "questionId": 13,
                    "question": "What is the most unusual job you have had?",
                    "active": true
                },
                {
                    "questionId": 14,
                    "question": "What year do you plan on retiring?",
                    "active": false
                },
                {
                    "questionId": 15,
                    "question": "What was your first yearly salary?",
                    "active": false
                },
                {
                    "questionId": 59,
                    "question": "What was your first dog's name?",
                    "active": false
                },
                {
                    "questionId": 62,
                    "question": "What is the name of the first musical group you saw in concert?",
                    "active": false
                }
            ]
        },
        {
            "questions": [
                {
                    "questionId": 16,
                    "question": "What year did you get your first job?",
                    "active": true
                },
                {
                    "questionId": 17,
                    "question": "What was the first name of your first boss?",
                    "active": false
                },
                {
                    "questionId": 18,
                    "question": "What is the name of the first company you worked for?",
                    "active": false
                },
                {
                    "questionId": 26,
                    "question": "What color was your first cat?",
                    "active": false
                },
                {
                    "questionId": 63,
                    "question": "What year did you go to your first music concert?",
                    "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>user1</userid>
	<group>financeapp</group>
	<uniqueUserId>user1</uniqueUserId>
</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>3</questionId>
            <question>What was your birth weight?</question>
            <active>true</active>
        </questions>
        <questions>
            <questionId>2</questionId>
            <question>What was your father's profession when you were born?</question>
            <active>false</active>
        </questions>
        <questions>
            <questionId>4</questionId>
            <question>What was the first street you lived on?</question>
            <active>false</active>
        </questions>
        <questions>
            <questionId>20</questionId>
            <question>What industry was your first job in?</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>
    </choices>
    <choices>
        <questions>
            <questionId>13</questionId>
            <question>What is the most unusual job you have had?</question>
            <active>true</active>
        </questions>
        <questions>
            <questionId>14</questionId>
            <question>What year do you plan on retiring?</question>
            <active>false</active>
        </questions>
        <questions>
            <questionId>15</questionId>
            <question>What was your first yearly salary?</question>
            <active>false</active>
        </questions>
        <questions>
            <questionId>59</questionId>
            <question>What was your first dog's name?</question>
            <active>false</active>
        </questions>
        <questions>
            <questionId>62</questionId>
            <question>What is the name of the first musical group you saw in concert?</question>
            <active>false</active>
        </questions>
    </choices>
    <choices>
        <questions>
            <questionId>16</questionId>
            <question>What year did you get your first job?</question>
            <active>true</active>
        </questions>
        <questions>
            <questionId>17</questionId>
            <question>What was the first name of your first boss?</question>
            <active>false</active>
        </questions>
        <questions>
            <questionId>18</questionId>
            <question>What is the name of the first company you worked for?</question>
            <active>false</active>
        </questions>
        <questions>
            <questionId>26</questionId>
            <question>What color was your first cat?</question>
            <active>false</active>
        </questions>
        <questions>
            <questionId>63</questionId>
            <question>What year did you go to your first music concert?</question>
            <active>false</active>
        </questions>
    </choices>
</QuestionsResponse>
Back to Top