REST services for knowledge questions

We can use REST services to manage knowledge questions. Users can perform self care management operations to retrieve, create, update, and delete knowledge questions. We can use REST services to support these operations. The knowledge question attributes are:

The base URL for all the self-care management REST interfaces for knowledge questions is:

The REST interfaces represent a collection of questions. The URI template is /questions.

Error responses

User questions REST model

The following table lists the attributes for user knowledge questions.

Attribute Examples
Name: username

Description: the username

Data type: String 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

  • The caller supplies the id value. However, for PUT or POST methods if id is not provided the server generates a unique id for the question.
  • The parameter question is optional
  • The answer attribute will be obfuscated (replaced by the asterisk symbol "*") on responses.

Example questions:

    [
      {
        "id": "1",
        "answer"     : "Smith",
        "question"   : "What is your mother's maiden name?"
      },
      { 
        "id": "2",
        "answer"     : "Bandit",
        "question"   : "What is your Pet's name?"
      }]

Name: result

Description: An error message that indicates the nature of the failure.

Datatype: String

{ 
    "result": "FBTRBA310E The user knowlege questions
               answer(s) could not be stored because 
               a duplicate question unique identifier 
               [1] was included on the user questions."
}

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.

Parent topic: Developing for Advanced Access Control