ユーザーの質問を取得する。
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
デフォルト値:
true
trueの場合、この質問はユーザーに関連付けられ、ユーザーのチャレンジに使用されます。 -
answer: string
ユーザーに関連付けられた質問に対するユーザーの回答
-
question: string
ユーザーに関連付けられた質問テキスト
-
questionId: integer (int64)
ユーザーに関連付けられた質問の一意の識別子
401レスポンス
認可されていません。ユーザー資格証明が無効であるか、指定されていません。
422レスポンス
要求されたユーザーのユーザー質問の取得に失敗しました。
500レスポンス
サーバー・エラー。
例
次の例は、ユーザーに関連付けられた質問を取得するサンプルのリクエストとレスポンスを示します。ユーザー情報が存在する場合、ユーザーに関連付けられた質問が返されます。これらの質問は、KBAチャレンジに使用するためにシステムによって事前に選択されます。
質問のリストを取得する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 ''
サンプル・レスポンス
{ "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 } ] } ] } }