|
| 1 | +openapi: 3.0.0 |
| 2 | +info: |
| 3 | + title: Search suggestion and saved query service |
| 4 | + version: "1.0" |
| 5 | + description: |- |
| 6 | + The suggestions service supports the search user experience by providing |
| 7 | + interactive suggestions for queries. It also manages saved queries. |
| 8 | +
|
| 9 | + Like the search service, there are two versions of suggestions: |
| 10 | + Log Search (v1) and Expert Mode Search (v2). |
| 11 | +
|
| 12 | + API support for v1 is limited to support necessary for conversion to v2. |
| 13 | + contact: |
| 14 | + name: Contact your Alert Logic customer service representative |
| 15 | +servers: |
| 16 | + - url: "https://api.cloudinsight.alertlogic.com" |
| 17 | + description: us-production |
| 18 | + x-alertlogic-session-endpoint: true |
| 19 | + - url: "https://api.cloudinsight.alertlogic.co.uk" |
| 20 | + description: uk-production |
| 21 | + x-alertlogic-session-endpoint: true |
| 22 | + - url: "https://api.product.dev.alertlogic.com" |
| 23 | + description: integration |
| 24 | + x-alertlogic-session-endpoint: true |
| 25 | +paths: |
| 26 | + "/suggestions/v1/{account_id}/queries": |
| 27 | + parameters: |
| 28 | + - $ref: "#/components/parameters/account_id" |
| 29 | + post: |
| 30 | + summary: Create a Saved Log Search Query |
| 31 | + operationId: create_saved_log_search |
| 32 | + responses: |
| 33 | + "201": |
| 34 | + $ref: "#/components/responses/SavedLogSearchList" |
| 35 | + "401": |
| 36 | + $ref: "#/components/responses/AIMSUnauthorized" |
| 37 | + "403": |
| 38 | + $ref: "#/components/responses/AIMSForbidden" |
| 39 | + get: |
| 40 | + summary: List Saved Log Searches |
| 41 | + operationId: list_saved_log_searches |
| 42 | + responses: |
| 43 | + "201": |
| 44 | + $ref: "#/components/responses/SavedLogSearchList" |
| 45 | + "401": |
| 46 | + $ref: "#/components/responses/AIMSUnauthorized" |
| 47 | + "403": |
| 48 | + $ref: "#/components/responses/AIMSForbidden" |
| 49 | + "/suggestions/v1/{account_id}/queries/{saved_search_id}": |
| 50 | + parameters: |
| 51 | + - $ref: "#/components/parameters/account_id" |
| 52 | + - $ref: "#/components/parameters/saved_search_id" |
| 53 | + get: |
| 54 | + summary: Get Saved Log Search |
| 55 | + operationId: get_saved_log_search |
| 56 | + responses: |
| 57 | + "201": |
| 58 | + $ref: "#/components/responses/SavedLogSearch" |
| 59 | + "401": |
| 60 | + $ref: "#/components/responses/AIMSUnauthorized" |
| 61 | + "403": |
| 62 | + $ref: "#/components/responses/AIMSForbidden" |
| 63 | + "404": |
| 64 | + description: "No log search exists with this ID" |
| 65 | + $ref: "#/components/responses/DescriptiveError" |
| 66 | + "/suggestions/v2/{account_id}/queries": |
| 67 | + parameters: |
| 68 | + - $ref: "#/components/parameters/account_id" |
| 69 | + get: |
| 70 | + summary: List Search Saved Queries |
| 71 | + operationId: list_saved_searches |
| 72 | + responses: |
| 73 | + "201": |
| 74 | + $ref: "#/components/responses/SavedLogSearchList" |
| 75 | + "401": |
| 76 | + $ref: "#/components/responses/AIMSUnauthorized" |
| 77 | + "403": |
| 78 | + $ref: "#/components/responses/AIMSForbidden" |
| 79 | + post: |
| 80 | + summary: Create a Saved Search Query |
| 81 | + operationId: create_saved_search |
| 82 | + requestBody: |
| 83 | + content: |
| 84 | + application/json: |
| 85 | + schema: |
| 86 | + $ref: "#/components/schemas/SavedSearch" |
| 87 | + responses: |
| 88 | + "201": |
| 89 | + $ref: "#/components/responses/SavedLogSearch" |
| 90 | + "401": |
| 91 | + $ref: "#/components/responses/AIMSUnauthorized" |
| 92 | + "403": |
| 93 | + $ref: "#/components/responses/AIMSForbidden" |
| 94 | + "/suggestions/v2/{account_id}/queries/{saved_search_id}": |
| 95 | + parameters: |
| 96 | + - $ref: "#/components/parameters/account_id" |
| 97 | + - $ref: "#/components/parameters/saved_search_id" |
| 98 | + get: |
| 99 | + summary: Get Saved Search Query |
| 100 | + operationId: get_saved_search |
| 101 | + responses: |
| 102 | + "201": |
| 103 | + $ref: "#/components/responses/SavedLogSearch" |
| 104 | + "401": |
| 105 | + $ref: "#/components/responses/AIMSUnauthorized" |
| 106 | + "403": |
| 107 | + $ref: "#/components/responses/AIMSForbidden" |
| 108 | + "404": |
| 109 | + description: "No search exists with this ID" |
| 110 | + $ref: "#/components/responses/DescriptiveError" |
| 111 | + post: |
| 112 | + summary: Update a Saved Search Query |
| 113 | + operationId: update_saved_search |
| 114 | + requestBody: |
| 115 | + content: |
| 116 | + application/json: |
| 117 | + schema: |
| 118 | + type: object |
| 119 | + properties: |
| 120 | + name: |
| 121 | + type: string |
| 122 | + description: |
| 123 | + type: string |
| 124 | + search_request: |
| 125 | + type: string |
| 126 | + migration: |
| 127 | + type: object |
| 128 | + responses: |
| 129 | + "201": |
| 130 | + $ref: "#/components/responses/SavedLogSearch" |
| 131 | + "401": |
| 132 | + $ref: "#/components/responses/AIMSUnauthorized" |
| 133 | + "403": |
| 134 | + $ref: "#/components/responses/AIMSForbidden" |
| 135 | + "404": |
| 136 | + description: "No search exists with this ID" |
| 137 | + $ref: "#/components/responses/DescriptiveError" |
| 138 | + "/suggestions/v1/{account_id}/translate": |
| 139 | + parameters: |
| 140 | + - $ref: "#/components/parameters/account_id" |
| 141 | + post: |
| 142 | + summary: Translate a Saved Log Search Query |
| 143 | + operationId: translate_log_search_query |
| 144 | + responses: |
| 145 | + "201": |
| 146 | + $ref: "#/components/responses/SavedLogSearch" |
| 147 | + "400": |
| 148 | + description: "Unable to convert query" |
| 149 | + "401": |
| 150 | + $ref: "#/components/responses/AIMSUnauthorized" |
| 151 | + "403": |
| 152 | + $ref: "#/components/responses/AIMSForbidden" |
| 153 | + requestBody: |
| 154 | + content: |
| 155 | + application/json: |
| 156 | + schema: |
| 157 | + type: object |
| 158 | + properties: |
| 159 | + options: |
| 160 | + type: object |
| 161 | + search_request: |
| 162 | + type: object |
| 163 | +components: |
| 164 | + schemas: |
| 165 | + AccountId: |
| 166 | + description: The AIMS Account ID |
| 167 | + pattern: "[0-9]+" |
| 168 | + title: Account ID |
| 169 | + type: string |
| 170 | + Created: |
| 171 | + title: Created |
| 172 | + type: object |
| 173 | + readOnly: true |
| 174 | + properties: |
| 175 | + at: |
| 176 | + $ref: "#/components/schemas/Timestamp" |
| 177 | + by: |
| 178 | + description: User ID that Created the Object |
| 179 | + type: string |
| 180 | + DataType: |
| 181 | + title: DataType |
| 182 | + description: The data type being searched, that a particular message belongs to, or detected in a query. |
| 183 | + type: string |
| 184 | + example: logmsgs |
| 185 | + Description: |
| 186 | + title: Description |
| 187 | + type: string |
| 188 | + Error: |
| 189 | + title: Error |
| 190 | + type: object |
| 191 | + properties: |
| 192 | + attribute: |
| 193 | + type: string |
| 194 | + error_text: |
| 195 | + type: string |
| 196 | + error_type: |
| 197 | + type: string |
| 198 | + ErrorInfo: |
| 199 | + type: object |
| 200 | + properties: |
| 201 | + code: |
| 202 | + type: string |
| 203 | + description: |
| 204 | + type: string |
| 205 | + error_id: |
| 206 | + type: string |
| 207 | + ErrorList: |
| 208 | + type: array |
| 209 | + items: |
| 210 | + $ref: "#/components/schemas/Error" |
| 211 | + GroupId: |
| 212 | + title: Log Search Saved Search Group ID |
| 213 | + type: string |
| 214 | + format: integer |
| 215 | + LogSearchQuery: |
| 216 | + title: LogSearchQuery |
| 217 | + description: Log Search (v1) query |
| 218 | + type: object |
| 219 | + Migration: |
| 220 | + title: Saved Search migration metadata |
| 221 | + description: Opaque record used to store data during query migration |
| 222 | + type: object |
| 223 | + Modified: |
| 224 | + title: Modified |
| 225 | + properties: |
| 226 | + at: |
| 227 | + $ref: "#/components/schemas/Timestamp" |
| 228 | + by: |
| 229 | + description: User ID of the Last User that Modified the Object |
| 230 | + type: string |
| 231 | + type: object |
| 232 | + SavedLogSearch: |
| 233 | + type: object |
| 234 | + properties: |
| 235 | + account_id: |
| 236 | + $ref: "#/components/schemas/AccountId" |
| 237 | + created: |
| 238 | + $ref: "#/components/schemas/Created" |
| 239 | + data_type: |
| 240 | + $ref: "#/components/schemas/DataType" |
| 241 | + deleted: |
| 242 | + type: boolean |
| 243 | + description: |
| 244 | + $ref: "#/components/schemas/Description" |
| 245 | + group_id: |
| 246 | + $ref: "#/components/schemas/GroupId" |
| 247 | + id: |
| 248 | + $ref: "#/components/schemas/SearchUuid" |
| 249 | + modified: |
| 250 | + $ref: "#/components/schemas/Modified" |
| 251 | + name: |
| 252 | + $ref: "#/components/schemas/SavedSearchName" |
| 253 | + search_request: |
| 254 | + $ref: "#/components/schemas/LogSearchQuery" |
| 255 | + SavedSearch: |
| 256 | + type: object |
| 257 | + additionalProperties: false |
| 258 | + properties: |
| 259 | + account_id: |
| 260 | + $ref: "#/components/schemas/AccountId" |
| 261 | + created: |
| 262 | + $ref: "#/components/schemas/Created" |
| 263 | + data_type: |
| 264 | + $ref: "#/components/schemas/DataType" |
| 265 | + deleted: |
| 266 | + type: boolean |
| 267 | + description: |
| 268 | + $ref: "#/components/schemas/Description" |
| 269 | + id: |
| 270 | + $ref: "#/components/schemas/SearchUuid" |
| 271 | + migration: |
| 272 | + $ref: "#/components/schemas/Migration" |
| 273 | + modified: |
| 274 | + $ref: "#/components/schemas/Modified" |
| 275 | + name: |
| 276 | + $ref: "#/components/schemas/SavedSearchName" |
| 277 | + search_request: |
| 278 | + $ref: "#/components/schemas/SearchQuery" |
| 279 | + tags: |
| 280 | + $ref: "#/components/schemas/Tags" |
| 281 | + required: |
| 282 | + - data_type |
| 283 | + - description |
| 284 | + - name |
| 285 | + - search_request |
| 286 | + SavedSearchName: |
| 287 | + title: Saved Search Name |
| 288 | + type: string |
| 289 | + SearchQuery: |
| 290 | + title: SearchQuery |
| 291 | + description: Log Search (v3) query |
| 292 | + type: string |
| 293 | + example: "SELECT time_recv, message FROM logmsgs LIMIT 1" |
| 294 | + SearchUuid: |
| 295 | + title: Search UUID |
| 296 | + description: A unique identifier for a search |
| 297 | + format: uuid |
| 298 | + readOnly: true |
| 299 | + type: string |
| 300 | + Tags: |
| 301 | + title: Saved Search tags |
| 302 | + description: List of textual tags applied to save searches |
| 303 | + type: array |
| 304 | + items: |
| 305 | + type: string |
| 306 | + Timestamp: |
| 307 | + description: Epoch & Unix Timestamp (RFC 3339) |
| 308 | + type: number |
| 309 | + securitySchemes: |
| 310 | + X-Aims-Auth-Token: |
| 311 | + name: X-Aims-Auth-Token |
| 312 | + type: apiKey |
| 313 | + in: header |
| 314 | + description: The AIMS session token received from the AIMS service |
| 315 | + parameters: |
| 316 | + account_id: |
| 317 | + name: account_id |
| 318 | + in: path |
| 319 | + schema: |
| 320 | + type: string |
| 321 | + pattern: "[0-9]+" |
| 322 | + required: true |
| 323 | + description: The AIMS account ID |
| 324 | + saved_search_id: |
| 325 | + name: saved_search_id |
| 326 | + in: path |
| 327 | + required: true |
| 328 | + schema: |
| 329 | + type: string |
| 330 | + format: uuid |
| 331 | + description: A saved search UUID |
| 332 | + responses: |
| 333 | + AIMSUnauthorized: |
| 334 | + description: You are not authorized to perform this operation |
| 335 | + AIMSForbidden: |
| 336 | + description: You do not have permission to access the specified account |
| 337 | + DescriptiveError: |
| 338 | + description: Error response with description |
| 339 | + content: |
| 340 | + application/json: |
| 341 | + schema: |
| 342 | + type: object |
| 343 | + properties: |
| 344 | + errorinfo: |
| 345 | + $ref: "#/components/schemas/ErrorInfo" |
| 346 | + errors: |
| 347 | + $ref: "#/components/schemas/ErrorList" |
| 348 | + SavedLogSearch: |
| 349 | + description: A saved log search |
| 350 | + content: |
| 351 | + application/json: |
| 352 | + schema: |
| 353 | + $ref: "#/components/schemas/SavedLogSearch" |
| 354 | + SavedLogSearchList: |
| 355 | + description: List of saved log searches |
| 356 | + content: |
| 357 | + application/json: |
| 358 | + schema: |
| 359 | + type: array |
| 360 | + items: |
| 361 | + $ref: "#/components/schemas/SavedLogSearch" |
| 362 | +security: |
| 363 | + - X-Aims-Auth-Token: [] |
| 364 | +tags: |
| 365 | + - name: general-purpose |
| 366 | + - name: internal |
0 commit comments