ユーザーの質問を更新する。

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": "testuser4",
    "group": "testfinanceapp4"
}'

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

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

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>testuser4</userid>
	<group>testfinanceapp4</group>
</User>
'

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

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