Update a Question Equivalence Class

You can update the following properties in your question equivalence classes:

To update a question equivalence class, you use a ManageResources action in a POST request method, with the information about the questions provided in the Data parameter as a JSON object.

The update operation replaces existing content with the new version that you provide. If you omit a value, HPE Answer Server keeps the existing value. If you want to delete the existing value, you can explicitly set an empty value or array.

For example, if you change the list of question IDs, but do not set the answer block in your JSON data, HPE Answer Server updates the list of questions, but does not modify the answer.

The amend operation allows you to add questions to the question equivalence class. In this case, you provide only the questions that you want to add to the question equivalence class, rather than the complete list of question IDs. You can use this option if you might have multiple users adding equivalent questions at the same time, to ensure that all changes are reflected.

NOTE:

When you add questions to a question equivalence class, HPE Answer Server automatically updates the question state to answered. If you remove all questions from the question equivalence class, it reverts the question state to incoming.

The following example updates the question equivalence class with ID 2012912839742797651 with a new list of question_ids. It does not update the stored answer for the question (if it exists).

Action=ManageResource&SystemName=AnswerBank
data={
   "operation":"update",
   "type":"question_equivalence_class",
   "question_equivalence_class":{
      "id": 2012912839742797651,
      "question_ids":[
         "9706856188043740111",
         "8129920660480699726",
         "3067998369792637739"
      ],
      "reference_question":"How do I get regular updates about MyCompany?",
      "rule": "updates AND MyCompany"
   }
}

You can retrieve the full schema for the JSON object to use by using the GetResources action. See Find the JSON Schema for Your Update.

NOTE:

The ManageResources action fails if you attempt to use request JSON that contains properties that are not contained in the appropriate schema.

You can also use the GetResources action to generate a rule for your question equivalence class. See Generate a Question Equivalence Rule.


_HP_HTML5_bannerTitle.htm