非推奨 - ユーザーの質問を取得する。
get
/oaa-kba/runtime/kba/v1/questions
12.2.1.4.1-20230630以降、このメソッドは非推奨です。かわりに、「ユーザーの質問を安全に取得する」を参照してください。ユーザーに関連付けられた質問が返されます。ユーザー情報が存在する場合、ユーザーに関連付けられた質問が返されます。これらは、KBAチャレンジに使用するためにシステムによって事前に選択された質問です。
リクエスト
問合せパラメータ
- group: string
質問がフェッチされるユーザーのグループ。
- userid: string
質問がフェッチされるユーザーのユーザーID。
この操作にはリクエスト本文はありません。
先頭に戻るレスポンス
サポートされているメディア・タイプ
- application/xml
- application/json
200レスポンス
成功
ルート・スキーマ: QuestionsResponse
型:
ソースの表示
object-
choices: array choices
-
message: string
リクエストのステータスに関連するメッセージ
-
status: string
リクエストのステータス
ネストされたスキーマ: Question
型:
ソースの表示
object-
active: boolean
デフォルト値:
truetrueの場合、この質問はユーザーに関連付けられ、ユーザーのチャレンジに使用されます。 -
answer: string
ユーザーに関連付けられた質問に対するユーザーの回答
-
question: string
ユーザーに関連付けられた質問テキスト
-
questionId: integer (int64)
ユーザーに関連付けられた質問の一意の識別子
401レスポンス
認可されていません。ユーザー資格証明が無効であるか、指定されていません。
422レスポンス
要求されたユーザーのユーザー質問の取得に失敗しました。
500レスポンス
サーバー・エラー。
例
次の例は、ユーザーに関連付けられた質問を取得するサンプルのリクエストとレスポンスを示します。ユーザー情報が存在する場合、ユーザーに関連付けられた質問が返されます。これらの質問は、KBAチャレンジに使用するためにシステムによって事前に選択されます。
JSON形式で質問のリストを取得するcURLコマンド
curl --location --request GET '<OAAService>/oaa-kba/runtime/kba/v1/questions?userid=user1&group=Default' \ --header 'Content-Type: application/json' \ --header 'Authorization: Basic <Base64Encoded(<username>:<password>)>' \ --data ''
JSON形式のサンプル・レスポンス
{
"status": "0",
"message": "Successfully processed the request.",
"choices": [
{
"questions": [
{
"questionId": 2,
"question": "What was your father's profession when you were born?",
"active": false
},
{
"questionId": 41,
"question": "What was the last name of your favorite teacher in High School?",
"active": false
},
{
"questionId": 5,
"question": "What is the first name of your mother's eldest sibling?",
"active": false
},
{
"questionId": 33,
"question": "How much did you pay for your first car?",
"active": false
},
{
"questionId": 17,
"question": "What was the first name of your first boss?",
"active": false
}
]
},
{
"questions": [
{
"questionId": 87,
"question": "What was the name of your favorite childhood musical group?",
"active": false
},
{
"questionId": 50,
"question": "What was your youngest child's birth weight?",
"active": false
},
{
"questionId": 126,
"question": "What year was your favorite Super Bowl?",
"active": false
},
{
"questionId": 23,
"question": "What was your first sweetheart's first name?",
"active": false
},
{
"questionId": 54,
"question": "What breed was your first dog?",
"active": false
}
]
},
{
"questions": [
{
"questionId": 60,
"question": "What is your best friend's birthday?",
"active": false
},
{
"questionId": 3,
"question": "What was your birth weight?",
"active": false
},
{
"questionId": 42,
"question": "What was the last name of your favorite professor in college?",
"active": false
},
{
"questionId": 6,
"question": "What is your maternal grandfather's first name?",
"active": false
},
{
"questionId": 34,
"question": "What year did you purchase your first car?",
"active": false
}
]
}
]
}
}XML形式で質問のリストを取得するcURLコマンド
curl --location --request GET '<OAAService>/oaa-kba/runtime/kba/v1/questions?userid=user1&group=financeapp' \ --header 'Content-Type: application/xml' \ --header 'Accept: application/xml' \ --header 'Authorization: Basic <Base64Encoded(<username>:<password>)>' \
XML形式のサンプル・レスポンス
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<QuestionsResponse>
<status>0</status>
<message>Successfully processed the request.</message>
<choices>
<questions>
<questionId>38</questionId>
<question>What was the name of your first roommate in college?</question>
<active>false</active>
</questions>
<questions>
<questionId>51</questionId>
<question>What is your youngest child's nickname?</question>
<active>false</active>
</questions>
<questions>
<questionId>52</questionId>
<question>What is your eldest child's nickname?</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>106</questionId>
<question>What was your favorite dessert as a child?</question>
<active>false</active>
</questions>
</choices>
<choices>
<questions>
<questionId>12</questionId>
<question>What was the name of the hospital your eldest child was born in?</question>
<active>false</active>
</questions>
<questions>
<questionId>39</questionId>
<question>What was the first name of your high school best friend?</question>
<active>false</active>
</questions>
<questions>
<questionId>49</questionId>
<question>What was your oldest child's birth weight?</question>
<active>false</active>
</questions>
<questions>
<questionId>50</questionId>
<question>What was your youngest child's birth weight?</question>
<active>false</active>
</questions>
<questions>
<questionId>107</questionId>
<question>What is your all time favorite video game?</question>
<active>false</active>
</questions>
</choices>
<choices>
<questions>
<questionId>40</questionId>
<question>What was the last name of your high school best friend?</question>
<active>false</active>
</questions>
<questions>
<questionId>59</questionId>
<question>What was your first dog's name?</question>
<active>false</active>
</questions>
<questions>
<questionId>108</questionId>
<question>What was your favorite food as a child?</question>
<active>false</active>
</questions>
<questions>
<questionId>109</questionId>
<question>What is your favorite style of music?</question>
<active>false</active>
</questions>
<questions>
<questionId>110</questionId>
<question>What is your favorite play?</question>
<active>false</active>
</questions>
</choices>
</QuestionsResponse>