ユーザーの質問を安全に取得する。

put

/oaa-kba/runtime/kba/v1/getquestionssecurely

ユーザーに関連付けられた質問が返されます。ユーザー情報が存在する場合、ユーザーに関連付けられた質問が返されます。これらは、KBAチャレンジに使用するためにシステムによって事前に選択された質問です。

リクエスト

この操作にはリクエスト・パラメータはありません。

サポートされているメディア・タイプ
リクエスト本文 - application/xml ()
ルート・スキーマ: schema
型: object
ソースの表示
  • デフォルト値: default
    ユーザーが属するグループ
  • 外部システムのユーザーの不変ID。これが存在する場合は、userId + groupIdの組合せよりも優先されます。
  • グループ内で一意のユーザID。
リクエスト本文 - application/json ()
ルート・スキーマ: schema
型: object
ソースの表示
  • デフォルト値: default
    ユーザーが属するグループ
  • 外部システムのユーザーの不変ID。これが存在する場合は、userId + groupIdの組合せよりも優先されます。
  • グループ内で一意のユーザID。
先頭に戻る

レスポンス

サポートされているメディア・タイプ

200レスポンス

成功
本文()
ルート・スキーマ: QuestionsResponse
型: object
ソースの表示
ネストされたスキーマ: choices
型: array
ソースの表示
ネストされたスキーマ: Choice
型: object
ソースの表示
ネストされたスキーマ: questions
型: array
ソースの表示
ネストされたスキーマ: Question
型: object
ソースの表示
  • デフォルト値: true
    trueの場合、この質問はユーザーに関連付けられ、ユーザーのチャレンジに使用されます。
  • ユーザーに関連付けられた質問に対するユーザーの回答
  • ユーザーに関連付けられた質問テキスト
  • ユーザーに関連付けられた質問の一意の識別子

401レスポンス

認可されていません。ユーザー資格証明が無効であるか、指定されていません。
本文()
ルート・スキーマ: KBAAPIResponse
型: object
ソースの表示

422レスポンス

要求されたユーザーのユーザー質問の取得に失敗しました。
本文()
ルート・スキーマ: KBAAPIResponse
型: object
ソースの表示

500レスポンス

サーバー・エラー。
本文()
ルート・スキーマ: KBAAPIResponse
型: object
ソースの表示
先頭に戻る

次の例は、ユーザーの質問を安全に取得するサンプルのリクエストとレスポンスを示します。ユーザー情報が存在する場合、ユーザーに関連付けられた質問が返されます。これらの質問は、KBAチャレンジに使用するためにシステムによって事前に選択されます。

JSON形式で質問のリストを安全に取得するcURLコマンド

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"
}'

JSON形式のサンプル・レスポンス

{
    "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
                }
            ]
        }
    ]
}

XML形式で質問のリストを安全に取得するcURLコマンド

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>
'

XML形式のサンプル・レスポンス

<?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>
先頭に戻る