Skip to content

Add documentation for GET snapshots state query parameter. #4597

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 30 additions & 0 deletions output/openapi/elasticsearch-openapi.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

65 changes: 64 additions & 1 deletion output/schema/schema.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 0 additions & 6 deletions output/schema/validation-errors.json
Original file line number Diff line number Diff line change
Expand Up @@ -119,12 +119,6 @@
],
"response": []
},
"snapshot.get": {
"request": [
"Request: missing json spec query parameter 'state'"
],
"response": []
},
"snapshot.repository_analyze": {
"request": [
"Request: query parameter 'register_operation_count' does not exist in the json spec"
Expand Down
3 changes: 3 additions & 0 deletions output/typescript/types.ts

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

31 changes: 31 additions & 0 deletions specification/snapshot/_types/SnapshotState.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
/*
* Licensed to Elasticsearch B.V. under one or more contributor
* license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright
* ownership. Elasticsearch B.V. licenses this file to you under
* the Apache License, Version 2.0 (the "License"); you may
* not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/

export enum SnapshotState {
/** The snapshot process has started. */
IN_PROGRESS,
/** The snapshot process completed successfully. */
SUCCESS,
/** The snapshot failed. */
FAILED,
/** The snapshot was partially successful. */
PARTIAL,
/** The snapshot is incompatible with the current version of the cluster. */
INCOMPATIBLE
}
8 changes: 8 additions & 0 deletions specification/snapshot/get/SnapshotGetRequest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ import { integer } from '@_types/Numeric'
import { SortOrder } from '@_types/sort'
import { Duration } from '@_types/Time'
import { SnapshotSort } from '@snapshot/_types/SnapshotInfo'
import { SnapshotState } from '@snapshot/_types/SnapshotState'

/**
* Get snapshot information.
Expand Down Expand Up @@ -147,6 +148,13 @@ export interface Request extends RequestBase {
* @availability serverless
*/
sort?: SnapshotSort
/**
* Only return snapshots with a state found in the given comma-separated list of snapshot states.
* The default is all snapshot states.
* @availability stack since=9.1.0
* @availability serverless
*/
state?: SnapshotState | SnapshotState[]
/**
* If `true`, returns additional information about each snapshot such as the version of Elasticsearch which took the snapshot, the start and end times of the snapshot, and the number of shards snapshotted.
*
Expand Down