Skip to content
This repository has been archived by the owner on Mar 21, 2024. It is now read-only.

Commit

Permalink
draft open-api.yml changes
Browse files Browse the repository at this point in the history
  • Loading branch information
gmourier committed Oct 26, 2022
1 parent 046fb8c commit e8233fe
Showing 1 changed file with 55 additions and 1 deletion.
56 changes: 55 additions & 1 deletion open-api.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -690,6 +690,20 @@ components:
- indexes
- expiresAt
description: API keys are stored and managed by the master key holder and the default admin key holder. These are the keys used by the technical teams to interact with Meilisearch at the level of the client/server code. API keys can have restrictions on which methods can be accessed via an actions list; they can also expiresAt a specific date time and be restricted to a specific set of indexes.
swapOperation:
type: object
properties:
indexes:
type: array
description: The two indexeUids to swap in the given operation.
required:
- indexes
swapIndexes:
type: array
description: Array of swap operation that will be processed atomically.
required: true
items:
$ref: '#/components/schemas/swapOperation'
parameters:
indexUid:
name: indexUid
Expand Down Expand Up @@ -1009,10 +1023,18 @@ components:
summary: 202 Accepted dumpCreation response example
value:
taskUid: 0
indexUid: movies
indexUid: null
status: enqueued
type: dumpCreation
enqueuedAt: '2021-01-01T09:39:00.000000Z'
202_indexSwap:
summary: 202 Accepted indexSwap response example
value:
taskUid: 0
indexUid: null
status: enqueued
type: indexSwap
enqueuedAt: '2021-01-01T09:39:00.000000Z'
tags:
- name: Indexes
description: |
Expand Down Expand Up @@ -3410,4 +3432,36 @@ paths:
- apiKey: []
parameters:
- $ref: '#/components/parameters/taskUid'
'/swap-indexes':
post:
operationId: indexes.swap
summary: Swap Indexes
description: Deploy a new version of an index without any downtime for clients by swapping documents, settings and task history between two indexes. It is possible to specify several swap operations in an atomic way.
tags:
- Indexes
security:
- apiKey: []
parameters:
- $ref: '#/components/parameters/Content-Type'
request:
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/swapIndexes'
examples:
Example:
- indexes: ["indexA", "indexA_new"]
- indexes: ["indexB", "indexB_new"]
responses:
'202':
description: Accepted
content:
application/json:
schema:
$ref: '#/components/responses/202'
examples:
$ref: '#/components/examples/202_indexSwap'
'401':
$ref: '#/components/responses/401'
security: []

0 comments on commit e8233fe

Please sign in to comment.