Web API: Expression/query: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
No edit summary |
||
Line 13: | Line 13: | ||
Body: | Body: | ||
{ | { | ||
Configuration: "{\"Root\":\"Cases\","Dimensions\":[{\"name\":\"Case Duration\",\"expression\":\"Duration.ToInteger(TotalDays)\"}],\"Values\":[{\"name\":\"Case count\",\"expression\":\"Count(_)\"}],\"Ordering\":[{\"Name\":\"Case Duration\",\"Direction\":\"Ascending\"}]", | |||
Filter: "{"Items":[{\"Type\":\"IncludeCases\",\"Items\":[{\"Type\":\"CaseAttributeValue\",\"Attribute\":\"Account Manager\",\"Values\":[\"Patricia White\",\"Rober Miller\"]}]}]}", | |||
ModelId: "123", | |||
QueryIdentifier: "myQuery1", | |||
CancelEarlierQueriesWithIdentifier: "true" | |||
} | } | ||
</pre> | </pre> | ||
[[Category: QPR ProcessAnalyzer]] | [[Category: QPR ProcessAnalyzer]] |
Revision as of 22:36, 15 May 2020
The Analysis operation runs a query in the server and returns the query results.
Form of the url is https://SERVER/qprpa/api/analysis/33 where SERVER is the DNS name to access QPR ProcessAnalyzer server. (The 33 is the number of the analysis which is the one mostly used. This documentation only covers using the analysis type 33.)
HTTP request header Authorization with value Bearer <access token> needs to be in place to identify the session.
The request body is a JSON object containing key-value pairs as properties. Available properties are described in the Expression Analysis parameters. Note that all keys are strings, so JSON values need to be stringified.
Returns Example:
url: https://SERVER/qprpa/api/analysis/33 Body: { Configuration: "{\"Root\":\"Cases\","Dimensions\":[{\"name\":\"Case Duration\",\"expression\":\"Duration.ToInteger(TotalDays)\"}],\"Values\":[{\"name\":\"Case count\",\"expression\":\"Count(_)\"}],\"Ordering\":[{\"Name\":\"Case Duration\",\"Direction\":\"Ascending\"}]", Filter: "{"Items":[{\"Type\":\"IncludeCases\",\"Items\":[{\"Type\":\"CaseAttributeValue\",\"Attribute\":\"Account Manager\",\"Values\":[\"Patricia White\",\"Rober Miller\"]}]}]}", ModelId: "123", QueryIdentifier: "myQuery1", CancelEarlierQueriesWithIdentifier: "true" }