API question - RapturePlatform/Rapture GitHub Wiki
The question API allows control input to a decision process from clients (typically humans -- automated steps are better served by scripts).
HttpQuestionApi questionApi = new HttpQuestionApi(loginApi);
void retVal = questionApi.putTemplate(qTemplateURI, template);retVal = baseAPI.doQuestion_PutTemplate(qTemplateURI, template);Entitlement: /data/write/$f(qTemplateURI)
Defines or redefines a question template.
| Parameter | Type | Description |
|---|---|---|
| qTemplateURI | String | |
| template | QTemplate |
| Type | Description |
|---|---|
| void |
Template data for a Question object, as defined in the Question API.
| Field | Type |
|---|---|
| qtemplateURI | QTemplateURI |
| quorum | List(UserURI) |
| rule | AnswerRule |
| prompt | String |
| options | List(String) |
| form | List(QDetail) |
| reports | List(String) |
| timeout | Long |
HttpQuestionApi questionApi = new HttpQuestionApi(loginApi);
QTemplate retVal = questionApi.getTemplate(qTemplateURI);retVal = baseAPI.doQuestion_GetTemplate(qTemplateURI);Entitlement: /data/read/$f(qTemplateURI)
Retrieves a question template.
| Parameter | Type | Description |
|---|---|---|
| qTemplateURI | String |
| Type | Description |
|---|---|
| QTemplate |
Template data for a Question object, as defined in the Question API.
| Field | Type |
|---|---|
| qtemplateURI | QTemplateURI |
| quorum | List(UserURI) |
| rule | AnswerRule |
| prompt | String |
| options | List(String) |
| form | List(QDetail) |
| reports | List(String) |
| timeout | Long |
HttpQuestionApi questionApi = new HttpQuestionApi(loginApi);
Question retVal = questionApi.getQuestion(questionURI);retVal = baseAPI.doQuestion_GetQuestion(questionURI);Entitlement: /data/read/$f(questionURI)
Retrieve a question for a URI.
| Parameter | Type | Description |
|---|---|---|
| questionURI | String |
| Type | Description |
|---|---|
| Question |
Main data for a Question API object.
| Field | Type |
|---|---|
| questionURI | QuestionURI |
| qtemplateURI | QTemplateURI |
| answer | String |
| priority | String |
| mapping | Map(String, String) |
| progress | ReplyProgress |
HttpQuestionApi questionApi = new HttpQuestionApi(loginApi);
String retVal = questionApi.askQuestion(qTemplateURI, variables, callback);retVal = baseAPI.doQuestion_AskQuestion(qTemplateURI, variables, callback);Entitlement: /question/exec/$f(qTemplateURI)
Asks a question using a template. The callback may not contain slashes.
| Parameter | Type | Description |
|---|---|---|
| qTemplateURI | String | |
| variables | Map<String,String> | |
| callback | String |
| Type | Description |
|---|---|
| String |
HttpQuestionApi questionApi = new HttpQuestionApi(loginApi);
List<QNotification> retVal = questionApi.getQNotifications(search);retVal = baseAPI.doQuestion_GetQNotifications(search);Entitlement: /data/read
Lists what questions are pending for a given condition.
| Parameter | Type | Description |
|---|---|---|
| search | QuestionSearch |
| Type | Description |
|---|---|
| List |
Contains search results for questions.
| Field | Type |
|---|---|
| user | String |
| progress | ReplyProgress |
| sortOrder | String |
| timeStamp | Long |
HttpQuestionApi questionApi = new HttpQuestionApi(loginApi);
List<String> retVal = questionApi.getQNotificationURIs(search);retVal = baseAPI.doQuestion_GetQNotificationURIs(search);Entitlement: /data/read
Gets the URIs for a questionSearch.
| Parameter | Type | Description |
|---|---|---|
| search | QuestionSearch |
| Type | Description |
|---|---|
| List |
Contains search results for questions.
| Field | Type |
|---|---|
| user | String |
| progress | ReplyProgress |
| sortOrder | String |
| timeStamp | Long |
HttpQuestionApi questionApi = new HttpQuestionApi(loginApi);
void retVal = questionApi.answerQuestion(questionURI, response, data);retVal = baseAPI.doQuestion_AnswerQuestion(questionURI, response, data);Entitlement: /data/read
Attaches an answer to the given question.
| Parameter | Type | Description |
|---|---|---|
| questionURI | String | |
| response | String | |
| data | Map<String,Object> |
| Type | Description |
|---|---|
| void |