REST services for knowledge questions
You can use REST services to manage knowledge questions.
Users can perform self care management operations to retrieve, create, update, and delete knowledge questions. You can use REST services to support these operations.
The knowledge question attributes are:
idThe unique ID of the question
answerThe user-supplied answer to the question
questionThe text of the user defined question
The base URL for all the self-care management REST interfaces for knowledge questions is:
https://<WebSEAL host>:<port>/<junction_name>/sps/mga/user/mgmt/The
REST interfaces represent a collection of questions. The URI template
is /questions.
- For all methods, the response type for Accept Header and Content-Type
Header is
application/json. - Sorting, filtering, and paging are not supported.
- Users must authenticate in order to use the REST services.
| Method | Operation | URL | Response |
|---|---|---|---|
GET |
Retrieve a list of questions for a user. |
http://<WebSEAL
host>:<port>/<junction_name>/sps/mga/user/mgmt/questions |
Response code: The response is a JSON array of questions and JSON objects. To view an example response, see User questions REST model |
POST |
Create all the questions for a user. |
Response code: |
|
PUT |
Update all the questions for a user |
Response code: |
|
DELETE |
Delete all questions that are registered for a user |
| Method | Error Response |
|---|---|
POST |
Response code: Response type: Explanation: Malformed question found. Possible reasons:
|
PUT |
User questions REST model
The following table lists the attributes for user knowledge questions.
| Attribute | Examples |
|---|---|
| Name: username Description: the username Data type: String Note: Only provided on the response for a GET |
"sec_master" |
| Name: questions Description: the list of knowledge questions Data Type: JSON array of JSON objects Note:
|
Example questions: |
|
Name: result
Description: An error message that indicates the nature of the failure. Datatype: String |
|
Example JSON representation of a collection of knowledge questions
The following example shows the JSON representation of a collection of knowledge questions that belong to a user.
{
"username": "sec_master",
"questions" : [
{
"id" : "1",
"answer" : "******",
"question" : "What is your mother's maiden name?"
},
{
"id" : "2",
"answer" : ********,
"question" : "What is your Pet's name?"
}
]
}