| Methods / Other Web Services | |
REST
POST
Queries the database with any valid sql query and returns the dataset as a string in XML format.
https://[domain]:[port]/AgilePointServer/Workflow/QueryDatabase
https://[domain]:[port]/AgilePointService/Workflow/QueryDatabase
| Name | Description |
|---|---|
| None | Not Applicable |
| Name | Description |
|---|---|
sql |
|
$("#btnQueryDatabase").click(function () {
var JSONObject = {
sql: "SELECT * FROM WF_AUDIT_TRAILS where CATEGORY = 0
AND PURPOSE='Check-in process definition'"
};
$.ajax({
url: "https://mydomain:9011/AgilePointServer/Workflow/QueryDatabase",
data: JSON.stringify(JSONObject)
});
});
public String QueryDatabase(String sql) {
String URI = "http://mydomain:9011/AgilePointServer/Workflow/QueryDatabase";
HTTPOperations ops = new HTTPOperations(domain, this.userName,
password, appID, locale);
JSONObject postData = new JSONObject();
try {
postData.put("sql", sql);
return ops.POSTMethod(URI, postData.toString());
} catch (JSONException e1) {
e1.printStackTrace();
}
return "";
}
public string QueryDatabase()
{
string URI = "http://mydomain:9011/AgilePointServer/Workflow/QueryDatabase";
string jsonRequestdata = "{
\"where\":\"SELECT * FROM WF_AUDIT_TRAILS where CATEGORY = 0 AND
PURPOSE='Check-in process definition'\"}";
HTTPOperations ops = new HTTPOperations(domain, this.userName,
password, appID, locale);
return ops.POSTMethod(URI, jsonRequestdata);
}
An XML string that contains the dataset with the results of the database query.
"<DataSet> <Table> <CATEGORY>0</CATEGORY> <PURPOSE>Check-in Process Definition</PURPOSE> <DATE_OCCURRED>2014-02-13T13:11:59.36</DATE_OCCURRED> <PERFORMER>DEMO3\Administrator</PERFORMER> <DESCRIPTION>Core.FailedUncheckOut.Ownership</DESCRIPTION> <STATUS>Failed</STATUS> </Table> </DataSet>"
AgilePoint BPMS v5.0 R2 and higher