Retrieve the Information Stored in an Answer Bank
The GetResources
and GetStats
actions allow you to retrieve the information in your Answer Bank systems.
GetResources
The GetResources
action allows you to retrieve the questions, answers, question equivalence classes, schemas, and XSDs for your answer systems. You can retrieve information for all systems by type, or you can restrict to a subset of systems or resource IDs, or exclude a particular set of IDs. You can also apply a filter to restrict the results to those that match some text, or a particular question state.
For full details about the parameters available in the GetResources
action, refer to the Answer Server Reference.
Examples
The following action retrieves the schemas to use in a ManageResources
action:
http://localhost:12000?Action=GetResources&SystemName=MyAnswerbank&Type=schema
The following action retrieves the first ten question equivalence classes stored in the specified Answer Bank system.
http://localhost:12000?Action=GetResources&SystemName=MyAnswerbank&Type=question_equivalence_class
The following action retrieves the questions in the specified Answer Bank system that contain the keyword President in the question text or rule.
http://localhost:12000?Action=GetResources&SystemName=MyAnswerbank&Type=question&Filter=%7B%20%22text%22%3A%20%22president%22%20%7D
The following action retrieves the questions in the specified Answer Bank system that have not been answered (incoming
, answerable
, and needs_answer
states).
http://localhost:12000?Action=GetResources&SystemName=MyAnswerbank&Type=question&Filter=%7B%20%22state%22%3A%20%5B%22incoming%22%2C%20%22answerable%22%2C%20%22needs_answer%22%5D%20%7D
The following action returns the question equivalence class with ID 4371920660452849522
.
http://localhost:12000?Action=GetResources&SystemName=MyAnswerbank&Type=question_equivalence_class&IDs=4371920660452849522
The following action returns the response XML Schema Definitions (XSDs) for the Answer Server actions:
http://localhost:12000?Action=GetResources&SystemName=MyAnswerbank&Type=XSD
For more examples of how to use GetResources
to find particular information, see Manage an Answer Bank.
GetStats
The GetStats
action returns information about the number of questions and question equivalence classes with each question state (incoming, answered, and so on). For example, you can use this action to find out if you have any unanswered questions in the system.
For full details about the parameters available in the GetStats
action, refer to the Answer Server Reference.
Example
action=GetStats&SystemName=MyAnswerBank