Wiki source code of 06g. Metadata Web Services Integration
Show last authors
| author | version | line-number | content |
|---|---|---|---|
| 1 | {{box cssClass="floatinginfobox" title="**Contents**"}} | ||
| 2 | {{toc/}} | ||
| 3 | {{/box}} | ||
| 4 | |||
| 5 | Metadata web services provide the programming interface to enable interaction between [[CXAIR>>doc:Technical Documentation.CXAIR.WebHome]] and third-party software applications. | ||
| 6 | |||
| 7 | The web services offer open, platform-independent APIs which allow applications to access metadata relating to the core Search Engine and Index structures, while exposing interfaces that allow these applications to construct queries. These then initiate [[CXAIR>>doc:Technical Documentation.CXAIR.WebHome]] queries or reports in a secure and non-invasive manner. | ||
| 8 | |||
| 9 | = Calling CXAIR Web Services = | ||
| 10 | |||
| 11 | The user must be logged into [[CXAIR>>doc:Technical Documentation.CXAIR.WebHome]] to call the web services. This is performed by calling the Authenticate web service, and then returning a SessionID used to call all subsequent web services. | ||
| 12 | |||
| 13 | All of the web services operate over SSL connections and will only return data that the authenticated user is allowed access to. | ||
| 14 | |||
| 15 | All URL parameters are mandatory. | ||
| 16 | |||
| 17 | == Web Service Tests Page == | ||
| 18 | |||
| 19 | The **Web Service Tests** page can be accessed at the following URL: | ||
| 20 | |||
| 21 | **http:~/~/<hostname>:<port>/<application name>/test/index.jsp** | ||
| 22 | |||
| 23 | Click on the appropriate link to load a page where the parameters associated with each web service can be entered and tested. | ||
| 24 | |||
| 25 | = Authenticate = | ||
| 26 | |||
| 27 | This web services authenticates a user against an instance of [[CXAIR>>doc:Technical Documentation.CXAIR.WebHome]] by silently logging into the system and returning a session identifier. | ||
| 28 | |||
| 29 | == URL == | ||
| 30 | |||
| 31 | **/rest/authenticate** | ||
| 32 | |||
| 33 | == Parameters == | ||
| 34 | |||
| 35 | The following parameters must be passed as POST: | ||
| 36 | |||
| 37 | (% border="1" cellspacing="0" style="border-collapse:collapse; border:1pt solid windowtext; width:1024px" class="MsoTableGrid" %) | ||
| 38 | |(% width="188" style="background-color:#ed7d31; background:#ed7d31; border-style:solid; border-width:1.0pt; width:150.15pt" %)((( | ||
| 39 | (% style="padding:0cm 5.4pt 0cm 5.4pt" %) | ||
| 40 | (% style="color:white" %)Parameter | ||
| 41 | )))|(% width="188" style="background-color:#ed7d31; background:#ed7d31; border-bottom-style:solid; border-bottom-width:1pt; border-left:1pt solid; border-right-style:solid; border-right-width:1pt; border-top-style:solid; border-top-width:1pt; width:135px" %)((( | ||
| 42 | (% style="padding:0cm 5.4pt 0cm 5.4pt" %) | ||
| 43 | (% style="color:white" %)Mandatory | ||
| 44 | )))|(% width="190" style="background-color:#ed7d31; background:#ed7d31; border-bottom-style:solid; border-bottom-width:1pt; border-left:1pt solid; border-right-style:solid; border-right-width:1pt; border-top-style:solid; border-top-width:1pt; width:547px" %)((( | ||
| 45 | (% style="padding:0cm 5.4pt 0cm 5.4pt" %) | ||
| 46 | (% style="color:white" %)Description | ||
| 47 | ))) | ||
| 48 | |(% width="188" style="border-style:solid; border-top:none; border-width:1.0pt; width:150.15pt" %)((( | ||
| 49 | (% style="padding:0cm 5.4pt 0cm 5.4pt" %) | ||
| 50 | username | ||
| 51 | )))|(% width="188" style="border-bottom:1pt solid windowtext; border-left:none; border-right:1pt solid windowtext; border-top:none; width:135px" %)((( | ||
| 52 | (% style="padding:0cm 5.4pt 0cm 5.4pt" %) | ||
| 53 | Y | ||
| 54 | )))|(% width="190" style="border-bottom:1pt solid windowtext; border-left:none; border-right:1pt solid windowtext; border-top:none; width:547px" %)((( | ||
| 55 | (% style="padding:0cm 5.4pt 0cm 5.4pt" %) | ||
| 56 | CXAIR username. | ||
| 57 | ))) | ||
| 58 | |(% width="188" style="border-style:solid; border-top:none; border-width:1.0pt; width:150.15pt" %)((( | ||
| 59 | (% style="padding:0cm 5.4pt 0cm 5.4pt" %) | ||
| 60 | password | ||
| 61 | )))|(% width="188" style="border-bottom:1pt solid windowtext; border-left:none; border-right:1pt solid windowtext; border-top:none; width:135px" %)((( | ||
| 62 | (% style="padding:0cm 5.4pt 0cm 5.4pt" %) | ||
| 63 | Y | ||
| 64 | )))|(% width="190" style="border-bottom:1pt solid windowtext; border-left:none; border-right:1pt solid windowtext; border-top:none; width:547px" %)((( | ||
| 65 | (% style="padding:0cm 5.4pt 0cm 5.4pt" %) | ||
| 66 | CXAIR password. | ||
| 67 | ))) | ||
| 68 | |(% width="188" style="border-style:solid; border-top:none; border-width:1.0pt; width:150.15pt" %)((( | ||
| 69 | (% style="padding:0cm 5.4pt 0cm 5.4pt" %) | ||
| 70 | client | ||
| 71 | )))|(% width="188" style="border-bottom:1pt solid windowtext; border-left:none; border-right:1pt solid windowtext; border-top:none; width:135px" %)((( | ||
| 72 | (% style="padding:0cm 5.4pt 0cm 5.4pt" %) | ||
| 73 | N | ||
| 74 | )))|(% width="190" style="border-bottom:1pt solid windowtext; border-left:none; border-right:1pt solid windowtext; border-top:none; width:547px" %)((( | ||
| 75 | (% style="padding:0cm 5.4pt 0cm 5.4pt" %) | ||
| 76 | The name of the client application. This is displayed in the **User Sessions** screen under the Client Product column. | ||
| 77 | ))) | ||
| 78 | |(% width="188" style="border-style:solid; border-top:none; border-width:1.0pt; width:150.15pt" %)((( | ||
| 79 | (% style="padding:0cm 5.4pt 0cm 5.4pt" %) | ||
| 80 | ipaddress | ||
| 81 | )))|(% width="188" style="border-bottom:1pt solid windowtext; border-left:none; border-right:1pt solid windowtext; border-top:none; width:135px" %)((( | ||
| 82 | (% style="padding:0cm 5.4pt 0cm 5.4pt" %) | ||
| 83 | N | ||
| 84 | )))|(% width="190" style="border-bottom:1pt solid windowtext; border-left:none; border-right:1pt solid windowtext; border-top:none; width:547px" %)((( | ||
| 85 | (% style="padding:0cm 5.4pt 0cm 5.4pt" %) | ||
| 86 | The IP address of the client. Only required when CXAIR logins are tied to specific IP address within the user configuration screens. | ||
| 87 | ))) | ||
| 88 | |||
| 89 | == Returns == | ||
| 90 | |||
| 91 | SessionID as a string. | ||
| 92 | |||
| 93 | |||
| 94 | == Example Output == | ||
| 95 | |||
| 96 | **58252c341fe49f57_e88015ad_0000013d4525b24c_8001** | ||
| 97 | |||
| 98 | = Search Engines = | ||
| 99 | |||
| 100 | This web service lists all available search engines for the authenticated user. | ||
| 101 | |||
| 102 | == URL == | ||
| 103 | |||
| 104 | **/rest/metadata/searchengines/<SessionID>** | ||
| 105 | |||
| 106 | == Parameters == | ||
| 107 | |||
| 108 | (% border="1" cellspacing="0" style="border-collapse:collapse; border:1pt solid windowtext; width:1024px" class="MsoTableGrid" %) | ||
| 109 | |(% width="190" style="background-color:#ed7d31; background:#ed7d31; border-style:solid; border-width:1pt; width:231px" %)((( | ||
| 110 | (% style="padding:0cm 5.4pt 0cm 5.4pt" %) | ||
| 111 | (% style="color:white" %)Parameter | ||
| 112 | )))|(% width="187" style="background-color:#ed7d31; background:#ed7d31; border-bottom-style:solid; border-bottom-width:1pt; border-left:1pt solid; border-right-style:solid; border-right-width:1pt; border-top-style:solid; border-top-width:1pt; width:157px" %)((( | ||
| 113 | (% style="padding:0cm 5.4pt 0cm 5.4pt" %) | ||
| 114 | (% style="color:white" %)Mandatory | ||
| 115 | )))|(% width="188" style="background-color:#ed7d31; background:#ed7d31; border-bottom-style:solid; border-bottom-width:1pt; border-left:1pt solid; border-right-style:solid; border-right-width:1pt; border-top-style:solid; border-top-width:1pt; width:635px" %)((( | ||
| 116 | (% style="padding:0cm 5.4pt 0cm 5.4pt" %) | ||
| 117 | (% style="color:white" %)Description | ||
| 118 | ))) | ||
| 119 | |(% width="190" style="border-style:none solid solid; border-top-color:initial; border-width:1pt; width:231px" %)((( | ||
| 120 | (% style="padding:0cm 5.4pt 0cm 5.4pt" %) | ||
| 121 | includeindexes | ||
| 122 | )))|(% width="187" style="border-bottom:1pt solid windowtext; border-left:none; border-right:1pt solid windowtext; border-top:none; width:157px" %)((( | ||
| 123 | (% style="padding:0cm 5.4pt 0cm 5.4pt" %) | ||
| 124 | N | ||
| 125 | )))|(% width="188" style="border-bottom:1pt solid windowtext; border-left:none; border-right:1pt solid windowtext; border-top:none; width:635px" %)((( | ||
| 126 | (% style="padding:0cm 5.4pt 0cm 5.4pt" %) | ||
| 127 | If true, the index names for each search engine will also be returned. | ||
| 128 | |||
| 129 | (% style="padding:0cm 5.4pt 0cm 5.4pt" %) | ||
| 130 | Valid values are **True** and **False**. | ||
| 131 | ))) | ||
| 132 | |||
| 133 | == Returns == | ||
| 134 | |||
| 135 | Returns an array of JSON objects in the following format: | ||
| 136 | |||
| 137 | **[{ | ||
| 138 | name: String, | ||
| 139 | displayName: String, | ||
| 140 | indexes: [{ | ||
| 141 | name: String, | ||
| 142 | displayName: String | ||
| 143 | }] | ||
| 144 | }]** | ||
| 145 | |||
| 146 | == Example Output == | ||
| 147 | |||
| 148 | **[{"name":"1b5ff460-bde3-102f-8c00-6d1c97ab8273","displayName":"pipeline12072012.csv"},{"name":"1fd380f0-87c6-102f-bf08-9f703c3eed74","displayName":"Hospitality"},{"name":"36284080-ae5d-102f-8f1e-938050e9d02e","displayName":"Connexica"},{"name":"3f37b830-f517-102f-b64d-533b47feef0c","displayName":"Clearview"},{"name":"8f3d48f0-5f42-1030-ad70-0d332ae60bc8","displayName":"2012 New Features"},{"name":"9739a510-d4d9-102f-a0fd-dfa273b3291f","displayName":"Google"},{"name":"af08bca0-51b4-1030-9da3-91f3afeb2948","displayName":"Nebular"},{"name":"be02d350-b4b4-102f-82f9-5ba617ac9ccf","displayName":"pipeline12072012.csv"},{"name":"default","displayName":"default"},{"name":"e3646190-bc6b-102f-b770-4bdd12a0c006","displayName":"pipeline12072012.csv"},{"name":"fc72ab10-5e41-1030-b01c-bb95c52da156","displayName":"Multitenanted"},{"name":"HealthWare","displayName":"Health Demo Search Engine"},{"name":"Screenshots","displayName":"Standard Demo"}]** | ||
| 149 | |||
| 150 | = Indexes = | ||
| 151 | |||
| 152 | This web service lists all indexes across all search engines, or for a specific search engine. | ||
| 153 | |||
| 154 | == URL == | ||
| 155 | |||
| 156 | **/rest/indexes/<SessionID>** | ||
| 157 | |||
| 158 | == Parameters == | ||
| 159 | |||
| 160 | |||
| 161 | (% border="1" cellspacing="0" style="border-collapse:collapse; border:1pt solid windowtext; width:1024px" class="MsoTableGrid" %) | ||
| 162 | |(% width="189" style="background-color:#ed7d31; background:#ed7d31; border-style:solid; border-width:1pt; width:231px" %)((( | ||
| 163 | (% style="padding:0cm 5.4pt 0cm 5.4pt" %) | ||
| 164 | (% style="color:white" %)Parameter | ||
| 165 | )))|(% width="188" style="background-color:#ed7d31; background:#ed7d31; border-bottom-style:solid; border-bottom-width:1pt; border-left:1pt solid; border-right-style:solid; border-right-width:1pt; border-top-style:solid; border-top-width:1pt; width:160px" %)((( | ||
| 166 | (% style="padding:0cm 5.4pt 0cm 5.4pt" %) | ||
| 167 | (% style="color:white" %)Mandatory | ||
| 168 | )))|(% width="188" style="background-color:#ed7d31; background:#ed7d31; border-bottom-style:solid; border-bottom-width:1pt; border-left:1pt solid; border-right-style:solid; border-right-width:1pt; border-top-style:solid; border-top-width:1pt; width:634px" %)((( | ||
| 169 | (% style="padding:0cm 5.4pt 0cm 5.4pt" %) | ||
| 170 | (% style="color:white" %)Description | ||
| 171 | ))) | ||
| 172 | |(% width="189" style="border-style:none solid solid; border-top-color:initial; border-width:1pt; width:231px" %)((( | ||
| 173 | (% style="padding:0cm 5.4pt 0cm 5.4pt" %) | ||
| 174 | searchengine | ||
| 175 | )))|(% width="188" style="border-bottom:1pt solid windowtext; border-left:none; border-right:1pt solid windowtext; border-top:none; width:160px" %)((( | ||
| 176 | (% style="padding:0cm 5.4pt 0cm 5.4pt" %) | ||
| 177 | N | ||
| 178 | )))|(% width="188" style="border-bottom:1pt solid windowtext; border-left:none; border-right:1pt solid windowtext; border-top:none; width:634px" %)((( | ||
| 179 | (% style="padding:0cm 5.4pt 0cm 5.4pt" %) | ||
| 180 | The name of the search engine. If specified, only indexes from the specified search engine are returned. Otherwise, all indexes are returned. | ||
| 181 | |||
| 182 | (% style="padding:0cm 5.4pt 0cm 5.4pt" %) | ||
| 183 | Search engines created with the current version will be identified by a GUID. Those imported from an older version may contain a name. | ||
| 184 | ))) | ||
| 185 | |||
| 186 | == Returns == | ||
| 187 | |||
| 188 | Returns an array of JSON objects in the following format: | ||
| 189 | |||
| 190 | **[{ | ||
| 191 | name: String, | ||
| 192 | displayName: String | ||
| 193 | }]** | ||
| 194 | |||
| 195 | == Example Output == | ||
| 196 | |||
| 197 | **[{"name":"7e12fa20-4913-102f-9af2-5fd4716c636b","displayName":"NHS Finance"},{"name":"994f9ec0-5ccb-1030-8416-d132a8f71a3a","displayName":"Data Warehouse"},{"name":"ab772fb0-0a05-102f-8d90-7fa5e9235aca","displayName":"Docs 2011"},{"name":"Card Holder Details and Attendance","displayName":"Card Holder Details and Attendance"},{"name":"cxairaudit","displayName":"CXAIR Audit"},{"name":"Demo Seasons","displayName":"Demo Seasons"},{"name":"Health Theatres","displayName":"Theatres"},{"name":"MEFCO","displayName":"MEFCO"},{"name":"MidEssex","displayName":"Finance"},{"name":"NI14","displayName":"NI14"},{"name":"Personnel","displayName":"Personnel"}]** | ||
| 198 | |||
| 199 | = Data Source Groups = | ||
| 200 | |||
| 201 | This web service lists all data source groups, either for all indexes or for those linked to a specific index. | ||
| 202 | |||
| 203 | == URL == | ||
| 204 | |||
| 205 | **/rest/datasourcegroups/<SessionID>** | ||
| 206 | |||
| 207 | == Parameters == | ||
| 208 | |||
| 209 | (% border="1" cellspacing="0" style="border-collapse:collapse; border:1pt solid windowtext; width:1024px" class="MsoTableGrid" %) | ||
| 210 | |(% width="188" style="background-color:#ed7d31; background:#ed7d31; border-style:solid; border-width:1pt; width:230px" %)((( | ||
| 211 | (% style="padding:0cm 5.4pt 0cm 5.4pt" %) | ||
| 212 | (% style="color:white" %)Parameter | ||
| 213 | )))|(% width="189" style="background-color:#ed7d31; background:#ed7d31; border-bottom-style:solid; border-bottom-width:1pt; border-left:1pt solid; border-right-style:solid; border-right-width:1pt; border-top-style:solid; border-top-width:1pt; width:156px" %)((( | ||
| 214 | (% style="padding:0cm 5.4pt 0cm 5.4pt" %) | ||
| 215 | (% style="color:white" %)Mandatory | ||
| 216 | )))|(% width="189" style="background-color:#ed7d31; background:#ed7d31; border-bottom-style:solid; border-bottom-width:1pt; border-left:1pt solid; border-right-style:solid; border-right-width:1pt; border-top-style:solid; border-top-width:1pt; width:632px" %)((( | ||
| 217 | (% style="padding:0cm 5.4pt 0cm 5.4pt" %) | ||
| 218 | (% style="color:white" %)Description | ||
| 219 | ))) | ||
| 220 | |(% width="188" style="border-style:none solid solid; border-top-color:initial; border-width:1pt; width:230px" %)((( | ||
| 221 | (% style="padding:0cm 5.4pt 0cm 5.4pt" %) | ||
| 222 | index | ||
| 223 | )))|(% width="189" style="border-bottom:1pt solid windowtext; border-left:none; border-right:1pt solid windowtext; border-top:none; width:156px" %)((( | ||
| 224 | (% style="padding:0cm 5.4pt 0cm 5.4pt" %) | ||
| 225 | N | ||
| 226 | )))|(% width="189" style="border-bottom:1pt solid windowtext; border-left:none; border-right:1pt solid windowtext; border-top:none; width:632px" %)((( | ||
| 227 | (% style="padding:0cm 5.4pt 0cm 5.4pt" %) | ||
| 228 | The name of the index. If specified, Only the data from the specified index is returned. Otherwise, all data source groups are returned. | ||
| 229 | ))) | ||
| 230 | |||
| 231 | == Returns == | ||
| 232 | |||
| 233 | Returns an array of JSON objects in the following format: | ||
| 234 | |||
| 235 | **[{ | ||
| 236 | name: String, | ||
| 237 | displayName: String | ||
| 238 | }]** | ||
| 239 | |||
| 240 | == Example Output == | ||
| 241 | |||
| 242 | [{"name":"994f9ec0-5ccb-1030-8416-d132a8f71a3a","displayName":"Data Warehouse"}] | ||
| 243 | |||
| 244 | = Data Sources = | ||
| 245 | |||
| 246 | This web service lists all data sources for either all data source groups or those linked to a specific data source group. | ||
| 247 | |||
| 248 | == URL == | ||
| 249 | |||
| 250 | **/rest/datasources/<SessionID>** | ||
| 251 | |||
| 252 | == Parameters == | ||
| 253 | |||
| 254 | (% border="1" cellspacing="0" style="border-collapse:collapse; border:1pt solid windowtext; width:1024px" class="MsoTableGrid" %) | ||
| 255 | |(% width="192" style="background-color:#ed7d31; background:#ed7d31; border-style:solid; border-width:1pt; width:229px" %)((( | ||
| 256 | (% style="padding:0cm 5.4pt 0cm 5.4pt" %) | ||
| 257 | (% style="color:white" %)Parameter | ||
| 258 | )))|(% width="187" style="background-color:#ed7d31; background:#ed7d31; border-bottom-style:solid; border-bottom-width:1pt; border-left:1pt solid; border-right-style:solid; border-right-width:1pt; border-top-style:solid; border-top-width:1pt; width:155px" %)((( | ||
| 259 | (% style="padding:0cm 5.4pt 0cm 5.4pt" %) | ||
| 260 | (% style="color:white" %)Mandatory | ||
| 261 | )))|(% width="187" style="background-color:#ed7d31; background:#ed7d31; border-bottom-style:solid; border-bottom-width:1pt; border-left:1pt solid; border-right-style:solid; border-right-width:1pt; border-top-style:solid; border-top-width:1pt; width:638px" %)((( | ||
| 262 | (% style="padding:0cm 5.4pt 0cm 5.4pt" %) | ||
| 263 | (% style="color:white" %)Description | ||
| 264 | ))) | ||
| 265 | |(% width="192" style="border-style:none solid solid; border-top-color:initial; border-width:1pt; width:229px" %)((( | ||
| 266 | (% style="padding:0cm 5.4pt 0cm 5.4pt" %) | ||
| 267 | datasourcegroup | ||
| 268 | )))|(% width="187" style="border-bottom:1pt solid windowtext; border-left:none; border-right:1pt solid windowtext; border-top:none; width:155px" %)((( | ||
| 269 | (% style="padding:0cm 5.4pt 0cm 5.4pt" %) | ||
| 270 | N | ||
| 271 | )))|(% width="187" style="border-bottom:1pt solid windowtext; border-left:none; border-right:1pt solid windowtext; border-top:none; width:638px" %)((( | ||
| 272 | (% style="padding:0cm 5.4pt 0cm 5.4pt" %) | ||
| 273 | The name of the data source group. If specified, only the data from the specified data source group is returned. Otherwise, all data sources are returned. | ||
| 274 | ))) | ||
| 275 | |||
| 276 | == Returns == | ||
| 277 | |||
| 278 | Returns an array of JSON objects in the following format: | ||
| 279 | |||
| 280 | **[{ | ||
| 281 | name: String, | ||
| 282 | type: String <string, number, date> | ||
| 283 | format: (number or date format) | ||
| 284 | }]** | ||
| 285 | |||
| 286 | == Example Output == | ||
| 287 | |||
| 288 | **[{"name":"TPK","indexFields":[{"name":"TPK","type":"number"}]},{"name":"Transaction ID","indexFields":[{"name":"Transaction_ID","type":"string"}]},{"name":"Area Name","indexFields":[{"name":"Area_Name","type":"string"}]},{"name":"Region Name","indexFields":[{"name":"Region_Name","type":"string"}]},{"name":"Product Description","indexFields":[{"name":"Product_Description","type":"string"}]},{"name":"Sale Price","indexFields":[{"name":"Sale_Price","type":"number"}]},{"name":"MOP","indexFields":[{"name":"MOP","type":"string"}]},{"name":"Employee Name","indexFields":[{"name":"Employee_Name","type":"string"}]},{"name":"Day of Week","indexFields":[{"name":"Day_of_Week","type":"number"}]},{"name":"Quantity","indexFields":[{"name":"Quantity","type":"number"}]},{"name":"Loyalty Points","indexFields":[{"name":"Loyalty_Points","type":"number"}]},{"name":"Cost Price","indexFields":[{"name":"Cost_Price","type":"number"}]},{"name":"Loyalty Card","indexFields":[{"name":"Loyalty_Card","type":"string"}]},{"name":"Transaction Price","indexFields":[{"name":"Transaction_Price","type":"number"}]},{"name":"Branch Address","indexFields":[{"name":"Branch_Address","type":"string"}]},{"name":"Branch Code","indexFields":[{"name":"Branch_Code","type":"string"}]},{"name":"Branch Email","indexFields":[{"name":"Branch_Email","type":"string"}]}** | ||
| 289 | |||
| 290 | = Reports = | ||
| 291 | |||
| 292 | This web service lists all folders and their contents for a specified user session. | ||
| 293 | |||
| 294 | == URL == | ||
| 295 | |||
| 296 | **/rest/reports/<sessionID>** | ||
| 297 | |||
| 298 | == Returns == | ||
| 299 | |||
| 300 | Returns an array of JSON objects in the following format: | ||
| 301 | |||
| 302 | **[{ | ||
| 303 | name: String, | ||
| 304 | folders: [{ | ||
| 305 | name: String, | ||
| 306 | folders: … | ||
| 307 | reports: ... | ||
| 308 | }], | ||
| 309 | reports: [{ | ||
| 310 | name: String, | ||
| 311 | description: String, | ||
| 312 | type: String, | ||
| 313 | searchEngine: String, | ||
| 314 | index: String | ||
| 315 | }] | ||
| 316 | ]}** | ||
| 317 | |||
| 318 | == Example Output == | ||
| 319 | |||
| 320 | **[{"name":"admin","folders":[{"name":"Bug Testing","folders":[],"reports":[{"guid":"32dacd90-ae39-102f-86ac-bf50257fe4a1","name":"bug test 2","description":"","type":"crosstab"},{"guid":"d3469cf0-ae39-102f-86ac-bf50257fe4a1","name":"bug test 3","description":"","type":"crosstab"},{"guid":"fa649c20-ae38-102f-86ac-bf50257fe4a1","name":"bug test 1","description":"","type":"crosstab"}]},{"name":"Food Queries","folders":[],"reports":[{"guid":"1f9c16b0-a756-102f-abeb-5b4773419498","name":"beef","description":"all beef products","type":"query"},{"guid":"43cc9d70-a756-102f-abeb-5b4773419498","name":"lamb","description":"all lamb products","type":"query"},{"guid":"64dd87f0-a746-102f-abeb-5b4773419498","name":"chicken","description":"all chicken products","type":"query"}]},{"name":"Miscellaneous Folder","folders":[{"name":"ad73fc00-a8b4-102f-b7e2-3313a9eaf745","folders":[],"reports":[]},{"name":"de415ec0-a8d4-102f-b7e2-3313a9eaf745","folders":[],"reports":[]}],"reports":[{"guid":"164b3200-ae34-102f-86ac-bf50257fe4a1","name":"crosstab new function","description":"continuous data lines","type":"crosstab"},{"guid":"2db612d0-acc6-102f-b9f1-774661c27f84","name":"lancashire branches","description":"all branches in lancashire, wildcard query","type":"query"},{"guid":"5f0a4130-ae38-102f-86ac-bf50257fe4a1","name":"bug","description":"","type":"crosstab"},{"guid":"9f8dbe30-a8e3-102f-b7e2-3313a9eaf745","name":"Monthly Financial Overview","description":"","type":"venn"},{"guid":"ad73fc00-a8b4-102f-b7e2-3313a9eaf745","name":"demo dashboard","type":"dashboard"},{"guid":"de415ec0-a8d4-102f-b7e2-3313a9eaf745","name":"cross database dashboard","description":"","type":"dashboard"},{"guid":"fda79040-acc6-102f-b9f1-774661c27f84","name":"Sausage and Mash Sales","description":"","type":"venn"},{"guid":"fdc7be50-a8af-102f-b7e2-3313a9eaf745","name":"loyalty points","description":"average","type":"crosstab"}]},"reports":[]}]** | ||
| 321 | |||
| 322 | = Run Report = | ||
| 323 | |||
| 324 | This web service runs a saved query or Crosstab and returns the results in JSON format. | ||
| 325 | |||
| 326 | == URL == | ||
| 327 | |||
| 328 | **/rest/run/<SessionID>/<searchEngineName>/<reportGUID>** | ||
| 329 | |||
| 330 | == Parameters == | ||
| 331 | |||
| 332 | (% border="1" cellspacing="0" style="border-collapse:collapse; border:1pt solid windowtext; width:1024px" class="MsoTableGrid" %) | ||
| 333 | |(% width="188" style="background-color:#ed7d31; background:#ed7d31; border-style:solid; border-width:1pt; width:229px" %)((( | ||
| 334 | (% style="padding:0cm 5.4pt 0cm 5.4pt" %) | ||
| 335 | (% style="color:white" %)Parameter | ||
| 336 | )))|(% width="189" style="background-color:#ed7d31; background:#ed7d31; border-bottom-style:solid; border-bottom-width:1pt; border-left:1pt solid; border-right-style:solid; border-right-width:1pt; border-top-style:solid; border-top-width:1pt; width:150px" %)((( | ||
| 337 | (% style="padding:0cm 5.4pt 0cm 5.4pt" %) | ||
| 338 | (% style="color:white" %)Mandatory | ||
| 339 | )))|(% width="189" style="background-color:#ed7d31; background:#ed7d31; border-bottom-style:solid; border-bottom-width:1pt; border-left:1pt solid; border-right-style:solid; border-right-width:1pt; border-top-style:solid; border-top-width:1pt; width:639px" %)((( | ||
| 340 | (% style="padding:0cm 5.4pt 0cm 5.4pt" %) | ||
| 341 | (% style="color:white" %)Description | ||
| 342 | ))) | ||
| 343 | |(% width="188" style="border-style:none solid solid; border-top-color:initial; border-width:1pt; width:229px" %)((( | ||
| 344 | (% style="padding:0cm 5.4pt 0cm 5.4pt" %) | ||
| 345 | page_size | ||
| 346 | )))|(% width="189" style="border-bottom:1pt solid windowtext; border-left:none; border-right:1pt solid windowtext; border-top:none; width:150px" %)((( | ||
| 347 | (% style="padding:0cm 5.4pt 0cm 5.4pt" %) | ||
| 348 | N | ||
| 349 | )))|(% width="189" style="border-bottom:1pt solid windowtext; border-left:none; border-right:1pt solid windowtext; border-top:none; width:639px" %)((( | ||
| 350 | (% style="padding:0cm 5.4pt 0cm 5.4pt" %) | ||
| 351 | The size of the page output. Only applicable to queries. | ||
| 352 | ))) | ||
| 353 | |(% width="188" style="border-style:none solid solid; border-top-color:initial; border-width:1pt; width:229px" %)((( | ||
| 354 | (% style="padding:0cm 5.4pt 0cm 5.4pt" %) | ||
| 355 | from_page | ||
| 356 | )))|(% width="189" style="border-bottom:1pt solid windowtext; border-left:none; border-right:1pt solid windowtext; border-top:none; width:150px" %)((( | ||
| 357 | (% style="padding:0cm 5.4pt 0cm 5.4pt" %) | ||
| 358 | N | ||
| 359 | )))|(% width="189" style="border-bottom:1pt solid windowtext; border-left:none; border-right:1pt solid windowtext; border-top:none; width:639px" %)((( | ||
| 360 | (% style="padding:0cm 5.4pt 0cm 5.4pt" %) | ||
| 361 | The first page to return results from. Only applicable to queries. | ||
| 362 | ))) | ||
| 363 | |(% width="188" style="border-style:none solid solid; border-top-color:initial; border-width:1pt; width:229px" %)((( | ||
| 364 | (% style="padding:0cm 5.4pt 0cm 5.4pt" %) | ||
| 365 | to_page | ||
| 366 | )))|(% width="189" style="border-bottom:1pt solid windowtext; border-left:none; border-right:1pt solid windowtext; border-top:none; width:150px" %)((( | ||
| 367 | (% style="padding:0cm 5.4pt 0cm 5.4pt" %) | ||
| 368 | N | ||
| 369 | )))|(% width="189" style="border-bottom:1pt solid windowtext; border-left:none; border-right:1pt solid windowtext; border-top:none; width:639px" %)((( | ||
| 370 | (% style="padding:0cm 5.4pt 0cm 5.4pt" %) | ||
| 371 | The last page to return results from. Only applicable to queries. | ||
| 372 | ))) | ||
| 373 | |||
| 374 | == Returns == | ||
| 375 | |||
| 376 | Returns the results of the [[Query>>doc:Technical Documentation.CXAIR.User Guide.02\. Reporting.2a\. Query.WebHome]] or [[Crosstab>>doc:Technical Documentation.CXAIR.User Guide.02\. Reporting.2c\. Crosstabs.WebHome]] execution in the following format: | ||
| 377 | |||
| 378 | Query: | ||
| 379 | |||
| 380 | **{ | ||
| 381 | hits: Integer, | ||
| 382 | headers: [{ | ||
| 383 | name: String, | ||
| 384 | type: String,format: String | ||
| 385 | }], | ||
| 386 | documents: [{ | ||
| 387 | values: [String] | ||
| 388 | }] | ||
| 389 | }** | ||
| 390 | |||
| 391 | Crosstab: | ||
| 392 | |||
| 393 | **{ | ||
| 394 | filters: [Name -> Value], | ||
| 395 | filterLabels: [Name -> Value], | ||
| 396 | rowCount: Integer, | ||
| 397 | columnCount: Integer, | ||
| 398 | rowLabels: [String], | ||
| 399 | columnLabels: [String], | ||
| 400 | aggregationLabels: [String], | ||
| 401 | conditionalFormat: [Name -> Value], | ||
| 402 | values: { | ||
| 403 | [Key -> Value <Key is "Row, Column"> | ||
| 404 | } | ||
| 405 | }** | ||
| 406 | |||
| 407 | == Example Output == | ||
| 408 | |||
| 409 | [[Query>>doc:Technical Documentation.CXAIR.User Guide.02\. Reporting.2a\. Query.WebHome]]: | ||
| 410 | |||
| 411 | **{"hits":165001,"headers":[{"name":"Region Name","type":"string"},{"name":"Area Name","type":"string"},{"name":"Branch Name","type":"string"},{"name":"Transaction ID","type":"string"},{"name":"Transaction Day Description","type":"string"},{"name":"Transaction Date","type":"date","format":"dd/MM/yyyy HH:mm:ss"},{"name":"Day of Week","type":"number","format":"#0"},{"name":"Product Description","type":"string"},{"name":"Sale Price","type":"number","format":"#0.00"},{"name":"Quantity","type":"number","format":"#,##0"},{"name":"Transaction Price","type":"number","format":"#0.00"},{"name":"Cost Price","type":"number","format":"#0.00"},{"name":"Employee Name","type":"string"},{"name":"Loyalty Card","type":"string"},{"name":"Loyalty Points","type":"number","format":"#,##0"},{"name":"MOP","type":"string"},{"name":"Override Amount","type":"number","format":"#0.00"},{"name":"Branch Code","type":"string"},{"name":"Branch Email","type":"string"},{"name":"Branch Fax","type":"string"},{"name":"Branch Telephone","type":"string"},{"name":"Branch Town","type":"string"},{"name":"Till","type":"number","format":"#,##0"},{"name":"TPK","type":"number","format":"#0"},{"name":"Transaction Day","type":"date","format":"dd"},{"name":"Transaction Month Description","type":"string"},{"name":"Transaction Year","type":"date","format":"yyyy"}],"documents":[{"values":["Northern England and Ireland","Newcastle and Middlesborough","Sunderland","1520839","Friday","09/01/2009 14:46:20","5","12 Mini ChickenBBQ Bites","1.99","5","9.95","1.37","CHRIS BIRRANE","N","994","Credit Card","0.00","48","Branch048@Acuma.co.uk","01915 234567","01915 123456","Sunderland","1","8","09","January","2009"]},{"values":["Southern England and Wales","South West England","Bristol","1527895","Tuesday","03/04/2007 00:08:36","2","Smart Chicken Fajita wrap","2.99","5","14.95","2.24","HANNAH WALLACE","Y","1,495","Cash","0.00","3","Branch003@Acuma.co.uk","01179 234567","01179 123456","Bristol","1","17","03","April","2007"]},{"values":["Midlands and East","Birmingham and North Midlands","Tamworth","1528766","Thursday","04/06/2009 18:55:19","4","Barbecue Chicken 30g","2.29","2","4.58","1.58","ANN WINTERS","N","458","Store Card","0.00","26","Branch026@Acuma.co.uk","01827 234567","01827 123456","Tamworth","6","36","04","June","2009"]},{"values":["Midlands and East","East Midlands","Newark","1528769","Monday","12/11/2007 10:55:26","1","Chicken Tikka Kebab","5.99","1","5.99","3.71","MARK BOWNES","Y","599","Debit Card","0.00","43","Branch043@Acuma.co.uk","01636 234567","01636 123456","Newark","2","39","12","November","2007"]},{"values":["Southern England and Wales","South East England","Bracknell","1532700","Thursday","05/02/2009 13:36:33","4","Smart Chicken Fajita wrap","2.99","1","2.99","2.24","TONYA HOING","N","299","Credit Card","0.00","30","Branch030@Acuma.co.uk","01344 234567","01344 123456","Bracknell","1","58","05","February","2009"]},{"values":["Southern England and Wales","North Wales","Oswestry","1538583","Thursday","12/04/2007 22:00:49","4","BBQ Chicken and Wedges 450g","5.19","1","5.19","3.68","JOHN FOWLER","N","519","Debit Card","0.00","34","Branch034@Acuma.co.uk","01691 234567","01691 123456","Oswestry","4","74","12","April","2007"]},{"values":["Scotland","Glasgow and SouthWest","Glasgow","1538586","Tuesday","11/12/2007 19:34:42","2","Pasta with Chicken,Smoked Bacon Sweetcorn380g","3.89","4","15.56","2.76","ROBERT CROFTS","N","1,556","Debit Card","0.00","10","Branch010@Acuma.co.uk","01413 234567","01413 123456","Glasgow","3","77","11","December","2007"]},{"values":["Northern England and Ireland","Manchester and Liverpool","Queenstown","1933200","Tuesday","10/07/2007 15:02:10","2","Choice BBQ Chicken and Potato wedges 40g","1.59","1","1.59","0.98","CHARLOTTE FARMER","Y","159","Store Card","0.00","22","Branch022@Acuma.co.uk","02380 234567","02380 123456","Queenstown","4","82","10","July","2007"]},{"values":["Midlands and East","East Anglia","Colchester","1933201","Thursday","12/04/2007 00:13:52","4","Healthy ChickenHotpot 40g","1.19","2","2.38","0.78","DARREN COCKING","N","238","Cash","0.00","32","Branch032@Acuma.co.uk","01206 234567","01206 123456","Colchester","1","83","12","April","2007"]},{"values":["Southern England and Wales","South West England","Bath","1933206","Saturday","08/07/2006 04:48:02","6","Chinese sliced chickenbreast 240g","7.49","4","29.96","4.64","GAVIN SHARP","Y","2,996","Debit Card","0.00","27","Branch027@Acuma.co.uk","01225 234567","01225 123456","Bath","6","88","08","July","2006"]},{"values":["Southern England and Wales","South West England","Falmouth","1933230","Wednesday","05/11/2008 20:28:22","3","Smart Chicken Fajita wrap","2.99","3","8.97","2.24","LEE WALKER","N","897","Debit Card","0.00","35","Branch035@Acuma.co.uk","01320 234567","01320 123456","Falmouth","5","96","05","November","2008"]},{"values":["Southern England and Wales","South East England","Bracknell","1933238","Wednesday","05/11/2008 21:18:49","3","Smart Chicken Fajita wrap","2.99","3","8.97","2.24","ALLISON COWEN","N","897","Cash","0.00","30","Branch030@Acuma.co.uk","01344 234567","01344 123456","Bracknell","2","104","05","November","2008"]},{"values":["Northern England and Ireland","Newcastle and Middlesborough","Sunderland","1933262","Sunday","02/11/2008 15:36:09","7","Dijonaise Chicken Steam Cuisine","4.29","5","21.45","2.83","ANTHONY MURPHY","N","2,145","Cash","0.00","48","Branch048@Acuma.co.uk","01915 234567","01915 123456","Sunderland","2","111","02","November","2008"]},"t":"query"}##** | ||
| 412 | |||
| 413 | [[Crosstab>>doc:Technical Documentation.CXAIR.User Guide.02\. Reporting.2c\. Crosstabs.WebHome]]: | ||
| 414 | |||
| 415 | **[{"name":"994f9ec0-5ccb-1030-8416-d132a8f71a3a","displayName":"Data Warehouse"}] | ||
| 416 | {"filters":{},"filterLabels":{},"rowCount":1,"columnCount":12,"rowLabels":["2010"],"columnLabels":["January","February","March","April","May","June","July","August","September","October","November","December"],"aggregationLabels":["Revenue"],"conditionalFormat":{},"values":{"[0,8]":["140548"],",10":["134899"],"[0,7]":["139758"],",11":["138651"],"[0,5]":["132704"],"[0,6]":["139609"],"0,":["1675321"],",":["1675321"],"[0,11]":["138651"],"[0,1]":["138275"],",3":["132966"],"[0,2]":["141675"],",2":["141675"],"[0,3]":["132966"],",1":["138275"],"[0,0]":["155377"],"[0,10]":["134899"],",0":["155377"],",7":["139758"],",6":["139609"],",5":["132704"],"[0,9]":["141859"],",4":["138998"],"[0,4]":["138998"],",9":["141859"],",8":["140548"]},"valueLabels":{"[0,8]":["140,548"],",10":["134,899"],"[0,7]":["139,758"],",11":["138,651"],"[0,5]":["132,704"],"[0,6]":["139,609"],"0,":["1,675,321"],",":["1,675,321"],"[0,11]":["138,651"],"[0,1]":["138,275"],",3":["132,966"],"[0,2]":["141,675"],",2":["141,675"],"[0,3]":["132,966"],",1":["138,275"],"[0,0]":["155,377"],"[0,10]":["134,899"],",0":["155,377"],",7":["139,758"],",6":["139,609"],",5":["132,704"],"[0,9]":["141,859"],",4":["138,998"],"[0,4]":["138,998"],",9":["141,859"],",8":["140,548"]}}** | ||
| 417 | |||
| 418 | = Run Query = | ||
| 419 | |||
| 420 | This web service runs a [[Query>>doc:Technical Documentation.CXAIR.User Guide.02\. Reporting.2a\. Query.WebHome]], returning the results in a JSON format. | ||
| 421 | |||
| 422 | == URL == | ||
| 423 | |||
| 424 | **/rest/runQuery/<SessionID>/<SearchEngine>/<Index>** | ||
| 425 | |||
| 426 | == Parameters == | ||
| 427 | |||
| 428 | (% border="1" cellspacing="0" style="border-collapse:collapse; border:1pt solid windowtext; width:1024px" class="MsoTableGrid" %) | ||
| 429 | |(% width="128" style="background-color:#ed7d31; background:#ed7d31; border-style:solid; border-width:1pt; width:230px" %)((( | ||
| 430 | (% style="padding:0cm 5.4pt 0cm 5.4pt" %) | ||
| 431 | (% style="color:white" %)Parameter Name | ||
| 432 | )))|(% width="102" style="background-color:#ed7d31; background:#ed7d31; border-bottom-style:solid; border-bottom-width:1pt; border-left:1pt solid; border-right-style:solid; border-right-width:1pt; border-top-style:solid; border-top-width:1pt; width:144px" %)((( | ||
| 433 | (% style="padding:0cm 5.4pt 0cm 5.4pt" %) | ||
| 434 | (% style="color:white" %)Mandatory | ||
| 435 | )))|(% width="335" style="background-color:#ed7d31; background:#ed7d31; border-bottom-style:solid; border-bottom-width:1pt; border-left:1pt solid; border-right-style:solid; border-right-width:1pt; border-top-style:solid; border-top-width:1pt; width:642px" %)((( | ||
| 436 | (% style="padding:0cm 5.4pt 0cm 5.4pt" %) | ||
| 437 | (% style="color:white" %)Description | ||
| 438 | ))) | ||
| 439 | |(% width="128" style="border-style:none solid solid; border-top-color:initial; border-width:1pt; width:230px" %)((( | ||
| 440 | (% style="padding:0cm 5.4pt 0cm 5.4pt" %) | ||
| 441 | query | ||
| 442 | )))|(% width="102" style="border-bottom:1pt solid windowtext; border-left:none; border-right:1pt solid windowtext; border-top:none; width:144px" %)((( | ||
| 443 | (% style="padding:0cm 5.4pt 0cm 5.4pt" %) | ||
| 444 | Y | ||
| 445 | )))|(% width="335" style="border-bottom:1pt solid windowtext; border-left:none; border-right:1pt solid windowtext; border-top:none; width:642px" %)((( | ||
| 446 | (% style="padding:0cm 5.4pt 0cm 5.4pt" %) | ||
| 447 | The query to execute against the specified Index. | ||
| 448 | ))) | ||
| 449 | |(% width="128" style="border-style:none solid solid; border-top-color:initial; border-width:1pt; width:230px" %)((( | ||
| 450 | (% style="padding:0cm 5.4pt 0cm 5.4pt" %) | ||
| 451 | page | ||
| 452 | )))|(% width="102" style="border-bottom:1pt solid windowtext; border-left:none; border-right:1pt solid windowtext; border-top:none; width:144px" %)((( | ||
| 453 | (% style="padding:0cm 5.4pt 0cm 5.4pt" %) | ||
| 454 | N | ||
| 455 | )))|(% width="335" style="border-bottom:1pt solid windowtext; border-left:none; border-right:1pt solid windowtext; border-top:none; width:642px" %)((( | ||
| 456 | (% style="padding:0cm 5.4pt 0cm 5.4pt" %) | ||
| 457 | The page number to return results for. | ||
| 458 | ))) | ||
| 459 | |(% width="128" style="border-style:none solid solid; border-top-color:initial; border-width:1pt; width:230px" %)((( | ||
| 460 | (% style="padding:0cm 5.4pt 0cm 5.4pt" %) | ||
| 461 | pageSize | ||
| 462 | )))|(% width="102" style="border-bottom:1pt solid windowtext; border-left:none; border-right:1pt solid windowtext; border-top:none; width:144px" %)((( | ||
| 463 | (% style="padding:0cm 5.4pt 0cm 5.4pt" %) | ||
| 464 | N | ||
| 465 | )))|(% width="335" style="border-bottom:1pt solid windowtext; border-left:none; border-right:1pt solid windowtext; border-top:none; width:642px" %)((( | ||
| 466 | (% style="padding:0cm 5.4pt 0cm 5.4pt" %) | ||
| 467 | The size of the page output. | ||
| 468 | ))) | ||
| 469 | |(% width="128" style="border-style:none solid solid; border-top-color:initial; border-width:1pt; width:230px" %)((( | ||
| 470 | (% style="padding:0cm 5.4pt 0cm 5.4pt" %) | ||
| 471 | report | ||
| 472 | )))|(% width="102" style="border-bottom:1pt solid windowtext; border-left:none; border-right:1pt solid windowtext; border-top:none; width:144px" %)((( | ||
| 473 | (% style="padding:0cm 5.4pt 0cm 5.4pt" %) | ||
| 474 | N | ||
| 475 | )))|(% width="335" style="border-bottom:1pt solid windowtext; border-left:none; border-right:1pt solid windowtext; border-top:none; width:642px" %)((( | ||
| 476 | (% style="padding:0cm 5.4pt 0cm 5.4pt" %) | ||
| 477 | The GUID of the report to run. | ||
| 478 | ))) | ||
| 479 | |(% width="128" style="border-style:none solid solid; border-top-color:initial; border-width:1pt; width:230px" %)((( | ||
| 480 | (% style="padding:0cm 5.4pt 0cm 5.4pt" %) | ||
| 481 | sort | ||
| 482 | )))|(% width="102" style="border-bottom:1pt solid windowtext; border-left:none; border-right:1pt solid windowtext; border-top:none; width:144px" %)((( | ||
| 483 | (% style="padding:0cm 5.4pt 0cm 5.4pt" %) | ||
| 484 | N | ||
| 485 | )))|(% width="335" style="border-bottom:1pt solid windowtext; border-left:none; border-right:1pt solid windowtext; border-top:none; width:642px" %)((( | ||
| 486 | (% style="padding:0cm 5.4pt 0cm 5.4pt" %) | ||
| 487 | List of display fields to order the results. | ||
| 488 | ))) | ||
| 489 | |(% width="128" style="border-style:none solid solid; border-top-color:initial; border-width:1pt; width:230px" %)((( | ||
| 490 | (% style="padding:0cm 5.4pt 0cm 5.4pt" %) | ||
| 491 | sortDir | ||
| 492 | )))|(% width="102" style="border-bottom:1pt solid windowtext; border-left:none; border-right:1pt solid windowtext; border-top:none; width:144px" %)((( | ||
| 493 | (% style="padding:0cm 5.4pt 0cm 5.4pt" %) | ||
| 494 | N | ||
| 495 | )))|(% width="335" style="border-bottom:1pt solid windowtext; border-left:none; border-right:1pt solid windowtext; border-top:none; width:642px" %)((( | ||
| 496 | (% style="padding:0cm 5.4pt 0cm 5.4pt" %) | ||
| 497 | List of either “asc” or “desc” in the same order as <sort>. | ||
| 498 | ))) | ||
| 499 | |(% width="128" style="border-style:none solid solid; border-top-color:initial; border-width:1pt; width:230px" %)((( | ||
| 500 | (% style="padding:0cm 5.4pt 0cm 5.4pt" %) | ||
| 501 | displayField | ||
| 502 | )))|(% width="102" style="border-bottom:1pt solid windowtext; border-left:none; border-right:1pt solid windowtext; border-top:none; width:144px" %)((( | ||
| 503 | (% style="padding:0cm 5.4pt 0cm 5.4pt" %) | ||
| 504 | N | ||
| 505 | )))|(% width="335" style="border-bottom:1pt solid windowtext; border-left:none; border-right:1pt solid windowtext; border-top:none; width:642px" %)((( | ||
| 506 | (% style="padding:0cm 5.4pt 0cm 5.4pt" %) | ||
| 507 | List of display fields to return. | ||
| 508 | ))) | ||
| 509 | |||
| 510 | == Returns == | ||
| 511 | |||
| 512 | Returns the query execution in the following format: | ||
| 513 | |||
| 514 | **{ | ||
| 515 | hits: Integer, | ||
| 516 | headers: [{ | ||
| 517 | name: String, | ||
| 518 | type: String,format: String | ||
| 519 | }], | ||
| 520 | documents: [{ | ||
| 521 | values: [String] | ||
| 522 | }] | ||
| 523 | }** | ||
| 524 | |||
| 525 | == Example Output == | ||
| 526 | |||
| 527 | **{"t":"query","j":{"hits":139492,"headers":[{"name":"Area Name","type":"string"},{"name":"Branch Address","type":"string"},{"name":"Branch Code","type":"string"},{"name":"Branch Email","type":"string"},{"name":"Branch Fax","type":"string"},{"name":"Branch Name","type":"string"},{"name":"Branch Postcode","type":"string"},{"name":"Branch Telephone","type":"string"},{"name":"Branch Town","type":"string"},{"name":"Cost Price","type":"number","format":"#0.000"},{"name":"Currency Sale Price","type":"number","format":"#0.000"},{"name":"Day of Week","type":"number","format":"#0"},{"name":"Employee Name","type":"string"},{"name":"Has Discounts","type":"string"},{"name":"Has Overrides","type":"string"},{"name":"Has Returns","type":"string"},{"name":"Is Return","type":"string"},{"name":"Loyalty Card","type":"string"},{"name":"Loyalty Points","type":"number","format":"#0"},{"name":"MOP","type":"string"},{"name":"Override Amount","type":"number","format":"#0.000"},{"name":"Product Description","type":"string"},{"name":"Profit","type":"number","format":"#0.000"},{"name":"Quantity","type":"number","format":"#0"},{"name":"Region Name","type":"string"},{"name":"Sale Price","type":"number","format":"#0.00"},{"name":"Sale Price 4","type":"number","format":"#0.00"},{"name":"Till","type":"number","format":"#0"},{"name":"Time","type":"date","format":"HH:mm:ss"},{"name":"TPK","type":"number","format":"#0"},{"name":"Transaction Date","type":"date","format":"dd/MM/yyyy"},{"name":"Transaction Date Time","type":"date","format":"dd/MM/yyyy HH:mm:ss"},{"name":"Transaction Hour","type":"date","format":"HH"},{"name":"Transaction ID","type":"string"},{"name":"Transaction Month","type":"date","format":"MMM"},{"name":"Transaction Month 2","type":"date","format":"MMMM"},{"name":"Transaction Price","type":"number","format":"#0.00"},{"name":"Transaction Week","type":"date","format":"w"},{"name":"Transaction Date","type":"date","format":"dd/MM/yyyy"},{"name":"Transaction Dateextra","type":"date","format":"(EEE) dd/MM"},{"name":"Transaction Date Month Description","type":"string"},{"name":"New Transaction Date","type":"date","format":"HH"}], 234567","Bristol","BS1 3EZ","01179 123456","Bristol","2.240","2.990","2 Wales","2.99","2.99","1","00:08:00","17","03/04/2009","03/04/2009 00:08:00","00","1527895","Apr","April","14.95","13","03/04/2009","(Fri) 03/04","April","00"]},{"values":["Birmingham and North Midlands","82 Birmingham Rd","26","Branch026@Acuma.co.uk","01827 234567","Tamworth","DE11 1AZ","01827 123456","Tamworth","1.580","2.290","4","ANN WINTERS","0","0","0","0","N","458","Store Card","0.000","Barbecue Chicken 30g","0.710","2","Midlands and East","2.29","2.29","6","18:55:00","36","04/06/2011","04/06/2011 18:55:00","18","1528766","Jun","June","4.58","21","04/06/2011","(Sat) 04/06","June","18"]}],"t":"query"}}** | ||
| 528 | |||
| 529 | = Load Report = | ||
| 530 | |||
| 531 | This web service allows an application or web page to initialise a [[CXAIR>>doc:Technical Documentation.CXAIR.WebHome]] report by using the currently authenticated session. When the current session is invalid, launching the report will redirect the client to the standard login page, before forwarding them on to the target report. | ||
| 532 | |||
| 533 | == URL == | ||
| 534 | |||
| 535 | **/jsp/index.jsp?loadReport=<GUID>&search=<Search String>** | ||
| 536 | |||
| 537 | == Parameters == | ||
| 538 | |||
| 539 | Passed in as part of the URL. | ||
| 540 | |||
| 541 | == Returns == | ||
| 542 | |||
| 543 | Specific report or [[Query>>doc:Technical Documentation.CXAIR.User Guide.02\. Reporting.2a\. Query.WebHome]]. | ||
| 544 | |||
| 545 | == Example Output == | ||
| 546 | |||
| 547 | **[{"name":"994f9ec0-5ccb-1030-8416-d132a8f71a3a","displayName":"Data Warehouse"}] | ||
| 548 | {"filters":{},"filterLabels":{},"rowCount":1,"columnCount":12,"rowLabels":["2010"],"columnLabels":["January","February","March","April","May","June","July","August","September","October","November","December"],"aggregationLabels":["Revenue"],"conditionalFormat":{},"values":{"[0,8]":["140548"],",10":["134899"],"[0,7]":["139758"],",11":["138651"],"[0,5]":["132704"],"[0,6]":["139609"],"0,":["1675321"],",":["1675321"],"[0,11]":["138651"],"[0,1]":["138275"],",3":["132966"],"[0,2]":["141675"],",2":["141675"],"[0,3]":["132966"],",1":["138275"],"[0,0]":["155377"],"[0,10]":["134899"],",0":["155377"],",7":["139758"],",6":["139609"],",5":["132704"],"[0,9]":["141859"],",4":["138998"],"[0,4]":["138998"],",9":["141859"],",8":["140548"]},"valueLabels":{"[0,8]":["140,548"],",10":["134,899"],"[0,7]":["139,758"],",11":["138,651"],"[0,5]":["132,704"],"[0,6]":["139,609"],"0,":["1,675,321"],",":["1,675,321"],"[0,11]":["138,651"],"[0,1]":["138,275"],",3":["132,966"],"[0,2]":["141,675"],",2":["141,675"],"[0,3]":["132,966"],",1":["138,275"],"[0,0]":["155,377"],"[0,10]":["134,899"],",0":["155,377"],",7":["139,758"],",6":["139,609"],",5":["132,704"],"[0,9]":["141,859"],",4":["138,998"],"[0,4]":["138,998"],",9":["141,859"],",8":["140,548"]}}** | ||
| 549 | |||
| 550 | = Produce JSON from Report = | ||
| 551 | |||
| 552 | == URL == | ||
| 553 | |||
| 554 | /servlet/secure/JSONServlet?guid=<Report GUID>&from=<From Page>&to=<To Page> | ||
| 555 | |||
| 556 | == Parameters == | ||
| 557 | |||
| 558 | Passed in as part of the URL. | ||
| 559 | |||
| 560 | == Returns == | ||
| 561 | |||
| 562 | Returns a Crosstab or Query report in JavaScript Object Notation (JSON). | ||
| 563 | |||
| 564 | == Example Output == | ||
| 565 | |||
| 566 | **{"grandtotals":[46099.14999999886],"suffixes":["",null,null],"data":{"rows":[{"row":{"columns":74000000001,"rownumber":0}}]},"aggregationlabels":["![total]"],"rowsize":1,"rowlabels":["Birmingham"],"columnlabels":["2011","2012","2013","2014","2015"],"aggregationdisplayfields":"Line_Price","queryname":"BirminghamYearlySalesJS","rowtotals":14999999886,"version":"2019.1.058","dataformats":["#,##0.00"],"filter":"*:*","prefixes":["£",null,null],"columntotals":74000000001,"columnsize":5,"modified":"Fri Feb 01 09:59:45 GMT 2019","aggregations":1}##** | ||
| 567 | |||
| 568 | = Error Codes = | ||
| 569 | |||
| 570 | (% border="1" cellspacing="0" style="border-collapse:collapse; border:1pt solid windowtext; width:1024px" class="MsoTableGrid" %) | ||
| 571 | |(% width="185" style="background-color:#ed7d31; background:#ed7d31; border-style:solid; border-width:1pt; width:223px" %)((( | ||
| 572 | (% style="padding:0cm 5.4pt 0cm 5.4pt" %) | ||
| 573 | (% style="color:white" %)Error Code | ||
| 574 | )))|(% width="190" style="background-color:#ed7d31; background:#ed7d31; border-bottom-style:solid; border-bottom-width:1pt; border-left:1pt solid; border-right-style:solid; border-right-width:1pt; border-top-style:solid; border-top-width:1pt; width:133px" %)((( | ||
| 575 | (% style="padding:0cm 5.4pt 0cm 5.4pt" %) | ||
| 576 | (% style="color:white" %)Name | ||
| 577 | )))|(% width="191" style="background-color:#ed7d31; background:#ed7d31; border-bottom-style:solid; border-bottom-width:1pt; border-left:1pt solid; border-right-style:solid; border-right-width:1pt; border-top-style:solid; border-top-width:1pt; width:648px" %)((( | ||
| 578 | (% style="padding:0cm 5.4pt 0cm 5.4pt" %) | ||
| 579 | (% style="color:white" %)Description | ||
| 580 | ))) | ||
| 581 | |(% width="185" style="border-style:none solid solid; border-top-color:initial; border-width:1pt; width:223px" %)((( | ||
| 582 | (% style="padding:0cm 5.4pt 0cm 5.4pt" %) | ||
| 583 | CXAIR-000 | ||
| 584 | )))|(% width="190" style="border-bottom:1pt solid windowtext; border-left:none; border-right:1pt solid windowtext; border-top:none; width:133px" %)((( | ||
| 585 | (% style="padding:0cm 5.4pt 0cm 5.4pt" %) | ||
| 586 | Unknown error | ||
| 587 | )))|(% width="191" style="border-bottom:1pt solid windowtext; border-left:none; border-right:1pt solid windowtext; border-top:none; width:648px" %)((( | ||
| 588 | (% style="padding:0cm 5.4pt 0cm 5.4pt" %) | ||
| 589 | Catch-all error code. Further information will be found in the CXAIR log. | ||
| 590 | ))) | ||
| 591 | |(% width="185" style="border-style:none solid solid; border-top-color:initial; border-width:1pt; width:223px" %)((( | ||
| 592 | (% style="padding:0cm 5.4pt 0cm 5.4pt" %) | ||
| 593 | CXAIR-001 | ||
| 594 | )))|(% width="190" style="border-bottom:1pt solid windowtext; border-left:none; border-right:1pt solid windowtext; border-top:none; width:133px" %)((( | ||
| 595 | (% style="padding:0cm 5.4pt 0cm 5.4pt" %) | ||
| 596 | Invalid session | ||
| 597 | )))|(% width="191" style="border-bottom:1pt solid windowtext; border-left:none; border-right:1pt solid windowtext; border-top:none; width:648px" %)((( | ||
| 598 | (% style="padding:0cm 5.4pt 0cm 5.4pt" %) | ||
| 599 | A secure web service has been called with an invalid SessionID parameter. | ||
| 600 | ))) | ||
| 601 | |(% width="185" style="border-style:none solid solid; border-top-color:initial; border-width:1pt; width:223px" %)((( | ||
| 602 | (% style="padding:0cm 5.4pt 0cm 5.4pt" %) | ||
| 603 | CXAIR-002 | ||
| 604 | )))|(% width="190" style="border-bottom:1pt solid windowtext; border-left:none; border-right:1pt solid windowtext; border-top:none; width:133px" %)((( | ||
| 605 | (% style="padding:0cm 5.4pt 0cm 5.4pt" %) | ||
| 606 | Unknown user | ||
| 607 | )))|(% width="191" style="border-bottom:1pt solid windowtext; border-left:none; border-right:1pt solid windowtext; border-top:none; width:648px" %)((( | ||
| 608 | (% style="padding:0cm 5.4pt 0cm 5.4pt" %) | ||
| 609 | Authentication failed as the user is unknown to CXAIR. | ||
| 610 | ))) | ||
| 611 | |(% width="185" style="border-style:none solid solid; border-top-color:initial; border-width:1pt; width:223px" %)((( | ||
| 612 | (% style="padding:0cm 5.4pt 0cm 5.4pt" %) | ||
| 613 | CXAIR-003 | ||
| 614 | )))|(% width="190" style="border-bottom:1pt solid windowtext; border-left:none; border-right:1pt solid windowtext; border-top:none; width:133px" %)((( | ||
| 615 | (% style="padding:0cm 5.4pt 0cm 5.4pt" %) | ||
| 616 | Unauthorised | ||
| 617 | )))|(% width="191" style="border-bottom:1pt solid windowtext; border-left:none; border-right:1pt solid windowtext; border-top:none; width:648px" %)((( | ||
| 618 | (% style="padding:0cm 5.4pt 0cm 5.4pt" %) | ||
| 619 | The user could not be authenticated or they do not have the required permissions to perform the requested action. | ||
| 620 | ))) | ||
| 621 | |(% width="185" style="border-style:none solid solid; border-top-color:initial; border-width:1pt; width:223px" %)((( | ||
| 622 | (% style="padding:0cm 5.4pt 0cm 5.4pt" %) | ||
| 623 | CXAIR-004 | ||
| 624 | )))|(% width="190" style="border-bottom:1pt solid windowtext; border-left:none; border-right:1pt solid windowtext; border-top:none; width:133px" %)((( | ||
| 625 | (% style="padding:0cm 5.4pt 0cm 5.4pt" %) | ||
| 626 | Unauthorised (third Party) | ||
| 627 | )))|(% width="191" style="border-bottom:1pt solid windowtext; border-left:none; border-right:1pt solid windowtext; border-top:none; width:648px" %)((( | ||
| 628 | (% style="padding:0cm 5.4pt 0cm 5.4pt" %) | ||
| 629 | Third-party authentication failed. | ||
| 630 | ))) | ||
| 631 | |(% width="185" style="border-style:none solid solid; border-top-color:initial; border-width:1pt; width:223px" %)((( | ||
| 632 | (% style="padding:0cm 5.4pt 0cm 5.4pt" %) | ||
| 633 | CXAIR-100 | ||
| 634 | )))|(% width="190" style="border-bottom:1pt solid windowtext; border-left:none; border-right:1pt solid windowtext; border-top:none; width:133px" %)((( | ||
| 635 | (% style="padding:0cm 5.4pt 0cm 5.4pt" %) | ||
| 636 | Invalid search engine | ||
| 637 | )))|(% width="191" style="border-bottom:1pt solid windowtext; border-left:none; border-right:1pt solid windowtext; border-top:none; width:648px" %)((( | ||
| 638 | (% style="padding:0cm 5.4pt 0cm 5.4pt" %) | ||
| 639 | The search engine parameter was invalid. | ||
| 640 | ))) | ||
| 641 | |(% width="185" style="border-style:none solid solid; border-top-color:initial; border-width:1pt; width:223px" %)((( | ||
| 642 | (% style="padding:0cm 5.4pt 0cm 5.4pt" %) | ||
| 643 | CXAIR-101 | ||
| 644 | )))|(% width="190" style="border-bottom:1pt solid windowtext; border-left:none; border-right:1pt solid windowtext; border-top:none; width:133px" %)((( | ||
| 645 | (% style="padding:0cm 5.4pt 0cm 5.4pt" %) | ||
| 646 | Invalid index | ||
| 647 | )))|(% width="191" style="border-bottom:1pt solid windowtext; border-left:none; border-right:1pt solid windowtext; border-top:none; width:648px" %)((( | ||
| 648 | (% style="padding:0cm 5.4pt 0cm 5.4pt" %) | ||
| 649 | The index parameter was invalid. | ||
| 650 | ))) | ||
| 651 | |(% width="185" style="border-style:none solid solid; border-top-color:initial; border-width:1pt; width:223px" %)((( | ||
| 652 | (% style="padding:0cm 5.4pt 0cm 5.4pt" %) | ||
| 653 | CXAIR-102 | ||
| 654 | )))|(% width="190" style="border-bottom:1pt solid windowtext; border-left:none; border-right:1pt solid windowtext; border-top:none; width:133px" %)((( | ||
| 655 | (% style="padding:0cm 5.4pt 0cm 5.4pt" %) | ||
| 656 | Invalid data source group | ||
| 657 | )))|(% width="191" style="border-bottom:1pt solid windowtext; border-left:none; border-right:1pt solid windowtext; border-top:none; width:648px" %)((( | ||
| 658 | (% style="padding:0cm 5.4pt 0cm 5.4pt" %) | ||
| 659 | The data source group parameter was invalid. | ||
| 660 | ))) | ||
| 661 | |(% width="185" style="border-style:none solid solid; border-top-color:initial; border-width:1pt; width:223px" %)((( | ||
| 662 | (% style="padding:0cm 5.4pt 0cm 5.4pt" %) | ||
| 663 | CXAIR-103 | ||
| 664 | )))|(% width="190" style="border-bottom:1pt solid windowtext; border-left:none; border-right:1pt solid windowtext; border-top:none; width:133px" %)((( | ||
| 665 | (% style="padding:0cm 5.4pt 0cm 5.4pt" %) | ||
| 666 | Invalid report type | ||
| 667 | )))|(% width="191" style="border-bottom:1pt solid windowtext; border-left:none; border-right:1pt solid windowtext; border-top:none; width:648px" %)((( | ||
| 668 | (% style="padding:0cm 5.4pt 0cm 5.4pt" %) | ||
| 669 | The run report web service was called with a report that was not a query or a Crosstab. | ||
| 670 | ))) |