1 get:
2 operationId: GetViewsEntityConfigurations
3 summary: List View Configurations
4 description: >-
5 Retrieve a list of view configurations of an entity. The configurations can
6 be filtered by fields like `id`. The configurations can also be paginated.
7 An admin user can only retrieve their own configurations.
8 x-authenticated: true
9 parameters:
10 - name: entity
11 in: path
12 description: The entity to retrieve its view configurations (for example, `orders`)
13 required: true
14 schema:
15 type: string
16 - name: offset
17 in: query
18 description: The number of items to skip when retrieving a list.
19 required: false
20 schema:
21 type: number
22 title: offset
23 description: The number of items to skip when retrieving a list.
24 externalDocs:
25 url: '#pagination'
26 - name: limit
27 in: query
28 description: Limit the number of items returned in the list.
29 required: false
30 schema:
31 type: number
32 title: limit
33 description: Limit the number of items returned in the list.
34 externalDocs:
35 url: '#pagination'
36 - name: order
37 in: query
38 description: >-
39 The field to sort the data by. By default, the sort order is ascending.
40 To change the order to descending, prefix the field name with `-`.
41 required: false
42 schema:
43 type: string
44 title: order
45 description: >-
46 The field to sort the data by. By default, the sort order is
47 ascending. To change the order to descending, prefix the field name
48 with `-`.
49 externalDocs:
50 url: '#pagination'
51 - name: with_deleted
52 in: query
53 description: Whether to include deleted records in the result.
54 required: false
55 schema:
56 type: boolean
57 title: with_deleted
58 description: Whether to include deleted records in the result.
59 - name: id
60 in: query
61 required: false
62 schema:
63 oneOf:
64 - type: string
65 title: id
66 description: Filter by a view configuration ID.
67 - type: array
68 description: Filter by view configuration IDs.
69 items:
70 type: string
71 title: id
72 description: The view configuration ID.
73 - name: entity
74 in: query
75 required: false
76 schema:
77 oneOf:
78 - type: string
79 title: entity
80 description: Filter by an entity.
81 - type: array
82 description: Filter by entities.
83 items:
84 type: string
85 title: entity
86 description: An entity.
87 - name: name
88 in: query
89 required: false
90 schema:
91 oneOf:
92 - type: string
93 title: name
94 description: Filter by a view's name.
95 - type: array
96 description: Filter by view names.
97 items:
98 type: string
99 title: name
100 description: The view's name.
101 - name: user_id
102 in: query
103 required: false
104 schema:
105 oneOf:
106 - type: string
107 title: user_id
108 description: Filter by the ID of the user who owns the view.
109 - type: array
110 description: Filter by the IDs of users who own the view.
111 items:
112 type: string
113 title: user_id
114 description: The user ID.
115 - name: is_system_default
116 in: query
117 description: Filter by whether the view is a system default.
118 required: false
119 schema:
120 type: boolean
121 title: is_system_default
122 description: Whether the view is a system default.
123 - name: created_at
124 in: query
125 description: Filter by a view configuration's creation date.
126 required: false
127 schema:
128 type: object
129 description: Filter by a view configuration's creation date.
130 properties:
131 $and:
132 type: array
133 description: >-
134 Join query parameters with an AND condition. Each object's content
135 is the same type as the expected query parameters.
136 items:
137 type: object
138 title: $and
139 $or:
140 type: array
141 description: >-
142 Join query parameters with an OR condition. Each object's content
143 is the same type as the expected query parameters.
144 items:
145 type: object
146 title: $or
147 $eq:
148 oneOf:
149 - type: string
150 title: $eq
151 description: Filter by an exact match.
152 - type: array
153 description: Filter by an exact match.
154 items:
155 type: string
156 title: $eq
157 description: Filter by an exact match.
158 $ne:
159 type: string
160 title: $ne
161 description: Filter by values not equal to this parameter.
162 $in:
163 type: array
164 description: Filter by values in this array.
165 items:
166 type: string
167 title: $in
168 description: Filter by values in this array.
169 $nin:
170 type: array
171 description: Filter by values not in this array.
172 items:
173 type: string
174 title: $nin
175 description: Filter by values not in this array.
176 $not:
177 oneOf:
178 - type: string
179 title: $not
180 description: >-
181 Filter by values not matching the conditions in this
182 parameter.
183 - type: object
184 description: >-
185 Filter by values not matching the conditions in this
186 parameter.
187 - type: array
188 description: >-
189 Filter by values not matching the conditions in this
190 parameter.
191 items:
192 type: string
193 title: $not
194 description: >-
195 Filter by values not matching the conditions in this
196 parameter.
197 $gt:
198 type: string
199 title: $gt
200 description: >-
201 Filter by values greater than this parameter. Useful for numbers
202 and dates only.
203 $gte:
204 type: string
205 title: $gte
206 description: >-
207 Filter by values greater than or equal to this parameter. Useful
208 for numbers and dates only.
209 $lt:
210 type: string
211 title: $lt
212 description: >-
213 Filter by values less than this parameter. Useful for numbers and
214 dates only.
215 $lte:
216 type: string
217 title: $lte
218 description: >-
219 Filter by values less than or equal to this parameter. Useful for
220 numbers and dates only.
221 $like:
222 type: string
223 title: $like
224 description: Apply a `like` filter. Useful for strings only.
225 $re:
226 type: string
227 title: $re
228 description: Apply a regex filter. Useful for strings only.
229 $ilike:
230 type: string
231 title: $ilike
232 description: Apply a case-insensitive `like` filter. Useful for strings only.
233 $fulltext:
234 type: string
235 title: $fulltext
236 description: Filter to apply on full-text properties.
237 $overlap:
238 type: array
239 description: Filter arrays that have overlapping values with this parameter.
240 items:
241 type: string
242 title: $overlap
243 description: Filter arrays that have overlapping values with this parameter.
244 $contains:
245 type: array
246 description: Filter arrays that contain some of the values of this parameter.
247 items:
248 type: string
249 title: $contains
250 description: Filter arrays that contain some of the values of this parameter.
251 $contained:
252 type: array
253 description: Filter arrays that contain all values of this parameter.
254 items:
255 type: string
256 title: $contained
257 description: Filter arrays that contain all values of this parameter.
258 $exists:
259 type: boolean
260 title: $exists
261 description: Filter by whether a value for this parameter exists (not `null`).
262 title: created_at
263 - name: updated_at
264 in: query
265 description: Filter by a view configuration's update date.
266 required: false
267 schema:
268 type: object
269 description: Filter by a view configuration's update date.
270 properties:
271 $and:
272 type: array
273 description: >-
274 Join query parameters with an AND condition. Each object's content
275 is the same type as the expected query parameters.
276 items:
277 type: object
278 title: $and
279 $or:
280 type: array
281 description: >-
282 Join query parameters with an OR condition. Each object's content
283 is the same type as the expected query parameters.
284 items:
285 type: object
286 title: $or
287 $eq:
288 oneOf:
289 - type: string
290 title: $eq
291 description: Filter by an exact match.
292 - type: array
293 description: Filter by an exact match.
294 items:
295 type: string
296 title: $eq
297 description: Filter by an exact match.
298 $ne:
299 type: string
300 title: $ne
301 description: Filter by values not equal to this parameter.
302 $in:
303 type: array
304 description: Filter by values in this array.
305 items:
306 type: string
307 title: $in
308 description: Filter by values in this array.
309 $nin:
310 type: array
311 description: Filter by values not in this array.
312 items:
313 type: string
314 title: $nin
315 description: Filter by values not in this array.
316 $not:
317 oneOf:
318 - type: string
319 title: $not
320 description: >-
321 Filter by values not matching the conditions in this
322 parameter.
323 - type: object
324 description: >-
325 Filter by values not matching the conditions in this
326 parameter.
327 - type: array
328 description: >-
329 Filter by values not matching the conditions in this
330 parameter.
331 items:
332 type: string
333 title: $not
334 description: >-
335 Filter by values not matching the conditions in this
336 parameter.
337 $gt:
338 type: string
339 title: $gt
340 description: >-
341 Filter by values greater than this parameter. Useful for numbers
342 and dates only.
343 $gte:
344 type: string
345 title: $gte
346 description: >-
347 Filter by values greater than or equal to this parameter. Useful
348 for numbers and dates only.
349 $lt:
350 type: string
351 title: $lt
352 description: >-
353 Filter by values less than this parameter. Useful for numbers and
354 dates only.
355 $lte:
356 type: string
357 title: $lte
358 description: >-
359 Filter by values less than or equal to this parameter. Useful for
360 numbers and dates only.
361 $like:
362 type: string
363 title: $like
364 description: Apply a `like` filter. Useful for strings only.
365 $re:
366 type: string
367 title: $re
368 description: Apply a regex filter. Useful for strings only.
369 $ilike:
370 type: string
371 title: $ilike
372 description: Apply a case-insensitive `like` filter. Useful for strings only.
373 $fulltext:
374 type: string
375 title: $fulltext
376 description: Filter to apply on full-text properties.
377 $overlap:
378 type: array
379 description: Filter arrays that have overlapping values with this parameter.
380 items:
381 type: string
382 title: $overlap
383 description: Filter arrays that have overlapping values with this parameter.
384 $contains:
385 type: array
386 description: Filter arrays that contain some of the values of this parameter.
387 items:
388 type: string
389 title: $contains
390 description: Filter arrays that contain some of the values of this parameter.
391 $contained:
392 type: array
393 description: Filter arrays that contain all values of this parameter.
394 items:
395 type: string
396 title: $contained
397 description: Filter arrays that contain all values of this parameter.
398 $exists:
399 type: boolean
400 title: $exists
401 description: Filter by whether a value for this parameter exists (not `null`).
402 title: updated_at
403 - name: fields
404 in: query
405 description: >-
406 Comma-separated fields that should be included in the returned data. If
407 a field is prefixed with `+` it will be added to the default fields,
408 using `-` will remove it from the default fields. Without prefix it will
409 replace the entire default fields.
410 required: false
411 schema:
412 type: string
413 title: fields
414 description: >-
415 Comma-separated fields that should be included in the returned data.
416 If a field is prefixed with `+` it will be added to the default
417 fields, using `-` will remove it from the default fields. Without
418 prefix it will replace the entire default fields.
419 externalDocs:
420 url: '#select-fields-and-relations'
421 - name: $and
422 in: query
423 description: >-
424 Join query parameters with an AND condition. Each object's content is
425 the same type as the expected query parameters.
426 required: false
427 schema:
428 type: array
429 description: >-
430 Join query parameters with an AND condition. Each object's content is
431 the same type as the expected query parameters.
432 items:
433 type: object
434 title: $and
435 - name: $or
436 in: query
437 description: >-
438 Join query parameters with an OR condition. Each object's content is the
439 same type as the expected query parameters.
440 required: false
441 schema:
442 type: array
443 description: >-
444 Join query parameters with an OR condition. Each object's content is
445 the same type as the expected query parameters.
446 items:
447 type: object
448 title: $or
449 security:
450 - api_token: []
451 - cookie_auth: []
452 - jwt_token: []
453 x-codeSamples:
454 - lang: JavaScript
455 label: JS SDK
456 source:
457 $ref: ../code_samples/JavaScript/admin_views_{entity}_configurations/get.js
458 - lang: Shell
459 label: cURL
460 source:
461 $ref: ../code_samples/Shell/admin_views_{entity}_configurations/get.sh
462 tags:
463 - Views
464 responses:
465 '200':
466 description: OK
467 content:
468 application/json:
469 schema:
470 allOf:
471 - type: object
472 description: The list of view configurations.
473 required:
474 - limit
475 - offset
476 - count
477 properties:
478 limit:
479 type: number
480 title: limit
481 description: The maximum number of returned items.
482 offset:
483 type: number
484 title: offset
485 description: >-
486 The number of items skipped before retrieving the returned
487 items.
488 count:
489 type: number
490 title: count
491 description: The total number of items.
492 estimate_count:
493 type: number
494 title: estimate_count
495 description: >-
496 The estimated count retrieved from the PostgreSQL query
497 planner, which may be inaccurate.
498 x-featureFlag: index_engine
499 - type: object
500 description: The list of view configurations.
501 required:
502 - view_configurations
503 properties:
504 view_configurations:
505 type: array
506 description: The list of view configurations.
507 items:
508 $ref: ../components/schemas/AdminViewConfiguration.yaml
509 '400':
510 $ref: ../components/responses/400_error.yaml
511 '401':
512 $ref: ../components/responses/unauthorized.yaml
513 '404':
514 $ref: ../components/responses/not_found_error.yaml
515 '409':
516 $ref: ../components/responses/invalid_state_error.yaml
517 '422':
518 $ref: ../components/responses/invalid_request_error.yaml
519 '500':
520 $ref: ../components/responses/500_error.yaml
521 x-since: 2.10.3
522 x-featureFlag: view_configurations
523 post:
524 operationId: PostViewsEntityConfigurations
525 summary: Create View Configuration
526 description: >-
527 Create a new view configuration for an entity. If `is_system_default` is set
528 to true, the created configuration will be set as the system default for the
529 specified entity. Otherwise, it will be a custom configuration for the admin
530 user.
531 x-authenticated: true
532 parameters:
533 - name: entity
534 in: path
535 description: The entity to create its view configuration (for example, `orders`).
536 required: true
537 schema:
538 type: string
539 security:
540 - api_token: []
541 - cookie_auth: []
542 - jwt_token: []
543 requestBody:
544 content:
545 application/json:
546 schema:
547 $ref: ../components/schemas/AdminCreateViewConfiguration.yaml
548 x-codeSamples:
549 - lang: JavaScript
550 label: JS SDK
551 source:
552 $ref: ../code_samples/JavaScript/admin_views_{entity}_configurations/post.js
553 - lang: Shell
554 label: cURL
555 source:
556 $ref: ../code_samples/Shell/admin_views_{entity}_configurations/post.sh
557 tags:
558 - Views
559 responses:
560 '200':
561 description: OK
562 content:
563 application/json:
564 schema:
565 $ref: ../components/schemas/AdminViewConfigurationResponse.yaml
566 '400':
567 $ref: ../components/responses/400_error.yaml
568 '401':
569 $ref: ../components/responses/unauthorized.yaml
570 '404':
571 $ref: ../components/responses/not_found_error.yaml
572 '409':
573 $ref: ../components/responses/invalid_state_error.yaml
574 '422':
575 $ref: ../components/responses/invalid_request_error.yaml
576 '500':
577 $ref: ../components/responses/500_error.yaml
578 x-workflow: createViewConfigurationWorkflow
579 x-events: []
580 x-since: 2.10.3
581 x-featureFlag: view_configurations