Skip to content

Commit 0e8c66f

Browse files
author
cibot
committed
Definitions Update search
1 parent bf709f6 commit 0e8c66f

File tree

1 file changed

+104
-37
lines changed

1 file changed

+104
-37
lines changed

alsdkdefs/apis/search/search.v2.yaml

Lines changed: 104 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -43,34 +43,25 @@ paths:
4343
examples:
4444
Bad SQL Response Example:
4545
value:
46-
error: "Unknow keyword 'SELECTA'"
46+
error: "Unknown keyword 'SELECTA'"
4747
operationId: start_query_execution
4848
description: |-
4949
Request the execution of a new search.
5050
5151
Use the text/plain media type with an SQL statement to execute http request.
52-
Details on how the SQL statements look will be given in a separate document.
53-
Old style search in JSON form can be passed as media type application/json.
52+
The documentation for AL SQL statements will be coming soon.
5453
security:
5554
- X-AIMS-Auth-Token: []
5655
parameters:
57-
- schema:
56+
- name: search_type
57+
schema:
5858
type: string
5959
enum:
6060
- auto
6161
- batch
6262
- report
6363
default: auto
6464
in: query
65-
name: search_type
66-
- schema:
67-
type: boolean
68-
default: 'false'
69-
enum:
70-
- 'true'
71-
- 'false'
72-
in: query
73-
name: dry_run
7465
requestBody:
7566
content:
7667
text/plain:
@@ -81,11 +72,7 @@ paths:
8172
name: query_string
8273
description: ''
8374
parameters:
84-
- schema:
85-
type: string
86-
name: account_id
87-
in: path
88-
required: true
75+
- $ref: '#/components/parameters/AccountId'
8976
'/search/v2/{account_id}/searches/{query_execution_id}':
9077
get:
9178
summary: Get Search Results
@@ -99,45 +86,80 @@ paths:
9986
security:
10087
- X-AIMS-Auth-Token: []
10188
parameters:
102-
- schema:
89+
- name: details
90+
schema:
10391
type: boolean
10492
enum:
10593
- 'true'
10694
- 'false'
10795
default: 'false'
10896
in: query
109-
name: details
11097
description: Return search execution details
111-
- schema:
98+
- name: offest
99+
schema:
112100
type: integer
113101
in: query
114-
name: offest
115-
description: offset within a results page
116-
- schema:
102+
description: offset within a set of results
103+
- name: limit
104+
schema:
117105
type: integer
118106
default: '100'
119107
in: query
120-
name: limit
121-
description: Limit the number of elements on the response
122-
- schema:
108+
description: Limit the number of elements in the response
109+
- name: next_token
110+
schema:
123111
type: string
124112
in: query
125-
name: next_token
126-
description: A next_token from a previous request to continue paging results
113+
description: A `next_token` from a previous request to continue paging results
127114
description: 'Returns the results of a query execution specified by {search_uuid}'
128115
parameters:
129-
- schema:
116+
- $ref: '#/components/parameters/AccountId'
117+
- name: query_execution_id
118+
schema:
130119
type: string
131-
name: account_id
132120
in: path
133121
required: true
134-
description: AIMS Account ID
135-
- schema:
136-
type: string
137-
name: query_execution_id
138-
in: path
122+
'/search/v1/{account_id}/messages/{datatype}':
123+
post:
124+
summary: Read Messages
125+
tags: []
126+
responses:
127+
'200':
128+
description: OK
129+
content:
130+
application/json:
131+
schema:
132+
$ref: '#/components/schemas/MessagesResponse'
133+
operationId: read_messages
134+
description: |-
135+
Read a set of messages from storage by ID
136+
security:
137+
- X-AIMS-Auth-Token: []
138+
parameters:
139+
- $ref: '#/components/parameters/AccountId'
140+
- name: datatype
141+
schema:
142+
type: string
143+
enum:
144+
- logmsgs
145+
in: path
146+
required: true
147+
requestBody:
148+
content:
149+
application/json:
150+
schema:
151+
$ref: '#/components/schemas/MessagesParams'
152+
description: Read Messages Input Parameters
139153
required: true
140154
components:
155+
parameters:
156+
AccountId:
157+
name: account_id
158+
schema:
159+
type: string
160+
in: path
161+
required: true
162+
description: AIMS Account Id
141163
schemas:
142164
SearchCreated:
143165
title: SearchCreated
@@ -212,10 +234,55 @@ components:
212234
type: integer
213235
sorts_executed:
214236
type: integer
237+
MessagesParams:
238+
title: MessagesParams
239+
type: object
240+
required:
241+
- ids
242+
properties:
243+
ids:
244+
type: array
245+
items:
246+
type: string
247+
fields:
248+
type: string
249+
tokens_offsets:
250+
type: string
251+
enum:
252+
- 'true'
253+
- 'false'
254+
default: 'false'
255+
properties:
256+
type: string
257+
enum:
258+
- 'true'
259+
- 'false'
260+
default: 'false'
261+
MessagesResponse:
262+
title: Messages
263+
type: array
264+
required:
265+
- id
266+
- fields
267+
items:
268+
type: object
269+
properties:
270+
id:
271+
type: object
272+
properties:
273+
msgid:
274+
type: string
275+
aid:
276+
type: integer
277+
account:
278+
type: integer
279+
fields:
280+
type: object
281+
error:
282+
type: object
215283
securitySchemes:
216284
X-AIMS-Auth-Token:
217285
name: X-AIMS-Auth-Token
218286
type: apiKey
219287
in: header
220288
description: AIMS Authentication Token
221-

0 commit comments

Comments
 (0)