diff --git a/.github/validate-pr/index.js b/.github/validate-pr/index.js index 291f8f2fd4..cb107808fd 100644 --- a/.github/validate-pr/index.js +++ b/.github/validate-pr/index.js @@ -149,20 +149,18 @@ async function run() { } changedApis.sort((a, b) => a.api.localeCompare(b.api)) + let comment = `Following you can find the validation changes against the target branch for the API${changedApis.length === 1 ? '' : 's'}.\n\n` if (changedApis.length > 0) { - let comment = `Following you can find the validation changes for the API${changedApis.length === 1 ? '' : 's'} you have modified.\n\n` comment += '| API | Status | Request | Response |\n' comment += '| --- | --- | --- | --- |\n' for (const change of changedApis) { comment += buildDiffTableLine(change) } - comment += `\nYou can validate ${changedApis.length === 1 ? 'this' : 'these'} API${changedApis.length === 1 ? '' : 's'} yourself by using the ${tick}make validate${tick} target.\n` - - core.setOutput('has_results', 'true') - core.setOutput('comment_body', comment) } else { - core.setOutput('has_results', 'false') + comment += '**No changes detected**.\n' } + comment += `\nYou can validate ${changedApis.length === 1 ? 'this' : 'these'} API${changedApis.length === 1 ? '' : 's'} yourself by using the ${tick}make validate${tick} target.\n` + core.setOutput('comment_body', comment) core.info('Done!') } @@ -236,4 +234,4 @@ function generateResponse (r) { run().catch((err) => { core.error(err) process.exit(1) -}) \ No newline at end of file +}) diff --git a/.github/workflows/validate-pr.yml b/.github/workflows/validate-pr.yml index 0269919f61..ca73e15940 100644 --- a/.github/workflows/validate-pr.yml +++ b/.github/workflows/validate-pr.yml @@ -75,7 +75,6 @@ jobs: body-includes: 'Following you can find the validation changes' - name: Create or update comment - if: steps.validation.outputs.has_results == 'true' uses: peter-evans/create-or-update-comment@71345be0265236311c031f5c7866368bd1eff043 # v4.0.0 with: token: ${{ secrets.GITHUB_TOKEN }} diff --git a/.gitignore b/.gitignore index 1861b77072..de557a2e20 100644 --- a/.gitignore +++ b/.gitignore @@ -65,10 +65,7 @@ output/schema/schema # Test suite outputs compiler/test/**/output/ -# Temporary openAPI files -output/openapi/elasticsearch-serverless-openapi.tmp*.json -output/openapi/elasticsearch-serverless-openapi.examples.json -output/openapi/elasticsearch-openapi.tmp*.json -output/openapi/elasticsearch-openapi.examples.json -output/openapi/elasticsearch-serverless-openapi-docs.json -output/openapi/elasticsearch-openapi-docs.json \ No newline at end of file +# Temporary openAPI documentation files +output/openapi/elasticsearch-serverless-openapi-docs*.json +output/openapi/elasticsearch-openapi-docs*.json +output/openapi/elasticsearch*.redirects.csv \ No newline at end of file diff --git a/Makefile b/Makefile index 468fc02464..eae04f3ac9 100644 --- a/Makefile +++ b/Makefile @@ -69,14 +69,14 @@ dump-routes: ## Create a new schema with all generics expanded @npm run dump-routes --prefix compiler overlay-docs: ## Apply overlays to OpenAPI documents - @npx bump overlay "output/openapi/elasticsearch-serverless-openapi.json" "docs/overlays/elasticsearch-serverless-openapi-overlays.yaml" > "output/openapi/elasticsearch-serverless-openapi.tmp1.json" - @npx bump overlay "output/openapi/elasticsearch-serverless-openapi.tmp1.json" "docs/overlays/elasticsearch-shared-overlays.yaml" > "output/openapi/elasticsearch-serverless-openapi.tmp2.json" - @npx @redocly/cli bundle output/openapi/elasticsearch-serverless-openapi.tmp2.json --ext json -o output/openapi/elasticsearch-serverless-openapi.examples.json - @npx bump overlay "output/openapi/elasticsearch-openapi.json" "docs/overlays/elasticsearch-openapi-overlays.yaml" > "output/openapi/elasticsearch-openapi.tmp1.json" - @npx bump overlay "output/openapi/elasticsearch-openapi.tmp1.json" "docs/overlays/elasticsearch-shared-overlays.yaml" > "output/openapi/elasticsearch-openapi.tmp2.json" - @npx @redocly/cli bundle output/openapi/elasticsearch-openapi.tmp2.json --ext json -o output/openapi/elasticsearch-openapi.examples.json - rm output/openapi/elasticsearch-serverless-openapi.tmp*.json - rm output/openapi/elasticsearch-openapi.tmp*.json + @npx bump overlay "output/openapi/elasticsearch-serverless-openapi-docs.json" "docs/overlays/elasticsearch-serverless-openapi-overlays.yaml" > "output/openapi/elasticsearch-serverless-openapi-docs.tmp1.json" + @npx bump overlay "output/openapi/elasticsearch-serverless-openapi-docs.tmp1.json" "docs/overlays/elasticsearch-shared-overlays.yaml" > "output/openapi/elasticsearch-serverless-openapi-docs.tmp2.json" + @npx @redocly/cli bundle output/openapi/elasticsearch-serverless-openapi-docs.tmp2.json --ext json -o output/openapi/elasticsearch-serverless-openapi-docs-final.json + @npx bump overlay "output/openapi/elasticsearch-openapi-docs.json" "docs/overlays/elasticsearch-openapi-overlays.yaml" > "output/openapi/elasticsearch-openapi-docs.tmp1.json" + @npx bump overlay "output/openapi/elasticsearch-openapi-docs.tmp1.json" "docs/overlays/elasticsearch-shared-overlays.yaml" > "output/openapi/elasticsearch-openapi-docs.tmp2.json" + @npx @redocly/cli bundle output/openapi/elasticsearch-openapi-docs.tmp2.json --ext json -o output/openapi/elasticsearch-openapi-docs-final.json + rm output/openapi/elasticsearch-serverless-openapi-docs.tmp*.json + rm output/openapi/elasticsearch-openapi-docs.tmp*.json generate-language-examples: @node docs/examples/generate-language-examples.js @@ -89,11 +89,11 @@ generate-language-examples-with-java: lint-docs: ## Lint the OpenAPI documents after overlays @npx @redocly/cli lint "output/openapi/elasticsearch-*.json" --config "docs/linters/redocly.yaml" --format stylish --max-problems 500 -lint-docs-stateful: ## Lint only the elasticsearch-openapi.examples.json file - @npx @redocly/cli lint "output/openapi/elasticsearch-openapi.examples.json" --config "docs/linters/redocly.yaml" --format stylish --max-problems 500 +lint-docs-stateful: ## Lint only the elasticsearch-openapi-docs-final.json file + @npx @redocly/cli lint "output/openapi/elasticsearch-openapi-docs-final.json" --config "docs/linters/redocly.yaml" --format stylish --max-problems 500 lint-docs-serverless: ## Lint only the serverless OpenAPI document after overlays - @npx @redocly/cli lint "output/openapi/elasticsearch-serverless-openapi.examples.json" --config "docs/linters/redocly.yaml" --format stylish --max-problems 500 + @npx @redocly/cli lint "output/openapi/elasticsearch-serverless-openapi-docs-final.json" --config "docs/linters/redocly.yaml" --format stylish --max-problems 500 contrib: | generate license-check spec-format-fix transform-to-openapi filter-for-serverless lint-docs ## Pre contribution target diff --git a/compiler-rs/clients_schema/src/lib.rs b/compiler-rs/clients_schema/src/lib.rs index d5b01dce78..08923ebf4c 100644 --- a/compiler-rs/clients_schema/src/lib.rs +++ b/compiler-rs/clients_schema/src/lib.rs @@ -58,6 +58,7 @@ pub trait Documented { pub trait ExternalDocument { fn ext_doc_id(&self) -> Option<&str>; fn ext_doc_url(&self) -> Option<&str>; + fn ext_doc_description(&self) -> Option<&str>; fn ext_previous_version_doc_url(&self) -> Option<&str>; } @@ -323,6 +324,9 @@ pub struct Property { #[serde(skip_serializing_if = "Option::is_none")] pub ext_doc_url: Option, + #[serde(skip_serializing_if = "Option::is_none")] + pub ext_doc_description: Option, + #[serde(skip_serializing_if = "Option::is_none")] pub ext_previous_version_doc_url: Option, @@ -375,6 +379,10 @@ impl ExternalDocument for Property { self.ext_doc_url.as_deref() } + fn ext_doc_description(&self) -> Option<&str> { + self.ext_doc_description.as_deref() + } + fn ext_previous_version_doc_url(&self) -> Option<&str> { self.ext_previous_version_doc_url.as_deref() } @@ -536,6 +544,9 @@ pub struct BaseType { #[serde(skip_serializing_if = "Option::is_none")] pub ext_doc_url: Option, + #[serde(skip_serializing_if = "Option::is_none")] + pub ext_doc_description: Option, + #[serde(skip_serializing_if = "Option::is_none")] pub ext_previous_version_doc_url: Option, @@ -579,6 +590,7 @@ impl BaseType { spec_location: None, ext_doc_id: None, ext_doc_url: None, + ext_doc_description: None, ext_previous_version_doc_url: None, } } @@ -603,6 +615,10 @@ impl ExternalDocument for BaseType { self.ext_doc_url.as_deref() } + fn ext_doc_description(&self) -> Option<&str> { + self.ext_doc_description.as_deref() + } + fn ext_previous_version_doc_url(&self) -> Option<&str> { self.ext_previous_version_doc_url.as_deref() } @@ -635,6 +651,10 @@ impl ExternalDocument for T { self.base().doc_url() } + fn ext_doc_description(&self) -> Option<&str> { + self.base().ext_doc_description() + } + fn ext_previous_version_doc_url(&self) -> Option<&str> { self.base().ext_previous_version_doc_url() } @@ -915,6 +935,9 @@ pub struct Endpoint { #[serde(skip_serializing_if = "Option::is_none")] pub ext_doc_url: Option, + #[serde(skip_serializing_if = "Option::is_none")] + pub ext_doc_description: Option, + #[serde(skip_serializing_if = "Option::is_none")] pub ext_previous_version_doc_url: Option, @@ -968,6 +991,10 @@ impl ExternalDocument for Endpoint { self.ext_doc_url.as_deref() } + fn ext_doc_description(&self) -> Option<&str> { + self.ext_doc_description.as_deref() + } + fn ext_previous_version_doc_url(&self) -> Option<&str> { self.ext_previous_version_doc_url.as_deref() } @@ -1003,7 +1030,6 @@ pub struct UrlTemplate { pub struct ModelInfo { pub title: String, pub license: License, - pub version: Option, } #[derive(Debug, Clone, Serialize, Deserialize)] diff --git a/compiler-rs/clients_schema/src/transform/expand_generics.rs b/compiler-rs/clients_schema/src/transform/expand_generics.rs index d6346cd319..50c1db12b1 100644 --- a/compiler-rs/clients_schema/src/transform/expand_generics.rs +++ b/compiler-rs/clients_schema/src/transform/expand_generics.rs @@ -211,8 +211,10 @@ pub fn expand(model: IndexedModel, config: ExpandConfig) -> anyhow::Result, + /// the branch to generate [9.0, 8.19, current, etc... - default = current] + #[argh(option)] + pub branch: Option, + /// add enum descriptions to property descriptions [default = true] #[argh(switch)] pub lift_enum_descriptions: bool, @@ -72,9 +76,12 @@ impl From for Configuration { SchemaFlavor::Serverless => Some(Flavor::Serverless), SchemaFlavor::Stack => Some(Flavor::Stack), }; + + let branch = cli.branch; Configuration { flavor, + branch, lift_enum_descriptions: cli.lift_enum_descriptions, merge_multipath_endpoints: cli.merge_multipath_endpoints, multipath_redirects: cli.multipath_redirects, diff --git a/compiler-rs/clients_schema_to_openapi/src/lib.rs b/compiler-rs/clients_schema_to_openapi/src/lib.rs index ed2bbf19a7..aae96f3da6 100644 --- a/compiler-rs/clients_schema_to_openapi/src/lib.rs +++ b/compiler-rs/clients_schema_to_openapi/src/lib.rs @@ -25,13 +25,14 @@ use indexmap::IndexMap; use clients_schema::{Availabilities, Availability, Flavor, IndexedModel, Stability, Visibility}; use openapiv3::{Components, OpenAPI}; -use serde_json::Value; +use serde_json::{Map,Value}; use clients_schema::transform::ExpandConfig; use crate::components::TypesAndComponents; pub struct Configuration { pub flavor: Option, pub namespaces: Option>, + pub branch: Option, /// If a property value is an enumeration, the description of possible values will be copied in the /// property's description (also works for arrays of enums). @@ -189,9 +190,14 @@ pub fn product_meta_as_extensions(namespace: &str, product_meta: &IndexMap = Vec::new(); + let mut product_feature: Map = Map::new(); + product_feature.insert("name".to_string(),Value::String("product_name".to_string())); + product_feature.insert("content".to_string(),Value::String(product_str)); + product_feature_list.push(Value::Object(product_feature)); + result.insert("x-metaTags".to_string(), Value::Array(product_feature_list)); result } diff --git a/compiler-rs/clients_schema_to_openapi/src/paths.rs b/compiler-rs/clients_schema_to_openapi/src/paths.rs index 870db9d788..6e1fac4459 100644 --- a/compiler-rs/clients_schema_to_openapi/src/paths.rs +++ b/compiler-rs/clients_schema_to_openapi/src/paths.rs @@ -74,7 +74,7 @@ pub fn add_endpoint( example: None, examples: Default::default(), explode: None, // Defaults to simple, i.e. comma-separated values for arrays - extensions: Default::default(), + extensions, }) } diff --git a/compiler-rs/clients_schema_to_openapi/src/schemas.rs b/compiler-rs/clients_schema_to_openapi/src/schemas.rs index 0a1ff021fd..aad4849082 100644 --- a/compiler-rs/clients_schema_to_openapi/src/schemas.rs +++ b/compiler-rs/clients_schema_to_openapi/src/schemas.rs @@ -209,19 +209,14 @@ impl<'a> TypesAndComponents<'a> { pub fn convert_external_docs(&self, obj: &impl clients_schema::ExternalDocument) -> Option { // FIXME: does the model contain resolved doc_id? obj.ext_doc_url().map(|url| { - let branch: &str = self - .model - .info - .as_ref() - .and_then(|i| i.version.as_deref()) - .unwrap_or("current"); + let branch = self.config.branch.clone(); let mut extensions: IndexMap = Default::default(); if let Some(previous_version_doc_url) = obj.ext_previous_version_doc_url() { extensions.insert("x-previousVersionUrl".to_string(), serde_json::json!(previous_version_doc_url)); } ExternalDocumentation { - description: None, - url: url.trim().replace("{branch}", branch), + description: obj.ext_doc_description().map(|desc| { desc.to_string() }), + url: url.trim().replace("{branch}", &branch.unwrap_or("current".to_string())), extensions, } }) @@ -477,9 +472,9 @@ impl<'a> TypesAndComponents<'a> { data.external_docs = self.convert_external_docs(prop); data.deprecated = prop.deprecation.is_some(); data.description = self.property_description(prop)?; + data.default = prop.server_default.clone().map(|value| { serde_json::json!(value) }); data.extensions = crate::availability_as_extensions(&prop.availability, &self.config.flavor); // TODO: prop.aliases as extensions - // TODO: prop.server_default as extension // TODO: prop.doc_id as extension (new representation of since and stability) // TODO: prop.es_quirk as extension? // TODO: prop.codegen_name as extension? diff --git a/compiler-rs/compiler-wasm-lib/pkg/compiler_wasm_lib_bg.wasm b/compiler-rs/compiler-wasm-lib/pkg/compiler_wasm_lib_bg.wasm index a1d1deb6c8..731d61169a 100644 Binary files a/compiler-rs/compiler-wasm-lib/pkg/compiler_wasm_lib_bg.wasm and b/compiler-rs/compiler-wasm-lib/pkg/compiler_wasm_lib_bg.wasm differ diff --git a/compiler-rs/openapi_to_clients_schema/src/types.rs b/compiler-rs/openapi_to_clients_schema/src/types.rs index 7973a556fa..995adea845 100644 --- a/compiler-rs/openapi_to_clients_schema/src/types.rs +++ b/compiler-rs/openapi_to_clients_schema/src/types.rs @@ -404,6 +404,7 @@ fn generate_interface_def( doc_url: None, ext_doc_id: None, ext_doc_url: None, + ext_doc_description: None, ext_previous_version_doc_url: None, codegen_name: None, // FIXME: extension in workplace search description: None, diff --git a/compiler/src/model/metamodel.ts b/compiler/src/model/metamodel.ts index a645eb8341..26f47a9895 100644 --- a/compiler/src/model/metamodel.ts +++ b/compiler/src/model/metamodel.ts @@ -443,6 +443,7 @@ export class Endpoint { docId?: string extDocId?: string extDocUrl?: string + extDocDescription?: string extPreviousVersionDocUrl?: string deprecation?: Deprecation availability: Availabilities diff --git a/compiler/src/model/utils.ts b/compiler/src/model/utils.ts index bbf64ee3d6..ccc0647bc4 100644 --- a/compiler/src/model/utils.ts +++ b/compiler/src/model/utils.ts @@ -703,6 +703,9 @@ export function hoistRequestAnnotations ( const docUrl = docIds.find(entry => entry[0] === value.trim()) assert(jsDocs, docUrl != null, `The @ext_doc_id '${value.trim()}' is not present in _doc_ids/table.csv`) endpoint.extDocUrl = docUrl[1].replace(/\r/g, '') + if (docUrl[3].replace(/\r/g, '') !== '') { + endpoint.extDocDescription = docUrl[3].replace(/\r/g, '') + } } else if (tag === 'availability') { // The @availability jsTag is different than most because it allows // multiple values within the same docstring, hence needing to parse diff --git a/compiler/src/steps/add-examples.ts b/compiler/src/steps/add-examples.ts index 7878ec461f..7bf870327d 100644 --- a/compiler/src/steps/add-examples.ts +++ b/compiler/src/steps/add-examples.ts @@ -54,10 +54,18 @@ export default class ExamplesProcessor { class BaseExamplesProcessor { model: model.Model specsFolder: string + static languageExamples: Record = {} constructor (model: model.Model, specsFolder: string) { this.model = model this.specsFolder = specsFolder + if (Object.keys(BaseExamplesProcessor.languageExamples).length === 0) { + // load the language examples + const examplesJson = this.specsFolder + '/../docs/examples/languageExamples.json' + if (fs.existsSync(examplesJson)) { + BaseExamplesProcessor.languageExamples = JSON.parse(fs.readFileSync(examplesJson, 'utf8')) + } + } } // Log a 'warning' message. @@ -139,6 +147,11 @@ class BaseExamplesProcessor { const exampleFileContent = fs.readFileSync(filePath, 'utf8') const exampleName = path.basename(fileName, path.extname(fileName)) const example: model.Example = yaml.load(exampleFileContent) + // find the language alternative examples and add them + const alternativeKey = 'specification/' + filePath.split('/specification/')[1] + if (BaseExamplesProcessor.languageExamples[alternativeKey] !== undefined) { + example.alternatives = BaseExamplesProcessor.languageExamples[alternativeKey] + } // Some of the example files set their 'value' as a JSON string, // and some files set their 'value' as an object. For consistency, // if the value is not a JSON string, convert it to a JSON string. diff --git a/compiler/src/steps/validate-model.ts b/compiler/src/steps/validate-model.ts index 3ccec2bbd3..469a94b79c 100644 --- a/compiler/src/steps/validate-model.ts +++ b/compiler/src/steps/validate-model.ts @@ -497,6 +497,23 @@ export default async function validateModel (apiModel: model.Model, restSpec: Ma // eslint-disable-next-line @typescript-eslint/restrict-template-expressions throw new Error(`Unknown kind: ${typeDef.body.kind}`) } + + if (typeDef.exceptions != null) { + for (const ex of typeDef.exceptions) { + switch (ex.body.kind) { + case 'properties': + validateProperties(ex.body.properties, openGenerics, new Set()) + break + case 'value': + validateValueOf(ex.body.value, openGenerics) + break + case 'no_body': + // Nothing to validate + break + } + } + } + context.pop() } @@ -562,17 +579,10 @@ export default async function validateModel (apiModel: model.Model, restSpec: Ma if (typeDef.variants?.kind === 'container') { const variants = typeDef.properties.filter(prop => !(prop.containerProperty ?? false)) - if (variants.length === 1) { - // Single-variant containers must have a required property - if (!variants[0].required) { - modelError(`Property ${variants[0].name} is a single-variant and must be required`) - } - } else { - // Multiple variants must all be optional - for (const v of variants) { - if (v.required) { - modelError(`Variant ${variants[0].name} must be optional`) - } + // Variants must all be optional + for (const v of variants) { + if (v.required) { + modelError(`Variant ${variants[0].name} must be optional`) } } } diff --git a/compiler/src/transform/expand-generics.ts b/compiler/src/transform/expand-generics.ts index 348cc9b365..f128eb264c 100644 --- a/compiler/src/transform/expand-generics.ts +++ b/compiler/src/transform/expand-generics.ts @@ -27,7 +27,7 @@ import { Request, Response, Body, - InstanceOf, Inherits, Property + InstanceOf, Inherits, Property, ResponseException } from '../model/metamodel' import { readFile, writeFile } from 'fs/promises' import stringify from 'safe-stable-stringify' @@ -293,6 +293,17 @@ export function expandGenerics (inputModel: Model, config?: ExpansionConfig): Mo return addIfNotSeen(resp.name, () => { const result = { ...resp } result.body = expandBody(resp.body, genericParamMapping(resp.generics, params)) + if (resp.exceptions != null) { + result.exceptions = [] + for (const exception of resp.exceptions) { + const except: ResponseException = { + description: exception.description, + statusCodes: exception.statusCodes, + body: expandBody(exception.body, genericParamMapping(resp.generics, params)) + } + result.exceptions.push(except) + } + } result.generics = undefined return result }) diff --git a/compiler/src/validation-errors.ts b/compiler/src/validation-errors.ts index 221e35a072..5260775f3e 100644 --- a/compiler/src/validation-errors.ts +++ b/compiler/src/validation-errors.ts @@ -17,6 +17,10 @@ * under the License. */ +const IGNORED_ERRORS = [ + "request definition xpack.info:Request / query - Property 'human' is already defined in an ancestor class" +] + /** Errors for an endpoint */ export class EndpointError { request: string[] @@ -35,6 +39,10 @@ export class ValidationErrors { /** Add some error information relative to an endpoint's request or response */ addEndpointError (endpoint: string, part: 'request' | 'response', message: string): void { + if (IGNORED_ERRORS.includes(message)) { + return + } + let error = this.endpointErrors[endpoint] if (error == null) { error = { request: [], response: [] } @@ -54,10 +62,8 @@ export class ValidationErrors { let count = 0 const logArray = function (errs: string[], prefix = ''): void { for (const err of errs) { - if (err !== 'Missing request & response') { - console.error(`${prefix}${err}`) - count++ - } + console.error(`${prefix}${err}`) + count++ } } diff --git a/docs/examples/generate-language-examples.js b/docs/examples/generate-language-examples.js index 2b8dc63349..8136076d13 100644 --- a/docs/examples/generate-language-examples.js +++ b/docs/examples/generate-language-examples.js @@ -25,6 +25,8 @@ const {parseRequest} = require("@elastic/request-converter/dist/parse"); const {JavaCaller} = require("java-caller"); const LANGUAGES = ['Python', 'JavaScript', 'Ruby', 'PHP', 'curl']; +const EXAMPLES_JSON = 'docs/examples/languageExamples.json'; +let languageExamples = {}; async function generateLanguages(example) { const doc = yamlParseDocument(await fs.promises.readFile(example, 'utf8')); @@ -38,14 +40,18 @@ async function generateLanguages(example) { request += '\n' + JSON.stringify(data.value); } } - const alternatives = []; + if (data.alternatives) { + languageExamples[example] = data.alternatives; + delete data.alternatives; + } + let alternatives = []; for (const lang of LANGUAGES) { alternatives.push({ language: lang, code: (await convertRequests(request, lang, {})).trim(), }); } - data.alternatives = alternatives.concat(data.alternatives.filter(pair => !LANGUAGES.includes(pair.language))); + alternatives = alternatives.concat((languageExamples[example] ?? []).filter(pair => !LANGUAGES.includes(pair.language))); // specific java example generator if (process.argv[2] === "java") { @@ -85,13 +91,13 @@ async function generateLanguages(example) { code: stdout, }); // replace old java examples - data.alternatives = data.alternatives.filter(pair => pair.language !== "Java"); - data.alternatives = data.alternatives.concat(alternative_java); + alternatives = alternatives.filter(pair => pair.language !== "Java"); + alternatives = alternatives.concat(alternative_java); } } doc.delete('alternatives'); - doc.add(doc.createPair('alternatives', data.alternatives)); + languageExamples[example] = alternatives; await fs.promises.writeFile(example, doc.toString({lineWidth: 132})); } @@ -128,6 +134,9 @@ async function main() { let count = 0; let errors = 0; await loadSchema('output/schema/schema.json'); + if (fs.existsSync(EXAMPLES_JSON)) { + languageExamples = JSON.parse(await fs.promises.readFile(EXAMPLES_JSON, 'utf8')); + } for await (const example of walkExamples('./specification/')) { try { await generateLanguages(example); @@ -138,6 +147,7 @@ async function main() { } count += 1; } + await fs.promises.writeFile(EXAMPLES_JSON, JSON.stringify(languageExamples, null, 2)); console.log(`${count} examples processed, ${errors} errors.`); } diff --git a/docs/examples/languageExamples.json b/docs/examples/languageExamples.json new file mode 100644 index 0000000000..73dedecac3 --- /dev/null +++ b/docs/examples/languageExamples.json @@ -0,0 +1,16840 @@ +{ + "specification/xpack/usage/examples/request/XPackUsageRequestExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.xpack.usage()" + }, + { + "language": "JavaScript", + "code": "const response = await client.xpack.usage();" + }, + { + "language": "Ruby", + "code": "response = client.xpack.usage" + }, + { + "language": "PHP", + "code": "$resp = $client->xpack()->usage();" + }, + { + "language": "curl", + "code": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_xpack/usage\"" + }, + { + "language": "Java", + "code": "client.xpack().usage(u -> u);\n" + } + ], + "specification/xpack/info/examples/request/XPackInfoRequestExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.xpack.info()" + }, + { + "language": "JavaScript", + "code": "const response = await client.xpack.info();" + }, + { + "language": "Ruby", + "code": "response = client.xpack.info" + }, + { + "language": "PHP", + "code": "$resp = $client->xpack()->info();" + }, + { + "language": "curl", + "code": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_xpack\"" + }, + { + "language": "Java", + "code": "client.xpack().info(i -> i);\n" + } + ], + "specification/cat/shards/examples/request/CatShardsRequestExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.cat.shards(\n format=\"json\",\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.cat.shards({\n format: \"json\",\n});" + }, + { + "language": "Ruby", + "code": "response = client.cat.shards(\n format: \"json\"\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->cat()->shards([\n \"format\" => \"json\",\n]);" + }, + { + "language": "curl", + "code": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_cat/shards?format=json\"" + }, + { + "language": "Java", + "code": "client.cat().shards();\n" + } + ], + "specification/cat/component_templates/examples/request/CatComponentTemplatesRequestExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.cat.component_templates(\n name=\"my-template-*\",\n v=True,\n s=\"name\",\n format=\"json\",\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.cat.componentTemplates({\n name: \"my-template-*\",\n v: \"true\",\n s: \"name\",\n format: \"json\",\n});" + }, + { + "language": "Ruby", + "code": "response = client.cat.component_templates(\n name: \"my-template-*\",\n v: \"true\",\n s: \"name\",\n format: \"json\"\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->cat()->componentTemplates([\n \"name\" => \"my-template-*\",\n \"v\" => \"true\",\n \"s\" => \"name\",\n \"format\" => \"json\",\n]);" + }, + { + "language": "curl", + "code": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_cat/component_templates/my-template-*?v=true&s=name&format=json\"" + }, + { + "language": "Java", + "code": "client.cat().componentTemplates();\n" + } + ], + "specification/cat/tasks/examples/request/CatTasksRequestExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.cat.tasks(\n v=True,\n format=\"json\",\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.cat.tasks({\n v: \"true\",\n format: \"json\",\n});" + }, + { + "language": "Ruby", + "code": "response = client.cat.tasks(\n v: \"true\",\n format: \"json\"\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->cat()->tasks([\n \"v\" => \"true\",\n \"format\" => \"json\",\n]);" + }, + { + "language": "curl", + "code": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_cat/tasks?v=true&format=json\"" + }, + { + "language": "Java", + "code": "client.cat().tasks();\n" + } + ], + "specification/cat/indices/examples/request/CatIndicesRequestExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.cat.indices(\n index=\"my-index-*\",\n v=True,\n s=\"index\",\n format=\"json\",\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.cat.indices({\n index: \"my-index-*\",\n v: \"true\",\n s: \"index\",\n format: \"json\",\n});" + }, + { + "language": "Ruby", + "code": "response = client.cat.indices(\n index: \"my-index-*\",\n v: \"true\",\n s: \"index\",\n format: \"json\"\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->cat()->indices([\n \"index\" => \"my-index-*\",\n \"v\" => \"true\",\n \"s\" => \"index\",\n \"format\" => \"json\",\n]);" + }, + { + "language": "curl", + "code": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_cat/indices/my-index-*?v=true&s=index&format=json\"" + }, + { + "language": "Java", + "code": "client.cat().indices();\n" + } + ], + "specification/cat/thread_pool/examples/request/CatThreadPoolRequestExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.cat.thread_pool(\n format=\"json\",\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.cat.threadPool({\n format: \"json\",\n});" + }, + { + "language": "Ruby", + "code": "response = client.cat.thread_pool(\n format: \"json\"\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->cat()->threadPool([\n \"format\" => \"json\",\n]);" + }, + { + "language": "curl", + "code": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_cat/thread_pool?format=json\"" + }, + { + "language": "Java", + "code": "client.cat().threadPool();\n" + } + ], + "specification/cat/pending_tasks/examples/request/CatPendingTasksRequestExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.cat.pending_tasks(\n v=\"trueh=insertOrder,timeInQueue,priority,source\",\n format=\"json\",\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.cat.pendingTasks({\n v: \"trueh=insertOrder,timeInQueue,priority,source\",\n format: \"json\",\n});" + }, + { + "language": "Ruby", + "code": "response = client.cat.pending_tasks(\n v: \"trueh=insertOrder,timeInQueue,priority,source\",\n format: \"json\"\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->cat()->pendingTasks([\n \"v\" => \"trueh=insertOrder,timeInQueue,priority,source\",\n \"format\" => \"json\",\n]);" + }, + { + "language": "curl", + "code": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_cat/pending_tasks?v=trueh=insertOrder,timeInQueue,priority,source&format=json\"" + }, + { + "language": "Java", + "code": "client.cat().pendingTasks();\n" + } + ], + "specification/cat/nodeattrs/examples/request/CatNodeAttributesRequestExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.cat.nodeattrs(\n v=True,\n format=\"json\",\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.cat.nodeattrs({\n v: \"true\",\n format: \"json\",\n});" + }, + { + "language": "Ruby", + "code": "response = client.cat.nodeattrs(\n v: \"true\",\n format: \"json\"\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->cat()->nodeattrs([\n \"v\" => \"true\",\n \"format\" => \"json\",\n]);" + }, + { + "language": "curl", + "code": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_cat/nodeattrs?v=true&format=json\"" + }, + { + "language": "Java", + "code": "client.cat().nodeattrs();\n" + } + ], + "specification/cat/snapshots/examples/request/CatSnapshotsRequestExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.cat.snapshots(\n repository=\"repo1\",\n v=True,\n s=\"id\",\n format=\"json\",\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.cat.snapshots({\n repository: \"repo1\",\n v: \"true\",\n s: \"id\",\n format: \"json\",\n});" + }, + { + "language": "Ruby", + "code": "response = client.cat.snapshots(\n repository: \"repo1\",\n v: \"true\",\n s: \"id\",\n format: \"json\"\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->cat()->snapshots([\n \"repository\" => \"repo1\",\n \"v\" => \"true\",\n \"s\" => \"id\",\n \"format\" => \"json\",\n]);" + }, + { + "language": "curl", + "code": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_cat/snapshots/repo1?v=true&s=id&format=json\"" + }, + { + "language": "Java", + "code": "client.cat().snapshots();\n" + } + ], + "specification/cat/nodes/examples/request/CatNodesRequestExample2.yaml": [ + { + "language": "Python", + "code": "resp = client.cat.nodes(\n v=True,\n h=\"id,ip,port,v,m\",\n format=\"json\",\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.cat.nodes({\n v: \"true\",\n h: \"id,ip,port,v,m\",\n format: \"json\",\n});" + }, + { + "language": "Ruby", + "code": "response = client.cat.nodes(\n v: \"true\",\n h: \"id,ip,port,v,m\",\n format: \"json\"\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->cat()->nodes([\n \"v\" => \"true\",\n \"h\" => \"id,ip,port,v,m\",\n \"format\" => \"json\",\n]);" + }, + { + "language": "curl", + "code": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_cat/nodes?v=true&h=id,ip,port,v,m&format=json\"" + }, + { + "language": "Java", + "code": "client.cat().nodes();\n" + } + ], + "specification/cat/ml_datafeeds/examples/request/CatDatafeedsRequestExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.cat.ml_datafeeds(\n v=True,\n format=\"json\",\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.cat.mlDatafeeds({\n v: \"true\",\n format: \"json\",\n});" + }, + { + "language": "Ruby", + "code": "response = client.cat.ml_datafeeds(\n v: \"true\",\n format: \"json\"\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->cat()->mlDatafeeds([\n \"v\" => \"true\",\n \"format\" => \"json\",\n]);" + }, + { + "language": "curl", + "code": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_cat/ml/datafeeds?v=true&format=json\"" + }, + { + "language": "Java", + "code": "client.cat().mlDatafeeds();\n" + } + ], + "specification/cat/plugins/examples/request/CatPluginsRequestExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.cat.plugins(\n v=True,\n s=\"component\",\n h=\"name,component,version,description\",\n format=\"json\",\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.cat.plugins({\n v: \"true\",\n s: \"component\",\n h: \"name,component,version,description\",\n format: \"json\",\n});" + }, + { + "language": "Ruby", + "code": "response = client.cat.plugins(\n v: \"true\",\n s: \"component\",\n h: \"name,component,version,description\",\n format: \"json\"\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->cat()->plugins([\n \"v\" => \"true\",\n \"s\" => \"component\",\n \"h\" => \"name,component,version,description\",\n \"format\" => \"json\",\n]);" + }, + { + "language": "curl", + "code": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_cat/plugins?v=true&s=component&h=name,component,version,description&format=json\"" + }, + { + "language": "Java", + "code": "client.cat().plugins();\n" + } + ], + "specification/cat/recovery/examples/request/CatRecoveryRequestExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.cat.recovery(\n v=True,\n format=\"json\",\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.cat.recovery({\n v: \"true\",\n format: \"json\",\n});" + }, + { + "language": "Ruby", + "code": "response = client.cat.recovery(\n v: \"true\",\n format: \"json\"\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->cat()->recovery([\n \"v\" => \"true\",\n \"format\" => \"json\",\n]);" + }, + { + "language": "curl", + "code": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_cat/recovery?v=true&format=json\"" + }, + { + "language": "Java", + "code": "client.cat().recovery();\n" + } + ], + "specification/cat/health/examples/request/CatHealthRequestExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.cat.health(\n v=True,\n format=\"json\",\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.cat.health({\n v: \"true\",\n format: \"json\",\n});" + }, + { + "language": "Ruby", + "code": "response = client.cat.health(\n v: \"true\",\n format: \"json\"\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->cat()->health([\n \"v\" => \"true\",\n \"format\" => \"json\",\n]);" + }, + { + "language": "curl", + "code": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_cat/health?v=true&format=json\"" + }, + { + "language": "Java", + "code": "client.cat().health();\n" + } + ], + "specification/cat/ml_jobs/examples/request/CatJobsRequestExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.cat.ml_jobs(\n h=\"id,s,dpr,mb\",\n v=True,\n format=\"json\",\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.cat.mlJobs({\n h: \"id,s,dpr,mb\",\n v: \"true\",\n format: \"json\",\n});" + }, + { + "language": "Ruby", + "code": "response = client.cat.ml_jobs(\n h: \"id,s,dpr,mb\",\n v: \"true\",\n format: \"json\"\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->cat()->mlJobs([\n \"h\" => \"id,s,dpr,mb\",\n \"v\" => \"true\",\n \"format\" => \"json\",\n]);" + }, + { + "language": "curl", + "code": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_cat/ml/anomaly_detectors?h=id,s,dpr,mb&v=true&format=json\"" + }, + { + "language": "Java", + "code": "client.cat().mlJobs();\n" + } + ], + "specification/cat/count/examples/request/CatCountRequestExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.cat.count(\n index=\"my-index-000001\",\n v=True,\n format=\"json\",\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.cat.count({\n index: \"my-index-000001\",\n v: \"true\",\n format: \"json\",\n});" + }, + { + "language": "Ruby", + "code": "response = client.cat.count(\n index: \"my-index-000001\",\n v: \"true\",\n format: \"json\"\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->cat()->count([\n \"index\" => \"my-index-000001\",\n \"v\" => \"true\",\n \"format\" => \"json\",\n]);" + }, + { + "language": "curl", + "code": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_cat/count/my-index-000001?v=true&format=json\"" + }, + { + "language": "Java", + "code": "client.cat().count();\n" + } + ], + "specification/cat/repositories/examples/request/CatRepositoriesRequestExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.cat.repositories(\n v=True,\n format=\"json\",\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.cat.repositories({\n v: \"true\",\n format: \"json\",\n});" + }, + { + "language": "Ruby", + "code": "response = client.cat.repositories(\n v: \"true\",\n format: \"json\"\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->cat()->repositories([\n \"v\" => \"true\",\n \"format\" => \"json\",\n]);" + }, + { + "language": "curl", + "code": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_cat/repositories?v=true&format=json\"" + }, + { + "language": "Java", + "code": "client.cat().repositories();\n" + } + ], + "specification/cat/ml_data_frame_analytics/examples/request/CatDataframeanalyticsRequestExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.cat.ml_data_frame_analytics(\n v=True,\n format=\"json\",\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.cat.mlDataFrameAnalytics({\n v: \"true\",\n format: \"json\",\n});" + }, + { + "language": "Ruby", + "code": "response = client.cat.ml_data_frame_analytics(\n v: \"true\",\n format: \"json\"\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->cat()->mlDataFrameAnalytics([\n \"v\" => \"true\",\n \"format\" => \"json\",\n]);" + }, + { + "language": "curl", + "code": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_cat/ml/data_frame/analytics?v=true&format=json\"" + }, + { + "language": "Java", + "code": "client.cat().mlDataFrameAnalytics();\n" + } + ], + "specification/cat/transforms/examples/request/CatTransformsRequestExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.cat.transforms(\n v=True,\n format=\"json\",\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.cat.transforms({\n v: \"true\",\n format: \"json\",\n});" + }, + { + "language": "Ruby", + "code": "response = client.cat.transforms(\n v: \"true\",\n format: \"json\"\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->cat()->transforms([\n \"v\" => \"true\",\n \"format\" => \"json\",\n]);" + }, + { + "language": "curl", + "code": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_cat/transforms?v=true&format=json\"" + }, + { + "language": "Java", + "code": "client.cat().transforms();\n" + } + ], + "specification/cat/master/examples/request/CatMasterRequestExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.cat.master(\n v=True,\n format=\"json\",\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.cat.master({\n v: \"true\",\n format: \"json\",\n});" + }, + { + "language": "Ruby", + "code": "response = client.cat.master(\n v: \"true\",\n format: \"json\"\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->cat()->master([\n \"v\" => \"true\",\n \"format\" => \"json\",\n]);" + }, + { + "language": "curl", + "code": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_cat/master?v=true&format=json\"" + }, + { + "language": "Java", + "code": "client.cat().master();\n" + } + ], + "specification/cat/templates/examples/request/CatTemplatesRequestExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.cat.templates(\n name=\"my-template-*\",\n v=True,\n s=\"name\",\n format=\"json\",\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.cat.templates({\n name: \"my-template-*\",\n v: \"true\",\n s: \"name\",\n format: \"json\",\n});" + }, + { + "language": "Ruby", + "code": "response = client.cat.templates(\n name: \"my-template-*\",\n v: \"true\",\n s: \"name\",\n format: \"json\"\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->cat()->templates([\n \"name\" => \"my-template-*\",\n \"v\" => \"true\",\n \"s\" => \"name\",\n \"format\" => \"json\",\n]);" + }, + { + "language": "curl", + "code": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_cat/templates/my-template-*?v=true&s=name&format=json\"" + }, + { + "language": "Java", + "code": "client.cat().templates();\n" + } + ], + "specification/cat/ml_trained_models/examples/request/CatTrainedModelsRequestExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.cat.ml_trained_models(\n v=True,\n format=\"json\",\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.cat.mlTrainedModels({\n v: \"true\",\n format: \"json\",\n});" + }, + { + "language": "Ruby", + "code": "response = client.cat.ml_trained_models(\n v: \"true\",\n format: \"json\"\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->cat()->mlTrainedModels([\n \"v\" => \"true\",\n \"format\" => \"json\",\n]);" + }, + { + "language": "curl", + "code": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_cat/ml/trained_models?v=true&format=json\"" + }, + { + "language": "Java", + "code": "client.cat().mlTrainedModels();\n" + } + ], + "specification/cat/aliases/examples/request/CatAliasesRequestExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.cat.aliases(\n format=\"json\",\n v=True,\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.cat.aliases({\n format: \"json\",\n v: \"true\",\n});" + }, + { + "language": "Ruby", + "code": "response = client.cat.aliases(\n format: \"json\",\n v: \"true\"\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->cat()->aliases([\n \"format\" => \"json\",\n \"v\" => \"true\",\n]);" + }, + { + "language": "curl", + "code": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_cat/aliases?format=json&v=true\"" + }, + { + "language": "Java", + "code": "client.cat().aliases();\n" + } + ], + "specification/cat/fielddata/examples/request/CatFielddataRequestExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.cat.fielddata(\n v=True,\n fields=\"body\",\n format=\"json\",\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.cat.fielddata({\n v: \"true\",\n fields: \"body\",\n format: \"json\",\n});" + }, + { + "language": "Ruby", + "code": "response = client.cat.fielddata(\n v: \"true\",\n fields: \"body\",\n format: \"json\"\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->cat()->fielddata([\n \"v\" => \"true\",\n \"fields\" => \"body\",\n \"format\" => \"json\",\n]);" + }, + { + "language": "curl", + "code": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_cat/fielddata?v=true&fields=body&format=json\"" + }, + { + "language": "Java", + "code": "client.cat().fielddata();\n" + } + ], + "specification/cat/segments/examples/request/CatSegmentsRequestExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.cat.segments(\n v=True,\n format=\"json\",\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.cat.segments({\n v: \"true\",\n format: \"json\",\n});" + }, + { + "language": "Ruby", + "code": "response = client.cat.segments(\n v: \"true\",\n format: \"json\"\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->cat()->segments([\n \"v\" => \"true\",\n \"format\" => \"json\",\n]);" + }, + { + "language": "curl", + "code": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_cat/segments?v=true&format=json\"" + }, + { + "language": "Java", + "code": "client.cat().segments();\n" + } + ], + "specification/cat/allocation/examples/request/CatAllocationRequestExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.cat.allocation(\n v=True,\n format=\"json\",\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.cat.allocation({\n v: \"true\",\n format: \"json\",\n});" + }, + { + "language": "Ruby", + "code": "response = client.cat.allocation(\n v: \"true\",\n format: \"json\"\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->cat()->allocation([\n \"v\" => \"true\",\n \"format\" => \"json\",\n]);" + }, + { + "language": "curl", + "code": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_cat/allocation?v=true&format=json\"" + }, + { + "language": "Java", + "code": "client.cat().allocation();\n" + } + ], + "specification/searchable_snapshots/cache_stats/examples/request/CacheStatsRequestExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.searchable_snapshots.cache_stats()" + }, + { + "language": "JavaScript", + "code": "const response = await client.searchableSnapshots.cacheStats();" + }, + { + "language": "Ruby", + "code": "response = client.searchable_snapshots.cache_stats" + }, + { + "language": "PHP", + "code": "$resp = $client->searchableSnapshots()->cacheStats();" + }, + { + "language": "curl", + "code": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_searchable_snapshots/cache/stats\"" + }, + { + "language": "Java", + "code": "client.searchableSnapshots().cacheStats(c -> c);\n" + } + ], + "specification/searchable_snapshots/clear_cache/examples/request/SearchableSnapshotsClearCacheExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.searchable_snapshots.clear_cache(\n index=\"my-index\",\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.searchableSnapshots.clearCache({\n index: \"my-index\",\n});" + }, + { + "language": "Ruby", + "code": "response = client.searchable_snapshots.clear_cache(\n index: \"my-index\"\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->searchableSnapshots()->clearCache([\n \"index\" => \"my-index\",\n]);" + }, + { + "language": "curl", + "code": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/my-index/_searchable_snapshots/cache/clear\"" + }, + { + "language": "Java", + "code": "client.searchableSnapshots().clearCache(c -> c\n .index(\"my-index\")\n);\n" + } + ], + "specification/searchable_snapshots/mount/examples/request/SearchableSnapshotsMountSnapshotRequestExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.searchable_snapshots.mount(\n repository=\"my_repository\",\n snapshot=\"my_snapshot\",\n wait_for_completion=True,\n index=\"my_docs\",\n renamed_index=\"docs\",\n index_settings={\n \"index.number_of_replicas\": 0\n },\n ignore_index_settings=[\n \"index.refresh_interval\"\n ],\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.searchableSnapshots.mount({\n repository: \"my_repository\",\n snapshot: \"my_snapshot\",\n wait_for_completion: \"true\",\n index: \"my_docs\",\n renamed_index: \"docs\",\n index_settings: {\n \"index.number_of_replicas\": 0,\n },\n ignore_index_settings: [\"index.refresh_interval\"],\n});" + }, + { + "language": "Ruby", + "code": "response = client.searchable_snapshots.mount(\n repository: \"my_repository\",\n snapshot: \"my_snapshot\",\n wait_for_completion: \"true\",\n body: {\n \"index\": \"my_docs\",\n \"renamed_index\": \"docs\",\n \"index_settings\": {\n \"index.number_of_replicas\": 0\n },\n \"ignore_index_settings\": [\n \"index.refresh_interval\"\n ]\n }\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->searchableSnapshots()->mount([\n \"repository\" => \"my_repository\",\n \"snapshot\" => \"my_snapshot\",\n \"wait_for_completion\" => \"true\",\n \"body\" => [\n \"index\" => \"my_docs\",\n \"renamed_index\" => \"docs\",\n \"index_settings\" => [\n \"index.number_of_replicas\" => 0,\n ],\n \"ignore_index_settings\" => array(\n \"index.refresh_interval\",\n ),\n ],\n]);" + }, + { + "language": "curl", + "code": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"index\":\"my_docs\",\"renamed_index\":\"docs\",\"index_settings\":{\"index.number_of_replicas\":0},\"ignore_index_settings\":[\"index.refresh_interval\"]}' \"$ELASTICSEARCH_URL/_snapshot/my_repository/my_snapshot/_mount?wait_for_completion=true\"" + }, + { + "language": "Java", + "code": "client.searchableSnapshots().mount(m -> m\n .ignoreIndexSettings(\"index.refresh_interval\")\n .index(\"my_docs\")\n .indexSettings(\"index.number_of_replicas\", JsonData.fromJson(\"0\"))\n .renamedIndex(\"docs\")\n .repository(\"my_repository\")\n .snapshot(\"my_snapshot\")\n .waitForCompletion(true)\n);\n" + } + ], + "specification/searchable_snapshots/stats/examples/request/SearchableSnapshotsStatsExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.searchable_snapshots.stats(\n index=\"my-index\",\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.searchableSnapshots.stats({\n index: \"my-index\",\n});" + }, + { + "language": "Ruby", + "code": "response = client.searchable_snapshots.stats(\n index: \"my-index\"\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->searchableSnapshots()->stats([\n \"index\" => \"my-index\",\n]);" + }, + { + "language": "curl", + "code": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/my-index/_searchable_snapshots/stats\"" + }, + { + "language": "Java", + "code": "client.searchableSnapshots().stats(s -> s\n .index(\"my-index\")\n);\n" + } + ], + "specification/snapshot/delete_repository/examples/request/SnapshotDeleteRepositoryExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.snapshot.delete_repository(\n name=\"my_repository\",\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.snapshot.deleteRepository({\n name: \"my_repository\",\n});" + }, + { + "language": "Ruby", + "code": "response = client.snapshot.delete_repository(\n repository: \"my_repository\"\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->snapshot()->deleteRepository([\n \"repository\" => \"my_repository\",\n]);" + }, + { + "language": "curl", + "code": "curl -X DELETE -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_snapshot/my_repository\"" + }, + { + "language": "Java", + "code": "client.snapshot().deleteRepository(d -> d\n .name(\"my_repository\")\n);\n" + } + ], + "specification/snapshot/create_repository/examples/request/SnapshotCreateRepositoryRequestExample4.yaml": [ + { + "language": "Python", + "code": "resp = client.snapshot.create_repository(\n name=\"my_s3_repository\",\n repository={\n \"type\": \"s3\",\n \"settings\": {\n \"bucket\": \"my-bucket\"\n }\n },\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.snapshot.createRepository({\n name: \"my_s3_repository\",\n repository: {\n type: \"s3\",\n settings: {\n bucket: \"my-bucket\",\n },\n },\n});" + }, + { + "language": "Ruby", + "code": "response = client.snapshot.create_repository(\n repository: \"my_s3_repository\",\n body: {\n \"type\": \"s3\",\n \"settings\": {\n \"bucket\": \"my-bucket\"\n }\n }\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->snapshot()->createRepository([\n \"repository\" => \"my_s3_repository\",\n \"body\" => [\n \"type\" => \"s3\",\n \"settings\" => [\n \"bucket\" => \"my-bucket\",\n ],\n ],\n]);" + }, + { + "language": "curl", + "code": "curl -X PUT -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"type\":\"s3\",\"settings\":{\"bucket\":\"my-bucket\"}}' \"$ELASTICSEARCH_URL/_snapshot/my_s3_repository\"" + }, + { + "language": "Java", + "code": "client.snapshot().createRepository(c -> c\n .name(\"my_s3_repository\")\n .repository(r -> r\n .s3(s -> s\n .settings(se -> se\n .bucket(\"my-bucket\")\n )\n )\n )\n);\n" + } + ], + "specification/snapshot/create_repository/examples/request/SnapshotCreateRepositoryRequestExample5.yaml": [ + { + "language": "Python", + "code": "resp = client.snapshot.create_repository(\n name=\"my_src_only_repository\",\n repository={\n \"type\": \"source\",\n \"settings\": {\n \"delegate_type\": \"fs\",\n \"location\": \"my_backup_repository\"\n }\n },\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.snapshot.createRepository({\n name: \"my_src_only_repository\",\n repository: {\n type: \"source\",\n settings: {\n delegate_type: \"fs\",\n location: \"my_backup_repository\",\n },\n },\n});" + }, + { + "language": "Ruby", + "code": "response = client.snapshot.create_repository(\n repository: \"my_src_only_repository\",\n body: {\n \"type\": \"source\",\n \"settings\": {\n \"delegate_type\": \"fs\",\n \"location\": \"my_backup_repository\"\n }\n }\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->snapshot()->createRepository([\n \"repository\" => \"my_src_only_repository\",\n \"body\" => [\n \"type\" => \"source\",\n \"settings\" => [\n \"delegate_type\" => \"fs\",\n \"location\" => \"my_backup_repository\",\n ],\n ],\n]);" + }, + { + "language": "curl", + "code": "curl -X PUT -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"type\":\"source\",\"settings\":{\"delegate_type\":\"fs\",\"location\":\"my_backup_repository\"}}' \"$ELASTICSEARCH_URL/_snapshot/my_src_only_repository\"" + }, + { + "language": "Java", + "code": "client.snapshot().createRepository(c -> c\n .name(\"my_src_only_repository\")\n .repository(r -> r\n .source(s -> s\n .settings(se -> se\n .delegateType(\"fs\")\n )\n )\n )\n);\n" + } + ], + "specification/snapshot/create_repository/examples/request/SnapshotCreateRepositoryRequestExample2.yaml": [ + { + "language": "Python", + "code": "resp = client.snapshot.create_repository(\n name=\"my_backup\",\n repository={\n \"type\": \"azure\",\n \"settings\": {\n \"client\": \"secondary\"\n }\n },\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.snapshot.createRepository({\n name: \"my_backup\",\n repository: {\n type: \"azure\",\n settings: {\n client: \"secondary\",\n },\n },\n});" + }, + { + "language": "Ruby", + "code": "response = client.snapshot.create_repository(\n repository: \"my_backup\",\n body: {\n \"type\": \"azure\",\n \"settings\": {\n \"client\": \"secondary\"\n }\n }\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->snapshot()->createRepository([\n \"repository\" => \"my_backup\",\n \"body\" => [\n \"type\" => \"azure\",\n \"settings\" => [\n \"client\" => \"secondary\",\n ],\n ],\n]);" + }, + { + "language": "curl", + "code": "curl -X PUT -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"type\":\"azure\",\"settings\":{\"client\":\"secondary\"}}' \"$ELASTICSEARCH_URL/_snapshot/my_backup\"" + }, + { + "language": "Java", + "code": "client.snapshot().createRepository(c -> c\n .name(\"my_backup\")\n .repository(r -> r\n .azure(a -> a\n .settings(s -> s\n .client(\"secondary\")\n )\n )\n )\n);\n" + } + ], + "specification/snapshot/create_repository/examples/request/SnapshotCreateRepositoryRequestExample3.yaml": [ + { + "language": "Python", + "code": "resp = client.snapshot.create_repository(\n name=\"my_gcs_repository\",\n repository={\n \"type\": \"gcs\",\n \"settings\": {\n \"bucket\": \"my_other_bucket\",\n \"base_path\": \"dev\"\n }\n },\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.snapshot.createRepository({\n name: \"my_gcs_repository\",\n repository: {\n type: \"gcs\",\n settings: {\n bucket: \"my_other_bucket\",\n base_path: \"dev\",\n },\n },\n});" + }, + { + "language": "Ruby", + "code": "response = client.snapshot.create_repository(\n repository: \"my_gcs_repository\",\n body: {\n \"type\": \"gcs\",\n \"settings\": {\n \"bucket\": \"my_other_bucket\",\n \"base_path\": \"dev\"\n }\n }\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->snapshot()->createRepository([\n \"repository\" => \"my_gcs_repository\",\n \"body\" => [\n \"type\" => \"gcs\",\n \"settings\" => [\n \"bucket\" => \"my_other_bucket\",\n \"base_path\" => \"dev\",\n ],\n ],\n]);" + }, + { + "language": "curl", + "code": "curl -X PUT -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"type\":\"gcs\",\"settings\":{\"bucket\":\"my_other_bucket\",\"base_path\":\"dev\"}}' \"$ELASTICSEARCH_URL/_snapshot/my_gcs_repository\"" + }, + { + "language": "Java", + "code": "client.snapshot().createRepository(c -> c\n .name(\"my_gcs_repository\")\n .repository(r -> r\n .gcs(g -> g\n .settings(s -> s\n .bucket(\"my_other_bucket\")\n .basePath(\"dev\")\n )\n )\n )\n);\n" + } + ], + "specification/snapshot/create_repository/examples/request/SnapshotCreateRepositoryRequestExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.snapshot.create_repository(\n name=\"my_repository\",\n repository={\n \"type\": \"fs\",\n \"settings\": {\n \"location\": \"my_backup_location\"\n }\n },\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.snapshot.createRepository({\n name: \"my_repository\",\n repository: {\n type: \"fs\",\n settings: {\n location: \"my_backup_location\",\n },\n },\n});" + }, + { + "language": "Ruby", + "code": "response = client.snapshot.create_repository(\n repository: \"my_repository\",\n body: {\n \"type\": \"fs\",\n \"settings\": {\n \"location\": \"my_backup_location\"\n }\n }\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->snapshot()->createRepository([\n \"repository\" => \"my_repository\",\n \"body\" => [\n \"type\" => \"fs\",\n \"settings\" => [\n \"location\" => \"my_backup_location\",\n ],\n ],\n]);" + }, + { + "language": "curl", + "code": "curl -X PUT -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"type\":\"fs\",\"settings\":{\"location\":\"my_backup_location\"}}' \"$ELASTICSEARCH_URL/_snapshot/my_repository\"" + }, + { + "language": "Java", + "code": "client.snapshot().createRepository(c -> c\n .name(\"my_repository\")\n .repository(r -> r\n .fs(f -> f\n .settings(s -> s\n .location(\"my_backup_location\")\n )\n )\n )\n);\n" + } + ], + "specification/snapshot/create_repository/examples/request/SnapshotCreateRepositoryRequestExample6.yaml": [ + { + "language": "Python", + "code": "resp = client.snapshot.create_repository(\n name=\"my_read_only_url_repository\",\n repository={\n \"type\": \"url\",\n \"settings\": {\n \"url\": \"file:/mount/backups/my_fs_backup_location\"\n }\n },\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.snapshot.createRepository({\n name: \"my_read_only_url_repository\",\n repository: {\n type: \"url\",\n settings: {\n url: \"file:/mount/backups/my_fs_backup_location\",\n },\n },\n});" + }, + { + "language": "Ruby", + "code": "response = client.snapshot.create_repository(\n repository: \"my_read_only_url_repository\",\n body: {\n \"type\": \"url\",\n \"settings\": {\n \"url\": \"file:/mount/backups/my_fs_backup_location\"\n }\n }\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->snapshot()->createRepository([\n \"repository\" => \"my_read_only_url_repository\",\n \"body\" => [\n \"type\" => \"url\",\n \"settings\" => [\n \"url\" => \"file:/mount/backups/my_fs_backup_location\",\n ],\n ],\n]);" + }, + { + "language": "curl", + "code": "curl -X PUT -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"type\":\"url\",\"settings\":{\"url\":\"file:/mount/backups/my_fs_backup_location\"}}' \"$ELASTICSEARCH_URL/_snapshot/my_read_only_url_repository\"" + }, + { + "language": "Java", + "code": "client.snapshot().createRepository(c -> c\n .name(\"my_read_only_url_repository\")\n .repository(r -> r\n .url(u -> u\n .settings(s -> s\n .url(\"file:/mount/backups/my_fs_backup_location\")\n )\n )\n )\n);\n" + } + ], + "specification/snapshot/delete/examples/request/SnapshotDeleteRequestExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.snapshot.delete(\n repository=\"my_repository\",\n snapshot=\"snapshot_2,snapshot_3\",\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.snapshot.delete({\n repository: \"my_repository\",\n snapshot: \"snapshot_2,snapshot_3\",\n});" + }, + { + "language": "Ruby", + "code": "response = client.snapshot.delete(\n repository: \"my_repository\",\n snapshot: \"snapshot_2,snapshot_3\"\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->snapshot()->delete([\n \"repository\" => \"my_repository\",\n \"snapshot\" => \"snapshot_2,snapshot_3\",\n]);" + }, + { + "language": "curl", + "code": "curl -X DELETE -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_snapshot/my_repository/snapshot_2,snapshot_3\"" + }, + { + "language": "Java", + "code": "client.snapshot().delete(d -> d\n .repository(\"my_repository\")\n .snapshot(\"snapshot_2,snapshot_3\")\n);\n" + } + ], + "specification/snapshot/verify_repository/examples/request/SnapshotVerifyRepositoryExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.snapshot.verify_repository(\n name=\"my_unverified_backup\",\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.snapshot.verifyRepository({\n name: \"my_unverified_backup\",\n});" + }, + { + "language": "Ruby", + "code": "response = client.snapshot.verify_repository(\n repository: \"my_unverified_backup\"\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->snapshot()->verifyRepository([\n \"repository\" => \"my_unverified_backup\",\n]);" + }, + { + "language": "curl", + "code": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_snapshot/my_unverified_backup/_verify\"" + }, + { + "language": "Java", + "code": "client.snapshot().verifyRepository(v -> v\n .name(\"my_unverified_backup\")\n);\n" + } + ], + "specification/snapshot/get/examples/request/SnapshotGetRequestExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.snapshot.get(\n repository=\"my_repository\",\n snapshot=\"snapshot_*\",\n sort=\"start_time\",\n from_sort_value=\"1577833200000\",\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.snapshot.get({\n repository: \"my_repository\",\n snapshot: \"snapshot_*\",\n sort: \"start_time\",\n from_sort_value: 1577833200000,\n});" + }, + { + "language": "Ruby", + "code": "response = client.snapshot.get(\n repository: \"my_repository\",\n snapshot: \"snapshot_*\",\n sort: \"start_time\",\n from_sort_value: \"1577833200000\"\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->snapshot()->get([\n \"repository\" => \"my_repository\",\n \"snapshot\" => \"snapshot_*\",\n \"sort\" => \"start_time\",\n \"from_sort_value\" => \"1577833200000\",\n]);" + }, + { + "language": "curl", + "code": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_snapshot/my_repository/snapshot_*?sort=start_time&from_sort_value=1577833200000\"" + }, + { + "language": "Java", + "code": "client.snapshot().get(g -> g\n .fromSortValue(\"1577833200000\")\n .repository(\"my_repository\")\n .snapshot(\"snapshot_*\")\n .sort(SnapshotSort.StartTime)\n);\n" + } + ], + "specification/snapshot/repository_analyze/examples/request/SnapshotRepositoryAnalyzeRequestExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.snapshot.repository_analyze(\n name=\"my_repository\",\n blob_count=\"10\",\n max_blob_size=\"1mb\",\n timeout=\"120s\",\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.snapshot.repositoryAnalyze({\n name: \"my_repository\",\n blob_count: 10,\n max_blob_size: \"1mb\",\n timeout: \"120s\",\n});" + }, + { + "language": "Ruby", + "code": "response = client.snapshot.repository_analyze(\n repository: \"my_repository\",\n blob_count: \"10\",\n max_blob_size: \"1mb\",\n timeout: \"120s\"\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->snapshot()->repositoryAnalyze([\n \"repository\" => \"my_repository\",\n \"blob_count\" => \"10\",\n \"max_blob_size\" => \"1mb\",\n \"timeout\" => \"120s\",\n]);" + }, + { + "language": "curl", + "code": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_snapshot/my_repository/_analyze?blob_count=10&max_blob_size=1mb&timeout=120s\"" + }, + { + "language": "Java", + "code": "client.snapshot().repositoryAnalyze(r -> r\n .blobCount(10)\n .maxBlobSize(\"1mb\")\n .name(\"my_repository\")\n .timeout(t -> t\n .offset(120)\n )\n);\n" + } + ], + "specification/snapshot/status/examples/request/SnapshotStatusRequestExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.snapshot.status(\n repository=\"my_repository\",\n snapshot=\"snapshot_2\",\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.snapshot.status({\n repository: \"my_repository\",\n snapshot: \"snapshot_2\",\n});" + }, + { + "language": "Ruby", + "code": "response = client.snapshot.status(\n repository: \"my_repository\",\n snapshot: \"snapshot_2\"\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->snapshot()->status([\n \"repository\" => \"my_repository\",\n \"snapshot\" => \"snapshot_2\",\n]);" + }, + { + "language": "curl", + "code": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_snapshot/my_repository/snapshot_2/_status\"" + }, + { + "language": "Java", + "code": "client.snapshot().status(s -> s\n .repository(\"my_repository\")\n .snapshot(\"snapshot_2\")\n);\n" + } + ], + "specification/snapshot/cleanup_repository/examples/request/SnapshotCleanupRepositoryRequestExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.snapshot.cleanup_repository(\n name=\"my_repository\",\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.snapshot.cleanupRepository({\n name: \"my_repository\",\n});" + }, + { + "language": "Ruby", + "code": "response = client.snapshot.cleanup_repository(\n repository: \"my_repository\"\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->snapshot()->cleanupRepository([\n \"repository\" => \"my_repository\",\n]);" + }, + { + "language": "curl", + "code": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_snapshot/my_repository/_cleanup\"" + }, + { + "language": "Java", + "code": "client.snapshot().cleanupRepository(c -> c\n .name(\"my_repository\")\n);\n" + } + ], + "specification/snapshot/repository_verify_integrity/examples/request/SnapshotRepositoryVerifyIntegrityExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.snapshot.repository_verify_integrity(\n name=\"my_repository\",\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.snapshot.repositoryVerifyIntegrity({\n name: \"my_repository\",\n});" + }, + { + "language": "Ruby", + "code": "response = client.snapshot.repository_verify_integrity(\n repository: \"my_repository\"\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->snapshot()->repositoryVerifyIntegrity([\n \"repository\" => \"my_repository\",\n]);" + }, + { + "language": "curl", + "code": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_snapshot/my_repository/_verify_integrity\"" + }, + { + "language": "Java", + "code": "client.snapshot().repositoryVerifyIntegrity(r -> r\n .name(\"my_repository\")\n);\n" + } + ], + "specification/snapshot/clone/examples/request/SnapshotCloneRequestExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.snapshot.clone(\n repository=\"my_repository\",\n snapshot=\"source_snapshot\",\n target_snapshot=\"target_snapshot\",\n indices=\"index_a,index_b\",\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.snapshot.clone({\n repository: \"my_repository\",\n snapshot: \"source_snapshot\",\n target_snapshot: \"target_snapshot\",\n indices: \"index_a,index_b\",\n});" + }, + { + "language": "Ruby", + "code": "response = client.snapshot.clone(\n repository: \"my_repository\",\n snapshot: \"source_snapshot\",\n target_snapshot: \"target_snapshot\",\n body: {\n \"indices\": \"index_a,index_b\"\n }\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->snapshot()->clone([\n \"repository\" => \"my_repository\",\n \"snapshot\" => \"source_snapshot\",\n \"target_snapshot\" => \"target_snapshot\",\n \"body\" => [\n \"indices\" => \"index_a,index_b\",\n ],\n]);" + }, + { + "language": "curl", + "code": "curl -X PUT -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"indices\":\"index_a,index_b\"}' \"$ELASTICSEARCH_URL/_snapshot/my_repository/source_snapshot/_clone/target_snapshot\"" + }, + { + "language": "Java", + "code": "client.snapshot().clone(c -> c\n .indices(\"index_a,index_b\")\n .repository(\"my_repository\")\n .snapshot(\"source_snapshot\")\n .targetSnapshot(\"target_snapshot\")\n);\n" + } + ], + "specification/snapshot/get_repository/examples/request/SnapshotGetRepositoryRequestExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.snapshot.get_repository(\n name=\"my_repository\",\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.snapshot.getRepository({\n name: \"my_repository\",\n});" + }, + { + "language": "Ruby", + "code": "response = client.snapshot.get_repository(\n repository: \"my_repository\"\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->snapshot()->getRepository([\n \"repository\" => \"my_repository\",\n]);" + }, + { + "language": "curl", + "code": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_snapshot/my_repository\"" + }, + { + "language": "Java", + "code": "client.snapshot().getRepository(g -> g\n .name(\"my_repository\")\n);\n" + } + ], + "specification/snapshot/create/examples/request/SnapshotCreateRequestExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.snapshot.create(\n repository=\"my_repository\",\n snapshot=\"snapshot_2\",\n wait_for_completion=True,\n indices=\"index_1,index_2\",\n ignore_unavailable=True,\n include_global_state=False,\n metadata={\n \"taken_by\": \"user123\",\n \"taken_because\": \"backup before upgrading\"\n },\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.snapshot.create({\n repository: \"my_repository\",\n snapshot: \"snapshot_2\",\n wait_for_completion: \"true\",\n indices: \"index_1,index_2\",\n ignore_unavailable: true,\n include_global_state: false,\n metadata: {\n taken_by: \"user123\",\n taken_because: \"backup before upgrading\",\n },\n});" + }, + { + "language": "Ruby", + "code": "response = client.snapshot.create(\n repository: \"my_repository\",\n snapshot: \"snapshot_2\",\n wait_for_completion: \"true\",\n body: {\n \"indices\": \"index_1,index_2\",\n \"ignore_unavailable\": true,\n \"include_global_state\": false,\n \"metadata\": {\n \"taken_by\": \"user123\",\n \"taken_because\": \"backup before upgrading\"\n }\n }\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->snapshot()->create([\n \"repository\" => \"my_repository\",\n \"snapshot\" => \"snapshot_2\",\n \"wait_for_completion\" => \"true\",\n \"body\" => [\n \"indices\" => \"index_1,index_2\",\n \"ignore_unavailable\" => true,\n \"include_global_state\" => false,\n \"metadata\" => [\n \"taken_by\" => \"user123\",\n \"taken_because\" => \"backup before upgrading\",\n ],\n ],\n]);" + }, + { + "language": "curl", + "code": "curl -X PUT -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"indices\":\"index_1,index_2\",\"ignore_unavailable\":true,\"include_global_state\":false,\"metadata\":{\"taken_by\":\"user123\",\"taken_because\":\"backup before upgrading\"}}' \"$ELASTICSEARCH_URL/_snapshot/my_repository/snapshot_2?wait_for_completion=true\"" + }, + { + "language": "Java", + "code": "client.snapshot().create(c -> c\n .ignoreUnavailable(true)\n .includeGlobalState(false)\n .indices(\"index_1,index_2\")\n .metadata(Map.of(\"taken_by\", JsonData.fromJson(\"\\\"user123\\\"\"),\"taken_because\", JsonData.fromJson(\"\\\"backup before upgrading\\\"\")))\n .repository(\"my_repository\")\n .snapshot(\"snapshot_2\")\n .waitForCompletion(true)\n);\n" + } + ], + "specification/snapshot/restore/examples/request/SnapshotRestoreRequestExample2.yaml": [ + { + "language": "Python", + "code": "resp = client.cluster.put_settings(\n indices=\"index_1\",\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.cluster.putSettings({\n indices: \"index_1\",\n});" + }, + { + "language": "Ruby", + "code": "response = client.cluster.put_settings(\n body: {\n \"indices\": \"index_1\"\n }\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->cluster()->putSettings([\n \"body\" => [\n \"indices\" => \"index_1\",\n ],\n]);" + }, + { + "language": "curl", + "code": "curl -X PUT -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"indices\":\"index_1\"}' \"$ELASTICSEARCH_URL/_cluster/settings\"" + }, + { + "language": "Java", + "code": "client.cluster().putSettings();\n" + } + ], + "specification/snapshot/restore/examples/request/SnapshotRestoreRequestExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.snapshot.restore(\n repository=\"my_repository\",\n snapshot=\"snapshot_2\",\n wait_for_completion=True,\n indices=\"index_1,index_2\",\n ignore_unavailable=True,\n include_global_state=False,\n rename_pattern=\"index_(.+)\",\n rename_replacement=\"restored_index_$1\",\n include_aliases=False,\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.snapshot.restore({\n repository: \"my_repository\",\n snapshot: \"snapshot_2\",\n wait_for_completion: \"true\",\n indices: \"index_1,index_2\",\n ignore_unavailable: true,\n include_global_state: false,\n rename_pattern: \"index_(.+)\",\n rename_replacement: \"restored_index_$1\",\n include_aliases: false,\n});" + }, + { + "language": "Ruby", + "code": "response = client.snapshot.restore(\n repository: \"my_repository\",\n snapshot: \"snapshot_2\",\n wait_for_completion: \"true\",\n body: {\n \"indices\": \"index_1,index_2\",\n \"ignore_unavailable\": true,\n \"include_global_state\": false,\n \"rename_pattern\": \"index_(.+)\",\n \"rename_replacement\": \"restored_index_$1\",\n \"include_aliases\": false\n }\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->snapshot()->restore([\n \"repository\" => \"my_repository\",\n \"snapshot\" => \"snapshot_2\",\n \"wait_for_completion\" => \"true\",\n \"body\" => [\n \"indices\" => \"index_1,index_2\",\n \"ignore_unavailable\" => true,\n \"include_global_state\" => false,\n \"rename_pattern\" => \"index_(.+)\",\n \"rename_replacement\" => \"restored_index_$1\",\n \"include_aliases\" => false,\n ],\n]);" + }, + { + "language": "curl", + "code": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"indices\":\"index_1,index_2\",\"ignore_unavailable\":true,\"include_global_state\":false,\"rename_pattern\":\"index_(.+)\",\"rename_replacement\":\"restored_index_$1\",\"include_aliases\":false}' \"$ELASTICSEARCH_URL/_snapshot/my_repository/snapshot_2/_restore?wait_for_completion=true\"" + }, + { + "language": "Java", + "code": "client.snapshot().restore(r -> r\n .ignoreUnavailable(true)\n .includeAliases(false)\n .includeGlobalState(false)\n .indices(\"index_1,index_2\")\n .renamePattern(\"index_(.+)\")\n .renameReplacement(\"restored_index_$1\")\n .repository(\"my_repository\")\n .snapshot(\"snapshot_2\")\n .waitForCompletion(true)\n);\n" + } + ], + "specification/cluster/delete_component_template/examples/request/ClusterDeleteComponentTemplateExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.cluster.delete_component_template(\n name=\"template_1\",\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.cluster.deleteComponentTemplate({\n name: \"template_1\",\n});" + }, + { + "language": "Ruby", + "code": "response = client.cluster.delete_component_template(\n name: \"template_1\"\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->cluster()->deleteComponentTemplate([\n \"name\" => \"template_1\",\n]);" + }, + { + "language": "curl", + "code": "curl -X DELETE -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_component_template/template_1\"" + }, + { + "language": "Java", + "code": "client.cluster().deleteComponentTemplate(d -> d\n .name(\"template_1\")\n);\n" + } + ], + "specification/cluster/pending_tasks/examples/request/ClusterPendingTasksExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.cluster.pending_tasks()" + }, + { + "language": "JavaScript", + "code": "const response = await client.cluster.pendingTasks();" + }, + { + "language": "Ruby", + "code": "response = client.cluster.pending_tasks" + }, + { + "language": "PHP", + "code": "$resp = $client->cluster()->pendingTasks();" + }, + { + "language": "curl", + "code": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_cluster/pending_tasks\"" + }, + { + "language": "Java", + "code": "client.cluster().pendingTasks(p -> p);\n" + } + ], + "specification/cluster/put_component_template/examples/request/ClusterPutComponentTemplateRequestExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.cluster.put_component_template(\n name=\"template_1\",\n template=None,\n settings={\n \"number_of_shards\": 1\n },\n mappings={\n \"_source\": {\n \"enabled\": False\n },\n \"properties\": {\n \"host_name\": {\n \"type\": \"keyword\"\n },\n \"created_at\": {\n \"type\": \"date\",\n \"format\": \"EEE MMM dd HH:mm:ss Z yyyy\"\n }\n }\n },\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.cluster.putComponentTemplate({\n name: \"template_1\",\n template: null,\n settings: {\n number_of_shards: 1,\n },\n mappings: {\n _source: {\n enabled: false,\n },\n properties: {\n host_name: {\n type: \"keyword\",\n },\n created_at: {\n type: \"date\",\n format: \"EEE MMM dd HH:mm:ss Z yyyy\",\n },\n },\n },\n});" + }, + { + "language": "Ruby", + "code": "response = client.cluster.put_component_template(\n name: \"template_1\",\n body: {\n \"template\": nil,\n \"settings\": {\n \"number_of_shards\": 1\n },\n \"mappings\": {\n \"_source\": {\n \"enabled\": false\n },\n \"properties\": {\n \"host_name\": {\n \"type\": \"keyword\"\n },\n \"created_at\": {\n \"type\": \"date\",\n \"format\": \"EEE MMM dd HH:mm:ss Z yyyy\"\n }\n }\n }\n }\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->cluster()->putComponentTemplate([\n \"name\" => \"template_1\",\n \"body\" => [\n \"template\" => null,\n \"settings\" => [\n \"number_of_shards\" => 1,\n ],\n \"mappings\" => [\n \"_source\" => [\n \"enabled\" => false,\n ],\n \"properties\" => [\n \"host_name\" => [\n \"type\" => \"keyword\",\n ],\n \"created_at\" => [\n \"type\" => \"date\",\n \"format\" => \"EEE MMM dd HH:mm:ss Z yyyy\",\n ],\n ],\n ],\n ],\n]);" + }, + { + "language": "curl", + "code": "curl -X PUT -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"template\":null,\"settings\":{\"number_of_shards\":1},\"mappings\":{\"_source\":{\"enabled\":false},\"properties\":{\"host_name\":{\"type\":\"keyword\"},\"created_at\":{\"type\":\"date\",\"format\":\"EEE MMM dd HH:mm:ss Z yyyy\"}}}}' \"$ELASTICSEARCH_URL/_component_template/template_1\"" + } + ], + "specification/cluster/put_component_template/examples/request/ClusterPutComponentTemplateRequestExample2.yaml": [ + { + "language": "Python", + "code": "resp = client.cluster.put_component_template(\n name=\"template_1\",\n template=None,\n settings={\n \"number_of_shards\": 1\n },\n aliases={\n \"alias1\": {},\n \"alias2\": {\n \"filter\": {\n \"term\": {\n \"user.id\": \"kimchy\"\n }\n },\n \"routing\": \"shard-1\"\n },\n \"{index}-alias\": {}\n },\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.cluster.putComponentTemplate({\n name: \"template_1\",\n template: null,\n settings: {\n number_of_shards: 1,\n },\n aliases: {\n alias1: {},\n alias2: {\n filter: {\n term: {\n \"user.id\": \"kimchy\",\n },\n },\n routing: \"shard-1\",\n },\n \"{index}-alias\": {},\n },\n});" + }, + { + "language": "Ruby", + "code": "response = client.cluster.put_component_template(\n name: \"template_1\",\n body: {\n \"template\": nil,\n \"settings\": {\n \"number_of_shards\": 1\n },\n \"aliases\": {\n \"alias1\": {},\n \"alias2\": {\n \"filter\": {\n \"term\": {\n \"user.id\": \"kimchy\"\n }\n },\n \"routing\": \"shard-1\"\n },\n \"{index}-alias\": {}\n }\n }\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->cluster()->putComponentTemplate([\n \"name\" => \"template_1\",\n \"body\" => [\n \"template\" => null,\n \"settings\" => [\n \"number_of_shards\" => 1,\n ],\n \"aliases\" => [\n \"alias1\" => new ArrayObject([]),\n \"alias2\" => [\n \"filter\" => [\n \"term\" => [\n \"user.id\" => \"kimchy\",\n ],\n ],\n \"routing\" => \"shard-1\",\n ],\n \"{index}-alias\" => new ArrayObject([]),\n ],\n ],\n]);" + }, + { + "language": "curl", + "code": "curl -X PUT -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"template\":null,\"settings\":{\"number_of_shards\":1},\"aliases\":{\"alias1\":{},\"alias2\":{\"filter\":{\"term\":{\"user.id\":\"kimchy\"}},\"routing\":\"shard-1\"},\"{index}-alias\":{}}}' \"$ELASTICSEARCH_URL/_component_template/template_1\"" + } + ], + "specification/cluster/get_settings/examples/request/ClusterGetSettingsExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.cluster.get_settings(\n filter_path=\"persistent.cluster.remote\",\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.cluster.getSettings({\n filter_path: \"persistent.cluster.remote\",\n});" + }, + { + "language": "Ruby", + "code": "response = client.cluster.get_settings(\n filter_path: \"persistent.cluster.remote\"\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->cluster()->getSettings([\n \"filter_path\" => \"persistent.cluster.remote\",\n]);" + }, + { + "language": "curl", + "code": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_cluster/settings?filter_path=persistent.cluster.remote\"" + }, + { + "language": "Java", + "code": "\n" + } + ], + "specification/cluster/reroute/examples/request/ClusterRerouteRequestExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.cluster.reroute(\n metric=\"none\",\n commands=[\n {\n \"move\": {\n \"index\": \"test\",\n \"shard\": 0,\n \"from_node\": \"node1\",\n \"to_node\": \"node2\"\n }\n },\n {\n \"allocate_replica\": {\n \"index\": \"test\",\n \"shard\": 1,\n \"node\": \"node3\"\n }\n }\n ],\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.cluster.reroute({\n metric: \"none\",\n commands: [\n {\n move: {\n index: \"test\",\n shard: 0,\n from_node: \"node1\",\n to_node: \"node2\",\n },\n },\n {\n allocate_replica: {\n index: \"test\",\n shard: 1,\n node: \"node3\",\n },\n },\n ],\n});" + }, + { + "language": "Ruby", + "code": "response = client.cluster.reroute(\n metric: \"none\",\n body: {\n \"commands\": [\n {\n \"move\": {\n \"index\": \"test\",\n \"shard\": 0,\n \"from_node\": \"node1\",\n \"to_node\": \"node2\"\n }\n },\n {\n \"allocate_replica\": {\n \"index\": \"test\",\n \"shard\": 1,\n \"node\": \"node3\"\n }\n }\n ]\n }\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->cluster()->reroute([\n \"metric\" => \"none\",\n \"body\" => [\n \"commands\" => array(\n [\n \"move\" => [\n \"index\" => \"test\",\n \"shard\" => 0,\n \"from_node\" => \"node1\",\n \"to_node\" => \"node2\",\n ],\n ],\n [\n \"allocate_replica\" => [\n \"index\" => \"test\",\n \"shard\" => 1,\n \"node\" => \"node3\",\n ],\n ],\n ),\n ],\n]);" + }, + { + "language": "curl", + "code": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"commands\":[{\"move\":{\"index\":\"test\",\"shard\":0,\"from_node\":\"node1\",\"to_node\":\"node2\"}},{\"allocate_replica\":{\"index\":\"test\",\"shard\":1,\"node\":\"node3\"}}]}' \"$ELASTICSEARCH_URL/_cluster/reroute?metric=none\"" + } + ], + "specification/cluster/allocation_explain/examples/request/ClusterAllocationExplainRequestExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.cluster.allocation_explain(\n index=\"my-index-000001\",\n shard=0,\n primary=False,\n current_node=\"my-node\",\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.cluster.allocationExplain({\n index: \"my-index-000001\",\n shard: 0,\n primary: false,\n current_node: \"my-node\",\n});" + }, + { + "language": "Ruby", + "code": "response = client.cluster.allocation_explain(\n body: {\n \"index\": \"my-index-000001\",\n \"shard\": 0,\n \"primary\": false,\n \"current_node\": \"my-node\"\n }\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->cluster()->allocationExplain([\n \"body\" => [\n \"index\" => \"my-index-000001\",\n \"shard\" => 0,\n \"primary\" => false,\n \"current_node\" => \"my-node\",\n ],\n]);" + }, + { + "language": "curl", + "code": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"index\":\"my-index-000001\",\"shard\":0,\"primary\":false,\"current_node\":\"my-node\"}' \"$ELASTICSEARCH_URL/_cluster/allocation/explain\"" + }, + { + "language": "Java", + "code": "client.cluster().allocationExplain(a -> a\n .currentNode(\"my-node\")\n .index(\"my-index-000001\")\n .primary(false)\n .shard(0)\n);\n" + } + ], + "specification/cluster/put_settings/examples/request/ClusterPutSettingsRequestExample2.yaml": [ + { + "language": "Python", + "code": "resp = client.cluster.put_settings(\n persistent={\n \"action.auto_create_index\": \"my-index-000001,index10,-index1*,+ind*\"\n },\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.cluster.putSettings({\n persistent: {\n \"action.auto_create_index\": \"my-index-000001,index10,-index1*,+ind*\",\n },\n});" + }, + { + "language": "Ruby", + "code": "response = client.cluster.put_settings(\n body: {\n \"persistent\": {\n \"action.auto_create_index\": \"my-index-000001,index10,-index1*,+ind*\"\n }\n }\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->cluster()->putSettings([\n \"body\" => [\n \"persistent\" => [\n \"action.auto_create_index\" => \"my-index-000001,index10,-index1*,+ind*\",\n ],\n ],\n]);" + }, + { + "language": "curl", + "code": "curl -X PUT -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"persistent\":{\"action.auto_create_index\":\"my-index-000001,index10,-index1*,+ind*\"}}' \"$ELASTICSEARCH_URL/_cluster/settings\"" + }, + { + "language": "Java", + "code": "client.cluster().putSettings(p -> p\n .persistent(\"action.auto_create_index\", JsonData.fromJson(\"\\\"my-index-000001,index10,-index1*,+ind*\\\"\"))\n);\n" + } + ], + "specification/cluster/put_settings/examples/request/ClusterPutSettingsRequestExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.cluster.put_settings(\n persistent={\n \"indices.recovery.max_bytes_per_sec\": \"50mb\"\n },\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.cluster.putSettings({\n persistent: {\n \"indices.recovery.max_bytes_per_sec\": \"50mb\",\n },\n});" + }, + { + "language": "Ruby", + "code": "response = client.cluster.put_settings(\n body: {\n \"persistent\": {\n \"indices.recovery.max_bytes_per_sec\": \"50mb\"\n }\n }\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->cluster()->putSettings([\n \"body\" => [\n \"persistent\" => [\n \"indices.recovery.max_bytes_per_sec\" => \"50mb\",\n ],\n ],\n]);" + }, + { + "language": "curl", + "code": "curl -X PUT -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"persistent\":{\"indices.recovery.max_bytes_per_sec\":\"50mb\"}}' \"$ELASTICSEARCH_URL/_cluster/settings\"" + }, + { + "language": "Java", + "code": "client.cluster().putSettings(p -> p\n .persistent(\"indices.recovery.max_bytes_per_sec\", JsonData.fromJson(\"\\\"50mb\\\"\"))\n);\n" + } + ], + "specification/cluster/health/examples/request/ClusterHealthRequestExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.cluster.health()" + }, + { + "language": "JavaScript", + "code": "const response = await client.cluster.health();" + }, + { + "language": "Ruby", + "code": "response = client.cluster.health" + }, + { + "language": "PHP", + "code": "$resp = $client->cluster()->health();" + }, + { + "language": "curl", + "code": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_cluster/health\"" + }, + { + "language": "Java", + "code": "client.cluster().health(h -> h);\n" + } + ], + "specification/cluster/state/examples/request/ClusterStateExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.cluster.state(\n filter_path=\"metadata.cluster_coordination.last_committed_config\",\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.cluster.state({\n filter_path: \"metadata.cluster_coordination.last_committed_config\",\n});" + }, + { + "language": "Ruby", + "code": "response = client.cluster.state(\n filter_path: \"metadata.cluster_coordination.last_committed_config\"\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->cluster()->state([\n \"filter_path\" => \"metadata.cluster_coordination.last_committed_config\",\n]);" + }, + { + "language": "curl", + "code": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_cluster/state?filter_path=metadata.cluster_coordination.last_committed_config\"" + }, + { + "language": "Java", + "code": "\n" + } + ], + "specification/cluster/info/examples/request/ClusterInfoExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.cluster.info(\n target=\"_all\",\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.cluster.info({\n target: \"_all\",\n});" + }, + { + "language": "Ruby", + "code": "response = client.cluster.info(\n target: \"_all\"\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->cluster()->info([\n \"target\" => \"_all\",\n]);" + }, + { + "language": "curl", + "code": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_info/_all\"" + }, + { + "language": "Java", + "code": "client.cluster().info(i -> i\n .target(\"_all\")\n);\n" + } + ], + "specification/cluster/remote_info/examples/request/ClusterRemoteInfoExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.cluster.remote_info()" + }, + { + "language": "JavaScript", + "code": "const response = await client.cluster.remoteInfo();" + }, + { + "language": "Ruby", + "code": "response = client.cluster.remote_info" + }, + { + "language": "PHP", + "code": "$resp = $client->cluster()->remoteInfo();" + }, + { + "language": "curl", + "code": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_remote/info\"" + }, + { + "language": "Java", + "code": "client.cluster().remoteInfo();\n" + } + ], + "specification/cluster/stats/examples/request/ClusterStatsExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.cluster.stats(\n human=True,\n filter_path=\"indices.mappings.total_deduplicated_mapping_size*\",\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.cluster.stats({\n human: \"true\",\n filter_path: \"indices.mappings.total_deduplicated_mapping_size*\",\n});" + }, + { + "language": "Ruby", + "code": "response = client.cluster.stats(\n human: \"true\",\n filter_path: \"indices.mappings.total_deduplicated_mapping_size*\"\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->cluster()->stats([\n \"human\" => \"true\",\n \"filter_path\" => \"indices.mappings.total_deduplicated_mapping_size*\",\n]);" + }, + { + "language": "curl", + "code": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_cluster/stats?human&filter_path=indices.mappings.total_deduplicated_mapping_size*\"" + }, + { + "language": "Java", + "code": "\n" + } + ], + "specification/cluster/get_component_template/examples/request/ClusterGetComponentTemplateExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.cluster.get_component_template(\n name=\"template_1\",\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.cluster.getComponentTemplate({\n name: \"template_1\",\n});" + }, + { + "language": "Ruby", + "code": "response = client.cluster.get_component_template(\n name: \"template_1\"\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->cluster()->getComponentTemplate([\n \"name\" => \"template_1\",\n]);" + }, + { + "language": "curl", + "code": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_component_template/template_1\"" + }, + { + "language": "Java", + "code": "client.cluster().getComponentTemplate(g -> g\n .name(\"template_1\")\n);\n" + } + ], + "specification/ssl/certificates/examples/request/GetCertificatesRequestExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.ssl.certificates()" + }, + { + "language": "JavaScript", + "code": "const response = await client.ssl.certificates();" + }, + { + "language": "Ruby", + "code": "response = client.ssl.certificates" + }, + { + "language": "PHP", + "code": "$resp = $client->ssl()->certificates();" + }, + { + "language": "curl", + "code": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_ssl/certificates\"" + }, + { + "language": "Java", + "code": "client.ssl().certificates();\n" + } + ], + "specification/tasks/cancel/examples/request/TasksCancelExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.tasks.cancel(\n task_id=\"\",\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.tasks.cancel({\n task_id: \"\",\n});" + }, + { + "language": "Ruby", + "code": "response = client.tasks.cancel(\n task_id: \"\"\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->tasks()->cancel([\n \"task_id\" => \"\",\n]);" + }, + { + "language": "curl", + "code": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_tasks//_cancel\"" + }, + { + "language": "Java", + "code": "client.tasks().cancel(c -> c\n .taskId(\"\")\n);\n" + } + ], + "specification/tasks/get/examples/request/GetTaskRequestExample2.yaml": [ + { + "language": "Python", + "code": "resp = client.tasks.list(\n detailed=True,\n actions=\"*/delete/byquery\",\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.tasks.list({\n detailed: \"true\",\n actions: \"*/delete/byquery\",\n});" + }, + { + "language": "Ruby", + "code": "response = client.tasks.list(\n detailed: \"true\",\n actions: \"*/delete/byquery\"\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->tasks()->list([\n \"detailed\" => \"true\",\n \"actions\" => \"*/delete/byquery\",\n]);" + }, + { + "language": "curl", + "code": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_tasks?detailed=true&actions=*/delete/byquery\"" + } + ], + "specification/tasks/list/examples/request/ListTasksRequestExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.tasks.list(\n actions=\"*search\",\n detailed=True,\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.tasks.list({\n actions: \"*search\",\n detailed: \"true\",\n});" + }, + { + "language": "Ruby", + "code": "response = client.tasks.list(\n actions: \"*search\",\n detailed: \"true\"\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->tasks()->list([\n \"actions\" => \"*search\",\n \"detailed\" => \"true\",\n]);" + }, + { + "language": "curl", + "code": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_tasks?actions=*search&detailed\"" + } + ], + "specification/indices/simulate_template/examples/request/indicesSimulateTemplateRequestExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.indices.simulate_template(\n index_patterns=[\n \"my-index-*\"\n ],\n composed_of=[\n \"ct2\"\n ],\n priority=10,\n template={\n \"settings\": {\n \"index.number_of_replicas\": 1\n }\n },\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.indices.simulateTemplate({\n index_patterns: [\"my-index-*\"],\n composed_of: [\"ct2\"],\n priority: 10,\n template: {\n settings: {\n \"index.number_of_replicas\": 1,\n },\n },\n});" + }, + { + "language": "Ruby", + "code": "response = client.indices.simulate_template(\n body: {\n \"index_patterns\": [\n \"my-index-*\"\n ],\n \"composed_of\": [\n \"ct2\"\n ],\n \"priority\": 10,\n \"template\": {\n \"settings\": {\n \"index.number_of_replicas\": 1\n }\n }\n }\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->indices()->simulateTemplate([\n \"body\" => [\n \"index_patterns\" => array(\n \"my-index-*\",\n ),\n \"composed_of\" => array(\n \"ct2\",\n ),\n \"priority\" => 10,\n \"template\" => [\n \"settings\" => [\n \"index.number_of_replicas\" => 1,\n ],\n ],\n ],\n]);" + }, + { + "language": "curl", + "code": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"index_patterns\":[\"my-index-*\"],\"composed_of\":[\"ct2\"],\"priority\":10,\"template\":{\"settings\":{\"index.number_of_replicas\":1}}}' \"$ELASTICSEARCH_URL/_index_template/_simulate\"" + }, + { + "language": "Java", + "code": "client.indices().simulateTemplate(s -> s\n .composedOf(\"ct2\")\n .indexPatterns(\"my-index-*\")\n .priority(10L)\n .template(t -> t\n .settings(se -> se\n .otherSettings(\"index.number_of_replicas\", JsonData.fromJson(\"1\"))\n )\n )\n);\n" + } + ], + "specification/indices/split/examples/request/indicesSplitRequestExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.indices.split(\n index=\"my-index-000001\",\n target=\"split-my-index-000001\",\n settings={\n \"index.number_of_shards\": 2\n },\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.indices.split({\n index: \"my-index-000001\",\n target: \"split-my-index-000001\",\n settings: {\n \"index.number_of_shards\": 2,\n },\n});" + }, + { + "language": "Ruby", + "code": "response = client.indices.split(\n index: \"my-index-000001\",\n target: \"split-my-index-000001\",\n body: {\n \"settings\": {\n \"index.number_of_shards\": 2\n }\n }\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->indices()->split([\n \"index\" => \"my-index-000001\",\n \"target\" => \"split-my-index-000001\",\n \"body\" => [\n \"settings\" => [\n \"index.number_of_shards\" => 2,\n ],\n ],\n]);" + }, + { + "language": "curl", + "code": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"settings\":{\"index.number_of_shards\":2}}' \"$ELASTICSEARCH_URL/my-index-000001/_split/split-my-index-000001\"" + }, + { + "language": "Java", + "code": "client.indices().split(s -> s\n .index(\"my-index-000001\")\n .settings(\"index.number_of_shards\", JsonData.fromJson(\"2\"))\n .target(\"split-my-index-000001\")\n);\n" + } + ], + "specification/indices/update_aliases/examples/request/IndicesUpdateAliasesExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.indices.update_aliases(\n actions=[\n {\n \"add\": {\n \"index\": \"logs-nginx.access-prod\",\n \"alias\": \"logs\"\n }\n }\n ],\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.indices.updateAliases({\n actions: [\n {\n add: {\n index: \"logs-nginx.access-prod\",\n alias: \"logs\",\n },\n },\n ],\n});" + }, + { + "language": "Ruby", + "code": "response = client.indices.update_aliases(\n body: {\n \"actions\": [\n {\n \"add\": {\n \"index\": \"logs-nginx.access-prod\",\n \"alias\": \"logs\"\n }\n }\n ]\n }\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->indices()->updateAliases([\n \"body\" => [\n \"actions\" => array(\n [\n \"add\" => [\n \"index\" => \"logs-nginx.access-prod\",\n \"alias\" => \"logs\",\n ],\n ],\n ),\n ],\n]);" + }, + { + "language": "curl", + "code": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"actions\":[{\"add\":{\"index\":\"logs-nginx.access-prod\",\"alias\":\"logs\"}}]}' \"$ELASTICSEARCH_URL/_aliases\"" + }, + { + "language": "Java", + "code": "client.indices().updateAliases(u -> u\n .actions(a -> a\n .add(ad -> ad\n .alias(\"logs\")\n .index(\"logs-nginx.access-prod\")\n )\n )\n);\n" + } + ], + "specification/indices/exists_alias/examples/request/IndicesExistsAliasExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.indices.exists_alias(\n name=\"my-alias\",\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.indices.existsAlias({\n name: \"my-alias\",\n});" + }, + { + "language": "Ruby", + "code": "response = client.indices.exists_alias(\n name: \"my-alias\"\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->indices()->existsAlias([\n \"name\" => \"my-alias\",\n]);" + }, + { + "language": "curl", + "code": "curl --head -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_alias/my-alias\"" + }, + { + "language": "Java", + "code": "client.indices().existsAlias(e -> e\n .name(\"my-alias\")\n);\n" + } + ], + "specification/indices/get_data_stream_mappings/examples/request/IndicesGetDataStreamMappingsRequestExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.indices.get_data_stream_mappings(\n name=\"my-data-stream\",\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.indices.getDataStreamMappings({\n name: \"my-data-stream\",\n});" + }, + { + "language": "Ruby", + "code": "response = client.indices.get_data_stream_mappings(\n name: \"my-data-stream\"\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->indices()->getDataStreamMappings([\n \"name\" => \"my-data-stream\",\n]);" + }, + { + "language": "curl", + "code": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_data_stream/my-data-stream/_mappings\"" + } + ], + "specification/indices/delete_template/examples/request/IndicesDeleteTemplateExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.indices.delete_template(\n name=\".cloud-hot-warm-allocation-0\",\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.indices.deleteTemplate({\n name: \".cloud-hot-warm-allocation-0\",\n});" + }, + { + "language": "Ruby", + "code": "response = client.indices.delete_template(\n name: \".cloud-hot-warm-allocation-0\"\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->indices()->deleteTemplate([\n \"name\" => \".cloud-hot-warm-allocation-0\",\n]);" + }, + { + "language": "curl", + "code": "curl -X DELETE -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_template/.cloud-hot-warm-allocation-0\"" + }, + { + "language": "Java", + "code": "client.indices().deleteTemplate(d -> d\n .name(\".cloud-hot-warm-allocation-0\")\n);\n" + } + ], + "specification/indices/data_streams_stats/examples/request/indicesDataStreamStatsExampleRequest1.yaml": [ + { + "language": "Python", + "code": "resp = client.indices.data_streams_stats(\n name=\"my-index-000001\",\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.indices.dataStreamsStats({\n name: \"my-index-000001\",\n});" + }, + { + "language": "Ruby", + "code": "response = client.indices.data_streams_stats(\n name: \"my-index-000001\"\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->indices()->dataStreamsStats([\n \"name\" => \"my-index-000001\",\n]);" + }, + { + "language": "curl", + "code": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_data_stream/my-index-000001/_stats\"" + }, + { + "language": "Java", + "code": "client.indices().dataStreamsStats(d -> d\n .name(\"my-index-000001\")\n);\n" + } + ], + "specification/indices/delete_index_template/examples/request/IndicesDeleteIndexTemplateExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.indices.delete_index_template(\n name=\"my-index-template\",\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.indices.deleteIndexTemplate({\n name: \"my-index-template\",\n});" + }, + { + "language": "Ruby", + "code": "response = client.indices.delete_index_template(\n name: \"my-index-template\"\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->indices()->deleteIndexTemplate([\n \"name\" => \"my-index-template\",\n]);" + }, + { + "language": "curl", + "code": "curl -X DELETE -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_index_template/my-index-template\"" + }, + { + "language": "Java", + "code": "client.indices().deleteIndexTemplate(d -> d\n .name(\"my-index-template\")\n);\n" + } + ], + "specification/indices/simulate_index_template/examples/request/indicesSimulateIndexTemplateRequestExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.indices.simulate_index_template(\n name=\"my-index-000001\",\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.indices.simulateIndexTemplate({\n name: \"my-index-000001\",\n});" + }, + { + "language": "Ruby", + "code": "response = client.indices.simulate_index_template(\n name: \"my-index-000001\"\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->indices()->simulateIndexTemplate([\n \"name\" => \"my-index-000001\",\n]);" + }, + { + "language": "curl", + "code": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_index_template/_simulate_index/my-index-000001\"" + }, + { + "language": "Java", + "code": "client.indices().simulateIndexTemplate(s -> s\n .name(\"my-index-000001\")\n);\n" + } + ], + "specification/indices/put_template/examples/request/indicesPutTemplateRequestExample2.yaml": [ + { + "language": "Python", + "code": "resp = client.indices.put_template(\n name=\"template_1\",\n index_patterns=[\n \"te*\"\n ],\n settings={\n \"number_of_shards\": 1\n },\n aliases={\n \"alias1\": {},\n \"alias2\": {\n \"filter\": {\n \"term\": {\n \"user.id\": \"kimchy\"\n }\n },\n \"routing\": \"shard-1\"\n },\n \"{index}-alias\": {}\n },\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.indices.putTemplate({\n name: \"template_1\",\n index_patterns: [\"te*\"],\n settings: {\n number_of_shards: 1,\n },\n aliases: {\n alias1: {},\n alias2: {\n filter: {\n term: {\n \"user.id\": \"kimchy\",\n },\n },\n routing: \"shard-1\",\n },\n \"{index}-alias\": {},\n },\n});" + }, + { + "language": "Ruby", + "code": "response = client.indices.put_template(\n name: \"template_1\",\n body: {\n \"index_patterns\": [\n \"te*\"\n ],\n \"settings\": {\n \"number_of_shards\": 1\n },\n \"aliases\": {\n \"alias1\": {},\n \"alias2\": {\n \"filter\": {\n \"term\": {\n \"user.id\": \"kimchy\"\n }\n },\n \"routing\": \"shard-1\"\n },\n \"{index}-alias\": {}\n }\n }\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->indices()->putTemplate([\n \"name\" => \"template_1\",\n \"body\" => [\n \"index_patterns\" => array(\n \"te*\",\n ),\n \"settings\" => [\n \"number_of_shards\" => 1,\n ],\n \"aliases\" => [\n \"alias1\" => new ArrayObject([]),\n \"alias2\" => [\n \"filter\" => [\n \"term\" => [\n \"user.id\" => \"kimchy\",\n ],\n ],\n \"routing\" => \"shard-1\",\n ],\n \"{index}-alias\" => new ArrayObject([]),\n ],\n ],\n]);" + }, + { + "language": "curl", + "code": "curl -X PUT -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"index_patterns\":[\"te*\"],\"settings\":{\"number_of_shards\":1},\"aliases\":{\"alias1\":{},\"alias2\":{\"filter\":{\"term\":{\"user.id\":\"kimchy\"}},\"routing\":\"shard-1\"},\"{index}-alias\":{}}}' \"$ELASTICSEARCH_URL/_template/template_1\"" + }, + { + "language": "Java", + "code": "client.indices().putTemplate(p -> p\n .aliases(Map.of(\"alias1\", Alias.of(a -> a),\"{index}-alias\", Alias.of(a -> a),\"alias2\", Alias.of(a -> a\n .filter(f -> f\n .term(t -> t\n .field(\"user.id\")\n .value(FieldValue.of(\"kimchy\"))\n )\n )\n .routing(\"shard-1\"))))\n .indexPatterns(\"te*\")\n .name(\"template_1\")\n .settings(s -> s\n .numberOfShards(\"1\")\n )\n);\n" + } + ], + "specification/indices/put_template/examples/request/indicesPutTemplateRequestExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.indices.put_template(\n name=\"template_1\",\n index_patterns=[\n \"te*\",\n \"bar*\"\n ],\n settings={\n \"number_of_shards\": 1\n },\n mappings={\n \"_source\": {\n \"enabled\": False\n }\n },\n properties={\n \"host_name\": {\n \"type\": \"keyword\"\n },\n \"created_at\": {\n \"type\": \"date\",\n \"format\": \"EEE MMM dd HH:mm:ss Z yyyy\"\n }\n },\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.indices.putTemplate({\n name: \"template_1\",\n index_patterns: [\"te*\", \"bar*\"],\n settings: {\n number_of_shards: 1,\n },\n mappings: {\n _source: {\n enabled: false,\n },\n },\n properties: {\n host_name: {\n type: \"keyword\",\n },\n created_at: {\n type: \"date\",\n format: \"EEE MMM dd HH:mm:ss Z yyyy\",\n },\n },\n});" + }, + { + "language": "Ruby", + "code": "response = client.indices.put_template(\n name: \"template_1\",\n body: {\n \"index_patterns\": [\n \"te*\",\n \"bar*\"\n ],\n \"settings\": {\n \"number_of_shards\": 1\n },\n \"mappings\": {\n \"_source\": {\n \"enabled\": false\n }\n },\n \"properties\": {\n \"host_name\": {\n \"type\": \"keyword\"\n },\n \"created_at\": {\n \"type\": \"date\",\n \"format\": \"EEE MMM dd HH:mm:ss Z yyyy\"\n }\n }\n }\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->indices()->putTemplate([\n \"name\" => \"template_1\",\n \"body\" => [\n \"index_patterns\" => array(\n \"te*\",\n \"bar*\",\n ),\n \"settings\" => [\n \"number_of_shards\" => 1,\n ],\n \"mappings\" => [\n \"_source\" => [\n \"enabled\" => false,\n ],\n ],\n \"properties\" => [\n \"host_name\" => [\n \"type\" => \"keyword\",\n ],\n \"created_at\" => [\n \"type\" => \"date\",\n \"format\" => \"EEE MMM dd HH:mm:ss Z yyyy\",\n ],\n ],\n ],\n]);" + }, + { + "language": "curl", + "code": "curl -X PUT -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"index_patterns\":[\"te*\",\"bar*\"],\"settings\":{\"number_of_shards\":1},\"mappings\":{\"_source\":{\"enabled\":false}},\"properties\":{\"host_name\":{\"type\":\"keyword\"},\"created_at\":{\"type\":\"date\",\"format\":\"EEE MMM dd HH:mm:ss Z yyyy\"}}}' \"$ELASTICSEARCH_URL/_template/template_1\"" + }, + { + "language": "Java", + "code": "client.indices().putTemplate(p -> p\n .indexPatterns(List.of(\"te*\",\"bar*\"))\n .mappings(m -> m\n .source(s -> s\n .enabled(false)\n )\n )\n .name(\"template_1\")\n .settings(s -> s\n .numberOfShards(\"1\")\n )\n);\n" + } + ], + "specification/indices/put_data_stream_mappings/examples/request/IndicesPutDataStreamMappingsRequestExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.indices.put_data_stream_mappings(\n name=\"my-data-stream\",\n mappings={\n \"properties\": {\n \"field1\": {\n \"type\": \"ip\"\n },\n \"field3\": {\n \"type\": \"text\"\n }\n }\n },\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.indices.putDataStreamMappings({\n name: \"my-data-stream\",\n mappings: {\n properties: {\n field1: {\n type: \"ip\",\n },\n field3: {\n type: \"text\",\n },\n },\n },\n});" + }, + { + "language": "Ruby", + "code": "response = client.indices.put_data_stream_mappings(\n name: \"my-data-stream\",\n body: {\n \"properties\": {\n \"field1\": {\n \"type\": \"ip\"\n },\n \"field3\": {\n \"type\": \"text\"\n }\n }\n }\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->indices()->putDataStreamMappings([\n \"name\" => \"my-data-stream\",\n \"body\" => [\n \"properties\" => [\n \"field1\" => [\n \"type\" => \"ip\",\n ],\n \"field3\" => [\n \"type\" => \"text\",\n ],\n ],\n ],\n]);" + }, + { + "language": "curl", + "code": "curl -X PUT -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"properties\":{\"field1\":{\"type\":\"ip\"},\"field3\":{\"type\":\"text\"}}}' \"$ELASTICSEARCH_URL/_data_stream/my-data-stream/_mappings\"" + } + ], + "specification/indices/delete_data_lifecycle/examples/request/IndicesDeleteDataLifecycleExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.indices.delete_data_lifecycle(\n name=\"my-data-stream\",\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.indices.deleteDataLifecycle({\n name: \"my-data-stream\",\n});" + }, + { + "language": "Ruby", + "code": "response = client.indices.delete_data_lifecycle(\n name: \"my-data-stream\"\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->indices()->deleteDataLifecycle([\n \"name\" => \"my-data-stream\",\n]);" + }, + { + "language": "curl", + "code": "curl -X DELETE -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_data_stream/my-data-stream/_lifecycle\"" + }, + { + "language": "Java", + "code": "client.indices().deleteDataLifecycle(d -> d\n .name(\"my-data-stream\")\n);\n" + } + ], + "specification/indices/create_from/examples/request/IndicesCreateFromExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.perform_request(\n \"POST\",\n \"/_create_from/my-index/my-new-index\",\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.transport.request({\n method: \"POST\",\n path: \"/_create_from/my-index/my-new-index\",\n});" + }, + { + "language": "Ruby", + "code": "response = client.perform_request(\n \"POST\",\n \"/_create_from/my-index/my-new-index\",\n {},\n)" + }, + { + "language": "PHP", + "code": "$requestFactory = Psr17FactoryDiscovery::findRequestFactory();\n$request = $requestFactory->createRequest(\n \"POST\",\n \"/_create_from/my-index/my-new-index\",\n);\n$resp = $client->sendRequest($request);" + }, + { + "language": "curl", + "code": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_create_from/my-index/my-new-index\"" + }, + { + "language": "Java", + "code": "client.indices().createFrom(c -> c\n .dest(\"my-new-index\")\n .source(\"my-index\")\n .createFrom(cr -> cr)\n);\n" + } + ], + "specification/indices/close/examples/request/CloseIndexRequestExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.indices.close(\n index=\"my-index-00001\",\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.indices.close({\n index: \"my-index-00001\",\n});" + }, + { + "language": "Ruby", + "code": "response = client.indices.close(\n index: \"my-index-00001\"\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->indices()->close([\n \"index\" => \"my-index-00001\",\n]);" + }, + { + "language": "curl", + "code": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/my-index-00001/_close\"" + }, + { + "language": "Java", + "code": "client.indices().close(c -> c\n .index(\"my-index-00001\")\n);\n" + } + ], + "specification/indices/get_migrate_reindex_status/examples/request/IndicesGetMigrateReindexStatusExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.perform_request(\n \"GET\",\n \"/_migration/reindex/my-data-stream/_status\",\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.transport.request({\n method: \"GET\",\n path: \"/_migration/reindex/my-data-stream/_status\",\n});" + }, + { + "language": "Ruby", + "code": "response = client.perform_request(\n \"GET\",\n \"/_migration/reindex/my-data-stream/_status\",\n {},\n)" + }, + { + "language": "PHP", + "code": "$requestFactory = Psr17FactoryDiscovery::findRequestFactory();\n$request = $requestFactory->createRequest(\n \"GET\",\n \"/_migration/reindex/my-data-stream/_status\",\n);\n$resp = $client->sendRequest($request);" + }, + { + "language": "curl", + "code": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_migration/reindex/my-data-stream/_status\"" + }, + { + "language": "Java", + "code": "client.indices().getMigrateReindexStatus(g -> g\n .index(\"my-data-stream\")\n);\n" + } + ], + "specification/indices/get_settings/examples/request/IndicesGetSettingsExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.indices.get_settings(\n index=\"_all\",\n expand_wildcards=\"all\",\n filter_path=\"*.settings.index.*.slowlog\",\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.indices.getSettings({\n index: \"_all\",\n expand_wildcards: \"all\",\n filter_path: \"*.settings.index.*.slowlog\",\n});" + }, + { + "language": "Ruby", + "code": "response = client.indices.get_settings(\n index: \"_all\",\n expand_wildcards: \"all\",\n filter_path: \"*.settings.index.*.slowlog\"\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->indices()->getSettings([\n \"index\" => \"_all\",\n \"expand_wildcards\" => \"all\",\n \"filter_path\" => \"*.settings.index.*.slowlog\",\n]);" + }, + { + "language": "curl", + "code": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_all/_settings?expand_wildcards=all&filter_path=*.settings.index.*.slowlog\"" + } + ], + "specification/indices/promote_data_stream/examples/request/IndicesPromoteDataStreamExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.indices.promote_data_stream(\n name=\"my-data-stream\",\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.indices.promoteDataStream({\n name: \"my-data-stream\",\n});" + }, + { + "language": "Ruby", + "code": "response = client.indices.promote_data_stream(\n name: \"my-data-stream\"\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->indices()->promoteDataStream([\n \"name\" => \"my-data-stream\",\n]);" + }, + { + "language": "curl", + "code": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_data_stream/_promote/my-data-stream\"" + }, + { + "language": "Java", + "code": "client.indices().promoteDataStream(p -> p\n .name(\"my-data-stream\")\n);\n" + } + ], + "specification/indices/flush/examples/request/IndicesFlushExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.indices.flush()" + }, + { + "language": "JavaScript", + "code": "const response = await client.indices.flush();" + }, + { + "language": "Ruby", + "code": "response = client.indices.flush" + }, + { + "language": "PHP", + "code": "$resp = $client->indices()->flush();" + }, + { + "language": "curl", + "code": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_flush\"" + }, + { + "language": "Java", + "code": "client.indices().flush(f -> f);\n" + } + ], + "specification/indices/delete/examples/request/IndicesDeleteExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.indices.delete(\n index=\"books\",\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.indices.delete({\n index: \"books\",\n});" + }, + { + "language": "Ruby", + "code": "response = client.indices.delete(\n index: \"books\"\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->indices()->delete([\n \"index\" => \"books\",\n]);" + }, + { + "language": "curl", + "code": "curl -X DELETE -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/books\"" + }, + { + "language": "Java", + "code": "client.indices().delete(d -> d\n .index(\"books\")\n);\n" + } + ], + "specification/indices/refresh/examples/request/IndicesRefreshExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.indices.refresh()" + }, + { + "language": "JavaScript", + "code": "const response = await client.indices.refresh();" + }, + { + "language": "Ruby", + "code": "response = client.indices.refresh" + }, + { + "language": "PHP", + "code": "$resp = $client->indices()->refresh();" + }, + { + "language": "curl", + "code": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_refresh\"" + }, + { + "language": "Java", + "code": "client.indices().refresh(r -> r);\n" + } + ], + "specification/indices/resolve_index/examples/request/ResolveIndexRequestExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.indices.resolve_index(\n name=\"f*,remoteCluster1:bar*\",\n expand_wildcards=\"all\",\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.indices.resolveIndex({\n name: \"f*,remoteCluster1:bar*\",\n expand_wildcards: \"all\",\n});" + }, + { + "language": "Ruby", + "code": "response = client.indices.resolve_index(\n name: \"f*,remoteCluster1:bar*\",\n expand_wildcards: \"all\"\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->indices()->resolveIndex([\n \"name\" => \"f*,remoteCluster1:bar*\",\n \"expand_wildcards\" => \"all\",\n]);" + }, + { + "language": "curl", + "code": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_resolve/index/f*,remoteCluster1:bar*?expand_wildcards=all\"" + } + ], + "specification/indices/exists/examples/request/IndicesExistsExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.indices.exists(\n index=\"my-data-stream\",\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.indices.exists({\n index: \"my-data-stream\",\n});" + }, + { + "language": "Ruby", + "code": "response = client.indices.exists(\n index: \"my-data-stream\"\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->indices()->exists([\n \"index\" => \"my-data-stream\",\n]);" + }, + { + "language": "curl", + "code": "curl --head -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/my-data-stream\"" + }, + { + "language": "Java", + "code": "client.indices().exists(e -> e\n .index(\"my-data-stream\")\n);\n" + } + ], + "specification/indices/recovery/examples/request/indicesRecoveryRequestExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.indices.recovery(\n human=True,\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.indices.recovery({\n human: \"true\",\n});" + }, + { + "language": "Ruby", + "code": "response = client.indices.recovery(\n human: \"true\"\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->indices()->recovery([\n \"human\" => \"true\",\n]);" + }, + { + "language": "curl", + "code": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_recovery?human\"" + }, + { + "language": "Java", + "code": "\n" + } + ], + "specification/indices/put_settings/examples/request/indicesPutSettingsRequestExample3.yaml": [ + { + "language": "Python", + "code": "resp = client.indices.put_settings(\n index=\"my-index-000001\",\n settings={\n \"analysis\": {\n \"analyzer\": {\n \"content\": {\n \"type\": \"custom\",\n \"tokenizer\": \"whitespace\"\n }\n }\n }\n },\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.indices.putSettings({\n index: \"my-index-000001\",\n settings: {\n analysis: {\n analyzer: {\n content: {\n type: \"custom\",\n tokenizer: \"whitespace\",\n },\n },\n },\n },\n});" + }, + { + "language": "Ruby", + "code": "response = client.indices.put_settings(\n index: \"my-index-000001\",\n body: {\n \"analysis\": {\n \"analyzer\": {\n \"content\": {\n \"type\": \"custom\",\n \"tokenizer\": \"whitespace\"\n }\n }\n }\n }\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->indices()->putSettings([\n \"index\" => \"my-index-000001\",\n \"body\" => [\n \"analysis\" => [\n \"analyzer\" => [\n \"content\" => [\n \"type\" => \"custom\",\n \"tokenizer\" => \"whitespace\",\n ],\n ],\n ],\n ],\n]);" + }, + { + "language": "curl", + "code": "curl -X PUT -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"analysis\":{\"analyzer\":{\"content\":{\"type\":\"custom\",\"tokenizer\":\"whitespace\"}}}}' \"$ELASTICSEARCH_URL/my-index-000001/_settings\"" + } + ], + "specification/indices/put_settings/examples/request/indicesPutSettingsRequestExample2.yaml": [ + { + "language": "Python", + "code": "resp = client.indices.put_settings(\n index=\"my-index-000001\",\n settings={\n \"index\": {\n \"refresh_interval\": None\n }\n },\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.indices.putSettings({\n index: \"my-index-000001\",\n settings: {\n index: {\n refresh_interval: null,\n },\n },\n});" + }, + { + "language": "Ruby", + "code": "response = client.indices.put_settings(\n index: \"my-index-000001\",\n body: {\n \"index\": {\n \"refresh_interval\": nil\n }\n }\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->indices()->putSettings([\n \"index\" => \"my-index-000001\",\n \"body\" => [\n \"index\" => [\n \"refresh_interval\" => null,\n ],\n ],\n]);" + }, + { + "language": "curl", + "code": "curl -X PUT -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"index\":{\"refresh_interval\":null}}' \"$ELASTICSEARCH_URL/my-index-000001/_settings\"" + } + ], + "specification/indices/put_settings/examples/request/IndicesPutSettingsRequestExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.indices.put_settings(\n index=\"my-index-000001\",\n settings={\n \"index\": {\n \"number_of_replicas\": 2\n }\n },\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.indices.putSettings({\n index: \"my-index-000001\",\n settings: {\n index: {\n number_of_replicas: 2,\n },\n },\n});" + }, + { + "language": "Ruby", + "code": "response = client.indices.put_settings(\n index: \"my-index-000001\",\n body: {\n \"index\": {\n \"number_of_replicas\": 2\n }\n }\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->indices()->putSettings([\n \"index\" => \"my-index-000001\",\n \"body\" => [\n \"index\" => [\n \"number_of_replicas\" => 2,\n ],\n ],\n]);" + }, + { + "language": "curl", + "code": "curl -X PUT -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"index\":{\"number_of_replicas\":2}}' \"$ELASTICSEARCH_URL/my-index-000001/_settings\"" + }, + { + "language": "Java", + "code": "client.indices().putSettings(p -> p\n .index(\"my-index-000001\")\n .settings(s -> s\n .index(i -> i\n .numberOfReplicas(\"2\")\n )\n )\n);\n" + } + ], + "specification/indices/clear_cache/examples/request/IndicesClearCacheExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.indices.clear_cache(\n index=\"my-index-000001,my-index-000002\",\n request=True,\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.indices.clearCache({\n index: \"my-index-000001,my-index-000002\",\n request: \"true\",\n});" + }, + { + "language": "Ruby", + "code": "response = client.indices.clear_cache(\n index: \"my-index-000001,my-index-000002\",\n request: \"true\"\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->indices()->clearCache([\n \"index\" => \"my-index-000001,my-index-000002\",\n \"request\" => \"true\",\n]);" + }, + { + "language": "curl", + "code": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/my-index-000001,my-index-000002/_cache/clear?request=true\"" + }, + { + "language": "Java", + "code": "client.indices().clearCache(c -> c\n .index(List.of(\"my-index-000001\",\"my-index-000002\"))\n .request(true)\n);\n" + } + ], + "specification/indices/reload_search_analyzers/examples/request/ReloadSearchAnalyzersRequestExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.indices.reload_search_analyzers(\n index=\"my-index-000001\",\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.indices.reloadSearchAnalyzers({\n index: \"my-index-000001\",\n});" + }, + { + "language": "Ruby", + "code": "response = client.indices.reload_search_analyzers(\n index: \"my-index-000001\",\n body: {\n \"_shards\": {\n \"total\": 2,\n \"successful\": 2,\n \"failed\": 0\n },\n \"reload_details\": [\n {\n \"index\": \"my-index-000001\",\n \"reloaded_analyzers\": [\n \"my_synonyms\"\n ],\n \"reloaded_node_ids\": [\n \"mfdqTXn_T7SGr2Ho2KT8uw\"\n ]\n }\n ]\n }\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->indices()->reloadSearchAnalyzers([\n \"index\" => \"my-index-000001\",\n \"body\" => [\n \"_shards\" => [\n \"total\" => 2,\n \"successful\" => 2,\n \"failed\" => 0,\n ],\n \"reload_details\" => array(\n [\n \"index\" => \"my-index-000001\",\n \"reloaded_analyzers\" => array(\n \"my_synonyms\",\n ),\n \"reloaded_node_ids\" => array(\n \"mfdqTXn_T7SGr2Ho2KT8uw\",\n ),\n ],\n ),\n ],\n]);" + }, + { + "language": "curl", + "code": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"_shards\":{\"total\":2,\"successful\":2,\"failed\":0},\"reload_details\":[{\"index\":\"my-index-000001\",\"reloaded_analyzers\":[\"my_synonyms\"],\"reloaded_node_ids\":[\"mfdqTXn_T7SGr2Ho2KT8uw\"]}]}' \"$ELASTICSEARCH_URL/my-index-000001/_reload_search_analyzers\"" + } + ], + "specification/indices/cancel_migrate_reindex/examples/request/IndicesCancelMigrateReindexExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.perform_request(\n \"POST\",\n \"/_migration/reindex/my-data-stream/_cancel\",\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.transport.request({\n method: \"POST\",\n path: \"/_migration/reindex/my-data-stream/_cancel\",\n});" + }, + { + "language": "Ruby", + "code": "response = client.perform_request(\n \"POST\",\n \"/_migration/reindex/my-data-stream/_cancel\",\n {},\n)" + }, + { + "language": "PHP", + "code": "$requestFactory = Psr17FactoryDiscovery::findRequestFactory();\n$request = $requestFactory->createRequest(\n \"POST\",\n \"/_migration/reindex/my-data-stream/_cancel\",\n);\n$resp = $client->sendRequest($request);" + }, + { + "language": "curl", + "code": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_migration/reindex/my-data-stream/_cancel\"" + }, + { + "language": "Java", + "code": "client.indices().cancelMigrateReindex(c -> c\n .index(\"my-data-stream\")\n);\n" + } + ], + "specification/indices/delete_data_stream/examples/request/IndicesDeleteDataStreamExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.indices.delete_data_stream(\n name=\"my-data-stream\",\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.indices.deleteDataStream({\n name: \"my-data-stream\",\n});" + }, + { + "language": "Ruby", + "code": "response = client.indices.delete_data_stream(\n name: \"my-data-stream\"\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->indices()->deleteDataStream([\n \"name\" => \"my-data-stream\",\n]);" + }, + { + "language": "curl", + "code": "curl -X DELETE -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_data_stream/my-data-stream\"" + }, + { + "language": "Java", + "code": "client.indices().deleteDataStream(d -> d\n .name(\"my-data-stream\")\n);\n" + } + ], + "specification/indices/get/examples/request/IndicesGetExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.indices.get(\n index=\"my-index-000001\",\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.indices.get({\n index: \"my-index-000001\",\n});" + }, + { + "language": "Ruby", + "code": "response = client.indices.get(\n index: \"my-index-000001\"\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->indices()->get([\n \"index\" => \"my-index-000001\",\n]);" + }, + { + "language": "curl", + "code": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/my-index-000001\"" + }, + { + "language": "Java", + "code": "client.indices().get(g -> g\n .index(\"my-index-000001\")\n);\n" + } + ], + "specification/indices/disk_usage/examples/request/IndicesDiskUsageExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.indices.disk_usage(\n index=\"my-index-000001\",\n run_expensive_tasks=True,\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.indices.diskUsage({\n index: \"my-index-000001\",\n run_expensive_tasks: \"true\",\n});" + }, + { + "language": "Ruby", + "code": "response = client.indices.disk_usage(\n index: \"my-index-000001\",\n run_expensive_tasks: \"true\"\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->indices()->diskUsage([\n \"index\" => \"my-index-000001\",\n \"run_expensive_tasks\" => \"true\",\n]);" + }, + { + "language": "curl", + "code": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/my-index-000001/_disk_usage?run_expensive_tasks=true\"" + }, + { + "language": "Java", + "code": "client.indices().diskUsage(d -> d\n .index(\"my-index-000001\")\n .runExpensiveTasks(true)\n);\n" + } + ], + "specification/indices/create_data_stream/examples/request/IndicesCreateDataStreamExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.indices.create_data_stream(\n name=\"logs-foo-bar\",\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.indices.createDataStream({\n name: \"logs-foo-bar\",\n});" + }, + { + "language": "Ruby", + "code": "response = client.indices.create_data_stream(\n name: \"logs-foo-bar\"\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->indices()->createDataStream([\n \"name\" => \"logs-foo-bar\",\n]);" + }, + { + "language": "curl", + "code": "curl -X PUT -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_data_stream/logs-foo-bar\"" + }, + { + "language": "Java", + "code": "client.indices().createDataStream(c -> c\n .name(\"logs-foo-bar\")\n);\n" + } + ], + "specification/indices/delete_alias/examples/request/IndicesDeleteAliasExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.indices.delete_alias(\n index=\"my-data-stream\",\n name=\"my-alias\",\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.indices.deleteAlias({\n index: \"my-data-stream\",\n name: \"my-alias\",\n});" + }, + { + "language": "Ruby", + "code": "response = client.indices.delete_alias(\n index: \"my-data-stream\",\n name: \"my-alias\"\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->indices()->deleteAlias([\n \"index\" => \"my-data-stream\",\n \"name\" => \"my-alias\",\n]);" + }, + { + "language": "curl", + "code": "curl -X DELETE -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/my-data-stream/_alias/my-alias\"" + }, + { + "language": "Java", + "code": "client.indices().deleteAlias(d -> d\n .index(\"my-data-stream\")\n .name(\"my-alias\")\n);\n" + } + ], + "specification/indices/forcemerge/examples/request/IndicesForcemergeExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.indices.forcemerge(\n index=\"my-index-000001\",\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.indices.forcemerge({\n index: \"my-index-000001\",\n});" + }, + { + "language": "Ruby", + "code": "response = client.indices.forcemerge(\n index: \"my-index-000001\"\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->indices()->forcemerge([\n \"index\" => \"my-index-000001\",\n]);" + }, + { + "language": "curl", + "code": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/my-index-000001/_forcemerge\"" + }, + { + "language": "Java", + "code": "client.indices().forcemerge(f -> f\n .index(\"my-index-000001\")\n);\n" + } + ], + "specification/indices/downsample/examples/request/DownsampleRequestExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.indices.downsample(\n index=\"my-time-series-index\",\n target_index=\"my-downsampled-time-series-index\",\n config={\n \"fixed_interval\": \"1d\"\n },\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.indices.downsample({\n index: \"my-time-series-index\",\n target_index: \"my-downsampled-time-series-index\",\n config: {\n fixed_interval: \"1d\",\n },\n});" + }, + { + "language": "Ruby", + "code": "response = client.indices.downsample(\n index: \"my-time-series-index\",\n target_index: \"my-downsampled-time-series-index\",\n body: {\n \"fixed_interval\": \"1d\"\n }\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->indices()->downsample([\n \"index\" => \"my-time-series-index\",\n \"target_index\" => \"my-downsampled-time-series-index\",\n \"body\" => [\n \"fixed_interval\" => \"1d\",\n ],\n]);" + }, + { + "language": "curl", + "code": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"fixed_interval\":\"1d\"}' \"$ELASTICSEARCH_URL/my-time-series-index/_downsample/my-downsampled-time-series-index\"" + }, + { + "language": "Java", + "code": "client.indices().downsample(d -> d\n .index(\"my-time-series-index\")\n .targetIndex(\"my-downsampled-time-series-index\")\n .config(c -> c\n .fixedInterval(f -> f\n .time(\"1d\")\n )\n )\n);\n" + } + ], + "specification/indices/get_template/examples/request/IndicesGetTemplateExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.indices.get_template(\n name=\".monitoring-*\",\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.indices.getTemplate({\n name: \".monitoring-*\",\n});" + }, + { + "language": "Ruby", + "code": "response = client.indices.get_template(\n name: \".monitoring-*\"\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->indices()->getTemplate([\n \"name\" => \".monitoring-*\",\n]);" + }, + { + "language": "curl", + "code": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_template/.monitoring-*\"" + }, + { + "language": "Java", + "code": "client.indices().getTemplate(g -> g\n .name(\".monitoring-*\")\n);\n" + } + ], + "specification/indices/shrink/examples/request/indicesShrinkRequestExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.indices.shrink(\n index=\"my_source_index\",\n target=\"my_target_index\",\n settings={\n \"index.routing.allocation.require._name\": None,\n \"index.blocks.write\": None\n },\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.indices.shrink({\n index: \"my_source_index\",\n target: \"my_target_index\",\n settings: {\n \"index.routing.allocation.require._name\": null,\n \"index.blocks.write\": null,\n },\n});" + }, + { + "language": "Ruby", + "code": "response = client.indices.shrink(\n index: \"my_source_index\",\n target: \"my_target_index\",\n body: {\n \"settings\": {\n \"index.routing.allocation.require._name\": nil,\n \"index.blocks.write\": nil\n }\n }\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->indices()->shrink([\n \"index\" => \"my_source_index\",\n \"target\" => \"my_target_index\",\n \"body\" => [\n \"settings\" => [\n \"index.routing.allocation.require._name\" => null,\n \"index.blocks.write\" => null,\n ],\n ],\n]);" + }, + { + "language": "curl", + "code": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"settings\":{\"index.routing.allocation.require._name\":null,\"index.blocks.write\":null}}' \"$ELASTICSEARCH_URL/my_source_index/_shrink/my_target_index\"" + }, + { + "language": "Java", + "code": "client.indices().shrink(s -> s\n .index(\"my_source_index\")\n .settings(Map.of(\"index.blocks.write\", JsonData.fromJson(\"null\"),\"index.routing.allocation.require._name\", JsonData.fromJson(\"null\")))\n .target(\"my_target_index\")\n);\n" + } + ], + "specification/indices/explain_data_lifecycle/examples/request/IndicesExplainDataLifecycleRequestExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.indices.explain_data_lifecycle(\n index=\".ds-metrics-2023.03.22-000001\",\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.indices.explainDataLifecycle({\n index: \".ds-metrics-2023.03.22-000001\",\n});" + }, + { + "language": "Ruby", + "code": "response = client.indices.explain_data_lifecycle(\n index: \".ds-metrics-2023.03.22-000001\"\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->indices()->explainDataLifecycle([\n \"index\" => \".ds-metrics-2023.03.22-000001\",\n]);" + }, + { + "language": "curl", + "code": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/.ds-metrics-2023.03.22-000001/_lifecycle/explain\"" + }, + { + "language": "Java", + "code": "client.indices().explainDataLifecycle(e -> e\n .index(\".ds-metrics-2023.03.22-000001\")\n);\n" + } + ], + "specification/indices/get_mapping/examples/request/IndicesGetMappingExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.indices.get_mapping(\n index=\"books\",\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.indices.getMapping({\n index: \"books\",\n});" + }, + { + "language": "Ruby", + "code": "response = client.indices.get_mapping(\n index: \"books\"\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->indices()->getMapping([\n \"index\" => \"books\",\n]);" + }, + { + "language": "curl", + "code": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/books/_mapping\"" + }, + { + "language": "Java", + "code": "client.indices().getMapping(g -> g\n .index(\"books\")\n);\n" + } + ], + "specification/indices/get_data_lifecycle_stats/examples/request/IndicesGetDataLifecycleStatsRequestExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.indices.get_data_lifecycle_stats(\n human=True,\n pretty=True,\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.indices.getDataLifecycleStats({\n human: \"true\",\n pretty: \"true\",\n});" + }, + { + "language": "Ruby", + "code": "response = client.indices.get_data_lifecycle_stats(\n human: \"true\",\n pretty: \"true\"\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->indices()->getDataLifecycleStats([\n \"human\" => \"true\",\n \"pretty\" => \"true\",\n]);" + }, + { + "language": "curl", + "code": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_lifecycle/stats?human&pretty\"" + }, + { + "language": "Java", + "code": "client.indices().getDataLifecycleStats();\n" + } + ], + "specification/indices/add_block/examples/request/IndicesAddBlockRequestExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.indices.add_block(\n index=\"my-index-000001\",\n block=\"write\",\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.indices.addBlock({\n index: \"my-index-000001\",\n block: \"write\",\n});" + }, + { + "language": "Ruby", + "code": "response = client.indices.add_block(\n index: \"my-index-000001\",\n block: \"write\"\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->indices()->addBlock([\n \"index\" => \"my-index-000001\",\n \"block\" => \"write\",\n]);" + }, + { + "language": "curl", + "code": "curl -X PUT -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/my-index-000001/_block/write\"" + }, + { + "language": "Java", + "code": "client.indices().addBlock(a -> a\n .block(IndicesBlockOptions.Write)\n .index(\"my-index-000001\")\n);\n" + } + ], + "specification/indices/rollover/examples/request/indicesRolloverRequestExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.indices.rollover(\n alias=\"my-data-stream\",\n conditions={\n \"max_age\": \"7d\",\n \"max_docs\": 1000,\n \"max_primary_shard_size\": \"50gb\",\n \"max_primary_shard_docs\": \"2000\"\n },\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.indices.rollover({\n alias: \"my-data-stream\",\n conditions: {\n max_age: \"7d\",\n max_docs: 1000,\n max_primary_shard_size: \"50gb\",\n max_primary_shard_docs: \"2000\",\n },\n});" + }, + { + "language": "Ruby", + "code": "response = client.indices.rollover(\n alias: \"my-data-stream\",\n body: {\n \"conditions\": {\n \"max_age\": \"7d\",\n \"max_docs\": 1000,\n \"max_primary_shard_size\": \"50gb\",\n \"max_primary_shard_docs\": \"2000\"\n }\n }\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->indices()->rollover([\n \"alias\" => \"my-data-stream\",\n \"body\" => [\n \"conditions\" => [\n \"max_age\" => \"7d\",\n \"max_docs\" => 1000,\n \"max_primary_shard_size\" => \"50gb\",\n \"max_primary_shard_docs\" => \"2000\",\n ],\n ],\n]);" + }, + { + "language": "curl", + "code": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"conditions\":{\"max_age\":\"7d\",\"max_docs\":1000,\"max_primary_shard_size\":\"50gb\",\"max_primary_shard_docs\":\"2000\"}}' \"$ELASTICSEARCH_URL/my-data-stream/_rollover\"" + }, + { + "language": "Java", + "code": "client.indices().rollover(r -> r\n .alias(\"my-data-stream\")\n .conditions(c -> c\n .maxAge(m -> m\n .time(\"7d\")\n )\n .maxDocs(1000L)\n .maxPrimaryShardSize(\"50gb\")\n .maxPrimaryShardDocs(2000L)\n )\n);\n" + } + ], + "specification/indices/put_data_lifecycle/examples/request/IndicesPutDataLifecycleRequestExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.indices.put_data_lifecycle(\n name=\"my-data-stream\",\n data_retention=\"7d\",\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.indices.putDataLifecycle({\n name: \"my-data-stream\",\n data_retention: \"7d\",\n});" + }, + { + "language": "Ruby", + "code": "response = client.indices.put_data_lifecycle(\n name: \"my-data-stream\",\n body: {\n \"data_retention\": \"7d\"\n }\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->indices()->putDataLifecycle([\n \"name\" => \"my-data-stream\",\n \"body\" => [\n \"data_retention\" => \"7d\",\n ],\n]);" + }, + { + "language": "curl", + "code": "curl -X PUT -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"data_retention\":\"7d\"}' \"$ELASTICSEARCH_URL/_data_stream/my-data-stream/_lifecycle\"" + }, + { + "language": "Java", + "code": "client.indices().putDataLifecycle(p -> p\n .dataRetention(d -> d\n .time(\"7d\")\n )\n .name(\"my-data-stream\")\n);\n" + } + ], + "specification/indices/put_data_lifecycle/examples/request/IndicesPutDataLifecycleRequestExample2.yaml": [ + { + "language": "Python", + "code": "resp = client.indices.put_data_lifecycle(\n name=\"my-weather-sensor-data-stream\",\n downsampling=[\n {\n \"after\": \"1d\",\n \"fixed_interval\": \"10m\"\n },\n {\n \"after\": \"7d\",\n \"fixed_interval\": \"1d\"\n }\n ],\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.indices.putDataLifecycle({\n name: \"my-weather-sensor-data-stream\",\n downsampling: [\n {\n after: \"1d\",\n fixed_interval: \"10m\",\n },\n {\n after: \"7d\",\n fixed_interval: \"1d\",\n },\n ],\n});" + }, + { + "language": "Ruby", + "code": "response = client.indices.put_data_lifecycle(\n name: \"my-weather-sensor-data-stream\",\n body: {\n \"downsampling\": [\n {\n \"after\": \"1d\",\n \"fixed_interval\": \"10m\"\n },\n {\n \"after\": \"7d\",\n \"fixed_interval\": \"1d\"\n }\n ]\n }\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->indices()->putDataLifecycle([\n \"name\" => \"my-weather-sensor-data-stream\",\n \"body\" => [\n \"downsampling\" => array(\n [\n \"after\" => \"1d\",\n \"fixed_interval\" => \"10m\",\n ],\n [\n \"after\" => \"7d\",\n \"fixed_interval\" => \"1d\",\n ],\n ),\n ],\n]);" + }, + { + "language": "curl", + "code": "curl -X PUT -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"downsampling\":[{\"after\":\"1d\",\"fixed_interval\":\"10m\"},{\"after\":\"7d\",\"fixed_interval\":\"1d\"}]}' \"$ELASTICSEARCH_URL/_data_stream/my-weather-sensor-data-stream/_lifecycle\"" + } + ], + "specification/indices/exists_template/examples/request/IndicesExistsTemplateExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.indices.exists_template(\n name=\"template_1\",\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.indices.existsTemplate({\n name: \"template_1\",\n});" + }, + { + "language": "Ruby", + "code": "response = client.indices.exists_template(\n name: \"template_1\"\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->indices()->existsTemplate([\n \"name\" => \"template_1\",\n]);" + }, + { + "language": "curl", + "code": "curl --head -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_template/template_1\"" + }, + { + "language": "Java", + "code": "client.indices().existsTemplate(e -> e\n .name(\"template_1\")\n);\n" + } + ], + "specification/indices/validate_query/examples/request/IndicesValidateQueryExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.indices.validate_query(\n index=\"my-index-000001\",\n q=\"user.id:kimchy\",\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.indices.validateQuery({\n index: \"my-index-000001\",\n q: \"user.id:kimchy\",\n});" + }, + { + "language": "Ruby", + "code": "response = client.indices.validate_query(\n index: \"my-index-000001\",\n q: \"user.id:kimchy\"\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->indices()->validateQuery([\n \"index\" => \"my-index-000001\",\n \"q\" => \"user.id:kimchy\",\n]);" + }, + { + "language": "curl", + "code": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/my-index-000001/_validate/query?q=user.id:kimchy\"" + }, + { + "language": "Java", + "code": "client.indices().validateQuery(v -> v\n .index(\"my-index-000001\")\n .q(\"user.id:kimchy\")\n);\n" + } + ], + "specification/indices/put_index_template/examples/request/IndicesPutIndexTemplateRequestExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.indices.put_index_template(\n name=\"template_1\",\n index_patterns=[\n \"template*\"\n ],\n priority=1,\n template={\n \"settings\": {\n \"number_of_shards\": 2\n }\n },\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.indices.putIndexTemplate({\n name: \"template_1\",\n index_patterns: [\"template*\"],\n priority: 1,\n template: {\n settings: {\n number_of_shards: 2,\n },\n },\n});" + }, + { + "language": "Ruby", + "code": "response = client.indices.put_index_template(\n name: \"template_1\",\n body: {\n \"index_patterns\": [\n \"template*\"\n ],\n \"priority\": 1,\n \"template\": {\n \"settings\": {\n \"number_of_shards\": 2\n }\n }\n }\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->indices()->putIndexTemplate([\n \"name\" => \"template_1\",\n \"body\" => [\n \"index_patterns\" => array(\n \"template*\",\n ),\n \"priority\" => 1,\n \"template\" => [\n \"settings\" => [\n \"number_of_shards\" => 2,\n ],\n ],\n ],\n]);" + }, + { + "language": "curl", + "code": "curl -X PUT -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"index_patterns\":[\"template*\"],\"priority\":1,\"template\":{\"settings\":{\"number_of_shards\":2}}}' \"$ELASTICSEARCH_URL/_index_template/template_1\"" + }, + { + "language": "Java", + "code": "client.indices().putIndexTemplate(p -> p\n .indexPatterns(\"template*\")\n .name(\"template_1\")\n .priority(1L)\n .template(t -> t\n .settings(s -> s\n .numberOfShards(\"2\")\n )\n )\n);\n" + } + ], + "specification/indices/put_index_template/examples/request/IndicesPutIndexTemplateRequestExample2.yaml": [ + { + "language": "Python", + "code": "resp = client.indices.put_index_template(\n name=\"template_1\",\n index_patterns=[\n \"template*\"\n ],\n template={\n \"settings\": {\n \"number_of_shards\": 1\n },\n \"aliases\": {\n \"alias1\": {},\n \"alias2\": {\n \"filter\": {\n \"term\": {\n \"user.id\": \"kimchy\"\n }\n },\n \"routing\": \"shard-1\"\n },\n \"{index}-alias\": {}\n }\n },\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.indices.putIndexTemplate({\n name: \"template_1\",\n index_patterns: [\"template*\"],\n template: {\n settings: {\n number_of_shards: 1,\n },\n aliases: {\n alias1: {},\n alias2: {\n filter: {\n term: {\n \"user.id\": \"kimchy\",\n },\n },\n routing: \"shard-1\",\n },\n \"{index}-alias\": {},\n },\n },\n});" + }, + { + "language": "Ruby", + "code": "response = client.indices.put_index_template(\n name: \"template_1\",\n body: {\n \"index_patterns\": [\n \"template*\"\n ],\n \"template\": {\n \"settings\": {\n \"number_of_shards\": 1\n },\n \"aliases\": {\n \"alias1\": {},\n \"alias2\": {\n \"filter\": {\n \"term\": {\n \"user.id\": \"kimchy\"\n }\n },\n \"routing\": \"shard-1\"\n },\n \"{index}-alias\": {}\n }\n }\n }\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->indices()->putIndexTemplate([\n \"name\" => \"template_1\",\n \"body\" => [\n \"index_patterns\" => array(\n \"template*\",\n ),\n \"template\" => [\n \"settings\" => [\n \"number_of_shards\" => 1,\n ],\n \"aliases\" => [\n \"alias1\" => new ArrayObject([]),\n \"alias2\" => [\n \"filter\" => [\n \"term\" => [\n \"user.id\" => \"kimchy\",\n ],\n ],\n \"routing\" => \"shard-1\",\n ],\n \"{index}-alias\" => new ArrayObject([]),\n ],\n ],\n ],\n]);" + }, + { + "language": "curl", + "code": "curl -X PUT -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"index_patterns\":[\"template*\"],\"template\":{\"settings\":{\"number_of_shards\":1},\"aliases\":{\"alias1\":{},\"alias2\":{\"filter\":{\"term\":{\"user.id\":\"kimchy\"}},\"routing\":\"shard-1\"},\"{index}-alias\":{}}}}' \"$ELASTICSEARCH_URL/_index_template/template_1\"" + }, + { + "language": "Java", + "code": "client.indices().putIndexTemplate(p -> p\n .indexPatterns(\"template*\")\n .name(\"template_1\")\n .template(t -> t\n .aliases(Map.of(\"alias1\", Alias.of(a -> a),\"{index}-alias\", Alias.of(a -> a),\"alias2\", Alias.of(a -> a\n .filter(f -> f\n .term(te -> te\n .field(\"user.id\")\n .value(FieldValue.of(\"kimchy\"))\n )\n )\n .routing(\"shard-1\"))))\n .settings(s -> s\n .numberOfShards(\"1\")\n )\n )\n);\n" + } + ], + "specification/indices/clone/examples/request/indicesCloneRequestExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.indices.clone(\n index=\"my_source_index\",\n target=\"my_target_index\",\n settings={\n \"index.number_of_shards\": 5\n },\n aliases={\n \"my_search_indices\": {}\n },\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.indices.clone({\n index: \"my_source_index\",\n target: \"my_target_index\",\n settings: {\n \"index.number_of_shards\": 5,\n },\n aliases: {\n my_search_indices: {},\n },\n});" + }, + { + "language": "Ruby", + "code": "response = client.indices.clone(\n index: \"my_source_index\",\n target: \"my_target_index\",\n body: {\n \"settings\": {\n \"index.number_of_shards\": 5\n },\n \"aliases\": {\n \"my_search_indices\": {}\n }\n }\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->indices()->clone([\n \"index\" => \"my_source_index\",\n \"target\" => \"my_target_index\",\n \"body\" => [\n \"settings\" => [\n \"index.number_of_shards\" => 5,\n ],\n \"aliases\" => [\n \"my_search_indices\" => new ArrayObject([]),\n ],\n ],\n]);" + }, + { + "language": "curl", + "code": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"settings\":{\"index.number_of_shards\":5},\"aliases\":{\"my_search_indices\":{}}}' \"$ELASTICSEARCH_URL/my_source_index/_clone/my_target_index\"" + }, + { + "language": "Java", + "code": "client.indices().clone(c -> c\n .aliases(\"my_search_indices\", a -> a)\n .index(\"my_source_index\")\n .settings(\"index.number_of_shards\", JsonData.fromJson(\"5\"))\n .target(\"my_target_index\")\n);\n" + } + ], + "specification/indices/get_index_template/examples/request/IndicesGetIndexTemplateExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.indices.get_index_template(\n name=\"*\",\n filter_path=\"index_templates.name,index_templates.index_template.index_patterns,index_templates.index_template.data_stream\",\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.indices.getIndexTemplate({\n name: \"*\",\n filter_path:\n \"index_templates.name,index_templates.index_template.index_patterns,index_templates.index_template.data_stream\",\n});" + }, + { + "language": "Ruby", + "code": "response = client.indices.get_index_template(\n name: \"*\",\n filter_path: \"index_templates.name,index_templates.index_template.index_patterns,index_templates.index_template.data_stream\"\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->indices()->getIndexTemplate([\n \"name\" => \"*\",\n \"filter_path\" => \"index_templates.name,index_templates.index_template.index_patterns,index_templates.index_template.data_stream\",\n]);" + }, + { + "language": "curl", + "code": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_index_template/*?filter_path=index_templates.name,index_templates.index_template.index_patterns,index_templates.index_template.data_stream\"" + }, + { + "language": "Java", + "code": "\n" + } + ], + "specification/indices/get_data_lifecycle/examples/request/IndicesGetDataLifecycleRequestExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.indices.get_data_lifecycle(\n name=\"{name}\",\n human=True,\n pretty=True,\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.indices.getDataLifecycle({\n name: \"{name}\",\n human: \"true\",\n pretty: \"true\",\n});" + }, + { + "language": "Ruby", + "code": "response = client.indices.get_data_lifecycle(\n name: \"{name}\",\n human: \"true\",\n pretty: \"true\"\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->indices()->getDataLifecycle([\n \"name\" => \"{name}\",\n \"human\" => \"true\",\n \"pretty\" => \"true\",\n]);" + }, + { + "language": "curl", + "code": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_data_stream/%7Bname%7D/_lifecycle?human&pretty\"" + }, + { + "language": "Java", + "code": "\n" + } + ], + "specification/indices/get_data_stream/examples/request/IndicesGetDataStreamExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.indices.get_data_stream(\n name=\"my-data-stream\",\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.indices.getDataStream({\n name: \"my-data-stream\",\n});" + }, + { + "language": "Ruby", + "code": "response = client.indices.get_data_stream(\n name: \"my-data-stream\"\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->indices()->getDataStream([\n \"name\" => \"my-data-stream\",\n]);" + }, + { + "language": "curl", + "code": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_data_stream/my-data-stream\"" + }, + { + "language": "Java", + "code": "client.indices().getDataStream(g -> g\n .name(\"my-data-stream\")\n);\n" + } + ], + "specification/indices/modify_data_stream/examples/request/IndicesModifyDataStreamExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.indices.modify_data_stream(\n actions=[\n {\n \"remove_backing_index\": {\n \"data_stream\": \"my-data-stream\",\n \"index\": \".ds-my-data-stream-2023.07.26-000001\"\n }\n },\n {\n \"add_backing_index\": {\n \"data_stream\": \"my-data-stream\",\n \"index\": \".ds-my-data-stream-2023.07.26-000001-downsample\"\n }\n }\n ],\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.indices.modifyDataStream({\n actions: [\n {\n remove_backing_index: {\n data_stream: \"my-data-stream\",\n index: \".ds-my-data-stream-2023.07.26-000001\",\n },\n },\n {\n add_backing_index: {\n data_stream: \"my-data-stream\",\n index: \".ds-my-data-stream-2023.07.26-000001-downsample\",\n },\n },\n ],\n});" + }, + { + "language": "Ruby", + "code": "response = client.indices.modify_data_stream(\n body: {\n \"actions\": [\n {\n \"remove_backing_index\": {\n \"data_stream\": \"my-data-stream\",\n \"index\": \".ds-my-data-stream-2023.07.26-000001\"\n }\n },\n {\n \"add_backing_index\": {\n \"data_stream\": \"my-data-stream\",\n \"index\": \".ds-my-data-stream-2023.07.26-000001-downsample\"\n }\n }\n ]\n }\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->indices()->modifyDataStream([\n \"body\" => [\n \"actions\" => array(\n [\n \"remove_backing_index\" => [\n \"data_stream\" => \"my-data-stream\",\n \"index\" => \".ds-my-data-stream-2023.07.26-000001\",\n ],\n ],\n [\n \"add_backing_index\" => [\n \"data_stream\" => \"my-data-stream\",\n \"index\" => \".ds-my-data-stream-2023.07.26-000001-downsample\",\n ],\n ],\n ),\n ],\n]);" + }, + { + "language": "curl", + "code": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"actions\":[{\"remove_backing_index\":{\"data_stream\":\"my-data-stream\",\"index\":\".ds-my-data-stream-2023.07.26-000001\"}},{\"add_backing_index\":{\"data_stream\":\"my-data-stream\",\"index\":\".ds-my-data-stream-2023.07.26-000001-downsample\"}}]}' \"$ELASTICSEARCH_URL/_data_stream/_modify\"" + }, + { + "language": "Java", + "code": "client.indices().modifyDataStream(m -> m\n .actions(List.of(Action.of(a -> a\n .removeBackingIndex(r -> r\n .dataStream(\"my-data-stream\")\n .index(\".ds-my-data-stream-2023.07.26-000001\")\n )),Action.of(ac -> ac\n .addBackingIndex(ad -> ad\n .dataStream(\"my-data-stream\")\n .index(\".ds-my-data-stream-2023.07.26-000001-downsample\")\n ))))\n);\n" + } + ], + "specification/indices/analyze/examples/request/indicesAnalyzeRequestExample3.yaml": [ + { + "language": "Python", + "code": "resp = client.indices.analyze(\n tokenizer=\"keyword\",\n filter=[\n \"lowercase\"\n ],\n char_filter=[\n \"html_strip\"\n ],\n text=\"this is a test\",\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.indices.analyze({\n tokenizer: \"keyword\",\n filter: [\"lowercase\"],\n char_filter: [\"html_strip\"],\n text: \"this is a test\",\n});" + }, + { + "language": "Ruby", + "code": "response = client.indices.analyze(\n body: {\n \"tokenizer\": \"keyword\",\n \"filter\": [\n \"lowercase\"\n ],\n \"char_filter\": [\n \"html_strip\"\n ],\n \"text\": \"this is a test\"\n }\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->indices()->analyze([\n \"body\" => [\n \"tokenizer\" => \"keyword\",\n \"filter\" => array(\n \"lowercase\",\n ),\n \"char_filter\" => array(\n \"html_strip\",\n ),\n \"text\" => \"this is a test\",\n ],\n]);" + }, + { + "language": "curl", + "code": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"tokenizer\":\"keyword\",\"filter\":[\"lowercase\"],\"char_filter\":[\"html_strip\"],\"text\":\"this is a test\"}' \"$ELASTICSEARCH_URL/_analyze\"" + }, + { + "language": "Java", + "code": "client.indices().analyze(a -> a\n .charFilter(c -> c\n .name(\"html_strip\")\n )\n .filter(f -> f\n .name(\"lowercase\")\n )\n .text(\"this is a test\")\n .tokenizer(t -> t\n .name(\"keyword\")\n )\n);\n" + } + ], + "specification/indices/analyze/examples/request/indicesAnalyzeRequestExample2.yaml": [ + { + "language": "Python", + "code": "resp = client.indices.analyze(\n analyzer=\"standard\",\n text=[\n \"this is a test\",\n \"the second text\"\n ],\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.indices.analyze({\n analyzer: \"standard\",\n text: [\"this is a test\", \"the second text\"],\n});" + }, + { + "language": "Ruby", + "code": "response = client.indices.analyze(\n body: {\n \"analyzer\": \"standard\",\n \"text\": [\n \"this is a test\",\n \"the second text\"\n ]\n }\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->indices()->analyze([\n \"body\" => [\n \"analyzer\" => \"standard\",\n \"text\" => array(\n \"this is a test\",\n \"the second text\",\n ),\n ],\n]);" + }, + { + "language": "curl", + "code": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"analyzer\":\"standard\",\"text\":[\"this is a test\",\"the second text\"]}' \"$ELASTICSEARCH_URL/_analyze\"" + }, + { + "language": "Java", + "code": "client.indices().analyze(a -> a\n .analyzer(\"standard\")\n .text(List.of(\"this is a test\",\"the second text\"))\n);\n" + } + ], + "specification/indices/analyze/examples/request/indicesAnalyzeRequestExample5.yaml": [ + { + "language": "Python", + "code": "resp = client.indices.analyze(\n index=\"analyze_sample\",\n field=\"obj1.field1\",\n text=\"this is a test\",\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.indices.analyze({\n index: \"analyze_sample\",\n field: \"obj1.field1\",\n text: \"this is a test\",\n});" + }, + { + "language": "Ruby", + "code": "response = client.indices.analyze(\n index: \"analyze_sample\",\n body: {\n \"field\": \"obj1.field1\",\n \"text\": \"this is a test\"\n }\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->indices()->analyze([\n \"index\" => \"analyze_sample\",\n \"body\" => [\n \"field\" => \"obj1.field1\",\n \"text\" => \"this is a test\",\n ],\n]);" + }, + { + "language": "curl", + "code": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"field\":\"obj1.field1\",\"text\":\"this is a test\"}' \"$ELASTICSEARCH_URL/analyze_sample/_analyze\"" + }, + { + "language": "Java", + "code": "client.indices().analyze(a -> a\n .field(\"obj1.field1\")\n .index(\"analyze_sample\")\n .text(\"this is a test\")\n);\n" + } + ], + "specification/indices/analyze/examples/request/indicesAnalyzeRequestExample4.yaml": [ + { + "language": "Python", + "code": "resp = client.indices.analyze(\n tokenizer=\"whitespace\",\n filter=[\n \"lowercase\",\n {\n \"type\": \"stop\",\n \"stopwords\": [\n \"a\",\n \"is\",\n \"this\"\n ]\n }\n ],\n text=\"this is a test\",\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.indices.analyze({\n tokenizer: \"whitespace\",\n filter: [\n \"lowercase\",\n {\n type: \"stop\",\n stopwords: [\"a\", \"is\", \"this\"],\n },\n ],\n text: \"this is a test\",\n});" + }, + { + "language": "Ruby", + "code": "response = client.indices.analyze(\n body: {\n \"tokenizer\": \"whitespace\",\n \"filter\": [\n \"lowercase\",\n {\n \"type\": \"stop\",\n \"stopwords\": [\n \"a\",\n \"is\",\n \"this\"\n ]\n }\n ],\n \"text\": \"this is a test\"\n }\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->indices()->analyze([\n \"body\" => [\n \"tokenizer\" => \"whitespace\",\n \"filter\" => array(\n \"lowercase\",\n [\n \"type\" => \"stop\",\n \"stopwords\" => array(\n \"a\",\n \"is\",\n \"this\",\n ),\n ],\n ),\n \"text\" => \"this is a test\",\n ],\n]);" + }, + { + "language": "curl", + "code": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"tokenizer\":\"whitespace\",\"filter\":[\"lowercase\",{\"type\":\"stop\",\"stopwords\":[\"a\",\"is\",\"this\"]}],\"text\":\"this is a test\"}' \"$ELASTICSEARCH_URL/_analyze\"" + }, + { + "language": "Java", + "code": "client.indices().analyze(a -> a\n .filter(List.of(TokenFilter.of(t -> t\n .name(\"lowercase\"\n )),TokenFilter.of(to -> to\n .definition(d -> d\n .stop(s -> s\n .stopwords(List.of(\"a\",\"is\",\"this\"))\n )\n ))))\n .text(\"this is a test\")\n .tokenizer(tok -> tok\n .name(\"whitespace\")\n )\n);\n" + } + ], + "specification/indices/analyze/examples/request/indicesAnalyzeRequestExample7.yaml": [ + { + "language": "Python", + "code": "resp = client.indices.analyze(\n tokenizer=\"standard\",\n filter=[\n \"snowball\"\n ],\n text=\"detailed output\",\n explain=True,\n attributes=[\n \"keyword\"\n ],\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.indices.analyze({\n tokenizer: \"standard\",\n filter: [\"snowball\"],\n text: \"detailed output\",\n explain: true,\n attributes: [\"keyword\"],\n});" + }, + { + "language": "Ruby", + "code": "response = client.indices.analyze(\n body: {\n \"tokenizer\": \"standard\",\n \"filter\": [\n \"snowball\"\n ],\n \"text\": \"detailed output\",\n \"explain\": true,\n \"attributes\": [\n \"keyword\"\n ]\n }\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->indices()->analyze([\n \"body\" => [\n \"tokenizer\" => \"standard\",\n \"filter\" => array(\n \"snowball\",\n ),\n \"text\" => \"detailed output\",\n \"explain\" => true,\n \"attributes\" => array(\n \"keyword\",\n ),\n ],\n]);" + }, + { + "language": "curl", + "code": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"tokenizer\":\"standard\",\"filter\":[\"snowball\"],\"text\":\"detailed output\",\"explain\":true,\"attributes\":[\"keyword\"]}' \"$ELASTICSEARCH_URL/_analyze\"" + }, + { + "language": "Java", + "code": "client.indices().analyze(a -> a\n .attributes(\"keyword\")\n .explain(true)\n .filter(f -> f\n .name(\"snowball\")\n )\n .text(\"detailed output\")\n .tokenizer(t -> t\n .name(\"standard\")\n )\n);\n" + } + ], + "specification/indices/analyze/examples/request/indicesAnalyzeRequestExample6.yaml": [ + { + "language": "Python", + "code": "resp = client.indices.analyze(\n index=\"analyze_sample\",\n normalizer=\"my_normalizer\",\n text=\"BaR\",\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.indices.analyze({\n index: \"analyze_sample\",\n normalizer: \"my_normalizer\",\n text: \"BaR\",\n});" + }, + { + "language": "Ruby", + "code": "response = client.indices.analyze(\n index: \"analyze_sample\",\n body: {\n \"normalizer\": \"my_normalizer\",\n \"text\": \"BaR\"\n }\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->indices()->analyze([\n \"index\" => \"analyze_sample\",\n \"body\" => [\n \"normalizer\" => \"my_normalizer\",\n \"text\" => \"BaR\",\n ],\n]);" + }, + { + "language": "curl", + "code": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"normalizer\":\"my_normalizer\",\"text\":\"BaR\"}' \"$ELASTICSEARCH_URL/analyze_sample/_analyze\"" + }, + { + "language": "Java", + "code": "client.indices().analyze(a -> a\n .index(\"analyze_sample\")\n .normalizer(\"my_normalizer\")\n .text(\"BaR\")\n);\n" + } + ], + "specification/indices/analyze/examples/request/indicesAnalyzeRequestExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.indices.analyze(\n analyzer=\"standard\",\n text=\"this is a test\",\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.indices.analyze({\n analyzer: \"standard\",\n text: \"this is a test\",\n});" + }, + { + "language": "Ruby", + "code": "response = client.indices.analyze(\n body: {\n \"analyzer\": \"standard\",\n \"text\": \"this is a test\"\n }\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->indices()->analyze([\n \"body\" => [\n \"analyzer\" => \"standard\",\n \"text\" => \"this is a test\",\n ],\n]);" + }, + { + "language": "curl", + "code": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"analyzer\":\"standard\",\"text\":\"this is a test\"}' \"$ELASTICSEARCH_URL/_analyze\"" + }, + { + "language": "Java", + "code": "client.indices().analyze(a -> a\n .analyzer(\"standard\")\n .text(\"this is a test\")\n);\n" + } + ], + "specification/indices/shard_stores/examples/request/indicesShardStoresRequestExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.indices.shard_stores(\n status=\"green\",\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.indices.shardStores({\n status: \"green\",\n});" + }, + { + "language": "Ruby", + "code": "response = client.indices.shard_stores(\n status: \"green\"\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->indices()->shardStores([\n \"status\" => \"green\",\n]);" + }, + { + "language": "curl", + "code": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_shard_stores?status=green\"" + } + ], + "specification/indices/get_data_stream_settings/examples/request/IndicesGetDataStreamSettingsRequestExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.indices.get_data_stream_settings(\n name=\"my-data-stream\",\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.indices.getDataStreamSettings({\n name: \"my-data-stream\",\n});" + }, + { + "language": "Ruby", + "code": "response = client.indices.get_data_stream_settings(\n name: \"my-data-stream\"\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->indices()->getDataStreamSettings([\n \"name\" => \"my-data-stream\",\n]);" + }, + { + "language": "curl", + "code": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_data_stream/my-data-stream/_settings\"" + } + ], + "specification/indices/get_alias/examples/request/IndicesGetAliasExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.indices.get_alias()" + }, + { + "language": "JavaScript", + "code": "const response = await client.indices.getAlias();" + }, + { + "language": "Ruby", + "code": "response = client.indices.get_alias" + }, + { + "language": "PHP", + "code": "$resp = $client->indices()->getAlias();" + }, + { + "language": "curl", + "code": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_alias\"" + }, + { + "language": "Java", + "code": "client.indices().getAlias(g -> g);\n" + } + ], + "specification/indices/remove_block/examples/request/IndicesRemoveBlockRequestExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.indices.remove_block(\n index=\"my-index-000001\",\n block=\"write\",\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.indices.removeBlock({\n index: \"my-index-000001\",\n block: \"write\",\n});" + }, + { + "language": "Ruby", + "code": "response = client.indices.remove_block(\n index: \"my-index-000001\",\n block: \"write\"\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->indices()->removeBlock([\n \"index\" => \"my-index-000001\",\n \"block\" => \"write\",\n]);" + }, + { + "language": "curl", + "code": "curl -X DELETE -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/my-index-000001/_block/write\"" + }, + { + "language": "Java", + "code": "client.indices().removeBlock(a -> a\n .block(IndicesBlockOptions.Write)\n .index(\"my-index-000001\")\n);\n" + } + ], + "specification/indices/put_alias/examples/request/indicesPutAliasRequestExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.indices.update_aliases(\n actions=[\n {\n \"add\": {\n \"index\": \"my-data-stream\",\n \"alias\": \"my-alias\"\n }\n }\n ],\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.indices.updateAliases({\n actions: [\n {\n add: {\n index: \"my-data-stream\",\n alias: \"my-alias\",\n },\n },\n ],\n});" + }, + { + "language": "Ruby", + "code": "response = client.indices.update_aliases(\n body: {\n \"actions\": [\n {\n \"add\": {\n \"index\": \"my-data-stream\",\n \"alias\": \"my-alias\"\n }\n }\n ]\n }\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->indices()->updateAliases([\n \"body\" => [\n \"actions\" => array(\n [\n \"add\" => [\n \"index\" => \"my-data-stream\",\n \"alias\" => \"my-alias\",\n ],\n ],\n ),\n ],\n]);" + }, + { + "language": "curl", + "code": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"actions\":[{\"add\":{\"index\":\"my-data-stream\",\"alias\":\"my-alias\"}}]}' \"$ELASTICSEARCH_URL/_aliases\"" + }, + { + "language": "Java", + "code": "client.indices().updateAliases(u -> u\n .actions(a -> a\n .add(ad -> ad\n .alias(\"my-alias\")\n .index(\"my-data-stream\")\n )\n )\n);\n" + } + ], + "specification/indices/put_data_stream_settings/examples/request/IndicesPutDataStreamSettingsRequestExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.indices.put_data_stream_settings(\n name=\"my-data-stream\",\n settings={\n \"index.lifecycle.name\": \"new-test-policy\",\n \"index.number_of_shards\": 11\n },\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.indices.putDataStreamSettings({\n name: \"my-data-stream\",\n settings: {\n \"index.lifecycle.name\": \"new-test-policy\",\n \"index.number_of_shards\": 11,\n },\n});" + }, + { + "language": "Ruby", + "code": "response = client.indices.put_data_stream_settings(\n name: \"my-data-stream\",\n body: {\n \"index.lifecycle.name\": \"new-test-policy\",\n \"index.number_of_shards\": 11\n }\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->indices()->putDataStreamSettings([\n \"name\" => \"my-data-stream\",\n \"body\" => [\n \"index.lifecycle.name\" => \"new-test-policy\",\n \"index.number_of_shards\" => 11,\n ],\n]);" + }, + { + "language": "curl", + "code": "curl -X PUT -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"index.lifecycle.name\":\"new-test-policy\",\"index.number_of_shards\":11}' \"$ELASTICSEARCH_URL/_data_stream/my-data-stream/_settings\"" + } + ], + "specification/indices/get_field_mapping/examples/request/indicesGetFieldMappingRequestExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.indices.get_field_mapping(\n index=\"publications\",\n fields=\"title\",\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.indices.getFieldMapping({\n index: \"publications\",\n fields: \"title\",\n});" + }, + { + "language": "Ruby", + "code": "response = client.indices.get_field_mapping(\n index: \"publications\",\n fields: \"title\"\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->indices()->getFieldMapping([\n \"index\" => \"publications\",\n \"fields\" => \"title\",\n]);" + }, + { + "language": "curl", + "code": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/publications/_mapping/field/title\"" + }, + { + "language": "Java", + "code": "client.indices().getFieldMapping(g -> g\n .fields(\"title\")\n .index(\"publications\")\n);\n" + } + ], + "specification/indices/migrate_reindex/examples/request/IndicesMigrateReindexExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.perform_request(\n \"POST\",\n \"/_migration/reindex\",\n headers={\"Content-Type\": \"application/json\"},\n body={\n \"source\": {\n \"index\": \"my-data-stream\"\n },\n \"mode\": \"upgrade\"\n },\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.transport.request({\n method: \"POST\",\n path: \"/_migration/reindex\",\n body: {\n source: {\n index: \"my-data-stream\",\n },\n mode: \"upgrade\",\n },\n});" + }, + { + "language": "Ruby", + "code": "response = client.perform_request(\n \"POST\",\n \"/_migration/reindex\",\n {},\n {\n \"source\": {\n \"index\": \"my-data-stream\"\n },\n \"mode\": \"upgrade\"\n },\n { \"Content-Type\": \"application/json\" },\n)" + }, + { + "language": "PHP", + "code": "$requestFactory = Psr17FactoryDiscovery::findRequestFactory();\n$streamFactory = Psr17FactoryDiscovery::findStreamFactory();\n$request = $requestFactory->createRequest(\n \"POST\",\n \"/_migration/reindex\",\n);\n$request = $request->withHeader(\"Content-Type\", \"application/json\");\n$request = $request->withBody($streamFactory->createStream(\n json_encode([\n \"source\" => [\n \"index\" => \"my-data-stream\",\n ],\n \"mode\" => \"upgrade\",\n ]),\n));\n$resp = $client->sendRequest($request);" + }, + { + "language": "curl", + "code": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"source\":{\"index\":\"my-data-stream\"},\"mode\":\"upgrade\"}' \"$ELASTICSEARCH_URL/_migration/reindex\"" + }, + { + "language": "Java", + "code": "client.indices().migrateReindex(m -> m\n .reindex(r -> r\n .mode(ModeEnum.Upgrade)\n .source(s -> s\n .index(\"my-data-stream\")\n )\n )\n);\n" + } + ], + "specification/indices/create/examples/request/indicesCreateRequestExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.indices.create(\n index=\"my-index-000001\",\n settings={\n \"number_of_shards\": 3,\n \"number_of_replicas\": 2\n },\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.indices.create({\n index: \"my-index-000001\",\n settings: {\n number_of_shards: 3,\n number_of_replicas: 2,\n },\n});" + }, + { + "language": "Ruby", + "code": "response = client.indices.create(\n index: \"my-index-000001\",\n body: {\n \"settings\": {\n \"number_of_shards\": 3,\n \"number_of_replicas\": 2\n }\n }\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->indices()->create([\n \"index\" => \"my-index-000001\",\n \"body\" => [\n \"settings\" => [\n \"number_of_shards\" => 3,\n \"number_of_replicas\" => 2,\n ],\n ],\n]);" + }, + { + "language": "curl", + "code": "curl -X PUT -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"settings\":{\"number_of_shards\":3,\"number_of_replicas\":2}}' \"$ELASTICSEARCH_URL/my-index-000001\"" + }, + { + "language": "Java", + "code": "client.indices().create(c -> c\n .index(\"my-index-000001\")\n .settings(s -> s\n .numberOfShards(\"3\")\n .numberOfReplicas(\"2\")\n )\n);\n" + } + ], + "specification/indices/create/examples/request/indicesCreateRequestExample2.yaml": [ + { + "language": "Python", + "code": "resp = client.indices.create(\n index=\"test\",\n settings={\n \"number_of_shards\": 1\n },\n mappings={\n \"properties\": {\n \"field1\": {\n \"type\": \"text\"\n }\n }\n },\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.indices.create({\n index: \"test\",\n settings: {\n number_of_shards: 1,\n },\n mappings: {\n properties: {\n field1: {\n type: \"text\",\n },\n },\n },\n});" + }, + { + "language": "Ruby", + "code": "response = client.indices.create(\n index: \"test\",\n body: {\n \"settings\": {\n \"number_of_shards\": 1\n },\n \"mappings\": {\n \"properties\": {\n \"field1\": {\n \"type\": \"text\"\n }\n }\n }\n }\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->indices()->create([\n \"index\" => \"test\",\n \"body\" => [\n \"settings\" => [\n \"number_of_shards\" => 1,\n ],\n \"mappings\" => [\n \"properties\" => [\n \"field1\" => [\n \"type\" => \"text\",\n ],\n ],\n ],\n ],\n]);" + }, + { + "language": "curl", + "code": "curl -X PUT -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"settings\":{\"number_of_shards\":1},\"mappings\":{\"properties\":{\"field1\":{\"type\":\"text\"}}}}' \"$ELASTICSEARCH_URL/test\"" + }, + { + "language": "Java", + "code": "client.indices().create(c -> c\n .index(\"test\")\n .mappings(m -> m\n .properties(\"field1\", p -> p\n .text(t -> t)\n )\n )\n .settings(s -> s\n .numberOfShards(\"1\")\n )\n);\n" + } + ], + "specification/indices/create/examples/request/indicesCreateRequestExample3.yaml": [ + { + "language": "Python", + "code": "resp = client.indices.create(\n index=\"test\",\n aliases={\n \"alias_1\": {},\n \"alias_2\": {\n \"filter\": {\n \"term\": {\n \"user.id\": \"kimchy\"\n }\n },\n \"routing\": \"shard-1\"\n }\n },\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.indices.create({\n index: \"test\",\n aliases: {\n alias_1: {},\n alias_2: {\n filter: {\n term: {\n \"user.id\": \"kimchy\",\n },\n },\n routing: \"shard-1\",\n },\n },\n});" + }, + { + "language": "Ruby", + "code": "response = client.indices.create(\n index: \"test\",\n body: {\n \"aliases\": {\n \"alias_1\": {},\n \"alias_2\": {\n \"filter\": {\n \"term\": {\n \"user.id\": \"kimchy\"\n }\n },\n \"routing\": \"shard-1\"\n }\n }\n }\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->indices()->create([\n \"index\" => \"test\",\n \"body\" => [\n \"aliases\" => [\n \"alias_1\" => new ArrayObject([]),\n \"alias_2\" => [\n \"filter\" => [\n \"term\" => [\n \"user.id\" => \"kimchy\",\n ],\n ],\n \"routing\" => \"shard-1\",\n ],\n ],\n ],\n]);" + }, + { + "language": "curl", + "code": "curl -X PUT -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"aliases\":{\"alias_1\":{},\"alias_2\":{\"filter\":{\"term\":{\"user.id\":\"kimchy\"}},\"routing\":\"shard-1\"}}}' \"$ELASTICSEARCH_URL/test\"" + }, + { + "language": "Java", + "code": "client.indices().create(c -> c\n .aliases(Map.of(\"alias_2\", Alias.of(a -> a\n .filter(f -> f\n .term(t -> t\n .field(\"user.id\")\n .value(FieldValue.of(\"kimchy\"))\n )\n )\n .routing(\"shard-1\")),\"alias_1\", Alias.of(al -> al)))\n .index(\"test\")\n);\n" + } + ], + "specification/indices/field_usage_stats/examples/request/indicesFieldUsageStatsRequestExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.indices.field_usage_stats(\n index=\"my-index-000001\",\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.indices.fieldUsageStats({\n index: \"my-index-000001\",\n});" + }, + { + "language": "Ruby", + "code": "response = client.indices.field_usage_stats(\n index: \"my-index-000001\"\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->indices()->fieldUsageStats([\n \"index\" => \"my-index-000001\",\n]);" + }, + { + "language": "curl", + "code": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/my-index-000001/_field_usage_stats\"" + }, + { + "language": "Java", + "code": "client.indices().fieldUsageStats(f -> f\n .index(\"my-index-000001\")\n);\n" + } + ], + "specification/indices/migrate_to_data_stream/examples/request/IndicesMigrateToDataStreamExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.indices.migrate_to_data_stream(\n name=\"my-time-series-data\",\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.indices.migrateToDataStream({\n name: \"my-time-series-data\",\n});" + }, + { + "language": "Ruby", + "code": "response = client.indices.migrate_to_data_stream(\n name: \"my-time-series-data\"\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->indices()->migrateToDataStream([\n \"name\" => \"my-time-series-data\",\n]);" + }, + { + "language": "curl", + "code": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_data_stream/_migrate/my-time-series-data\"" + }, + { + "language": "Java", + "code": "client.indices().migrateToDataStream(m -> m\n .name(\"my-time-series-data\")\n);\n" + } + ], + "specification/indices/open/examples/request/IndicesOpenExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.indices.open(\n index=\".ds-my-data-stream-2099.03.07-000001\",\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.indices.open({\n index: \".ds-my-data-stream-2099.03.07-000001\",\n});" + }, + { + "language": "Ruby", + "code": "response = client.indices.open(\n index: \".ds-my-data-stream-2099.03.07-000001\"\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->indices()->open([\n \"index\" => \".ds-my-data-stream-2099.03.07-000001\",\n]);" + }, + { + "language": "curl", + "code": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/.ds-my-data-stream-2099.03.07-000001/_open/\"" + }, + { + "language": "Java", + "code": "client.indices().open(o -> o\n .index(\".ds-my-data-stream-2099.03.07-000001\")\n);\n" + } + ], + "specification/indices/stats/examples/request/IndicesStatsExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.indices.stats(\n metric=\"fielddata\",\n human=True,\n fields=\"my_join_field\",\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.indices.stats({\n metric: \"fielddata\",\n human: \"true\",\n fields: \"my_join_field\",\n});" + }, + { + "language": "Ruby", + "code": "response = client.indices.stats(\n metric: \"fielddata\",\n human: \"true\",\n fields: \"my_join_field\"\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->indices()->stats([\n \"metric\" => \"fielddata\",\n \"human\" => \"true\",\n \"fields\" => \"my_join_field\",\n]);" + }, + { + "language": "curl", + "code": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_stats/fielddata?human&fields=my_join_field#question\"" + }, + { + "language": "Java", + "code": "\n" + } + ], + "specification/indices/segments/examples/request/IndicesSegmentsExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.indices.segments(\n index=\"my-index-000001\",\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.indices.segments({\n index: \"my-index-000001\",\n});" + }, + { + "language": "Ruby", + "code": "response = client.indices.segments(\n index: \"my-index-000001\"\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->indices()->segments([\n \"index\" => \"my-index-000001\",\n]);" + }, + { + "language": "curl", + "code": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/my-index-000001/_segments\"" + }, + { + "language": "Java", + "code": "client.indices().segments(s -> s\n .index(\"my-index-000001\")\n);\n" + } + ], + "specification/indices/put_mapping/examples/request/indicesPutMappingRequestExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.indices.put_mapping(\n index=\"my-index-000001\",\n properties={\n \"user\": {\n \"properties\": {\n \"name\": {\n \"type\": \"keyword\"\n }\n }\n }\n },\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.indices.putMapping({\n index: \"my-index-000001\",\n properties: {\n user: {\n properties: {\n name: {\n type: \"keyword\",\n },\n },\n },\n },\n});" + }, + { + "language": "Ruby", + "code": "response = client.indices.put_mapping(\n index: \"my-index-000001\",\n body: {\n \"properties\": {\n \"user\": {\n \"properties\": {\n \"name\": {\n \"type\": \"keyword\"\n }\n }\n }\n }\n }\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->indices()->putMapping([\n \"index\" => \"my-index-000001\",\n \"body\" => [\n \"properties\" => [\n \"user\" => [\n \"properties\" => [\n \"name\" => [\n \"type\" => \"keyword\",\n ],\n ],\n ],\n ],\n ],\n]);" + }, + { + "language": "curl", + "code": "curl -X PUT -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"properties\":{\"user\":{\"properties\":{\"name\":{\"type\":\"keyword\"}}}}}' \"$ELASTICSEARCH_URL/my-index-000001/_mapping\"" + }, + { + "language": "Java", + "code": "client.indices().putMapping(p -> p\n .index(\"my-index-000001\")\n .properties(\"user\", pr -> pr\n .object(o -> o\n .properties(\"name\", pro -> pro\n .keyword(k -> k)\n )\n )\n )\n);\n" + } + ], + "specification/indices/resolve_cluster/examples/request/ResolveClusterRequestExample2.yaml": [ + { + "language": "Python", + "code": "resp = client.indices.resolve_cluster(\n name=\"not-present,clust*:my-index*,oldcluster:*\",\n ignore_unavailable=False,\n timeout=\"5s\",\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.indices.resolveCluster({\n name: \"not-present,clust*:my-index*,oldcluster:*\",\n ignore_unavailable: \"false\",\n timeout: \"5s\",\n});" + }, + { + "language": "Ruby", + "code": "response = client.indices.resolve_cluster(\n name: \"not-present,clust*:my-index*,oldcluster:*\",\n ignore_unavailable: \"false\",\n timeout: \"5s\"\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->indices()->resolveCluster([\n \"name\" => \"not-present,clust*:my-index*,oldcluster:*\",\n \"ignore_unavailable\" => \"false\",\n \"timeout\" => \"5s\",\n]);" + }, + { + "language": "curl", + "code": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_resolve/cluster/not-present,clust*:my-index*,oldcluster:*?ignore_unavailable=false&timeout=5s\"" + }, + { + "language": "Java", + "code": "client.indices().resolveCluster(r -> r\n .ignoreUnavailable(false)\n .name(List.of(\"not-present\",\"clust*:my-index*\",\"oldcluster:*\"))\n .timeout(t -> t\n .offset(5)\n )\n);\n" + } + ], + "specification/_global/get_source/examples/request/GetSourceRequestExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.get_source(\n index=\"my-index-000001\",\n id=\"1\",\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.getSource({\n index: \"my-index-000001\",\n id: 1,\n});" + }, + { + "language": "Ruby", + "code": "response = client.get_source(\n index: \"my-index-000001\",\n id: \"1\"\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->getSource([\n \"index\" => \"my-index-000001\",\n \"id\" => \"1\",\n]);" + }, + { + "language": "curl", + "code": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/my-index-000001/_source/1\"" + }, + { + "language": "Java", + "code": "client.getSource(g -> g\n .id(\"1\")\n .index(\"my-index-000001\")\n);\n" + } + ], + "specification/_global/get_script_languages/examples/request/GetScriptLanguagesRequestExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.get_script_languages()" + }, + { + "language": "JavaScript", + "code": "const response = await client.getScriptLanguages();" + }, + { + "language": "Ruby", + "code": "response = client.get_script_languages" + }, + { + "language": "PHP", + "code": "$resp = $client->getScriptLanguages();" + }, + { + "language": "curl", + "code": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_script_language\"" + }, + { + "language": "Java", + "code": "client.getScriptLanguages();\n" + } + ], + "specification/_global/update_by_query_rethrottle/examples/request/UpdateByQueryRethrottleRequestExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.update_by_query_rethrottle(\n task_id=\"r1A2WoRbTwKZ516z6NEs5A:36619\",\n requests_per_second=\"-1\",\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.updateByQueryRethrottle({\n task_id: \"r1A2WoRbTwKZ516z6NEs5A:36619\",\n requests_per_second: \"-1\",\n});" + }, + { + "language": "Ruby", + "code": "response = client.update_by_query_rethrottle(\n task_id: \"r1A2WoRbTwKZ516z6NEs5A:36619\",\n requests_per_second: \"-1\"\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->updateByQueryRethrottle([\n \"task_id\" => \"r1A2WoRbTwKZ516z6NEs5A:36619\",\n \"requests_per_second\" => \"-1\",\n]);" + }, + { + "language": "curl", + "code": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_update_by_query/r1A2WoRbTwKZ516z6NEs5A:36619/_rethrottle?requests_per_second=-1\"" + }, + { + "language": "Java", + "code": "client.updateByQueryRethrottle(u -> u\n .requestsPerSecond(-1.0F)\n .taskId(\"r1A2WoRbTwKZ516z6NEs5A:36619\")\n);\n" + } + ], + "specification/_global/scripts_painless_execute/examples/request/ExecutePainlessScriptRequestExample2.yaml": [ + { + "language": "Python", + "code": "resp = client.scripts_painless_execute(\n script={\n \"source\": \"doc['field'].value.length() <= params.max_length\",\n \"params\": {\n \"max_length\": 4\n }\n },\n context=\"filter\",\n context_setup={\n \"index\": \"my-index-000001\",\n \"document\": {\n \"field\": \"four\"\n }\n },\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.scriptsPainlessExecute({\n script: {\n source: \"doc['field'].value.length() <= params.max_length\",\n params: {\n max_length: 4,\n },\n },\n context: \"filter\",\n context_setup: {\n index: \"my-index-000001\",\n document: {\n field: \"four\",\n },\n },\n});" + }, + { + "language": "Ruby", + "code": "response = client.scripts_painless_execute(\n body: {\n \"script\": {\n \"source\": \"doc['field'].value.length() <= params.max_length\",\n \"params\": {\n \"max_length\": 4\n }\n },\n \"context\": \"filter\",\n \"context_setup\": {\n \"index\": \"my-index-000001\",\n \"document\": {\n \"field\": \"four\"\n }\n }\n }\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->scriptsPainlessExecute([\n \"body\" => [\n \"script\" => [\n \"source\" => \"doc['field'].value.length() <= params.max_length\",\n \"params\" => [\n \"max_length\" => 4,\n ],\n ],\n \"context\" => \"filter\",\n \"context_setup\" => [\n \"index\" => \"my-index-000001\",\n \"document\" => [\n \"field\" => \"four\",\n ],\n ],\n ],\n]);" + }, + { + "language": "curl", + "code": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"script\":{\"source\":\"doc['\"'\"'field'\"'\"'].value.length() <= params.max_length\",\"params\":{\"max_length\":4}},\"context\":\"filter\",\"context_setup\":{\"index\":\"my-index-000001\",\"document\":{\"field\":\"four\"}}}' \"$ELASTICSEARCH_URL/_scripts/painless/_execute\"" + }, + { + "language": "Java", + "code": "client.scriptsPainlessExecute(s -> s\n .context(PainlessContext.Filter)\n .contextSetup(c -> c\n .document(JsonData.fromJson(\"{\\\"field\\\":\\\"four\\\"}\"))\n .index(\"my-index-000001\")\n )\n .script(sc -> sc\n .source(so -> so\n .scriptString(\"doc['field'].value.length() <= params.max_length\")\n )\n .params(\"max_length\", JsonData.fromJson(\"4\"))\n )\n);\n" + } + ], + "specification/_global/scripts_painless_execute/examples/request/ExecutePainlessScriptRequestExample3.yaml": [ + { + "language": "Python", + "code": "resp = client.scripts_painless_execute(\n script={\n \"source\": \"doc['rank'].value / params.max_rank\",\n \"params\": {\n \"max_rank\": 5\n }\n },\n context=\"score\",\n context_setup={\n \"index\": \"my-index-000001\",\n \"document\": {\n \"rank\": 4\n }\n },\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.scriptsPainlessExecute({\n script: {\n source: \"doc['rank'].value / params.max_rank\",\n params: {\n max_rank: 5,\n },\n },\n context: \"score\",\n context_setup: {\n index: \"my-index-000001\",\n document: {\n rank: 4,\n },\n },\n});" + }, + { + "language": "Ruby", + "code": "response = client.scripts_painless_execute(\n body: {\n \"script\": {\n \"source\": \"doc['rank'].value / params.max_rank\",\n \"params\": {\n \"max_rank\": 5\n }\n },\n \"context\": \"score\",\n \"context_setup\": {\n \"index\": \"my-index-000001\",\n \"document\": {\n \"rank\": 4\n }\n }\n }\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->scriptsPainlessExecute([\n \"body\" => [\n \"script\" => [\n \"source\" => \"doc['rank'].value / params.max_rank\",\n \"params\" => [\n \"max_rank\" => 5,\n ],\n ],\n \"context\" => \"score\",\n \"context_setup\" => [\n \"index\" => \"my-index-000001\",\n \"document\" => [\n \"rank\" => 4,\n ],\n ],\n ],\n]);" + }, + { + "language": "curl", + "code": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"script\":{\"source\":\"doc['\"'\"'rank'\"'\"'].value / params.max_rank\",\"params\":{\"max_rank\":5}},\"context\":\"score\",\"context_setup\":{\"index\":\"my-index-000001\",\"document\":{\"rank\":4}}}' \"$ELASTICSEARCH_URL/_scripts/painless/_execute\"" + }, + { + "language": "Java", + "code": "client.scriptsPainlessExecute(s -> s\n .context(PainlessContext.Score)\n .contextSetup(c -> c\n .document(JsonData.fromJson(\"{\\\"rank\\\":4}\"))\n .index(\"my-index-000001\")\n )\n .script(sc -> sc\n .source(so -> so\n .scriptString(\"doc['rank'].value / params.max_rank\")\n )\n .params(\"max_rank\", JsonData.fromJson(\"5\"))\n )\n);\n" + } + ], + "specification/_global/scripts_painless_execute/examples/request/ExecutePainlessScriptRequestExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.scripts_painless_execute(\n script={\n \"source\": \"params.count / params.total\",\n \"params\": {\n \"count\": 100,\n \"total\": 1000\n }\n },\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.scriptsPainlessExecute({\n script: {\n source: \"params.count / params.total\",\n params: {\n count: 100,\n total: 1000,\n },\n },\n});" + }, + { + "language": "Ruby", + "code": "response = client.scripts_painless_execute(\n body: {\n \"script\": {\n \"source\": \"params.count / params.total\",\n \"params\": {\n \"count\": 100,\n \"total\": 1000\n }\n }\n }\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->scriptsPainlessExecute([\n \"body\" => [\n \"script\" => [\n \"source\" => \"params.count / params.total\",\n \"params\" => [\n \"count\" => 100,\n \"total\" => 1000,\n ],\n ],\n ],\n]);" + }, + { + "language": "curl", + "code": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"script\":{\"source\":\"params.count / params.total\",\"params\":{\"count\":100,\"total\":1000}}}' \"$ELASTICSEARCH_URL/_scripts/painless/_execute\"" + }, + { + "language": "Java", + "code": "client.scriptsPainlessExecute(s -> s\n .script(sc -> sc\n .source(so -> so\n .scriptString(\"params.count / params.total\")\n )\n .params(Map.of(\"total\", JsonData.fromJson(\"1000\"),\"count\", JsonData.fromJson(\"100\")))\n )\n);\n" + } + ], + "specification/_global/get_script_context/examples/request/GetScriptContextRequestExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.get_script_context()" + }, + { + "language": "JavaScript", + "code": "const response = await client.getScriptContext();" + }, + { + "language": "Ruby", + "code": "response = client.get_script_context" + }, + { + "language": "PHP", + "code": "$resp = $client->getScriptContext();" + }, + { + "language": "curl", + "code": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_script_context\"" + }, + { + "language": "Java", + "code": "client.getScriptContext();\n" + } + ], + "specification/_global/msearch_template/examples/request/MultiSearchTemplateRequestExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.msearch_template(\n index=\"my-index\",\n search_templates=[\n {},\n {\n \"id\": \"my-search-template\",\n \"params\": {\n \"query_string\": \"hello world\",\n \"from\": 0,\n \"size\": 10\n }\n },\n {},\n {\n \"id\": \"my-other-search-template\",\n \"params\": {\n \"query_type\": \"match_all\"\n }\n }\n ],\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.msearchTemplate({\n index: \"my-index\",\n search_templates: [\n {},\n {\n id: \"my-search-template\",\n params: {\n query_string: \"hello world\",\n from: 0,\n size: 10,\n },\n },\n {},\n {\n id: \"my-other-search-template\",\n params: {\n query_type: \"match_all\",\n },\n },\n ],\n});" + }, + { + "language": "Ruby", + "code": "response = client.msearch_template(\n index: \"my-index\",\n body: [\n {},\n {\n \"id\": \"my-search-template\",\n \"params\": {\n \"query_string\": \"hello world\",\n \"from\": 0,\n \"size\": 10\n }\n },\n {},\n {\n \"id\": \"my-other-search-template\",\n \"params\": {\n \"query_type\": \"match_all\"\n }\n }\n ]\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->msearchTemplate([\n \"index\" => \"my-index\",\n \"body\" => array(\n new ArrayObject([]),\n [\n \"id\" => \"my-search-template\",\n \"params\" => [\n \"query_string\" => \"hello world\",\n \"from\" => 0,\n \"size\" => 10,\n ],\n ],\n new ArrayObject([]),\n [\n \"id\" => \"my-other-search-template\",\n \"params\" => [\n \"query_type\" => \"match_all\",\n ],\n ],\n ),\n]);" + }, + { + "language": "curl", + "code": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '[{},{\"id\":\"my-search-template\",\"params\":{\"query_string\":\"hello world\",\"from\":0,\"size\":10}},{},{\"id\":\"my-other-search-template\",\"params\":{\"query_type\":\"match_all\"}}]' \"$ELASTICSEARCH_URL/my-index/_msearch/template\"" + } + ], + "specification/_global/terms_enum/examples/request/TermsEnumRequestExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.terms_enum(\n index=\"stackoverflow\",\n field=\"tags\",\n string=\"kiba\",\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.termsEnum({\n index: \"stackoverflow\",\n field: \"tags\",\n string: \"kiba\",\n});" + }, + { + "language": "Ruby", + "code": "response = client.terms_enum(\n index: \"stackoverflow\",\n body: {\n \"field\": \"tags\",\n \"string\": \"kiba\"\n }\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->termsEnum([\n \"index\" => \"stackoverflow\",\n \"body\" => [\n \"field\" => \"tags\",\n \"string\" => \"kiba\",\n ],\n]);" + }, + { + "language": "curl", + "code": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"field\":\"tags\",\"string\":\"kiba\"}' \"$ELASTICSEARCH_URL/stackoverflow/_terms_enum\"" + }, + { + "language": "Java", + "code": "client.termsEnum(t -> t\n .field(\"tags\")\n .index(\"stackoverflow\")\n .string(\"kiba\")\n);\n" + } + ], + "specification/_global/bulk/examples/request/BulkRequestExample4.yaml": [ + { + "language": "Python", + "code": "resp = client.bulk(\n operations=[\n {\n \"index\": {\n \"_index\": \"my_index\",\n \"_id\": \"1\",\n \"dynamic_templates\": {\n \"work_location\": \"geo_point\"\n }\n }\n },\n {\n \"field\": \"value1\",\n \"work_location\": \"41.12,-71.34\",\n \"raw_location\": \"41.12,-71.34\"\n },\n {\n \"create\": {\n \"_index\": \"my_index\",\n \"_id\": \"2\",\n \"dynamic_templates\": {\n \"home_location\": \"geo_point\"\n }\n }\n },\n {\n \"field\": \"value2\",\n \"home_location\": \"41.12,-71.34\"\n }\n ],\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.bulk({\n operations: [\n {\n index: {\n _index: \"my_index\",\n _id: \"1\",\n dynamic_templates: {\n work_location: \"geo_point\",\n },\n },\n },\n {\n field: \"value1\",\n work_location: \"41.12,-71.34\",\n raw_location: \"41.12,-71.34\",\n },\n {\n create: {\n _index: \"my_index\",\n _id: \"2\",\n dynamic_templates: {\n home_location: \"geo_point\",\n },\n },\n },\n {\n field: \"value2\",\n home_location: \"41.12,-71.34\",\n },\n ],\n});" + }, + { + "language": "Ruby", + "code": "response = client.bulk(\n body: [\n {\n \"index\": {\n \"_index\": \"my_index\",\n \"_id\": \"1\",\n \"dynamic_templates\": {\n \"work_location\": \"geo_point\"\n }\n }\n },\n {\n \"field\": \"value1\",\n \"work_location\": \"41.12,-71.34\",\n \"raw_location\": \"41.12,-71.34\"\n },\n {\n \"create\": {\n \"_index\": \"my_index\",\n \"_id\": \"2\",\n \"dynamic_templates\": {\n \"home_location\": \"geo_point\"\n }\n }\n },\n {\n \"field\": \"value2\",\n \"home_location\": \"41.12,-71.34\"\n }\n ]\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->bulk([\n \"body\" => array(\n [\n \"index\" => [\n \"_index\" => \"my_index\",\n \"_id\" => \"1\",\n \"dynamic_templates\" => [\n \"work_location\" => \"geo_point\",\n ],\n ],\n ],\n [\n \"field\" => \"value1\",\n \"work_location\" => \"41.12,-71.34\",\n \"raw_location\" => \"41.12,-71.34\",\n ],\n [\n \"create\" => [\n \"_index\" => \"my_index\",\n \"_id\" => \"2\",\n \"dynamic_templates\" => [\n \"home_location\" => \"geo_point\",\n ],\n ],\n ],\n [\n \"field\" => \"value2\",\n \"home_location\" => \"41.12,-71.34\",\n ],\n ),\n]);" + }, + { + "language": "curl", + "code": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '[{\"index\":{\"_index\":\"my_index\",\"_id\":\"1\",\"dynamic_templates\":{\"work_location\":\"geo_point\"}}},{\"field\":\"value1\",\"work_location\":\"41.12,-71.34\",\"raw_location\":\"41.12,-71.34\"},{\"create\":{\"_index\":\"my_index\",\"_id\":\"2\",\"dynamic_templates\":{\"home_location\":\"geo_point\"}}},{\"field\":\"value2\",\"home_location\":\"41.12,-71.34\"}]' \"$ELASTICSEARCH_URL/_bulk\"" + } + ], + "specification/_global/bulk/examples/request/BulkRequestExample3.yaml": [ + { + "language": "Python", + "code": "resp = client.bulk(\n operations=[\n {\n \"update\": {\n \"_id\": \"5\",\n \"_index\": \"index1\"\n }\n },\n {\n \"doc\": {\n \"my_field\": \"foo\"\n }\n },\n {\n \"update\": {\n \"_id\": \"6\",\n \"_index\": \"index1\"\n }\n },\n {\n \"doc\": {\n \"my_field\": \"foo\"\n }\n },\n {\n \"create\": {\n \"_id\": \"7\",\n \"_index\": \"index1\"\n }\n },\n {\n \"my_field\": \"foo\"\n }\n ],\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.bulk({\n operations: [\n {\n update: {\n _id: \"5\",\n _index: \"index1\",\n },\n },\n {\n doc: {\n my_field: \"foo\",\n },\n },\n {\n update: {\n _id: \"6\",\n _index: \"index1\",\n },\n },\n {\n doc: {\n my_field: \"foo\",\n },\n },\n {\n create: {\n _id: \"7\",\n _index: \"index1\",\n },\n },\n {\n my_field: \"foo\",\n },\n ],\n});" + }, + { + "language": "Ruby", + "code": "response = client.bulk(\n body: [\n {\n \"update\": {\n \"_id\": \"5\",\n \"_index\": \"index1\"\n }\n },\n {\n \"doc\": {\n \"my_field\": \"foo\"\n }\n },\n {\n \"update\": {\n \"_id\": \"6\",\n \"_index\": \"index1\"\n }\n },\n {\n \"doc\": {\n \"my_field\": \"foo\"\n }\n },\n {\n \"create\": {\n \"_id\": \"7\",\n \"_index\": \"index1\"\n }\n },\n {\n \"my_field\": \"foo\"\n }\n ]\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->bulk([\n \"body\" => array(\n [\n \"update\" => [\n \"_id\" => \"5\",\n \"_index\" => \"index1\",\n ],\n ],\n [\n \"doc\" => [\n \"my_field\" => \"foo\",\n ],\n ],\n [\n \"update\" => [\n \"_id\" => \"6\",\n \"_index\" => \"index1\",\n ],\n ],\n [\n \"doc\" => [\n \"my_field\" => \"foo\",\n ],\n ],\n [\n \"create\" => [\n \"_id\" => \"7\",\n \"_index\" => \"index1\",\n ],\n ],\n [\n \"my_field\" => \"foo\",\n ],\n ),\n]);" + }, + { + "language": "curl", + "code": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '[{\"update\":{\"_id\":\"5\",\"_index\":\"index1\"}},{\"doc\":{\"my_field\":\"foo\"}},{\"update\":{\"_id\":\"6\",\"_index\":\"index1\"}},{\"doc\":{\"my_field\":\"foo\"}},{\"create\":{\"_id\":\"7\",\"_index\":\"index1\"}},{\"my_field\":\"foo\"}]' \"$ELASTICSEARCH_URL/_bulk\"" + } + ], + "specification/_global/bulk/examples/request/BulkRequestExample2.yaml": [ + { + "language": "Python", + "code": "resp = client.bulk(\n operations=[\n {\n \"update\": {\n \"_id\": \"1\",\n \"_index\": \"index1\",\n \"retry_on_conflict\": 3\n }\n },\n {\n \"doc\": {\n \"field\": \"value\"\n }\n },\n {\n \"update\": {\n \"_id\": \"0\",\n \"_index\": \"index1\",\n \"retry_on_conflict\": 3\n }\n },\n {\n \"script\": {\n \"source\": \"ctx._source.counter += params.param1\",\n \"lang\": \"painless\",\n \"params\": {\n \"param1\": 1\n }\n },\n \"upsert\": {\n \"counter\": 1\n }\n },\n {\n \"update\": {\n \"_id\": \"2\",\n \"_index\": \"index1\",\n \"retry_on_conflict\": 3\n }\n },\n {\n \"doc\": {\n \"field\": \"value\"\n },\n \"doc_as_upsert\": True\n },\n {\n \"update\": {\n \"_id\": \"3\",\n \"_index\": \"index1\",\n \"_source\": True\n }\n },\n {\n \"doc\": {\n \"field\": \"value\"\n }\n },\n {\n \"update\": {\n \"_id\": \"4\",\n \"_index\": \"index1\"\n }\n },\n {\n \"doc\": {\n \"field\": \"value\"\n },\n \"_source\": True\n }\n ],\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.bulk({\n operations: [\n {\n update: {\n _id: \"1\",\n _index: \"index1\",\n retry_on_conflict: 3,\n },\n },\n {\n doc: {\n field: \"value\",\n },\n },\n {\n update: {\n _id: \"0\",\n _index: \"index1\",\n retry_on_conflict: 3,\n },\n },\n {\n script: {\n source: \"ctx._source.counter += params.param1\",\n lang: \"painless\",\n params: {\n param1: 1,\n },\n },\n upsert: {\n counter: 1,\n },\n },\n {\n update: {\n _id: \"2\",\n _index: \"index1\",\n retry_on_conflict: 3,\n },\n },\n {\n doc: {\n field: \"value\",\n },\n doc_as_upsert: true,\n },\n {\n update: {\n _id: \"3\",\n _index: \"index1\",\n _source: true,\n },\n },\n {\n doc: {\n field: \"value\",\n },\n },\n {\n update: {\n _id: \"4\",\n _index: \"index1\",\n },\n },\n {\n doc: {\n field: \"value\",\n },\n _source: true,\n },\n ],\n});" + }, + { + "language": "Ruby", + "code": "response = client.bulk(\n body: [\n {\n \"update\": {\n \"_id\": \"1\",\n \"_index\": \"index1\",\n \"retry_on_conflict\": 3\n }\n },\n {\n \"doc\": {\n \"field\": \"value\"\n }\n },\n {\n \"update\": {\n \"_id\": \"0\",\n \"_index\": \"index1\",\n \"retry_on_conflict\": 3\n }\n },\n {\n \"script\": {\n \"source\": \"ctx._source.counter += params.param1\",\n \"lang\": \"painless\",\n \"params\": {\n \"param1\": 1\n }\n },\n \"upsert\": {\n \"counter\": 1\n }\n },\n {\n \"update\": {\n \"_id\": \"2\",\n \"_index\": \"index1\",\n \"retry_on_conflict\": 3\n }\n },\n {\n \"doc\": {\n \"field\": \"value\"\n },\n \"doc_as_upsert\": true\n },\n {\n \"update\": {\n \"_id\": \"3\",\n \"_index\": \"index1\",\n \"_source\": true\n }\n },\n {\n \"doc\": {\n \"field\": \"value\"\n }\n },\n {\n \"update\": {\n \"_id\": \"4\",\n \"_index\": \"index1\"\n }\n },\n {\n \"doc\": {\n \"field\": \"value\"\n },\n \"_source\": true\n }\n ]\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->bulk([\n \"body\" => array(\n [\n \"update\" => [\n \"_id\" => \"1\",\n \"_index\" => \"index1\",\n \"retry_on_conflict\" => 3,\n ],\n ],\n [\n \"doc\" => [\n \"field\" => \"value\",\n ],\n ],\n [\n \"update\" => [\n \"_id\" => \"0\",\n \"_index\" => \"index1\",\n \"retry_on_conflict\" => 3,\n ],\n ],\n [\n \"script\" => [\n \"source\" => \"ctx._source.counter += params.param1\",\n \"lang\" => \"painless\",\n \"params\" => [\n \"param1\" => 1,\n ],\n ],\n \"upsert\" => [\n \"counter\" => 1,\n ],\n ],\n [\n \"update\" => [\n \"_id\" => \"2\",\n \"_index\" => \"index1\",\n \"retry_on_conflict\" => 3,\n ],\n ],\n [\n \"doc\" => [\n \"field\" => \"value\",\n ],\n \"doc_as_upsert\" => true,\n ],\n [\n \"update\" => [\n \"_id\" => \"3\",\n \"_index\" => \"index1\",\n \"_source\" => true,\n ],\n ],\n [\n \"doc\" => [\n \"field\" => \"value\",\n ],\n ],\n [\n \"update\" => [\n \"_id\" => \"4\",\n \"_index\" => \"index1\",\n ],\n ],\n [\n \"doc\" => [\n \"field\" => \"value\",\n ],\n \"_source\" => true,\n ],\n ),\n]);" + }, + { + "language": "curl", + "code": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '[{\"update\":{\"_id\":\"1\",\"_index\":\"index1\",\"retry_on_conflict\":3}},{\"doc\":{\"field\":\"value\"}},{\"update\":{\"_id\":\"0\",\"_index\":\"index1\",\"retry_on_conflict\":3}},{\"script\":{\"source\":\"ctx._source.counter += params.param1\",\"lang\":\"painless\",\"params\":{\"param1\":1}},\"upsert\":{\"counter\":1}},{\"update\":{\"_id\":\"2\",\"_index\":\"index1\",\"retry_on_conflict\":3}},{\"doc\":{\"field\":\"value\"},\"doc_as_upsert\":true},{\"update\":{\"_id\":\"3\",\"_index\":\"index1\",\"_source\":true}},{\"doc\":{\"field\":\"value\"}},{\"update\":{\"_id\":\"4\",\"_index\":\"index1\"}},{\"doc\":{\"field\":\"value\"},\"_source\":true}]' \"$ELASTICSEARCH_URL/_bulk\"" + } + ], + "specification/_global/bulk/examples/request/BulkRequestExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.bulk(\n operations=[\n {\n \"index\": {\n \"_index\": \"test\",\n \"_id\": \"1\"\n }\n },\n {\n \"field1\": \"value1\"\n },\n {\n \"delete\": {\n \"_index\": \"test\",\n \"_id\": \"2\"\n }\n },\n {\n \"create\": {\n \"_index\": \"test\",\n \"_id\": \"3\"\n }\n },\n {\n \"field1\": \"value3\"\n },\n {\n \"update\": {\n \"_id\": \"1\",\n \"_index\": \"test\"\n }\n },\n {\n \"doc\": {\n \"field2\": \"value2\"\n }\n }\n ],\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.bulk({\n operations: [\n {\n index: {\n _index: \"test\",\n _id: \"1\",\n },\n },\n {\n field1: \"value1\",\n },\n {\n delete: {\n _index: \"test\",\n _id: \"2\",\n },\n },\n {\n create: {\n _index: \"test\",\n _id: \"3\",\n },\n },\n {\n field1: \"value3\",\n },\n {\n update: {\n _id: \"1\",\n _index: \"test\",\n },\n },\n {\n doc: {\n field2: \"value2\",\n },\n },\n ],\n});" + }, + { + "language": "Ruby", + "code": "response = client.bulk(\n body: [\n {\n \"index\": {\n \"_index\": \"test\",\n \"_id\": \"1\"\n }\n },\n {\n \"field1\": \"value1\"\n },\n {\n \"delete\": {\n \"_index\": \"test\",\n \"_id\": \"2\"\n }\n },\n {\n \"create\": {\n \"_index\": \"test\",\n \"_id\": \"3\"\n }\n },\n {\n \"field1\": \"value3\"\n },\n {\n \"update\": {\n \"_id\": \"1\",\n \"_index\": \"test\"\n }\n },\n {\n \"doc\": {\n \"field2\": \"value2\"\n }\n }\n ]\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->bulk([\n \"body\" => array(\n [\n \"index\" => [\n \"_index\" => \"test\",\n \"_id\" => \"1\",\n ],\n ],\n [\n \"field1\" => \"value1\",\n ],\n [\n \"delete\" => [\n \"_index\" => \"test\",\n \"_id\" => \"2\",\n ],\n ],\n [\n \"create\" => [\n \"_index\" => \"test\",\n \"_id\" => \"3\",\n ],\n ],\n [\n \"field1\" => \"value3\",\n ],\n [\n \"update\" => [\n \"_id\" => \"1\",\n \"_index\" => \"test\",\n ],\n ],\n [\n \"doc\" => [\n \"field2\" => \"value2\",\n ],\n ],\n ),\n]);" + }, + { + "language": "curl", + "code": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '[{\"index\":{\"_index\":\"test\",\"_id\":\"1\"}},{\"field1\":\"value1\"},{\"delete\":{\"_index\":\"test\",\"_id\":\"2\"}},{\"create\":{\"_index\":\"test\",\"_id\":\"3\"}},{\"field1\":\"value3\"},{\"update\":{\"_id\":\"1\",\"_index\":\"test\"}},{\"doc\":{\"field2\":\"value2\"}}]' \"$ELASTICSEARCH_URL/_bulk\"" + } + ], + "specification/_global/explain/examples/request/ExplainRequestExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.explain(\n index=\"my-index-000001\",\n id=\"0\",\n query={\n \"match\": {\n \"message\": \"elasticsearch\"\n }\n },\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.explain({\n index: \"my-index-000001\",\n id: 0,\n query: {\n match: {\n message: \"elasticsearch\",\n },\n },\n});" + }, + { + "language": "Ruby", + "code": "response = client.explain(\n index: \"my-index-000001\",\n id: \"0\",\n body: {\n \"query\": {\n \"match\": {\n \"message\": \"elasticsearch\"\n }\n }\n }\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->explain([\n \"index\" => \"my-index-000001\",\n \"id\" => \"0\",\n \"body\" => [\n \"query\" => [\n \"match\" => [\n \"message\" => \"elasticsearch\",\n ],\n ],\n ],\n]);" + }, + { + "language": "curl", + "code": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"query\":{\"match\":{\"message\":\"elasticsearch\"}}}' \"$ELASTICSEARCH_URL/my-index-000001/_explain/0\"" + }, + { + "language": "Java", + "code": "client.explain(e -> e\n .id(\"0\")\n .index(\"my-index-000001\")\n .query(q -> q\n .match(m -> m\n .field(\"message\")\n .query(FieldValue.of(\"elasticsearch\"))\n )\n )\n);\n" + } + ], + "specification/_global/get_script/examples/request/GetScriptRequestExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.get_script(\n id=\"my-search-template\",\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.getScript({\n id: \"my-search-template\",\n});" + }, + { + "language": "Ruby", + "code": "response = client.get_script(\n id: \"my-search-template\"\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->getScript([\n \"id\" => \"my-search-template\",\n]);" + }, + { + "language": "curl", + "code": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_scripts/my-search-template\"" + }, + { + "language": "Java", + "code": "client.getScript(g -> g\n .id(\"my-search-template\")\n);\n" + } + ], + "specification/_global/search_template/examples/request/SearchTemplateRequestExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.search_template(\n index=\"my-index\",\n id=\"my-search-template\",\n params={\n \"query_string\": \"hello world\",\n \"from\": 0,\n \"size\": 10\n },\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.searchTemplate({\n index: \"my-index\",\n id: \"my-search-template\",\n params: {\n query_string: \"hello world\",\n from: 0,\n size: 10,\n },\n});" + }, + { + "language": "Ruby", + "code": "response = client.search_template(\n index: \"my-index\",\n body: {\n \"id\": \"my-search-template\",\n \"params\": {\n \"query_string\": \"hello world\",\n \"from\": 0,\n \"size\": 10\n }\n }\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->searchTemplate([\n \"index\" => \"my-index\",\n \"body\" => [\n \"id\" => \"my-search-template\",\n \"params\" => [\n \"query_string\" => \"hello world\",\n \"from\" => 0,\n \"size\" => 10,\n ],\n ],\n]);" + }, + { + "language": "curl", + "code": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"id\":\"my-search-template\",\"params\":{\"query_string\":\"hello world\",\"from\":0,\"size\":10}}' \"$ELASTICSEARCH_URL/my-index/_search/template\"" + }, + { + "language": "Java", + "code": "client.searchTemplate(s -> s\n .id(\"my-search-template\")\n .index(\"my-index\")\n .params(Map.of(\"size\", JsonData.fromJson(\"10\"),\"from\", JsonData.fromJson(\"0\"),\"query_string\", JsonData.fromJson(\"\\\"hello world\\\"\")))\n);\n" + } + ], + "specification/_global/scroll/examples/request/ScrollRequestExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.scroll(\n scroll_id=\"DXF1ZXJ5QW5kRmV0Y2gBAAAAAAAAAD4WYm9laVYtZndUQlNsdDcwakFMNjU1QQ==\",\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.scroll({\n scroll_id: \"DXF1ZXJ5QW5kRmV0Y2gBAAAAAAAAAD4WYm9laVYtZndUQlNsdDcwakFMNjU1QQ==\",\n});" + }, + { + "language": "Ruby", + "code": "response = client.scroll(\n body: {\n \"scroll_id\": \"DXF1ZXJ5QW5kRmV0Y2gBAAAAAAAAAD4WYm9laVYtZndUQlNsdDcwakFMNjU1QQ==\"\n }\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->scroll([\n \"body\" => [\n \"scroll_id\" => \"DXF1ZXJ5QW5kRmV0Y2gBAAAAAAAAAD4WYm9laVYtZndUQlNsdDcwakFMNjU1QQ==\",\n ],\n]);" + }, + { + "language": "curl", + "code": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"scroll_id\":\"DXF1ZXJ5QW5kRmV0Y2gBAAAAAAAAAD4WYm9laVYtZndUQlNsdDcwakFMNjU1QQ==\"}' \"$ELASTICSEARCH_URL/_search/scroll\"" + }, + { + "language": "Java", + "code": "client.scroll(s -> s\n .scrollId(\"DXF1ZXJ5QW5kRmV0Y2gBAAAAAAAAAD4WYm9laVYtZndUQlNsdDcwakFMNjU1QQ==\")\n);\n" + } + ], + "specification/_global/update/examples/request/UpdateRequestExample7.yaml": [ + { + "language": "Python", + "code": "resp = client.update(\n index=\"test\",\n id=\"1\",\n script={\n \"source\": \"if (ctx._source.tags.contains(params.tag)) { ctx.op = 'delete' } else { ctx.op = 'noop' }\",\n \"lang\": \"painless\",\n \"params\": {\n \"tag\": \"green\"\n }\n },\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.update({\n index: \"test\",\n id: 1,\n script: {\n source:\n \"if (ctx._source.tags.contains(params.tag)) { ctx.op = 'delete' } else { ctx.op = 'noop' }\",\n lang: \"painless\",\n params: {\n tag: \"green\",\n },\n },\n});" + }, + { + "language": "Ruby", + "code": "response = client.update(\n index: \"test\",\n id: \"1\",\n body: {\n \"script\": {\n \"source\": \"if (ctx._source.tags.contains(params.tag)) { ctx.op = 'delete' } else { ctx.op = 'noop' }\",\n \"lang\": \"painless\",\n \"params\": {\n \"tag\": \"green\"\n }\n }\n }\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->update([\n \"index\" => \"test\",\n \"id\" => \"1\",\n \"body\" => [\n \"script\" => [\n \"source\" => \"if (ctx._source.tags.contains(params.tag)) { ctx.op = 'delete' } else { ctx.op = 'noop' }\",\n \"lang\" => \"painless\",\n \"params\" => [\n \"tag\" => \"green\",\n ],\n ],\n ],\n]);" + }, + { + "language": "curl", + "code": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"script\":{\"source\":\"if (ctx._source.tags.contains(params.tag)) { ctx.op = '\"'\"'delete'\"'\"' } else { ctx.op = '\"'\"'noop'\"'\"' }\",\"lang\":\"painless\",\"params\":{\"tag\":\"green\"}}}' \"$ELASTICSEARCH_URL/test/_update/1\"" + }, + { + "language": "Java", + "code": "client.update(u -> u\n .id(\"1\")\n .index(\"test\")\n .script(s -> s\n .source(so -> so\n .scriptString(\"if (ctx._source.tags.contains(params.tag)) { ctx.op = 'delete' } else { ctx.op = 'noop' }\")\n )\n .params(\"tag\", JsonData.fromJson(\"\\\"green\\\"\"))\n .lang(\"painless\")\n )\n,Void.class);\n" + } + ], + "specification/_global/update/examples/request/UpdateRequestExample6.yaml": [ + { + "language": "Python", + "code": "resp = client.update(\n index=\"test\",\n id=\"1\",\n script=\"ctx._source['my-object'].remove('my-subfield')\",\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.update({\n index: \"test\",\n id: 1,\n script: \"ctx._source['my-object'].remove('my-subfield')\",\n});" + }, + { + "language": "Ruby", + "code": "response = client.update(\n index: \"test\",\n id: \"1\",\n body: {\n \"script\": \"ctx._source['my-object'].remove('my-subfield')\"\n }\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->update([\n \"index\" => \"test\",\n \"id\" => \"1\",\n \"body\" => [\n \"script\" => \"ctx._source['my-object'].remove('my-subfield')\",\n ],\n]);" + }, + { + "language": "curl", + "code": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"script\":\"ctx._source['\"'\"'my-object'\"'\"'].remove('\"'\"'my-subfield'\"'\"')\"}' \"$ELASTICSEARCH_URL/test/_update/1\"" + }, + { + "language": "Java", + "code": "client.update(u -> u\n .id(\"1\")\n .index(\"test\")\n .script(s -> s\n .source(so -> so\n .scriptString(\"ctx._source['my-object'].remove('my-subfield')\")\n )\n )\n,Void.class);\n" + } + ], + "specification/_global/update/examples/request/UpdateRequestExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.update(\n index=\"test\",\n id=\"1\",\n script={\n \"source\": \"ctx._source.counter += params.count\",\n \"lang\": \"painless\",\n \"params\": {\n \"count\": 4\n }\n },\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.update({\n index: \"test\",\n id: 1,\n script: {\n source: \"ctx._source.counter += params.count\",\n lang: \"painless\",\n params: {\n count: 4,\n },\n },\n});" + }, + { + "language": "Ruby", + "code": "response = client.update(\n index: \"test\",\n id: \"1\",\n body: {\n \"script\": {\n \"source\": \"ctx._source.counter += params.count\",\n \"lang\": \"painless\",\n \"params\": {\n \"count\": 4\n }\n }\n }\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->update([\n \"index\" => \"test\",\n \"id\" => \"1\",\n \"body\" => [\n \"script\" => [\n \"source\" => \"ctx._source.counter += params.count\",\n \"lang\" => \"painless\",\n \"params\" => [\n \"count\" => 4,\n ],\n ],\n ],\n]);" + }, + { + "language": "curl", + "code": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"script\":{\"source\":\"ctx._source.counter += params.count\",\"lang\":\"painless\",\"params\":{\"count\":4}}}' \"$ELASTICSEARCH_URL/test/_update/1\"" + }, + { + "language": "Java", + "code": "client.update(u -> u\n .id(\"1\")\n .index(\"test\")\n .script(s -> s\n .source(so -> so\n .scriptString(\"ctx._source.counter += params.count\")\n )\n .params(\"count\", JsonData.fromJson(\"4\"))\n .lang(\"painless\")\n )\n,Void.class);\n" + } + ], + "specification/_global/update/examples/request/UpdateRequestExample3.yaml": [ + { + "language": "Python", + "code": "resp = client.update(\n index=\"test\",\n id=\"1\",\n script={\n \"source\": \"if (ctx._source.tags.contains(params.tag)) { ctx._source.tags.remove(ctx._source.tags.indexOf(params.tag)) }\",\n \"lang\": \"painless\",\n \"params\": {\n \"tag\": \"blue\"\n }\n },\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.update({\n index: \"test\",\n id: 1,\n script: {\n source:\n \"if (ctx._source.tags.contains(params.tag)) { ctx._source.tags.remove(ctx._source.tags.indexOf(params.tag)) }\",\n lang: \"painless\",\n params: {\n tag: \"blue\",\n },\n },\n});" + }, + { + "language": "Ruby", + "code": "response = client.update(\n index: \"test\",\n id: \"1\",\n body: {\n \"script\": {\n \"source\": \"if (ctx._source.tags.contains(params.tag)) { ctx._source.tags.remove(ctx._source.tags.indexOf(params.tag)) }\",\n \"lang\": \"painless\",\n \"params\": {\n \"tag\": \"blue\"\n }\n }\n }\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->update([\n \"index\" => \"test\",\n \"id\" => \"1\",\n \"body\" => [\n \"script\" => [\n \"source\" => \"if (ctx._source.tags.contains(params.tag)) { ctx._source.tags.remove(ctx._source.tags.indexOf(params.tag)) }\",\n \"lang\" => \"painless\",\n \"params\" => [\n \"tag\" => \"blue\",\n ],\n ],\n ],\n]);" + }, + { + "language": "curl", + "code": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"script\":{\"source\":\"if (ctx._source.tags.contains(params.tag)) { ctx._source.tags.remove(ctx._source.tags.indexOf(params.tag)) }\",\"lang\":\"painless\",\"params\":{\"tag\":\"blue\"}}}' \"$ELASTICSEARCH_URL/test/_update/1\"" + }, + { + "language": "Java", + "code": "client.update(u -> u\n .id(\"1\")\n .index(\"test\")\n .script(s -> s\n .source(so -> so\n .scriptString(\"if (ctx._source.tags.contains(params.tag)) { ctx._source.tags.remove(ctx._source.tags.indexOf(params.tag)) }\")\n )\n .params(\"tag\", JsonData.fromJson(\"\\\"blue\\\"\"))\n .lang(\"painless\")\n )\n,Void.class);\n" + } + ], + "specification/_global/update/examples/request/UpdateRequestExample2.yaml": [ + { + "language": "Python", + "code": "resp = client.update(\n index=\"test\",\n id=\"1\",\n script={\n \"source\": \"ctx._source.tags.add(params.tag)\",\n \"lang\": \"painless\",\n \"params\": {\n \"tag\": \"blue\"\n }\n },\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.update({\n index: \"test\",\n id: 1,\n script: {\n source: \"ctx._source.tags.add(params.tag)\",\n lang: \"painless\",\n params: {\n tag: \"blue\",\n },\n },\n});" + }, + { + "language": "Ruby", + "code": "response = client.update(\n index: \"test\",\n id: \"1\",\n body: {\n \"script\": {\n \"source\": \"ctx._source.tags.add(params.tag)\",\n \"lang\": \"painless\",\n \"params\": {\n \"tag\": \"blue\"\n }\n }\n }\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->update([\n \"index\" => \"test\",\n \"id\" => \"1\",\n \"body\" => [\n \"script\" => [\n \"source\" => \"ctx._source.tags.add(params.tag)\",\n \"lang\" => \"painless\",\n \"params\" => [\n \"tag\" => \"blue\",\n ],\n ],\n ],\n]);" + }, + { + "language": "curl", + "code": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"script\":{\"source\":\"ctx._source.tags.add(params.tag)\",\"lang\":\"painless\",\"params\":{\"tag\":\"blue\"}}}' \"$ELASTICSEARCH_URL/test/_update/1\"" + }, + { + "language": "Java", + "code": "client.update(u -> u\n .id(\"1\")\n .index(\"test\")\n .script(s -> s\n .source(so -> so\n .scriptString(\"ctx._source.tags.add(params.tag)\")\n )\n .params(\"tag\", JsonData.fromJson(\"\\\"blue\\\"\"))\n .lang(\"painless\")\n )\n,Void.class);\n" + } + ], + "specification/_global/update/examples/request/UpdateRequestExample5.yaml": [ + { + "language": "Python", + "code": "resp = client.update(\n index=\"test\",\n id=\"1\",\n script=\"ctx._source.remove('new_field')\",\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.update({\n index: \"test\",\n id: 1,\n script: \"ctx._source.remove('new_field')\",\n});" + }, + { + "language": "Ruby", + "code": "response = client.update(\n index: \"test\",\n id: \"1\",\n body: {\n \"script\": \"ctx._source.remove('new_field')\"\n }\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->update([\n \"index\" => \"test\",\n \"id\" => \"1\",\n \"body\" => [\n \"script\" => \"ctx._source.remove('new_field')\",\n ],\n]);" + }, + { + "language": "curl", + "code": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"script\":\"ctx._source.remove('\"'\"'new_field'\"'\"')\"}' \"$ELASTICSEARCH_URL/test/_update/1\"" + }, + { + "language": "Java", + "code": "client.update(u -> u\n .id(\"1\")\n .index(\"test\")\n .script(s -> s\n .source(so -> so\n .scriptString(\"ctx._source.remove('new_field')\")\n )\n )\n,Void.class);\n" + } + ], + "specification/_global/update/examples/request/UpdateRequestExample10.yaml": [ + { + "language": "Python", + "code": "resp = client.update(\n index=\"test\",\n id=\"1\",\n scripted_upsert=True,\n script={\n \"source\": \"\\n if ( ctx.op == 'create' ) {\\n ctx._source.counter = params.count\\n } else {\\n ctx._source.counter += params.count\\n }\\n \",\n \"params\": {\n \"count\": 4\n }\n },\n upsert={},\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.update({\n index: \"test\",\n id: 1,\n scripted_upsert: true,\n script: {\n source:\n \"\\n if ( ctx.op == 'create' ) {\\n ctx._source.counter = params.count\\n } else {\\n ctx._source.counter += params.count\\n }\\n \",\n params: {\n count: 4,\n },\n },\n upsert: {},\n});" + }, + { + "language": "Ruby", + "code": "response = client.update(\n index: \"test\",\n id: \"1\",\n body: {\n \"scripted_upsert\": true,\n \"script\": {\n \"source\": \"\\n if ( ctx.op == 'create' ) {\\n ctx._source.counter = params.count\\n } else {\\n ctx._source.counter += params.count\\n }\\n \",\n \"params\": {\n \"count\": 4\n }\n },\n \"upsert\": {}\n }\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->update([\n \"index\" => \"test\",\n \"id\" => \"1\",\n \"body\" => [\n \"scripted_upsert\" => true,\n \"script\" => [\n \"source\" => \"\\n if ( ctx.op == 'create' ) {\\n ctx._source.counter = params.count\\n } else {\\n ctx._source.counter += params.count\\n }\\n \",\n \"params\" => [\n \"count\" => 4,\n ],\n ],\n \"upsert\" => new ArrayObject([]),\n ],\n]);" + }, + { + "language": "curl", + "code": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"scripted_upsert\":true,\"script\":{\"source\":\"\\n if ( ctx.op == '\"'\"'create'\"'\"' ) {\\n ctx._source.counter = params.count\\n } else {\\n ctx._source.counter += params.count\\n }\\n \",\"params\":{\"count\":4}},\"upsert\":{}}' \"$ELASTICSEARCH_URL/test/_update/1\"" + }, + { + "language": "Java", + "code": "client.update(u -> u\n .id(\"1\")\n .index(\"test\")\n .script(s -> s\n .source(so -> so\n .scriptString(\"\n if ( ctx.op == 'create' ) {\n ctx._source.counter = params.count\n } else {\n ctx._source.counter += params.count\n }\n \")\n )\n .params(\"count\", JsonData.fromJson(\"4\"))\n )\n .scriptedUpsert(true)\n .upsert(JsonData.fromJson(\"{}\"))\n,Void.class);\n" + } + ], + "specification/_global/update/examples/request/UpdateRequestExample9.yaml": [ + { + "language": "Python", + "code": "resp = client.update(\n index=\"test\",\n id=\"1\",\n script={\n \"source\": \"ctx._source.counter += params.count\",\n \"lang\": \"painless\",\n \"params\": {\n \"count\": 4\n }\n },\n upsert={\n \"counter\": 1\n },\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.update({\n index: \"test\",\n id: 1,\n script: {\n source: \"ctx._source.counter += params.count\",\n lang: \"painless\",\n params: {\n count: 4,\n },\n },\n upsert: {\n counter: 1,\n },\n});" + }, + { + "language": "Ruby", + "code": "response = client.update(\n index: \"test\",\n id: \"1\",\n body: {\n \"script\": {\n \"source\": \"ctx._source.counter += params.count\",\n \"lang\": \"painless\",\n \"params\": {\n \"count\": 4\n }\n },\n \"upsert\": {\n \"counter\": 1\n }\n }\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->update([\n \"index\" => \"test\",\n \"id\" => \"1\",\n \"body\" => [\n \"script\" => [\n \"source\" => \"ctx._source.counter += params.count\",\n \"lang\" => \"painless\",\n \"params\" => [\n \"count\" => 4,\n ],\n ],\n \"upsert\" => [\n \"counter\" => 1,\n ],\n ],\n]);" + }, + { + "language": "curl", + "code": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"script\":{\"source\":\"ctx._source.counter += params.count\",\"lang\":\"painless\",\"params\":{\"count\":4}},\"upsert\":{\"counter\":1}}' \"$ELASTICSEARCH_URL/test/_update/1\"" + }, + { + "language": "Java", + "code": "client.update(u -> u\n .id(\"1\")\n .index(\"test\")\n .script(s -> s\n .source(so -> so\n .scriptString(\"ctx._source.counter += params.count\")\n )\n .params(\"count\", JsonData.fromJson(\"4\"))\n .lang(\"painless\")\n )\n .upsert(JsonData.fromJson(\"{\\\"counter\\\":1}\"))\n,Void.class);\n" + } + ], + "specification/_global/update/examples/request/UpdateRequestExample8.yaml": [ + { + "language": "Python", + "code": "resp = client.update(\n index=\"test\",\n id=\"1\",\n doc={\n \"name\": \"new_name\"\n },\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.update({\n index: \"test\",\n id: 1,\n doc: {\n name: \"new_name\",\n },\n});" + }, + { + "language": "Ruby", + "code": "response = client.update(\n index: \"test\",\n id: \"1\",\n body: {\n \"doc\": {\n \"name\": \"new_name\"\n }\n }\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->update([\n \"index\" => \"test\",\n \"id\" => \"1\",\n \"body\" => [\n \"doc\" => [\n \"name\" => \"new_name\",\n ],\n ],\n]);" + }, + { + "language": "curl", + "code": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"doc\":{\"name\":\"new_name\"}}' \"$ELASTICSEARCH_URL/test/_update/1\"" + }, + { + "language": "Java", + "code": "client.update(u -> u\n .doc(JsonData.fromJson(\"{\\\"name\\\":\\\"new_name\\\"}\"))\n .id(\"1\")\n .index(\"test\")\n,Void.class);\n" + } + ], + "specification/_global/update/examples/request/UpdateRequestExample11.yaml": [ + { + "language": "Python", + "code": "resp = client.update(\n index=\"test\",\n id=\"1\",\n doc={\n \"name\": \"new_name\"\n },\n doc_as_upsert=True,\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.update({\n index: \"test\",\n id: 1,\n doc: {\n name: \"new_name\",\n },\n doc_as_upsert: true,\n});" + }, + { + "language": "Ruby", + "code": "response = client.update(\n index: \"test\",\n id: \"1\",\n body: {\n \"doc\": {\n \"name\": \"new_name\"\n },\n \"doc_as_upsert\": true\n }\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->update([\n \"index\" => \"test\",\n \"id\" => \"1\",\n \"body\" => [\n \"doc\" => [\n \"name\" => \"new_name\",\n ],\n \"doc_as_upsert\" => true,\n ],\n]);" + }, + { + "language": "curl", + "code": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"doc\":{\"name\":\"new_name\"},\"doc_as_upsert\":true}' \"$ELASTICSEARCH_URL/test/_update/1\"" + }, + { + "language": "Java", + "code": "client.update(u -> u\n .doc(JsonData.fromJson(\"{\\\"name\\\":\\\"new_name\\\"}\"))\n .docAsUpsert(true)\n .id(\"1\")\n .index(\"test\")\n,Void.class);\n" + } + ], + "specification/_global/update/examples/request/UpdateRequestExample4.yaml": [ + { + "language": "Python", + "code": "resp = client.update(\n index=\"test\",\n id=\"1\",\n script=\"ctx._source.new_field = 'value_of_new_field'\",\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.update({\n index: \"test\",\n id: 1,\n script: \"ctx._source.new_field = 'value_of_new_field'\",\n});" + }, + { + "language": "Ruby", + "code": "response = client.update(\n index: \"test\",\n id: \"1\",\n body: {\n \"script\": \"ctx._source.new_field = 'value_of_new_field'\"\n }\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->update([\n \"index\" => \"test\",\n \"id\" => \"1\",\n \"body\" => [\n \"script\" => \"ctx._source.new_field = 'value_of_new_field'\",\n ],\n]);" + }, + { + "language": "curl", + "code": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"script\":\"ctx._source.new_field = '\"'\"'value_of_new_field'\"'\"'\"}' \"$ELASTICSEARCH_URL/test/_update/1\"" + }, + { + "language": "Java", + "code": "client.update(u -> u\n .id(\"1\")\n .index(\"test\")\n .script(s -> s\n .source(so -> so\n .scriptString(\"ctx._source.new_field = 'value_of_new_field'\")\n )\n )\n,Void.class);\n" + } + ], + "specification/_global/delete/examples/request/DeleteRequestExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.delete(\n index=\"my-index-000001\",\n id=\"1\",\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.delete({\n index: \"my-index-000001\",\n id: 1,\n});" + }, + { + "language": "Ruby", + "code": "response = client.delete(\n index: \"my-index-000001\",\n id: \"1\"\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->delete([\n \"index\" => \"my-index-000001\",\n \"id\" => \"1\",\n]);" + }, + { + "language": "curl", + "code": "curl -X DELETE -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/my-index-000001/_doc/1\"" + }, + { + "language": "Java", + "code": "client.delete(d -> d\n .id(\"1\")\n .index(\"my-index-000001\")\n);\n" + } + ], + "specification/_global/update_by_query/examples/request/UpdateByQueryRequestExample4.yaml": [ + { + "language": "Python", + "code": "resp = client.update_by_query(\n index=\"my-index-000001\",\n refresh=True,\n slices=\"5\",\n script={\n \"source\": \"ctx._source['extra'] = 'test'\"\n },\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.updateByQuery({\n index: \"my-index-000001\",\n refresh: \"true\",\n slices: 5,\n script: {\n source: \"ctx._source['extra'] = 'test'\",\n },\n});" + }, + { + "language": "Ruby", + "code": "response = client.update_by_query(\n index: \"my-index-000001\",\n refresh: \"true\",\n slices: \"5\",\n body: {\n \"script\": {\n \"source\": \"ctx._source['extra'] = 'test'\"\n }\n }\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->updateByQuery([\n \"index\" => \"my-index-000001\",\n \"refresh\" => \"true\",\n \"slices\" => \"5\",\n \"body\" => [\n \"script\" => [\n \"source\" => \"ctx._source['extra'] = 'test'\",\n ],\n ],\n]);" + }, + { + "language": "curl", + "code": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"script\":{\"source\":\"ctx._source['\"'\"'extra'\"'\"'] = '\"'\"'test'\"'\"'\"}}' \"$ELASTICSEARCH_URL/my-index-000001/_update_by_query?refresh&slices=5\"" + }, + { + "language": "Java", + "code": "client.updateByQuery(u -> u\n .index(\"my-index-000001\")\n .refresh(true)\n .script(s -> s\n .source(so -> so\n .scriptString(\"ctx._source['extra'] = 'test'\")\n )\n )\n .slices(sl -> sl\n .value(5)\n )\n);\n" + } + ], + "specification/_global/update_by_query/examples/request/UpdateByQueryRequestExample2.yaml": [ + { + "language": "Python", + "code": "resp = client.update_by_query(\n index=\"my-index-000001\",\n script={\n \"source\": \"ctx._source.count++\",\n \"lang\": \"painless\"\n },\n query={\n \"term\": {\n \"user.id\": \"kimchy\"\n }\n },\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.updateByQuery({\n index: \"my-index-000001\",\n script: {\n source: \"ctx._source.count++\",\n lang: \"painless\",\n },\n query: {\n term: {\n \"user.id\": \"kimchy\",\n },\n },\n});" + }, + { + "language": "Ruby", + "code": "response = client.update_by_query(\n index: \"my-index-000001\",\n body: {\n \"script\": {\n \"source\": \"ctx._source.count++\",\n \"lang\": \"painless\"\n },\n \"query\": {\n \"term\": {\n \"user.id\": \"kimchy\"\n }\n }\n }\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->updateByQuery([\n \"index\" => \"my-index-000001\",\n \"body\" => [\n \"script\" => [\n \"source\" => \"ctx._source.count++\",\n \"lang\" => \"painless\",\n ],\n \"query\" => [\n \"term\" => [\n \"user.id\" => \"kimchy\",\n ],\n ],\n ],\n]);" + }, + { + "language": "curl", + "code": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"script\":{\"source\":\"ctx._source.count++\",\"lang\":\"painless\"},\"query\":{\"term\":{\"user.id\":\"kimchy\"}}}' \"$ELASTICSEARCH_URL/my-index-000001/_update_by_query\"" + }, + { + "language": "Java", + "code": "client.updateByQuery(u -> u\n .index(\"my-index-000001\")\n .query(q -> q\n .term(t -> t\n .field(\"user.id\")\n .value(FieldValue.of(\"kimchy\"))\n )\n )\n .script(s -> s\n .source(so -> so\n .scriptString(\"ctx._source.count++\")\n )\n .lang(\"painless\")\n )\n);\n" + } + ], + "specification/_global/update_by_query/examples/request/UpdateByQueryRequestExample3.yaml": [ + { + "language": "Python", + "code": "resp = client.update_by_query(\n index=\"my-index-000001\",\n slice={\n \"id\": 0,\n \"max\": 2\n },\n script={\n \"source\": \"ctx._source['extra'] = 'test'\"\n },\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.updateByQuery({\n index: \"my-index-000001\",\n slice: {\n id: 0,\n max: 2,\n },\n script: {\n source: \"ctx._source['extra'] = 'test'\",\n },\n});" + }, + { + "language": "Ruby", + "code": "response = client.update_by_query(\n index: \"my-index-000001\",\n body: {\n \"slice\": {\n \"id\": 0,\n \"max\": 2\n },\n \"script\": {\n \"source\": \"ctx._source['extra'] = 'test'\"\n }\n }\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->updateByQuery([\n \"index\" => \"my-index-000001\",\n \"body\" => [\n \"slice\" => [\n \"id\" => 0,\n \"max\" => 2,\n ],\n \"script\" => [\n \"source\" => \"ctx._source['extra'] = 'test'\",\n ],\n ],\n]);" + }, + { + "language": "curl", + "code": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"slice\":{\"id\":0,\"max\":2},\"script\":{\"source\":\"ctx._source['\"'\"'extra'\"'\"'] = '\"'\"'test'\"'\"'\"}}' \"$ELASTICSEARCH_URL/my-index-000001/_update_by_query\"" + }, + { + "language": "Java", + "code": "client.updateByQuery(u -> u\n .index(\"my-index-000001\")\n .script(s -> s\n .source(so -> so\n .scriptString(\"ctx._source['extra'] = 'test'\")\n )\n )\n .slice(sl -> sl\n .id(\"0\")\n .max(2)\n )\n);\n" + } + ], + "specification/_global/update_by_query/examples/request/UpdateByQueryRequestExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.update_by_query(\n index=\"my-index-000001\",\n conflicts=\"proceed\",\n query={\n \"term\": {\n \"user.id\": \"kimchy\"\n }\n },\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.updateByQuery({\n index: \"my-index-000001\",\n conflicts: \"proceed\",\n query: {\n term: {\n \"user.id\": \"kimchy\",\n },\n },\n});" + }, + { + "language": "Ruby", + "code": "response = client.update_by_query(\n index: \"my-index-000001\",\n conflicts: \"proceed\",\n body: {\n \"query\": {\n \"term\": {\n \"user.id\": \"kimchy\"\n }\n }\n }\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->updateByQuery([\n \"index\" => \"my-index-000001\",\n \"conflicts\" => \"proceed\",\n \"body\" => [\n \"query\" => [\n \"term\" => [\n \"user.id\" => \"kimchy\",\n ],\n ],\n ],\n]);" + }, + { + "language": "curl", + "code": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"query\":{\"term\":{\"user.id\":\"kimchy\"}}}' \"$ELASTICSEARCH_URL/my-index-000001/_update_by_query?conflicts=proceed\"" + }, + { + "language": "Java", + "code": "client.updateByQuery(u -> u\n .conflicts(Conflicts.Proceed)\n .index(\"my-index-000001\")\n .query(q -> q\n .term(t -> t\n .field(\"user.id\")\n .value(FieldValue.of(\"kimchy\"))\n )\n )\n);\n" + } + ], + "specification/_global/exists/examples/request/DocumentExistsRequestExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.exists(\n index=\"my-index-000001\",\n id=\"0\",\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.exists({\n index: \"my-index-000001\",\n id: 0,\n});" + }, + { + "language": "Ruby", + "code": "response = client.exists(\n index: \"my-index-000001\",\n id: \"0\"\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->exists([\n \"index\" => \"my-index-000001\",\n \"id\" => \"0\",\n]);" + }, + { + "language": "curl", + "code": "curl --head -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/my-index-000001/_doc/0\"" + }, + { + "language": "Java", + "code": "client.exists(e -> e\n .id(\"0\")\n .index(\"my-index-000001\")\n);\n" + } + ], + "specification/_global/put_script/examples/request/PutScriptRequestExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.put_script(\n id=\"my-search-template\",\n script={\n \"lang\": \"mustache\",\n \"source\": {\n \"query\": {\n \"match\": {\n \"message\": \"{{query_string}}\"\n }\n },\n \"from\": \"{{from}}\",\n \"size\": \"{{size}}\"\n }\n },\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.putScript({\n id: \"my-search-template\",\n script: {\n lang: \"mustache\",\n source: {\n query: {\n match: {\n message: \"{{query_string}}\",\n },\n },\n from: \"{{from}}\",\n size: \"{{size}}\",\n },\n },\n});" + }, + { + "language": "Ruby", + "code": "response = client.put_script(\n id: \"my-search-template\",\n body: {\n \"script\": {\n \"lang\": \"mustache\",\n \"source\": {\n \"query\": {\n \"match\": {\n \"message\": \"{{query_string}}\"\n }\n },\n \"from\": \"{{from}}\",\n \"size\": \"{{size}}\"\n }\n }\n }\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->putScript([\n \"id\" => \"my-search-template\",\n \"body\" => [\n \"script\" => [\n \"lang\" => \"mustache\",\n \"source\" => [\n \"query\" => [\n \"match\" => [\n \"message\" => \"{{query_string}}\",\n ],\n ],\n \"from\" => \"{{from}}\",\n \"size\" => \"{{size}}\",\n ],\n ],\n ],\n]);" + }, + { + "language": "curl", + "code": "curl -X PUT -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"script\":{\"lang\":\"mustache\",\"source\":{\"query\":{\"match\":{\"message\":\"{{query_string}}\"}},\"from\":\"{{from}}\",\"size\":\"{{size}}\"}}}' \"$ELASTICSEARCH_URL/_scripts/my-search-template\"" + } + ], + "specification/_global/put_script/examples/request/PutScriptRequestExample2.yaml": [ + { + "language": "Python", + "code": "resp = client.put_script(\n id=\"my-stored-script\",\n script={\n \"lang\": \"painless\",\n \"source\": \"Math.log(_score * 2) + params['my_modifier']\"\n },\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.putScript({\n id: \"my-stored-script\",\n script: {\n lang: \"painless\",\n source: \"Math.log(_score * 2) + params['my_modifier']\",\n },\n});" + }, + { + "language": "Ruby", + "code": "response = client.put_script(\n id: \"my-stored-script\",\n body: {\n \"script\": {\n \"lang\": \"painless\",\n \"source\": \"Math.log(_score * 2) + params['my_modifier']\"\n }\n }\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->putScript([\n \"id\" => \"my-stored-script\",\n \"body\" => [\n \"script\" => [\n \"lang\" => \"painless\",\n \"source\" => \"Math.log(_score * 2) + params['my_modifier']\",\n ],\n ],\n]);" + }, + { + "language": "curl", + "code": "curl -X PUT -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"script\":{\"lang\":\"painless\",\"source\":\"Math.log(_score * 2) + params['\"'\"'my_modifier'\"'\"']\"}}' \"$ELASTICSEARCH_URL/_scripts/my-stored-script\"" + }, + { + "language": "Java", + "code": "client.putScript(p -> p\n .id(\"my-stored-script\")\n .script(s -> s\n .lang(\"painless\")\n .source(so -> so\n .scriptString(\"Math.log(_score * 2) + params['my_modifier']\")\n )\n )\n);\n" + } + ], + "specification/_global/reindex_rethrottle/examples/request/ReindexRethrottleRequestExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.reindex_rethrottle(\n task_id=\"r1A2WoRbTwKZ516z6NEs5A:36619\",\n requests_per_second=\"-1\",\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.reindexRethrottle({\n task_id: \"r1A2WoRbTwKZ516z6NEs5A:36619\",\n requests_per_second: \"-1\",\n});" + }, + { + "language": "Ruby", + "code": "response = client.reindex_rethrottle(\n task_id: \"r1A2WoRbTwKZ516z6NEs5A:36619\",\n requests_per_second: \"-1\"\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->reindexRethrottle([\n \"task_id\" => \"r1A2WoRbTwKZ516z6NEs5A:36619\",\n \"requests_per_second\" => \"-1\",\n]);" + }, + { + "language": "curl", + "code": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_reindex/r1A2WoRbTwKZ516z6NEs5A:36619/_rethrottle?requests_per_second=-1\"" + }, + { + "language": "Java", + "code": "client.reindexRethrottle(r -> r\n .requestsPerSecond(-1.0F)\n .taskId(\"r1A2WoRbTwKZ516z6NEs5A:36619\")\n);\n" + } + ], + "specification/_global/count/examples/request/CountRequestExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.count(\n index=\"my-index-000001\",\n query={\n \"term\": {\n \"user.id\": \"kimchy\"\n }\n },\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.count({\n index: \"my-index-000001\",\n query: {\n term: {\n \"user.id\": \"kimchy\",\n },\n },\n});" + }, + { + "language": "Ruby", + "code": "response = client.count(\n index: \"my-index-000001\",\n body: {\n \"query\": {\n \"term\": {\n \"user.id\": \"kimchy\"\n }\n }\n }\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->count([\n \"index\" => \"my-index-000001\",\n \"body\" => [\n \"query\" => [\n \"term\" => [\n \"user.id\" => \"kimchy\",\n ],\n ],\n ],\n]);" + }, + { + "language": "curl", + "code": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"query\":{\"term\":{\"user.id\":\"kimchy\"}}}' \"$ELASTICSEARCH_URL/my-index-000001/_count\"" + }, + { + "language": "Java", + "code": "client.count(c -> c\n .index(\"my-index-000001\")\n .query(q -> q\n .term(t -> t\n .field(\"user.id\")\n .value(FieldValue.of(\"kimchy\"))\n )\n )\n);\n" + } + ], + "specification/_global/termvectors/examples/request/TermVectorsRequestExample3.yaml": [ + { + "language": "Python", + "code": "resp = client.termvectors(\n index=\"imdb\",\n doc={\n \"plot\": \"When wealthy industrialist Tony Stark is forced to build an armored suit after a life-threatening incident, he ultimately decides to use its technology to fight against evil.\"\n },\n term_statistics=True,\n field_statistics=True,\n positions=False,\n offsets=False,\n filter={\n \"max_num_terms\": 3,\n \"min_term_freq\": 1,\n \"min_doc_freq\": 1\n },\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.termvectors({\n index: \"imdb\",\n doc: {\n plot: \"When wealthy industrialist Tony Stark is forced to build an armored suit after a life-threatening incident, he ultimately decides to use its technology to fight against evil.\",\n },\n term_statistics: true,\n field_statistics: true,\n positions: false,\n offsets: false,\n filter: {\n max_num_terms: 3,\n min_term_freq: 1,\n min_doc_freq: 1,\n },\n});" + }, + { + "language": "Ruby", + "code": "response = client.termvectors(\n index: \"imdb\",\n body: {\n \"doc\": {\n \"plot\": \"When wealthy industrialist Tony Stark is forced to build an armored suit after a life-threatening incident, he ultimately decides to use its technology to fight against evil.\"\n },\n \"term_statistics\": true,\n \"field_statistics\": true,\n \"positions\": false,\n \"offsets\": false,\n \"filter\": {\n \"max_num_terms\": 3,\n \"min_term_freq\": 1,\n \"min_doc_freq\": 1\n }\n }\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->termvectors([\n \"index\" => \"imdb\",\n \"body\" => [\n \"doc\" => [\n \"plot\" => \"When wealthy industrialist Tony Stark is forced to build an armored suit after a life-threatening incident, he ultimately decides to use its technology to fight against evil.\",\n ],\n \"term_statistics\" => true,\n \"field_statistics\" => true,\n \"positions\" => false,\n \"offsets\" => false,\n \"filter\" => [\n \"max_num_terms\" => 3,\n \"min_term_freq\" => 1,\n \"min_doc_freq\" => 1,\n ],\n ],\n]);" + }, + { + "language": "curl", + "code": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"doc\":{\"plot\":\"When wealthy industrialist Tony Stark is forced to build an armored suit after a life-threatening incident, he ultimately decides to use its technology to fight against evil.\"},\"term_statistics\":true,\"field_statistics\":true,\"positions\":false,\"offsets\":false,\"filter\":{\"max_num_terms\":3,\"min_term_freq\":1,\"min_doc_freq\":1}}' \"$ELASTICSEARCH_URL/imdb/_termvectors\"" + }, + { + "language": "Java", + "code": "client.termvectors(t -> t\n .doc(JsonData.fromJson(\"{\\\"plot\\\":\\\"When wealthy industrialist Tony Stark is forced to build an armored suit after a life-threatening incident, he ultimately decides to use its technology to fight against evil.\\\"}\"))\n .fieldStatistics(true)\n .filter(f -> f\n .maxNumTerms(3)\n .minDocFreq(1)\n .minTermFreq(1)\n )\n .index(\"imdb\")\n .offsets(false)\n .positions(false)\n .termStatistics(true)\n);\n" + } + ], + "specification/_global/termvectors/examples/request/TermVectorsRequestExample2.yaml": [ + { + "language": "Python", + "code": "resp = client.termvectors(\n index=\"my-index-000001\",\n doc={\n \"fullname\": \"John Doe\",\n \"text\": \"test test test\"\n },\n fields=[\n \"fullname\"\n ],\n per_field_analyzer={\n \"fullname\": \"keyword\"\n },\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.termvectors({\n index: \"my-index-000001\",\n doc: {\n fullname: \"John Doe\",\n text: \"test test test\",\n },\n fields: [\"fullname\"],\n per_field_analyzer: {\n fullname: \"keyword\",\n },\n});" + }, + { + "language": "Ruby", + "code": "response = client.termvectors(\n index: \"my-index-000001\",\n body: {\n \"doc\": {\n \"fullname\": \"John Doe\",\n \"text\": \"test test test\"\n },\n \"fields\": [\n \"fullname\"\n ],\n \"per_field_analyzer\": {\n \"fullname\": \"keyword\"\n }\n }\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->termvectors([\n \"index\" => \"my-index-000001\",\n \"body\" => [\n \"doc\" => [\n \"fullname\" => \"John Doe\",\n \"text\" => \"test test test\",\n ],\n \"fields\" => array(\n \"fullname\",\n ),\n \"per_field_analyzer\" => [\n \"fullname\" => \"keyword\",\n ],\n ],\n]);" + }, + { + "language": "curl", + "code": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"doc\":{\"fullname\":\"John Doe\",\"text\":\"test test test\"},\"fields\":[\"fullname\"],\"per_field_analyzer\":{\"fullname\":\"keyword\"}}' \"$ELASTICSEARCH_URL/my-index-000001/_termvectors\"" + }, + { + "language": "Java", + "code": "client.termvectors(t -> t\n .doc(JsonData.fromJson(\"{\\\"fullname\\\":\\\"John Doe\\\",\\\"text\\\":\\\"test test test\\\"}\"))\n .fields(\"fullname\")\n .index(\"my-index-000001\")\n .perFieldAnalyzer(\"fullname\", \"keyword\")\n);\n" + } + ], + "specification/_global/termvectors/examples/request/TermVectorsRequestExample5.yaml": [ + { + "language": "Python", + "code": "resp = client.termvectors(\n index=\"my-index-000001\",\n doc={\n \"fullname\": \"John Doe\",\n \"text\": \"test test test\"\n },\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.termvectors({\n index: \"my-index-000001\",\n doc: {\n fullname: \"John Doe\",\n text: \"test test test\",\n },\n});" + }, + { + "language": "Ruby", + "code": "response = client.termvectors(\n index: \"my-index-000001\",\n body: {\n \"doc\": {\n \"fullname\": \"John Doe\",\n \"text\": \"test test test\"\n }\n }\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->termvectors([\n \"index\" => \"my-index-000001\",\n \"body\" => [\n \"doc\" => [\n \"fullname\" => \"John Doe\",\n \"text\" => \"test test test\",\n ],\n ],\n]);" + }, + { + "language": "curl", + "code": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"doc\":{\"fullname\":\"John Doe\",\"text\":\"test test test\"}}' \"$ELASTICSEARCH_URL/my-index-000001/_termvectors\"" + }, + { + "language": "Java", + "code": "client.termvectors(t -> t\n .doc(JsonData.fromJson(\"{\\\"fullname\\\":\\\"John Doe\\\",\\\"text\\\":\\\"test test test\\\"}\"))\n .index(\"my-index-000001\")\n);\n" + } + ], + "specification/_global/termvectors/examples/request/TermVectorsRequestExample4.yaml": [ + { + "language": "Python", + "code": "resp = client.termvectors(\n index=\"my-index-000001\",\n id=\"1\",\n fields=[\n \"text\",\n \"some_field_without_term_vectors\"\n ],\n offsets=True,\n positions=True,\n term_statistics=True,\n field_statistics=True,\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.termvectors({\n index: \"my-index-000001\",\n id: 1,\n fields: [\"text\", \"some_field_without_term_vectors\"],\n offsets: true,\n positions: true,\n term_statistics: true,\n field_statistics: true,\n});" + }, + { + "language": "Ruby", + "code": "response = client.termvectors(\n index: \"my-index-000001\",\n id: \"1\",\n body: {\n \"fields\": [\n \"text\",\n \"some_field_without_term_vectors\"\n ],\n \"offsets\": true,\n \"positions\": true,\n \"term_statistics\": true,\n \"field_statistics\": true\n }\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->termvectors([\n \"index\" => \"my-index-000001\",\n \"id\" => \"1\",\n \"body\" => [\n \"fields\" => array(\n \"text\",\n \"some_field_without_term_vectors\",\n ),\n \"offsets\" => true,\n \"positions\" => true,\n \"term_statistics\" => true,\n \"field_statistics\" => true,\n ],\n]);" + }, + { + "language": "curl", + "code": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"fields\":[\"text\",\"some_field_without_term_vectors\"],\"offsets\":true,\"positions\":true,\"term_statistics\":true,\"field_statistics\":true}' \"$ELASTICSEARCH_URL/my-index-000001/_termvectors/1\"" + }, + { + "language": "Java", + "code": "client.termvectors(t -> t\n .fieldStatistics(true)\n .fields(List.of(\"text\",\"some_field_without_term_vectors\"))\n .id(\"1\")\n .index(\"my-index-000001\")\n .offsets(true)\n .positions(true)\n .termStatistics(true)\n);\n" + } + ], + "specification/_global/termvectors/examples/request/TermVectorsRequestExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.termvectors(\n index=\"my-index-000001\",\n id=\"1\",\n fields=[\n \"text\"\n ],\n offsets=True,\n payloads=True,\n positions=True,\n term_statistics=True,\n field_statistics=True,\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.termvectors({\n index: \"my-index-000001\",\n id: 1,\n fields: [\"text\"],\n offsets: true,\n payloads: true,\n positions: true,\n term_statistics: true,\n field_statistics: true,\n});" + }, + { + "language": "Ruby", + "code": "response = client.termvectors(\n index: \"my-index-000001\",\n id: \"1\",\n body: {\n \"fields\": [\n \"text\"\n ],\n \"offsets\": true,\n \"payloads\": true,\n \"positions\": true,\n \"term_statistics\": true,\n \"field_statistics\": true\n }\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->termvectors([\n \"index\" => \"my-index-000001\",\n \"id\" => \"1\",\n \"body\" => [\n \"fields\" => array(\n \"text\",\n ),\n \"offsets\" => true,\n \"payloads\" => true,\n \"positions\" => true,\n \"term_statistics\" => true,\n \"field_statistics\" => true,\n ],\n]);" + }, + { + "language": "curl", + "code": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"fields\":[\"text\"],\"offsets\":true,\"payloads\":true,\"positions\":true,\"term_statistics\":true,\"field_statistics\":true}' \"$ELASTICSEARCH_URL/my-index-000001/_termvectors/1\"" + }, + { + "language": "Java", + "code": "client.termvectors(t -> t\n .fieldStatistics(true)\n .fields(\"text\")\n .id(\"1\")\n .index(\"my-index-000001\")\n .offsets(true)\n .payloads(true)\n .positions(true)\n .termStatistics(true)\n);\n" + } + ], + "specification/_global/search_mvt/examples/request/SearchMvtRequestExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.search_mvt(\n index=\"museums\",\n field=\"location\",\n zoom=\"13\",\n x=\"4207\",\n y=\"2692\",\n grid_agg=\"geotile\",\n grid_precision=2,\n fields=[\n \"name\",\n \"price\"\n ],\n query={\n \"term\": {\n \"included\": True\n }\n },\n aggs={\n \"min_price\": {\n \"min\": {\n \"field\": \"price\"\n }\n },\n \"max_price\": {\n \"max\": {\n \"field\": \"price\"\n }\n },\n \"avg_price\": {\n \"avg\": {\n \"field\": \"price\"\n }\n }\n },\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.searchMvt({\n index: \"museums\",\n field: \"location\",\n zoom: 13,\n x: 4207,\n y: 2692,\n grid_agg: \"geotile\",\n grid_precision: 2,\n fields: [\"name\", \"price\"],\n query: {\n term: {\n included: true,\n },\n },\n aggs: {\n min_price: {\n min: {\n field: \"price\",\n },\n },\n max_price: {\n max: {\n field: \"price\",\n },\n },\n avg_price: {\n avg: {\n field: \"price\",\n },\n },\n },\n});" + }, + { + "language": "Ruby", + "code": "response = client.search_mvt(\n index: \"museums\",\n field: \"location\",\n zoom: \"13\",\n x: \"4207\",\n y: \"2692\",\n body: {\n \"grid_agg\": \"geotile\",\n \"grid_precision\": 2,\n \"fields\": [\n \"name\",\n \"price\"\n ],\n \"query\": {\n \"term\": {\n \"included\": true\n }\n },\n \"aggs\": {\n \"min_price\": {\n \"min\": {\n \"field\": \"price\"\n }\n },\n \"max_price\": {\n \"max\": {\n \"field\": \"price\"\n }\n },\n \"avg_price\": {\n \"avg\": {\n \"field\": \"price\"\n }\n }\n }\n }\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->searchMvt([\n \"index\" => \"museums\",\n \"field\" => \"location\",\n \"zoom\" => \"13\",\n \"x\" => \"4207\",\n \"y\" => \"2692\",\n \"body\" => [\n \"grid_agg\" => \"geotile\",\n \"grid_precision\" => 2,\n \"fields\" => array(\n \"name\",\n \"price\",\n ),\n \"query\" => [\n \"term\" => [\n \"included\" => true,\n ],\n ],\n \"aggs\" => [\n \"min_price\" => [\n \"min\" => [\n \"field\" => \"price\",\n ],\n ],\n \"max_price\" => [\n \"max\" => [\n \"field\" => \"price\",\n ],\n ],\n \"avg_price\" => [\n \"avg\" => [\n \"field\" => \"price\",\n ],\n ],\n ],\n ],\n]);" + }, + { + "language": "curl", + "code": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"grid_agg\":\"geotile\",\"grid_precision\":2,\"fields\":[\"name\",\"price\"],\"query\":{\"term\":{\"included\":true}},\"aggs\":{\"min_price\":{\"min\":{\"field\":\"price\"}},\"max_price\":{\"max\":{\"field\":\"price\"}},\"avg_price\":{\"avg\":{\"field\":\"price\"}}}}' \"$ELASTICSEARCH_URL/museums/_mvt/location/13/4207/2692\"" + } + ], + "specification/_global/delete_by_query_rethrottle/examples/request/DeleteByQueryRethrottleRequestExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.delete_by_query_rethrottle(\n task_id=\"r1A2WoRbTwKZ516z6NEs5A:36619\",\n requests_per_second=\"-1\",\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.deleteByQueryRethrottle({\n task_id: \"r1A2WoRbTwKZ516z6NEs5A:36619\",\n requests_per_second: \"-1\",\n});" + }, + { + "language": "Ruby", + "code": "response = client.delete_by_query_rethrottle(\n task_id: \"r1A2WoRbTwKZ516z6NEs5A:36619\",\n requests_per_second: \"-1\"\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->deleteByQueryRethrottle([\n \"task_id\" => \"r1A2WoRbTwKZ516z6NEs5A:36619\",\n \"requests_per_second\" => \"-1\",\n]);" + }, + { + "language": "curl", + "code": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_delete_by_query/r1A2WoRbTwKZ516z6NEs5A:36619/_rethrottle?requests_per_second=-1\"" + }, + { + "language": "Java", + "code": "client.deleteByQueryRethrottle(d -> d\n .requestsPerSecond(-1.0F)\n .taskId(\"r1A2WoRbTwKZ516z6NEs5A:36619\")\n);\n" + } + ], + "specification/_global/get/examples/request/GetRequestExample2.yaml": [ + { + "language": "Python", + "code": "resp = client.get(\n index=\"my-index-000001\",\n id=\"1\",\n stored_fields=\"tags,counter\",\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.get({\n index: \"my-index-000001\",\n id: 1,\n stored_fields: \"tags,counter\",\n});" + }, + { + "language": "Ruby", + "code": "response = client.get(\n index: \"my-index-000001\",\n id: \"1\",\n stored_fields: \"tags,counter\"\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->get([\n \"index\" => \"my-index-000001\",\n \"id\" => \"1\",\n \"stored_fields\" => \"tags,counter\",\n]);" + }, + { + "language": "curl", + "code": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/my-index-000001/_doc/1?stored_fields=tags,counter\"" + } + ], + "specification/_global/render_search_template/examples/request/RenderSearchTemplateRequestExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.render_search_template(\n id=\"my-search-template\",\n params={\n \"query_string\": \"hello world\",\n \"from\": 20,\n \"size\": 10\n },\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.renderSearchTemplate({\n id: \"my-search-template\",\n params: {\n query_string: \"hello world\",\n from: 20,\n size: 10,\n },\n});" + }, + { + "language": "Ruby", + "code": "response = client.render_search_template(\n body: {\n \"id\": \"my-search-template\",\n \"params\": {\n \"query_string\": \"hello world\",\n \"from\": 20,\n \"size\": 10\n }\n }\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->renderSearchTemplate([\n \"body\" => [\n \"id\" => \"my-search-template\",\n \"params\" => [\n \"query_string\" => \"hello world\",\n \"from\" => 20,\n \"size\" => 10,\n ],\n ],\n]);" + }, + { + "language": "curl", + "code": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"id\":\"my-search-template\",\"params\":{\"query_string\":\"hello world\",\"from\":20,\"size\":10}}' \"$ELASTICSEARCH_URL/_render/template\"" + }, + { + "language": "Java", + "code": "client.renderSearchTemplate(r -> r\n .id(\"my-search-template\")\n .params(Map.of(\"size\", JsonData.fromJson(\"10\"),\"from\", JsonData.fromJson(\"20\"),\"query_string\", JsonData.fromJson(\"\\\"hello world\\\"\")))\n);\n" + } + ], + "specification/_global/open_point_in_time/examples/request/OpenPointInTimeRequestExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.open_point_in_time(\n index=\"my-index-000001\",\n keep_alive=\"1m\",\n allow_partial_search_results=True,\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.openPointInTime({\n index: \"my-index-000001\",\n keep_alive: \"1m\",\n allow_partial_search_results: \"true\",\n});" + }, + { + "language": "Ruby", + "code": "response = client.open_point_in_time(\n index: \"my-index-000001\",\n keep_alive: \"1m\",\n allow_partial_search_results: \"true\"\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->openPointInTime([\n \"index\" => \"my-index-000001\",\n \"keep_alive\" => \"1m\",\n \"allow_partial_search_results\" => \"true\",\n]);" + }, + { + "language": "curl", + "code": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/my-index-000001/_pit?keep_alive=1m&allow_partial_search_results=true\"" + }, + { + "language": "Java", + "code": "client.openPointInTime(o -> o\n .allowPartialSearchResults(true)\n .index(\"my-index-000001\")\n .keepAlive(k -> k\n .offset(1)\n )\n);\n" + } + ], + "specification/_global/search_shards/examples/request/SearchShardsRequestExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.search_shards(\n index=\"my-index-000001\",\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.searchShards({\n index: \"my-index-000001\",\n});" + }, + { + "language": "Ruby", + "code": "response = client.search_shards(\n index: \"my-index-000001\"\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->searchShards([\n \"index\" => \"my-index-000001\",\n]);" + }, + { + "language": "curl", + "code": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/my-index-000001/_search_shards\"" + }, + { + "language": "Java", + "code": "client.searchShards(s -> s\n .index(\"my-index-000001\")\n);\n" + } + ], + "specification/_global/delete_by_query/examples/request/DeleteByQueryRequestExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.delete_by_query(\n index=\"my-index-000001,my-index-000002\",\n query={\n \"match_all\": {}\n },\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.deleteByQuery({\n index: \"my-index-000001,my-index-000002\",\n query: {\n match_all: {},\n },\n});" + }, + { + "language": "Ruby", + "code": "response = client.delete_by_query(\n index: \"my-index-000001,my-index-000002\",\n body: {\n \"query\": {\n \"match_all\": {}\n }\n }\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->deleteByQuery([\n \"index\" => \"my-index-000001,my-index-000002\",\n \"body\" => [\n \"query\" => [\n \"match_all\" => new ArrayObject([]),\n ],\n ],\n]);" + }, + { + "language": "curl", + "code": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"query\":{\"match_all\":{}}}' \"$ELASTICSEARCH_URL/my-index-000001,my-index-000002/_delete_by_query\"" + }, + { + "language": "Java", + "code": "client.deleteByQuery(d -> d\n .index(List.of(\"my-index-000001\",\"my-index-000002\"))\n .query(q -> q\n .matchAll(m -> m)\n )\n);\n" + } + ], + "specification/_global/delete_by_query/examples/request/DeleteByQueryRequestExample2.yaml": [ + { + "language": "Python", + "code": "resp = client.delete_by_query(\n index=\"my-index-000001\",\n query={\n \"term\": {\n \"user.id\": \"kimchy\"\n }\n },\n max_docs=1,\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.deleteByQuery({\n index: \"my-index-000001\",\n query: {\n term: {\n \"user.id\": \"kimchy\",\n },\n },\n max_docs: 1,\n});" + }, + { + "language": "Ruby", + "code": "response = client.delete_by_query(\n index: \"my-index-000001\",\n body: {\n \"query\": {\n \"term\": {\n \"user.id\": \"kimchy\"\n }\n },\n \"max_docs\": 1\n }\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->deleteByQuery([\n \"index\" => \"my-index-000001\",\n \"body\" => [\n \"query\" => [\n \"term\" => [\n \"user.id\" => \"kimchy\",\n ],\n ],\n \"max_docs\" => 1,\n ],\n]);" + }, + { + "language": "curl", + "code": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"query\":{\"term\":{\"user.id\":\"kimchy\"}},\"max_docs\":1}' \"$ELASTICSEARCH_URL/my-index-000001/_delete_by_query\"" + }, + { + "language": "Java", + "code": "client.deleteByQuery(d -> d\n .index(\"my-index-000001\")\n .maxDocs(1L)\n .query(q -> q\n .term(t -> t\n .field(\"user.id\")\n .value(FieldValue.of(\"kimchy\"))\n )\n )\n);\n" + } + ], + "specification/_global/delete_by_query/examples/request/DeleteByQueryRequestExample3.yaml": [ + { + "language": "Python", + "code": "resp = client.delete_by_query(\n index=\"my-index-000001\",\n slice={\n \"id\": 0,\n \"max\": 2\n },\n query={\n \"range\": {\n \"http.response.bytes\": {\n \"lt\": 2000000\n }\n }\n },\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.deleteByQuery({\n index: \"my-index-000001\",\n slice: {\n id: 0,\n max: 2,\n },\n query: {\n range: {\n \"http.response.bytes\": {\n lt: 2000000,\n },\n },\n },\n});" + }, + { + "language": "Ruby", + "code": "response = client.delete_by_query(\n index: \"my-index-000001\",\n body: {\n \"slice\": {\n \"id\": 0,\n \"max\": 2\n },\n \"query\": {\n \"range\": {\n \"http.response.bytes\": {\n \"lt\": 2000000\n }\n }\n }\n }\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->deleteByQuery([\n \"index\" => \"my-index-000001\",\n \"body\" => [\n \"slice\" => [\n \"id\" => 0,\n \"max\" => 2,\n ],\n \"query\" => [\n \"range\" => [\n \"http.response.bytes\" => [\n \"lt\" => 2000000,\n ],\n ],\n ],\n ],\n]);" + }, + { + "language": "curl", + "code": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"slice\":{\"id\":0,\"max\":2},\"query\":{\"range\":{\"http.response.bytes\":{\"lt\":2000000}}}}' \"$ELASTICSEARCH_URL/my-index-000001/_delete_by_query\"" + }, + { + "language": "Java", + "code": "client.deleteByQuery(d -> d\n .index(\"my-index-000001\")\n .query(q -> q\n .range(r -> r\n .untyped(u -> u\n .field(\"http.response.bytes\")\n .lt(JsonData.fromJson(\"2000000\"))\n )\n )\n )\n .slice(s -> s\n .id(\"0\")\n .max(2)\n )\n);\n" + } + ], + "specification/_global/delete_by_query/examples/request/DeleteByQueryRequestExample4.yaml": [ + { + "language": "Python", + "code": "resp = client.delete_by_query(\n index=\"my-index-000001\",\n refresh=True,\n slices=\"5\",\n query={\n \"range\": {\n \"http.response.bytes\": {\n \"lt\": 2000000\n }\n }\n },\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.deleteByQuery({\n index: \"my-index-000001\",\n refresh: \"true\",\n slices: 5,\n query: {\n range: {\n \"http.response.bytes\": {\n lt: 2000000,\n },\n },\n },\n});" + }, + { + "language": "Ruby", + "code": "response = client.delete_by_query(\n index: \"my-index-000001\",\n refresh: \"true\",\n slices: \"5\",\n body: {\n \"query\": {\n \"range\": {\n \"http.response.bytes\": {\n \"lt\": 2000000\n }\n }\n }\n }\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->deleteByQuery([\n \"index\" => \"my-index-000001\",\n \"refresh\" => \"true\",\n \"slices\" => \"5\",\n \"body\" => [\n \"query\" => [\n \"range\" => [\n \"http.response.bytes\" => [\n \"lt\" => 2000000,\n ],\n ],\n ],\n ],\n]);" + }, + { + "language": "curl", + "code": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"query\":{\"range\":{\"http.response.bytes\":{\"lt\":2000000}}}}' \"$ELASTICSEARCH_URL/my-index-000001/_delete_by_query?refresh&slices=5\"" + }, + { + "language": "Java", + "code": "client.deleteByQuery(d -> d\n .index(\"my-index-000001\")\n .query(q -> q\n .range(r -> r\n .untyped(u -> u\n .field(\"http.response.bytes\")\n .lt(JsonData.fromJson(\"2000000\"))\n )\n )\n )\n .refresh(true)\n .slices(s -> s\n .value(5)\n )\n);\n" + } + ], + "specification/_global/health_report/examples/request/HealthReportRequestExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.health_report()" + }, + { + "language": "JavaScript", + "code": "const response = await client.healthReport();" + }, + { + "language": "Ruby", + "code": "response = client.health_report" + }, + { + "language": "PHP", + "code": "$resp = $client->healthReport();" + }, + { + "language": "curl", + "code": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_health_report\"" + }, + { + "language": "Java", + "code": "client.healthReport(h -> h);\n" + } + ], + "specification/_global/field_caps/examples/request/FieldCapabilitiesRequestExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.field_caps(\n index=\"my-index-*\",\n fields=\"rating\",\n index_filter={\n \"range\": {\n \"@timestamp\": {\n \"gte\": \"2018\"\n }\n }\n },\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.fieldCaps({\n index: \"my-index-*\",\n fields: \"rating\",\n index_filter: {\n range: {\n \"@timestamp\": {\n gte: \"2018\",\n },\n },\n },\n});" + }, + { + "language": "Ruby", + "code": "response = client.field_caps(\n index: \"my-index-*\",\n fields: \"rating\",\n body: {\n \"index_filter\": {\n \"range\": {\n \"@timestamp\": {\n \"gte\": \"2018\"\n }\n }\n }\n }\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->fieldCaps([\n \"index\" => \"my-index-*\",\n \"fields\" => \"rating\",\n \"body\" => [\n \"index_filter\" => [\n \"range\" => [\n \"@timestamp\" => [\n \"gte\" => \"2018\",\n ],\n ],\n ],\n ],\n]);" + }, + { + "language": "curl", + "code": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"index_filter\":{\"range\":{\"@timestamp\":{\"gte\":\"2018\"}}}}' \"$ELASTICSEARCH_URL/my-index-*/_field_caps?fields=rating\"" + } + ], + "specification/_global/search/examples/request/SearchRequestExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.search(\n index=\"my-index-000001\",\n from=\"40\",\n size=\"20\",\n query={\n \"term\": {\n \"user.id\": \"kimchy\"\n }\n },\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.search({\n index: \"my-index-000001\",\n from: 40,\n size: 20,\n query: {\n term: {\n \"user.id\": \"kimchy\",\n },\n },\n});" + }, + { + "language": "Ruby", + "code": "response = client.search(\n index: \"my-index-000001\",\n from: \"40\",\n size: \"20\",\n body: {\n \"query\": {\n \"term\": {\n \"user.id\": \"kimchy\"\n }\n }\n }\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->search([\n \"index\" => \"my-index-000001\",\n \"from\" => \"40\",\n \"size\" => \"20\",\n \"body\" => [\n \"query\" => [\n \"term\" => [\n \"user.id\" => \"kimchy\",\n ],\n ],\n ],\n]);" + }, + { + "language": "curl", + "code": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"query\":{\"term\":{\"user.id\":\"kimchy\"}}}' \"$ELASTICSEARCH_URL/my-index-000001/_search?from=40&size=20\"" + }, + { + "language": "Java", + "code": "client.search(s -> s\n .from(40)\n .index(\"my-index-000001\")\n .query(q -> q\n .term(t -> t\n .field(\"user.id\")\n .value(FieldValue.of(\"kimchy\"))\n )\n )\n .size(20)\n,Void.class);\n" + } + ], + "specification/_global/search/examples/request/SearchRequestExample2.yaml": [ + { + "language": "Python", + "code": "resp = client.search(\n size=100,\n query={\n \"match\": {\n \"title\": \"elasticsearch\"\n }\n },\n pit={\n \"id\": \"46ToAwMDaWR5BXV1aWQyKwZub2RlXzMAAAAAAAAAACoBYwADaWR4BXV1aWQxAgZub2RlXzEAAAAAAAAAAAEBYQADaWR5BXV1aWQyKgZub2RlXzIAAAAAAAAAAAwBYgACBXV1aWQyAAAFdXVpZDEAAQltYXRjaF9hbGw_gAAAAA==\",\n \"keep_alive\": \"1m\"\n },\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.search({\n size: 100,\n query: {\n match: {\n title: \"elasticsearch\",\n },\n },\n pit: {\n id: \"46ToAwMDaWR5BXV1aWQyKwZub2RlXzMAAAAAAAAAACoBYwADaWR4BXV1aWQxAgZub2RlXzEAAAAAAAAAAAEBYQADaWR5BXV1aWQyKgZub2RlXzIAAAAAAAAAAAwBYgACBXV1aWQyAAAFdXVpZDEAAQltYXRjaF9hbGw_gAAAAA==\",\n keep_alive: \"1m\",\n },\n});" + }, + { + "language": "Ruby", + "code": "response = client.search(\n body: {\n \"size\": 100,\n \"query\": {\n \"match\": {\n \"title\": \"elasticsearch\"\n }\n },\n \"pit\": {\n \"id\": \"46ToAwMDaWR5BXV1aWQyKwZub2RlXzMAAAAAAAAAACoBYwADaWR4BXV1aWQxAgZub2RlXzEAAAAAAAAAAAEBYQADaWR5BXV1aWQyKgZub2RlXzIAAAAAAAAAAAwBYgACBXV1aWQyAAAFdXVpZDEAAQltYXRjaF9hbGw_gAAAAA==\",\n \"keep_alive\": \"1m\"\n }\n }\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->search([\n \"body\" => [\n \"size\" => 100,\n \"query\" => [\n \"match\" => [\n \"title\" => \"elasticsearch\",\n ],\n ],\n \"pit\" => [\n \"id\" => \"46ToAwMDaWR5BXV1aWQyKwZub2RlXzMAAAAAAAAAACoBYwADaWR4BXV1aWQxAgZub2RlXzEAAAAAAAAAAAEBYQADaWR5BXV1aWQyKgZub2RlXzIAAAAAAAAAAAwBYgACBXV1aWQyAAAFdXVpZDEAAQltYXRjaF9hbGw_gAAAAA==\",\n \"keep_alive\" => \"1m\",\n ],\n ],\n]);" + }, + { + "language": "curl", + "code": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"size\":100,\"query\":{\"match\":{\"title\":\"elasticsearch\"}},\"pit\":{\"id\":\"46ToAwMDaWR5BXV1aWQyKwZub2RlXzMAAAAAAAAAACoBYwADaWR4BXV1aWQxAgZub2RlXzEAAAAAAAAAAAEBYQADaWR5BXV1aWQyKgZub2RlXzIAAAAAAAAAAAwBYgACBXV1aWQyAAAFdXVpZDEAAQltYXRjaF9hbGw_gAAAAA==\",\"keep_alive\":\"1m\"}}' \"$ELASTICSEARCH_URL/_search\"" + }, + { + "language": "Java", + "code": "client.search(s -> s\n .pit(p -> p\n .id(\"46ToAwMDaWR5BXV1aWQyKwZub2RlXzMAAAAAAAAAACoBYwADaWR4BXV1aWQxAgZub2RlXzEAAAAAAAAAAAEBYQADaWR5BXV1aWQyKgZub2RlXzIAAAAAAAAAAAwBYgACBXV1aWQyAAAFdXVpZDEAAQltYXRjaF9hbGw_gAAAAA==\")\n .keepAlive(k -> k\n .time(\"1m\")\n )\n )\n .query(q -> q\n .match(m -> m\n .field(\"title\")\n .query(FieldValue.of(\"elasticsearch\"))\n )\n )\n .size(100)\n,Void.class);\n" + } + ], + "specification/_global/search/examples/request/SearchRequestExample3.yaml": [ + { + "language": "Python", + "code": "resp = client.search(\n slice={\n \"id\": 0,\n \"max\": 2\n },\n query={\n \"match\": {\n \"message\": \"foo\"\n }\n },\n pit={\n \"id\": \"46ToAwMDaWR5BXV1aWQyKwZub2RlXzMAAAAAAAAAACoBYwADaWR4BXV1aWQxAgZub2RlXzEAAAAAAAAAAAEBYQADaWR5BXV1aWQyKgZub2RlXzIAAAAAAAAAAAwBYgACBXV1aWQyAAAFdXVpZDEAAQltYXRjaF9hbGw_gAAAAA==\"\n },\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.search({\n slice: {\n id: 0,\n max: 2,\n },\n query: {\n match: {\n message: \"foo\",\n },\n },\n pit: {\n id: \"46ToAwMDaWR5BXV1aWQyKwZub2RlXzMAAAAAAAAAACoBYwADaWR4BXV1aWQxAgZub2RlXzEAAAAAAAAAAAEBYQADaWR5BXV1aWQyKgZub2RlXzIAAAAAAAAAAAwBYgACBXV1aWQyAAAFdXVpZDEAAQltYXRjaF9hbGw_gAAAAA==\",\n },\n});" + }, + { + "language": "Ruby", + "code": "response = client.search(\n body: {\n \"slice\": {\n \"id\": 0,\n \"max\": 2\n },\n \"query\": {\n \"match\": {\n \"message\": \"foo\"\n }\n },\n \"pit\": {\n \"id\": \"46ToAwMDaWR5BXV1aWQyKwZub2RlXzMAAAAAAAAAACoBYwADaWR4BXV1aWQxAgZub2RlXzEAAAAAAAAAAAEBYQADaWR5BXV1aWQyKgZub2RlXzIAAAAAAAAAAAwBYgACBXV1aWQyAAAFdXVpZDEAAQltYXRjaF9hbGw_gAAAAA==\"\n }\n }\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->search([\n \"body\" => [\n \"slice\" => [\n \"id\" => 0,\n \"max\" => 2,\n ],\n \"query\" => [\n \"match\" => [\n \"message\" => \"foo\",\n ],\n ],\n \"pit\" => [\n \"id\" => \"46ToAwMDaWR5BXV1aWQyKwZub2RlXzMAAAAAAAAAACoBYwADaWR4BXV1aWQxAgZub2RlXzEAAAAAAAAAAAEBYQADaWR5BXV1aWQyKgZub2RlXzIAAAAAAAAAAAwBYgACBXV1aWQyAAAFdXVpZDEAAQltYXRjaF9hbGw_gAAAAA==\",\n ],\n ],\n]);" + }, + { + "language": "curl", + "code": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"slice\":{\"id\":0,\"max\":2},\"query\":{\"match\":{\"message\":\"foo\"}},\"pit\":{\"id\":\"46ToAwMDaWR5BXV1aWQyKwZub2RlXzMAAAAAAAAAACoBYwADaWR4BXV1aWQxAgZub2RlXzEAAAAAAAAAAAEBYQADaWR5BXV1aWQyKgZub2RlXzIAAAAAAAAAAAwBYgACBXV1aWQyAAAFdXVpZDEAAQltYXRjaF9hbGw_gAAAAA==\"}}' \"$ELASTICSEARCH_URL/_search\"" + }, + { + "language": "Java", + "code": "client.search(s -> s\n .pit(p -> p\n .id(\"46ToAwMDaWR5BXV1aWQyKwZub2RlXzMAAAAAAAAAACoBYwADaWR4BXV1aWQxAgZub2RlXzEAAAAAAAAAAAEBYQADaWR5BXV1aWQyKgZub2RlXzIAAAAAAAAAAAwBYgACBXV1aWQyAAAFdXVpZDEAAQltYXRjaF9hbGw_gAAAAA==\")\n )\n .query(q -> q\n .match(m -> m\n .field(\"message\")\n .query(FieldValue.of(\"foo\"))\n )\n )\n .slice(sl -> sl\n .id(\"0\")\n .max(2)\n )\n,Void.class);\n" + } + ], + "specification/_global/mtermvectors/examples/request/MultiTermVectorsRequestExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.mtermvectors(\n index=\"my-index-000001\",\n docs=[\n {\n \"_id\": \"2\",\n \"fields\": [\n \"message\"\n ],\n \"term_statistics\": True\n },\n {\n \"_id\": \"1\"\n }\n ],\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.mtermvectors({\n index: \"my-index-000001\",\n docs: [\n {\n _id: \"2\",\n fields: [\"message\"],\n term_statistics: true,\n },\n {\n _id: \"1\",\n },\n ],\n});" + }, + { + "language": "Ruby", + "code": "response = client.mtermvectors(\n index: \"my-index-000001\",\n body: {\n \"docs\": [\n {\n \"_id\": \"2\",\n \"fields\": [\n \"message\"\n ],\n \"term_statistics\": true\n },\n {\n \"_id\": \"1\"\n }\n ]\n }\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->mtermvectors([\n \"index\" => \"my-index-000001\",\n \"body\" => [\n \"docs\" => array(\n [\n \"_id\" => \"2\",\n \"fields\" => array(\n \"message\",\n ),\n \"term_statistics\" => true,\n ],\n [\n \"_id\" => \"1\",\n ],\n ),\n ],\n]);" + }, + { + "language": "curl", + "code": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"docs\":[{\"_id\":\"2\",\"fields\":[\"message\"],\"term_statistics\":true},{\"_id\":\"1\"}]}' \"$ELASTICSEARCH_URL/my-index-000001/_mtermvectors\"" + }, + { + "language": "Java", + "code": "client.mtermvectors(m -> m\n .docs(List.of(MultiTermVectorsOperation.of(mu -> mu\n .id(\"2\")\n .fields(\"message\")\n .termStatistics(true)),MultiTermVectorsOperation.of(mu -> mu\n .id(\"1\"))))\n .index(\"my-index-000001\")\n);\n" + } + ], + "specification/_global/mtermvectors/examples/request/MultiTermVectorsRequestExample2.yaml": [ + { + "language": "Python", + "code": "resp = client.mtermvectors(\n index=\"my-index-000001\",\n ids=[\n \"1\",\n \"2\"\n ],\n fields=[\n \"message\"\n ],\n term_statistics=True,\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.mtermvectors({\n index: \"my-index-000001\",\n ids: [\"1\", \"2\"],\n fields: [\"message\"],\n term_statistics: true,\n});" + }, + { + "language": "Ruby", + "code": "response = client.mtermvectors(\n index: \"my-index-000001\",\n body: {\n \"ids\": [\n \"1\",\n \"2\"\n ],\n \"fields\": [\n \"message\"\n ],\n \"term_statistics\": true\n }\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->mtermvectors([\n \"index\" => \"my-index-000001\",\n \"body\" => [\n \"ids\" => array(\n \"1\",\n \"2\",\n ),\n \"fields\" => array(\n \"message\",\n ),\n \"term_statistics\" => true,\n ],\n]);" + }, + { + "language": "curl", + "code": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"ids\":[\"1\",\"2\"],\"fields\":[\"message\"],\"term_statistics\":true}' \"$ELASTICSEARCH_URL/my-index-000001/_mtermvectors\"" + }, + { + "language": "Java", + "code": "client.mtermvectors(m -> m\n .ids(List.of(\"1\",\"2\"))\n .index(\"my-index-000001\")\n);\n" + } + ], + "specification/_global/mtermvectors/examples/request/MultiTermVectorsRequestExample3.yaml": [ + { + "language": "Python", + "code": "resp = client.mtermvectors(\n docs=[\n {\n \"_index\": \"my-index-000001\",\n \"doc\": {\n \"message\": \"test test test\"\n }\n },\n {\n \"_index\": \"my-index-000001\",\n \"doc\": {\n \"message\": \"Another test ...\"\n }\n }\n ],\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.mtermvectors({\n docs: [\n {\n _index: \"my-index-000001\",\n doc: {\n message: \"test test test\",\n },\n },\n {\n _index: \"my-index-000001\",\n doc: {\n message: \"Another test ...\",\n },\n },\n ],\n});" + }, + { + "language": "Ruby", + "code": "response = client.mtermvectors(\n body: {\n \"docs\": [\n {\n \"_index\": \"my-index-000001\",\n \"doc\": {\n \"message\": \"test test test\"\n }\n },\n {\n \"_index\": \"my-index-000001\",\n \"doc\": {\n \"message\": \"Another test ...\"\n }\n }\n ]\n }\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->mtermvectors([\n \"body\" => [\n \"docs\" => array(\n [\n \"_index\" => \"my-index-000001\",\n \"doc\" => [\n \"message\" => \"test test test\",\n ],\n ],\n [\n \"_index\" => \"my-index-000001\",\n \"doc\" => [\n \"message\" => \"Another test ...\",\n ],\n ],\n ),\n ],\n]);" + }, + { + "language": "curl", + "code": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"docs\":[{\"_index\":\"my-index-000001\",\"doc\":{\"message\":\"test test test\"}},{\"_index\":\"my-index-000001\",\"doc\":{\"message\":\"Another test ...\"}}]}' \"$ELASTICSEARCH_URL/_mtermvectors\"" + }, + { + "language": "Java", + "code": "client.mtermvectors(m -> m\n .docs(List.of(MultiTermVectorsOperation.of(mu -> mu\n .index(\"my-index-000001\")\n .doc(JsonData.fromJson(\"{\\\"message\\\":\\\"test test test\\\"}\"))),MultiTermVectorsOperation.of(mu -> mu\n .index(\"my-index-000001\")\n .doc(JsonData.fromJson(\"{\\\"message\\\":\\\"Another test ...\\\"}\")))))\n);\n" + } + ], + "specification/_global/info/examples/request/RootNodeInfoRequestExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.info()" + }, + { + "language": "JavaScript", + "code": "const response = await client.info();" + }, + { + "language": "Ruby", + "code": "response = client.info" + }, + { + "language": "PHP", + "code": "$resp = $client->info();" + }, + { + "language": "curl", + "code": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/\"" + }, + { + "language": "Java", + "code": "client.info();\n" + } + ], + "specification/_global/clear_scroll/examples/request/ClearScrollRequestExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.clear_scroll(\n scroll_id=\"DXF1ZXJ5QW5kRmV0Y2gBAAAAAAAAAD4WYm9laVYtZndUQlNsdDcwakFMNjU1QQ==\",\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.clearScroll({\n scroll_id: \"DXF1ZXJ5QW5kRmV0Y2gBAAAAAAAAAD4WYm9laVYtZndUQlNsdDcwakFMNjU1QQ==\",\n});" + }, + { + "language": "Ruby", + "code": "response = client.clear_scroll(\n body: {\n \"scroll_id\": \"DXF1ZXJ5QW5kRmV0Y2gBAAAAAAAAAD4WYm9laVYtZndUQlNsdDcwakFMNjU1QQ==\"\n }\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->clearScroll([\n \"body\" => [\n \"scroll_id\" => \"DXF1ZXJ5QW5kRmV0Y2gBAAAAAAAAAD4WYm9laVYtZndUQlNsdDcwakFMNjU1QQ==\",\n ],\n]);" + }, + { + "language": "curl", + "code": "curl -X DELETE -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"scroll_id\":\"DXF1ZXJ5QW5kRmV0Y2gBAAAAAAAAAD4WYm9laVYtZndUQlNsdDcwakFMNjU1QQ==\"}' \"$ELASTICSEARCH_URL/_search/scroll\"" + }, + { + "language": "Java", + "code": "client.clearScroll(c -> c\n .scrollId(\"DXF1ZXJ5QW5kRmV0Y2gBAAAAAAAAAD4WYm9laVYtZndUQlNsdDcwakFMNjU1QQ==\")\n);\n" + } + ], + "specification/_global/reindex/examples/request/ReindexRequestExample9.yaml": [ + { + "language": "Python", + "code": "resp = client.reindex(\n source={\n \"index\": \"my-index-000001\"\n },\n dest={\n \"index\": \"my-new-index-000001\"\n },\n script={\n \"source\": \"ctx._source.tag = ctx._source.remove(\\\"flag\\\")\"\n },\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.reindex({\n source: {\n index: \"my-index-000001\",\n },\n dest: {\n index: \"my-new-index-000001\",\n },\n script: {\n source: 'ctx._source.tag = ctx._source.remove(\"flag\")',\n },\n});" + }, + { + "language": "Ruby", + "code": "response = client.reindex(\n body: {\n \"source\": {\n \"index\": \"my-index-000001\"\n },\n \"dest\": {\n \"index\": \"my-new-index-000001\"\n },\n \"script\": {\n \"source\": \"ctx._source.tag = ctx._source.remove(\\\"flag\\\")\"\n }\n }\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->reindex([\n \"body\" => [\n \"source\" => [\n \"index\" => \"my-index-000001\",\n ],\n \"dest\" => [\n \"index\" => \"my-new-index-000001\",\n ],\n \"script\" => [\n \"source\" => \"ctx._source.tag = ctx._source.remove(\\\"flag\\\")\",\n ],\n ],\n]);" + }, + { + "language": "curl", + "code": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"source\":{\"index\":\"my-index-000001\"},\"dest\":{\"index\":\"my-new-index-000001\"},\"script\":{\"source\":\"ctx._source.tag = ctx._source.remove(\\\"flag\\\")\"}}' \"$ELASTICSEARCH_URL/_reindex\"" + } + ], + "specification/_global/reindex/examples/request/ReindexRequestExample5.yaml": [ + { + "language": "Python", + "code": "resp = client.reindex(\n source={\n \"index\": \"source\"\n },\n dest={\n \"index\": \"dest\",\n \"pipeline\": \"some_ingest_pipeline\"\n },\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.reindex({\n source: {\n index: \"source\",\n },\n dest: {\n index: \"dest\",\n pipeline: \"some_ingest_pipeline\",\n },\n});" + }, + { + "language": "Ruby", + "code": "response = client.reindex(\n body: {\n \"source\": {\n \"index\": \"source\"\n },\n \"dest\": {\n \"index\": \"dest\",\n \"pipeline\": \"some_ingest_pipeline\"\n }\n }\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->reindex([\n \"body\" => [\n \"source\" => [\n \"index\" => \"source\",\n ],\n \"dest\" => [\n \"index\" => \"dest\",\n \"pipeline\" => \"some_ingest_pipeline\",\n ],\n ],\n]);" + }, + { + "language": "curl", + "code": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"source\":{\"index\":\"source\"},\"dest\":{\"index\":\"dest\",\"pipeline\":\"some_ingest_pipeline\"}}' \"$ELASTICSEARCH_URL/_reindex\"" + } + ], + "specification/_global/reindex/examples/request/ReindexRequestExample11.yaml": [ + { + "language": "Python", + "code": "resp = client.reindex(\n max_docs=10,\n source={\n \"index\": \"my-index-000001\",\n \"query\": {\n \"function_score\": {\n \"random_score\": {},\n \"min_score\": 0.9\n }\n }\n },\n dest={\n \"index\": \"my-new-index-000001\"\n },\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.reindex({\n max_docs: 10,\n source: {\n index: \"my-index-000001\",\n query: {\n function_score: {\n random_score: {},\n min_score: 0.9,\n },\n },\n },\n dest: {\n index: \"my-new-index-000001\",\n },\n});" + }, + { + "language": "Ruby", + "code": "response = client.reindex(\n body: {\n \"max_docs\": 10,\n \"source\": {\n \"index\": \"my-index-000001\",\n \"query\": {\n \"function_score\": {\n \"random_score\": {},\n \"min_score\": 0.9\n }\n }\n },\n \"dest\": {\n \"index\": \"my-new-index-000001\"\n }\n }\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->reindex([\n \"body\" => [\n \"max_docs\" => 10,\n \"source\" => [\n \"index\" => \"my-index-000001\",\n \"query\" => [\n \"function_score\" => [\n \"random_score\" => new ArrayObject([]),\n \"min_score\" => 0.9,\n ],\n ],\n ],\n \"dest\" => [\n \"index\" => \"my-new-index-000001\",\n ],\n ],\n]);" + }, + { + "language": "curl", + "code": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"max_docs\":10,\"source\":{\"index\":\"my-index-000001\",\"query\":{\"function_score\":{\"random_score\":{},\"min_score\":0.9}}},\"dest\":{\"index\":\"my-new-index-000001\"}}' \"$ELASTICSEARCH_URL/_reindex\"" + } + ], + "specification/_global/reindex/examples/request/ReindexRequestExample10.yaml": [ + { + "language": "Python", + "code": "resp = client.reindex(\n source={\n \"index\": \"metricbeat-*\"\n },\n dest={\n \"index\": \"metricbeat\"\n },\n script={\n \"lang\": \"painless\",\n \"source\": \"ctx._index = 'metricbeat-' + (ctx._index.substring('metricbeat-'.length(), ctx._index.length())) + '-1'\"\n },\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.reindex({\n source: {\n index: \"metricbeat-*\",\n },\n dest: {\n index: \"metricbeat\",\n },\n script: {\n lang: \"painless\",\n source:\n \"ctx._index = 'metricbeat-' + (ctx._index.substring('metricbeat-'.length(), ctx._index.length())) + '-1'\",\n },\n});" + }, + { + "language": "Ruby", + "code": "response = client.reindex(\n body: {\n \"source\": {\n \"index\": \"metricbeat-*\"\n },\n \"dest\": {\n \"index\": \"metricbeat\"\n },\n \"script\": {\n \"lang\": \"painless\",\n \"source\": \"ctx._index = 'metricbeat-' + (ctx._index.substring('metricbeat-'.length(), ctx._index.length())) + '-1'\"\n }\n }\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->reindex([\n \"body\" => [\n \"source\" => [\n \"index\" => \"metricbeat-*\",\n ],\n \"dest\" => [\n \"index\" => \"metricbeat\",\n ],\n \"script\" => [\n \"lang\" => \"painless\",\n \"source\" => \"ctx._index = 'metricbeat-' + (ctx._index.substring('metricbeat-'.length(), ctx._index.length())) + '-1'\",\n ],\n ],\n]);" + }, + { + "language": "curl", + "code": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"source\":{\"index\":\"metricbeat-*\"},\"dest\":{\"index\":\"metricbeat\"},\"script\":{\"lang\":\"painless\",\"source\":\"ctx._index = '\"'\"'metricbeat-'\"'\"' + (ctx._index.substring('\"'\"'metricbeat-'\"'\"'.length(), ctx._index.length())) + '\"'\"'-1'\"'\"'\"}}' \"$ELASTICSEARCH_URL/_reindex\"" + } + ], + "specification/_global/reindex/examples/request/ReindexRequestExample4.yaml": [ + { + "language": "Python", + "code": "resp = client.reindex(\n source={\n \"index\": \"source\",\n \"query\": {\n \"match\": {\n \"company\": \"cat\"\n }\n }\n },\n dest={\n \"index\": \"dest\",\n \"routing\": \"=cat\"\n },\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.reindex({\n source: {\n index: \"source\",\n query: {\n match: {\n company: \"cat\",\n },\n },\n },\n dest: {\n index: \"dest\",\n routing: \"=cat\",\n },\n});" + }, + { + "language": "Ruby", + "code": "response = client.reindex(\n body: {\n \"source\": {\n \"index\": \"source\",\n \"query\": {\n \"match\": {\n \"company\": \"cat\"\n }\n }\n },\n \"dest\": {\n \"index\": \"dest\",\n \"routing\": \"=cat\"\n }\n }\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->reindex([\n \"body\" => [\n \"source\" => [\n \"index\" => \"source\",\n \"query\" => [\n \"match\" => [\n \"company\" => \"cat\",\n ],\n ],\n ],\n \"dest\" => [\n \"index\" => \"dest\",\n \"routing\" => \"=cat\",\n ],\n ],\n]);" + }, + { + "language": "curl", + "code": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"source\":{\"index\":\"source\",\"query\":{\"match\":{\"company\":\"cat\"}}},\"dest\":{\"index\":\"dest\",\"routing\":\"=cat\"}}' \"$ELASTICSEARCH_URL/_reindex\"" + } + ], + "specification/_global/reindex/examples/request/ReindexRequestExample8.yaml": [ + { + "language": "Python", + "code": "resp = client.reindex(\n source={\n \"index\": \"my-index-000001\",\n \"_source\": [\n \"user.id\",\n \"_doc\"\n ]\n },\n dest={\n \"index\": \"my-new-index-000001\"\n },\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.reindex({\n source: {\n index: \"my-index-000001\",\n _source: [\"user.id\", \"_doc\"],\n },\n dest: {\n index: \"my-new-index-000001\",\n },\n});" + }, + { + "language": "Ruby", + "code": "response = client.reindex(\n body: {\n \"source\": {\n \"index\": \"my-index-000001\",\n \"_source\": [\n \"user.id\",\n \"_doc\"\n ]\n },\n \"dest\": {\n \"index\": \"my-new-index-000001\"\n }\n }\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->reindex([\n \"body\" => [\n \"source\" => [\n \"index\" => \"my-index-000001\",\n \"_source\" => array(\n \"user.id\",\n \"_doc\",\n ),\n ],\n \"dest\" => [\n \"index\" => \"my-new-index-000001\",\n ],\n ],\n]);" + }, + { + "language": "curl", + "code": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"source\":{\"index\":\"my-index-000001\",\"_source\":[\"user.id\",\"_doc\"]},\"dest\":{\"index\":\"my-new-index-000001\"}}' \"$ELASTICSEARCH_URL/_reindex\"" + } + ], + "specification/_global/reindex/examples/request/ReindexRequestExample3.yaml": [ + { + "language": "Python", + "code": "resp = client.reindex(\n slices=\"5\",\n refresh=True,\n source={\n \"index\": \"my-index-000001\"\n },\n dest={\n \"index\": \"my-new-index-000001\"\n },\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.reindex({\n slices: 5,\n refresh: \"true\",\n source: {\n index: \"my-index-000001\",\n },\n dest: {\n index: \"my-new-index-000001\",\n },\n});" + }, + { + "language": "Ruby", + "code": "response = client.reindex(\n slices: \"5\",\n refresh: \"true\",\n body: {\n \"source\": {\n \"index\": \"my-index-000001\"\n },\n \"dest\": {\n \"index\": \"my-new-index-000001\"\n }\n }\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->reindex([\n \"slices\" => \"5\",\n \"refresh\" => \"true\",\n \"body\" => [\n \"source\" => [\n \"index\" => \"my-index-000001\",\n ],\n \"dest\" => [\n \"index\" => \"my-new-index-000001\",\n ],\n ],\n]);" + }, + { + "language": "curl", + "code": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"source\":{\"index\":\"my-index-000001\"},\"dest\":{\"index\":\"my-new-index-000001\"}}' \"$ELASTICSEARCH_URL/_reindex?slices=5&refresh\"" + } + ], + "specification/_global/reindex/examples/request/ReindexRequestExample2.yaml": [ + { + "language": "Python", + "code": "resp = client.reindex(\n source={\n \"index\": \"my-index-000001\",\n \"slice\": {\n \"id\": 0,\n \"max\": 2\n }\n },\n dest={\n \"index\": \"my-new-index-000001\"\n },\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.reindex({\n source: {\n index: \"my-index-000001\",\n slice: {\n id: 0,\n max: 2,\n },\n },\n dest: {\n index: \"my-new-index-000001\",\n },\n});" + }, + { + "language": "Ruby", + "code": "response = client.reindex(\n body: {\n \"source\": {\n \"index\": \"my-index-000001\",\n \"slice\": {\n \"id\": 0,\n \"max\": 2\n }\n },\n \"dest\": {\n \"index\": \"my-new-index-000001\"\n }\n }\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->reindex([\n \"body\" => [\n \"source\" => [\n \"index\" => \"my-index-000001\",\n \"slice\" => [\n \"id\" => 0,\n \"max\" => 2,\n ],\n ],\n \"dest\" => [\n \"index\" => \"my-new-index-000001\",\n ],\n ],\n]);" + }, + { + "language": "curl", + "code": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"source\":{\"index\":\"my-index-000001\",\"slice\":{\"id\":0,\"max\":2}},\"dest\":{\"index\":\"my-new-index-000001\"}}' \"$ELASTICSEARCH_URL/_reindex\"" + } + ], + "specification/_global/reindex/examples/request/ReindexRequestExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.reindex(\n source={\n \"index\": [\n \"my-index-000001\",\n \"my-index-000002\"\n ]\n },\n dest={\n \"index\": \"my-new-index-000002\"\n },\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.reindex({\n source: {\n index: [\"my-index-000001\", \"my-index-000002\"],\n },\n dest: {\n index: \"my-new-index-000002\",\n },\n});" + }, + { + "language": "Ruby", + "code": "response = client.reindex(\n body: {\n \"source\": {\n \"index\": [\n \"my-index-000001\",\n \"my-index-000002\"\n ]\n },\n \"dest\": {\n \"index\": \"my-new-index-000002\"\n }\n }\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->reindex([\n \"body\" => [\n \"source\" => [\n \"index\" => array(\n \"my-index-000001\",\n \"my-index-000002\",\n ),\n ],\n \"dest\" => [\n \"index\" => \"my-new-index-000002\",\n ],\n ],\n]);" + }, + { + "language": "curl", + "code": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"source\":{\"index\":[\"my-index-000001\",\"my-index-000002\"]},\"dest\":{\"index\":\"my-new-index-000002\"}}' \"$ELASTICSEARCH_URL/_reindex\"" + }, + { + "language": "Java", + "code": "client.reindex(r -> r\n .dest(d -> d\n .index(\"my-new-index-000002\")\n )\n .source(s -> s\n .index(List.of(\"my-index-000001\",\"my-index-000002\"))\n )\n);\n" + } + ], + "specification/_global/reindex/examples/request/ReindexRequestExample13.yaml": [ + { + "language": "Python", + "code": "resp = client.reindex(\n source={\n \"remote\": {\n \"host\": \"http://otherhost:9200\",\n \"username\": \"user\",\n \"password\": \"pass\"\n },\n \"index\": \"my-index-000001\",\n \"query\": {\n \"match\": {\n \"test\": \"data\"\n }\n }\n },\n dest={\n \"index\": \"my-new-index-000001\"\n },\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.reindex({\n source: {\n remote: {\n host: \"http://otherhost:9200\",\n username: \"user\",\n password: \"pass\",\n },\n index: \"my-index-000001\",\n query: {\n match: {\n test: \"data\",\n },\n },\n },\n dest: {\n index: \"my-new-index-000001\",\n },\n});" + }, + { + "language": "Ruby", + "code": "response = client.reindex(\n body: {\n \"source\": {\n \"remote\": {\n \"host\": \"http://otherhost:9200\",\n \"username\": \"user\",\n \"password\": \"pass\"\n },\n \"index\": \"my-index-000001\",\n \"query\": {\n \"match\": {\n \"test\": \"data\"\n }\n }\n },\n \"dest\": {\n \"index\": \"my-new-index-000001\"\n }\n }\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->reindex([\n \"body\" => [\n \"source\" => [\n \"remote\" => [\n \"host\" => \"http://otherhost:9200\",\n \"username\" => \"user\",\n \"password\" => \"pass\",\n ],\n \"index\" => \"my-index-000001\",\n \"query\" => [\n \"match\" => [\n \"test\" => \"data\",\n ],\n ],\n ],\n \"dest\" => [\n \"index\" => \"my-new-index-000001\",\n ],\n ],\n]);" + }, + { + "language": "curl", + "code": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"source\":{\"remote\":{\"host\":\"http://otherhost:9200\",\"username\":\"user\",\"password\":\"pass\"},\"index\":\"my-index-000001\",\"query\":{\"match\":{\"test\":\"data\"}}},\"dest\":{\"index\":\"my-new-index-000001\"}}' \"$ELASTICSEARCH_URL/_reindex\"" + } + ], + "specification/_global/reindex/examples/request/ReindexRequestExample7.yaml": [ + { + "language": "Python", + "code": "resp = client.reindex(\n max_docs=1,\n source={\n \"index\": \"my-index-000001\"\n },\n dest={\n \"index\": \"my-new-index-000001\"\n },\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.reindex({\n max_docs: 1,\n source: {\n index: \"my-index-000001\",\n },\n dest: {\n index: \"my-new-index-000001\",\n },\n});" + }, + { + "language": "Ruby", + "code": "response = client.reindex(\n body: {\n \"max_docs\": 1,\n \"source\": {\n \"index\": \"my-index-000001\"\n },\n \"dest\": {\n \"index\": \"my-new-index-000001\"\n }\n }\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->reindex([\n \"body\" => [\n \"max_docs\" => 1,\n \"source\" => [\n \"index\" => \"my-index-000001\",\n ],\n \"dest\" => [\n \"index\" => \"my-new-index-000001\",\n ],\n ],\n]);" + }, + { + "language": "curl", + "code": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"max_docs\":1,\"source\":{\"index\":\"my-index-000001\"},\"dest\":{\"index\":\"my-new-index-000001\"}}' \"$ELASTICSEARCH_URL/_reindex\"" + } + ], + "specification/_global/reindex/examples/request/ReindexRequestExample6.yaml": [ + { + "language": "Python", + "code": "resp = client.reindex(\n source={\n \"index\": \"my-index-000001\",\n \"query\": {\n \"term\": {\n \"user.id\": \"kimchy\"\n }\n }\n },\n dest={\n \"index\": \"my-new-index-000001\"\n },\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.reindex({\n source: {\n index: \"my-index-000001\",\n query: {\n term: {\n \"user.id\": \"kimchy\",\n },\n },\n },\n dest: {\n index: \"my-new-index-000001\",\n },\n});" + }, + { + "language": "Ruby", + "code": "response = client.reindex(\n body: {\n \"source\": {\n \"index\": \"my-index-000001\",\n \"query\": {\n \"term\": {\n \"user.id\": \"kimchy\"\n }\n }\n },\n \"dest\": {\n \"index\": \"my-new-index-000001\"\n }\n }\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->reindex([\n \"body\" => [\n \"source\" => [\n \"index\" => \"my-index-000001\",\n \"query\" => [\n \"term\" => [\n \"user.id\" => \"kimchy\",\n ],\n ],\n ],\n \"dest\" => [\n \"index\" => \"my-new-index-000001\",\n ],\n ],\n]);" + }, + { + "language": "curl", + "code": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"source\":{\"index\":\"my-index-000001\",\"query\":{\"term\":{\"user.id\":\"kimchy\"}}},\"dest\":{\"index\":\"my-new-index-000001\"}}' \"$ELASTICSEARCH_URL/_reindex\"" + } + ], + "specification/_global/reindex/examples/request/ReindexRequestExample12.yaml": [ + { + "language": "Python", + "code": "resp = client.reindex(\n source={\n \"index\": \"my-index-000001\"\n },\n dest={\n \"index\": \"my-new-index-000001\",\n \"version_type\": \"external\"\n },\n script={\n \"source\": \"if (ctx._source.foo == 'bar') {ctx._version++; ctx._source.remove('foo')}\",\n \"lang\": \"painless\"\n },\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.reindex({\n source: {\n index: \"my-index-000001\",\n },\n dest: {\n index: \"my-new-index-000001\",\n version_type: \"external\",\n },\n script: {\n source:\n \"if (ctx._source.foo == 'bar') {ctx._version++; ctx._source.remove('foo')}\",\n lang: \"painless\",\n },\n});" + }, + { + "language": "Ruby", + "code": "response = client.reindex(\n body: {\n \"source\": {\n \"index\": \"my-index-000001\"\n },\n \"dest\": {\n \"index\": \"my-new-index-000001\",\n \"version_type\": \"external\"\n },\n \"script\": {\n \"source\": \"if (ctx._source.foo == 'bar') {ctx._version++; ctx._source.remove('foo')}\",\n \"lang\": \"painless\"\n }\n }\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->reindex([\n \"body\" => [\n \"source\" => [\n \"index\" => \"my-index-000001\",\n ],\n \"dest\" => [\n \"index\" => \"my-new-index-000001\",\n \"version_type\" => \"external\",\n ],\n \"script\" => [\n \"source\" => \"if (ctx._source.foo == 'bar') {ctx._version++; ctx._source.remove('foo')}\",\n \"lang\" => \"painless\",\n ],\n ],\n]);" + }, + { + "language": "curl", + "code": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"source\":{\"index\":\"my-index-000001\"},\"dest\":{\"index\":\"my-new-index-000001\",\"version_type\":\"external\"},\"script\":{\"source\":\"if (ctx._source.foo == '\"'\"'bar'\"'\"') {ctx._version++; ctx._source.remove('\"'\"'foo'\"'\"')}\",\"lang\":\"painless\"}}' \"$ELASTICSEARCH_URL/_reindex\"" + } + ], + "specification/_global/index/examples/request/IndexRequestExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.index(\n index=\"my-index-000001\",\n document={\n \"@timestamp\": \"2099-11-15T13:12:00\",\n \"message\": \"GET /search HTTP/1.1 200 1070000\",\n \"user\": {\n \"id\": \"kimchy\"\n }\n },\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.index({\n index: \"my-index-000001\",\n document: {\n \"@timestamp\": \"2099-11-15T13:12:00\",\n message: \"GET /search HTTP/1.1 200 1070000\",\n user: {\n id: \"kimchy\",\n },\n },\n});" + }, + { + "language": "Ruby", + "code": "response = client.index(\n index: \"my-index-000001\",\n body: {\n \"@timestamp\": \"2099-11-15T13:12:00\",\n \"message\": \"GET /search HTTP/1.1 200 1070000\",\n \"user\": {\n \"id\": \"kimchy\"\n }\n }\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->index([\n \"index\" => \"my-index-000001\",\n \"body\" => [\n \"@timestamp\" => \"2099-11-15T13:12:00\",\n \"message\" => \"GET /search HTTP/1.1 200 1070000\",\n \"user\" => [\n \"id\" => \"kimchy\",\n ],\n ],\n]);" + }, + { + "language": "curl", + "code": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"@timestamp\":\"2099-11-15T13:12:00\",\"message\":\"GET /search HTTP/1.1 200 1070000\",\"user\":{\"id\":\"kimchy\"}}' \"$ELASTICSEARCH_URL/my-index-000001/_doc/\"" + }, + { + "language": "Java", + "code": "client.index(i -> i\n .index(\"my-index-000001\")\n .document(JsonData.fromJson(\"{\\\"@timestamp\\\":\\\"2099-11-15T13:12:00\\\",\\\"message\\\":\\\"GET /search HTTP/1.1 200 1070000\\\",\\\"user\\\":{\\\"id\\\":\\\"kimchy\\\"}}\"))\n);\n" + } + ], + "specification/_global/index/examples/request/IndexRequestExample2.yaml": [ + { + "language": "Python", + "code": "resp = client.index(\n index=\"my-index-000001\",\n id=\"1\",\n document={\n \"@timestamp\": \"2099-11-15T13:12:00\",\n \"message\": \"GET /search HTTP/1.1 200 1070000\",\n \"user\": {\n \"id\": \"kimchy\"\n }\n },\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.index({\n index: \"my-index-000001\",\n id: 1,\n document: {\n \"@timestamp\": \"2099-11-15T13:12:00\",\n message: \"GET /search HTTP/1.1 200 1070000\",\n user: {\n id: \"kimchy\",\n },\n },\n});" + }, + { + "language": "Ruby", + "code": "response = client.index(\n index: \"my-index-000001\",\n id: \"1\",\n body: {\n \"@timestamp\": \"2099-11-15T13:12:00\",\n \"message\": \"GET /search HTTP/1.1 200 1070000\",\n \"user\": {\n \"id\": \"kimchy\"\n }\n }\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->index([\n \"index\" => \"my-index-000001\",\n \"id\" => \"1\",\n \"body\" => [\n \"@timestamp\" => \"2099-11-15T13:12:00\",\n \"message\" => \"GET /search HTTP/1.1 200 1070000\",\n \"user\" => [\n \"id\" => \"kimchy\",\n ],\n ],\n]);" + }, + { + "language": "curl", + "code": "curl -X PUT -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"@timestamp\":\"2099-11-15T13:12:00\",\"message\":\"GET /search HTTP/1.1 200 1070000\",\"user\":{\"id\":\"kimchy\"}}' \"$ELASTICSEARCH_URL/my-index-000001/_doc/1\"" + }, + { + "language": "Java", + "code": "client.index(i -> i\n .id(\"1\")\n .index(\"my-index-000001\")\n .document(JsonData.fromJson(\"{\\\"@timestamp\\\":\\\"2099-11-15T13:12:00\\\",\\\"message\\\":\\\"GET /search HTTP/1.1 200 1070000\\\",\\\"user\\\":{\\\"id\\\":\\\"kimchy\\\"}}\"))\n);\n" + } + ], + "specification/_global/msearch/examples/request/MsearchRequestExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.msearch(\n index=\"my-index-000001\",\n searches=[\n {},\n {\n \"query\": {\n \"match\": {\n \"message\": \"this is a test\"\n }\n }\n },\n {\n \"index\": \"my-index-000002\"\n },\n {\n \"query\": {\n \"match_all\": {}\n }\n }\n ],\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.msearch({\n index: \"my-index-000001\",\n searches: [\n {},\n {\n query: {\n match: {\n message: \"this is a test\",\n },\n },\n },\n {\n index: \"my-index-000002\",\n },\n {\n query: {\n match_all: {},\n },\n },\n ],\n});" + }, + { + "language": "Ruby", + "code": "response = client.msearch(\n index: \"my-index-000001\",\n body: [\n {},\n {\n \"query\": {\n \"match\": {\n \"message\": \"this is a test\"\n }\n }\n },\n {\n \"index\": \"my-index-000002\"\n },\n {\n \"query\": {\n \"match_all\": {}\n }\n }\n ]\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->msearch([\n \"index\" => \"my-index-000001\",\n \"body\" => array(\n new ArrayObject([]),\n [\n \"query\" => [\n \"match\" => [\n \"message\" => \"this is a test\",\n ],\n ],\n ],\n [\n \"index\" => \"my-index-000002\",\n ],\n [\n \"query\" => [\n \"match_all\" => new ArrayObject([]),\n ],\n ],\n ),\n]);" + }, + { + "language": "curl", + "code": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '[{},{\"query\":{\"match\":{\"message\":\"this is a test\"}}},{\"index\":\"my-index-000002\"},{\"query\":{\"match_all\":{}}}]' \"$ELASTICSEARCH_URL/my-index-000001/_msearch\"" + } + ], + "specification/_global/delete_script/examples/request/DeleteScriptRequestExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.delete_script(\n id=\"my-search-template\",\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.deleteScript({\n id: \"my-search-template\",\n});" + }, + { + "language": "Ruby", + "code": "response = client.delete_script(\n id: \"my-search-template\"\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->deleteScript([\n \"id\" => \"my-search-template\",\n]);" + }, + { + "language": "curl", + "code": "curl -X DELETE -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_scripts/my-search-template\"" + }, + { + "language": "Java", + "code": "client.deleteScript(d -> d\n .id(\"my-search-template\")\n);\n" + } + ], + "specification/_global/mget/examples/request/MultiGetRequestExample2.yaml": [ + { + "language": "Python", + "code": "resp = client.mget(\n docs=[\n {\n \"_index\": \"test\",\n \"_id\": \"1\",\n \"_source\": False\n },\n {\n \"_index\": \"test\",\n \"_id\": \"2\",\n \"_source\": [\n \"field3\",\n \"field4\"\n ]\n },\n {\n \"_index\": \"test\",\n \"_id\": \"3\",\n \"_source\": {\n \"include\": [\n \"user\"\n ],\n \"exclude\": [\n \"user.location\"\n ]\n }\n }\n ],\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.mget({\n docs: [\n {\n _index: \"test\",\n _id: \"1\",\n _source: false,\n },\n {\n _index: \"test\",\n _id: \"2\",\n _source: [\"field3\", \"field4\"],\n },\n {\n _index: \"test\",\n _id: \"3\",\n _source: {\n include: [\"user\"],\n exclude: [\"user.location\"],\n },\n },\n ],\n});" + }, + { + "language": "Ruby", + "code": "response = client.mget(\n body: {\n \"docs\": [\n {\n \"_index\": \"test\",\n \"_id\": \"1\",\n \"_source\": false\n },\n {\n \"_index\": \"test\",\n \"_id\": \"2\",\n \"_source\": [\n \"field3\",\n \"field4\"\n ]\n },\n {\n \"_index\": \"test\",\n \"_id\": \"3\",\n \"_source\": {\n \"include\": [\n \"user\"\n ],\n \"exclude\": [\n \"user.location\"\n ]\n }\n }\n ]\n }\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->mget([\n \"body\" => [\n \"docs\" => array(\n [\n \"_index\" => \"test\",\n \"_id\" => \"1\",\n \"_source\" => false,\n ],\n [\n \"_index\" => \"test\",\n \"_id\" => \"2\",\n \"_source\" => array(\n \"field3\",\n \"field4\",\n ),\n ],\n [\n \"_index\" => \"test\",\n \"_id\" => \"3\",\n \"_source\" => [\n \"include\" => array(\n \"user\",\n ),\n \"exclude\" => array(\n \"user.location\",\n ),\n ],\n ],\n ),\n ],\n]);" + }, + { + "language": "curl", + "code": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"docs\":[{\"_index\":\"test\",\"_id\":\"1\",\"_source\":false},{\"_index\":\"test\",\"_id\":\"2\",\"_source\":[\"field3\",\"field4\"]},{\"_index\":\"test\",\"_id\":\"3\",\"_source\":{\"include\":[\"user\"],\"exclude\":[\"user.location\"]}}]}' \"$ELASTICSEARCH_URL/_mget\"" + } + ], + "specification/_global/mget/examples/request/MultiGetRequestExample3.yaml": [ + { + "language": "Python", + "code": "resp = client.mget(\n docs=[\n {\n \"_index\": \"test\",\n \"_id\": \"1\",\n \"stored_fields\": [\n \"field1\",\n \"field2\"\n ]\n },\n {\n \"_index\": \"test\",\n \"_id\": \"2\",\n \"stored_fields\": [\n \"field3\",\n \"field4\"\n ]\n }\n ],\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.mget({\n docs: [\n {\n _index: \"test\",\n _id: \"1\",\n stored_fields: [\"field1\", \"field2\"],\n },\n {\n _index: \"test\",\n _id: \"2\",\n stored_fields: [\"field3\", \"field4\"],\n },\n ],\n});" + }, + { + "language": "Ruby", + "code": "response = client.mget(\n body: {\n \"docs\": [\n {\n \"_index\": \"test\",\n \"_id\": \"1\",\n \"stored_fields\": [\n \"field1\",\n \"field2\"\n ]\n },\n {\n \"_index\": \"test\",\n \"_id\": \"2\",\n \"stored_fields\": [\n \"field3\",\n \"field4\"\n ]\n }\n ]\n }\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->mget([\n \"body\" => [\n \"docs\" => array(\n [\n \"_index\" => \"test\",\n \"_id\" => \"1\",\n \"stored_fields\" => array(\n \"field1\",\n \"field2\",\n ),\n ],\n [\n \"_index\" => \"test\",\n \"_id\" => \"2\",\n \"stored_fields\" => array(\n \"field3\",\n \"field4\",\n ),\n ],\n ),\n ],\n]);" + }, + { + "language": "curl", + "code": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"docs\":[{\"_index\":\"test\",\"_id\":\"1\",\"stored_fields\":[\"field1\",\"field2\"]},{\"_index\":\"test\",\"_id\":\"2\",\"stored_fields\":[\"field3\",\"field4\"]}]}' \"$ELASTICSEARCH_URL/_mget\"" + }, + { + "language": "Java", + "code": "client.mget(m -> m\n .docs(List.of(MultiGetOperation.of(mu -> mu\n .id(\"1\")\n .index(\"test\")\n .storedFields(List.of(\"field1\",\"field2\"))),MultiGetOperation.of(mu -> mu\n .id(\"2\")\n .index(\"test\")\n .storedFields(List.of(\"field3\",\"field4\")))))\n);\n" + } + ], + "specification/_global/mget/examples/request/MultiGetRequestExample4.yaml": [ + { + "language": "Python", + "code": "resp = client.mget(\n routing=\"key1\",\n docs=[\n {\n \"_index\": \"test\",\n \"_id\": \"1\",\n \"routing\": \"key2\"\n },\n {\n \"_index\": \"test\",\n \"_id\": \"2\"\n }\n ],\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.mget({\n routing: \"key1\",\n docs: [\n {\n _index: \"test\",\n _id: \"1\",\n routing: \"key2\",\n },\n {\n _index: \"test\",\n _id: \"2\",\n },\n ],\n});" + }, + { + "language": "Ruby", + "code": "response = client.mget(\n routing: \"key1\",\n body: {\n \"docs\": [\n {\n \"_index\": \"test\",\n \"_id\": \"1\",\n \"routing\": \"key2\"\n },\n {\n \"_index\": \"test\",\n \"_id\": \"2\"\n }\n ]\n }\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->mget([\n \"routing\" => \"key1\",\n \"body\" => [\n \"docs\" => array(\n [\n \"_index\" => \"test\",\n \"_id\" => \"1\",\n \"routing\" => \"key2\",\n ],\n [\n \"_index\" => \"test\",\n \"_id\" => \"2\",\n ],\n ),\n ],\n]);" + }, + { + "language": "curl", + "code": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"docs\":[{\"_index\":\"test\",\"_id\":\"1\",\"routing\":\"key2\"},{\"_index\":\"test\",\"_id\":\"2\"}]}' \"$ELASTICSEARCH_URL/_mget?routing=key1\"" + }, + { + "language": "Java", + "code": "client.mget(m -> m\n .docs(List.of(MultiGetOperation.of(mu -> mu\n .id(\"1\")\n .index(\"test\")\n .routing(\"key2\")),MultiGetOperation.of(mu -> mu\n .id(\"2\")\n .index(\"test\"))))\n .routing(\"key1\")\n);\n" + } + ], + "specification/_global/mget/examples/request/MultiGetRequestExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.mget(\n index=\"my-index-000001\",\n docs=[\n {\n \"_id\": \"1\"\n },\n {\n \"_id\": \"2\"\n }\n ],\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.mget({\n index: \"my-index-000001\",\n docs: [\n {\n _id: \"1\",\n },\n {\n _id: \"2\",\n },\n ],\n});" + }, + { + "language": "Ruby", + "code": "response = client.mget(\n index: \"my-index-000001\",\n body: {\n \"docs\": [\n {\n \"_id\": \"1\"\n },\n {\n \"_id\": \"2\"\n }\n ]\n }\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->mget([\n \"index\" => \"my-index-000001\",\n \"body\" => [\n \"docs\" => array(\n [\n \"_id\" => \"1\",\n ],\n [\n \"_id\" => \"2\",\n ],\n ),\n ],\n]);" + }, + { + "language": "curl", + "code": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"docs\":[{\"_id\":\"1\"},{\"_id\":\"2\"}]}' \"$ELASTICSEARCH_URL/my-index-000001/_mget\"" + }, + { + "language": "Java", + "code": "client.mget(m -> m\n .docs(List.of(MultiGetOperation.of(mu -> mu\n .id(\"1\")),MultiGetOperation.of(mu -> mu\n .id(\"2\"))))\n .index(\"my-index-000001\")\n);\n" + } + ], + "specification/_global/create/examples/request/CreateRequestExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.create(\n index=\"my-index-000001\",\n id=\"1\",\n document={\n \"@timestamp\": \"2099-11-15T13:12:00\",\n \"message\": \"GET /search HTTP/1.1 200 1070000\",\n \"user\": {\n \"id\": \"kimchy\"\n }\n },\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.create({\n index: \"my-index-000001\",\n id: 1,\n document: {\n \"@timestamp\": \"2099-11-15T13:12:00\",\n message: \"GET /search HTTP/1.1 200 1070000\",\n user: {\n id: \"kimchy\",\n },\n },\n});" + }, + { + "language": "Ruby", + "code": "response = client.create(\n index: \"my-index-000001\",\n id: \"1\",\n body: {\n \"@timestamp\": \"2099-11-15T13:12:00\",\n \"message\": \"GET /search HTTP/1.1 200 1070000\",\n \"user\": {\n \"id\": \"kimchy\"\n }\n }\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->create([\n \"index\" => \"my-index-000001\",\n \"id\" => \"1\",\n \"body\" => [\n \"@timestamp\" => \"2099-11-15T13:12:00\",\n \"message\" => \"GET /search HTTP/1.1 200 1070000\",\n \"user\" => [\n \"id\" => \"kimchy\",\n ],\n ],\n]);" + }, + { + "language": "curl", + "code": "curl -X PUT -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"@timestamp\":\"2099-11-15T13:12:00\",\"message\":\"GET /search HTTP/1.1 200 1070000\",\"user\":{\"id\":\"kimchy\"}}' \"$ELASTICSEARCH_URL/my-index-000001/_create/1\"" + }, + { + "language": "Java", + "code": "client.create(c -> c\n .id(\"1\")\n .index(\"my-index-000001\")\n .document(JsonData.fromJson(\"{\\\"@timestamp\\\":\\\"2099-11-15T13:12:00\\\",\\\"message\\\":\\\"GET /search HTTP/1.1 200 1070000\\\",\\\"user\\\":{\\\"id\\\":\\\"kimchy\\\"}}\"))\n);\n" + } + ], + "specification/_global/rank_eval/examples/request/RankEvalRequestExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.rank_eval(\n index=\"my-index-000001\",\n requests=[\n {\n \"id\": \"JFK query\",\n \"request\": {\n \"query\": {\n \"match_all\": {}\n }\n },\n \"ratings\": []\n }\n ],\n metric={\n \"precision\": {\n \"k\": 20,\n \"relevant_rating_threshold\": 1,\n \"ignore_unlabeled\": False\n }\n },\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.rankEval({\n index: \"my-index-000001\",\n requests: [\n {\n id: \"JFK query\",\n request: {\n query: {\n match_all: {},\n },\n },\n ratings: [],\n },\n ],\n metric: {\n precision: {\n k: 20,\n relevant_rating_threshold: 1,\n ignore_unlabeled: false,\n },\n },\n});" + }, + { + "language": "Ruby", + "code": "response = client.rank_eval(\n index: \"my-index-000001\",\n body: {\n \"requests\": [\n {\n \"id\": \"JFK query\",\n \"request\": {\n \"query\": {\n \"match_all\": {}\n }\n },\n \"ratings\": []\n }\n ],\n \"metric\": {\n \"precision\": {\n \"k\": 20,\n \"relevant_rating_threshold\": 1,\n \"ignore_unlabeled\": false\n }\n }\n }\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->rankEval([\n \"index\" => \"my-index-000001\",\n \"body\" => [\n \"requests\" => array(\n [\n \"id\" => \"JFK query\",\n \"request\" => [\n \"query\" => [\n \"match_all\" => new ArrayObject([]),\n ],\n ],\n \"ratings\" => array(\n ),\n ],\n ),\n \"metric\" => [\n \"precision\" => [\n \"k\" => 20,\n \"relevant_rating_threshold\" => 1,\n \"ignore_unlabeled\" => false,\n ],\n ],\n ],\n]);" + }, + { + "language": "curl", + "code": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"requests\":[{\"id\":\"JFK query\",\"request\":{\"query\":{\"match_all\":{}}},\"ratings\":[]}],\"metric\":{\"precision\":{\"k\":20,\"relevant_rating_threshold\":1,\"ignore_unlabeled\":false}}}' \"$ELASTICSEARCH_URL/my-index-000001/_rank_eval\"" + }, + { + "language": "Java", + "code": "client.rankEval(r -> r\n .index(\"my-index-000001\")\n .metric(m -> m\n .precision(p -> p\n .ignoreUnlabeled(false)\n .relevantRatingThreshold(1)\n .k(20)\n )\n )\n .requests(re -> re\n .id(\"JFK query\")\n .request(req -> req\n .query(q -> q\n .matchAll(m -> m)\n )\n )\n )\n);\n" + } + ], + "specification/_global/exists_source/examples/request/ExistsSourceRequestExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.exists_source(\n index=\"my-index-000001\",\n id=\"1\",\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.existsSource({\n index: \"my-index-000001\",\n id: 1,\n});" + }, + { + "language": "Ruby", + "code": "response = client.exists_source(\n index: \"my-index-000001\",\n id: \"1\"\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->existsSource([\n \"index\" => \"my-index-000001\",\n \"id\" => \"1\",\n]);" + }, + { + "language": "curl", + "code": "curl --head -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/my-index-000001/_source/1\"" + }, + { + "language": "Java", + "code": "client.existsSource(e -> e\n .id(\"1\")\n .index(\"my-index-000001\")\n);\n" + } + ], + "specification/_global/close_point_in_time/examples/request/ClosePointInTimeRequestExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.close_point_in_time(\n id=\"46ToAwMDaWR5BXV1aWQyKwZub2RlXzMAAAAAAAAAACoBYwADaWR4BXV1aWQxAgZub2RlXzEAAAAAAAAAAAEBYQADaWR5BXV1aWQyKgZub2RlXzIAAAAAAAAAAAwBYgACBXV1aWQyAAAFdXVpZDEAAQltYXRjaF9hbGw_gAAAAA==\",\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.closePointInTime({\n id: \"46ToAwMDaWR5BXV1aWQyKwZub2RlXzMAAAAAAAAAACoBYwADaWR4BXV1aWQxAgZub2RlXzEAAAAAAAAAAAEBYQADaWR5BXV1aWQyKgZub2RlXzIAAAAAAAAAAAwBYgACBXV1aWQyAAAFdXVpZDEAAQltYXRjaF9hbGw_gAAAAA==\",\n});" + }, + { + "language": "Ruby", + "code": "response = client.close_point_in_time(\n body: {\n \"id\": \"46ToAwMDaWR5BXV1aWQyKwZub2RlXzMAAAAAAAAAACoBYwADaWR4BXV1aWQxAgZub2RlXzEAAAAAAAAAAAEBYQADaWR5BXV1aWQyKgZub2RlXzIAAAAAAAAAAAwBYgACBXV1aWQyAAAFdXVpZDEAAQltYXRjaF9hbGw_gAAAAA==\"\n }\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->closePointInTime([\n \"body\" => [\n \"id\" => \"46ToAwMDaWR5BXV1aWQyKwZub2RlXzMAAAAAAAAAACoBYwADaWR4BXV1aWQxAgZub2RlXzEAAAAAAAAAAAEBYQADaWR5BXV1aWQyKgZub2RlXzIAAAAAAAAAAAwBYgACBXV1aWQyAAAFdXVpZDEAAQltYXRjaF9hbGw_gAAAAA==\",\n ],\n]);" + }, + { + "language": "curl", + "code": "curl -X DELETE -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"id\":\"46ToAwMDaWR5BXV1aWQyKwZub2RlXzMAAAAAAAAAACoBYwADaWR4BXV1aWQxAgZub2RlXzEAAAAAAAAAAAEBYQADaWR5BXV1aWQyKgZub2RlXzIAAAAAAAAAAAwBYgACBXV1aWQyAAAFdXVpZDEAAQltYXRjaF9hbGw_gAAAAA==\"}' \"$ELASTICSEARCH_URL/_pit\"" + }, + { + "language": "Java", + "code": "client.closePointInTime(c -> c\n .id(\"46ToAwMDaWR5BXV1aWQyKwZub2RlXzMAAAAAAAAAACoBYwADaWR4BXV1aWQxAgZub2RlXzEAAAAAAAAAAAEBYQADaWR5BXV1aWQyKgZub2RlXzIAAAAAAAAAAAwBYgACBXV1aWQyAAAFdXVpZDEAAQltYXRjaF9hbGw_gAAAAA==\")\n);\n" + } + ], + "specification/shutdown/put_node/examples/request/ShutdownPutNodeRequestExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.shutdown.put_node(\n node_id=\"USpTGYaBSIKbgSUJR2Z9lg\",\n type=\"restart\",\n reason=\"Demonstrating how the node shutdown API works\",\n allocation_delay=\"20m\",\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.shutdown.putNode({\n node_id: \"USpTGYaBSIKbgSUJR2Z9lg\",\n type: \"restart\",\n reason: \"Demonstrating how the node shutdown API works\",\n allocation_delay: \"20m\",\n});" + }, + { + "language": "Ruby", + "code": "response = client.shutdown.put_node(\n node_id: \"USpTGYaBSIKbgSUJR2Z9lg\",\n body: {\n \"type\": \"restart\",\n \"reason\": \"Demonstrating how the node shutdown API works\",\n \"allocation_delay\": \"20m\"\n }\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->shutdown()->putNode([\n \"node_id\" => \"USpTGYaBSIKbgSUJR2Z9lg\",\n \"body\" => [\n \"type\" => \"restart\",\n \"reason\" => \"Demonstrating how the node shutdown API works\",\n \"allocation_delay\" => \"20m\",\n ],\n]);" + }, + { + "language": "curl", + "code": "curl -X PUT -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"type\":\"restart\",\"reason\":\"Demonstrating how the node shutdown API works\",\"allocation_delay\":\"20m\"}' \"$ELASTICSEARCH_URL/_nodes/USpTGYaBSIKbgSUJR2Z9lg/shutdown\"" + }, + { + "language": "Java", + "code": "client.shutdown().putNode(p -> p\n .allocationDelay(\"20m\")\n .nodeId(\"USpTGYaBSIKbgSUJR2Z9lg\")\n .reason(\"Demonstrating how the node shutdown API works\")\n .type(Type.Restart)\n);\n" + } + ], + "specification/shutdown/delete_node/examples/request/ShutdownDeleteNodeRequestExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.shutdown.delete_node(\n node_id=\"USpTGYaBSIKbgSUJR2Z9lg\",\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.shutdown.deleteNode({\n node_id: \"USpTGYaBSIKbgSUJR2Z9lg\",\n});" + }, + { + "language": "Ruby", + "code": "response = client.shutdown.delete_node(\n node_id: \"USpTGYaBSIKbgSUJR2Z9lg\"\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->shutdown()->deleteNode([\n \"node_id\" => \"USpTGYaBSIKbgSUJR2Z9lg\",\n]);" + }, + { + "language": "curl", + "code": "curl -X DELETE -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_nodes/USpTGYaBSIKbgSUJR2Z9lg/shutdown\"" + }, + { + "language": "Java", + "code": "client.shutdown().deleteNode(d -> d\n .nodeId(\"USpTGYaBSIKbgSUJR2Z9lg\")\n);\n" + } + ], + "specification/shutdown/get_node/examples/request/ShutdownGetNodeRequestExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.shutdown.get_node(\n node_id=\"USpTGYaBSIKbgSUJR2Z9lg\",\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.shutdown.getNode({\n node_id: \"USpTGYaBSIKbgSUJR2Z9lg\",\n});" + }, + { + "language": "Ruby", + "code": "response = client.shutdown.get_node(\n node_id: \"USpTGYaBSIKbgSUJR2Z9lg\"\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->shutdown()->getNode([\n \"node_id\" => \"USpTGYaBSIKbgSUJR2Z9lg\",\n]);" + }, + { + "language": "curl", + "code": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_nodes/USpTGYaBSIKbgSUJR2Z9lg/shutdown\"" + }, + { + "language": "Java", + "code": "client.shutdown().getNode(g -> g\n .nodeId(\"USpTGYaBSIKbgSUJR2Z9lg\")\n);\n" + } + ], + "specification/watcher/update_settings/examples/request/WatcherUpdateSettingsRequestExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.watcher.update_settings(\n index.auto_expand_replicas=\"0-4\",\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.watcher.updateSettings({\n \"index.auto_expand_replicas\": \"0-4\",\n});" + }, + { + "language": "Ruby", + "code": "response = client.watcher.update_settings(\n body: {\n \"index.auto_expand_replicas\": \"0-4\"\n }\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->watcher()->updateSettings([\n \"body\" => [\n \"index.auto_expand_replicas\" => \"0-4\",\n ],\n]);" + }, + { + "language": "curl", + "code": "curl -X PUT -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"index.auto_expand_replicas\":\"0-4\"}' \"$ELASTICSEARCH_URL/_watcher/settings\"" + }, + { + "language": "Java", + "code": "client.watcher().updateSettings(u -> u\n .indexAutoExpandReplicas(\"0-4\")\n);\n" + } + ], + "specification/watcher/activate_watch/examples/request/WatcherActivateWatchExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.watcher.activate_watch(\n watch_id=\"my_watch\",\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.watcher.activateWatch({\n watch_id: \"my_watch\",\n});" + }, + { + "language": "Ruby", + "code": "response = client.watcher.activate_watch(\n watch_id: \"my_watch\"\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->watcher()->activateWatch([\n \"watch_id\" => \"my_watch\",\n]);" + }, + { + "language": "curl", + "code": "curl -X PUT -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_watcher/watch/my_watch/_activate\"" + }, + { + "language": "Java", + "code": "client.watcher().activateWatch(a -> a\n .watchId(\"my_watch\")\n);\n" + } + ], + "specification/watcher/get_settings/examples/request/WatcherGetSettingsExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.watcher.get_settings()" + }, + { + "language": "JavaScript", + "code": "const response = await client.watcher.getSettings();" + }, + { + "language": "Ruby", + "code": "response = client.watcher.get_settings" + }, + { + "language": "PHP", + "code": "$resp = $client->watcher()->getSettings();" + }, + { + "language": "curl", + "code": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_watcher/settings\"" + }, + { + "language": "Java", + "code": "client.watcher().getSettings(g -> g);\n" + } + ], + "specification/watcher/deactivate_watch/examples/request/WatcherDeactivateWatchExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.watcher.deactivate_watch(\n watch_id=\"my_watch\",\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.watcher.deactivateWatch({\n watch_id: \"my_watch\",\n});" + }, + { + "language": "Ruby", + "code": "response = client.watcher.deactivate_watch(\n watch_id: \"my_watch\"\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->watcher()->deactivateWatch([\n \"watch_id\" => \"my_watch\",\n]);" + }, + { + "language": "curl", + "code": "curl -X PUT -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_watcher/watch/my_watch/_deactivate\"" + }, + { + "language": "Java", + "code": "client.watcher().deactivateWatch(d -> d\n .watchId(\"my_watch\")\n);\n" + } + ], + "specification/watcher/execute_watch/examples/request/WatcherExecuteRequestExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.watcher.execute_watch(\n id=\"my_watch\",\n trigger_data={\n \"triggered_time\": \"now\",\n \"scheduled_time\": \"now\"\n },\n alternative_input={\n \"foo\": \"bar\"\n },\n ignore_condition=True,\n action_modes={\n \"my-action\": \"force_simulate\"\n },\n record_execution=True,\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.watcher.executeWatch({\n id: \"my_watch\",\n trigger_data: {\n triggered_time: \"now\",\n scheduled_time: \"now\",\n },\n alternative_input: {\n foo: \"bar\",\n },\n ignore_condition: true,\n action_modes: {\n \"my-action\": \"force_simulate\",\n },\n record_execution: true,\n});" + }, + { + "language": "Ruby", + "code": "response = client.watcher.execute_watch(\n id: \"my_watch\",\n body: {\n \"trigger_data\": {\n \"triggered_time\": \"now\",\n \"scheduled_time\": \"now\"\n },\n \"alternative_input\": {\n \"foo\": \"bar\"\n },\n \"ignore_condition\": true,\n \"action_modes\": {\n \"my-action\": \"force_simulate\"\n },\n \"record_execution\": true\n }\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->watcher()->executeWatch([\n \"id\" => \"my_watch\",\n \"body\" => [\n \"trigger_data\" => [\n \"triggered_time\" => \"now\",\n \"scheduled_time\" => \"now\",\n ],\n \"alternative_input\" => [\n \"foo\" => \"bar\",\n ],\n \"ignore_condition\" => true,\n \"action_modes\" => [\n \"my-action\" => \"force_simulate\",\n ],\n \"record_execution\" => true,\n ],\n]);" + }, + { + "language": "curl", + "code": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"trigger_data\":{\"triggered_time\":\"now\",\"scheduled_time\":\"now\"},\"alternative_input\":{\"foo\":\"bar\"},\"ignore_condition\":true,\"action_modes\":{\"my-action\":\"force_simulate\"},\"record_execution\":true}' \"$ELASTICSEARCH_URL/_watcher/watch/my_watch/_execute\"" + }, + { + "language": "Java", + "code": "client.watcher().executeWatch(e -> e\n .actionModes(\"my-action\", ActionExecutionMode.ForceSimulate)\n .alternativeInput(\"foo\", JsonData.fromJson(\"\\\"bar\\\"\"))\n .id(\"my_watch\")\n .ignoreCondition(true)\n .recordExecution(true)\n .triggerData(t -> t\n .scheduledTime(DateTime.of(\"now\"))\n .triggeredTime(DateTime.of(\"now\"))\n )\n);\n" + } + ], + "specification/watcher/execute_watch/examples/request/WatcherExecuteRequestExample2.yaml": [ + { + "language": "Python", + "code": "resp = client.watcher.execute_watch(\n id=\"my_watch\",\n action_modes={\n \"action1\": \"force_simulate\",\n \"action2\": \"skip\"\n },\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.watcher.executeWatch({\n id: \"my_watch\",\n action_modes: {\n action1: \"force_simulate\",\n action2: \"skip\",\n },\n});" + }, + { + "language": "Ruby", + "code": "response = client.watcher.execute_watch(\n id: \"my_watch\",\n body: {\n \"action_modes\": {\n \"action1\": \"force_simulate\",\n \"action2\": \"skip\"\n }\n }\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->watcher()->executeWatch([\n \"id\" => \"my_watch\",\n \"body\" => [\n \"action_modes\" => [\n \"action1\" => \"force_simulate\",\n \"action2\" => \"skip\",\n ],\n ],\n]);" + }, + { + "language": "curl", + "code": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"action_modes\":{\"action1\":\"force_simulate\",\"action2\":\"skip\"}}' \"$ELASTICSEARCH_URL/_watcher/watch/my_watch/_execute\"" + }, + { + "language": "Java", + "code": "client.watcher().executeWatch(e -> e\n .actionModes(Map.of(\"action1\", ActionExecutionMode.ForceSimulate,\"action2\", ActionExecutionMode.Skip))\n .id(\"my_watch\")\n);\n" + } + ], + "specification/watcher/execute_watch/examples/request/WatcherExecuteRequestExample3.yaml": [ + { + "language": "Python", + "code": "resp = client.watcher.execute_watch(\n watch={\n \"trigger\": {\n \"schedule\": {\n \"interval\": \"10s\"\n }\n },\n \"input\": {\n \"search\": {\n \"request\": {\n \"indices\": [\n \"logs\"\n ],\n \"body\": {\n \"query\": {\n \"match\": {\n \"message\": \"error\"\n }\n }\n }\n }\n }\n },\n \"condition\": {\n \"compare\": {\n \"ctx.payload.hits.total\": {\n \"gt\": 0\n }\n }\n },\n \"actions\": {\n \"log_error\": {\n \"logging\": {\n \"text\": \"Found {{ctx.payload.hits.total}} errors in the logs\"\n }\n }\n }\n },\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.watcher.executeWatch({\n watch: {\n trigger: {\n schedule: {\n interval: \"10s\",\n },\n },\n input: {\n search: {\n request: {\n indices: [\"logs\"],\n body: {\n query: {\n match: {\n message: \"error\",\n },\n },\n },\n },\n },\n },\n condition: {\n compare: {\n \"ctx.payload.hits.total\": {\n gt: 0,\n },\n },\n },\n actions: {\n log_error: {\n logging: {\n text: \"Found {{ctx.payload.hits.total}} errors in the logs\",\n },\n },\n },\n },\n});" + }, + { + "language": "Ruby", + "code": "response = client.watcher.execute_watch(\n body: {\n \"watch\": {\n \"trigger\": {\n \"schedule\": {\n \"interval\": \"10s\"\n }\n },\n \"input\": {\n \"search\": {\n \"request\": {\n \"indices\": [\n \"logs\"\n ],\n \"body\": {\n \"query\": {\n \"match\": {\n \"message\": \"error\"\n }\n }\n }\n }\n }\n },\n \"condition\": {\n \"compare\": {\n \"ctx.payload.hits.total\": {\n \"gt\": 0\n }\n }\n },\n \"actions\": {\n \"log_error\": {\n \"logging\": {\n \"text\": \"Found {{ctx.payload.hits.total}} errors in the logs\"\n }\n }\n }\n }\n }\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->watcher()->executeWatch([\n \"body\" => [\n \"watch\" => [\n \"trigger\" => [\n \"schedule\" => [\n \"interval\" => \"10s\",\n ],\n ],\n \"input\" => [\n \"search\" => [\n \"request\" => [\n \"indices\" => array(\n \"logs\",\n ),\n \"body\" => [\n \"query\" => [\n \"match\" => [\n \"message\" => \"error\",\n ],\n ],\n ],\n ],\n ],\n ],\n \"condition\" => [\n \"compare\" => [\n \"ctx.payload.hits.total\" => [\n \"gt\" => 0,\n ],\n ],\n ],\n \"actions\" => [\n \"log_error\" => [\n \"logging\" => [\n \"text\" => \"Found {{ctx.payload.hits.total}} errors in the logs\",\n ],\n ],\n ],\n ],\n ],\n]);" + }, + { + "language": "curl", + "code": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"watch\":{\"trigger\":{\"schedule\":{\"interval\":\"10s\"}},\"input\":{\"search\":{\"request\":{\"indices\":[\"logs\"],\"body\":{\"query\":{\"match\":{\"message\":\"error\"}}}}}},\"condition\":{\"compare\":{\"ctx.payload.hits.total\":{\"gt\":0}}},\"actions\":{\"log_error\":{\"logging\":{\"text\":\"Found {{ctx.payload.hits.total}} errors in the logs\"}}}}}' \"$ELASTICSEARCH_URL/_watcher/watch/_execute\"" + }, + { + "language": "Java", + "code": "client.watcher().executeWatch(e -> e\n .watch(w -> w\n .actions(\"log_error\", a -> a\n .logging(l -> l\n .text(\"Found {{ctx.payload.hits.total}} errors in the logs\")\n )\n )\n .condition(c -> c\n .compare(NamedValue.of(\"ctx.payload.hits.total\",Pair.of(ConditionOp.Gt,FieldValue.of(0))))\n )\n .input(i -> i\n .search(s -> s\n .request(r -> r\n .body(b -> b\n .query(q -> q\n .match(m -> m\n .field(\"message\")\n .query(FieldValue.of(\"error\"))\n )\n )\n )\n .indices(\"logs\")\n )\n )\n )\n .trigger(t -> t\n .schedule(sc -> sc\n .interval(in -> in\n .time(\"10s\")\n )\n )\n )\n )\n);\n" + } + ], + "specification/watcher/start/examples/request/WatcherStartRequestExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.watcher.start()" + }, + { + "language": "JavaScript", + "code": "const response = await client.watcher.start();" + }, + { + "language": "Ruby", + "code": "response = client.watcher.start" + }, + { + "language": "PHP", + "code": "$resp = $client->watcher()->start();" + }, + { + "language": "curl", + "code": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_watcher/_start\"" + }, + { + "language": "Java", + "code": "client.watcher().start(s -> s);\n" + } + ], + "specification/watcher/query_watches/examples/request/WatcherQueryWatchesRequestExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.watcher.query_watches()" + }, + { + "language": "JavaScript", + "code": "const response = await client.watcher.queryWatches();" + }, + { + "language": "Ruby", + "code": "response = client.watcher.query_watches" + }, + { + "language": "PHP", + "code": "$resp = $client->watcher()->queryWatches();" + }, + { + "language": "curl", + "code": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_watcher/_query/watches\"" + }, + { + "language": "Java", + "code": "client.watcher().queryWatches();\n" + } + ], + "specification/watcher/stop/examples/request/WatcherStopRequestExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.watcher.stop()" + }, + { + "language": "JavaScript", + "code": "const response = await client.watcher.stop();" + }, + { + "language": "Ruby", + "code": "response = client.watcher.stop" + }, + { + "language": "PHP", + "code": "$resp = $client->watcher()->stop();" + }, + { + "language": "curl", + "code": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_watcher/_stop\"" + }, + { + "language": "Java", + "code": "client.watcher().stop(s -> s);\n" + } + ], + "specification/watcher/put_watch/examples/request/WatcherPutWatchRequestExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.watcher.put_watch(\n id=\"my-watch\",\n trigger={\n \"schedule\": {\n \"cron\": \"0 0/1 * * * ?\"\n }\n },\n input={\n \"search\": {\n \"request\": {\n \"indices\": [\n \"logstash*\"\n ],\n \"body\": {\n \"query\": {\n \"bool\": {\n \"must\": {\n \"match\": {\n \"response\": 404\n }\n },\n \"filter\": {\n \"range\": {\n \"@timestamp\": {\n \"from\": \"{{ctx.trigger.scheduled_time}}||-5m\",\n \"to\": \"{{ctx.trigger.triggered_time}}\"\n }\n }\n }\n }\n }\n }\n }\n }\n },\n condition={\n \"compare\": {\n \"ctx.payload.hits.total\": {\n \"gt\": 0\n }\n }\n },\n actions={\n \"email_admin\": {\n \"email\": {\n \"to\": \"admin@domain.host.com\",\n \"subject\": \"404 recently encountered\"\n }\n }\n },\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.watcher.putWatch({\n id: \"my-watch\",\n trigger: {\n schedule: {\n cron: \"0 0/1 * * * ?\",\n },\n },\n input: {\n search: {\n request: {\n indices: [\"logstash*\"],\n body: {\n query: {\n bool: {\n must: {\n match: {\n response: 404,\n },\n },\n filter: {\n range: {\n \"@timestamp\": {\n from: \"{{ctx.trigger.scheduled_time}}||-5m\",\n to: \"{{ctx.trigger.triggered_time}}\",\n },\n },\n },\n },\n },\n },\n },\n },\n },\n condition: {\n compare: {\n \"ctx.payload.hits.total\": {\n gt: 0,\n },\n },\n },\n actions: {\n email_admin: {\n email: {\n to: \"admin@domain.host.com\",\n subject: \"404 recently encountered\",\n },\n },\n },\n});" + }, + { + "language": "Ruby", + "code": "response = client.watcher.put_watch(\n id: \"my-watch\",\n body: {\n \"trigger\": {\n \"schedule\": {\n \"cron\": \"0 0/1 * * * ?\"\n }\n },\n \"input\": {\n \"search\": {\n \"request\": {\n \"indices\": [\n \"logstash*\"\n ],\n \"body\": {\n \"query\": {\n \"bool\": {\n \"must\": {\n \"match\": {\n \"response\": 404\n }\n },\n \"filter\": {\n \"range\": {\n \"@timestamp\": {\n \"from\": \"{{ctx.trigger.scheduled_time}}||-5m\",\n \"to\": \"{{ctx.trigger.triggered_time}}\"\n }\n }\n }\n }\n }\n }\n }\n }\n },\n \"condition\": {\n \"compare\": {\n \"ctx.payload.hits.total\": {\n \"gt\": 0\n }\n }\n },\n \"actions\": {\n \"email_admin\": {\n \"email\": {\n \"to\": \"admin@domain.host.com\",\n \"subject\": \"404 recently encountered\"\n }\n }\n }\n }\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->watcher()->putWatch([\n \"id\" => \"my-watch\",\n \"body\" => [\n \"trigger\" => [\n \"schedule\" => [\n \"cron\" => \"0 0/1 * * * ?\",\n ],\n ],\n \"input\" => [\n \"search\" => [\n \"request\" => [\n \"indices\" => array(\n \"logstash*\",\n ),\n \"body\" => [\n \"query\" => [\n \"bool\" => [\n \"must\" => [\n \"match\" => [\n \"response\" => 404,\n ],\n ],\n \"filter\" => [\n \"range\" => [\n \"@timestamp\" => [\n \"from\" => \"{{ctx.trigger.scheduled_time}}||-5m\",\n \"to\" => \"{{ctx.trigger.triggered_time}}\",\n ],\n ],\n ],\n ],\n ],\n ],\n ],\n ],\n ],\n \"condition\" => [\n \"compare\" => [\n \"ctx.payload.hits.total\" => [\n \"gt\" => 0,\n ],\n ],\n ],\n \"actions\" => [\n \"email_admin\" => [\n \"email\" => [\n \"to\" => \"admin@domain.host.com\",\n \"subject\" => \"404 recently encountered\",\n ],\n ],\n ],\n ],\n]);" + }, + { + "language": "curl", + "code": "curl -X PUT -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"trigger\":{\"schedule\":{\"cron\":\"0 0/1 * * * ?\"}},\"input\":{\"search\":{\"request\":{\"indices\":[\"logstash*\"],\"body\":{\"query\":{\"bool\":{\"must\":{\"match\":{\"response\":404}},\"filter\":{\"range\":{\"@timestamp\":{\"from\":\"{{ctx.trigger.scheduled_time}}||-5m\",\"to\":\"{{ctx.trigger.triggered_time}}\"}}}}}}}}},\"condition\":{\"compare\":{\"ctx.payload.hits.total\":{\"gt\":0}}},\"actions\":{\"email_admin\":{\"email\":{\"to\":\"admin@domain.host.com\",\"subject\":\"404 recently encountered\"}}}}' \"$ELASTICSEARCH_URL/_watcher/watch/my-watch\"" + }, + { + "language": "Java", + "code": "client.watcher().putWatch(p -> p\n .actions(\"email_admin\", a -> a\n .email(e -> e\n .subject(\"404 recently encountered\")\n .to(\"admin@domain.host.com\")\n )\n )\n .condition(c -> c\n .compare(NamedValue.of(\"ctx.payload.hits.total\",Pair.of(ConditionOp.Gt,FieldValue.of(0))))\n )\n .id(\"my-watch\")\n .input(i -> i\n .search(s -> s\n .request(r -> r\n .body(b -> b\n .query(q -> q\n .bool(bo -> bo\n .filter(f -> f\n .range(ra -> ra\n .untyped(u -> u\n .field(\"@timestamp\")\n )\n )\n )\n .must(m -> m\n .match(ma -> ma\n .field(\"response\")\n .query(FieldValue.of(404))\n )\n )\n )\n )\n )\n .indices(\"logstash*\")\n )\n )\n )\n .trigger(t -> t\n .schedule(sc -> sc\n .cron(\"0 0/1 * * * ?\")\n )\n )\n);\n" + } + ], + "specification/watcher/get_watch/examples/request/GetWatchRequestExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.watcher.get_watch(\n id=\"my_watch\",\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.watcher.getWatch({\n id: \"my_watch\",\n});" + }, + { + "language": "Ruby", + "code": "response = client.watcher.get_watch(\n id: \"my_watch\"\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->watcher()->getWatch([\n \"id\" => \"my_watch\",\n]);" + }, + { + "language": "curl", + "code": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_watcher/watch/my_watch\"" + }, + { + "language": "Java", + "code": "client.watcher().getWatch(g -> g\n .id(\"my_watch\")\n);\n" + } + ], + "specification/watcher/ack_watch/examples/request/WatcherAckWatchRequestExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.watcher.ack_watch(\n watch_id=\"my_watch\",\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.watcher.ackWatch({\n watch_id: \"my_watch\",\n});" + }, + { + "language": "Ruby", + "code": "response = client.watcher.ack_watch(\n watch_id: \"my_watch\"\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->watcher()->ackWatch([\n \"watch_id\" => \"my_watch\",\n]);" + }, + { + "language": "curl", + "code": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_watcher/watch/my_watch/_ack\"" + }, + { + "language": "Java", + "code": "client.watcher().ackWatch(a -> a\n .watchId(\"my_watch\")\n);\n" + } + ], + "specification/watcher/delete_watch/examples/request/DeleteWatchRequestExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.watcher.delete_watch(\n id=\"my_watch\",\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.watcher.deleteWatch({\n id: \"my_watch\",\n});" + }, + { + "language": "Ruby", + "code": "response = client.watcher.delete_watch(\n id: \"my_watch\"\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->watcher()->deleteWatch([\n \"id\" => \"my_watch\",\n]);" + }, + { + "language": "curl", + "code": "curl -X DELETE -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_watcher/watch/my_watch\"" + }, + { + "language": "Java", + "code": "client.watcher().deleteWatch(d -> d\n .id(\"my_watch\")\n);\n" + } + ], + "specification/watcher/stats/examples/request/WatcherStatsRequestExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.watcher.stats()" + }, + { + "language": "JavaScript", + "code": "const response = await client.watcher.stats();" + }, + { + "language": "Ruby", + "code": "response = client.watcher.stats" + }, + { + "language": "PHP", + "code": "$resp = $client->watcher()->stats();" + }, + { + "language": "curl", + "code": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_watcher/stats\"" + }, + { + "language": "Java", + "code": "client.watcher().stats(s -> s);\n" + } + ], + "specification/license/post/examples/request/PostLicenseRequestExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.license.post(\n licenses=[\n {\n \"uid\": \"893361dc-9749-4997-93cb-802e3d7fa4xx\",\n \"type\": \"basic\",\n \"issue_date_in_millis\": 1411948800000,\n \"expiry_date_in_millis\": 1914278399999,\n \"max_nodes\": 1,\n \"issued_to\": \"issuedTo\",\n \"issuer\": \"issuer\",\n \"signature\": \"xx\"\n }\n ],\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.license.post({\n licenses: [\n {\n uid: \"893361dc-9749-4997-93cb-802e3d7fa4xx\",\n type: \"basic\",\n issue_date_in_millis: 1411948800000,\n expiry_date_in_millis: 1914278399999,\n max_nodes: 1,\n issued_to: \"issuedTo\",\n issuer: \"issuer\",\n signature: \"xx\",\n },\n ],\n});" + }, + { + "language": "Ruby", + "code": "response = client.license.post(\n body: {\n \"licenses\": [\n {\n \"uid\": \"893361dc-9749-4997-93cb-802e3d7fa4xx\",\n \"type\": \"basic\",\n \"issue_date_in_millis\": 1411948800000,\n \"expiry_date_in_millis\": 1914278399999,\n \"max_nodes\": 1,\n \"issued_to\": \"issuedTo\",\n \"issuer\": \"issuer\",\n \"signature\": \"xx\"\n }\n ]\n }\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->license()->post([\n \"body\" => [\n \"licenses\" => array(\n [\n \"uid\" => \"893361dc-9749-4997-93cb-802e3d7fa4xx\",\n \"type\" => \"basic\",\n \"issue_date_in_millis\" => 1411948800000,\n \"expiry_date_in_millis\" => 1914278399999,\n \"max_nodes\" => 1,\n \"issued_to\" => \"issuedTo\",\n \"issuer\" => \"issuer\",\n \"signature\" => \"xx\",\n ],\n ),\n ],\n]);" + }, + { + "language": "curl", + "code": "curl -X PUT -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"licenses\":[{\"uid\":\"893361dc-9749-4997-93cb-802e3d7fa4xx\",\"type\":\"basic\",\"issue_date_in_millis\":1411948800000,\"expiry_date_in_millis\":1914278399999,\"max_nodes\":1,\"issued_to\":\"issuedTo\",\"issuer\":\"issuer\",\"signature\":\"xx\"}]}' \"$ELASTICSEARCH_URL/_license\"" + }, + { + "language": "Java", + "code": "client.license().post(p -> p\n .licenses(l -> l\n .expiryDateInMillis(1914278399999L)\n .issueDateInMillis(1411948800000L)\n .issuedTo(\"issuedTo\")\n .issuer(\"issuer\")\n .maxNodes(1L)\n .signature(\"xx\")\n .type(LicenseType.Basic)\n .uid(\"893361dc-9749-4997-93cb-802e3d7fa4xx\")\n )\n);\n" + } + ], + "specification/license/delete/examples/request/LicenseDeleteExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.license.delete()" + }, + { + "language": "JavaScript", + "code": "const response = await client.license.delete();" + }, + { + "language": "Ruby", + "code": "response = client.license.delete" + }, + { + "language": "PHP", + "code": "$resp = $client->license()->delete();" + }, + { + "language": "curl", + "code": "curl -X DELETE -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_license\"" + }, + { + "language": "Java", + "code": "client.license().delete(d -> d);\n" + } + ], + "specification/license/get/examples/request/GetLicenseRequestExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.license.get()" + }, + { + "language": "JavaScript", + "code": "const response = await client.license.get();" + }, + { + "language": "Ruby", + "code": "response = client.license.get" + }, + { + "language": "PHP", + "code": "$resp = $client->license()->get();" + }, + { + "language": "curl", + "code": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_license\"" + }, + { + "language": "Java", + "code": "client.license().get(g -> g);\n" + } + ], + "specification/license/get_trial_status/examples/request/GetTrialLicenseStatusRequestExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.license.get_trial_status()" + }, + { + "language": "JavaScript", + "code": "const response = await client.license.getTrialStatus();" + }, + { + "language": "Ruby", + "code": "response = client.license.get_trial_status" + }, + { + "language": "PHP", + "code": "$resp = $client->license()->getTrialStatus();" + }, + { + "language": "curl", + "code": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_license/trial_status\"" + }, + { + "language": "Java", + "code": "client.license().getTrialStatus();\n" + } + ], + "specification/license/post_start_trial/examples/request/StartTrialLicenseRequestExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.license.post_start_trial(\n acknowledge=True,\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.license.postStartTrial({\n acknowledge: \"true\",\n});" + }, + { + "language": "Ruby", + "code": "response = client.license.post_start_trial(\n acknowledge: \"true\"\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->license()->postStartTrial([\n \"acknowledge\" => \"true\",\n]);" + }, + { + "language": "curl", + "code": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_license/start_trial?acknowledge=true\"" + }, + { + "language": "Java", + "code": "client.license().postStartTrial(p -> p\n .acknowledge(true)\n);\n" + } + ], + "specification/license/get_basic_status/examples/request/GetBasicLicenseStatusRequestExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.license.get_basic_status()" + }, + { + "language": "JavaScript", + "code": "const response = await client.license.getBasicStatus();" + }, + { + "language": "Ruby", + "code": "response = client.license.get_basic_status" + }, + { + "language": "PHP", + "code": "$resp = $client->license()->getBasicStatus();" + }, + { + "language": "curl", + "code": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_license/basic_status\"" + }, + { + "language": "Java", + "code": "client.license().getBasicStatus();\n" + } + ], + "specification/license/post_start_basic/examples/request/StartBasicLicenseRequestExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.license.post_start_basic(\n acknowledge=True,\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.license.postStartBasic({\n acknowledge: \"true\",\n});" + }, + { + "language": "Ruby", + "code": "response = client.license.post_start_basic(\n acknowledge: \"true\"\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->license()->postStartBasic([\n \"acknowledge\" => \"true\",\n]);" + }, + { + "language": "curl", + "code": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_license/start_basic?acknowledge=true\"" + }, + { + "language": "Java", + "code": "client.license().postStartBasic(p -> p\n .acknowledge(true)\n);\n" + } + ], + "specification/logstash/get_pipeline/examples/request/LogstashGetPipelineRequestExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.logstash.get_pipeline(\n id=\"my_pipeline\",\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.logstash.getPipeline({\n id: \"my_pipeline\",\n});" + }, + { + "language": "Ruby", + "code": "response = client.logstash.get_pipeline(\n id: \"my_pipeline\"\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->logstash()->getPipeline([\n \"id\" => \"my_pipeline\",\n]);" + }, + { + "language": "curl", + "code": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_logstash/pipeline/my_pipeline\"" + }, + { + "language": "Java", + "code": "client.logstash().getPipeline(g -> g\n .id(\"my_pipeline\")\n);\n" + } + ], + "specification/logstash/put_pipeline/examples/request/LogstashPutPipelineRequestExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.logstash.put_pipeline(\n id=\"my_pipeline\",\n pipeline={\n \"description\": \"Sample pipeline for illustration purposes\",\n \"last_modified\": \"2021-01-02T02:50:51.250Z\",\n \"pipeline_metadata\": {\n \"type\": \"logstash_pipeline\",\n \"version\": 1\n },\n \"username\": \"elastic\",\n \"pipeline\": \"input {}\\\\n filter { grok {} }\\\\n output {}\",\n \"pipeline_settings\": {\n \"pipeline.workers\": 1,\n \"pipeline.batch.size\": 125,\n \"pipeline.batch.delay\": 50,\n \"queue.type\": \"memory\",\n \"queue.max_bytes\": \"1gb\",\n \"queue.checkpoint.writes\": 1024\n }\n },\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.logstash.putPipeline({\n id: \"my_pipeline\",\n pipeline: {\n description: \"Sample pipeline for illustration purposes\",\n last_modified: \"2021-01-02T02:50:51.250Z\",\n pipeline_metadata: {\n type: \"logstash_pipeline\",\n version: 1,\n },\n username: \"elastic\",\n pipeline: \"input {}\\\\n filter { grok {} }\\\\n output {}\",\n pipeline_settings: {\n \"pipeline.workers\": 1,\n \"pipeline.batch.size\": 125,\n \"pipeline.batch.delay\": 50,\n \"queue.type\": \"memory\",\n \"queue.max_bytes\": \"1gb\",\n \"queue.checkpoint.writes\": 1024,\n },\n },\n});" + }, + { + "language": "Ruby", + "code": "response = client.logstash.put_pipeline(\n id: \"my_pipeline\",\n body: {\n \"description\": \"Sample pipeline for illustration purposes\",\n \"last_modified\": \"2021-01-02T02:50:51.250Z\",\n \"pipeline_metadata\": {\n \"type\": \"logstash_pipeline\",\n \"version\": 1\n },\n \"username\": \"elastic\",\n \"pipeline\": \"input {}\\\\n filter { grok {} }\\\\n output {}\",\n \"pipeline_settings\": {\n \"pipeline.workers\": 1,\n \"pipeline.batch.size\": 125,\n \"pipeline.batch.delay\": 50,\n \"queue.type\": \"memory\",\n \"queue.max_bytes\": \"1gb\",\n \"queue.checkpoint.writes\": 1024\n }\n }\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->logstash()->putPipeline([\n \"id\" => \"my_pipeline\",\n \"body\" => [\n \"description\" => \"Sample pipeline for illustration purposes\",\n \"last_modified\" => \"2021-01-02T02:50:51.250Z\",\n \"pipeline_metadata\" => [\n \"type\" => \"logstash_pipeline\",\n \"version\" => 1,\n ],\n \"username\" => \"elastic\",\n \"pipeline\" => \"input {}\\\\n filter { grok {} }\\\\n output {}\",\n \"pipeline_settings\" => [\n \"pipeline.workers\" => 1,\n \"pipeline.batch.size\" => 125,\n \"pipeline.batch.delay\" => 50,\n \"queue.type\" => \"memory\",\n \"queue.max_bytes\" => \"1gb\",\n \"queue.checkpoint.writes\" => 1024,\n ],\n ],\n]);" + }, + { + "language": "curl", + "code": "curl -X PUT -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"description\":\"Sample pipeline for illustration purposes\",\"last_modified\":\"2021-01-02T02:50:51.250Z\",\"pipeline_metadata\":{\"type\":\"logstash_pipeline\",\"version\":1},\"username\":\"elastic\",\"pipeline\":\"input {}\\\\n filter { grok {} }\\\\n output {}\",\"pipeline_settings\":{\"pipeline.workers\":1,\"pipeline.batch.size\":125,\"pipeline.batch.delay\":50,\"queue.type\":\"memory\",\"queue.max_bytes\":\"1gb\",\"queue.checkpoint.writes\":1024}}' \"$ELASTICSEARCH_URL/_logstash/pipeline/my_pipeline\"" + }, + { + "language": "Java", + "code": "client.logstash().putPipeline(p -> p\n .id(\"my_pipeline\")\n .pipeline(pi -> pi\n .description(\"Sample pipeline for illustration purposes\")\n .lastModified(DateTime.of(\"2021-01-02T02:50:51.250Z\"))\n .pipeline(\"input {}\\n filter { grok {} }\\n output {}\")\n .pipelineMetadata(pip -> pip\n .type(\"logstash_pipeline\")\n .version(\"1\")\n )\n .pipelineSettings(pip -> pip\n .pipelineWorkers(1)\n .pipelineBatchSize(125)\n .pipelineBatchDelay(50)\n .queueType(\"memory\")\n .queueMaxBytes(\"1gb\")\n .queueCheckpointWrites(1024)\n )\n .username(\"elastic\")\n )\n);\n" + } + ], + "specification/logstash/delete_pipeline/examples/request/LogstashDeletePipelineExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.logstash.delete_pipeline(\n id=\"my_pipeline\",\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.logstash.deletePipeline({\n id: \"my_pipeline\",\n});" + }, + { + "language": "Ruby", + "code": "response = client.logstash.delete_pipeline(\n id: \"my_pipeline\"\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->logstash()->deletePipeline([\n \"id\" => \"my_pipeline\",\n]);" + }, + { + "language": "curl", + "code": "curl -X DELETE -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_logstash/pipeline/my_pipeline\"" + }, + { + "language": "Java", + "code": "client.logstash().deletePipeline(d -> d\n .id(\"my_pipeline\")\n);\n" + } + ], + "specification/security/saml_complete_logout/examples/request/SamlCompleteLogoutRequestExample2.yaml": [ + { + "language": "Python", + "code": "resp = client.security.saml_complete_logout(\n realm=\"saml1\",\n ids=[\n \"_1c368075e0b3...\"\n ],\n content=\"PHNhbWxwOkxvZ291dFJlc3BvbnNlIHhtbG5zOnNhbWxwPSJ1cm46...\",\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.security.samlCompleteLogout({\n realm: \"saml1\",\n ids: [\"_1c368075e0b3...\"],\n content: \"PHNhbWxwOkxvZ291dFJlc3BvbnNlIHhtbG5zOnNhbWxwPSJ1cm46...\",\n});" + }, + { + "language": "Ruby", + "code": "response = client.security.saml_complete_logout(\n body: {\n \"realm\": \"saml1\",\n \"ids\": [\n \"_1c368075e0b3...\"\n ],\n \"content\": \"PHNhbWxwOkxvZ291dFJlc3BvbnNlIHhtbG5zOnNhbWxwPSJ1cm46...\"\n }\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->security()->samlCompleteLogout([\n \"body\" => [\n \"realm\" => \"saml1\",\n \"ids\" => array(\n \"_1c368075e0b3...\",\n ),\n \"content\" => \"PHNhbWxwOkxvZ291dFJlc3BvbnNlIHhtbG5zOnNhbWxwPSJ1cm46...\",\n ],\n]);" + }, + { + "language": "curl", + "code": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"realm\":\"saml1\",\"ids\":[\"_1c368075e0b3...\"],\"content\":\"PHNhbWxwOkxvZ291dFJlc3BvbnNlIHhtbG5zOnNhbWxwPSJ1cm46...\"}' \"$ELASTICSEARCH_URL/_security/saml/complete_logout\"" + }, + { + "language": "Java", + "code": "client.security().samlCompleteLogout(s -> s\n .content(\"PHNhbWxwOkxvZ291dFJlc3BvbnNlIHhtbG5zOnNhbWxwPSJ1cm46...\")\n .ids(\"_1c368075e0b3...\")\n .realm(\"saml1\")\n);\n" + } + ], + "specification/security/saml_complete_logout/examples/request/SamlCompleteLogoutRequestExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.security.saml_complete_logout(\n realm=\"saml1\",\n ids=[\n \"_1c368075e0b3...\"\n ],\n query_string=\"SAMLResponse=fZHLasMwEEVbfb1bf...&SigAlg=http%3A%2F%2Fwww.w3.org%2F2000%2F09%2Fxmldsig%23rsa-sha1&Signature=CuCmFn%2BLqnaZGZJqK...\",\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.security.samlCompleteLogout({\n realm: \"saml1\",\n ids: [\"_1c368075e0b3...\"],\n query_string:\n \"SAMLResponse=fZHLasMwEEVbfb1bf...&SigAlg=http%3A%2F%2Fwww.w3.org%2F2000%2F09%2Fxmldsig%23rsa-sha1&Signature=CuCmFn%2BLqnaZGZJqK...\",\n});" + }, + { + "language": "Ruby", + "code": "response = client.security.saml_complete_logout(\n body: {\n \"realm\": \"saml1\",\n \"ids\": [\n \"_1c368075e0b3...\"\n ],\n \"query_string\": \"SAMLResponse=fZHLasMwEEVbfb1bf...&SigAlg=http%3A%2F%2Fwww.w3.org%2F2000%2F09%2Fxmldsig%23rsa-sha1&Signature=CuCmFn%2BLqnaZGZJqK...\"\n }\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->security()->samlCompleteLogout([\n \"body\" => [\n \"realm\" => \"saml1\",\n \"ids\" => array(\n \"_1c368075e0b3...\",\n ),\n \"query_string\" => \"SAMLResponse=fZHLasMwEEVbfb1bf...&SigAlg=http%3A%2F%2Fwww.w3.org%2F2000%2F09%2Fxmldsig%23rsa-sha1&Signature=CuCmFn%2BLqnaZGZJqK...\",\n ],\n]);" + }, + { + "language": "curl", + "code": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"realm\":\"saml1\",\"ids\":[\"_1c368075e0b3...\"],\"query_string\":\"SAMLResponse=fZHLasMwEEVbfb1bf...&SigAlg=http%3A%2F%2Fwww.w3.org%2F2000%2F09%2Fxmldsig%23rsa-sha1&Signature=CuCmFn%2BLqnaZGZJqK...\"}' \"$ELASTICSEARCH_URL/_security/saml/complete_logout\"" + }, + { + "language": "Java", + "code": "client.security().samlCompleteLogout(s -> s\n .ids(\"_1c368075e0b3...\")\n .queryString(\"SAMLResponse=fZHLasMwEEVbfb1bf...&SigAlg=http%3A%2F%2Fwww.w3.org%2F2000%2F09%2Fxmldsig%23rsa-sha1&Signature=CuCmFn%2BLqnaZGZJqK...\")\n .realm(\"saml1\")\n);\n" + } + ], + "specification/security/disable_user/examples/request/SecurityDisableUserExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.security.disable_user(\n username=\"jacknich\",\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.security.disableUser({\n username: \"jacknich\",\n});" + }, + { + "language": "Ruby", + "code": "response = client.security.disable_user(\n username: \"jacknich\"\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->security()->disableUser([\n \"username\" => \"jacknich\",\n]);" + }, + { + "language": "curl", + "code": "curl -X PUT -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_security/user/jacknich/_disable\"" + }, + { + "language": "Java", + "code": "client.security().disableUser(d -> d\n .username(\"jacknich\")\n);\n" + } + ], + "specification/security/update_settings/examples/request/SecurityUpdateSettingsRequestExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.security.update_settings(\n security={\n \"index.auto_expand_replicas\": \"0-all\"\n },\n security-tokens={\n \"index.auto_expand_replicas\": \"0-all\"\n },\n security-profile={\n \"index.auto_expand_replicas\": \"0-all\"\n },\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.security.updateSettings({\n security: {\n \"index.auto_expand_replicas\": \"0-all\",\n },\n \"security-tokens\": {\n \"index.auto_expand_replicas\": \"0-all\",\n },\n \"security-profile\": {\n \"index.auto_expand_replicas\": \"0-all\",\n },\n});" + }, + { + "language": "Ruby", + "code": "response = client.security.update_settings(\n body: {\n \"security\": {\n \"index.auto_expand_replicas\": \"0-all\"\n },\n \"security-tokens\": {\n \"index.auto_expand_replicas\": \"0-all\"\n },\n \"security-profile\": {\n \"index.auto_expand_replicas\": \"0-all\"\n }\n }\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->security()->updateSettings([\n \"body\" => [\n \"security\" => [\n \"index.auto_expand_replicas\" => \"0-all\",\n ],\n \"security-tokens\" => [\n \"index.auto_expand_replicas\" => \"0-all\",\n ],\n \"security-profile\" => [\n \"index.auto_expand_replicas\" => \"0-all\",\n ],\n ],\n]);" + }, + { + "language": "curl", + "code": "curl -X PUT -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"security\":{\"index.auto_expand_replicas\":\"0-all\"},\"security-tokens\":{\"index.auto_expand_replicas\":\"0-all\"},\"security-profile\":{\"index.auto_expand_replicas\":\"0-all\"}}' \"$ELASTICSEARCH_URL/_security/settings\"" + }, + { + "language": "Java", + "code": "client.security().updateSettings(u -> u\n .security(s -> s)\n .securityProfile(s -> s)\n .securityTokens(s -> s)\n);\n" + } + ], + "specification/security/get_user_profile/examples/request/GetUserProfileRequestExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.security.get_user_profile(\n uid=\"u_79HkWkwmnBH5gqFKwoxggWPjEBOur1zLPXQPEl1VBW0_0\",\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.security.getUserProfile({\n uid: \"u_79HkWkwmnBH5gqFKwoxggWPjEBOur1zLPXQPEl1VBW0_0\",\n});" + }, + { + "language": "Ruby", + "code": "response = client.security.get_user_profile(\n uid: \"u_79HkWkwmnBH5gqFKwoxggWPjEBOur1zLPXQPEl1VBW0_0\"\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->security()->getUserProfile([\n \"uid\" => \"u_79HkWkwmnBH5gqFKwoxggWPjEBOur1zLPXQPEl1VBW0_0\",\n]);" + }, + { + "language": "curl", + "code": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_security/profile/u_79HkWkwmnBH5gqFKwoxggWPjEBOur1zLPXQPEl1VBW0_0\"" + }, + { + "language": "Java", + "code": "client.security().getUserProfile(g -> g\n .uid(\"u_79HkWkwmnBH5gqFKwoxggWPjEBOur1zLPXQPEl1VBW0_0\")\n);\n" + } + ], + "specification/security/create_api_key/examples/request/SecurityCreateApiKeyRequestExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.security.create_api_key(\n name=\"my-api-key\",\n expiration=\"1d\",\n role_descriptors={\n \"role-a\": {\n \"cluster\": [\n \"all\"\n ],\n \"indices\": [\n {\n \"names\": [\n \"index-a*\"\n ],\n \"privileges\": [\n \"read\"\n ]\n }\n ]\n },\n \"role-b\": {\n \"cluster\": [\n \"all\"\n ],\n \"indices\": [\n {\n \"names\": [\n \"index-b*\"\n ],\n \"privileges\": [\n \"all\"\n ]\n }\n ]\n }\n },\n metadata={\n \"application\": \"my-application\",\n \"environment\": {\n \"level\": 1,\n \"trusted\": True,\n \"tags\": [\n \"dev\",\n \"staging\"\n ]\n }\n },\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.security.createApiKey({\n name: \"my-api-key\",\n expiration: \"1d\",\n role_descriptors: {\n \"role-a\": {\n cluster: [\"all\"],\n indices: [\n {\n names: [\"index-a*\"],\n privileges: [\"read\"],\n },\n ],\n },\n \"role-b\": {\n cluster: [\"all\"],\n indices: [\n {\n names: [\"index-b*\"],\n privileges: [\"all\"],\n },\n ],\n },\n },\n metadata: {\n application: \"my-application\",\n environment: {\n level: 1,\n trusted: true,\n tags: [\"dev\", \"staging\"],\n },\n },\n});" + }, + { + "language": "Ruby", + "code": "response = client.security.create_api_key(\n body: {\n \"name\": \"my-api-key\",\n \"expiration\": \"1d\",\n \"role_descriptors\": {\n \"role-a\": {\n \"cluster\": [\n \"all\"\n ],\n \"indices\": [\n {\n \"names\": [\n \"index-a*\"\n ],\n \"privileges\": [\n \"read\"\n ]\n }\n ]\n },\n \"role-b\": {\n \"cluster\": [\n \"all\"\n ],\n \"indices\": [\n {\n \"names\": [\n \"index-b*\"\n ],\n \"privileges\": [\n \"all\"\n ]\n }\n ]\n }\n },\n \"metadata\": {\n \"application\": \"my-application\",\n \"environment\": {\n \"level\": 1,\n \"trusted\": true,\n \"tags\": [\n \"dev\",\n \"staging\"\n ]\n }\n }\n }\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->security()->createApiKey([\n \"body\" => [\n \"name\" => \"my-api-key\",\n \"expiration\" => \"1d\",\n \"role_descriptors\" => [\n \"role-a\" => [\n \"cluster\" => array(\n \"all\",\n ),\n \"indices\" => array(\n [\n \"names\" => array(\n \"index-a*\",\n ),\n \"privileges\" => array(\n \"read\",\n ),\n ],\n ),\n ],\n \"role-b\" => [\n \"cluster\" => array(\n \"all\",\n ),\n \"indices\" => array(\n [\n \"names\" => array(\n \"index-b*\",\n ),\n \"privileges\" => array(\n \"all\",\n ),\n ],\n ),\n ],\n ],\n \"metadata\" => [\n \"application\" => \"my-application\",\n \"environment\" => [\n \"level\" => 1,\n \"trusted\" => true,\n \"tags\" => array(\n \"dev\",\n \"staging\",\n ),\n ],\n ],\n ],\n]);" + }, + { + "language": "curl", + "code": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"name\":\"my-api-key\",\"expiration\":\"1d\",\"role_descriptors\":{\"role-a\":{\"cluster\":[\"all\"],\"indices\":[{\"names\":[\"index-a*\"],\"privileges\":[\"read\"]}]},\"role-b\":{\"cluster\":[\"all\"],\"indices\":[{\"names\":[\"index-b*\"],\"privileges\":[\"all\"]}]}},\"metadata\":{\"application\":\"my-application\",\"environment\":{\"level\":1,\"trusted\":true,\"tags\":[\"dev\",\"staging\"]}}}' \"$ELASTICSEARCH_URL/_security/api_key\"" + }, + { + "language": "Java", + "code": "client.security().createApiKey(c -> c\n .expiration(e -> e\n .time(\"1d\")\n )\n .metadata(Map.of(\"environment\", JsonData.fromJson(\"{\\\"level\\\":1,\\\"trusted\\\":true,\\\"tags\\\":[\\\"dev\\\",\\\"staging\\\"]}\"),\"application\", JsonData.fromJson(\"\\\"my-application\\\"\")))\n .name(\"my-api-key\")\n .roleDescriptors(Map.of(\"role-b\", RoleDescriptor.of(r -> r\n .cluster(\"all\")\n .indices(i -> i\n .names(\"index-b*\")\n .privileges(\"all\")\n )),\"role-a\", RoleDescriptor.of(r -> r\n .cluster(\"all\")\n .indices(i -> i\n .names(\"index-a*\")\n .privileges(\"read\")\n ))))\n);\n" + } + ], + "specification/security/get_privileges/examples/request/SecurityGetPrivilegesRequestExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.security.get_privileges(\n application=\"myapp\",\n name=\"read\",\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.security.getPrivileges({\n application: \"myapp\",\n name: \"read\",\n});" + }, + { + "language": "Ruby", + "code": "response = client.security.get_privileges(\n application: \"myapp\",\n name: \"read\"\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->security()->getPrivileges([\n \"application\" => \"myapp\",\n \"name\" => \"read\",\n]);" + }, + { + "language": "curl", + "code": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_security/privilege/myapp/read\"" + }, + { + "language": "Java", + "code": "client.security().getPrivileges(g -> g\n .application(\"myapp\")\n .name(\"read\")\n);\n" + } + ], + "specification/security/update_cross_cluster_api_key/examples/request/UpdateCrossClusterApiKeyRequestExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.security.update_cross_cluster_api_key(\n id=\"VuaCfGcBCdbkQm-e5aOx\",\n access={\n \"replication\": [\n {\n \"names\": [\n \"archive\"\n ]\n }\n ]\n },\n metadata={\n \"application\": \"replication\"\n },\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.security.updateCrossClusterApiKey({\n id: \"VuaCfGcBCdbkQm-e5aOx\",\n access: {\n replication: [\n {\n names: [\"archive\"],\n },\n ],\n },\n metadata: {\n application: \"replication\",\n },\n});" + }, + { + "language": "Ruby", + "code": "response = client.security.update_cross_cluster_api_key(\n id: \"VuaCfGcBCdbkQm-e5aOx\",\n body: {\n \"access\": {\n \"replication\": [\n {\n \"names\": [\n \"archive\"\n ]\n }\n ]\n },\n \"metadata\": {\n \"application\": \"replication\"\n }\n }\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->security()->updateCrossClusterApiKey([\n \"id\" => \"VuaCfGcBCdbkQm-e5aOx\",\n \"body\" => [\n \"access\" => [\n \"replication\" => array(\n [\n \"names\" => array(\n \"archive\",\n ),\n ],\n ),\n ],\n \"metadata\" => [\n \"application\" => \"replication\",\n ],\n ],\n]);" + }, + { + "language": "curl", + "code": "curl -X PUT -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"access\":{\"replication\":[{\"names\":[\"archive\"]}]},\"metadata\":{\"application\":\"replication\"}}' \"$ELASTICSEARCH_URL/_security/cross_cluster/api_key/VuaCfGcBCdbkQm-e5aOx\"" + }, + { + "language": "Java", + "code": "client.security().updateCrossClusterApiKey(u -> u\n .access(a -> a\n .replication(r -> r\n .names(\"archive\")\n )\n )\n .id(\"VuaCfGcBCdbkQm-e5aOx\")\n .metadata(\"application\", JsonData.fromJson(\"\\\"replication\\\"\"))\n);\n" + } + ], + "specification/security/get_settings/examples/request/SecurityGetSettingsExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.security.get_settings()" + }, + { + "language": "JavaScript", + "code": "const response = await client.security.getSettings();" + }, + { + "language": "Ruby", + "code": "response = client.security.get_settings" + }, + { + "language": "PHP", + "code": "$resp = $client->security()->getSettings();" + }, + { + "language": "curl", + "code": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_security/settings\"" + }, + { + "language": "Java", + "code": "client.security().getSettings(g -> g);\n" + } + ], + "specification/security/get_builtin_privileges/examples/request/SecurityGetBuiltinPrivilegesRequestExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.security.get_builtin_privileges()" + }, + { + "language": "JavaScript", + "code": "const response = await client.security.getBuiltinPrivileges();" + }, + { + "language": "Ruby", + "code": "response = client.security.get_builtin_privileges" + }, + { + "language": "PHP", + "code": "$resp = $client->security()->getBuiltinPrivileges();" + }, + { + "language": "curl", + "code": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_security/privilege/_builtin\"" + }, + { + "language": "Java", + "code": "client.security().getBuiltinPrivileges();\n" + } + ], + "specification/security/has_privileges_user_profile/examples/request/HasPrivilegesUserProfileRequestExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.security.has_privileges_user_profile(\n uids=[\n \"u_LQPnxDxEjIH0GOUoFkZr5Y57YUwSkL9Joiq-g4OCbPc_0\",\n \"u_rzRnxDgEHIH0GOUoFkZr5Y27YUwSk19Joiq=g4OCxxB_1\",\n \"u_does-not-exist_0\"\n ],\n privileges={\n \"cluster\": [\n \"monitor\",\n \"create_snapshot\",\n \"manage_ml\"\n ],\n \"index\": [\n {\n \"names\": [\n \"suppliers\",\n \"products\"\n ],\n \"privileges\": [\n \"create_doc\"\n ]\n },\n {\n \"names\": [\n \"inventory\"\n ],\n \"privileges\": [\n \"read\",\n \"write\"\n ]\n }\n ],\n \"application\": [\n {\n \"application\": \"inventory_manager\",\n \"privileges\": [\n \"read\",\n \"data:write/inventory\"\n ],\n \"resources\": [\n \"product/1852563\"\n ]\n }\n ]\n },\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.security.hasPrivilegesUserProfile({\n uids: [\n \"u_LQPnxDxEjIH0GOUoFkZr5Y57YUwSkL9Joiq-g4OCbPc_0\",\n \"u_rzRnxDgEHIH0GOUoFkZr5Y27YUwSk19Joiq=g4OCxxB_1\",\n \"u_does-not-exist_0\",\n ],\n privileges: {\n cluster: [\"monitor\", \"create_snapshot\", \"manage_ml\"],\n index: [\n {\n names: [\"suppliers\", \"products\"],\n privileges: [\"create_doc\"],\n },\n {\n names: [\"inventory\"],\n privileges: [\"read\", \"write\"],\n },\n ],\n application: [\n {\n application: \"inventory_manager\",\n privileges: [\"read\", \"data:write/inventory\"],\n resources: [\"product/1852563\"],\n },\n ],\n },\n});" + }, + { + "language": "Ruby", + "code": "response = client.security.has_privileges_user_profile(\n body: {\n \"uids\": [\n \"u_LQPnxDxEjIH0GOUoFkZr5Y57YUwSkL9Joiq-g4OCbPc_0\",\n \"u_rzRnxDgEHIH0GOUoFkZr5Y27YUwSk19Joiq=g4OCxxB_1\",\n \"u_does-not-exist_0\"\n ],\n \"privileges\": {\n \"cluster\": [\n \"monitor\",\n \"create_snapshot\",\n \"manage_ml\"\n ],\n \"index\": [\n {\n \"names\": [\n \"suppliers\",\n \"products\"\n ],\n \"privileges\": [\n \"create_doc\"\n ]\n },\n {\n \"names\": [\n \"inventory\"\n ],\n \"privileges\": [\n \"read\",\n \"write\"\n ]\n }\n ],\n \"application\": [\n {\n \"application\": \"inventory_manager\",\n \"privileges\": [\n \"read\",\n \"data:write/inventory\"\n ],\n \"resources\": [\n \"product/1852563\"\n ]\n }\n ]\n }\n }\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->security()->hasPrivilegesUserProfile([\n \"body\" => [\n \"uids\" => array(\n \"u_LQPnxDxEjIH0GOUoFkZr5Y57YUwSkL9Joiq-g4OCbPc_0\",\n \"u_rzRnxDgEHIH0GOUoFkZr5Y27YUwSk19Joiq=g4OCxxB_1\",\n \"u_does-not-exist_0\",\n ),\n \"privileges\" => [\n \"cluster\" => array(\n \"monitor\",\n \"create_snapshot\",\n \"manage_ml\",\n ),\n \"index\" => array(\n [\n \"names\" => array(\n \"suppliers\",\n \"products\",\n ),\n \"privileges\" => array(\n \"create_doc\",\n ),\n ],\n [\n \"names\" => array(\n \"inventory\",\n ),\n \"privileges\" => array(\n \"read\",\n \"write\",\n ),\n ],\n ),\n \"application\" => array(\n [\n \"application\" => \"inventory_manager\",\n \"privileges\" => array(\n \"read\",\n \"data:write/inventory\",\n ),\n \"resources\" => array(\n \"product/1852563\",\n ),\n ],\n ),\n ],\n ],\n]);" + }, + { + "language": "curl", + "code": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"uids\":[\"u_LQPnxDxEjIH0GOUoFkZr5Y57YUwSkL9Joiq-g4OCbPc_0\",\"u_rzRnxDgEHIH0GOUoFkZr5Y27YUwSk19Joiq=g4OCxxB_1\",\"u_does-not-exist_0\"],\"privileges\":{\"cluster\":[\"monitor\",\"create_snapshot\",\"manage_ml\"],\"index\":[{\"names\":[\"suppliers\",\"products\"],\"privileges\":[\"create_doc\"]},{\"names\":[\"inventory\"],\"privileges\":[\"read\",\"write\"]}],\"application\":[{\"application\":\"inventory_manager\",\"privileges\":[\"read\",\"data:write/inventory\"],\"resources\":[\"product/1852563\"]}]}}' \"$ELASTICSEARCH_URL/_security/profile/_has_privileges\"" + }, + { + "language": "Java", + "code": "client.security().hasPrivilegesUserProfile(h -> h\n .privileges(p -> p\n .application(a -> a\n .application(\"inventory_manager\")\n .privileges(List.of(\"read\",\"data:write/inventory\"))\n .resources(\"product/1852563\")\n )\n .cluster(List.of(\"monitor\",\"create_snapshot\",\"manage_ml\"))\n .index(List.of(IndexPrivilegesCheck.of(i -> i\n .names(List.of(\"suppliers\",\"products\"))\n .privileges(\"create_doc\")),IndexPrivilegesCheck.of(i -> i\n .names(\"inventory\")\n .privileges(List.of(\"read\",\"write\")))))\n )\n .uids(List.of(\"u_LQPnxDxEjIH0GOUoFkZr5Y57YUwSkL9Joiq-g4OCbPc_0\",\"u_rzRnxDgEHIH0GOUoFkZr5Y27YUwSk19Joiq=g4OCxxB_1\",\"u_does-not-exist_0\"))\n);\n" + } + ], + "specification/security/clear_cached_roles/examples/request/SecurityClearCachedRolesExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.security.clear_cached_roles(\n name=\"my_admin_role\",\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.security.clearCachedRoles({\n name: \"my_admin_role\",\n});" + }, + { + "language": "Ruby", + "code": "response = client.security.clear_cached_roles(\n name: \"my_admin_role\"\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->security()->clearCachedRoles([\n \"name\" => \"my_admin_role\",\n]);" + }, + { + "language": "curl", + "code": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_security/role/my_admin_role/_clear_cache\"" + }, + { + "language": "Java", + "code": "client.security().clearCachedRoles(c -> c\n .name(\"my_admin_role\")\n);\n" + } + ], + "specification/security/authenticate/examples/request/SecurityAuthenticateRequestExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.security.authenticate()" + }, + { + "language": "JavaScript", + "code": "const response = await client.security.authenticate();" + }, + { + "language": "Ruby", + "code": "response = client.security.authenticate" + }, + { + "language": "PHP", + "code": "$resp = $client->security()->authenticate();" + }, + { + "language": "curl", + "code": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_security/_authenticate\"" + }, + { + "language": "Java", + "code": "client.security().authenticate();\n" + } + ], + "specification/security/activate_user_profile/examples/request/ActivateUserProfileRequestExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.security.activate_user_profile(\n grant_type=\"password\",\n username=\"jacknich\",\n password=\"l0ng-r4nd0m-p@ssw0rd\",\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.security.activateUserProfile({\n grant_type: \"password\",\n username: \"jacknich\",\n password: \"l0ng-r4nd0m-p@ssw0rd\",\n});" + }, + { + "language": "Ruby", + "code": "response = client.security.activate_user_profile(\n body: {\n \"grant_type\": \"password\",\n \"username\": \"jacknich\",\n \"password\": \"l0ng-r4nd0m-p@ssw0rd\"\n }\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->security()->activateUserProfile([\n \"body\" => [\n \"grant_type\" => \"password\",\n \"username\" => \"jacknich\",\n \"password\" => \"l0ng-r4nd0m-p@ssw0rd\",\n ],\n]);" + }, + { + "language": "curl", + "code": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"grant_type\":\"password\",\"username\":\"jacknich\",\"password\":\"l0ng-r4nd0m-p@ssw0rd\"}' \"$ELASTICSEARCH_URL/_security/profile/_activate\"" + }, + { + "language": "Java", + "code": "client.security().activateUserProfile(a -> a\n .grantType(GrantType.Password)\n .password(\"l0ng-r4nd0m-p@ssw0rd\")\n .username(\"jacknich\")\n);\n" + } + ], + "specification/security/oidc_prepare_authentication/examples/request/OidcPrepareAuthenticationRequestExample2.yaml": [ + { + "language": "Python", + "code": "resp = client.security.oidc_prepare_authentication(\n realm=\"oidc1\",\n state=\"lGYK0EcSLjqH6pkT5EVZjC6eIW5YCGgywj2sxROO\",\n nonce=\"zOBXLJGUooRrbLbQk5YCcyC8AXw3iloynvluYhZ5\",\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.security.oidcPrepareAuthentication({\n realm: \"oidc1\",\n state: \"lGYK0EcSLjqH6pkT5EVZjC6eIW5YCGgywj2sxROO\",\n nonce: \"zOBXLJGUooRrbLbQk5YCcyC8AXw3iloynvluYhZ5\",\n});" + }, + { + "language": "Ruby", + "code": "response = client.security.oidc_prepare_authentication(\n body: {\n \"realm\": \"oidc1\",\n \"state\": \"lGYK0EcSLjqH6pkT5EVZjC6eIW5YCGgywj2sxROO\",\n \"nonce\": \"zOBXLJGUooRrbLbQk5YCcyC8AXw3iloynvluYhZ5\"\n }\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->security()->oidcPrepareAuthentication([\n \"body\" => [\n \"realm\" => \"oidc1\",\n \"state\" => \"lGYK0EcSLjqH6pkT5EVZjC6eIW5YCGgywj2sxROO\",\n \"nonce\" => \"zOBXLJGUooRrbLbQk5YCcyC8AXw3iloynvluYhZ5\",\n ],\n]);" + }, + { + "language": "curl", + "code": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"realm\":\"oidc1\",\"state\":\"lGYK0EcSLjqH6pkT5EVZjC6eIW5YCGgywj2sxROO\",\"nonce\":\"zOBXLJGUooRrbLbQk5YCcyC8AXw3iloynvluYhZ5\"}' \"$ELASTICSEARCH_URL/_security/oidc/prepare\"" + }, + { + "language": "Java", + "code": "client.security().oidcPrepareAuthentication(o -> o\n .nonce(\"zOBXLJGUooRrbLbQk5YCcyC8AXw3iloynvluYhZ5\")\n .realm(\"oidc1\")\n .state(\"lGYK0EcSLjqH6pkT5EVZjC6eIW5YCGgywj2sxROO\")\n);\n" + } + ], + "specification/security/oidc_prepare_authentication/examples/request/OidcPrepareAuthenticationRequestExample3.yaml": [ + { + "language": "Python", + "code": "resp = client.security.oidc_prepare_authentication(\n iss=\"http://127.0.0.1:8080\",\n login_hint=\"this_is_an_opaque_string\",\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.security.oidcPrepareAuthentication({\n iss: \"http://127.0.0.1:8080\",\n login_hint: \"this_is_an_opaque_string\",\n});" + }, + { + "language": "Ruby", + "code": "response = client.security.oidc_prepare_authentication(\n body: {\n \"iss\": \"http://127.0.0.1:8080\",\n \"login_hint\": \"this_is_an_opaque_string\"\n }\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->security()->oidcPrepareAuthentication([\n \"body\" => [\n \"iss\" => \"http://127.0.0.1:8080\",\n \"login_hint\" => \"this_is_an_opaque_string\",\n ],\n]);" + }, + { + "language": "curl", + "code": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"iss\":\"http://127.0.0.1:8080\",\"login_hint\":\"this_is_an_opaque_string\"}' \"$ELASTICSEARCH_URL/_security/oidc/prepare\"" + }, + { + "language": "Java", + "code": "client.security().oidcPrepareAuthentication(o -> o\n .iss(\"http://127.0.0.1:8080\")\n .loginHint(\"this_is_an_opaque_string\")\n);\n" + } + ], + "specification/security/oidc_prepare_authentication/examples/request/OidcPrepareAuthenticationRequestExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.security.oidc_prepare_authentication(\n realm=\"oidc1\",\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.security.oidcPrepareAuthentication({\n realm: \"oidc1\",\n});" + }, + { + "language": "Ruby", + "code": "response = client.security.oidc_prepare_authentication(\n body: {\n \"realm\": \"oidc1\"\n }\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->security()->oidcPrepareAuthentication([\n \"body\" => [\n \"realm\" => \"oidc1\",\n ],\n]);" + }, + { + "language": "curl", + "code": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"realm\":\"oidc1\"}' \"$ELASTICSEARCH_URL/_security/oidc/prepare\"" + }, + { + "language": "Java", + "code": "client.security().oidcPrepareAuthentication(o -> o\n .realm(\"oidc1\")\n);\n" + } + ], + "specification/security/has_privileges/examples/request/SecurityHasPrivilegesRequestExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.security.has_privileges(\n cluster=[\n \"monitor\",\n \"manage\"\n ],\n index=[\n {\n \"names\": [\n \"suppliers\",\n \"products\"\n ],\n \"privileges\": [\n \"read\"\n ]\n },\n {\n \"names\": [\n \"inventory\"\n ],\n \"privileges\": [\n \"read\",\n \"write\"\n ]\n }\n ],\n application=[\n {\n \"application\": \"inventory_manager\",\n \"privileges\": [\n \"read\",\n \"data:write/inventory\"\n ],\n \"resources\": [\n \"product/1852563\"\n ]\n }\n ],\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.security.hasPrivileges({\n cluster: [\"monitor\", \"manage\"],\n index: [\n {\n names: [\"suppliers\", \"products\"],\n privileges: [\"read\"],\n },\n {\n names: [\"inventory\"],\n privileges: [\"read\", \"write\"],\n },\n ],\n application: [\n {\n application: \"inventory_manager\",\n privileges: [\"read\", \"data:write/inventory\"],\n resources: [\"product/1852563\"],\n },\n ],\n});" + }, + { + "language": "Ruby", + "code": "response = client.security.has_privileges(\n body: {\n \"cluster\": [\n \"monitor\",\n \"manage\"\n ],\n \"index\": [\n {\n \"names\": [\n \"suppliers\",\n \"products\"\n ],\n \"privileges\": [\n \"read\"\n ]\n },\n {\n \"names\": [\n \"inventory\"\n ],\n \"privileges\": [\n \"read\",\n \"write\"\n ]\n }\n ],\n \"application\": [\n {\n \"application\": \"inventory_manager\",\n \"privileges\": [\n \"read\",\n \"data:write/inventory\"\n ],\n \"resources\": [\n \"product/1852563\"\n ]\n }\n ]\n }\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->security()->hasPrivileges([\n \"body\" => [\n \"cluster\" => array(\n \"monitor\",\n \"manage\",\n ),\n \"index\" => array(\n [\n \"names\" => array(\n \"suppliers\",\n \"products\",\n ),\n \"privileges\" => array(\n \"read\",\n ),\n ],\n [\n \"names\" => array(\n \"inventory\",\n ),\n \"privileges\" => array(\n \"read\",\n \"write\",\n ),\n ],\n ),\n \"application\" => array(\n [\n \"application\" => \"inventory_manager\",\n \"privileges\" => array(\n \"read\",\n \"data:write/inventory\",\n ),\n \"resources\" => array(\n \"product/1852563\",\n ),\n ],\n ),\n ],\n]);" + }, + { + "language": "curl", + "code": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"cluster\":[\"monitor\",\"manage\"],\"index\":[{\"names\":[\"suppliers\",\"products\"],\"privileges\":[\"read\"]},{\"names\":[\"inventory\"],\"privileges\":[\"read\",\"write\"]}],\"application\":[{\"application\":\"inventory_manager\",\"privileges\":[\"read\",\"data:write/inventory\"],\"resources\":[\"product/1852563\"]}]}' \"$ELASTICSEARCH_URL/_security/user/_has_privileges\"" + }, + { + "language": "Java", + "code": "client.security().hasPrivileges(h -> h\n .application(a -> a\n .application(\"inventory_manager\")\n .privileges(List.of(\"read\",\"data:write/inventory\"))\n .resources(\"product/1852563\")\n )\n .cluster(List.of(\"monitor\",\"manage\"))\n .index(List.of(IndexPrivilegesCheck.of(i -> i\n .names(List.of(\"suppliers\",\"products\"))\n .privileges(\"read\")),IndexPrivilegesCheck.of(i -> i\n .names(\"inventory\")\n .privileges(List.of(\"read\",\"write\")))))\n);\n" + } + ], + "specification/security/oidc_logout/examples/request/OidcLogoutRequestExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.security.oidc_logout(\n token=\"dGhpcyBpcyBub3QgYSByZWFsIHRva2VuIGJ1dCBpdCBpcyBvbmx5IHRlc3QgZGF0YS4gZG8gbm90IHRyeSB0byByZWFkIHRva2VuIQ==\",\n refresh_token=\"vLBPvmAB6KvwvJZr27cS\",\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.security.oidcLogout({\n token:\n \"dGhpcyBpcyBub3QgYSByZWFsIHRva2VuIGJ1dCBpdCBpcyBvbmx5IHRlc3QgZGF0YS4gZG8gbm90IHRyeSB0byByZWFkIHRva2VuIQ==\",\n refresh_token: \"vLBPvmAB6KvwvJZr27cS\",\n});" + }, + { + "language": "Ruby", + "code": "response = client.security.oidc_logout(\n body: {\n \"token\": \"dGhpcyBpcyBub3QgYSByZWFsIHRva2VuIGJ1dCBpdCBpcyBvbmx5IHRlc3QgZGF0YS4gZG8gbm90IHRyeSB0byByZWFkIHRva2VuIQ==\",\n \"refresh_token\": \"vLBPvmAB6KvwvJZr27cS\"\n }\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->security()->oidcLogout([\n \"body\" => [\n \"token\" => \"dGhpcyBpcyBub3QgYSByZWFsIHRva2VuIGJ1dCBpdCBpcyBvbmx5IHRlc3QgZGF0YS4gZG8gbm90IHRyeSB0byByZWFkIHRva2VuIQ==\",\n \"refresh_token\" => \"vLBPvmAB6KvwvJZr27cS\",\n ],\n]);" + }, + { + "language": "curl", + "code": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"token\":\"dGhpcyBpcyBub3QgYSByZWFsIHRva2VuIGJ1dCBpdCBpcyBvbmx5IHRlc3QgZGF0YS4gZG8gbm90IHRyeSB0byByZWFkIHRva2VuIQ==\",\"refresh_token\":\"vLBPvmAB6KvwvJZr27cS\"}' \"$ELASTICSEARCH_URL/_security/oidc/logout\"" + }, + { + "language": "Java", + "code": "client.security().oidcLogout(o -> o\n .refreshToken(\"vLBPvmAB6KvwvJZr27cS\")\n .token(\"dGhpcyBpcyBub3QgYSByZWFsIHRva2VuIGJ1dCBpdCBpcyBvbmx5IHRlc3QgZGF0YS4gZG8gbm90IHRyeSB0byByZWFkIHRva2VuIQ==\")\n);\n" + } + ], + "specification/security/invalidate_api_key/examples/request/SecurityInvalidateApiKeyRequestExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.security.invalidate_api_key(\n ids=[\n \"VuaCfGcBCdbkQm-e5aOx\"\n ],\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.security.invalidateApiKey({\n ids: [\"VuaCfGcBCdbkQm-e5aOx\"],\n});" + }, + { + "language": "Ruby", + "code": "response = client.security.invalidate_api_key(\n body: {\n \"ids\": [\n \"VuaCfGcBCdbkQm-e5aOx\"\n ]\n }\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->security()->invalidateApiKey([\n \"body\" => [\n \"ids\" => array(\n \"VuaCfGcBCdbkQm-e5aOx\",\n ),\n ],\n]);" + }, + { + "language": "curl", + "code": "curl -X DELETE -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"ids\":[\"VuaCfGcBCdbkQm-e5aOx\"]}' \"$ELASTICSEARCH_URL/_security/api_key\"" + }, + { + "language": "Java", + "code": "client.security().invalidateApiKey(i -> i\n .ids(\"VuaCfGcBCdbkQm-e5aOx\")\n);\n" + } + ], + "specification/security/invalidate_api_key/examples/request/SecurityInvalidateApiKeyRequestExample6.yaml": [ + { + "language": "Python", + "code": "resp = client.security.invalidate_api_key(\n username=\"myuser\",\n realm_name=\"native1\",\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.security.invalidateApiKey({\n username: \"myuser\",\n realm_name: \"native1\",\n});" + }, + { + "language": "Ruby", + "code": "response = client.security.invalidate_api_key(\n body: {\n \"username\": \"myuser\",\n \"realm_name\": \"native1\"\n }\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->security()->invalidateApiKey([\n \"body\" => [\n \"username\" => \"myuser\",\n \"realm_name\" => \"native1\",\n ],\n]);" + }, + { + "language": "curl", + "code": "curl -X DELETE -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"username\":\"myuser\",\"realm_name\":\"native1\"}' \"$ELASTICSEARCH_URL/_security/api_key\"" + }, + { + "language": "Java", + "code": "client.security().invalidateApiKey(i -> i\n .realmName(\"native1\")\n .username(\"myuser\")\n);\n" + } + ], + "specification/security/invalidate_api_key/examples/request/SecurityInvalidateApiKeyRequestExample5.yaml": [ + { + "language": "Python", + "code": "resp = client.security.invalidate_api_key(\n ids=[\n \"VuaCfGcBCdbkQm-e5aOx\"\n ],\n owner=True,\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.security.invalidateApiKey({\n ids: [\"VuaCfGcBCdbkQm-e5aOx\"],\n owner: \"true\",\n});" + }, + { + "language": "Ruby", + "code": "response = client.security.invalidate_api_key(\n body: {\n \"ids\": [\n \"VuaCfGcBCdbkQm-e5aOx\"\n ],\n \"owner\": \"true\"\n }\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->security()->invalidateApiKey([\n \"body\" => [\n \"ids\" => array(\n \"VuaCfGcBCdbkQm-e5aOx\",\n ),\n \"owner\" => \"true\",\n ],\n]);" + }, + { + "language": "curl", + "code": "curl -X DELETE -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"ids\":[\"VuaCfGcBCdbkQm-e5aOx\"],\"owner\":\"true\"}' \"$ELASTICSEARCH_URL/_security/api_key\"" + }, + { + "language": "Java", + "code": "client.security().invalidateApiKey(i -> i\n .ids(\"VuaCfGcBCdbkQm-e5aOx\")\n .owner(true)\n);\n" + } + ], + "specification/security/invalidate_api_key/examples/request/SecurityInvalidateApiKeyRequestExample4.yaml": [ + { + "language": "Python", + "code": "resp = client.security.invalidate_api_key(\n username=\"myuser\",\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.security.invalidateApiKey({\n username: \"myuser\",\n});" + }, + { + "language": "Ruby", + "code": "response = client.security.invalidate_api_key(\n body: {\n \"username\": \"myuser\"\n }\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->security()->invalidateApiKey([\n \"body\" => [\n \"username\" => \"myuser\",\n ],\n]);" + }, + { + "language": "curl", + "code": "curl -X DELETE -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"username\":\"myuser\"}' \"$ELASTICSEARCH_URL/_security/api_key\"" + }, + { + "language": "Java", + "code": "client.security().invalidateApiKey(i -> i\n .username(\"myuser\")\n);\n" + } + ], + "specification/security/invalidate_api_key/examples/request/SecurityInvalidateApiKeyRequestExample3.yaml": [ + { + "language": "Python", + "code": "resp = client.security.invalidate_api_key(\n realm_name=\"native1\",\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.security.invalidateApiKey({\n realm_name: \"native1\",\n});" + }, + { + "language": "Ruby", + "code": "response = client.security.invalidate_api_key(\n body: {\n \"realm_name\": \"native1\"\n }\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->security()->invalidateApiKey([\n \"body\" => [\n \"realm_name\" => \"native1\",\n ],\n]);" + }, + { + "language": "curl", + "code": "curl -X DELETE -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"realm_name\":\"native1\"}' \"$ELASTICSEARCH_URL/_security/api_key\"" + }, + { + "language": "Java", + "code": "client.security().invalidateApiKey(i -> i\n .realmName(\"native1\")\n);\n" + } + ], + "specification/security/invalidate_api_key/examples/request/SecurityInvalidateApiKeyRequestExample2.yaml": [ + { + "language": "Python", + "code": "resp = client.security.invalidate_api_key(\n name=\"my-api-key\",\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.security.invalidateApiKey({\n name: \"my-api-key\",\n});" + }, + { + "language": "Ruby", + "code": "response = client.security.invalidate_api_key(\n body: {\n \"name\": \"my-api-key\"\n }\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->security()->invalidateApiKey([\n \"body\" => [\n \"name\" => \"my-api-key\",\n ],\n]);" + }, + { + "language": "curl", + "code": "curl -X DELETE -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"name\":\"my-api-key\"}' \"$ELASTICSEARCH_URL/_security/api_key\"" + }, + { + "language": "Java", + "code": "client.security().invalidateApiKey(i -> i\n .name(\"my-api-key\")\n);\n" + } + ], + "specification/security/bulk_update_api_keys/examples/request/SecurityBulkUpdateApiKeysRequestExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.security.bulk_update_api_keys(\n ids=[\n \"VuaCfGcBCdbkQm-e5aOx\",\n \"H3_AhoIBA9hmeQJdg7ij\"\n ],\n role_descriptors={\n \"role-a\": {\n \"indices\": [\n {\n \"names\": [\n \"*\"\n ],\n \"privileges\": [\n \"write\"\n ]\n }\n ]\n }\n },\n metadata={\n \"environment\": {\n \"level\": 2,\n \"trusted\": True,\n \"tags\": [\n \"production\"\n ]\n }\n },\n expiration=\"30d\",\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.security.bulkUpdateApiKeys({\n ids: [\"VuaCfGcBCdbkQm-e5aOx\", \"H3_AhoIBA9hmeQJdg7ij\"],\n role_descriptors: {\n \"role-a\": {\n indices: [\n {\n names: [\"*\"],\n privileges: [\"write\"],\n },\n ],\n },\n },\n metadata: {\n environment: {\n level: 2,\n trusted: true,\n tags: [\"production\"],\n },\n },\n expiration: \"30d\",\n});" + }, + { + "language": "Ruby", + "code": "response = client.security.bulk_update_api_keys(\n body: {\n \"ids\": [\n \"VuaCfGcBCdbkQm-e5aOx\",\n \"H3_AhoIBA9hmeQJdg7ij\"\n ],\n \"role_descriptors\": {\n \"role-a\": {\n \"indices\": [\n {\n \"names\": [\n \"*\"\n ],\n \"privileges\": [\n \"write\"\n ]\n }\n ]\n }\n },\n \"metadata\": {\n \"environment\": {\n \"level\": 2,\n \"trusted\": true,\n \"tags\": [\n \"production\"\n ]\n }\n },\n \"expiration\": \"30d\"\n }\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->security()->bulkUpdateApiKeys([\n \"body\" => [\n \"ids\" => array(\n \"VuaCfGcBCdbkQm-e5aOx\",\n \"H3_AhoIBA9hmeQJdg7ij\",\n ),\n \"role_descriptors\" => [\n \"role-a\" => [\n \"indices\" => array(\n [\n \"names\" => array(\n \"*\",\n ),\n \"privileges\" => array(\n \"write\",\n ),\n ],\n ),\n ],\n ],\n \"metadata\" => [\n \"environment\" => [\n \"level\" => 2,\n \"trusted\" => true,\n \"tags\" => array(\n \"production\",\n ),\n ],\n ],\n \"expiration\" => \"30d\",\n ],\n]);" + }, + { + "language": "curl", + "code": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"ids\":[\"VuaCfGcBCdbkQm-e5aOx\",\"H3_AhoIBA9hmeQJdg7ij\"],\"role_descriptors\":{\"role-a\":{\"indices\":[{\"names\":[\"*\"],\"privileges\":[\"write\"]}]}},\"metadata\":{\"environment\":{\"level\":2,\"trusted\":true,\"tags\":[\"production\"]}},\"expiration\":\"30d\"}' \"$ELASTICSEARCH_URL/_security/api_key/_bulk_update\"" + }, + { + "language": "Java", + "code": "client.security().bulkUpdateApiKeys(b -> b\n .expiration(e -> e\n .time(\"30d\")\n )\n .ids(List.of(\"VuaCfGcBCdbkQm-e5aOx\",\"H3_AhoIBA9hmeQJdg7ij\"))\n .metadata(\"environment\", JsonData.fromJson(\"{\\\"level\\\":2,\\\"trusted\\\":true,\\\"tags\\\":[\\\"production\\\"]}\"))\n .roleDescriptors(\"role-a\", r -> r\n .indices(i -> i\n .names(\"*\")\n .privileges(\"write\")\n )\n )\n);\n" + } + ], + "specification/security/bulk_update_api_keys/examples/request/SecurityBulkUpdateApiKeysRequestExample2.yaml": [ + { + "language": "Python", + "code": "resp = client.security.bulk_update_api_keys(\n ids=[\n \"VuaCfGcBCdbkQm-e5aOx\",\n \"H3_AhoIBA9hmeQJdg7ij\"\n ],\n role_descriptors={},\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.security.bulkUpdateApiKeys({\n ids: [\"VuaCfGcBCdbkQm-e5aOx\", \"H3_AhoIBA9hmeQJdg7ij\"],\n role_descriptors: {},\n});" + }, + { + "language": "Ruby", + "code": "response = client.security.bulk_update_api_keys(\n body: {\n \"ids\": [\n \"VuaCfGcBCdbkQm-e5aOx\",\n \"H3_AhoIBA9hmeQJdg7ij\"\n ],\n \"role_descriptors\": {}\n }\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->security()->bulkUpdateApiKeys([\n \"body\" => [\n \"ids\" => array(\n \"VuaCfGcBCdbkQm-e5aOx\",\n \"H3_AhoIBA9hmeQJdg7ij\",\n ),\n \"role_descriptors\" => new ArrayObject([]),\n ],\n]);" + }, + { + "language": "curl", + "code": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"ids\":[\"VuaCfGcBCdbkQm-e5aOx\",\"H3_AhoIBA9hmeQJdg7ij\"],\"role_descriptors\":{}}' \"$ELASTICSEARCH_URL/_security/api_key/_bulk_update\"" + }, + { + "language": "Java", + "code": "client.security().bulkUpdateApiKeys(b -> b\n .ids(List.of(\"VuaCfGcBCdbkQm-e5aOx\",\"H3_AhoIBA9hmeQJdg7ij\"))\n);\n" + } + ], + "specification/security/suggest_user_profiles/examples/request/SuggestUserProfilesRequestExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.security.suggest_user_profiles(\n name=\"jack\",\n hint={\n \"uids\": [\n \"u_8RKO7AKfEbSiIHZkZZ2LJy2MUSDPWDr3tMI_CkIGApU_0\",\n \"u_79HkWkwmnBH5gqFKwoxggWPjEBOur1zLPXQPEl1VBW0_0\"\n ],\n \"labels\": {\n \"direction\": [\n \"north\",\n \"east\"\n ]\n }\n },\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.security.suggestUserProfiles({\n name: \"jack\",\n hint: {\n uids: [\n \"u_8RKO7AKfEbSiIHZkZZ2LJy2MUSDPWDr3tMI_CkIGApU_0\",\n \"u_79HkWkwmnBH5gqFKwoxggWPjEBOur1zLPXQPEl1VBW0_0\",\n ],\n labels: {\n direction: [\"north\", \"east\"],\n },\n },\n});" + }, + { + "language": "Ruby", + "code": "response = client.security.suggest_user_profiles(\n body: {\n \"name\": \"jack\",\n \"hint\": {\n \"uids\": [\n \"u_8RKO7AKfEbSiIHZkZZ2LJy2MUSDPWDr3tMI_CkIGApU_0\",\n \"u_79HkWkwmnBH5gqFKwoxggWPjEBOur1zLPXQPEl1VBW0_0\"\n ],\n \"labels\": {\n \"direction\": [\n \"north\",\n \"east\"\n ]\n }\n }\n }\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->security()->suggestUserProfiles([\n \"body\" => [\n \"name\" => \"jack\",\n \"hint\" => [\n \"uids\" => array(\n \"u_8RKO7AKfEbSiIHZkZZ2LJy2MUSDPWDr3tMI_CkIGApU_0\",\n \"u_79HkWkwmnBH5gqFKwoxggWPjEBOur1zLPXQPEl1VBW0_0\",\n ),\n \"labels\" => [\n \"direction\" => array(\n \"north\",\n \"east\",\n ),\n ],\n ],\n ],\n]);" + }, + { + "language": "curl", + "code": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"name\":\"jack\",\"hint\":{\"uids\":[\"u_8RKO7AKfEbSiIHZkZZ2LJy2MUSDPWDr3tMI_CkIGApU_0\",\"u_79HkWkwmnBH5gqFKwoxggWPjEBOur1zLPXQPEl1VBW0_0\"],\"labels\":{\"direction\":[\"north\",\"east\"]}}}' \"$ELASTICSEARCH_URL/_security/profile/_suggest\"" + }, + { + "language": "Java", + "code": "client.security().suggestUserProfiles(s -> s\n .hint(h -> h\n .uids(List.of(\"u_8RKO7AKfEbSiIHZkZZ2LJy2MUSDPWDr3tMI_CkIGApU_0\",\"u_79HkWkwmnBH5gqFKwoxggWPjEBOur1zLPXQPEl1VBW0_0\"))\n .labels(\"direction\", List.of(\"north\",\"east\"))\n )\n .name(\"jack\")\n);\n" + } + ], + "specification/security/query_api_keys/examples/request/QueryApiKeysRequestExample3.yaml": [ + { + "language": "Python", + "code": "resp = client.security.query_api_keys(\n query={\n \"term\": {\n \"name\": {\n \"value\": \"application-key-1\"\n }\n }\n },\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.security.queryApiKeys({\n query: {\n term: {\n name: {\n value: \"application-key-1\",\n },\n },\n },\n});" + }, + { + "language": "Ruby", + "code": "response = client.security.query_api_keys(\n body: {\n \"query\": {\n \"term\": {\n \"name\": {\n \"value\": \"application-key-1\"\n }\n }\n }\n }\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->security()->queryApiKeys([\n \"body\" => [\n \"query\" => [\n \"term\" => [\n \"name\" => [\n \"value\" => \"application-key-1\",\n ],\n ],\n ],\n ],\n]);" + }, + { + "language": "curl", + "code": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"query\":{\"term\":{\"name\":{\"value\":\"application-key-1\"}}}}' \"$ELASTICSEARCH_URL/_security/_query/api_key\"" + }, + { + "language": "Java", + "code": "client.security().queryApiKeys(q -> q\n .query(qu -> qu\n .term(t -> t\n .field(\"name\")\n .value(FieldValue.of(\"application-key-1\"))\n )\n )\n);\n" + } + ], + "specification/security/query_api_keys/examples/request/QueryApiKeysRequestExample2.yaml": [ + { + "language": "Python", + "code": "resp = client.security.query_api_keys(\n query={\n \"bool\": {\n \"must\": [\n {\n \"prefix\": {\n \"name\": \"app1-key-\"\n }\n },\n {\n \"term\": {\n \"invalidated\": \"false\"\n }\n }\n ],\n \"must_not\": [\n {\n \"term\": {\n \"name\": \"app1-key-01\"\n }\n }\n ],\n \"filter\": [\n {\n \"wildcard\": {\n \"username\": \"org-*-user\"\n }\n },\n {\n \"term\": {\n \"metadata.environment\": \"production\"\n }\n }\n ]\n }\n },\n from=20,\n size=10,\n sort=[\n {\n \"creation\": {\n \"order\": \"desc\",\n \"format\": \"date_time\"\n }\n },\n \"name\"\n ],\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.security.queryApiKeys({\n query: {\n bool: {\n must: [\n {\n prefix: {\n name: \"app1-key-\",\n },\n },\n {\n term: {\n invalidated: \"false\",\n },\n },\n ],\n must_not: [\n {\n term: {\n name: \"app1-key-01\",\n },\n },\n ],\n filter: [\n {\n wildcard: {\n username: \"org-*-user\",\n },\n },\n {\n term: {\n \"metadata.environment\": \"production\",\n },\n },\n ],\n },\n },\n from: 20,\n size: 10,\n sort: [\n {\n creation: {\n order: \"desc\",\n format: \"date_time\",\n },\n },\n \"name\",\n ],\n});" + }, + { + "language": "Ruby", + "code": "response = client.security.query_api_keys(\n body: {\n \"query\": {\n \"bool\": {\n \"must\": [\n {\n \"prefix\": {\n \"name\": \"app1-key-\"\n }\n },\n {\n \"term\": {\n \"invalidated\": \"false\"\n }\n }\n ],\n \"must_not\": [\n {\n \"term\": {\n \"name\": \"app1-key-01\"\n }\n }\n ],\n \"filter\": [\n {\n \"wildcard\": {\n \"username\": \"org-*-user\"\n }\n },\n {\n \"term\": {\n \"metadata.environment\": \"production\"\n }\n }\n ]\n }\n },\n \"from\": 20,\n \"size\": 10,\n \"sort\": [\n {\n \"creation\": {\n \"order\": \"desc\",\n \"format\": \"date_time\"\n }\n },\n \"name\"\n ]\n }\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->security()->queryApiKeys([\n \"body\" => [\n \"query\" => [\n \"bool\" => [\n \"must\" => array(\n [\n \"prefix\" => [\n \"name\" => \"app1-key-\",\n ],\n ],\n [\n \"term\" => [\n \"invalidated\" => \"false\",\n ],\n ],\n ),\n \"must_not\" => array(\n [\n \"term\" => [\n \"name\" => \"app1-key-01\",\n ],\n ],\n ),\n \"filter\" => array(\n [\n \"wildcard\" => [\n \"username\" => \"org-*-user\",\n ],\n ],\n [\n \"term\" => [\n \"metadata.environment\" => \"production\",\n ],\n ],\n ),\n ],\n ],\n \"from\" => 20,\n \"size\" => 10,\n \"sort\" => array(\n [\n \"creation\" => [\n \"order\" => \"desc\",\n \"format\" => \"date_time\",\n ],\n ],\n \"name\",\n ),\n ],\n]);" + }, + { + "language": "curl", + "code": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"query\":{\"bool\":{\"must\":[{\"prefix\":{\"name\":\"app1-key-\"}},{\"term\":{\"invalidated\":\"false\"}}],\"must_not\":[{\"term\":{\"name\":\"app1-key-01\"}}],\"filter\":[{\"wildcard\":{\"username\":\"org-*-user\"}},{\"term\":{\"metadata.environment\":\"production\"}}]}},\"from\":20,\"size\":10,\"sort\":[{\"creation\":{\"order\":\"desc\",\"format\":\"date_time\"}},\"name\"]}' \"$ELASTICSEARCH_URL/_security/_query/api_key\"" + }, + { + "language": "Java", + "code": "client.security().queryApiKeys(q -> q\n .from(20)\n .query(qu -> qu\n .bool(b -> b\n .filter(List.of(Query.of(que -> que\n .wildcard(w -> w\n .field(\"username\")\n .value(\"org-*-user\")\n )),Query.of(quer -> quer\n .term(t -> t\n .field(\"metadata.environment\")\n .value(FieldValue.of(\"production\"))\n ))))\n .must(List.of(Query.of(query -> query\n .prefix(p -> p\n .field(\"name\")\n .value(\"app1-key-\")\n )),Query.of(query1 -> query1\n .term(t -> t\n .field(\"invalidated\")\n .value(FieldValue.of(\"false\"))\n ))))\n .mustNot(m -> m\n .term(t -> t\n .field(\"name\")\n .value(FieldValue.of(\"app1-key-01\"))\n )\n )\n )\n )\n .size(10)\n .sort(List.of(SortOptions.of(s -> s\n .field(f -> f\n .field(\"creation\")\n .order(SortOrder.Desc)\n .format(\"date_time\")\n )),SortOptions.of(so -> so\n .field(f -> f\n .field(\"name\")\n ))))\n);\n" + } + ], + "specification/security/query_api_keys/examples/request/QueryApiKeysRequestExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.security.query_api_keys(\n with_limited_by=True,\n query={\n \"ids\": {\n \"values\": [\n \"VuaCfGcBCdbkQm-e5aOx\"\n ]\n }\n },\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.security.queryApiKeys({\n with_limited_by: \"true\",\n query: {\n ids: {\n values: [\"VuaCfGcBCdbkQm-e5aOx\"],\n },\n },\n});" + }, + { + "language": "Ruby", + "code": "response = client.security.query_api_keys(\n with_limited_by: \"true\",\n body: {\n \"query\": {\n \"ids\": {\n \"values\": [\n \"VuaCfGcBCdbkQm-e5aOx\"\n ]\n }\n }\n }\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->security()->queryApiKeys([\n \"with_limited_by\" => \"true\",\n \"body\" => [\n \"query\" => [\n \"ids\" => [\n \"values\" => array(\n \"VuaCfGcBCdbkQm-e5aOx\",\n ),\n ],\n ],\n ],\n]);" + }, + { + "language": "curl", + "code": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"query\":{\"ids\":{\"values\":[\"VuaCfGcBCdbkQm-e5aOx\"]}}}' \"$ELASTICSEARCH_URL/_security/_query/api_key?with_limited_by=true\"" + }, + { + "language": "Java", + "code": "client.security().queryApiKeys(q -> q\n .query(qu -> qu\n .ids(i -> i\n .values(\"VuaCfGcBCdbkQm-e5aOx\")\n )\n )\n .withLimitedBy(true)\n);\n" + } + ], + "specification/security/create_cross_cluster_api_key/examples/request/CreateCrossClusterApiKeyRequestExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.security.create_cross_cluster_api_key(\n name=\"my-cross-cluster-api-key\",\n expiration=\"1d\",\n access={\n \"search\": [\n {\n \"names\": [\n \"logs*\"\n ]\n }\n ],\n \"replication\": [\n {\n \"names\": [\n \"archive*\"\n ]\n }\n ]\n },\n metadata={\n \"description\": \"phase one\",\n \"environment\": {\n \"level\": 1,\n \"trusted\": True,\n \"tags\": [\n \"dev\",\n \"staging\"\n ]\n }\n },\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.security.createCrossClusterApiKey({\n name: \"my-cross-cluster-api-key\",\n expiration: \"1d\",\n access: {\n search: [\n {\n names: [\"logs*\"],\n },\n ],\n replication: [\n {\n names: [\"archive*\"],\n },\n ],\n },\n metadata: {\n description: \"phase one\",\n environment: {\n level: 1,\n trusted: true,\n tags: [\"dev\", \"staging\"],\n },\n },\n});" + }, + { + "language": "Ruby", + "code": "response = client.security.create_cross_cluster_api_key(\n body: {\n \"name\": \"my-cross-cluster-api-key\",\n \"expiration\": \"1d\",\n \"access\": {\n \"search\": [\n {\n \"names\": [\n \"logs*\"\n ]\n }\n ],\n \"replication\": [\n {\n \"names\": [\n \"archive*\"\n ]\n }\n ]\n },\n \"metadata\": {\n \"description\": \"phase one\",\n \"environment\": {\n \"level\": 1,\n \"trusted\": true,\n \"tags\": [\n \"dev\",\n \"staging\"\n ]\n }\n }\n }\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->security()->createCrossClusterApiKey([\n \"body\" => [\n \"name\" => \"my-cross-cluster-api-key\",\n \"expiration\" => \"1d\",\n \"access\" => [\n \"search\" => array(\n [\n \"names\" => array(\n \"logs*\",\n ),\n ],\n ),\n \"replication\" => array(\n [\n \"names\" => array(\n \"archive*\",\n ),\n ],\n ),\n ],\n \"metadata\" => [\n \"description\" => \"phase one\",\n \"environment\" => [\n \"level\" => 1,\n \"trusted\" => true,\n \"tags\" => array(\n \"dev\",\n \"staging\",\n ),\n ],\n ],\n ],\n]);" + }, + { + "language": "curl", + "code": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"name\":\"my-cross-cluster-api-key\",\"expiration\":\"1d\",\"access\":{\"search\":[{\"names\":[\"logs*\"]}],\"replication\":[{\"names\":[\"archive*\"]}]},\"metadata\":{\"description\":\"phase one\",\"environment\":{\"level\":1,\"trusted\":true,\"tags\":[\"dev\",\"staging\"]}}}' \"$ELASTICSEARCH_URL/_security/cross_cluster/api_key\"" + }, + { + "language": "Java", + "code": "client.security().createCrossClusterApiKey(c -> c\n .access(a -> a\n .replication(r -> r\n .names(\"archive*\")\n )\n .search(s -> s\n .names(\"logs*\")\n )\n )\n .expiration(e -> e\n .time(\"1d\")\n )\n .metadata(Map.of(\"environment\", JsonData.fromJson(\"{\\\"level\\\":1,\\\"trusted\\\":true,\\\"tags\\\":[\\\"dev\\\",\\\"staging\\\"]}\"),\"description\", JsonData.fromJson(\"\\\"phase one\\\"\")))\n .name(\"my-cross-cluster-api-key\")\n);\n" + } + ], + "specification/security/saml_authenticate/examples/request/SamlAuthenticateRequestExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.security.saml_authenticate(\n content=\"PHNhbWxwOlJlc3BvbnNlIHhtbG5zOnNhbWxwPSJ1cm46b2FzaXM6bmFtZXM6dGM6U0FNTDoyLjA6cHJvdG9jb2wiIHhtbG5zOnNhbWw9InVybjpvYXNpczpuYW1lczp0YzpTQU1MOjIuMD.....\",\n ids=[\n \"4fee3b046395c4e751011e97f8900b5273d56685\"\n ],\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.security.samlAuthenticate({\n content:\n \"PHNhbWxwOlJlc3BvbnNlIHhtbG5zOnNhbWxwPSJ1cm46b2FzaXM6bmFtZXM6dGM6U0FNTDoyLjA6cHJvdG9jb2wiIHhtbG5zOnNhbWw9InVybjpvYXNpczpuYW1lczp0YzpTQU1MOjIuMD.....\",\n ids: [\"4fee3b046395c4e751011e97f8900b5273d56685\"],\n});" + }, + { + "language": "Ruby", + "code": "response = client.security.saml_authenticate(\n body: {\n \"content\": \"PHNhbWxwOlJlc3BvbnNlIHhtbG5zOnNhbWxwPSJ1cm46b2FzaXM6bmFtZXM6dGM6U0FNTDoyLjA6cHJvdG9jb2wiIHhtbG5zOnNhbWw9InVybjpvYXNpczpuYW1lczp0YzpTQU1MOjIuMD.....\",\n \"ids\": [\n \"4fee3b046395c4e751011e97f8900b5273d56685\"\n ]\n }\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->security()->samlAuthenticate([\n \"body\" => [\n \"content\" => \"PHNhbWxwOlJlc3BvbnNlIHhtbG5zOnNhbWxwPSJ1cm46b2FzaXM6bmFtZXM6dGM6U0FNTDoyLjA6cHJvdG9jb2wiIHhtbG5zOnNhbWw9InVybjpvYXNpczpuYW1lczp0YzpTQU1MOjIuMD.....\",\n \"ids\" => array(\n \"4fee3b046395c4e751011e97f8900b5273d56685\",\n ),\n ],\n]);" + }, + { + "language": "curl", + "code": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"content\":\"PHNhbWxwOlJlc3BvbnNlIHhtbG5zOnNhbWxwPSJ1cm46b2FzaXM6bmFtZXM6dGM6U0FNTDoyLjA6cHJvdG9jb2wiIHhtbG5zOnNhbWw9InVybjpvYXNpczpuYW1lczp0YzpTQU1MOjIuMD.....\",\"ids\":[\"4fee3b046395c4e751011e97f8900b5273d56685\"]}' \"$ELASTICSEARCH_URL/_security/saml/authenticate\"" + }, + { + "language": "Java", + "code": "client.security().samlAuthenticate(s -> s\n .content(\"PHNhbWxwOlJlc3BvbnNlIHhtbG5zOnNhbWxwPSJ1cm46b2FzaXM6bmFtZXM6dGM6U0FNTDoyLjA6cHJvdG9jb2wiIHhtbG5zOnNhbWw9InVybjpvYXNpczpuYW1lczp0YzpTQU1MOjIuMD.....\")\n .ids(\"4fee3b046395c4e751011e97f8900b5273d56685\")\n);\n" + } + ], + "specification/security/change_password/examples/request/SecurityChangePasswordRequestExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.security.change_password(\n username=\"jacknich\",\n password=\"new-test-password\",\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.security.changePassword({\n username: \"jacknich\",\n password: \"new-test-password\",\n});" + }, + { + "language": "Ruby", + "code": "response = client.security.change_password(\n username: \"jacknich\",\n body: {\n \"password\": \"new-test-password\"\n }\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->security()->changePassword([\n \"username\" => \"jacknich\",\n \"body\" => [\n \"password\" => \"new-test-password\",\n ],\n]);" + }, + { + "language": "curl", + "code": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"password\":\"new-test-password\"}' \"$ELASTICSEARCH_URL/_security/user/jacknich/_password\"" + }, + { + "language": "Java", + "code": "client.security().changePassword(c -> c\n .password(\"new-test-password\")\n .username(\"jacknich\")\n);\n" + } + ], + "specification/security/get_service_credentials/examples/request/GetServiceCredentialsRequestExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.security.get_service_credentials(\n namespace=\"elastic\",\n service=\"fleet-server\",\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.security.getServiceCredentials({\n namespace: \"elastic\",\n service: \"fleet-server\",\n});" + }, + { + "language": "Ruby", + "code": "response = client.security.get_service_credentials(\n namespace: \"elastic\",\n service: \"fleet-server\"\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->security()->getServiceCredentials([\n \"namespace\" => \"elastic\",\n \"service\" => \"fleet-server\",\n]);" + }, + { + "language": "curl", + "code": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_security/service/elastic/fleet-server/credential\"" + }, + { + "language": "Java", + "code": "client.security().getServiceCredentials(g -> g\n .namespace(\"elastic\")\n .service(\"fleet-server\")\n);\n" + } + ], + "specification/security/get_role_mapping/examples/request/SecurityGetRoleMappingRequestExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.security.get_role_mapping(\n name=\"mapping1\",\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.security.getRoleMapping({\n name: \"mapping1\",\n});" + }, + { + "language": "Ruby", + "code": "response = client.security.get_role_mapping(\n name: \"mapping1\"\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->security()->getRoleMapping([\n \"name\" => \"mapping1\",\n]);" + }, + { + "language": "curl", + "code": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_security/role_mapping/mapping1\"" + }, + { + "language": "Java", + "code": "client.security().getRoleMapping(g -> g\n .name(\"mapping1\")\n);\n" + } + ], + "specification/security/disable_user_profile/examples/request/SecurityDisableUserProfileExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.security.disable_user_profile(\n uid=\"u_79HkWkwmnBH5gqFKwoxggWPjEBOur1zLPXQPEl1VBW0_0\",\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.security.disableUserProfile({\n uid: \"u_79HkWkwmnBH5gqFKwoxggWPjEBOur1zLPXQPEl1VBW0_0\",\n});" + }, + { + "language": "Ruby", + "code": "response = client.security.disable_user_profile(\n uid: \"u_79HkWkwmnBH5gqFKwoxggWPjEBOur1zLPXQPEl1VBW0_0\"\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->security()->disableUserProfile([\n \"uid\" => \"u_79HkWkwmnBH5gqFKwoxggWPjEBOur1zLPXQPEl1VBW0_0\",\n]);" + }, + { + "language": "curl", + "code": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_security/profile/u_79HkWkwmnBH5gqFKwoxggWPjEBOur1zLPXQPEl1VBW0_0/_disable\"" + }, + { + "language": "Java", + "code": "client.security().disableUserProfile(d -> d\n .uid(\"u_79HkWkwmnBH5gqFKwoxggWPjEBOur1zLPXQPEl1VBW0_0\")\n);\n" + } + ], + "specification/security/get_user_privileges/examples/request/SecurityGetUserPrivilegesRequestExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.security.get_user_privileges()" + }, + { + "language": "JavaScript", + "code": "const response = await client.security.getUserPrivileges();" + }, + { + "language": "Ruby", + "code": "response = client.security.get_user_privileges" + }, + { + "language": "PHP", + "code": "$resp = $client->security()->getUserPrivileges();" + }, + { + "language": "curl", + "code": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_security/user/_privileges\"" + }, + { + "language": "Java", + "code": "client.security().getUserPrivileges(g -> g);\n" + } + ], + "specification/security/query_role/examples/request/QueryRolesRequestExample2.yaml": [ + { + "language": "Python", + "code": "resp = client.security.query_role(\n query={\n \"match\": {\n \"description\": {\n \"query\": \"user access\"\n }\n }\n },\n size=1,\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.security.queryRole({\n query: {\n match: {\n description: {\n query: \"user access\",\n },\n },\n },\n size: 1,\n});" + }, + { + "language": "Ruby", + "code": "response = client.security.query_role(\n body: {\n \"query\": {\n \"match\": {\n \"description\": {\n \"query\": \"user access\"\n }\n }\n },\n \"size\": 1\n }\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->security()->queryRole([\n \"body\" => [\n \"query\" => [\n \"match\" => [\n \"description\" => [\n \"query\" => \"user access\",\n ],\n ],\n ],\n \"size\" => 1,\n ],\n]);" + }, + { + "language": "curl", + "code": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"query\":{\"match\":{\"description\":{\"query\":\"user access\"}}},\"size\":1}' \"$ELASTICSEARCH_URL/_security/_query/role\"" + }, + { + "language": "Java", + "code": "client.security().queryRole(q -> q\n .query(qu -> qu\n .match(m -> m\n .field(\"description\")\n .query(FieldValue.of(\"user access\"))\n )\n )\n .size(1)\n);\n" + } + ], + "specification/security/query_role/examples/request/QueryRolesRequestExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.security.query_role(\n sort=[\n \"name\"\n ],\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.security.queryRole({\n sort: [\"name\"],\n});" + }, + { + "language": "Ruby", + "code": "response = client.security.query_role(\n body: {\n \"sort\": [\n \"name\"\n ]\n }\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->security()->queryRole([\n \"body\" => [\n \"sort\" => array(\n \"name\",\n ),\n ],\n]);" + }, + { + "language": "curl", + "code": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"sort\":[\"name\"]}' \"$ELASTICSEARCH_URL/_security/_query/role\"" + }, + { + "language": "Java", + "code": "client.security().queryRole(q -> q\n .sort(s -> s\n .field(f -> f\n .field(\"name\")\n )\n )\n);\n" + } + ], + "specification/security/delete_privileges/examples/request/SecurityDeletePrivilegesRequestExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.security.delete_privileges(\n application=\"myapp\",\n name=\"read\",\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.security.deletePrivileges({\n application: \"myapp\",\n name: \"read\",\n});" + }, + { + "language": "Ruby", + "code": "response = client.security.delete_privileges(\n application: \"myapp\",\n name: \"read\"\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->security()->deletePrivileges([\n \"application\" => \"myapp\",\n \"name\" => \"read\",\n]);" + }, + { + "language": "curl", + "code": "curl -X DELETE -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_security/privilege/myapp/read\"" + }, + { + "language": "Java", + "code": "client.security().deletePrivileges(d -> d\n .application(\"myapp\")\n .name(\"read\")\n);\n" + } + ], + "specification/security/clear_cached_privileges/examples/request/SecurityClearCachedPrivilegesExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.security.clear_cached_privileges(\n application=\"myapp\",\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.security.clearCachedPrivileges({\n application: \"myapp\",\n});" + }, + { + "language": "Ruby", + "code": "response = client.security.clear_cached_privileges(\n application: \"myapp\"\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->security()->clearCachedPrivileges([\n \"application\" => \"myapp\",\n]);" + }, + { + "language": "curl", + "code": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_security/privilege/myapp/_clear_cache\"" + }, + { + "language": "Java", + "code": "client.security().clearCachedPrivileges(c -> c\n .application(\"myapp\")\n);\n" + } + ], + "specification/security/create_service_token/examples/request/CreateServiceTokenRequestExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.security.create_service_token(\n namespace=\"elastic\",\n service=\"fleet-server\",\n name=\"token1\",\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.security.createServiceToken({\n namespace: \"elastic\",\n service: \"fleet-server\",\n name: \"token1\",\n});" + }, + { + "language": "Ruby", + "code": "response = client.security.create_service_token(\n namespace: \"elastic\",\n service: \"fleet-server\",\n name: \"token1\"\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->security()->createServiceToken([\n \"namespace\" => \"elastic\",\n \"service\" => \"fleet-server\",\n \"name\" => \"token1\",\n]);" + }, + { + "language": "curl", + "code": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_security/service/elastic/fleet-server/credential/token/token1\"" + }, + { + "language": "Java", + "code": "client.security().createServiceToken(c -> c\n .name(\"token1\")\n .namespace(\"elastic\")\n .service(\"fleet-server\")\n);\n" + } + ], + "specification/security/delete_user/examples/request/SecurityDeleteUserRequestExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.security.delete_user(\n username=\"jacknich\",\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.security.deleteUser({\n username: \"jacknich\",\n});" + }, + { + "language": "Ruby", + "code": "response = client.security.delete_user(\n username: \"jacknich\"\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->security()->deleteUser([\n \"username\" => \"jacknich\",\n]);" + }, + { + "language": "curl", + "code": "curl -X DELETE -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_security/user/jacknich\"" + }, + { + "language": "Java", + "code": "client.security().deleteUser(d -> d\n .username(\"jacknich\")\n);\n" + } + ], + "specification/security/clear_cached_realms/examples/request/SecurityClearCachedRealmsExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.security.clear_cached_realms(\n realms=\"default_file\",\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.security.clearCachedRealms({\n realms: \"default_file\",\n});" + }, + { + "language": "Ruby", + "code": "response = client.security.clear_cached_realms(\n realms: \"default_file\"\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->security()->clearCachedRealms([\n \"realms\" => \"default_file\",\n]);" + }, + { + "language": "curl", + "code": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_security/realm/default_file/_clear_cache\"" + }, + { + "language": "Java", + "code": "client.security().clearCachedRealms(c -> c\n .realms(\"default_file\")\n);\n" + } + ], + "specification/security/get_user/examples/request/SecurityGetUserRequestExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.security.get_user(\n username=\"jacknich\",\n with_profile_uid=True,\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.security.getUser({\n username: \"jacknich\",\n with_profile_uid: \"true\",\n});" + }, + { + "language": "Ruby", + "code": "response = client.security.get_user(\n username: \"jacknich\",\n with_profile_uid: \"true\"\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->security()->getUser([\n \"username\" => \"jacknich\",\n \"with_profile_uid\" => \"true\",\n]);" + }, + { + "language": "curl", + "code": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_security/user/jacknich?with_profile_uid=true\"" + }, + { + "language": "Java", + "code": "client.security().getUser(g -> g\n .username(\"jacknich\")\n .withProfileUid(true)\n);\n" + } + ], + "specification/security/update_user_profile_data/examples/request/UpdateUserProfileDataRequestExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.security.update_user_profile_data(\n uid=\"u_P_0BMHgaOK3p7k-PFWUCbw9dQ-UFjt01oWJ_Dp2PmPc_0\",\n labels={\n \"direction\": \"east\"\n },\n data={\n \"app1\": {\n \"theme\": \"default\"\n }\n },\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.security.updateUserProfileData({\n uid: \"u_P_0BMHgaOK3p7k-PFWUCbw9dQ-UFjt01oWJ_Dp2PmPc_0\",\n labels: {\n direction: \"east\",\n },\n data: {\n app1: {\n theme: \"default\",\n },\n },\n});" + }, + { + "language": "Ruby", + "code": "response = client.security.update_user_profile_data(\n uid: \"u_P_0BMHgaOK3p7k-PFWUCbw9dQ-UFjt01oWJ_Dp2PmPc_0\",\n body: {\n \"labels\": {\n \"direction\": \"east\"\n },\n \"data\": {\n \"app1\": {\n \"theme\": \"default\"\n }\n }\n }\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->security()->updateUserProfileData([\n \"uid\" => \"u_P_0BMHgaOK3p7k-PFWUCbw9dQ-UFjt01oWJ_Dp2PmPc_0\",\n \"body\" => [\n \"labels\" => [\n \"direction\" => \"east\",\n ],\n \"data\" => [\n \"app1\" => [\n \"theme\" => \"default\",\n ],\n ],\n ],\n]);" + }, + { + "language": "curl", + "code": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"labels\":{\"direction\":\"east\"},\"data\":{\"app1\":{\"theme\":\"default\"}}}' \"$ELASTICSEARCH_URL/_security/profile/u_P_0BMHgaOK3p7k-PFWUCbw9dQ-UFjt01oWJ_Dp2PmPc_0/_data\"" + }, + { + "language": "Java", + "code": "client.security().updateUserProfileData(u -> u\n .data(\"app1\", JsonData.fromJson(\"{\\\"theme\\\":\\\"default\\\"}\"))\n .labels(\"direction\", JsonData.fromJson(\"\\\"east\\\"\"))\n .uid(\"u_P_0BMHgaOK3p7k-PFWUCbw9dQ-UFjt01oWJ_Dp2PmPc_0\")\n);\n" + } + ], + "specification/security/delegate_pki/examples/request/SecurityDelegatePkiRequestExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.perform_request(\n \"POST\",\n \"/_security/delegate_pki\",\n headers={\"Content-Type\": \"application/json\"},\n body={\n \"x509_certificate_chain\": [\n \"MIIDeDCCAmCgAwIBAgIUBzj/nGGKxP2iXawsSquHmQjCJmMwDQYJKoZIhvcNAQELBQAwUzErMCkGA1UEAxMiRWxhc3RpY3NlYXJjaCBUZXN0IEludGVybWVkaWF0ZSBDQTEWMBQGA1UECxMNRWxhc3RpY3NlYXJjaDEMMAoGA1UEChMDb3JnMB4XDTIzMDcxODE5MjkwNloXDTQzMDcxMzE5MjkwNlowSjEiMCAGA1UEAxMZRWxhc3RpY3NlYXJjaCBUZXN0IENsaWVudDEWMBQGA1UECxMNRWxhc3RpY3NlYXJjaDEMMAoGA1UEChMDb3JnMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAllHL4pQkkfwAm/oLkxYYO+r950DEy1bjH+4viCHzNADLCTWO+lOZJVlNx7QEzJE3QGMdif9CCBBxQFMapA7oUFCLq84fPSQQu5AnvvbltVD9nwVtCs+9ZGDjMKsz98RhSLMFIkxdxi6HkQ3Lfa4ZSI4lvba4oo+T/GveazBDS+NgmKyq00EOXt3tWi1G9vEVItommzXWfv0agJWzVnLMldwkPqsw0W7zrpyT7FZS4iLbQADGceOW8fiauOGMkscu9zAnDR/SbWl/chYioQOdw6ndFLn1YIFPd37xL0WsdsldTpn0vH3YfzgLMffT/3P6YlwBegWzsx6FnM/93Ecb4wIDAQABo00wSzAJBgNVHRMEAjAAMB0GA1UdDgQWBBQKNRwjW+Ad/FN1Rpoqme/5+jrFWzAfBgNVHSMEGDAWgBRcya0c0x/PaI7MbmJVIylWgLqXNjANBgkqhkiG9w0BAQsFAAOCAQEACZ3PF7Uqu47lplXHP6YlzYL2jL0D28hpj5lGtdha4Muw1m/BjDb0Pu8l0NQ1z3AP6AVcvjNDkQq6Y5jeSz0bwQlealQpYfo7EMXjOidrft1GbqOMFmTBLpLA9SvwYGobSTXWTkJzonqVaTcf80HpMgM2uEhodwTcvz6v1WEfeT/HMjmdIsq4ImrOL9RNrcZG6nWfw0HR3JNOgrbfyEztEI471jHznZ336OEcyX7gQuvHE8tOv5+oD1d7s3Xg1yuFp+Ynh+FfOi3hPCuaHA+7F6fLmzMDLVUBAllugst1C3U+L/paD7tqIa4ka+KNPCbSfwazmJrt4XNiivPR4hwH5g==\"\n ]\n },\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.transport.request({\n method: \"POST\",\n path: \"/_security/delegate_pki\",\n body: {\n x509_certificate_chain: [\n \"MIIDeDCCAmCgAwIBAgIUBzj/nGGKxP2iXawsSquHmQjCJmMwDQYJKoZIhvcNAQELBQAwUzErMCkGA1UEAxMiRWxhc3RpY3NlYXJjaCBUZXN0IEludGVybWVkaWF0ZSBDQTEWMBQGA1UECxMNRWxhc3RpY3NlYXJjaDEMMAoGA1UEChMDb3JnMB4XDTIzMDcxODE5MjkwNloXDTQzMDcxMzE5MjkwNlowSjEiMCAGA1UEAxMZRWxhc3RpY3NlYXJjaCBUZXN0IENsaWVudDEWMBQGA1UECxMNRWxhc3RpY3NlYXJjaDEMMAoGA1UEChMDb3JnMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAllHL4pQkkfwAm/oLkxYYO+r950DEy1bjH+4viCHzNADLCTWO+lOZJVlNx7QEzJE3QGMdif9CCBBxQFMapA7oUFCLq84fPSQQu5AnvvbltVD9nwVtCs+9ZGDjMKsz98RhSLMFIkxdxi6HkQ3Lfa4ZSI4lvba4oo+T/GveazBDS+NgmKyq00EOXt3tWi1G9vEVItommzXWfv0agJWzVnLMldwkPqsw0W7zrpyT7FZS4iLbQADGceOW8fiauOGMkscu9zAnDR/SbWl/chYioQOdw6ndFLn1YIFPd37xL0WsdsldTpn0vH3YfzgLMffT/3P6YlwBegWzsx6FnM/93Ecb4wIDAQABo00wSzAJBgNVHRMEAjAAMB0GA1UdDgQWBBQKNRwjW+Ad/FN1Rpoqme/5+jrFWzAfBgNVHSMEGDAWgBRcya0c0x/PaI7MbmJVIylWgLqXNjANBgkqhkiG9w0BAQsFAAOCAQEACZ3PF7Uqu47lplXHP6YlzYL2jL0D28hpj5lGtdha4Muw1m/BjDb0Pu8l0NQ1z3AP6AVcvjNDkQq6Y5jeSz0bwQlealQpYfo7EMXjOidrft1GbqOMFmTBLpLA9SvwYGobSTXWTkJzonqVaTcf80HpMgM2uEhodwTcvz6v1WEfeT/HMjmdIsq4ImrOL9RNrcZG6nWfw0HR3JNOgrbfyEztEI471jHznZ336OEcyX7gQuvHE8tOv5+oD1d7s3Xg1yuFp+Ynh+FfOi3hPCuaHA+7F6fLmzMDLVUBAllugst1C3U+L/paD7tqIa4ka+KNPCbSfwazmJrt4XNiivPR4hwH5g==\",\n ],\n },\n});" + }, + { + "language": "Ruby", + "code": "response = client.perform_request(\n \"POST\",\n \"/_security/delegate_pki\",\n {},\n {\n \"x509_certificate_chain\": [\n \"MIIDeDCCAmCgAwIBAgIUBzj/nGGKxP2iXawsSquHmQjCJmMwDQYJKoZIhvcNAQELBQAwUzErMCkGA1UEAxMiRWxhc3RpY3NlYXJjaCBUZXN0IEludGVybWVkaWF0ZSBDQTEWMBQGA1UECxMNRWxhc3RpY3NlYXJjaDEMMAoGA1UEChMDb3JnMB4XDTIzMDcxODE5MjkwNloXDTQzMDcxMzE5MjkwNlowSjEiMCAGA1UEAxMZRWxhc3RpY3NlYXJjaCBUZXN0IENsaWVudDEWMBQGA1UECxMNRWxhc3RpY3NlYXJjaDEMMAoGA1UEChMDb3JnMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAllHL4pQkkfwAm/oLkxYYO+r950DEy1bjH+4viCHzNADLCTWO+lOZJVlNx7QEzJE3QGMdif9CCBBxQFMapA7oUFCLq84fPSQQu5AnvvbltVD9nwVtCs+9ZGDjMKsz98RhSLMFIkxdxi6HkQ3Lfa4ZSI4lvba4oo+T/GveazBDS+NgmKyq00EOXt3tWi1G9vEVItommzXWfv0agJWzVnLMldwkPqsw0W7zrpyT7FZS4iLbQADGceOW8fiauOGMkscu9zAnDR/SbWl/chYioQOdw6ndFLn1YIFPd37xL0WsdsldTpn0vH3YfzgLMffT/3P6YlwBegWzsx6FnM/93Ecb4wIDAQABo00wSzAJBgNVHRMEAjAAMB0GA1UdDgQWBBQKNRwjW+Ad/FN1Rpoqme/5+jrFWzAfBgNVHSMEGDAWgBRcya0c0x/PaI7MbmJVIylWgLqXNjANBgkqhkiG9w0BAQsFAAOCAQEACZ3PF7Uqu47lplXHP6YlzYL2jL0D28hpj5lGtdha4Muw1m/BjDb0Pu8l0NQ1z3AP6AVcvjNDkQq6Y5jeSz0bwQlealQpYfo7EMXjOidrft1GbqOMFmTBLpLA9SvwYGobSTXWTkJzonqVaTcf80HpMgM2uEhodwTcvz6v1WEfeT/HMjmdIsq4ImrOL9RNrcZG6nWfw0HR3JNOgrbfyEztEI471jHznZ336OEcyX7gQuvHE8tOv5+oD1d7s3Xg1yuFp+Ynh+FfOi3hPCuaHA+7F6fLmzMDLVUBAllugst1C3U+L/paD7tqIa4ka+KNPCbSfwazmJrt4XNiivPR4hwH5g==\"\n ]\n },\n { \"Content-Type\": \"application/json\" },\n)" + }, + { + "language": "PHP", + "code": "$requestFactory = Psr17FactoryDiscovery::findRequestFactory();\n$streamFactory = Psr17FactoryDiscovery::findStreamFactory();\n$request = $requestFactory->createRequest(\n \"POST\",\n \"/_security/delegate_pki\",\n);\n$request = $request->withHeader(\"Content-Type\", \"application/json\");\n$request = $request->withBody($streamFactory->createStream(\n json_encode([\n \"x509_certificate_chain\" => array(\n \"MIIDeDCCAmCgAwIBAgIUBzj/nGGKxP2iXawsSquHmQjCJmMwDQYJKoZIhvcNAQELBQAwUzErMCkGA1UEAxMiRWxhc3RpY3NlYXJjaCBUZXN0IEludGVybWVkaWF0ZSBDQTEWMBQGA1UECxMNRWxhc3RpY3NlYXJjaDEMMAoGA1UEChMDb3JnMB4XDTIzMDcxODE5MjkwNloXDTQzMDcxMzE5MjkwNlowSjEiMCAGA1UEAxMZRWxhc3RpY3NlYXJjaCBUZXN0IENsaWVudDEWMBQGA1UECxMNRWxhc3RpY3NlYXJjaDEMMAoGA1UEChMDb3JnMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAllHL4pQkkfwAm/oLkxYYO+r950DEy1bjH+4viCHzNADLCTWO+lOZJVlNx7QEzJE3QGMdif9CCBBxQFMapA7oUFCLq84fPSQQu5AnvvbltVD9nwVtCs+9ZGDjMKsz98RhSLMFIkxdxi6HkQ3Lfa4ZSI4lvba4oo+T/GveazBDS+NgmKyq00EOXt3tWi1G9vEVItommzXWfv0agJWzVnLMldwkPqsw0W7zrpyT7FZS4iLbQADGceOW8fiauOGMkscu9zAnDR/SbWl/chYioQOdw6ndFLn1YIFPd37xL0WsdsldTpn0vH3YfzgLMffT/3P6YlwBegWzsx6FnM/93Ecb4wIDAQABo00wSzAJBgNVHRMEAjAAMB0GA1UdDgQWBBQKNRwjW+Ad/FN1Rpoqme/5+jrFWzAfBgNVHSMEGDAWgBRcya0c0x/PaI7MbmJVIylWgLqXNjANBgkqhkiG9w0BAQsFAAOCAQEACZ3PF7Uqu47lplXHP6YlzYL2jL0D28hpj5lGtdha4Muw1m/BjDb0Pu8l0NQ1z3AP6AVcvjNDkQq6Y5jeSz0bwQlealQpYfo7EMXjOidrft1GbqOMFmTBLpLA9SvwYGobSTXWTkJzonqVaTcf80HpMgM2uEhodwTcvz6v1WEfeT/HMjmdIsq4ImrOL9RNrcZG6nWfw0HR3JNOgrbfyEztEI471jHznZ336OEcyX7gQuvHE8tOv5+oD1d7s3Xg1yuFp+Ynh+FfOi3hPCuaHA+7F6fLmzMDLVUBAllugst1C3U+L/paD7tqIa4ka+KNPCbSfwazmJrt4XNiivPR4hwH5g==\",\n ),\n ]),\n));\n$resp = $client->sendRequest($request);" + }, + { + "language": "curl", + "code": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"x509_certificate_chain\":[\"MIIDeDCCAmCgAwIBAgIUBzj/nGGKxP2iXawsSquHmQjCJmMwDQYJKoZIhvcNAQELBQAwUzErMCkGA1UEAxMiRWxhc3RpY3NlYXJjaCBUZXN0IEludGVybWVkaWF0ZSBDQTEWMBQGA1UECxMNRWxhc3RpY3NlYXJjaDEMMAoGA1UEChMDb3JnMB4XDTIzMDcxODE5MjkwNloXDTQzMDcxMzE5MjkwNlowSjEiMCAGA1UEAxMZRWxhc3RpY3NlYXJjaCBUZXN0IENsaWVudDEWMBQGA1UECxMNRWxhc3RpY3NlYXJjaDEMMAoGA1UEChMDb3JnMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAllHL4pQkkfwAm/oLkxYYO+r950DEy1bjH+4viCHzNADLCTWO+lOZJVlNx7QEzJE3QGMdif9CCBBxQFMapA7oUFCLq84fPSQQu5AnvvbltVD9nwVtCs+9ZGDjMKsz98RhSLMFIkxdxi6HkQ3Lfa4ZSI4lvba4oo+T/GveazBDS+NgmKyq00EOXt3tWi1G9vEVItommzXWfv0agJWzVnLMldwkPqsw0W7zrpyT7FZS4iLbQADGceOW8fiauOGMkscu9zAnDR/SbWl/chYioQOdw6ndFLn1YIFPd37xL0WsdsldTpn0vH3YfzgLMffT/3P6YlwBegWzsx6FnM/93Ecb4wIDAQABo00wSzAJBgNVHRMEAjAAMB0GA1UdDgQWBBQKNRwjW+Ad/FN1Rpoqme/5+jrFWzAfBgNVHSMEGDAWgBRcya0c0x/PaI7MbmJVIylWgLqXNjANBgkqhkiG9w0BAQsFAAOCAQEACZ3PF7Uqu47lplXHP6YlzYL2jL0D28hpj5lGtdha4Muw1m/BjDb0Pu8l0NQ1z3AP6AVcvjNDkQq6Y5jeSz0bwQlealQpYfo7EMXjOidrft1GbqOMFmTBLpLA9SvwYGobSTXWTkJzonqVaTcf80HpMgM2uEhodwTcvz6v1WEfeT/HMjmdIsq4ImrOL9RNrcZG6nWfw0HR3JNOgrbfyEztEI471jHznZ336OEcyX7gQuvHE8tOv5+oD1d7s3Xg1yuFp+Ynh+FfOi3hPCuaHA+7F6fLmzMDLVUBAllugst1C3U+L/paD7tqIa4ka+KNPCbSfwazmJrt4XNiivPR4hwH5g==\"]}' \"$ELASTICSEARCH_URL/_security/delegate_pki\"" + }, + { + "language": "Java", + "code": "client.security().delegatePki(d -> d\n .x509CertificateChain(\"MIIDeDCCAmCgAwIBAgIUBzj/nGGKxP2iXawsSquHmQjCJmMwDQYJKoZIhvcNAQELBQAwUzErMCkGA1UEAxMiRWxhc3RpY3NlYXJjaCBUZXN0IEludGVybWVkaWF0ZSBDQTEWMBQGA1UECxMNRWxhc3RpY3NlYXJjaDEMMAoGA1UEChMDb3JnMB4XDTIzMDcxODE5MjkwNloXDTQzMDcxMzE5MjkwNlowSjEiMCAGA1UEAxMZRWxhc3RpY3NlYXJjaCBUZXN0IENsaWVudDEWMBQGA1UECxMNRWxhc3RpY3NlYXJjaDEMMAoGA1UEChMDb3JnMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAllHL4pQkkfwAm/oLkxYYO+r950DEy1bjH+4viCHzNADLCTWO+lOZJVlNx7QEzJE3QGMdif9CCBBxQFMapA7oUFCLq84fPSQQu5AnvvbltVD9nwVtCs+9ZGDjMKsz98RhSLMFIkxdxi6HkQ3Lfa4ZSI4lvba4oo+T/GveazBDS+NgmKyq00EOXt3tWi1G9vEVItommzXWfv0agJWzVnLMldwkPqsw0W7zrpyT7FZS4iLbQADGceOW8fiauOGMkscu9zAnDR/SbWl/chYioQOdw6ndFLn1YIFPd37xL0WsdsldTpn0vH3YfzgLMffT/3P6YlwBegWzsx6FnM/93Ecb4wIDAQABo00wSzAJBgNVHRMEAjAAMB0GA1UdDgQWBBQKNRwjW+Ad/FN1Rpoqme/5+jrFWzAfBgNVHSMEGDAWgBRcya0c0x/PaI7MbmJVIylWgLqXNjANBgkqhkiG9w0BAQsFAAOCAQEACZ3PF7Uqu47lplXHP6YlzYL2jL0D28hpj5lGtdha4Muw1m/BjDb0Pu8l0NQ1z3AP6AVcvjNDkQq6Y5jeSz0bwQlealQpYfo7EMXjOidrft1GbqOMFmTBLpLA9SvwYGobSTXWTkJzonqVaTcf80HpMgM2uEhodwTcvz6v1WEfeT/HMjmdIsq4ImrOL9RNrcZG6nWfw0HR3JNOgrbfyEztEI471jHznZ336OEcyX7gQuvHE8tOv5+oD1d7s3Xg1yuFp+Ynh+FfOi3hPCuaHA+7F6fLmzMDLVUBAllugst1C3U+L/paD7tqIa4ka+KNPCbSfwazmJrt4XNiivPR4hwH5g==\")\n);\n" + } + ], + "specification/security/enable_user/examples/request/SecurityEnableUserExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.security.enable_user(\n username=\"logstash_system\",\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.security.enableUser({\n username: \"logstash_system\",\n});" + }, + { + "language": "Ruby", + "code": "response = client.security.enable_user(\n username: \"logstash_system\"\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->security()->enableUser([\n \"username\" => \"logstash_system\",\n]);" + }, + { + "language": "curl", + "code": "curl -X PUT -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_security/user/logstash_system/_enable\"" + }, + { + "language": "Java", + "code": "client.security().enableUser(e -> e\n .username(\"logstash_system\")\n);\n" + } + ], + "specification/security/put_user/examples/request/SecurityPutUserRequestExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.security.put_user(\n username=\"jacknich\",\n password=\"l0ng-r4nd0m-p@ssw0rd\",\n roles=[\n \"admin\",\n \"other_role1\"\n ],\n full_name=\"Jack Nicholson\",\n email=\"jacknich@example.com\",\n metadata={\n \"intelligence\": 7\n },\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.security.putUser({\n username: \"jacknich\",\n password: \"l0ng-r4nd0m-p@ssw0rd\",\n roles: [\"admin\", \"other_role1\"],\n full_name: \"Jack Nicholson\",\n email: \"jacknich@example.com\",\n metadata: {\n intelligence: 7,\n },\n});" + }, + { + "language": "Ruby", + "code": "response = client.security.put_user(\n username: \"jacknich\",\n body: {\n \"password\": \"l0ng-r4nd0m-p@ssw0rd\",\n \"roles\": [\n \"admin\",\n \"other_role1\"\n ],\n \"full_name\": \"Jack Nicholson\",\n \"email\": \"jacknich@example.com\",\n \"metadata\": {\n \"intelligence\": 7\n }\n }\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->security()->putUser([\n \"username\" => \"jacknich\",\n \"body\" => [\n \"password\" => \"l0ng-r4nd0m-p@ssw0rd\",\n \"roles\" => array(\n \"admin\",\n \"other_role1\",\n ),\n \"full_name\" => \"Jack Nicholson\",\n \"email\" => \"jacknich@example.com\",\n \"metadata\" => [\n \"intelligence\" => 7,\n ],\n ],\n]);" + }, + { + "language": "curl", + "code": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"password\":\"l0ng-r4nd0m-p@ssw0rd\",\"roles\":[\"admin\",\"other_role1\"],\"full_name\":\"Jack Nicholson\",\"email\":\"jacknich@example.com\",\"metadata\":{\"intelligence\":7}}' \"$ELASTICSEARCH_URL/_security/user/jacknich\"" + }, + { + "language": "Java", + "code": "client.security().putUser(p -> p\n .email(\"jacknich@example.com\")\n .fullName(\"Jack Nicholson\")\n .metadata(\"intelligence\", JsonData.fromJson(\"7\"))\n .password(\"l0ng-r4nd0m-p@ssw0rd\")\n .roles(List.of(\"admin\",\"other_role1\"))\n .username(\"jacknich\")\n);\n" + } + ], + "specification/security/clear_api_key_cache/examples/request/SecurityClearApiKeyCacheExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.security.clear_api_key_cache(\n ids=\"yVGMr3QByxdh1MSaicYx\",\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.security.clearApiKeyCache({\n ids: \"yVGMr3QByxdh1MSaicYx\",\n});" + }, + { + "language": "Ruby", + "code": "response = client.security.clear_api_key_cache(\n ids: \"yVGMr3QByxdh1MSaicYx\"\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->security()->clearApiKeyCache([\n \"ids\" => \"yVGMr3QByxdh1MSaicYx\",\n]);" + }, + { + "language": "curl", + "code": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_security/api_key/yVGMr3QByxdh1MSaicYx/_clear_cache\"" + }, + { + "language": "Java", + "code": "client.security().clearApiKeyCache(c -> c\n .ids(\"yVGMr3QByxdh1MSaicYx\")\n);\n" + } + ], + "specification/security/get_api_key/examples/request/SecurityGetApiKeyRequestExample2.yaml": [ + { + "language": "Python", + "code": "resp = client.security.get_api_key(\n username=\"myuser\",\n realm_name=\"native1\",\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.security.getApiKey({\n username: \"myuser\",\n realm_name: \"native1\",\n});" + }, + { + "language": "Ruby", + "code": "response = client.security.get_api_key(\n username: \"myuser\",\n realm_name: \"native1\"\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->security()->getApiKey([\n \"username\" => \"myuser\",\n \"realm_name\" => \"native1\",\n]);" + }, + { + "language": "curl", + "code": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_security/api_key?username=myuser&realm_name=native1\"" + }, + { + "language": "Java", + "code": "client.security().getApiKey(g -> g\n .realmName(\"native1\")\n .username(\"myuser\")\n);\n" + } + ], + "specification/security/clear_cached_service_tokens/examples/request/SecurityClearCachedServiceTokensExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.security.clear_cached_service_tokens(\n namespace=\"elastic\",\n service=\"fleet-server\",\n name=\"token1\",\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.security.clearCachedServiceTokens({\n namespace: \"elastic\",\n service: \"fleet-server\",\n name: \"token1\",\n});" + }, + { + "language": "Ruby", + "code": "response = client.security.clear_cached_service_tokens(\n namespace: \"elastic\",\n service: \"fleet-server\",\n name: \"token1\"\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->security()->clearCachedServiceTokens([\n \"namespace\" => \"elastic\",\n \"service\" => \"fleet-server\",\n \"name\" => \"token1\",\n]);" + }, + { + "language": "curl", + "code": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_security/service/elastic/fleet-server/credential/token/token1/_clear_cache\"" + }, + { + "language": "Java", + "code": "client.security().clearCachedServiceTokens(c -> c\n .name(\"token1\")\n .namespace(\"elastic\")\n .service(\"fleet-server\")\n);\n" + } + ], + "specification/security/enable_user_profile/examples/request/SecurityEnableUserProfileExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.security.enable_user_profile(\n uid=\"u_79HkWkwmnBH5gqFKwoxggWPjEBOur1zLPXQPEl1VBW0_0\",\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.security.enableUserProfile({\n uid: \"u_79HkWkwmnBH5gqFKwoxggWPjEBOur1zLPXQPEl1VBW0_0\",\n});" + }, + { + "language": "Ruby", + "code": "response = client.security.enable_user_profile(\n uid: \"u_79HkWkwmnBH5gqFKwoxggWPjEBOur1zLPXQPEl1VBW0_0\"\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->security()->enableUserProfile([\n \"uid\" => \"u_79HkWkwmnBH5gqFKwoxggWPjEBOur1zLPXQPEl1VBW0_0\",\n]);" + }, + { + "language": "curl", + "code": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_security/profile/u_79HkWkwmnBH5gqFKwoxggWPjEBOur1zLPXQPEl1VBW0_0/_enable\"" + }, + { + "language": "Java", + "code": "client.security().enableUserProfile(e -> e\n .uid(\"u_79HkWkwmnBH5gqFKwoxggWPjEBOur1zLPXQPEl1VBW0_0\")\n);\n" + } + ], + "specification/security/put_role_mapping/examples/request/SecurityPutRoleMappingRequestExample7.yaml": [ + { + "language": "Python", + "code": "resp = client.security.put_role_mapping(\n name=\"mapping7\",\n roles=[\n \"ldap-example-user\"\n ],\n enabled=True,\n rules={\n \"all\": [\n {\n \"field\": {\n \"dn\": \"*,ou=subtree,dc=example,dc=com\"\n }\n },\n {\n \"field\": {\n \"realm.name\": \"ldap1\"\n }\n }\n ]\n },\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.security.putRoleMapping({\n name: \"mapping7\",\n roles: [\"ldap-example-user\"],\n enabled: true,\n rules: {\n all: [\n {\n field: {\n dn: \"*,ou=subtree,dc=example,dc=com\",\n },\n },\n {\n field: {\n \"realm.name\": \"ldap1\",\n },\n },\n ],\n },\n});" + }, + { + "language": "Ruby", + "code": "response = client.security.put_role_mapping(\n name: \"mapping7\",\n body: {\n \"roles\": [\n \"ldap-example-user\"\n ],\n \"enabled\": true,\n \"rules\": {\n \"all\": [\n {\n \"field\": {\n \"dn\": \"*,ou=subtree,dc=example,dc=com\"\n }\n },\n {\n \"field\": {\n \"realm.name\": \"ldap1\"\n }\n }\n ]\n }\n }\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->security()->putRoleMapping([\n \"name\" => \"mapping7\",\n \"body\" => [\n \"roles\" => array(\n \"ldap-example-user\",\n ),\n \"enabled\" => true,\n \"rules\" => [\n \"all\" => array(\n [\n \"field\" => [\n \"dn\" => \"*,ou=subtree,dc=example,dc=com\",\n ],\n ],\n [\n \"field\" => [\n \"realm.name\" => \"ldap1\",\n ],\n ],\n ),\n ],\n ],\n]);" + }, + { + "language": "curl", + "code": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"roles\":[\"ldap-example-user\"],\"enabled\":true,\"rules\":{\"all\":[{\"field\":{\"dn\":\"*,ou=subtree,dc=example,dc=com\"}},{\"field\":{\"realm.name\":\"ldap1\"}}]}}' \"$ELASTICSEARCH_URL/_security/role_mapping/mapping7\"" + }, + { + "language": "Java", + "code": "client.security().putRoleMapping(p -> p\n .enabled(true)\n .name(\"mapping7\")\n .roles(\"ldap-example-user\")\n .rules(r -> r\n .all(List.of(RoleMappingRule.of(ro -> ro\n .field(NamedValue.of(\"dn\",List.of(FieldValue.of(\"*,ou=subtree,dc=example,dc=com\"))\n ))), RoleMappingRule.of(rol -> rol\n .field(NamedValue.of(\"realm.name\",List.of(FieldValue.of(\"ldap1\"))\n )))\n )\n )\n )\n);\n" + } + ], + "specification/security/put_role_mapping/examples/request/SecurityPutRoleMappingRequestExample6.yaml": [ + { + "language": "Python", + "code": "resp = client.security.put_role_mapping(\n name=\"mapping6\",\n role_templates=[\n {\n \"template\": {\n \"source\": \"{{#tojson}}groups{{/tojson}}\"\n },\n \"format\": \"json\"\n }\n ],\n rules={\n \"field\": {\n \"realm.name\": \"saml1\"\n }\n },\n enabled=True,\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.security.putRoleMapping({\n name: \"mapping6\",\n role_templates: [\n {\n template: {\n source: \"{{#tojson}}groups{{/tojson}}\",\n },\n format: \"json\",\n },\n ],\n rules: {\n field: {\n \"realm.name\": \"saml1\",\n },\n },\n enabled: true,\n});" + }, + { + "language": "Ruby", + "code": "response = client.security.put_role_mapping(\n name: \"mapping6\",\n body: {\n \"role_templates\": [\n {\n \"template\": {\n \"source\": \"{{#tojson}}groups{{/tojson}}\"\n },\n \"format\": \"json\"\n }\n ],\n \"rules\": {\n \"field\": {\n \"realm.name\": \"saml1\"\n }\n },\n \"enabled\": true\n }\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->security()->putRoleMapping([\n \"name\" => \"mapping6\",\n \"body\" => [\n \"role_templates\" => array(\n [\n \"template\" => [\n \"source\" => \"{{#tojson}}groups{{/tojson}}\",\n ],\n \"format\" => \"json\",\n ],\n ),\n \"rules\" => [\n \"field\" => [\n \"realm.name\" => \"saml1\",\n ],\n ],\n \"enabled\" => true,\n ],\n]);" + }, + { + "language": "curl", + "code": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"role_templates\":[{\"template\":{\"source\":\"{{#tojson}}groups{{/tojson}}\"},\"format\":\"json\"}],\"rules\":{\"field\":{\"realm.name\":\"saml1\"}},\"enabled\":true}' \"$ELASTICSEARCH_URL/_security/role_mapping/mapping6\"" + }, + { + "language": "Java", + "code": "client.security().putRoleMapping(p -> p\n .enabled(true)\n .name(\"mapping6\")\n .roleTemplates(r -> r\n .format(TemplateFormat.Json)\n .template(t -> t\n .source(s -> s\n .scriptString(\"{{#tojson}}groups{{/tojson}}\")\n )\n )\n )\n .rules(ru -> ru\n .field(NamedValue.of(\"realm.name\",List.of(FieldValue.of(\"saml1\"))))\n )\n);\n" + } + ], + "specification/security/put_role_mapping/examples/request/SecurityPutRoleMappingRequestExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.security.put_role_mapping(\n name=\"mapping1\",\n roles=[\n \"user\"\n ],\n enabled=True,\n rules={\n \"field\": {\n \"username\": \"*\"\n }\n },\n metadata={\n \"version\": 1\n },\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.security.putRoleMapping({\n name: \"mapping1\",\n roles: [\"user\"],\n enabled: true,\n rules: {\n field: {\n username: \"*\",\n },\n },\n metadata: {\n version: 1,\n },\n});" + }, + { + "language": "Ruby", + "code": "response = client.security.put_role_mapping(\n name: \"mapping1\",\n body: {\n \"roles\": [\n \"user\"\n ],\n \"enabled\": true,\n \"rules\": {\n \"field\": {\n \"username\": \"*\"\n }\n },\n \"metadata\": {\n \"version\": 1\n }\n }\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->security()->putRoleMapping([\n \"name\" => \"mapping1\",\n \"body\" => [\n \"roles\" => array(\n \"user\",\n ),\n \"enabled\" => true,\n \"rules\" => [\n \"field\" => [\n \"username\" => \"*\",\n ],\n ],\n \"metadata\" => [\n \"version\" => 1,\n ],\n ],\n]);" + }, + { + "language": "curl", + "code": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"roles\":[\"user\"],\"enabled\":true,\"rules\":{\"field\":{\"username\":\"*\"}},\"metadata\":{\"version\":1}}' \"$ELASTICSEARCH_URL/_security/role_mapping/mapping1\"" + }, + { + "language": "Java", + "code": "client.security().putRoleMapping(p -> p\n .enabled(true)\n .metadata(\"version\", JsonData.fromJson(\"1\"))\n .name(\"mapping1\")\n .roles(\"user\")\n .rules(r -> r\n .field(NamedValue.of(\"username\",List.of(FieldValue.of(\"*\"))))\n )\n);\n" + } + ], + "specification/security/put_role_mapping/examples/request/SecurityPutRoleMappingRequestExample3.yaml": [ + { + "language": "Python", + "code": "resp = client.security.put_role_mapping(\n name=\"mapping3\",\n roles=[\n \"ldap-user\"\n ],\n enabled=True,\n rules={\n \"field\": {\n \"realm.name\": \"ldap1\"\n }\n },\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.security.putRoleMapping({\n name: \"mapping3\",\n roles: [\"ldap-user\"],\n enabled: true,\n rules: {\n field: {\n \"realm.name\": \"ldap1\",\n },\n },\n});" + }, + { + "language": "Ruby", + "code": "response = client.security.put_role_mapping(\n name: \"mapping3\",\n body: {\n \"roles\": [\n \"ldap-user\"\n ],\n \"enabled\": true,\n \"rules\": {\n \"field\": {\n \"realm.name\": \"ldap1\"\n }\n }\n }\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->security()->putRoleMapping([\n \"name\" => \"mapping3\",\n \"body\" => [\n \"roles\" => array(\n \"ldap-user\",\n ),\n \"enabled\" => true,\n \"rules\" => [\n \"field\" => [\n \"realm.name\" => \"ldap1\",\n ],\n ],\n ],\n]);" + }, + { + "language": "curl", + "code": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"roles\":[\"ldap-user\"],\"enabled\":true,\"rules\":{\"field\":{\"realm.name\":\"ldap1\"}}}' \"$ELASTICSEARCH_URL/_security/role_mapping/mapping3\"" + }, + { + "language": "Java", + "code": "client.security().putRoleMapping(p -> p\n .enabled(true)\n .name(\"mapping3\")\n .roles(\"ldap-user\")\n .rules(r -> r\n .field(NamedValue.of(\"realm.name\",List.of(FieldValue.of(\"ldap1\"))))\n )\n);\n" + } + ], + "specification/security/put_role_mapping/examples/request/SecurityPutRoleMappingRequestExample2.yaml": [ + { + "language": "Python", + "code": "resp = client.security.put_role_mapping(\n name=\"mapping2\",\n roles=[\n \"user\",\n \"admin\"\n ],\n enabled=True,\n rules={\n \"field\": {\n \"username\": [\n \"esadmin01\",\n \"esadmin02\"\n ]\n }\n },\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.security.putRoleMapping({\n name: \"mapping2\",\n roles: [\"user\", \"admin\"],\n enabled: true,\n rules: {\n field: {\n username: [\"esadmin01\", \"esadmin02\"],\n },\n },\n});" + }, + { + "language": "Ruby", + "code": "response = client.security.put_role_mapping(\n name: \"mapping2\",\n body: {\n \"roles\": [\n \"user\",\n \"admin\"\n ],\n \"enabled\": true,\n \"rules\": {\n \"field\": {\n \"username\": [\n \"esadmin01\",\n \"esadmin02\"\n ]\n }\n }\n }\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->security()->putRoleMapping([\n \"name\" => \"mapping2\",\n \"body\" => [\n \"roles\" => array(\n \"user\",\n \"admin\",\n ),\n \"enabled\" => true,\n \"rules\" => [\n \"field\" => [\n \"username\" => array(\n \"esadmin01\",\n \"esadmin02\",\n ),\n ],\n ],\n ],\n]);" + }, + { + "language": "curl", + "code": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"roles\":[\"user\",\"admin\"],\"enabled\":true,\"rules\":{\"field\":{\"username\":[\"esadmin01\",\"esadmin02\"]}}}' \"$ELASTICSEARCH_URL/_security/role_mapping/mapping2\"" + }, + { + "language": "Java", + "code": "client.security().putRoleMapping(p -> p\n .enabled(true)\n .name(\"mapping2\")\n .roles(List.of(\"user\",\"admin\"))\n .rules(r -> r\n .field(NamedValue.of(\"username\",List.of(FieldValue.of(\"esadmin01\"),FieldValue.of(\"esadmin02\"))))\n )\n);\n" + } + ], + "specification/security/put_role_mapping/examples/request/SecurityPutRoleMappingRequestExample9.yaml": [ + { + "language": "Python", + "code": "resp = client.security.put_role_mapping(\n name=\"mapping9\",\n rules={\n \"field\": {\n \"realm.name\": \"cloud-saml\"\n }\n },\n role_templates=[\n {\n \"template\": {\n \"source\": \"saml_user\"\n }\n },\n {\n \"template\": {\n \"source\": \"_user_{{username}}\"\n }\n }\n ],\n enabled=True,\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.security.putRoleMapping({\n name: \"mapping9\",\n rules: {\n field: {\n \"realm.name\": \"cloud-saml\",\n },\n },\n role_templates: [\n {\n template: {\n source: \"saml_user\",\n },\n },\n {\n template: {\n source: \"_user_{{username}}\",\n },\n },\n ],\n enabled: true,\n});" + }, + { + "language": "Ruby", + "code": "response = client.security.put_role_mapping(\n name: \"mapping9\",\n body: {\n \"rules\": {\n \"field\": {\n \"realm.name\": \"cloud-saml\"\n }\n },\n \"role_templates\": [\n {\n \"template\": {\n \"source\": \"saml_user\"\n }\n },\n {\n \"template\": {\n \"source\": \"_user_{{username}}\"\n }\n }\n ],\n \"enabled\": true\n }\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->security()->putRoleMapping([\n \"name\" => \"mapping9\",\n \"body\" => [\n \"rules\" => [\n \"field\" => [\n \"realm.name\" => \"cloud-saml\",\n ],\n ],\n \"role_templates\" => array(\n [\n \"template\" => [\n \"source\" => \"saml_user\",\n ],\n ],\n [\n \"template\" => [\n \"source\" => \"_user_{{username}}\",\n ],\n ],\n ),\n \"enabled\" => true,\n ],\n]);" + }, + { + "language": "curl", + "code": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"rules\":{\"field\":{\"realm.name\":\"cloud-saml\"}},\"role_templates\":[{\"template\":{\"source\":\"saml_user\"}},{\"template\":{\"source\":\"_user_{{username}}\"}}],\"enabled\":true}' \"$ELASTICSEARCH_URL/_security/role_mapping/mapping9\"" + }, + { + "language": "Java", + "code": "client.security().putRoleMapping(p -> p\n .enabled(true)\n .name(\"mapping9\")\n .roleTemplates(List.of(RoleTemplate.of(r -> r\n .template(t -> t\n .source(s -> s\n .scriptString(\"saml_user\")\n )\n )),RoleTemplate.of(ro -> ro\n .template(t -> t\n .source(s -> s\n .scriptString(\"_user_{{username}}\")\n )\n ))))\n .rules(ru -> ru\n .field(NamedValue.of(\"realm.name\",List.of(FieldValue.of(\"cloud-saml\"))))\n )\n);\n" + } + ], + "specification/security/put_role_mapping/examples/request/SecurityPutRoleMappingRequestExample5.yaml": [ + { + "language": "Python", + "code": "resp = client.security.put_role_mapping(\n name=\"mapping5\",\n role_templates=[\n {\n \"template\": {\n \"source\": \"{{#tojson}}groups{{/tojson}}\"\n },\n \"format\": \"json\"\n }\n ],\n rules={\n \"field\": {\n \"realm.name\": \"saml1\"\n }\n },\n enabled=True,\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.security.putRoleMapping({\n name: \"mapping5\",\n role_templates: [\n {\n template: {\n source: \"{{#tojson}}groups{{/tojson}}\",\n },\n format: \"json\",\n },\n ],\n rules: {\n field: {\n \"realm.name\": \"saml1\",\n },\n },\n enabled: true,\n});" + }, + { + "language": "Ruby", + "code": "response = client.security.put_role_mapping(\n name: \"mapping5\",\n body: {\n \"role_templates\": [\n {\n \"template\": {\n \"source\": \"{{#tojson}}groups{{/tojson}}\"\n },\n \"format\": \"json\"\n }\n ],\n \"rules\": {\n \"field\": {\n \"realm.name\": \"saml1\"\n }\n },\n \"enabled\": true\n }\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->security()->putRoleMapping([\n \"name\" => \"mapping5\",\n \"body\" => [\n \"role_templates\" => array(\n [\n \"template\" => [\n \"source\" => \"{{#tojson}}groups{{/tojson}}\",\n ],\n \"format\" => \"json\",\n ],\n ),\n \"rules\" => [\n \"field\" => [\n \"realm.name\" => \"saml1\",\n ],\n ],\n \"enabled\" => true,\n ],\n]);" + }, + { + "language": "curl", + "code": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"role_templates\":[{\"template\":{\"source\":\"{{#tojson}}groups{{/tojson}}\"},\"format\":\"json\"}],\"rules\":{\"field\":{\"realm.name\":\"saml1\"}},\"enabled\":true}' \"$ELASTICSEARCH_URL/_security/role_mapping/mapping5\"" + }, + { + "language": "Java", + "code": "client.security().putRoleMapping(p -> p\n .enabled(true)\n .name(\"mapping5\")\n .roleTemplates(r -> r\n .format(TemplateFormat.Json)\n .template(t -> t\n .source(s -> s\n .scriptString(\"{{#tojson}}groups{{/tojson}}\")\n )\n )\n )\n .rules(ru -> ru\n .field(NamedValue.of(\"realm.name\",List.of(FieldValue.of(\"saml1\"))))\n )\n);\n" + } + ], + "specification/security/put_role_mapping/examples/request/SecurityPutRoleMappingRequestExample4.yaml": [ + { + "language": "Python", + "code": "resp = client.security.put_role_mapping(\n name=\"mapping4\",\n roles=[\n \"superuser\"\n ],\n enabled=True,\n rules={\n \"any\": [\n {\n \"field\": {\n \"username\": \"esadmin\"\n }\n },\n {\n \"field\": {\n \"groups\": \"cn=admins,dc=example,dc=com\"\n }\n }\n ]\n },\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.security.putRoleMapping({\n name: \"mapping4\",\n roles: [\"superuser\"],\n enabled: true,\n rules: {\n any: [\n {\n field: {\n username: \"esadmin\",\n },\n },\n {\n field: {\n groups: \"cn=admins,dc=example,dc=com\",\n },\n },\n ],\n },\n});" + }, + { + "language": "Ruby", + "code": "response = client.security.put_role_mapping(\n name: \"mapping4\",\n body: {\n \"roles\": [\n \"superuser\"\n ],\n \"enabled\": true,\n \"rules\": {\n \"any\": [\n {\n \"field\": {\n \"username\": \"esadmin\"\n }\n },\n {\n \"field\": {\n \"groups\": \"cn=admins,dc=example,dc=com\"\n }\n }\n ]\n }\n }\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->security()->putRoleMapping([\n \"name\" => \"mapping4\",\n \"body\" => [\n \"roles\" => array(\n \"superuser\",\n ),\n \"enabled\" => true,\n \"rules\" => [\n \"any\" => array(\n [\n \"field\" => [\n \"username\" => \"esadmin\",\n ],\n ],\n [\n \"field\" => [\n \"groups\" => \"cn=admins,dc=example,dc=com\",\n ],\n ],\n ),\n ],\n ],\n]);" + }, + { + "language": "curl", + "code": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"roles\":[\"superuser\"],\"enabled\":true,\"rules\":{\"any\":[{\"field\":{\"username\":\"esadmin\"}},{\"field\":{\"groups\":\"cn=admins,dc=example,dc=com\"}}]}}' \"$ELASTICSEARCH_URL/_security/role_mapping/mapping4\"" + }, + { + "language": "Java", + "code": "client.security().putRoleMapping(p -> p\n .enabled(true)\n .name(\"mapping4\")\n .roles(\"superuser\")\n .rules(r -> r\n .any(List.of(RoleMappingRule.of(ro -> ro\n .field(NamedValue.of(\"username\",List.of(FieldValue.of(\"esadmin\"))\n ))), RoleMappingRule.of(rol -> rol\n .field(NamedValue.of(\"groups\",List.of(FieldValue.of(\"cn=admins,dc=example,dc=com\"))\n )))\n )\n )\n )\n);\n" + } + ], + "specification/security/put_role_mapping/examples/request/SecurityPutRoleMappingRequestExample8.yaml": [ + { + "language": "Python", + "code": "resp = client.security.put_role_mapping(\n name=\"mapping8\",\n roles=[\n \"superuser\"\n ],\n enabled=True,\n rules={\n \"all\": [\n {\n \"any\": [\n {\n \"field\": {\n \"dn\": \"*,ou=admin,dc=example,dc=com\"\n }\n },\n {\n \"field\": {\n \"username\": [\n \"es-admin\",\n \"es-system\"\n ]\n }\n }\n ]\n },\n {\n \"field\": {\n \"groups\": \"cn=people,dc=example,dc=com\"\n }\n },\n {\n \"except\": {\n \"field\": {\n \"metadata.terminated_date\": None\n }\n }\n }\n ]\n },\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.security.putRoleMapping({\n name: \"mapping8\",\n roles: [\"superuser\"],\n enabled: true,\n rules: {\n all: [\n {\n any: [\n {\n field: {\n dn: \"*,ou=admin,dc=example,dc=com\",\n },\n },\n {\n field: {\n username: [\"es-admin\", \"es-system\"],\n },\n },\n ],\n },\n {\n field: {\n groups: \"cn=people,dc=example,dc=com\",\n },\n },\n {\n except: {\n field: {\n \"metadata.terminated_date\": null,\n },\n },\n },\n ],\n },\n});" + }, + { + "language": "Ruby", + "code": "response = client.security.put_role_mapping(\n name: \"mapping8\",\n body: {\n \"roles\": [\n \"superuser\"\n ],\n \"enabled\": true,\n \"rules\": {\n \"all\": [\n {\n \"any\": [\n {\n \"field\": {\n \"dn\": \"*,ou=admin,dc=example,dc=com\"\n }\n },\n {\n \"field\": {\n \"username\": [\n \"es-admin\",\n \"es-system\"\n ]\n }\n }\n ]\n },\n {\n \"field\": {\n \"groups\": \"cn=people,dc=example,dc=com\"\n }\n },\n {\n \"except\": {\n \"field\": {\n \"metadata.terminated_date\": nil\n }\n }\n }\n ]\n }\n }\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->security()->putRoleMapping([\n \"name\" => \"mapping8\",\n \"body\" => [\n \"roles\" => array(\n \"superuser\",\n ),\n \"enabled\" => true,\n \"rules\" => [\n \"all\" => array(\n [\n \"any\" => array(\n [\n \"field\" => [\n \"dn\" => \"*,ou=admin,dc=example,dc=com\",\n ],\n ],\n [\n \"field\" => [\n \"username\" => array(\n \"es-admin\",\n \"es-system\",\n ),\n ],\n ],\n ),\n ],\n [\n \"field\" => [\n \"groups\" => \"cn=people,dc=example,dc=com\",\n ],\n ],\n [\n \"except\" => [\n \"field\" => [\n \"metadata.terminated_date\" => null,\n ],\n ],\n ],\n ),\n ],\n ],\n]);" + }, + { + "language": "curl", + "code": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"roles\":[\"superuser\"],\"enabled\":true,\"rules\":{\"all\":[{\"any\":[{\"field\":{\"dn\":\"*,ou=admin,dc=example,dc=com\"}},{\"field\":{\"username\":[\"es-admin\",\"es-system\"]}}]},{\"field\":{\"groups\":\"cn=people,dc=example,dc=com\"}},{\"except\":{\"field\":{\"metadata.terminated_date\":null}}}]}}' \"$ELASTICSEARCH_URL/_security/role_mapping/mapping8\"" + }, + { + "language": "Java", + "code": "client.security().putRoleMapping(p -> p\n .enabled(true)\n .name(\"mapping8\")\n .roles(\"superuser\")\n .rules(r -> r\n .all(List.of(RoleMappingRule.of(ro -> ro\n .any(List.of(RoleMappingRule.of(rol -> rol\n .field(NamedValue.of(\"dn\", List.of(FieldValue.of(\"*,ou=admin,\" +\n \"dc=example,dc=com\"))\n ))\n ), RoleMappingRule.of(role -> role\n .field(NamedValue.of(\"username\", List.of(FieldValue.of(\"es-admin\"),\n FieldValue.of(\"es-system\"))\n )))), RoleMappingRule.of(roleM -> roleM\n .field(NamedValue.of(\"groups\", List.of(FieldValue.of(\"cn=people,\" +\n \"dc=example,dc=com\"))\n )), RoleMappingRule.of(roleMa -> roleMa\n .except(e -> e\n .field(NamedValue.of(\"metadata.terminated_date\",\n List.of(FieldValue.of(null))\n )\n ))))\n )\n )\n )\n )\n )\n);\n" + } + ], + "specification/security/saml_prepare_authentication/examples/request/SamlPrepareAuthenticationRequestExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.security.saml_prepare_authentication(\n realm=\"saml1\",\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.security.samlPrepareAuthentication({\n realm: \"saml1\",\n});" + }, + { + "language": "Ruby", + "code": "response = client.security.saml_prepare_authentication(\n body: {\n \"realm\": \"saml1\"\n }\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->security()->samlPrepareAuthentication([\n \"body\" => [\n \"realm\" => \"saml1\",\n ],\n]);" + }, + { + "language": "curl", + "code": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"realm\":\"saml1\"}' \"$ELASTICSEARCH_URL/_security/saml/prepare\"" + }, + { + "language": "Java", + "code": "client.security().samlPrepareAuthentication(s -> s\n .realm(\"saml1\")\n);\n" + } + ], + "specification/security/saml_prepare_authentication/examples/request/SamlPrepareAuthenticationRequestExample2.yaml": [ + { + "language": "Python", + "code": "resp = client.security.saml_prepare_authentication(\n acs=\"https://kibana.org/api/security/saml/callback\",\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.security.samlPrepareAuthentication({\n acs: \"https://kibana.org/api/security/saml/callback\",\n});" + }, + { + "language": "Ruby", + "code": "response = client.security.saml_prepare_authentication(\n body: {\n \"acs\": \"https://kibana.org/api/security/saml/callback\"\n }\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->security()->samlPrepareAuthentication([\n \"body\" => [\n \"acs\" => \"https://kibana.org/api/security/saml/callback\",\n ],\n]);" + }, + { + "language": "curl", + "code": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"acs\":\"https://kibana.org/api/security/saml/callback\"}' \"$ELASTICSEARCH_URL/_security/saml/prepare\"" + }, + { + "language": "Java", + "code": "client.security().samlPrepareAuthentication(s -> s\n .acs(\"https://kibana.org/api/security/saml/callback\")\n);\n" + } + ], + "specification/security/saml_invalidate/examples/request/SamlInvalidateRequestExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.security.saml_invalidate(\n query_string=\"SAMLRequest=nZFda4MwFIb%2FiuS%2BmviRpqFaClKQdbvo2g12M2KMraCJ9cRR9utnW4Wyi13sMie873MeznJ1aWrnS3VQGR0j4mLkKC1NUeljjA77zYyhVbIE0dR%2By7fmaHq7U%2BdegXWGpAZ%2B%2F4pR32luBFTAtWgUcCv56%2Fp5y30X87Yz1khTIycdgpUW9kY7WdsC9zxoXTvMvWuVV98YyMnSGH2SYE5pwALBIr9QKiwDGpW0oGVUznGeMyJZKFkQ4jBf5HnhUymjIhzCAL3KNFihbYx8TBYzzGaY7EnIyZwHzCWMfiDnbRIftkSjJr%2BFu0e9v%2B0EgOquRiiZjKpiVFp6j50T4WXoyNJ%2FEWC9fdqc1t%2F1%2B2F3aUpjzhPiXpqMz1%2FHSn4A&SigAlg=http%3A%2F%2Fwww.w3.org%2F2001%2F04%2Fxmldsig-more%23rsa-sha256&Signature=MsAYz2NFdovMG2mXf6TSpu5vlQQyEJAg%2B4KCwBqJTmrb3yGXKUtIgvjqf88eCAK32v3eN8vupjPC8LglYmke1ZnjK0%2FKxzkvSjTVA7mMQe2AQdKbkyC038zzRq%2FYHcjFDE%2Bz0qISwSHZY2NyLePmwU7SexEXnIz37jKC6NMEhus%3D\",\n realm=\"saml1\",\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.security.samlInvalidate({\n query_string:\n \"SAMLRequest=nZFda4MwFIb%2FiuS%2BmviRpqFaClKQdbvo2g12M2KMraCJ9cRR9utnW4Wyi13sMie873MeznJ1aWrnS3VQGR0j4mLkKC1NUeljjA77zYyhVbIE0dR%2By7fmaHq7U%2BdegXWGpAZ%2B%2F4pR32luBFTAtWgUcCv56%2Fp5y30X87Yz1khTIycdgpUW9kY7WdsC9zxoXTvMvWuVV98YyMnSGH2SYE5pwALBIr9QKiwDGpW0oGVUznGeMyJZKFkQ4jBf5HnhUymjIhzCAL3KNFihbYx8TBYzzGaY7EnIyZwHzCWMfiDnbRIftkSjJr%2BFu0e9v%2B0EgOquRiiZjKpiVFp6j50T4WXoyNJ%2FEWC9fdqc1t%2F1%2B2F3aUpjzhPiXpqMz1%2FHSn4A&SigAlg=http%3A%2F%2Fwww.w3.org%2F2001%2F04%2Fxmldsig-more%23rsa-sha256&Signature=MsAYz2NFdovMG2mXf6TSpu5vlQQyEJAg%2B4KCwBqJTmrb3yGXKUtIgvjqf88eCAK32v3eN8vupjPC8LglYmke1ZnjK0%2FKxzkvSjTVA7mMQe2AQdKbkyC038zzRq%2FYHcjFDE%2Bz0qISwSHZY2NyLePmwU7SexEXnIz37jKC6NMEhus%3D\",\n realm: \"saml1\",\n});" + }, + { + "language": "Ruby", + "code": "response = client.security.saml_invalidate(\n body: {\n \"query_string\": \"SAMLRequest=nZFda4MwFIb%2FiuS%2BmviRpqFaClKQdbvo2g12M2KMraCJ9cRR9utnW4Wyi13sMie873MeznJ1aWrnS3VQGR0j4mLkKC1NUeljjA77zYyhVbIE0dR%2By7fmaHq7U%2BdegXWGpAZ%2B%2F4pR32luBFTAtWgUcCv56%2Fp5y30X87Yz1khTIycdgpUW9kY7WdsC9zxoXTvMvWuVV98YyMnSGH2SYE5pwALBIr9QKiwDGpW0oGVUznGeMyJZKFkQ4jBf5HnhUymjIhzCAL3KNFihbYx8TBYzzGaY7EnIyZwHzCWMfiDnbRIftkSjJr%2BFu0e9v%2B0EgOquRiiZjKpiVFp6j50T4WXoyNJ%2FEWC9fdqc1t%2F1%2B2F3aUpjzhPiXpqMz1%2FHSn4A&SigAlg=http%3A%2F%2Fwww.w3.org%2F2001%2F04%2Fxmldsig-more%23rsa-sha256&Signature=MsAYz2NFdovMG2mXf6TSpu5vlQQyEJAg%2B4KCwBqJTmrb3yGXKUtIgvjqf88eCAK32v3eN8vupjPC8LglYmke1ZnjK0%2FKxzkvSjTVA7mMQe2AQdKbkyC038zzRq%2FYHcjFDE%2Bz0qISwSHZY2NyLePmwU7SexEXnIz37jKC6NMEhus%3D\",\n \"realm\": \"saml1\"\n }\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->security()->samlInvalidate([\n \"body\" => [\n \"query_string\" => \"SAMLRequest=nZFda4MwFIb%2FiuS%2BmviRpqFaClKQdbvo2g12M2KMraCJ9cRR9utnW4Wyi13sMie873MeznJ1aWrnS3VQGR0j4mLkKC1NUeljjA77zYyhVbIE0dR%2By7fmaHq7U%2BdegXWGpAZ%2B%2F4pR32luBFTAtWgUcCv56%2Fp5y30X87Yz1khTIycdgpUW9kY7WdsC9zxoXTvMvWuVV98YyMnSGH2SYE5pwALBIr9QKiwDGpW0oGVUznGeMyJZKFkQ4jBf5HnhUymjIhzCAL3KNFihbYx8TBYzzGaY7EnIyZwHzCWMfiDnbRIftkSjJr%2BFu0e9v%2B0EgOquRiiZjKpiVFp6j50T4WXoyNJ%2FEWC9fdqc1t%2F1%2B2F3aUpjzhPiXpqMz1%2FHSn4A&SigAlg=http%3A%2F%2Fwww.w3.org%2F2001%2F04%2Fxmldsig-more%23rsa-sha256&Signature=MsAYz2NFdovMG2mXf6TSpu5vlQQyEJAg%2B4KCwBqJTmrb3yGXKUtIgvjqf88eCAK32v3eN8vupjPC8LglYmke1ZnjK0%2FKxzkvSjTVA7mMQe2AQdKbkyC038zzRq%2FYHcjFDE%2Bz0qISwSHZY2NyLePmwU7SexEXnIz37jKC6NMEhus%3D\",\n \"realm\" => \"saml1\",\n ],\n]);" + }, + { + "language": "curl", + "code": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"query_string\":\"SAMLRequest=nZFda4MwFIb%2FiuS%2BmviRpqFaClKQdbvo2g12M2KMraCJ9cRR9utnW4Wyi13sMie873MeznJ1aWrnS3VQGR0j4mLkKC1NUeljjA77zYyhVbIE0dR%2By7fmaHq7U%2BdegXWGpAZ%2B%2F4pR32luBFTAtWgUcCv56%2Fp5y30X87Yz1khTIycdgpUW9kY7WdsC9zxoXTvMvWuVV98YyMnSGH2SYE5pwALBIr9QKiwDGpW0oGVUznGeMyJZKFkQ4jBf5HnhUymjIhzCAL3KNFihbYx8TBYzzGaY7EnIyZwHzCWMfiDnbRIftkSjJr%2BFu0e9v%2B0EgOquRiiZjKpiVFp6j50T4WXoyNJ%2FEWC9fdqc1t%2F1%2B2F3aUpjzhPiXpqMz1%2FHSn4A&SigAlg=http%3A%2F%2Fwww.w3.org%2F2001%2F04%2Fxmldsig-more%23rsa-sha256&Signature=MsAYz2NFdovMG2mXf6TSpu5vlQQyEJAg%2B4KCwBqJTmrb3yGXKUtIgvjqf88eCAK32v3eN8vupjPC8LglYmke1ZnjK0%2FKxzkvSjTVA7mMQe2AQdKbkyC038zzRq%2FYHcjFDE%2Bz0qISwSHZY2NyLePmwU7SexEXnIz37jKC6NMEhus%3D\",\"realm\":\"saml1\"}' \"$ELASTICSEARCH_URL/_security/saml/invalidate\"" + }, + { + "language": "Java", + "code": "client.security().samlInvalidate(s -> s\n .queryString(\"SAMLRequest=nZFda4MwFIb%2FiuS%2BmviRpqFaClKQdbvo2g12M2KMraCJ9cRR9utnW4Wyi13sMie873MeznJ1aWrnS3VQGR0j4mLkKC1NUeljjA77zYyhVbIE0dR%2By7fmaHq7U%2BdegXWGpAZ%2B%2F4pR32luBFTAtWgUcCv56%2Fp5y30X87Yz1khTIycdgpUW9kY7WdsC9zxoXTvMvWuVV98YyMnSGH2SYE5pwALBIr9QKiwDGpW0oGVUznGeMyJZKFkQ4jBf5HnhUymjIhzCAL3KNFihbYx8TBYzzGaY7EnIyZwHzCWMfiDnbRIftkSjJr%2BFu0e9v%2B0EgOquRiiZjKpiVFp6j50T4WXoyNJ%2FEWC9fdqc1t%2F1%2B2F3aUpjzhPiXpqMz1%2FHSn4A&SigAlg=http%3A%2F%2Fwww.w3.org%2F2001%2F04%2Fxmldsig-more%23rsa-sha256&Signature=MsAYz2NFdovMG2mXf6TSpu5vlQQyEJAg%2B4KCwBqJTmrb3yGXKUtIgvjqf88eCAK32v3eN8vupjPC8LglYmke1ZnjK0%2FKxzkvSjTVA7mMQe2AQdKbkyC038zzRq%2FYHcjFDE%2Bz0qISwSHZY2NyLePmwU7SexEXnIz37jKC6NMEhus%3D\")\n .realm(\"saml1\")\n);\n" + } + ], + "specification/security/get_token/examples/request/GetUserAccessTokenRequestExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.security.get_token(\n grant_type=\"client_credentials\",\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.security.getToken({\n grant_type: \"client_credentials\",\n});" + }, + { + "language": "Ruby", + "code": "response = client.security.get_token(\n body: {\n \"grant_type\": \"client_credentials\"\n }\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->security()->getToken([\n \"body\" => [\n \"grant_type\" => \"client_credentials\",\n ],\n]);" + }, + { + "language": "curl", + "code": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"grant_type\":\"client_credentials\"}' \"$ELASTICSEARCH_URL/_security/oauth2/token\"" + }, + { + "language": "Java", + "code": "client.security().getToken(g -> g\n .grantType(AccessTokenGrantType.ClientCredentials)\n);\n" + } + ], + "specification/security/get_token/examples/request/GetUserAccessTokenRequestExample2.yaml": [ + { + "language": "Python", + "code": "resp = client.security.get_token(\n grant_type=\"password\",\n username=\"test_admin\",\n password=\"x-pack-test-password\",\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.security.getToken({\n grant_type: \"password\",\n username: \"test_admin\",\n password: \"x-pack-test-password\",\n});" + }, + { + "language": "Ruby", + "code": "response = client.security.get_token(\n body: {\n \"grant_type\": \"password\",\n \"username\": \"test_admin\",\n \"password\": \"x-pack-test-password\"\n }\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->security()->getToken([\n \"body\" => [\n \"grant_type\" => \"password\",\n \"username\" => \"test_admin\",\n \"password\" => \"x-pack-test-password\",\n ],\n]);" + }, + { + "language": "curl", + "code": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"grant_type\":\"password\",\"username\":\"test_admin\",\"password\":\"x-pack-test-password\"}' \"$ELASTICSEARCH_URL/_security/oauth2/token\"" + }, + { + "language": "Java", + "code": "client.security().getToken(g -> g\n .grantType(AccessTokenGrantType.Password)\n .password(\"x-pack-test-password\")\n .username(\"test_admin\")\n);\n" + } + ], + "specification/security/bulk_put_role/examples/request/SecurityBulkPutRoleRequestExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.security.bulk_put_role(\n roles={\n \"my_admin_role\": {\n \"cluster\": [\n \"all\"\n ],\n \"indices\": [\n {\n \"names\": [\n \"index1\",\n \"index2\"\n ],\n \"privileges\": [\n \"all\"\n ],\n \"field_security\": {\n \"grant\": [\n \"title\",\n \"body\"\n ]\n },\n \"query\": \"{\\\"match\\\": {\\\"title\\\": \\\"foo\\\"}}\"\n }\n ],\n \"applications\": [\n {\n \"application\": \"myapp\",\n \"privileges\": [\n \"admin\",\n \"read\"\n ],\n \"resources\": [\n \"*\"\n ]\n }\n ],\n \"run_as\": [\n \"other_user\"\n ],\n \"metadata\": {\n \"version\": 1\n }\n },\n \"my_user_role\": {\n \"cluster\": [\n \"all\"\n ],\n \"indices\": [\n {\n \"names\": [\n \"index1\"\n ],\n \"privileges\": [\n \"read\"\n ],\n \"field_security\": {\n \"grant\": [\n \"title\",\n \"body\"\n ]\n },\n \"query\": \"{\\\"match\\\": {\\\"title\\\": \\\"foo\\\"}}\"\n }\n ],\n \"applications\": [\n {\n \"application\": \"myapp\",\n \"privileges\": [\n \"admin\",\n \"read\"\n ],\n \"resources\": [\n \"*\"\n ]\n }\n ],\n \"run_as\": [\n \"other_user\"\n ],\n \"metadata\": {\n \"version\": 1\n }\n }\n },\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.security.bulkPutRole({\n roles: {\n my_admin_role: {\n cluster: [\"all\"],\n indices: [\n {\n names: [\"index1\", \"index2\"],\n privileges: [\"all\"],\n field_security: {\n grant: [\"title\", \"body\"],\n },\n query: '{\"match\": {\"title\": \"foo\"}}',\n },\n ],\n applications: [\n {\n application: \"myapp\",\n privileges: [\"admin\", \"read\"],\n resources: [\"*\"],\n },\n ],\n run_as: [\"other_user\"],\n metadata: {\n version: 1,\n },\n },\n my_user_role: {\n cluster: [\"all\"],\n indices: [\n {\n names: [\"index1\"],\n privileges: [\"read\"],\n field_security: {\n grant: [\"title\", \"body\"],\n },\n query: '{\"match\": {\"title\": \"foo\"}}',\n },\n ],\n applications: [\n {\n application: \"myapp\",\n privileges: [\"admin\", \"read\"],\n resources: [\"*\"],\n },\n ],\n run_as: [\"other_user\"],\n metadata: {\n version: 1,\n },\n },\n },\n});" + }, + { + "language": "Ruby", + "code": "response = client.security.bulk_put_role(\n body: {\n \"roles\": {\n \"my_admin_role\": {\n \"cluster\": [\n \"all\"\n ],\n \"indices\": [\n {\n \"names\": [\n \"index1\",\n \"index2\"\n ],\n \"privileges\": [\n \"all\"\n ],\n \"field_security\": {\n \"grant\": [\n \"title\",\n \"body\"\n ]\n },\n \"query\": \"{\\\"match\\\": {\\\"title\\\": \\\"foo\\\"}}\"\n }\n ],\n \"applications\": [\n {\n \"application\": \"myapp\",\n \"privileges\": [\n \"admin\",\n \"read\"\n ],\n \"resources\": [\n \"*\"\n ]\n }\n ],\n \"run_as\": [\n \"other_user\"\n ],\n \"metadata\": {\n \"version\": 1\n }\n },\n \"my_user_role\": {\n \"cluster\": [\n \"all\"\n ],\n \"indices\": [\n {\n \"names\": [\n \"index1\"\n ],\n \"privileges\": [\n \"read\"\n ],\n \"field_security\": {\n \"grant\": [\n \"title\",\n \"body\"\n ]\n },\n \"query\": \"{\\\"match\\\": {\\\"title\\\": \\\"foo\\\"}}\"\n }\n ],\n \"applications\": [\n {\n \"application\": \"myapp\",\n \"privileges\": [\n \"admin\",\n \"read\"\n ],\n \"resources\": [\n \"*\"\n ]\n }\n ],\n \"run_as\": [\n \"other_user\"\n ],\n \"metadata\": {\n \"version\": 1\n }\n }\n }\n }\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->security()->bulkPutRole([\n \"body\" => [\n \"roles\" => [\n \"my_admin_role\" => [\n \"cluster\" => array(\n \"all\",\n ),\n \"indices\" => array(\n [\n \"names\" => array(\n \"index1\",\n \"index2\",\n ),\n \"privileges\" => array(\n \"all\",\n ),\n \"field_security\" => [\n \"grant\" => array(\n \"title\",\n \"body\",\n ),\n ],\n \"query\" => \"{\\\"match\\\": {\\\"title\\\": \\\"foo\\\"}}\",\n ],\n ),\n \"applications\" => array(\n [\n \"application\" => \"myapp\",\n \"privileges\" => array(\n \"admin\",\n \"read\",\n ),\n \"resources\" => array(\n \"*\",\n ),\n ],\n ),\n \"run_as\" => array(\n \"other_user\",\n ),\n \"metadata\" => [\n \"version\" => 1,\n ],\n ],\n \"my_user_role\" => [\n \"cluster\" => array(\n \"all\",\n ),\n \"indices\" => array(\n [\n \"names\" => array(\n \"index1\",\n ),\n \"privileges\" => array(\n \"read\",\n ),\n \"field_security\" => [\n \"grant\" => array(\n \"title\",\n \"body\",\n ),\n ],\n \"query\" => \"{\\\"match\\\": {\\\"title\\\": \\\"foo\\\"}}\",\n ],\n ),\n \"applications\" => array(\n [\n \"application\" => \"myapp\",\n \"privileges\" => array(\n \"admin\",\n \"read\",\n ),\n \"resources\" => array(\n \"*\",\n ),\n ],\n ),\n \"run_as\" => array(\n \"other_user\",\n ),\n \"metadata\" => [\n \"version\" => 1,\n ],\n ],\n ],\n ],\n]);" + }, + { + "language": "curl", + "code": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"roles\":{\"my_admin_role\":{\"cluster\":[\"all\"],\"indices\":[{\"names\":[\"index1\",\"index2\"],\"privileges\":[\"all\"],\"field_security\":{\"grant\":[\"title\",\"body\"]},\"query\":\"{\\\"match\\\": {\\\"title\\\": \\\"foo\\\"}}\"}],\"applications\":[{\"application\":\"myapp\",\"privileges\":[\"admin\",\"read\"],\"resources\":[\"*\"]}],\"run_as\":[\"other_user\"],\"metadata\":{\"version\":1}},\"my_user_role\":{\"cluster\":[\"all\"],\"indices\":[{\"names\":[\"index1\"],\"privileges\":[\"read\"],\"field_security\":{\"grant\":[\"title\",\"body\"]},\"query\":\"{\\\"match\\\": {\\\"title\\\": \\\"foo\\\"}}\"}],\"applications\":[{\"application\":\"myapp\",\"privileges\":[\"admin\",\"read\"],\"resources\":[\"*\"]}],\"run_as\":[\"other_user\"],\"metadata\":{\"version\":1}}}}' \"$ELASTICSEARCH_URL/_security/role\"" + }, + { + "language": "Java", + "code": "client.security().bulkPutRole(b -> b\n .roles(Map.of(\"my_admin_role\", RoleDescriptor.of(r -> r\n .cluster(\"all\")\n .indices(i -> i\n .fieldSecurity(f -> f\n .grant(List.of(\"title\",\"body\"))\n )\n .names(List.of(\"index1\",\"index2\"))\n .privileges(\"all\")\n .query(q -> q\n .match(m -> m\n .field(\"title\")\n .query(FieldValue.of(\"foo\"))\n )\n )\n )\n .applications(a -> a\n .application(\"myapp\")\n .privileges(List.of(\"admin\",\"read\"))\n .resources(\"*\")\n )\n .metadata(\"version\", JsonData.fromJson(\"1\"))\n .runAs(\"other_user\")),\"my_user_role\", RoleDescriptor.of(ro -> ro\n .cluster(\"all\")\n .indices(i -> i\n .fieldSecurity(f -> f\n .grant(List.of(\"title\",\"body\"))\n )\n .names(\"index1\")\n .privileges(\"read\")\n .query(q -> q\n .match(m -> m\n .field(\"title\")\n .query(FieldValue.of(\"foo\"))\n )\n )\n )\n .applications(a -> a\n .application(\"myapp\")\n .privileges(List.of(\"admin\",\"read\"))\n .resources(\"*\")\n )\n .metadata(\"version\", JsonData.fromJson(\"1\"))\n .runAs(\"other_user\"))))\n);\n" + } + ], + "specification/security/bulk_put_role/examples/request/SecurityBulkPutRoleRequestExample3.yaml": [ + { + "language": "Python", + "code": "resp = client.security.put_role(\n name=\"only_remote_access_role\",\n remote_indices=[\n {\n \"clusters\": [\n \"my_remote\"\n ],\n \"names\": [\n \"logs*\"\n ],\n \"privileges\": [\n \"read\",\n \"read_cross_cluster\",\n \"view_index_metadata\"\n ]\n }\n ],\n remote_cluster=[\n {\n \"clusters\": [\n \"my_remote\"\n ],\n \"privileges\": [\n \"monitor_stats\"\n ]\n }\n ],\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.security.putRole({\n name: \"only_remote_access_role\",\n remote_indices: [\n {\n clusters: [\"my_remote\"],\n names: [\"logs*\"],\n privileges: [\"read\", \"read_cross_cluster\", \"view_index_metadata\"],\n },\n ],\n remote_cluster: [\n {\n clusters: [\"my_remote\"],\n privileges: [\"monitor_stats\"],\n },\n ],\n});" + }, + { + "language": "Ruby", + "code": "response = client.security.put_role(\n name: \"only_remote_access_role\",\n body: {\n \"remote_indices\": [\n {\n \"clusters\": [\n \"my_remote\"\n ],\n \"names\": [\n \"logs*\"\n ],\n \"privileges\": [\n \"read\",\n \"read_cross_cluster\",\n \"view_index_metadata\"\n ]\n }\n ],\n \"remote_cluster\": [\n {\n \"clusters\": [\n \"my_remote\"\n ],\n \"privileges\": [\n \"monitor_stats\"\n ]\n }\n ]\n }\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->security()->putRole([\n \"name\" => \"only_remote_access_role\",\n \"body\" => [\n \"remote_indices\" => array(\n [\n \"clusters\" => array(\n \"my_remote\",\n ),\n \"names\" => array(\n \"logs*\",\n ),\n \"privileges\" => array(\n \"read\",\n \"read_cross_cluster\",\n \"view_index_metadata\",\n ),\n ],\n ),\n \"remote_cluster\" => array(\n [\n \"clusters\" => array(\n \"my_remote\",\n ),\n \"privileges\" => array(\n \"monitor_stats\",\n ),\n ],\n ),\n ],\n]);" + }, + { + "language": "curl", + "code": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"remote_indices\":[{\"clusters\":[\"my_remote\"],\"names\":[\"logs*\"],\"privileges\":[\"read\",\"read_cross_cluster\",\"view_index_metadata\"]}],\"remote_cluster\":[{\"clusters\":[\"my_remote\"],\"privileges\":[\"monitor_stats\"]}]}' \"$ELASTICSEARCH_URL/_security/role/only_remote_access_role\"" + }, + { + "language": "Java", + "code": "client.security().putRole(p -> p\n .name(\"only_remote_access_role\")\n .remoteCluster(r -> r\n .clusters(\"my_remote\")\n .privileges(RemoteClusterPrivilege.MonitorStats)\n )\n .remoteIndices(r -> r\n .clusters(\"my_remote\")\n .names(\"logs*\")\n .privileges(List.of(\"read\",\"read_cross_cluster\",\"view_index_metadata\"))\n )\n);\n" + } + ], + "specification/security/bulk_put_role/examples/request/SecurityBulkPutRoleRequestExample2.yaml": [ + { + "language": "Python", + "code": "resp = client.security.bulk_put_role(\n roles={\n \"my_admin_role\": {\n \"cluster\": [\n \"bad_cluster_privilege\"\n ],\n \"indices\": [\n {\n \"names\": [\n \"index1\",\n \"index2\"\n ],\n \"privileges\": [\n \"all\"\n ],\n \"field_security\": {\n \"grant\": [\n \"title\",\n \"body\"\n ]\n },\n \"query\": \"{\\\"match\\\": {\\\"title\\\": \\\"foo\\\"}}\"\n }\n ],\n \"applications\": [\n {\n \"application\": \"myapp\",\n \"privileges\": [\n \"admin\",\n \"read\"\n ],\n \"resources\": [\n \"*\"\n ]\n }\n ],\n \"run_as\": [\n \"other_user\"\n ],\n \"metadata\": {\n \"version\": 1\n }\n },\n \"my_user_role\": {\n \"cluster\": [\n \"all\"\n ],\n \"indices\": [\n {\n \"names\": [\n \"index1\"\n ],\n \"privileges\": [\n \"read\"\n ],\n \"field_security\": {\n \"grant\": [\n \"title\",\n \"body\"\n ]\n },\n \"query\": \"{\\\"match\\\": {\\\"title\\\": \\\"foo\\\"}}\"\n }\n ],\n \"applications\": [\n {\n \"application\": \"myapp\",\n \"privileges\": [\n \"admin\",\n \"read\"\n ],\n \"resources\": [\n \"*\"\n ]\n }\n ],\n \"run_as\": [\n \"other_user\"\n ],\n \"metadata\": {\n \"version\": 1\n }\n }\n },\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.security.bulkPutRole({\n roles: {\n my_admin_role: {\n cluster: [\"bad_cluster_privilege\"],\n indices: [\n {\n names: [\"index1\", \"index2\"],\n privileges: [\"all\"],\n field_security: {\n grant: [\"title\", \"body\"],\n },\n query: '{\"match\": {\"title\": \"foo\"}}',\n },\n ],\n applications: [\n {\n application: \"myapp\",\n privileges: [\"admin\", \"read\"],\n resources: [\"*\"],\n },\n ],\n run_as: [\"other_user\"],\n metadata: {\n version: 1,\n },\n },\n my_user_role: {\n cluster: [\"all\"],\n indices: [\n {\n names: [\"index1\"],\n privileges: [\"read\"],\n field_security: {\n grant: [\"title\", \"body\"],\n },\n query: '{\"match\": {\"title\": \"foo\"}}',\n },\n ],\n applications: [\n {\n application: \"myapp\",\n privileges: [\"admin\", \"read\"],\n resources: [\"*\"],\n },\n ],\n run_as: [\"other_user\"],\n metadata: {\n version: 1,\n },\n },\n },\n});" + }, + { + "language": "Ruby", + "code": "response = client.security.bulk_put_role(\n body: {\n \"roles\": {\n \"my_admin_role\": {\n \"cluster\": [\n \"bad_cluster_privilege\"\n ],\n \"indices\": [\n {\n \"names\": [\n \"index1\",\n \"index2\"\n ],\n \"privileges\": [\n \"all\"\n ],\n \"field_security\": {\n \"grant\": [\n \"title\",\n \"body\"\n ]\n },\n \"query\": \"{\\\"match\\\": {\\\"title\\\": \\\"foo\\\"}}\"\n }\n ],\n \"applications\": [\n {\n \"application\": \"myapp\",\n \"privileges\": [\n \"admin\",\n \"read\"\n ],\n \"resources\": [\n \"*\"\n ]\n }\n ],\n \"run_as\": [\n \"other_user\"\n ],\n \"metadata\": {\n \"version\": 1\n }\n },\n \"my_user_role\": {\n \"cluster\": [\n \"all\"\n ],\n \"indices\": [\n {\n \"names\": [\n \"index1\"\n ],\n \"privileges\": [\n \"read\"\n ],\n \"field_security\": {\n \"grant\": [\n \"title\",\n \"body\"\n ]\n },\n \"query\": \"{\\\"match\\\": {\\\"title\\\": \\\"foo\\\"}}\"\n }\n ],\n \"applications\": [\n {\n \"application\": \"myapp\",\n \"privileges\": [\n \"admin\",\n \"read\"\n ],\n \"resources\": [\n \"*\"\n ]\n }\n ],\n \"run_as\": [\n \"other_user\"\n ],\n \"metadata\": {\n \"version\": 1\n }\n }\n }\n }\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->security()->bulkPutRole([\n \"body\" => [\n \"roles\" => [\n \"my_admin_role\" => [\n \"cluster\" => array(\n \"bad_cluster_privilege\",\n ),\n \"indices\" => array(\n [\n \"names\" => array(\n \"index1\",\n \"index2\",\n ),\n \"privileges\" => array(\n \"all\",\n ),\n \"field_security\" => [\n \"grant\" => array(\n \"title\",\n \"body\",\n ),\n ],\n \"query\" => \"{\\\"match\\\": {\\\"title\\\": \\\"foo\\\"}}\",\n ],\n ),\n \"applications\" => array(\n [\n \"application\" => \"myapp\",\n \"privileges\" => array(\n \"admin\",\n \"read\",\n ),\n \"resources\" => array(\n \"*\",\n ),\n ],\n ),\n \"run_as\" => array(\n \"other_user\",\n ),\n \"metadata\" => [\n \"version\" => 1,\n ],\n ],\n \"my_user_role\" => [\n \"cluster\" => array(\n \"all\",\n ),\n \"indices\" => array(\n [\n \"names\" => array(\n \"index1\",\n ),\n \"privileges\" => array(\n \"read\",\n ),\n \"field_security\" => [\n \"grant\" => array(\n \"title\",\n \"body\",\n ),\n ],\n \"query\" => \"{\\\"match\\\": {\\\"title\\\": \\\"foo\\\"}}\",\n ],\n ),\n \"applications\" => array(\n [\n \"application\" => \"myapp\",\n \"privileges\" => array(\n \"admin\",\n \"read\",\n ),\n \"resources\" => array(\n \"*\",\n ),\n ],\n ),\n \"run_as\" => array(\n \"other_user\",\n ),\n \"metadata\" => [\n \"version\" => 1,\n ],\n ],\n ],\n ],\n]);" + }, + { + "language": "curl", + "code": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"roles\":{\"my_admin_role\":{\"cluster\":[\"bad_cluster_privilege\"],\"indices\":[{\"names\":[\"index1\",\"index2\"],\"privileges\":[\"all\"],\"field_security\":{\"grant\":[\"title\",\"body\"]},\"query\":\"{\\\"match\\\": {\\\"title\\\": \\\"foo\\\"}}\"}],\"applications\":[{\"application\":\"myapp\",\"privileges\":[\"admin\",\"read\"],\"resources\":[\"*\"]}],\"run_as\":[\"other_user\"],\"metadata\":{\"version\":1}},\"my_user_role\":{\"cluster\":[\"all\"],\"indices\":[{\"names\":[\"index1\"],\"privileges\":[\"read\"],\"field_security\":{\"grant\":[\"title\",\"body\"]},\"query\":\"{\\\"match\\\": {\\\"title\\\": \\\"foo\\\"}}\"}],\"applications\":[{\"application\":\"myapp\",\"privileges\":[\"admin\",\"read\"],\"resources\":[\"*\"]}],\"run_as\":[\"other_user\"],\"metadata\":{\"version\":1}}}}' \"$ELASTICSEARCH_URL/_security/role\"" + }, + { + "language": "Java", + "code": "client.security().bulkPutRole(b -> b\n .roles(Map.of(\"my_admin_role\", RoleDescriptor.of(r -> r\n .cluster(\"bad_cluster_privilege\")\n .indices(i -> i\n .fieldSecurity(f -> f\n .grant(List.of(\"title\",\"body\"))\n )\n .names(List.of(\"index1\",\"index2\"))\n .privileges(\"all\")\n .query(q -> q\n .match(m -> m\n .field(\"title\")\n .query(FieldValue.of(\"foo\"))\n )\n )\n )\n .applications(a -> a\n .application(\"myapp\")\n .privileges(List.of(\"admin\",\"read\"))\n .resources(\"*\")\n )\n .metadata(\"version\", JsonData.fromJson(\"1\"))\n .runAs(\"other_user\")),\"my_user_role\", RoleDescriptor.of(ro -> ro\n .cluster(\"all\")\n .indices(i -> i\n .fieldSecurity(f -> f\n .grant(List.of(\"title\",\"body\"))\n )\n .names(\"index1\")\n .privileges(\"read\")\n .query(q -> q\n .match(m -> m\n .field(\"title\")\n .query(FieldValue.of(\"foo\"))\n )\n )\n )\n .applications(a -> a\n .application(\"myapp\")\n .privileges(List.of(\"admin\",\"read\"))\n .resources(\"*\")\n )\n .metadata(\"version\", JsonData.fromJson(\"1\"))\n .runAs(\"other_user\"))))\n);\n" + } + ], + "specification/security/get_role/examples/request/SecurityGetRoleRequestExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.security.get_role(\n name=\"my_admin_role\",\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.security.getRole({\n name: \"my_admin_role\",\n});" + }, + { + "language": "Ruby", + "code": "response = client.security.get_role(\n name: \"my_admin_role\"\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->security()->getRole([\n \"name\" => \"my_admin_role\",\n]);" + }, + { + "language": "curl", + "code": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_security/role/my_admin_role\"" + }, + { + "language": "Java", + "code": "client.security().getRole(g -> g\n .name(\"my_admin_role\")\n);\n" + } + ], + "specification/security/delete_role/examples/request/SecurityDeleteRoleRequestExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.security.delete_role(\n name=\"my_admin_role\",\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.security.deleteRole({\n name: \"my_admin_role\",\n});" + }, + { + "language": "Ruby", + "code": "response = client.security.delete_role(\n name: \"my_admin_role\"\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->security()->deleteRole([\n \"name\" => \"my_admin_role\",\n]);" + }, + { + "language": "curl", + "code": "curl -X DELETE -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_security/role/my_admin_role\"" + }, + { + "language": "Java", + "code": "client.security().deleteRole(d -> d\n .name(\"my_admin_role\")\n);\n" + } + ], + "specification/security/invalidate_token/examples/request/SecurityInvalidateTokenRequestExample5.yaml": [ + { + "language": "Python", + "code": "resp = client.security.invalidate_token(\n username=\"myuser\",\n realm_name=\"saml1\",\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.security.invalidateToken({\n username: \"myuser\",\n realm_name: \"saml1\",\n});" + }, + { + "language": "Ruby", + "code": "response = client.security.invalidate_token(\n body: {\n \"username\": \"myuser\",\n \"realm_name\": \"saml1\"\n }\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->security()->invalidateToken([\n \"body\" => [\n \"username\" => \"myuser\",\n \"realm_name\" => \"saml1\",\n ],\n]);" + }, + { + "language": "curl", + "code": "curl -X DELETE -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"username\":\"myuser\",\"realm_name\":\"saml1\"}' \"$ELASTICSEARCH_URL/_security/oauth2/token\"" + }, + { + "language": "Java", + "code": "client.security().invalidateToken(i -> i\n .realmName(\"saml1\")\n .username(\"myuser\")\n);\n" + } + ], + "specification/security/invalidate_token/examples/request/SecurityInvalidateTokenRequestExample4.yaml": [ + { + "language": "Python", + "code": "resp = client.security.invalidate_token(\n username=\"myuser\",\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.security.invalidateToken({\n username: \"myuser\",\n});" + }, + { + "language": "Ruby", + "code": "response = client.security.invalidate_token(\n body: {\n \"username\": \"myuser\"\n }\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->security()->invalidateToken([\n \"body\" => [\n \"username\" => \"myuser\",\n ],\n]);" + }, + { + "language": "curl", + "code": "curl -X DELETE -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"username\":\"myuser\"}' \"$ELASTICSEARCH_URL/_security/oauth2/token\"" + }, + { + "language": "Java", + "code": "client.security().invalidateToken(i -> i\n .username(\"myuser\")\n);\n" + } + ], + "specification/security/invalidate_token/examples/request/SecurityInvalidateTokenRequestExample3.yaml": [ + { + "language": "Python", + "code": "resp = client.security.invalidate_token(\n realm_name=\"saml1\",\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.security.invalidateToken({\n realm_name: \"saml1\",\n});" + }, + { + "language": "Ruby", + "code": "response = client.security.invalidate_token(\n body: {\n \"realm_name\": \"saml1\"\n }\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->security()->invalidateToken([\n \"body\" => [\n \"realm_name\" => \"saml1\",\n ],\n]);" + }, + { + "language": "curl", + "code": "curl -X DELETE -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"realm_name\":\"saml1\"}' \"$ELASTICSEARCH_URL/_security/oauth2/token\"" + }, + { + "language": "Java", + "code": "client.security().invalidateToken(i -> i\n .realmName(\"saml1\")\n);\n" + } + ], + "specification/security/invalidate_token/examples/request/SecurityInvalidateTokenRequestExample2.yaml": [ + { + "language": "Python", + "code": "resp = client.security.invalidate_token(\n refresh_token=\"vLBPvmAB6KvwvJZr27cS\",\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.security.invalidateToken({\n refresh_token: \"vLBPvmAB6KvwvJZr27cS\",\n});" + }, + { + "language": "Ruby", + "code": "response = client.security.invalidate_token(\n body: {\n \"refresh_token\": \"vLBPvmAB6KvwvJZr27cS\"\n }\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->security()->invalidateToken([\n \"body\" => [\n \"refresh_token\" => \"vLBPvmAB6KvwvJZr27cS\",\n ],\n]);" + }, + { + "language": "curl", + "code": "curl -X DELETE -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"refresh_token\":\"vLBPvmAB6KvwvJZr27cS\"}' \"$ELASTICSEARCH_URL/_security/oauth2/token\"" + }, + { + "language": "Java", + "code": "client.security().invalidateToken(i -> i\n .refreshToken(\"vLBPvmAB6KvwvJZr27cS\")\n);\n" + } + ], + "specification/security/invalidate_token/examples/request/SecurityInvalidateTokenRequestExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.security.invalidate_token(\n token=\"dGhpcyBpcyBub3QgYSByZWFsIHRva2VuIGJ1dCBpdCBpcyBvbmx5IHRlc3QgZGF0YS4gZG8gbm90IHRyeSB0byByZWFkIHRva2VuIQ==\",\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.security.invalidateToken({\n token:\n \"dGhpcyBpcyBub3QgYSByZWFsIHRva2VuIGJ1dCBpdCBpcyBvbmx5IHRlc3QgZGF0YS4gZG8gbm90IHRyeSB0byByZWFkIHRva2VuIQ==\",\n});" + }, + { + "language": "Ruby", + "code": "response = client.security.invalidate_token(\n body: {\n \"token\": \"dGhpcyBpcyBub3QgYSByZWFsIHRva2VuIGJ1dCBpdCBpcyBvbmx5IHRlc3QgZGF0YS4gZG8gbm90IHRyeSB0byByZWFkIHRva2VuIQ==\"\n }\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->security()->invalidateToken([\n \"body\" => [\n \"token\" => \"dGhpcyBpcyBub3QgYSByZWFsIHRva2VuIGJ1dCBpdCBpcyBvbmx5IHRlc3QgZGF0YS4gZG8gbm90IHRyeSB0byByZWFkIHRva2VuIQ==\",\n ],\n]);" + }, + { + "language": "curl", + "code": "curl -X DELETE -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"token\":\"dGhpcyBpcyBub3QgYSByZWFsIHRva2VuIGJ1dCBpdCBpcyBvbmx5IHRlc3QgZGF0YS4gZG8gbm90IHRyeSB0byByZWFkIHRva2VuIQ==\"}' \"$ELASTICSEARCH_URL/_security/oauth2/token\"" + }, + { + "language": "Java", + "code": "client.security().invalidateToken(i -> i\n .token(\"dGhpcyBpcyBub3QgYSByZWFsIHRva2VuIGJ1dCBpdCBpcyBvbmx5IHRlc3QgZGF0YS4gZG8gbm90IHRyeSB0byByZWFkIHRva2VuIQ==\")\n);\n" + } + ], + "specification/security/query_user/examples/request/SecurityQueryUserRequestExample2.yaml": [ + { + "language": "Python", + "code": "resp = client.security.query_user(\n query={\n \"bool\": {\n \"must\": [\n {\n \"wildcard\": {\n \"email\": \"*example.com\"\n }\n },\n {\n \"term\": {\n \"enabled\": True\n }\n }\n ],\n \"filter\": [\n {\n \"wildcard\": {\n \"roles\": \"*other*\"\n }\n }\n ]\n }\n },\n from=1,\n size=2,\n sort=[\n {\n \"username\": {\n \"order\": \"desc\"\n }\n }\n ],\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.security.queryUser({\n query: {\n bool: {\n must: [\n {\n wildcard: {\n email: \"*example.com\",\n },\n },\n {\n term: {\n enabled: true,\n },\n },\n ],\n filter: [\n {\n wildcard: {\n roles: \"*other*\",\n },\n },\n ],\n },\n },\n from: 1,\n size: 2,\n sort: [\n {\n username: {\n order: \"desc\",\n },\n },\n ],\n});" + }, + { + "language": "Ruby", + "code": "response = client.security.query_user(\n body: {\n \"query\": {\n \"bool\": {\n \"must\": [\n {\n \"wildcard\": {\n \"email\": \"*example.com\"\n }\n },\n {\n \"term\": {\n \"enabled\": true\n }\n }\n ],\n \"filter\": [\n {\n \"wildcard\": {\n \"roles\": \"*other*\"\n }\n }\n ]\n }\n },\n \"from\": 1,\n \"size\": 2,\n \"sort\": [\n {\n \"username\": {\n \"order\": \"desc\"\n }\n }\n ]\n }\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->security()->queryUser([\n \"body\" => [\n \"query\" => [\n \"bool\" => [\n \"must\" => array(\n [\n \"wildcard\" => [\n \"email\" => \"*example.com\",\n ],\n ],\n [\n \"term\" => [\n \"enabled\" => true,\n ],\n ],\n ),\n \"filter\" => array(\n [\n \"wildcard\" => [\n \"roles\" => \"*other*\",\n ],\n ],\n ),\n ],\n ],\n \"from\" => 1,\n \"size\" => 2,\n \"sort\" => array(\n [\n \"username\" => [\n \"order\" => \"desc\",\n ],\n ],\n ),\n ],\n]);" + }, + { + "language": "curl", + "code": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"query\":{\"bool\":{\"must\":[{\"wildcard\":{\"email\":\"*example.com\"}},{\"term\":{\"enabled\":true}}],\"filter\":[{\"wildcard\":{\"roles\":\"*other*\"}}]}},\"from\":1,\"size\":2,\"sort\":[{\"username\":{\"order\":\"desc\"}}]}' \"$ELASTICSEARCH_URL/_security/_query/user\"" + }, + { + "language": "Java", + "code": "client.security().queryUser(q -> q\n .from(1)\n .query(qu -> qu\n .bool(b -> b\n .filter(f -> f\n .wildcard(w -> w\n .field(\"roles\")\n .value(\"*other*\")\n )\n )\n .must(List.of(Query.of(que -> que\n .wildcard(w -> w\n .field(\"email\")\n .value(\"*example.com\")\n )),Query.of(quer -> quer\n .term(t -> t\n .field(\"enabled\")\n .value(FieldValue.of(true))\n ))))\n )\n )\n .size(2)\n .sort(s -> s\n .field(fi -> fi\n .field(\"username\")\n .order(SortOrder.Desc)\n )\n )\n);\n" + } + ], + "specification/security/query_user/examples/request/SecurityQueryUserRequestExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.security.query_user(\n with_profile_uid=True,\n query={\n \"prefix\": {\n \"roles\": \"other\"\n }\n },\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.security.queryUser({\n with_profile_uid: \"true\",\n query: {\n prefix: {\n roles: \"other\",\n },\n },\n});" + }, + { + "language": "Ruby", + "code": "response = client.security.query_user(\n with_profile_uid: \"true\",\n body: {\n \"query\": {\n \"prefix\": {\n \"roles\": \"other\"\n }\n }\n }\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->security()->queryUser([\n \"with_profile_uid\" => \"true\",\n \"body\" => [\n \"query\" => [\n \"prefix\" => [\n \"roles\" => \"other\",\n ],\n ],\n ],\n]);" + }, + { + "language": "curl", + "code": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"query\":{\"prefix\":{\"roles\":\"other\"}}}' \"$ELASTICSEARCH_URL/_security/_query/user?with_profile_uid=true\"" + }, + { + "language": "Java", + "code": "client.security().queryUser(q -> q\n .query(qu -> qu\n .prefix(p -> p\n .field(\"roles\")\n .value(\"other\")\n )\n )\n .withProfileUid(true)\n);\n" + } + ], + "specification/security/saml_service_provider_metadata/examples/request/SamlServiceProviderMetadataRequestExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.security.update_user_profile_data(\n uid=\"u_P_0BMHgaOK3p7k-PFWUCbw9dQ-UFjt01oWJ_Dp2PmPc_0\",\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.security.updateUserProfileData({\n uid: \"u_P_0BMHgaOK3p7k-PFWUCbw9dQ-UFjt01oWJ_Dp2PmPc_0\",\n});" + }, + { + "language": "Ruby", + "code": "response = client.security.update_user_profile_data(\n uid: \"u_P_0BMHgaOK3p7k-PFWUCbw9dQ-UFjt01oWJ_Dp2PmPc_0\"\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->security()->updateUserProfileData([\n \"uid\" => \"u_P_0BMHgaOK3p7k-PFWUCbw9dQ-UFjt01oWJ_Dp2PmPc_0\",\n]);" + }, + { + "language": "curl", + "code": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_security/profile/u_P_0BMHgaOK3p7k-PFWUCbw9dQ-UFjt01oWJ_Dp2PmPc_0/_data\"" + }, + { + "language": "Java", + "code": "client.security().updateUserProfileData(u -> u\n .uid(\"u_P_0BMHgaOK3p7k-PFWUCbw9dQ-UFjt01oWJ_Dp2PmPc_0\")\n);\n" + } + ], + "specification/security/update_api_key/examples/request/UpdateApiKeyRequestExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.security.update_api_key(\n id=\"VuaCfGcBCdbkQm-e5aOx\",\n role_descriptors={\n \"role-a\": {\n \"indices\": [\n {\n \"names\": [\n \"*\"\n ],\n \"privileges\": [\n \"write\"\n ]\n }\n ]\n }\n },\n metadata={\n \"environment\": {\n \"level\": 2,\n \"trusted\": True,\n \"tags\": [\n \"production\"\n ]\n }\n },\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.security.updateApiKey({\n id: \"VuaCfGcBCdbkQm-e5aOx\",\n role_descriptors: {\n \"role-a\": {\n indices: [\n {\n names: [\"*\"],\n privileges: [\"write\"],\n },\n ],\n },\n },\n metadata: {\n environment: {\n level: 2,\n trusted: true,\n tags: [\"production\"],\n },\n },\n});" + }, + { + "language": "Ruby", + "code": "response = client.security.update_api_key(\n id: \"VuaCfGcBCdbkQm-e5aOx\",\n body: {\n \"role_descriptors\": {\n \"role-a\": {\n \"indices\": [\n {\n \"names\": [\n \"*\"\n ],\n \"privileges\": [\n \"write\"\n ]\n }\n ]\n }\n },\n \"metadata\": {\n \"environment\": {\n \"level\": 2,\n \"trusted\": true,\n \"tags\": [\n \"production\"\n ]\n }\n }\n }\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->security()->updateApiKey([\n \"id\" => \"VuaCfGcBCdbkQm-e5aOx\",\n \"body\" => [\n \"role_descriptors\" => [\n \"role-a\" => [\n \"indices\" => array(\n [\n \"names\" => array(\n \"*\",\n ),\n \"privileges\" => array(\n \"write\",\n ),\n ],\n ),\n ],\n ],\n \"metadata\" => [\n \"environment\" => [\n \"level\" => 2,\n \"trusted\" => true,\n \"tags\" => array(\n \"production\",\n ),\n ],\n ],\n ],\n]);" + }, + { + "language": "curl", + "code": "curl -X PUT -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"role_descriptors\":{\"role-a\":{\"indices\":[{\"names\":[\"*\"],\"privileges\":[\"write\"]}]}},\"metadata\":{\"environment\":{\"level\":2,\"trusted\":true,\"tags\":[\"production\"]}}}' \"$ELASTICSEARCH_URL/_security/api_key/VuaCfGcBCdbkQm-e5aOx\"" + }, + { + "language": "Java", + "code": "client.security().updateApiKey(u -> u\n .id(\"VuaCfGcBCdbkQm-e5aOx\")\n .metadata(\"environment\", JsonData.fromJson(\"{\\\"level\\\":2,\\\"trusted\\\":true,\\\"tags\\\":[\\\"production\\\"]}\"))\n .roleDescriptors(\"role-a\", r -> r\n .indices(i -> i\n .names(\"*\")\n .privileges(\"write\")\n )\n )\n);\n" + } + ], + "specification/security/update_api_key/examples/request/UpdateApiKeyRequestExample2.yaml": [ + { + "language": "Python", + "code": "resp = client.security.update_api_key(\n id=\"VuaCfGcBCdbkQm-e5aOx\",\n role_descriptors={},\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.security.updateApiKey({\n id: \"VuaCfGcBCdbkQm-e5aOx\",\n role_descriptors: {},\n});" + }, + { + "language": "Ruby", + "code": "response = client.security.update_api_key(\n id: \"VuaCfGcBCdbkQm-e5aOx\",\n body: {\n \"role_descriptors\": {}\n }\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->security()->updateApiKey([\n \"id\" => \"VuaCfGcBCdbkQm-e5aOx\",\n \"body\" => [\n \"role_descriptors\" => new ArrayObject([]),\n ],\n]);" + }, + { + "language": "curl", + "code": "curl -X PUT -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"role_descriptors\":{}}' \"$ELASTICSEARCH_URL/_security/api_key/VuaCfGcBCdbkQm-e5aOx\"" + }, + { + "language": "Java", + "code": "client.security().updateApiKey(u -> u\n .id(\"VuaCfGcBCdbkQm-e5aOx\")\n);\n" + } + ], + "specification/security/delete_service_token/examples/request/DeleteServiceTokenRequestExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.security.delete_service_token(\n namespace=\"elastic\",\n service=\"fleet-server\",\n name=\"token42\",\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.security.deleteServiceToken({\n namespace: \"elastic\",\n service: \"fleet-server\",\n name: \"token42\",\n});" + }, + { + "language": "Ruby", + "code": "response = client.security.delete_service_token(\n namespace: \"elastic\",\n service: \"fleet-server\",\n name: \"token42\"\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->security()->deleteServiceToken([\n \"namespace\" => \"elastic\",\n \"service\" => \"fleet-server\",\n \"name\" => \"token42\",\n]);" + }, + { + "language": "curl", + "code": "curl -X DELETE -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_security/service/elastic/fleet-server/credential/token/token42\"" + }, + { + "language": "Java", + "code": "client.security().deleteServiceToken(d -> d\n .name(\"token42\")\n .namespace(\"elastic\")\n .service(\"fleet-server\")\n);\n" + } + ], + "specification/security/saml_logout/examples/request/SamlLogoutRequestExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.security.saml_logout(\n token=\"46ToAxZVaXVVZTVKOVF5YU04ZFJVUDVSZlV3\",\n refresh_token=\"mJdXLtmvTUSpoLwMvdBt_w\",\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.security.samlLogout({\n token: \"46ToAxZVaXVVZTVKOVF5YU04ZFJVUDVSZlV3\",\n refresh_token: \"mJdXLtmvTUSpoLwMvdBt_w\",\n});" + }, + { + "language": "Ruby", + "code": "response = client.security.saml_logout(\n body: {\n \"token\": \"46ToAxZVaXVVZTVKOVF5YU04ZFJVUDVSZlV3\",\n \"refresh_token\": \"mJdXLtmvTUSpoLwMvdBt_w\"\n }\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->security()->samlLogout([\n \"body\" => [\n \"token\" => \"46ToAxZVaXVVZTVKOVF5YU04ZFJVUDVSZlV3\",\n \"refresh_token\" => \"mJdXLtmvTUSpoLwMvdBt_w\",\n ],\n]);" + }, + { + "language": "curl", + "code": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"token\":\"46ToAxZVaXVVZTVKOVF5YU04ZFJVUDVSZlV3\",\"refresh_token\":\"mJdXLtmvTUSpoLwMvdBt_w\"}' \"$ELASTICSEARCH_URL/_security/saml/logout\"" + }, + { + "language": "Java", + "code": "client.security().samlLogout(s -> s\n .refreshToken(\"mJdXLtmvTUSpoLwMvdBt_w\")\n .token(\"46ToAxZVaXVVZTVKOVF5YU04ZFJVUDVSZlV3\")\n);\n" + } + ], + "specification/security/oidc_authenticate/examples/request/OidcAuthenticateRequestExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.security.oidc_authenticate(\n redirect_uri=\"https://oidc-kibana.elastic.co:5603/api/security/oidc/callback?code=jtI3Ntt8v3_XvcLzCFGq&state=4dbrihtIAt3wBTwo6DxK-vdk-sSyDBV8Yf0AjdkdT5I\",\n state=\"4dbrihtIAt3wBTwo6DxK-vdk-sSyDBV8Yf0AjdkdT5I\",\n nonce=\"WaBPH0KqPVdG5HHdSxPRjfoZbXMCicm5v1OiAj0DUFM\",\n realm=\"oidc1\",\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.security.oidcAuthenticate({\n redirect_uri:\n \"https://oidc-kibana.elastic.co:5603/api/security/oidc/callback?code=jtI3Ntt8v3_XvcLzCFGq&state=4dbrihtIAt3wBTwo6DxK-vdk-sSyDBV8Yf0AjdkdT5I\",\n state: \"4dbrihtIAt3wBTwo6DxK-vdk-sSyDBV8Yf0AjdkdT5I\",\n nonce: \"WaBPH0KqPVdG5HHdSxPRjfoZbXMCicm5v1OiAj0DUFM\",\n realm: \"oidc1\",\n});" + }, + { + "language": "Ruby", + "code": "response = client.security.oidc_authenticate(\n body: {\n \"redirect_uri\": \"https://oidc-kibana.elastic.co:5603/api/security/oidc/callback?code=jtI3Ntt8v3_XvcLzCFGq&state=4dbrihtIAt3wBTwo6DxK-vdk-sSyDBV8Yf0AjdkdT5I\",\n \"state\": \"4dbrihtIAt3wBTwo6DxK-vdk-sSyDBV8Yf0AjdkdT5I\",\n \"nonce\": \"WaBPH0KqPVdG5HHdSxPRjfoZbXMCicm5v1OiAj0DUFM\",\n \"realm\": \"oidc1\"\n }\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->security()->oidcAuthenticate([\n \"body\" => [\n \"redirect_uri\" => \"https://oidc-kibana.elastic.co:5603/api/security/oidc/callback?code=jtI3Ntt8v3_XvcLzCFGq&state=4dbrihtIAt3wBTwo6DxK-vdk-sSyDBV8Yf0AjdkdT5I\",\n \"state\" => \"4dbrihtIAt3wBTwo6DxK-vdk-sSyDBV8Yf0AjdkdT5I\",\n \"nonce\" => \"WaBPH0KqPVdG5HHdSxPRjfoZbXMCicm5v1OiAj0DUFM\",\n \"realm\" => \"oidc1\",\n ],\n]);" + }, + { + "language": "curl", + "code": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"redirect_uri\":\"https://oidc-kibana.elastic.co:5603/api/security/oidc/callback?code=jtI3Ntt8v3_XvcLzCFGq&state=4dbrihtIAt3wBTwo6DxK-vdk-sSyDBV8Yf0AjdkdT5I\",\"state\":\"4dbrihtIAt3wBTwo6DxK-vdk-sSyDBV8Yf0AjdkdT5I\",\"nonce\":\"WaBPH0KqPVdG5HHdSxPRjfoZbXMCicm5v1OiAj0DUFM\",\"realm\":\"oidc1\"}' \"$ELASTICSEARCH_URL/_security/oidc/authenticate\"" + }, + { + "language": "Java", + "code": "client.security().oidcAuthenticate(o -> o\n .nonce(\"WaBPH0KqPVdG5HHdSxPRjfoZbXMCicm5v1OiAj0DUFM\")\n .realm(\"oidc1\")\n .redirectUri(\"https://oidc-kibana.elastic.co:5603/api/security/oidc/callback?code=jtI3Ntt8v3_XvcLzCFGq&state=4dbrihtIAt3wBTwo6DxK-vdk-sSyDBV8Yf0AjdkdT5I\")\n .state(\"4dbrihtIAt3wBTwo6DxK-vdk-sSyDBV8Yf0AjdkdT5I\")\n);\n" + } + ], + "specification/security/grant_api_key/examples/request/SecurityGrantApiKeyRequestExample2.yaml": [ + { + "language": "Python", + "code": "resp = client.security.grant_api_key(\n grant_type=\"password\",\n username=\"test_admin\",\n password=\"x-pack-test-password\",\n run_as=\"test_user\",\n api_key={\n \"name\": \"another-api-key\"\n },\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.security.grantApiKey({\n grant_type: \"password\",\n username: \"test_admin\",\n password: \"x-pack-test-password\",\n run_as: \"test_user\",\n api_key: {\n name: \"another-api-key\",\n },\n});" + }, + { + "language": "Ruby", + "code": "response = client.security.grant_api_key(\n body: {\n \"grant_type\": \"password\",\n \"username\": \"test_admin\",\n \"password\": \"x-pack-test-password\",\n \"run_as\": \"test_user\",\n \"api_key\": {\n \"name\": \"another-api-key\"\n }\n }\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->security()->grantApiKey([\n \"body\" => [\n \"grant_type\" => \"password\",\n \"username\" => \"test_admin\",\n \"password\" => \"x-pack-test-password\",\n \"run_as\" => \"test_user\",\n \"api_key\" => [\n \"name\" => \"another-api-key\",\n ],\n ],\n]);" + }, + { + "language": "curl", + "code": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"grant_type\":\"password\",\"username\":\"test_admin\",\"password\":\"x-pack-test-password\",\"run_as\":\"test_user\",\"api_key\":{\"name\":\"another-api-key\"}}' \"$ELASTICSEARCH_URL/_security/api_key/grant\"" + }, + { + "language": "Java", + "code": "client.security().grantApiKey(g -> g\n .apiKey(a -> a\n .name(\"another-api-key\")\n )\n .grantType(ApiKeyGrantType.Password)\n .password(\"x-pack-test-password\")\n .runAs(\"test_user\")\n .username(\"test_admin\")\n);\n" + } + ], + "specification/security/grant_api_key/examples/request/SecurityGrantApiKeyRequestExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.security.grant_api_key(\n grant_type=\"password\",\n username=\"test_admin\",\n password=\"x-pack-test-password\",\n api_key={\n \"name\": \"my-api-key\",\n \"expiration\": \"1d\",\n \"role_descriptors\": {\n \"role-a\": {\n \"cluster\": [\n \"all\"\n ],\n \"indices\": [\n {\n \"names\": [\n \"index-a*\"\n ],\n \"privileges\": [\n \"read\"\n ]\n }\n ]\n },\n \"role-b\": {\n \"cluster\": [\n \"all\"\n ],\n \"indices\": [\n {\n \"names\": [\n \"index-b*\"\n ],\n \"privileges\": [\n \"all\"\n ]\n }\n ]\n }\n },\n \"metadata\": {\n \"application\": \"my-application\",\n \"environment\": {\n \"level\": 1,\n \"trusted\": True,\n \"tags\": [\n \"dev\",\n \"staging\"\n ]\n }\n }\n },\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.security.grantApiKey({\n grant_type: \"password\",\n username: \"test_admin\",\n password: \"x-pack-test-password\",\n api_key: {\n name: \"my-api-key\",\n expiration: \"1d\",\n role_descriptors: {\n \"role-a\": {\n cluster: [\"all\"],\n indices: [\n {\n names: [\"index-a*\"],\n privileges: [\"read\"],\n },\n ],\n },\n \"role-b\": {\n cluster: [\"all\"],\n indices: [\n {\n names: [\"index-b*\"],\n privileges: [\"all\"],\n },\n ],\n },\n },\n metadata: {\n application: \"my-application\",\n environment: {\n level: 1,\n trusted: true,\n tags: [\"dev\", \"staging\"],\n },\n },\n },\n});" + }, + { + "language": "Ruby", + "code": "response = client.security.grant_api_key(\n body: {\n \"grant_type\": \"password\",\n \"username\": \"test_admin\",\n \"password\": \"x-pack-test-password\",\n \"api_key\": {\n \"name\": \"my-api-key\",\n \"expiration\": \"1d\",\n \"role_descriptors\": {\n \"role-a\": {\n \"cluster\": [\n \"all\"\n ],\n \"indices\": [\n {\n \"names\": [\n \"index-a*\"\n ],\n \"privileges\": [\n \"read\"\n ]\n }\n ]\n },\n \"role-b\": {\n \"cluster\": [\n \"all\"\n ],\n \"indices\": [\n {\n \"names\": [\n \"index-b*\"\n ],\n \"privileges\": [\n \"all\"\n ]\n }\n ]\n }\n },\n \"metadata\": {\n \"application\": \"my-application\",\n \"environment\": {\n \"level\": 1,\n \"trusted\": true,\n \"tags\": [\n \"dev\",\n \"staging\"\n ]\n }\n }\n }\n }\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->security()->grantApiKey([\n \"body\" => [\n \"grant_type\" => \"password\",\n \"username\" => \"test_admin\",\n \"password\" => \"x-pack-test-password\",\n \"api_key\" => [\n \"name\" => \"my-api-key\",\n \"expiration\" => \"1d\",\n \"role_descriptors\" => [\n \"role-a\" => [\n \"cluster\" => array(\n \"all\",\n ),\n \"indices\" => array(\n [\n \"names\" => array(\n \"index-a*\",\n ),\n \"privileges\" => array(\n \"read\",\n ),\n ],\n ),\n ],\n \"role-b\" => [\n \"cluster\" => array(\n \"all\",\n ),\n \"indices\" => array(\n [\n \"names\" => array(\n \"index-b*\",\n ),\n \"privileges\" => array(\n \"all\",\n ),\n ],\n ),\n ],\n ],\n \"metadata\" => [\n \"application\" => \"my-application\",\n \"environment\" => [\n \"level\" => 1,\n \"trusted\" => true,\n \"tags\" => array(\n \"dev\",\n \"staging\",\n ),\n ],\n ],\n ],\n ],\n]);" + }, + { + "language": "curl", + "code": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"grant_type\":\"password\",\"username\":\"test_admin\",\"password\":\"x-pack-test-password\",\"api_key\":{\"name\":\"my-api-key\",\"expiration\":\"1d\",\"role_descriptors\":{\"role-a\":{\"cluster\":[\"all\"],\"indices\":[{\"names\":[\"index-a*\"],\"privileges\":[\"read\"]}]},\"role-b\":{\"cluster\":[\"all\"],\"indices\":[{\"names\":[\"index-b*\"],\"privileges\":[\"all\"]}]}},\"metadata\":{\"application\":\"my-application\",\"environment\":{\"level\":1,\"trusted\":true,\"tags\":[\"dev\",\"staging\"]}}}}' \"$ELASTICSEARCH_URL/_security/api_key/grant\"" + }, + { + "language": "Java", + "code": "client.security().grantApiKey(g -> g\n .apiKey(a -> a\n .name(\"my-api-key\")\n .expiration(e -> e\n .time(\"1d\")\n )\n .roleDescriptors(Map.of(\"role-b\", RoleDescriptor.of(r -> r\n .cluster(\"all\")\n .indices(i -> i\n .names(\"index-b*\")\n .privileges(\"all\")\n )),\"role-a\", RoleDescriptor.of(r -> r\n .cluster(\"all\")\n .indices(i -> i\n .names(\"index-a*\")\n .privileges(\"read\")\n ))))\n .metadata(Map.of(\"environment\", JsonData.fromJson(\"{\\\"level\\\":1,\\\"trusted\\\":true,\\\"tags\\\":[\\\"dev\\\",\\\"staging\\\"]}\"),\"application\", JsonData.fromJson(\"\\\"my-application\\\"\")))\n )\n .grantType(ApiKeyGrantType.Password)\n .password(\"x-pack-test-password\")\n .username(\"test_admin\")\n);\n" + } + ], + "specification/security/get_service_accounts/examples/request/GetServiceAccountsRequestExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.security.get_service_accounts(\n namespace=\"elastic\",\n service=\"fleet-server\",\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.security.getServiceAccounts({\n namespace: \"elastic\",\n service: \"fleet-server\",\n});" + }, + { + "language": "Ruby", + "code": "response = client.security.get_service_accounts(\n namespace: \"elastic\",\n service: \"fleet-server\"\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->security()->getServiceAccounts([\n \"namespace\" => \"elastic\",\n \"service\" => \"fleet-server\",\n]);" + }, + { + "language": "curl", + "code": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_security/service/elastic/fleet-server\"" + }, + { + "language": "Java", + "code": "client.security().getServiceAccounts(g -> g\n .namespace(\"elastic\")\n .service(\"fleet-server\")\n);\n" + } + ], + "specification/security/delete_role_mapping/examples/request/SecurityDeleteRoleMappingRequestExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.security.delete_role_mapping(\n name=\"mapping1\",\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.security.deleteRoleMapping({\n name: \"mapping1\",\n});" + }, + { + "language": "Ruby", + "code": "response = client.security.delete_role_mapping(\n name: \"mapping1\"\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->security()->deleteRoleMapping([\n \"name\" => \"mapping1\",\n]);" + }, + { + "language": "curl", + "code": "curl -X DELETE -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_security/role_mapping/mapping1\"" + }, + { + "language": "Java", + "code": "client.security().deleteRoleMapping(d -> d\n .name(\"mapping1\")\n);\n" + } + ], + "specification/security/put_role/examples/request/SecurityPutRoleRequestExample3.yaml": [ + { + "language": "Python", + "code": "resp = client.security.put_role(\n name=\"only_remote_access_role\",\n remote_indices=[\n {\n \"clusters\": [\n \"my_remote\"\n ],\n \"names\": [\n \"logs*\"\n ],\n \"privileges\": [\n \"read\",\n \"read_cross_cluster\",\n \"view_index_metadata\"\n ]\n }\n ],\n remote_cluster=[\n {\n \"clusters\": [\n \"my_remote\"\n ],\n \"privileges\": [\n \"monitor_stats\"\n ]\n }\n ],\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.security.putRole({\n name: \"only_remote_access_role\",\n remote_indices: [\n {\n clusters: [\"my_remote\"],\n names: [\"logs*\"],\n privileges: [\"read\", \"read_cross_cluster\", \"view_index_metadata\"],\n },\n ],\n remote_cluster: [\n {\n clusters: [\"my_remote\"],\n privileges: [\"monitor_stats\"],\n },\n ],\n});" + }, + { + "language": "Ruby", + "code": "response = client.security.put_role(\n name: \"only_remote_access_role\",\n body: {\n \"remote_indices\": [\n {\n \"clusters\": [\n \"my_remote\"\n ],\n \"names\": [\n \"logs*\"\n ],\n \"privileges\": [\n \"read\",\n \"read_cross_cluster\",\n \"view_index_metadata\"\n ]\n }\n ],\n \"remote_cluster\": [\n {\n \"clusters\": [\n \"my_remote\"\n ],\n \"privileges\": [\n \"monitor_stats\"\n ]\n }\n ]\n }\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->security()->putRole([\n \"name\" => \"only_remote_access_role\",\n \"body\" => [\n \"remote_indices\" => array(\n [\n \"clusters\" => array(\n \"my_remote\",\n ),\n \"names\" => array(\n \"logs*\",\n ),\n \"privileges\" => array(\n \"read\",\n \"read_cross_cluster\",\n \"view_index_metadata\",\n ),\n ],\n ),\n \"remote_cluster\" => array(\n [\n \"clusters\" => array(\n \"my_remote\",\n ),\n \"privileges\" => array(\n \"monitor_stats\",\n ),\n ],\n ),\n ],\n]);" + }, + { + "language": "curl", + "code": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"remote_indices\":[{\"clusters\":[\"my_remote\"],\"names\":[\"logs*\"],\"privileges\":[\"read\",\"read_cross_cluster\",\"view_index_metadata\"]}],\"remote_cluster\":[{\"clusters\":[\"my_remote\"],\"privileges\":[\"monitor_stats\"]}]}' \"$ELASTICSEARCH_URL/_security/role/only_remote_access_role\"" + }, + { + "language": "Java", + "code": "client.security().putRole(p -> p\n .name(\"only_remote_access_role\")\n .remoteCluster(r -> r\n .clusters(\"my_remote\")\n .privileges(RemoteClusterPrivilege.MonitorStats)\n )\n .remoteIndices(r -> r\n .clusters(\"my_remote\")\n .names(\"logs*\")\n .privileges(List.of(\"read\",\"read_cross_cluster\",\"view_index_metadata\"))\n )\n);\n" + } + ], + "specification/security/put_role/examples/request/SecurityPutRoleRequestExample2.yaml": [ + { + "language": "Python", + "code": "resp = client.security.put_role(\n name=\"cli_or_drivers_minimal\",\n cluster=[\n \"cluster:monitor/main\"\n ],\n indices=[\n {\n \"names\": [\n \"test\"\n ],\n \"privileges\": [\n \"read\",\n \"indices:admin/get\"\n ]\n }\n ],\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.security.putRole({\n name: \"cli_or_drivers_minimal\",\n cluster: [\"cluster:monitor/main\"],\n indices: [\n {\n names: [\"test\"],\n privileges: [\"read\", \"indices:admin/get\"],\n },\n ],\n});" + }, + { + "language": "Ruby", + "code": "response = client.security.put_role(\n name: \"cli_or_drivers_minimal\",\n body: {\n \"cluster\": [\n \"cluster:monitor/main\"\n ],\n \"indices\": [\n {\n \"names\": [\n \"test\"\n ],\n \"privileges\": [\n \"read\",\n \"indices:admin/get\"\n ]\n }\n ]\n }\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->security()->putRole([\n \"name\" => \"cli_or_drivers_minimal\",\n \"body\" => [\n \"cluster\" => array(\n \"cluster:monitor/main\",\n ),\n \"indices\" => array(\n [\n \"names\" => array(\n \"test\",\n ),\n \"privileges\" => array(\n \"read\",\n \"indices:admin/get\",\n ),\n ],\n ),\n ],\n]);" + }, + { + "language": "curl", + "code": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"cluster\":[\"cluster:monitor/main\"],\"indices\":[{\"names\":[\"test\"],\"privileges\":[\"read\",\"indices:admin/get\"]}]}' \"$ELASTICSEARCH_URL/_security/role/cli_or_drivers_minimal\"" + }, + { + "language": "Java", + "code": "client.security().putRole(p -> p\n .cluster(\"cluster:monitor/main\")\n .indices(i -> i\n .names(\"test\")\n .privileges(List.of(\"read\",\"indices:admin/get\"))\n )\n .name(\"cli_or_drivers_minimal\")\n);\n" + } + ], + "specification/security/put_role/examples/request/SecurityPutRoleRequestExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.security.put_role(\n name=\"my_admin_role\",\n description=\"Grants full access to all management features within the cluster.\",\n cluster=[\n \"all\"\n ],\n indices=[\n {\n \"names\": [\n \"index1\",\n \"index2\"\n ],\n \"privileges\": [\n \"all\"\n ],\n \"field_security\": {\n \"grant\": [\n \"title\",\n \"body\"\n ]\n },\n \"query\": \"{\\\"match\\\": {\\\"title\\\": \\\"foo\\\"}}\"\n }\n ],\n applications=[\n {\n \"application\": \"myapp\",\n \"privileges\": [\n \"admin\",\n \"read\"\n ],\n \"resources\": [\n \"*\"\n ]\n }\n ],\n run_as=[\n \"other_user\"\n ],\n metadata={\n \"version\": 1\n },\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.security.putRole({\n name: \"my_admin_role\",\n description:\n \"Grants full access to all management features within the cluster.\",\n cluster: [\"all\"],\n indices: [\n {\n names: [\"index1\", \"index2\"],\n privileges: [\"all\"],\n field_security: {\n grant: [\"title\", \"body\"],\n },\n query: '{\"match\": {\"title\": \"foo\"}}',\n },\n ],\n applications: [\n {\n application: \"myapp\",\n privileges: [\"admin\", \"read\"],\n resources: [\"*\"],\n },\n ],\n run_as: [\"other_user\"],\n metadata: {\n version: 1,\n },\n});" + }, + { + "language": "Ruby", + "code": "response = client.security.put_role(\n name: \"my_admin_role\",\n body: {\n \"description\": \"Grants full access to all management features within the cluster.\",\n \"cluster\": [\n \"all\"\n ],\n \"indices\": [\n {\n \"names\": [\n \"index1\",\n \"index2\"\n ],\n \"privileges\": [\n \"all\"\n ],\n \"field_security\": {\n \"grant\": [\n \"title\",\n \"body\"\n ]\n },\n \"query\": \"{\\\"match\\\": {\\\"title\\\": \\\"foo\\\"}}\"\n }\n ],\n \"applications\": [\n {\n \"application\": \"myapp\",\n \"privileges\": [\n \"admin\",\n \"read\"\n ],\n \"resources\": [\n \"*\"\n ]\n }\n ],\n \"run_as\": [\n \"other_user\"\n ],\n \"metadata\": {\n \"version\": 1\n }\n }\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->security()->putRole([\n \"name\" => \"my_admin_role\",\n \"body\" => [\n \"description\" => \"Grants full access to all management features within the cluster.\",\n \"cluster\" => array(\n \"all\",\n ),\n \"indices\" => array(\n [\n \"names\" => array(\n \"index1\",\n \"index2\",\n ),\n \"privileges\" => array(\n \"all\",\n ),\n \"field_security\" => [\n \"grant\" => array(\n \"title\",\n \"body\",\n ),\n ],\n \"query\" => \"{\\\"match\\\": {\\\"title\\\": \\\"foo\\\"}}\",\n ],\n ),\n \"applications\" => array(\n [\n \"application\" => \"myapp\",\n \"privileges\" => array(\n \"admin\",\n \"read\",\n ),\n \"resources\" => array(\n \"*\",\n ),\n ],\n ),\n \"run_as\" => array(\n \"other_user\",\n ),\n \"metadata\" => [\n \"version\" => 1,\n ],\n ],\n]);" + }, + { + "language": "curl", + "code": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"description\":\"Grants full access to all management features within the cluster.\",\"cluster\":[\"all\"],\"indices\":[{\"names\":[\"index1\",\"index2\"],\"privileges\":[\"all\"],\"field_security\":{\"grant\":[\"title\",\"body\"]},\"query\":\"{\\\"match\\\": {\\\"title\\\": \\\"foo\\\"}}\"}],\"applications\":[{\"application\":\"myapp\",\"privileges\":[\"admin\",\"read\"],\"resources\":[\"*\"]}],\"run_as\":[\"other_user\"],\"metadata\":{\"version\":1}}' \"$ELASTICSEARCH_URL/_security/role/my_admin_role\"" + }, + { + "language": "Java", + "code": "client.security().putRole(p -> p\n .applications(a -> a\n .application(\"myapp\")\n .privileges(List.of(\"admin\",\"read\"))\n .resources(\"*\")\n )\n .cluster(\"all\")\n .description(\"Grants full access to all management features within the cluster.\")\n .indices(i -> i\n .fieldSecurity(f -> f\n .grant(List.of(\"title\",\"body\"))\n )\n .names(List.of(\"index1\",\"index2\"))\n .privileges(\"all\")\n .query(q -> q\n .match(m -> m\n .field(\"title\")\n .query(FieldValue.of(\"foo\"))\n )\n )\n )\n .metadata(\"version\", JsonData.fromJson(\"1\"))\n .name(\"my_admin_role\")\n .runAs(\"other_user\")\n);\n" + } + ], + "specification/security/bulk_delete_role/examples/request/SecurityBulkDeleteRoleRequestExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.security.bulk_delete_role(\n names=[\n \"my_admin_role\",\n \"my_user_role\"\n ],\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.security.bulkDeleteRole({\n names: [\"my_admin_role\", \"my_user_role\"],\n});" + }, + { + "language": "Ruby", + "code": "response = client.security.bulk_delete_role(\n body: {\n \"names\": [\n \"my_admin_role\",\n \"my_user_role\"\n ]\n }\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->security()->bulkDeleteRole([\n \"body\" => [\n \"names\" => array(\n \"my_admin_role\",\n \"my_user_role\",\n ),\n ],\n]);" + }, + { + "language": "curl", + "code": "curl -X DELETE -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"names\":[\"my_admin_role\",\"my_user_role\"]}' \"$ELASTICSEARCH_URL/_security/role\"" + }, + { + "language": "Java", + "code": "client.security().bulkDeleteRole(b -> b\n .names(List.of(\"my_admin_role\",\"my_user_role\"))\n);\n" + } + ], + "specification/security/put_privileges/examples/request/SecurityPutPrivilegesRequestExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.security.put_privileges(\n privileges={\n \"myapp\": {\n \"read\": {\n \"actions\": [\n \"data:read/*\",\n \"action:login\"\n ],\n \"metadata\": {\n \"description\": \"Read access to myapp\"\n }\n }\n }\n },\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.security.putPrivileges({\n privileges: {\n myapp: {\n read: {\n actions: [\"data:read/*\", \"action:login\"],\n metadata: {\n description: \"Read access to myapp\",\n },\n },\n },\n },\n});" + }, + { + "language": "Ruby", + "code": "response = client.security.put_privileges(\n body: {\n \"myapp\": {\n \"read\": {\n \"actions\": [\n \"data:read/*\",\n \"action:login\"\n ],\n \"metadata\": {\n \"description\": \"Read access to myapp\"\n }\n }\n }\n }\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->security()->putPrivileges([\n \"body\" => [\n \"myapp\" => [\n \"read\" => [\n \"actions\" => array(\n \"data:read/*\",\n \"action:login\",\n ),\n \"metadata\" => [\n \"description\" => \"Read access to myapp\",\n ],\n ],\n ],\n ],\n]);" + }, + { + "language": "curl", + "code": "curl -X PUT -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"myapp\":{\"read\":{\"actions\":[\"data:read/*\",\"action:login\"],\"metadata\":{\"description\":\"Read access to myapp\"}}}}' \"$ELASTICSEARCH_URL/_security/privilege\"" + }, + { + "language": "Java", + "code": "client.security().putPrivileges(p -> p\n .privileges(\"myapp\", \"read\", pr -> pr\n .actions(List.of(\"data:read/*\",\"action:login\"))\n .metadata(\"description\", JsonData.fromJson(\"\\\"Read access to myapp\\\"\"))\n )\n);\n" + } + ], + "specification/security/put_privileges/examples/request/SecurityPutPrivilegesRequestExample2.yaml": [ + { + "language": "Python", + "code": "resp = client.security.put_privileges(\n privileges={\n \"app01\": {\n \"read\": {\n \"actions\": [\n \"action:login\",\n \"data:read/*\"\n ]\n },\n \"write\": {\n \"actions\": [\n \"action:login\",\n \"data:write/*\"\n ]\n }\n },\n \"app02\": {\n \"all\": {\n \"actions\": [\n \"*\"\n ]\n }\n }\n },\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.security.putPrivileges({\n privileges: {\n app01: {\n read: {\n actions: [\"action:login\", \"data:read/*\"],\n },\n write: {\n actions: [\"action:login\", \"data:write/*\"],\n },\n },\n app02: {\n all: {\n actions: [\"*\"],\n },\n },\n },\n});" + }, + { + "language": "Ruby", + "code": "response = client.security.put_privileges(\n body: {\n \"app01\": {\n \"read\": {\n \"actions\": [\n \"action:login\",\n \"data:read/*\"\n ]\n },\n \"write\": {\n \"actions\": [\n \"action:login\",\n \"data:write/*\"\n ]\n }\n },\n \"app02\": {\n \"all\": {\n \"actions\": [\n \"*\"\n ]\n }\n }\n }\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->security()->putPrivileges([\n \"body\" => [\n \"app01\" => [\n \"read\" => [\n \"actions\" => array(\n \"action:login\",\n \"data:read/*\",\n ),\n ],\n \"write\" => [\n \"actions\" => array(\n \"action:login\",\n \"data:write/*\",\n ),\n ],\n ],\n \"app02\" => [\n \"all\" => [\n \"actions\" => array(\n \"*\",\n ),\n ],\n ],\n ],\n]);" + }, + { + "language": "curl", + "code": "curl -X PUT -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"app01\":{\"read\":{\"actions\":[\"action:login\",\"data:read/*\"]},\"write\":{\"actions\":[\"action:login\",\"data:write/*\"]}},\"app02\":{\"all\":{\"actions\":[\"*\"]}}}' \"$ELASTICSEARCH_URL/_security/privilege\"" + }, + { + "language": "Java", + "code": "client.security().putPrivileges(p -> p\n .privileges(Map.of(\"app02\", \"all\", pr -> pr\n .actions(\"*\"),\"app01\", Map.of(\"read\", Actions.of(a -> a\n .actions(List.of(\"action:login\",\"data:read/*\"))),\"write\", Actions.of(a -> a\n .actions(List.of(\"action:login\",\"data:write/*\"))))))\n);\n" + } + ], + "specification/security/enroll_kibana/examples/request/EnrollKibanaRequestExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.security.enroll_kibana()" + }, + { + "language": "JavaScript", + "code": "const response = await client.security.enrollKibana();" + }, + { + "language": "Ruby", + "code": "response = client.security.enroll_kibana" + }, + { + "language": "PHP", + "code": "$resp = $client->security()->enrollKibana();" + }, + { + "language": "curl", + "code": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_security/enroll/kibana\"" + }, + { + "language": "Java", + "code": "client.security().enrollKibana();\n" + } + ], + "specification/nodes/usage/examples/request/NodesUsageExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.nodes.usage()" + }, + { + "language": "JavaScript", + "code": "const response = await client.nodes.usage();" + }, + { + "language": "Ruby", + "code": "response = client.nodes.usage" + }, + { + "language": "PHP", + "code": "$resp = $client->nodes()->usage();" + }, + { + "language": "curl", + "code": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_nodes/usage\"" + }, + { + "language": "Java", + "code": "client.nodes().usage(u -> u);\n" + } + ], + "specification/nodes/info/examples/request/NodesInfoExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.nodes.info(\n node_id=\"_all\",\n metric=\"jvm\",\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.nodes.info({\n node_id: \"_all\",\n metric: \"jvm\",\n});" + }, + { + "language": "Ruby", + "code": "response = client.nodes.info(\n node_id: \"_all\",\n metric: \"jvm\"\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->nodes()->info([\n \"node_id\" => \"_all\",\n \"metric\" => \"jvm\",\n]);" + }, + { + "language": "curl", + "code": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_nodes/_all/jvm\"" + }, + { + "language": "Java", + "code": "client.nodes().info(i -> i\n .metric(\"jvm\")\n .nodeId(\"_all\")\n);\n" + } + ], + "specification/nodes/hot_threads/examples/request/NodesHotThreadsExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.nodes.hot_threads()" + }, + { + "language": "JavaScript", + "code": "const response = await client.nodes.hotThreads();" + }, + { + "language": "Ruby", + "code": "response = client.nodes.hot_threads" + }, + { + "language": "PHP", + "code": "$resp = $client->nodes()->hotThreads();" + }, + { + "language": "curl", + "code": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_nodes/hot_threads\"" + }, + { + "language": "Java", + "code": "client.nodes().hotThreads(h -> h);\n" + } + ], + "specification/nodes/reload_secure_settings/examples/request/ReloadSecureSettingsRequestExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.nodes.reload_secure_settings(\n secure_settings_password=\"keystore-password\",\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.nodes.reloadSecureSettings({\n secure_settings_password: \"keystore-password\",\n});" + }, + { + "language": "Ruby", + "code": "response = client.nodes.reload_secure_settings(\n body: {\n \"secure_settings_password\": \"keystore-password\"\n }\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->nodes()->reloadSecureSettings([\n \"body\" => [\n \"secure_settings_password\" => \"keystore-password\",\n ],\n]);" + }, + { + "language": "curl", + "code": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"secure_settings_password\":\"keystore-password\"}' \"$ELASTICSEARCH_URL/_nodes/reload_secure_settings\"" + }, + { + "language": "Java", + "code": "client.nodes().reloadSecureSettings(r -> r\n .secureSettingsPassword(\"keystore-password\")\n);\n" + } + ], + "specification/nodes/stats/examples/request/NodesStatsExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.nodes.stats(\n metric=\"process\",\n filter_path=\"**.max_file_descriptors\",\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.nodes.stats({\n metric: \"process\",\n filter_path: \"**.max_file_descriptors\",\n});" + }, + { + "language": "Ruby", + "code": "response = client.nodes.stats(\n metric: \"process\",\n filter_path: \"**.max_file_descriptors\"\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->nodes()->stats([\n \"metric\" => \"process\",\n \"filter_path\" => \"**.max_file_descriptors\",\n]);" + }, + { + "language": "curl", + "code": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_nodes/stats/process?filter_path=**.max_file_descriptors\"" + }, + { + "language": "Java", + "code": "\n" + } + ], + "specification/ingest/get_pipeline/examples/request/IngestGetPipelineExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.ingest.get_pipeline(\n id=\"my-pipeline-id\",\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.ingest.getPipeline({\n id: \"my-pipeline-id\",\n});" + }, + { + "language": "Ruby", + "code": "response = client.ingest.get_pipeline(\n id: \"my-pipeline-id\"\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->ingest()->getPipeline([\n \"id\" => \"my-pipeline-id\",\n]);" + }, + { + "language": "curl", + "code": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_ingest/pipeline/my-pipeline-id\"" + }, + { + "language": "Java", + "code": "client.ingest().getPipeline(g -> g\n .id(\"my-pipeline-id\")\n);\n" + } + ], + "specification/ingest/put_pipeline/examples/request/PutPipelineRequestExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.ingest.put_pipeline(\n id=\"my-pipeline-id\",\n description=\"My optional pipeline description\",\n processors=[\n {\n \"set\": {\n \"description\": \"My optional processor description\",\n \"field\": \"my-keyword-field\",\n \"value\": \"foo\"\n }\n }\n ],\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.ingest.putPipeline({\n id: \"my-pipeline-id\",\n description: \"My optional pipeline description\",\n processors: [\n {\n set: {\n description: \"My optional processor description\",\n field: \"my-keyword-field\",\n value: \"foo\",\n },\n },\n ],\n});" + }, + { + "language": "Ruby", + "code": "response = client.ingest.put_pipeline(\n id: \"my-pipeline-id\",\n body: {\n \"description\": \"My optional pipeline description\",\n \"processors\": [\n {\n \"set\": {\n \"description\": \"My optional processor description\",\n \"field\": \"my-keyword-field\",\n \"value\": \"foo\"\n }\n }\n ]\n }\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->ingest()->putPipeline([\n \"id\" => \"my-pipeline-id\",\n \"body\" => [\n \"description\" => \"My optional pipeline description\",\n \"processors\" => array(\n [\n \"set\" => [\n \"description\" => \"My optional processor description\",\n \"field\" => \"my-keyword-field\",\n \"value\" => \"foo\",\n ],\n ],\n ),\n ],\n]);" + }, + { + "language": "curl", + "code": "curl -X PUT -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"description\":\"My optional pipeline description\",\"processors\":[{\"set\":{\"description\":\"My optional processor description\",\"field\":\"my-keyword-field\",\"value\":\"foo\"}}]}' \"$ELASTICSEARCH_URL/_ingest/pipeline/my-pipeline-id\"" + }, + { + "language": "Java", + "code": "client.ingest().putPipeline(p -> p\n .description(\"My optional pipeline description\")\n .id(\"my-pipeline-id\")\n .processors(pr -> pr\n .set(s -> s\n .field(\"my-keyword-field\")\n .value(JsonData.fromJson(\"\\\"foo\\\"\"))\n .description(\"My optional processor description\")\n )\n )\n);\n" + } + ], + "specification/ingest/put_pipeline/examples/request/PutPipelineRequestExample2.yaml": [ + { + "language": "Python", + "code": "resp = client.ingest.put_pipeline(\n id=\"my-pipeline-id\",\n description=\"My optional pipeline description\",\n processors=[\n {\n \"set\": {\n \"description\": \"My optional processor description\",\n \"field\": \"my-keyword-field\",\n \"value\": \"foo\"\n }\n }\n ],\n meta={\n \"reason\": \"set my-keyword-field to foo\",\n \"serialization\": {\n \"class\": \"MyPipeline\",\n \"id\": 10\n }\n },\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.ingest.putPipeline({\n id: \"my-pipeline-id\",\n description: \"My optional pipeline description\",\n processors: [\n {\n set: {\n description: \"My optional processor description\",\n field: \"my-keyword-field\",\n value: \"foo\",\n },\n },\n ],\n meta: {\n reason: \"set my-keyword-field to foo\",\n serialization: {\n class: \"MyPipeline\",\n id: 10,\n },\n },\n});" + }, + { + "language": "Ruby", + "code": "response = client.ingest.put_pipeline(\n id: \"my-pipeline-id\",\n body: {\n \"description\": \"My optional pipeline description\",\n \"processors\": [\n {\n \"set\": {\n \"description\": \"My optional processor description\",\n \"field\": \"my-keyword-field\",\n \"value\": \"foo\"\n }\n }\n ],\n \"_meta\": {\n \"reason\": \"set my-keyword-field to foo\",\n \"serialization\": {\n \"class\": \"MyPipeline\",\n \"id\": 10\n }\n }\n }\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->ingest()->putPipeline([\n \"id\" => \"my-pipeline-id\",\n \"body\" => [\n \"description\" => \"My optional pipeline description\",\n \"processors\" => array(\n [\n \"set\" => [\n \"description\" => \"My optional processor description\",\n \"field\" => \"my-keyword-field\",\n \"value\" => \"foo\",\n ],\n ],\n ),\n \"_meta\" => [\n \"reason\" => \"set my-keyword-field to foo\",\n \"serialization\" => [\n \"class\" => \"MyPipeline\",\n \"id\" => 10,\n ],\n ],\n ],\n]);" + }, + { + "language": "curl", + "code": "curl -X PUT -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"description\":\"My optional pipeline description\",\"processors\":[{\"set\":{\"description\":\"My optional processor description\",\"field\":\"my-keyword-field\",\"value\":\"foo\"}}],\"_meta\":{\"reason\":\"set my-keyword-field to foo\",\"serialization\":{\"class\":\"MyPipeline\",\"id\":10}}}' \"$ELASTICSEARCH_URL/_ingest/pipeline/my-pipeline-id\"" + }, + { + "language": "Java", + "code": "client.ingest().putPipeline(p -> p\n .meta(Map.of(\"serialization\", JsonData.fromJson(\"{\\\"class\\\":\\\"MyPipeline\\\",\\\"id\\\":10}\"),\"reason\", JsonData.fromJson(\"\\\"set my-keyword-field to foo\\\"\")))\n .description(\"My optional pipeline description\")\n .id(\"my-pipeline-id\")\n .processors(pr -> pr\n .set(s -> s\n .field(\"my-keyword-field\")\n .value(JsonData.fromJson(\"\\\"foo\\\"\"))\n .description(\"My optional processor description\")\n )\n )\n);\n" + } + ], + "specification/ingest/simulate/examples/request/SimulatePipelineRequestExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.ingest.simulate(\n pipeline={\n \"description\": \"_description\",\n \"processors\": [\n {\n \"set\": {\n \"field\": \"field2\",\n \"value\": \"_value\"\n }\n }\n ]\n },\n docs=[\n {\n \"_index\": \"index\",\n \"_id\": \"id\",\n \"_source\": {\n \"foo\": \"bar\"\n }\n },\n {\n \"_index\": \"index\",\n \"_id\": \"id\",\n \"_source\": {\n \"foo\": \"rab\"\n }\n }\n ],\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.ingest.simulate({\n pipeline: {\n description: \"_description\",\n processors: [\n {\n set: {\n field: \"field2\",\n value: \"_value\",\n },\n },\n ],\n },\n docs: [\n {\n _index: \"index\",\n _id: \"id\",\n _source: {\n foo: \"bar\",\n },\n },\n {\n _index: \"index\",\n _id: \"id\",\n _source: {\n foo: \"rab\",\n },\n },\n ],\n});" + }, + { + "language": "Ruby", + "code": "response = client.ingest.simulate(\n body: {\n \"pipeline\": {\n \"description\": \"_description\",\n \"processors\": [\n {\n \"set\": {\n \"field\": \"field2\",\n \"value\": \"_value\"\n }\n }\n ]\n },\n \"docs\": [\n {\n \"_index\": \"index\",\n \"_id\": \"id\",\n \"_source\": {\n \"foo\": \"bar\"\n }\n },\n {\n \"_index\": \"index\",\n \"_id\": \"id\",\n \"_source\": {\n \"foo\": \"rab\"\n }\n }\n ]\n }\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->ingest()->simulate([\n \"body\" => [\n \"pipeline\" => [\n \"description\" => \"_description\",\n \"processors\" => array(\n [\n \"set\" => [\n \"field\" => \"field2\",\n \"value\" => \"_value\",\n ],\n ],\n ),\n ],\n \"docs\" => array(\n [\n \"_index\" => \"index\",\n \"_id\" => \"id\",\n \"_source\" => [\n \"foo\" => \"bar\",\n ],\n ],\n [\n \"_index\" => \"index\",\n \"_id\" => \"id\",\n \"_source\" => [\n \"foo\" => \"rab\",\n ],\n ],\n ),\n ],\n]);" + }, + { + "language": "curl", + "code": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"pipeline\":{\"description\":\"_description\",\"processors\":[{\"set\":{\"field\":\"field2\",\"value\":\"_value\"}}]},\"docs\":[{\"_index\":\"index\",\"_id\":\"id\",\"_source\":{\"foo\":\"bar\"}},{\"_index\":\"index\",\"_id\":\"id\",\"_source\":{\"foo\":\"rab\"}}]}' \"$ELASTICSEARCH_URL/_ingest/pipeline/_simulate\"" + }, + { + "language": "Java", + "code": "client.ingest().simulate(s -> s\n .docs(List.of(Document.of(d -> d\n .id(\"id\")\n .index(\"index\")\n .source(JsonData.fromJson(\"{\\\"foo\\\":\\\"bar\\\"}\"))),Document.of(d -> d\n .id(\"id\")\n .index(\"index\")\n .source(JsonData.fromJson(\"{\\\"foo\\\":\\\"rab\\\"}\")))))\n .pipeline(p -> p\n .description(\"_description\")\n .processors(pr -> pr\n .set(se -> se\n .field(\"field2\")\n .value(JsonData.fromJson(\"\\\"_value\\\"\"))\n )\n )\n )\n);\n" + } + ], + "specification/ingest/delete_pipeline/examples/request/IngestDeletePipelineExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.ingest.delete_pipeline(\n id=\"my-pipeline-id\",\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.ingest.deletePipeline({\n id: \"my-pipeline-id\",\n});" + }, + { + "language": "Ruby", + "code": "response = client.ingest.delete_pipeline(\n id: \"my-pipeline-id\"\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->ingest()->deletePipeline([\n \"id\" => \"my-pipeline-id\",\n]);" + }, + { + "language": "curl", + "code": "curl -X DELETE -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_ingest/pipeline/my-pipeline-id\"" + }, + { + "language": "Java", + "code": "client.ingest().deletePipeline(d -> d\n .id(\"my-pipeline-id\")\n);\n" + } + ], + "specification/ingest/geo_ip_stats/examples/request/IngestGeoIpStatsExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.ingest.geo_ip_stats()" + }, + { + "language": "JavaScript", + "code": "const response = await client.ingest.geoIpStats();" + }, + { + "language": "Ruby", + "code": "response = client.ingest.geo_ip_stats" + }, + { + "language": "PHP", + "code": "$resp = $client->ingest()->geoIpStats();" + }, + { + "language": "curl", + "code": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_ingest/geoip/stats\"" + }, + { + "language": "Java", + "code": "client.ingest().geoIpStats();\n" + } + ], + "specification/ingest/put_ip_location_database/examples/request/IngestPutIpLocationDatabaseExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.ingest.put_ip_location_database(\n id=\"my-database-1\",\n configuration={\n \"name\": \"GeoIP2-Domain\",\n \"maxmind\": {\n \"account_id\": \"1234567\"\n }\n },\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.ingest.putIpLocationDatabase({\n id: \"my-database-1\",\n configuration: {\n name: \"GeoIP2-Domain\",\n maxmind: {\n account_id: \"1234567\",\n },\n },\n});" + }, + { + "language": "Ruby", + "code": "response = client.ingest.put_ip_location_database(\n id: \"my-database-1\",\n body: {\n \"name\": \"GeoIP2-Domain\",\n \"maxmind\": {\n \"account_id\": \"1234567\"\n }\n }\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->ingest()->putIpLocationDatabase([\n \"id\" => \"my-database-1\",\n \"body\" => [\n \"name\" => \"GeoIP2-Domain\",\n \"maxmind\" => [\n \"account_id\" => \"1234567\",\n ],\n ],\n]);" + }, + { + "language": "curl", + "code": "curl -X PUT -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"name\":\"GeoIP2-Domain\",\"maxmind\":{\"account_id\":\"1234567\"}}' \"$ELASTICSEARCH_URL/_ingest/ip_location/database/my-database-1\"" + }, + { + "language": "Java", + "code": "client.ingest().putIpLocationDatabase(p -> p\n .id(\"my-database-1\")\n .configuration(c -> c\n .maxmind(m -> m\n .accountId(\"1234567\")\n )\n .name(\"GeoIP2-Domain\")\n )\n);\n" + } + ], + "specification/ingest/delete_ip_location_database/examples/request/IngestDeleteIpLocationDatabaseExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.ingest.delete_ip_location_database(\n id=\"my-database-id\",\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.ingest.deleteIpLocationDatabase({\n id: \"my-database-id\",\n});" + }, + { + "language": "Ruby", + "code": "response = client.ingest.delete_ip_location_database(\n id: \"my-database-id\"\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->ingest()->deleteIpLocationDatabase([\n \"id\" => \"my-database-id\",\n]);" + }, + { + "language": "curl", + "code": "curl -X DELETE -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_ingest/ip_location/database/my-database-id\"" + }, + { + "language": "Java", + "code": "client.ingest().deleteIpLocationDatabase(d -> d\n .id(\"my-database-id\")\n);\n" + } + ], + "specification/ingest/get_ip_location_database/examples/request/IngestGetIpLocationDatabaseExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.ingest.get_ip_location_database(\n id=\"my-database-id\",\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.ingest.getIpLocationDatabase({\n id: \"my-database-id\",\n});" + }, + { + "language": "Ruby", + "code": "response = client.ingest.get_ip_location_database(\n id: \"my-database-id\"\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->ingest()->getIpLocationDatabase([\n \"id\" => \"my-database-id\",\n]);" + }, + { + "language": "curl", + "code": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_ingest/ip_location/database/my-database-id\"" + }, + { + "language": "Java", + "code": "client.ingest().getIpLocationDatabase(g -> g\n .id(\"my-database-id\")\n);\n" + } + ], + "specification/ingest/processor_grok/examples/request/IngestProcessorGrokExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.ingest.processor_grok()" + }, + { + "language": "JavaScript", + "code": "const response = await client.ingest.processorGrok();" + }, + { + "language": "Ruby", + "code": "response = client.ingest.processor_grok" + }, + { + "language": "PHP", + "code": "$resp = $client->ingest()->processorGrok();" + }, + { + "language": "curl", + "code": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_ingest/processor/grok\"" + }, + { + "language": "Java", + "code": "client.ingest().processorGrok();\n" + } + ], + "specification/simulate/ingest/examples/request/SimulateIngestRequestExample2.yaml": [ + { + "language": "Python", + "code": "resp = client.simulate.ingest(\n docs=[\n {\n \"_index\": \"my-index\",\n \"_id\": 123,\n \"_source\": {\n \"foo\": \"bar\"\n }\n },\n {\n \"_index\": \"my-index\",\n \"_id\": 456,\n \"_source\": {\n \"foo\": \"rab\"\n }\n }\n ],\n pipeline_substitutions={\n \"my-pipeline\": {\n \"processors\": [\n {\n \"uppercase\": {\n \"field\": \"foo\"\n }\n }\n ]\n }\n },\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.simulate.ingest({\n docs: [\n {\n _index: \"my-index\",\n _id: 123,\n _source: {\n foo: \"bar\",\n },\n },\n {\n _index: \"my-index\",\n _id: 456,\n _source: {\n foo: \"rab\",\n },\n },\n ],\n pipeline_substitutions: {\n \"my-pipeline\": {\n processors: [\n {\n uppercase: {\n field: \"foo\",\n },\n },\n ],\n },\n },\n});" + }, + { + "language": "Ruby", + "code": "response = client.simulate.ingest(\n body: {\n \"docs\": [\n {\n \"_index\": \"my-index\",\n \"_id\": 123,\n \"_source\": {\n \"foo\": \"bar\"\n }\n },\n {\n \"_index\": \"my-index\",\n \"_id\": 456,\n \"_source\": {\n \"foo\": \"rab\"\n }\n }\n ],\n \"pipeline_substitutions\": {\n \"my-pipeline\": {\n \"processors\": [\n {\n \"uppercase\": {\n \"field\": \"foo\"\n }\n }\n ]\n }\n }\n }\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->simulate()->ingest([\n \"body\" => [\n \"docs\" => array(\n [\n \"_index\" => \"my-index\",\n \"_id\" => 123,\n \"_source\" => [\n \"foo\" => \"bar\",\n ],\n ],\n [\n \"_index\" => \"my-index\",\n \"_id\" => 456,\n \"_source\" => [\n \"foo\" => \"rab\",\n ],\n ],\n ),\n \"pipeline_substitutions\" => [\n \"my-pipeline\" => [\n \"processors\" => array(\n [\n \"uppercase\" => [\n \"field\" => \"foo\",\n ],\n ],\n ),\n ],\n ],\n ],\n]);" + }, + { + "language": "curl", + "code": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"docs\":[{\"_index\":\"my-index\",\"_id\":123,\"_source\":{\"foo\":\"bar\"}},{\"_index\":\"my-index\",\"_id\":456,\"_source\":{\"foo\":\"rab\"}}],\"pipeline_substitutions\":{\"my-pipeline\":{\"processors\":[{\"uppercase\":{\"field\":\"foo\"}}]}}}' \"$ELASTICSEARCH_URL/_ingest/_simulate\"" + }, + { + "language": "Java", + "code": "client.simulate().ingest(i -> i\n .docs(List.of(Document.of(d -> d\n .id(\"123\")\n .index(\"my-index\")\n .source(JsonData.fromJson(\"{\\\"foo\\\":\\\"bar\\\"}\"))),Document.of(d -> d\n .id(\"456\")\n .index(\"my-index\")\n .source(JsonData.fromJson(\"{\\\"foo\\\":\\\"rab\\\"}\")))))\n .pipelineSubstitutions(\"my-pipeline\", p -> p\n .processors(pr -> pr\n .uppercase(u -> u\n .field(\"foo\")\n )\n )\n )\n);\n" + } + ], + "specification/simulate/ingest/examples/request/SimulateIngestRequestExample3.yaml": [ + { + "language": "Python", + "code": "resp = client.simulate.ingest(\n docs=[\n {\n \"_index\": \"my-index\",\n \"_id\": \"123\",\n \"_source\": {\n \"foo\": \"foo\"\n }\n },\n {\n \"_index\": \"my-index\",\n \"_id\": \"456\",\n \"_source\": {\n \"bar\": \"rab\"\n }\n }\n ],\n component_template_substitutions={\n \"my-mappings_template\": {\n \"template\": {\n \"mappings\": {\n \"dynamic\": \"strict\",\n \"properties\": {\n \"foo\": {\n \"type\": \"keyword\"\n },\n \"bar\": {\n \"type\": \"keyword\"\n }\n }\n }\n }\n }\n },\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.simulate.ingest({\n docs: [\n {\n _index: \"my-index\",\n _id: \"123\",\n _source: {\n foo: \"foo\",\n },\n },\n {\n _index: \"my-index\",\n _id: \"456\",\n _source: {\n bar: \"rab\",\n },\n },\n ],\n component_template_substitutions: {\n \"my-mappings_template\": {\n template: {\n mappings: {\n dynamic: \"strict\",\n properties: {\n foo: {\n type: \"keyword\",\n },\n bar: {\n type: \"keyword\",\n },\n },\n },\n },\n },\n },\n});" + }, + { + "language": "Ruby", + "code": "response = client.simulate.ingest(\n body: {\n \"docs\": [\n {\n \"_index\": \"my-index\",\n \"_id\": \"123\",\n \"_source\": {\n \"foo\": \"foo\"\n }\n },\n {\n \"_index\": \"my-index\",\n \"_id\": \"456\",\n \"_source\": {\n \"bar\": \"rab\"\n }\n }\n ],\n \"component_template_substitutions\": {\n \"my-mappings_template\": {\n \"template\": {\n \"mappings\": {\n \"dynamic\": \"strict\",\n \"properties\": {\n \"foo\": {\n \"type\": \"keyword\"\n },\n \"bar\": {\n \"type\": \"keyword\"\n }\n }\n }\n }\n }\n }\n }\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->simulate()->ingest([\n \"body\" => [\n \"docs\" => array(\n [\n \"_index\" => \"my-index\",\n \"_id\" => \"123\",\n \"_source\" => [\n \"foo\" => \"foo\",\n ],\n ],\n [\n \"_index\" => \"my-index\",\n \"_id\" => \"456\",\n \"_source\" => [\n \"bar\" => \"rab\",\n ],\n ],\n ),\n \"component_template_substitutions\" => [\n \"my-mappings_template\" => [\n \"template\" => [\n \"mappings\" => [\n \"dynamic\" => \"strict\",\n \"properties\" => [\n \"foo\" => [\n \"type\" => \"keyword\",\n ],\n \"bar\" => [\n \"type\" => \"keyword\",\n ],\n ],\n ],\n ],\n ],\n ],\n ],\n]);" + }, + { + "language": "curl", + "code": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"docs\":[{\"_index\":\"my-index\",\"_id\":\"123\",\"_source\":{\"foo\":\"foo\"}},{\"_index\":\"my-index\",\"_id\":\"456\",\"_source\":{\"bar\":\"rab\"}}],\"component_template_substitutions\":{\"my-mappings_template\":{\"template\":{\"mappings\":{\"dynamic\":\"strict\",\"properties\":{\"foo\":{\"type\":\"keyword\"},\"bar\":{\"type\":\"keyword\"}}}}}}}' \"$ELASTICSEARCH_URL/_ingest/_simulate\"" + }, + { + "language": "Java", + "code": "client.simulate().ingest(i -> i\n .componentTemplateSubstitutions(\"my-mappings_template\", c -> c\n .template(t -> t\n .mappings(m -> m\n .dynamic(DynamicMapping.Strict)\n .properties(Map.of(\"bar\", Property.of(p -> p\n .keyword(k -> k\n )),\"foo\", Property.of(pr -> pr\n .keyword(k -> k\n ))))\n )\n )\n )\n .docs(List.of(Document.of(d -> d\n .id(\"123\")\n .index(\"my-index\")\n .source(JsonData.fromJson(\"{\\\"foo\\\":\\\"foo\\\"}\"))),Document.of(d -> d\n .id(\"456\")\n .index(\"my-index\")\n .source(JsonData.fromJson(\"{\\\"bar\\\":\\\"rab\\\"}\")))))\n);\n" + } + ], + "specification/simulate/ingest/examples/request/SimulateIngestRequestExample4.yaml": [ + { + "language": "Python", + "code": "resp = client.simulate.ingest(\n docs=[\n {\n \"_id\": \"id\",\n \"_index\": \"my-index\",\n \"_source\": {\n \"foo\": \"bar\"\n }\n },\n {\n \"_id\": \"id\",\n \"_index\": \"my-index\",\n \"_source\": {\n \"foo\": \"rab\"\n }\n }\n ],\n pipeline_substitutions={\n \"my-pipeline\": {\n \"processors\": [\n {\n \"set\": {\n \"field\": \"field3\",\n \"value\": \"value3\"\n }\n }\n ]\n }\n },\n component_template_substitutions={\n \"my-component-template\": {\n \"template\": {\n \"mappings\": {\n \"dynamic\": True,\n \"properties\": {\n \"field3\": {\n \"type\": \"keyword\"\n }\n }\n },\n \"settings\": {\n \"index\": {\n \"default_pipeline\": \"my-pipeline\"\n }\n }\n }\n }\n },\n index_template_substitutions={\n \"my-index-template\": {\n \"index_patterns\": [\n \"my-index-*\"\n ],\n \"composed_of\": [\n \"component_template_1\",\n \"component_template_2\"\n ]\n }\n },\n mapping_addition={\n \"dynamic\": \"strict\",\n \"properties\": {\n \"foo\": {\n \"type\": \"keyword\"\n }\n }\n },\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.simulate.ingest({\n docs: [\n {\n _id: \"id\",\n _index: \"my-index\",\n _source: {\n foo: \"bar\",\n },\n },\n {\n _id: \"id\",\n _index: \"my-index\",\n _source: {\n foo: \"rab\",\n },\n },\n ],\n pipeline_substitutions: {\n \"my-pipeline\": {\n processors: [\n {\n set: {\n field: \"field3\",\n value: \"value3\",\n },\n },\n ],\n },\n },\n component_template_substitutions: {\n \"my-component-template\": {\n template: {\n mappings: {\n dynamic: true,\n properties: {\n field3: {\n type: \"keyword\",\n },\n },\n },\n settings: {\n index: {\n default_pipeline: \"my-pipeline\",\n },\n },\n },\n },\n },\n index_template_substitutions: {\n \"my-index-template\": {\n index_patterns: [\"my-index-*\"],\n composed_of: [\"component_template_1\", \"component_template_2\"],\n },\n },\n mapping_addition: {\n dynamic: \"strict\",\n properties: {\n foo: {\n type: \"keyword\",\n },\n },\n },\n});" + }, + { + "language": "Ruby", + "code": "response = client.simulate.ingest(\n body: {\n \"docs\": [\n {\n \"_id\": \"id\",\n \"_index\": \"my-index\",\n \"_source\": {\n \"foo\": \"bar\"\n }\n },\n {\n \"_id\": \"id\",\n \"_index\": \"my-index\",\n \"_source\": {\n \"foo\": \"rab\"\n }\n }\n ],\n \"pipeline_substitutions\": {\n \"my-pipeline\": {\n \"processors\": [\n {\n \"set\": {\n \"field\": \"field3\",\n \"value\": \"value3\"\n }\n }\n ]\n }\n },\n \"component_template_substitutions\": {\n \"my-component-template\": {\n \"template\": {\n \"mappings\": {\n \"dynamic\": true,\n \"properties\": {\n \"field3\": {\n \"type\": \"keyword\"\n }\n }\n },\n \"settings\": {\n \"index\": {\n \"default_pipeline\": \"my-pipeline\"\n }\n }\n }\n }\n },\n \"index_template_substitutions\": {\n \"my-index-template\": {\n \"index_patterns\": [\n \"my-index-*\"\n ],\n \"composed_of\": [\n \"component_template_1\",\n \"component_template_2\"\n ]\n }\n },\n \"mapping_addition\": {\n \"dynamic\": \"strict\",\n \"properties\": {\n \"foo\": {\n \"type\": \"keyword\"\n }\n }\n }\n }\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->simulate()->ingest([\n \"body\" => [\n \"docs\" => array(\n [\n \"_id\" => \"id\",\n \"_index\" => \"my-index\",\n \"_source\" => [\n \"foo\" => \"bar\",\n ],\n ],\n [\n \"_id\" => \"id\",\n \"_index\" => \"my-index\",\n \"_source\" => [\n \"foo\" => \"rab\",\n ],\n ],\n ),\n \"pipeline_substitutions\" => [\n \"my-pipeline\" => [\n \"processors\" => array(\n [\n \"set\" => [\n \"field\" => \"field3\",\n \"value\" => \"value3\",\n ],\n ],\n ),\n ],\n ],\n \"component_template_substitutions\" => [\n \"my-component-template\" => [\n \"template\" => [\n \"mappings\" => [\n \"dynamic\" => true,\n \"properties\" => [\n \"field3\" => [\n \"type\" => \"keyword\",\n ],\n ],\n ],\n \"settings\" => [\n \"index\" => [\n \"default_pipeline\" => \"my-pipeline\",\n ],\n ],\n ],\n ],\n ],\n \"index_template_substitutions\" => [\n \"my-index-template\" => [\n \"index_patterns\" => array(\n \"my-index-*\",\n ),\n \"composed_of\" => array(\n \"component_template_1\",\n \"component_template_2\",\n ),\n ],\n ],\n \"mapping_addition\" => [\n \"dynamic\" => \"strict\",\n \"properties\" => [\n \"foo\" => [\n \"type\" => \"keyword\",\n ],\n ],\n ],\n ],\n]);" + }, + { + "language": "curl", + "code": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"docs\":[{\"_id\":\"id\",\"_index\":\"my-index\",\"_source\":{\"foo\":\"bar\"}},{\"_id\":\"id\",\"_index\":\"my-index\",\"_source\":{\"foo\":\"rab\"}}],\"pipeline_substitutions\":{\"my-pipeline\":{\"processors\":[{\"set\":{\"field\":\"field3\",\"value\":\"value3\"}}]}},\"component_template_substitutions\":{\"my-component-template\":{\"template\":{\"mappings\":{\"dynamic\":true,\"properties\":{\"field3\":{\"type\":\"keyword\"}}},\"settings\":{\"index\":{\"default_pipeline\":\"my-pipeline\"}}}}},\"index_template_substitutions\":{\"my-index-template\":{\"index_patterns\":[\"my-index-*\"],\"composed_of\":[\"component_template_1\",\"component_template_2\"]}},\"mapping_addition\":{\"dynamic\":\"strict\",\"properties\":{\"foo\":{\"type\":\"keyword\"}}}}' \"$ELASTICSEARCH_URL/_ingest/_simulate\"" + }, + { + "language": "Java", + "code": "client.simulate().ingest(i -> i\n .componentTemplateSubstitutions(\"my-component-template\", c -> c\n .template(t -> t\n .settings(\"index\", s -> s\n .defaultPipeline(\"my-pipeline\")\n )\n .mappings(m -> m\n .dynamic(DynamicMapping.True)\n .properties(\"field3\", p -> p\n .keyword(k -> k)\n )\n )\n )\n )\n .docs(List.of(Document.of(d -> d\n .id(\"id\")\n .index(\"my-index\")\n .source(JsonData.fromJson(\"{\\\"foo\\\":\\\"bar\\\"}\"))),Document.of(d -> d\n .id(\"id\")\n .index(\"my-index\")\n .source(JsonData.fromJson(\"{\\\"foo\\\":\\\"rab\\\"}\")))))\n .indexTemplateSubstitutions(\"my-index-template\", in -> in\n .indexPatterns(\"my-index-*\")\n .composedOf(List.of(\"component_template_1\",\"component_template_2\"))\n )\n .mappingAddition(m -> m\n .dynamic(DynamicMapping.Strict)\n .properties(\"foo\", p -> p\n .keyword(k -> k)\n )\n )\n .pipelineSubstitutions(\"my-pipeline\", p -> p\n .processors(pr -> pr\n .set(s -> s\n .field(\"field3\")\n .value(JsonData.fromJson(\"\\\"value3\\\"\"))\n )\n )\n )\n);\n" + } + ], + "specification/simulate/ingest/examples/request/SimulateIngestRequestExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.simulate.ingest(\n docs=[\n {\n \"_id\": 123,\n \"_index\": \"my-index\",\n \"_source\": {\n \"foo\": \"bar\"\n }\n },\n {\n \"_id\": 456,\n \"_index\": \"my-index\",\n \"_source\": {\n \"foo\": \"rab\"\n }\n }\n ],\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.simulate.ingest({\n docs: [\n {\n _id: 123,\n _index: \"my-index\",\n _source: {\n foo: \"bar\",\n },\n },\n {\n _id: 456,\n _index: \"my-index\",\n _source: {\n foo: \"rab\",\n },\n },\n ],\n});" + }, + { + "language": "Ruby", + "code": "response = client.simulate.ingest(\n body: {\n \"docs\": [\n {\n \"_id\": 123,\n \"_index\": \"my-index\",\n \"_source\": {\n \"foo\": \"bar\"\n }\n },\n {\n \"_id\": 456,\n \"_index\": \"my-index\",\n \"_source\": {\n \"foo\": \"rab\"\n }\n }\n ]\n }\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->simulate()->ingest([\n \"body\" => [\n \"docs\" => array(\n [\n \"_id\" => 123,\n \"_index\" => \"my-index\",\n \"_source\" => [\n \"foo\" => \"bar\",\n ],\n ],\n [\n \"_id\" => 456,\n \"_index\" => \"my-index\",\n \"_source\" => [\n \"foo\" => \"rab\",\n ],\n ],\n ),\n ],\n]);" + }, + { + "language": "curl", + "code": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"docs\":[{\"_id\":123,\"_index\":\"my-index\",\"_source\":{\"foo\":\"bar\"}},{\"_id\":456,\"_index\":\"my-index\",\"_source\":{\"foo\":\"rab\"}}]}' \"$ELASTICSEARCH_URL/_ingest/_simulate\"" + }, + { + "language": "Java", + "code": "client.simulate().ingest(i -> i\n .docs(List.of(Document.of(d -> d\n .id(\"123\")\n .index(\"my-index\")\n .source(JsonData.fromJson(\"{\\\"foo\\\":\\\"bar\\\"}\"))),Document.of(d -> d\n .id(\"456\")\n .index(\"my-index\")\n .source(JsonData.fromJson(\"{\\\"foo\\\":\\\"rab\\\"}\")))))\n);\n" + } + ], + "specification/slm/get_stats/examples/request/GetSnapshotLifecycleManagementStatsRequestExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.slm.get_stats()" + }, + { + "language": "JavaScript", + "code": "const response = await client.slm.getStats();" + }, + { + "language": "Ruby", + "code": "response = client.slm.get_stats" + }, + { + "language": "PHP", + "code": "$resp = $client->slm()->getStats();" + }, + { + "language": "curl", + "code": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_slm/stats\"" + }, + { + "language": "Java", + "code": "client.slm().getStats(g -> g);\n" + } + ], + "specification/slm/get_status/examples/request/GetSnapshotLifecycleManagementStatusRequestExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.slm.get_status()" + }, + { + "language": "JavaScript", + "code": "const response = await client.slm.getStatus();" + }, + { + "language": "Ruby", + "code": "response = client.slm.get_status" + }, + { + "language": "PHP", + "code": "$resp = $client->slm()->getStatus();" + }, + { + "language": "curl", + "code": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_slm/status\"" + }, + { + "language": "Java", + "code": "client.slm().getStatus(g -> g);\n" + } + ], + "specification/slm/delete_lifecycle/examples/request/SlmDeleteLifecycleExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.slm.delete_lifecycle(\n policy_id=\"daily-snapshots\",\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.slm.deleteLifecycle({\n policy_id: \"daily-snapshots\",\n});" + }, + { + "language": "Ruby", + "code": "response = client.slm.delete_lifecycle(\n policy_id: \"daily-snapshots\"\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->slm()->deleteLifecycle([\n \"policy_id\" => \"daily-snapshots\",\n]);" + }, + { + "language": "curl", + "code": "curl -X DELETE -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_slm/policy/daily-snapshots\"" + }, + { + "language": "Java", + "code": "client.slm().deleteLifecycle(d -> d\n .policyId(\"daily-snapshots\")\n);\n" + } + ], + "specification/slm/start/examples/request/StartSnapshotLifecycleManagementRequestExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.slm.start()" + }, + { + "language": "JavaScript", + "code": "const response = await client.slm.start();" + }, + { + "language": "Ruby", + "code": "response = client.slm.start" + }, + { + "language": "PHP", + "code": "$resp = $client->slm()->start();" + }, + { + "language": "curl", + "code": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_slm/start\"" + }, + { + "language": "Java", + "code": "client.slm().start(s -> s);\n" + } + ], + "specification/slm/get_lifecycle/examples/request/GetSnapshotLifecycleRequestExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.slm.get_lifecycle(\n policy_id=\"daily-snapshots\",\n human=True,\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.slm.getLifecycle({\n policy_id: \"daily-snapshots\",\n human: \"true\",\n});" + }, + { + "language": "Ruby", + "code": "response = client.slm.get_lifecycle(\n policy_id: \"daily-snapshots\",\n human: \"true\"\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->slm()->getLifecycle([\n \"policy_id\" => \"daily-snapshots\",\n \"human\" => \"true\",\n]);" + }, + { + "language": "curl", + "code": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_slm/policy/daily-snapshots?human\"" + }, + { + "language": "Java", + "code": "\n" + } + ], + "specification/slm/put_lifecycle/examples/request/PutSnapshotLifecycleRequestExample1 copy.yaml": [ + { + "language": "Python", + "code": "resp = client.slm.put_lifecycle(\n policy_id=\"daily-snapshots\",\n schedule=\"0 30 1 * * ?\",\n name=\"\",\n repository=\"my_repository\",\n config={\n \"indices\": [\n \"data-*\",\n \"important\"\n ],\n \"ignore_unavailable\": False,\n \"include_global_state\": False\n },\n retention={\n \"expire_after\": \"30d\",\n \"min_count\": 5,\n \"max_count\": 50\n },\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.slm.putLifecycle({\n policy_id: \"daily-snapshots\",\n schedule: \"0 30 1 * * ?\",\n name: \"\",\n repository: \"my_repository\",\n config: {\n indices: [\"data-*\", \"important\"],\n ignore_unavailable: false,\n include_global_state: false,\n },\n retention: {\n expire_after: \"30d\",\n min_count: 5,\n max_count: 50,\n },\n});" + }, + { + "language": "Ruby", + "code": "response = client.slm.put_lifecycle(\n policy_id: \"daily-snapshots\",\n body: {\n \"schedule\": \"0 30 1 * * ?\",\n \"name\": \"\",\n \"repository\": \"my_repository\",\n \"config\": {\n \"indices\": [\n \"data-*\",\n \"important\"\n ],\n \"ignore_unavailable\": false,\n \"include_global_state\": false\n },\n \"retention\": {\n \"expire_after\": \"30d\",\n \"min_count\": 5,\n \"max_count\": 50\n }\n }\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->slm()->putLifecycle([\n \"policy_id\" => \"daily-snapshots\",\n \"body\" => [\n \"schedule\" => \"0 30 1 * * ?\",\n \"name\" => \"\",\n \"repository\" => \"my_repository\",\n \"config\" => [\n \"indices\" => array(\n \"data-*\",\n \"important\",\n ),\n \"ignore_unavailable\" => false,\n \"include_global_state\" => false,\n ],\n \"retention\" => [\n \"expire_after\" => \"30d\",\n \"min_count\" => 5,\n \"max_count\" => 50,\n ],\n ],\n]);" + }, + { + "language": "curl", + "code": "curl -X PUT -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"schedule\":\"0 30 1 * * ?\",\"name\":\"\",\"repository\":\"my_repository\",\"config\":{\"indices\":[\"data-*\",\"important\"],\"ignore_unavailable\":false,\"include_global_state\":false},\"retention\":{\"expire_after\":\"30d\",\"min_count\":5,\"max_count\":50}}' \"$ELASTICSEARCH_URL/_slm/policy/daily-snapshots\"" + }, + { + "language": "Java", + "code": "client.slm().putLifecycle(p -> p\n .config(c -> c\n .ignoreUnavailable(false)\n .indices(List.of(\"data-*\",\"important\"))\n .includeGlobalState(false)\n )\n .name(\"\")\n .policyId(\"daily-snapshots\")\n .repository(\"my_repository\")\n .retention(r -> r\n .expireAfter(e -> e\n .time(\"30d\")\n )\n .maxCount(50)\n .minCount(5)\n )\n .schedule(\"0 30 1 * * ?\")\n);\n" + } + ], + "specification/slm/put_lifecycle/examples/request/PutSnapshotLifecycleRequestExample2.yaml": [ + { + "language": "Python", + "code": "resp = client.slm.put_lifecycle(\n policy_id=\"hourly-snapshots\",\n schedule=\"1h\",\n name=\"\",\n repository=\"my_repository\",\n config={\n \"indices\": [\n \"data-*\",\n \"important\"\n ]\n },\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.slm.putLifecycle({\n policy_id: \"hourly-snapshots\",\n schedule: \"1h\",\n name: \"\",\n repository: \"my_repository\",\n config: {\n indices: [\"data-*\", \"important\"],\n },\n});" + }, + { + "language": "Ruby", + "code": "response = client.slm.put_lifecycle(\n policy_id: \"hourly-snapshots\",\n body: {\n \"schedule\": \"1h\",\n \"name\": \"\",\n \"repository\": \"my_repository\",\n \"config\": {\n \"indices\": [\n \"data-*\",\n \"important\"\n ]\n }\n }\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->slm()->putLifecycle([\n \"policy_id\" => \"hourly-snapshots\",\n \"body\" => [\n \"schedule\" => \"1h\",\n \"name\" => \"\",\n \"repository\" => \"my_repository\",\n \"config\" => [\n \"indices\" => array(\n \"data-*\",\n \"important\",\n ),\n ],\n ],\n]);" + }, + { + "language": "curl", + "code": "curl -X PUT -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"schedule\":\"1h\",\"name\":\"\",\"repository\":\"my_repository\",\"config\":{\"indices\":[\"data-*\",\"important\"]}}' \"$ELASTICSEARCH_URL/_slm/policy/hourly-snapshots\"" + }, + { + "language": "Java", + "code": "client.slm().putLifecycle(p -> p\n .config(c -> c\n .indices(List.of(\"data-*\",\"important\"))\n )\n .name(\"\")\n .policyId(\"hourly-snapshots\")\n .repository(\"my_repository\")\n .schedule(\"1h\")\n);\n" + } + ], + "specification/slm/execute_retention/examples/request/SlmExecuteRetentionExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.slm.execute_retention()" + }, + { + "language": "JavaScript", + "code": "const response = await client.slm.executeRetention();" + }, + { + "language": "Ruby", + "code": "response = client.slm.execute_retention" + }, + { + "language": "PHP", + "code": "$resp = $client->slm()->executeRetention();" + }, + { + "language": "curl", + "code": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_slm/_execute_retention\"" + }, + { + "language": "Java", + "code": "client.slm().executeRetention(e -> e);\n" + } + ], + "specification/slm/execute_lifecycle/examples/request/ExecuteSnapshotLifecycleRequestExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.slm.execute_lifecycle(\n policy_id=\"daily-snapshots\",\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.slm.executeLifecycle({\n policy_id: \"daily-snapshots\",\n});" + }, + { + "language": "Ruby", + "code": "response = client.slm.execute_lifecycle(\n policy_id: \"daily-snapshots\"\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->slm()->executeLifecycle([\n \"policy_id\" => \"daily-snapshots\",\n]);" + }, + { + "language": "curl", + "code": "curl -X PUT -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_slm/policy/daily-snapshots/_execute\"" + }, + { + "language": "Java", + "code": "client.slm().executeLifecycle(e -> e\n .policyId(\"daily-snapshots\")\n);\n" + } + ], + "specification/features/reset_features/examples/request/FeaturesResetFeaturesExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.features.reset_features()" + }, + { + "language": "JavaScript", + "code": "const response = await client.features.resetFeatures();" + }, + { + "language": "Ruby", + "code": "response = client.features.reset_features" + }, + { + "language": "PHP", + "code": "$resp = $client->features()->resetFeatures();" + }, + { + "language": "curl", + "code": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_features/_reset\"" + }, + { + "language": "Java", + "code": "client.features().resetFeatures(r -> r);\n" + } + ], + "specification/features/get_features/examples/request/FeaturesGetFeaturesExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.features.get_features()" + }, + { + "language": "JavaScript", + "code": "const response = await client.features.getFeatures();" + }, + { + "language": "Ruby", + "code": "response = client.features.get_features" + }, + { + "language": "PHP", + "code": "$resp = $client->features()->getFeatures();" + }, + { + "language": "curl", + "code": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_features\"" + }, + { + "language": "Java", + "code": "client.features().getFeatures(g -> g);\n" + } + ], + "specification/graph/explore/examples/request/GraphExploreRequestExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.graph.explore(\n index=\"clicklogs\",\n query={\n \"match\": {\n \"query.raw\": \"midi\"\n }\n },\n vertices=[\n {\n \"field\": \"product\"\n }\n ],\n connections={\n \"vertices\": [\n {\n \"field\": \"query.raw\"\n }\n ]\n },\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.graph.explore({\n index: \"clicklogs\",\n query: {\n match: {\n \"query.raw\": \"midi\",\n },\n },\n vertices: [\n {\n field: \"product\",\n },\n ],\n connections: {\n vertices: [\n {\n field: \"query.raw\",\n },\n ],\n },\n});" + }, + { + "language": "Ruby", + "code": "response = client.graph.explore(\n index: \"clicklogs\",\n body: {\n \"query\": {\n \"match\": {\n \"query.raw\": \"midi\"\n }\n },\n \"vertices\": [\n {\n \"field\": \"product\"\n }\n ],\n \"connections\": {\n \"vertices\": [\n {\n \"field\": \"query.raw\"\n }\n ]\n }\n }\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->graph()->explore([\n \"index\" => \"clicklogs\",\n \"body\" => [\n \"query\" => [\n \"match\" => [\n \"query.raw\" => \"midi\",\n ],\n ],\n \"vertices\" => array(\n [\n \"field\" => \"product\",\n ],\n ),\n \"connections\" => [\n \"vertices\" => array(\n [\n \"field\" => \"query.raw\",\n ],\n ),\n ],\n ],\n]);" + }, + { + "language": "curl", + "code": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"query\":{\"match\":{\"query.raw\":\"midi\"}},\"vertices\":[{\"field\":\"product\"}],\"connections\":{\"vertices\":[{\"field\":\"query.raw\"}]}}' \"$ELASTICSEARCH_URL/clicklogs/_graph/explore\"" + }, + { + "language": "Java", + "code": "client.graph().explore(e -> e\n .connections(c -> c\n .vertices(v -> v\n .field(\"query.raw\")\n )\n )\n .index(\"clicklogs\")\n .query(q -> q\n .match(m -> m\n .field(\"query.raw\")\n .query(FieldValue.of(\"midi\"))\n )\n )\n .vertices(v -> v\n .field(\"product\")\n )\n);\n" + } + ], + "specification/synonyms/get_synonym_rule/examples/request/SynonymRuleGetRequestExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.synonyms.get_synonym_rule(\n set_id=\"my-synonyms-set\",\n rule_id=\"test-1\",\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.synonyms.getSynonymRule({\n set_id: \"my-synonyms-set\",\n rule_id: \"test-1\",\n});" + }, + { + "language": "Ruby", + "code": "response = client.synonyms.get_synonym_rule(\n set_id: \"my-synonyms-set\",\n rule_id: \"test-1\"\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->synonyms()->getSynonymRule([\n \"set_id\" => \"my-synonyms-set\",\n \"rule_id\" => \"test-1\",\n]);" + }, + { + "language": "curl", + "code": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_synonyms/my-synonyms-set/test-1\"" + }, + { + "language": "Java", + "code": "client.synonyms().getSynonymRule(g -> g\n .ruleId(\"test-1\")\n .setId(\"my-synonyms-set\")\n);\n" + } + ], + "specification/synonyms/put_synonym_rule/examples/request/SynonymRulePutRequestExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.synonyms.put_synonym_rule(\n set_id=\"my-synonyms-set\",\n rule_id=\"test-1\",\n synonyms=\"hello, hi, howdy\",\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.synonyms.putSynonymRule({\n set_id: \"my-synonyms-set\",\n rule_id: \"test-1\",\n synonyms: \"hello, hi, howdy\",\n});" + }, + { + "language": "Ruby", + "code": "response = client.synonyms.put_synonym_rule(\n set_id: \"my-synonyms-set\",\n rule_id: \"test-1\",\n body: {\n \"synonyms\": \"hello, hi, howdy\"\n }\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->synonyms()->putSynonymRule([\n \"set_id\" => \"my-synonyms-set\",\n \"rule_id\" => \"test-1\",\n \"body\" => [\n \"synonyms\" => \"hello, hi, howdy\",\n ],\n]);" + }, + { + "language": "curl", + "code": "curl -X PUT -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"synonyms\":\"hello, hi, howdy\"}' \"$ELASTICSEARCH_URL/_synonyms/my-synonyms-set/test-1\"" + }, + { + "language": "Java", + "code": "client.synonyms().putSynonymRule(p -> p\n .ruleId(\"test-1\")\n .setId(\"my-synonyms-set\")\n .synonyms(\"hello, hi, howdy\")\n);\n" + } + ], + "specification/synonyms/delete_synonym_rule/examples/request/SynonymRuleDeleteRequestExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.synonyms.delete_synonym_rule(\n set_id=\"my-synonyms-set\",\n rule_id=\"test-1\",\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.synonyms.deleteSynonymRule({\n set_id: \"my-synonyms-set\",\n rule_id: \"test-1\",\n});" + }, + { + "language": "Ruby", + "code": "response = client.synonyms.delete_synonym_rule(\n set_id: \"my-synonyms-set\",\n rule_id: \"test-1\"\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->synonyms()->deleteSynonymRule([\n \"set_id\" => \"my-synonyms-set\",\n \"rule_id\" => \"test-1\",\n]);" + }, + { + "language": "curl", + "code": "curl -X DELETE -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_synonyms/my-synonyms-set/test-1\"" + }, + { + "language": "Java", + "code": "client.synonyms().deleteSynonymRule(d -> d\n .ruleId(\"test-1\")\n .setId(\"my-synonyms-set\")\n);\n" + } + ], + "specification/synonyms/delete_synonym/examples/request/SynonymsDeleteSynonymExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.synonyms.delete_synonym(\n id=\"my-synonyms-set\",\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.synonyms.deleteSynonym({\n id: \"my-synonyms-set\",\n});" + }, + { + "language": "Ruby", + "code": "response = client.synonyms.delete_synonym(\n id: \"my-synonyms-set\"\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->synonyms()->deleteSynonym([\n \"id\" => \"my-synonyms-set\",\n]);" + }, + { + "language": "curl", + "code": "curl -X DELETE -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_synonyms/my-synonyms-set\"" + }, + { + "language": "Java", + "code": "client.synonyms().deleteSynonym(d -> d\n .id(\"my-synonyms-set\")\n);\n" + } + ], + "specification/synonyms/get_synonym/examples/request/SynonymsGetRequestExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.synonyms.get_synonym(\n id=\"my-synonyms-set\",\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.synonyms.getSynonym({\n id: \"my-synonyms-set\",\n});" + }, + { + "language": "Ruby", + "code": "response = client.synonyms.get_synonym(\n id: \"my-synonyms-set\"\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->synonyms()->getSynonym([\n \"id\" => \"my-synonyms-set\",\n]);" + }, + { + "language": "curl", + "code": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_synonyms/my-synonyms-set\"" + }, + { + "language": "Java", + "code": "client.synonyms().getSynonym(g -> g\n .id(\"my-synonyms-set\")\n);\n" + } + ], + "specification/synonyms/get_synonyms_sets/examples/request/SynonymsSetsGetRequestExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.synonyms.get_synonyms_sets()" + }, + { + "language": "JavaScript", + "code": "const response = await client.synonyms.getSynonymsSets();" + }, + { + "language": "Ruby", + "code": "response = client.synonyms.get_synonyms_sets" + }, + { + "language": "PHP", + "code": "$resp = $client->synonyms()->getSynonymsSets();" + }, + { + "language": "curl", + "code": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_synonyms\"" + }, + { + "language": "Java", + "code": "client.synonyms().getSynonymsSets(g -> g);\n" + } + ], + "specification/synonyms/put_synonym/examples/request/SynonymsPutRequestExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.synonyms.put_synonym(\n id=\"my-synonyms-set\",\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.synonyms.putSynonym({\n id: \"my-synonyms-set\",\n});" + }, + { + "language": "Ruby", + "code": "response = client.synonyms.put_synonym(\n id: \"my-synonyms-set\"\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->synonyms()->putSynonym([\n \"id\" => \"my-synonyms-set\",\n]);" + }, + { + "language": "curl", + "code": "curl -X PUT -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_synonyms/my-synonyms-set\"" + } + ], + "specification/dangling_indices/list_dangling_indices/examples/request/DanglingIndicesListDanglingIndicesExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.dangling_indices.list_dangling_indices()" + }, + { + "language": "JavaScript", + "code": "const response = await client.danglingIndices.listDanglingIndices();" + }, + { + "language": "Ruby", + "code": "response = client.dangling_indices.list_dangling_indices" + }, + { + "language": "PHP", + "code": "$resp = $client->danglingIndices()->listDanglingIndices();" + }, + { + "language": "curl", + "code": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_dangling\"" + }, + { + "language": "Java", + "code": "client.danglingIndices().listDanglingIndices();\n" + } + ], + "specification/dangling_indices/delete_dangling_index/examples/request/DanglingIndicesDeleteDanglingIndexExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.dangling_indices.delete_dangling_index(\n index_uuid=\"\",\n accept_data_loss=True,\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.danglingIndices.deleteDanglingIndex({\n index_uuid: \"\",\n accept_data_loss: \"true\",\n});" + }, + { + "language": "Ruby", + "code": "response = client.dangling_indices.delete_dangling_index(\n index_uuid: \"\",\n accept_data_loss: \"true\"\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->danglingIndices()->deleteDanglingIndex([\n \"index_uuid\" => \"\",\n \"accept_data_loss\" => \"true\",\n]);" + }, + { + "language": "curl", + "code": "curl -X DELETE -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_dangling/?accept_data_loss=true\"" + }, + { + "language": "Java", + "code": "client.danglingIndices().deleteDanglingIndex(d -> d\n .acceptDataLoss(true)\n .indexUuid(\"\")\n);\n" + } + ], + "specification/dangling_indices/import_dangling_index/examples/request/ImportDanglingIndexRequestExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.dangling_indices.import_dangling_index(\n index_uuid=\"zmM4e0JtBkeUjiHD-MihPQ\",\n accept_data_loss=True,\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.danglingIndices.importDanglingIndex({\n index_uuid: \"zmM4e0JtBkeUjiHD-MihPQ\",\n accept_data_loss: \"true\",\n});" + }, + { + "language": "Ruby", + "code": "response = client.dangling_indices.import_dangling_index(\n index_uuid: \"zmM4e0JtBkeUjiHD-MihPQ\",\n accept_data_loss: \"true\"\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->danglingIndices()->importDanglingIndex([\n \"index_uuid\" => \"zmM4e0JtBkeUjiHD-MihPQ\",\n \"accept_data_loss\" => \"true\",\n]);" + }, + { + "language": "curl", + "code": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_dangling/zmM4e0JtBkeUjiHD-MihPQ?accept_data_loss=true\"" + }, + { + "language": "Java", + "code": "client.danglingIndices().importDanglingIndex(i -> i\n .acceptDataLoss(true)\n .indexUuid(\"zmM4e0JtBkeUjiHD-MihPQ\")\n);\n" + } + ], + "specification/ml/forecast/examples/request/MlForecastExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.ml.forecast(\n job_id=\"low_request_rate\",\n duration=\"10d\",\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.ml.forecast({\n job_id: \"low_request_rate\",\n duration: \"10d\",\n});" + }, + { + "language": "Ruby", + "code": "response = client.ml.forecast(\n job_id: \"low_request_rate\",\n body: {\n \"duration\": \"10d\"\n }\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->ml()->forecast([\n \"job_id\" => \"low_request_rate\",\n \"body\" => [\n \"duration\" => \"10d\",\n ],\n]);" + }, + { + "language": "curl", + "code": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"duration\":\"10d\"}' \"$ELASTICSEARCH_URL/_ml/anomaly_detectors/low_request_rate/_forecast\"" + }, + { + "language": "Java", + "code": "client.ml().forecast(f -> f\n .duration(d -> d\n .time(\"10d\")\n )\n .jobId(\"low_request_rate\")\n);\n" + } + ], + "specification/ml/stop_data_frame_analytics/examples/request/MlStopDataFrameAnalyticsExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.ml.stop_data_frame_analytics(\n id=\"loganalytics\",\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.ml.stopDataFrameAnalytics({\n id: \"loganalytics\",\n});" + }, + { + "language": "Ruby", + "code": "response = client.ml.stop_data_frame_analytics(\n id: \"loganalytics\"\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->ml()->stopDataFrameAnalytics([\n \"id\" => \"loganalytics\",\n]);" + }, + { + "language": "curl", + "code": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_ml/data_frame/analytics/loganalytics/_stop\"" + }, + { + "language": "Java", + "code": "client.ml().stopDataFrameAnalytics(s -> s\n .id(\"loganalytics\")\n);\n" + } + ], + "specification/ml/delete_model_snapshot/examples/request/MlDeleteModelSnapshotExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.ml.delete_model_snapshot(\n job_id=\"farequote\",\n snapshot_id=\"1491948163\",\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.ml.deleteModelSnapshot({\n job_id: \"farequote\",\n snapshot_id: 1491948163,\n});" + }, + { + "language": "Ruby", + "code": "response = client.ml.delete_model_snapshot(\n job_id: \"farequote\",\n snapshot_id: \"1491948163\"\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->ml()->deleteModelSnapshot([\n \"job_id\" => \"farequote\",\n \"snapshot_id\" => \"1491948163\",\n]);" + }, + { + "language": "curl", + "code": "curl -X DELETE -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_ml/anomaly_detectors/farequote/model_snapshots/1491948163\"" + }, + { + "language": "Java", + "code": "client.ml().deleteModelSnapshot(d -> d\n .jobId(\"farequote\")\n .snapshotId(\"1491948163\")\n);\n" + } + ], + "specification/ml/get_datafeed_stats/examples/request/MlGetDatafeedStatsExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.ml.get_datafeed_stats(\n datafeed_id=\"datafeed-high_sum_total_sales\",\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.ml.getDatafeedStats({\n datafeed_id: \"datafeed-high_sum_total_sales\",\n});" + }, + { + "language": "Ruby", + "code": "response = client.ml.get_datafeed_stats(\n datafeed_id: \"datafeed-high_sum_total_sales\"\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->ml()->getDatafeedStats([\n \"datafeed_id\" => \"datafeed-high_sum_total_sales\",\n]);" + }, + { + "language": "curl", + "code": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_ml/datafeeds/datafeed-high_sum_total_sales/_stats\"" + }, + { + "language": "Java", + "code": "client.ml().getDatafeedStats(g -> g\n .datafeedId(\"datafeed-high_sum_total_sales\")\n);\n" + } + ], + "specification/ml/delete_datafeed/examples/request/MlDeleteDatafeedExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.ml.delete_datafeed(\n datafeed_id=\"datafeed-total-requests\",\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.ml.deleteDatafeed({\n datafeed_id: \"datafeed-total-requests\",\n});" + }, + { + "language": "Ruby", + "code": "response = client.ml.delete_datafeed(\n datafeed_id: \"datafeed-total-requests\"\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->ml()->deleteDatafeed([\n \"datafeed_id\" => \"datafeed-total-requests\",\n]);" + }, + { + "language": "curl", + "code": "curl -X DELETE -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_ml/datafeeds/datafeed-total-requests\"" + }, + { + "language": "Java", + "code": "client.ml().deleteDatafeed(d -> d\n .datafeedId(\"datafeed-total-requests\")\n);\n" + } + ], + "specification/ml/delete_calendar_job/examples/request/MlDeleteCalendarJobExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.ml.delete_calendar_job(\n calendar_id=\"planned-outages\",\n job_id=\"total-requests\",\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.ml.deleteCalendarJob({\n calendar_id: \"planned-outages\",\n job_id: \"total-requests\",\n});" + }, + { + "language": "Ruby", + "code": "response = client.ml.delete_calendar_job(\n calendar_id: \"planned-outages\",\n job_id: \"total-requests\"\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->ml()->deleteCalendarJob([\n \"calendar_id\" => \"planned-outages\",\n \"job_id\" => \"total-requests\",\n]);" + }, + { + "language": "curl", + "code": "curl -X DELETE -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_ml/calendars/planned-outages/jobs/total-requests\"" + }, + { + "language": "Java", + "code": "client.ml().deleteCalendarJob(d -> d\n .calendarId(\"planned-outages\")\n .jobId(\"total-requests\")\n);\n" + } + ], + "specification/ml/get_datafeeds/examples/request/MlGetDatafeedsExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.ml.get_datafeeds(\n datafeed_id=\"datafeed-high_sum_total_sales\",\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.ml.getDatafeeds({\n datafeed_id: \"datafeed-high_sum_total_sales\",\n});" + }, + { + "language": "Ruby", + "code": "response = client.ml.get_datafeeds(\n datafeed_id: \"datafeed-high_sum_total_sales\"\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->ml()->getDatafeeds([\n \"datafeed_id\" => \"datafeed-high_sum_total_sales\",\n]);" + }, + { + "language": "curl", + "code": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_ml/datafeeds/datafeed-high_sum_total_sales\"" + }, + { + "language": "Java", + "code": "client.ml().getDatafeeds(g -> g\n .datafeedId(\"datafeed-high_sum_total_sales\")\n);\n" + } + ], + "specification/ml/stop_trained_model_deployment/examples/request/MlStopTrainedModelDeploymentExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.ml.stop_trained_model_deployment(\n model_id=\"my_model_for_search\",\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.ml.stopTrainedModelDeployment({\n model_id: \"my_model_for_search\",\n});" + }, + { + "language": "Ruby", + "code": "response = client.ml.stop_trained_model_deployment(\n model_id: \"my_model_for_search\"\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->ml()->stopTrainedModelDeployment([\n \"model_id\" => \"my_model_for_search\",\n]);" + }, + { + "language": "curl", + "code": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_ml/trained_models/my_model_for_search/deployment/_stop\"" + }, + { + "language": "Java", + "code": "client.ml().stopTrainedModelDeployment(s -> s\n .modelId(\"my_model_for_search\")\n);\n" + } + ], + "specification/ml/stop_datafeed/examples/request/MlStopDatafeedExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.ml.stop_datafeed(\n datafeed_id=\"datafeed-low_request_rate\",\n timeout=\"30s\",\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.ml.stopDatafeed({\n datafeed_id: \"datafeed-low_request_rate\",\n timeout: \"30s\",\n});" + }, + { + "language": "Ruby", + "code": "response = client.ml.stop_datafeed(\n datafeed_id: \"datafeed-low_request_rate\",\n body: {\n \"timeout\": \"30s\"\n }\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->ml()->stopDatafeed([\n \"datafeed_id\" => \"datafeed-low_request_rate\",\n \"body\" => [\n \"timeout\" => \"30s\",\n ],\n]);" + }, + { + "language": "curl", + "code": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"timeout\":\"30s\"}' \"$ELASTICSEARCH_URL/_ml/datafeeds/datafeed-low_request_rate/_stop\"" + }, + { + "language": "Java", + "code": "client.ml().stopDatafeed(s -> s\n .datafeedId(\"datafeed-low_request_rate\")\n .timeout(t -> t\n .time(\"30s\")\n )\n);\n" + } + ], + "specification/ml/get_calendar_events/examples/request/MlGetCalendarEventsExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.ml.get_calendar_events(\n calendar_id=\"planned-outages\",\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.ml.getCalendarEvents({\n calendar_id: \"planned-outages\",\n});" + }, + { + "language": "Ruby", + "code": "response = client.ml.get_calendar_events(\n calendar_id: \"planned-outages\"\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->ml()->getCalendarEvents([\n \"calendar_id\" => \"planned-outages\",\n]);" + }, + { + "language": "curl", + "code": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_ml/calendars/planned-outages/events\"" + }, + { + "language": "Java", + "code": "client.ml().getCalendarEvents(g -> g\n .calendarId(\"planned-outages\")\n);\n" + } + ], + "specification/ml/infer_trained_model/examples/request/MlInferTrainedModelExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.ml.infer_trained_model(\n model_id=\"lang_ident_model_1\",\n docs=[\n {\n \"text\": \"The fool doth think he is wise, but the wise man knows himself to be a fool.\"\n }\n ],\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.ml.inferTrainedModel({\n model_id: \"lang_ident_model_1\",\n docs: [\n {\n text: \"The fool doth think he is wise, but the wise man knows himself to be a fool.\",\n },\n ],\n});" + }, + { + "language": "Ruby", + "code": "response = client.ml.infer_trained_model(\n model_id: \"lang_ident_model_1\",\n body: {\n \"docs\": [\n {\n \"text\": \"The fool doth think he is wise, but the wise man knows himself to be a fool.\"\n }\n ]\n }\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->ml()->inferTrainedModel([\n \"model_id\" => \"lang_ident_model_1\",\n \"body\" => [\n \"docs\" => array(\n [\n \"text\" => \"The fool doth think he is wise, but the wise man knows himself to be a fool.\",\n ],\n ),\n ],\n]);" + }, + { + "language": "curl", + "code": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"docs\":[{\"text\":\"The fool doth think he is wise, but the wise man knows himself to be a fool.\"}]}' \"$ELASTICSEARCH_URL/_ml/trained_models/lang_ident_model_1/_infer\"" + }, + { + "language": "Java", + "code": "client.ml().inferTrainedModel(i -> i\n .docs(Map.of(\"text\", JsonData.fromJson(\"\\\"The fool doth think he is wise, but the wise man knows himself to be a fool.\\\"\")))\n .modelId(\"lang_ident_model_1\")\n);\n" + } + ], + "specification/ml/put_datafeed/examples/request/MlPutDatafeedExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.ml.put_datafeed(\n datafeed_id=\"datafeed-test-job\",\n pretty=True,\n indices=[\n \"kibana_sample_data_logs\"\n ],\n query={\n \"bool\": {\n \"must\": [\n {\n \"match_all\": {}\n }\n ]\n }\n },\n job_id=\"test-job\",\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.ml.putDatafeed({\n datafeed_id: \"datafeed-test-job\",\n pretty: \"true\",\n indices: [\"kibana_sample_data_logs\"],\n query: {\n bool: {\n must: [\n {\n match_all: {},\n },\n ],\n },\n },\n job_id: \"test-job\",\n});" + }, + { + "language": "Ruby", + "code": "response = client.ml.put_datafeed(\n datafeed_id: \"datafeed-test-job\",\n pretty: \"true\",\n body: {\n \"indices\": [\n \"kibana_sample_data_logs\"\n ],\n \"query\": {\n \"bool\": {\n \"must\": [\n {\n \"match_all\": {}\n }\n ]\n }\n },\n \"job_id\": \"test-job\"\n }\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->ml()->putDatafeed([\n \"datafeed_id\" => \"datafeed-test-job\",\n \"pretty\" => \"true\",\n \"body\" => [\n \"indices\" => array(\n \"kibana_sample_data_logs\",\n ),\n \"query\" => [\n \"bool\" => [\n \"must\" => array(\n [\n \"match_all\" => new ArrayObject([]),\n ],\n ),\n ],\n ],\n \"job_id\" => \"test-job\",\n ],\n]);" + }, + { + "language": "curl", + "code": "curl -X PUT -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"indices\":[\"kibana_sample_data_logs\"],\"query\":{\"bool\":{\"must\":[{\"match_all\":{}}]}},\"job_id\":\"test-job\"}' \"$ELASTICSEARCH_URL/_ml/datafeeds/datafeed-test-job?pretty\"" + }, + { + "language": "Java", + "code": "\n" + } + ], + "specification/ml/update_job/examples/request/MlUpdateJobExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.ml.update_job(\n job_id=\"low_request_rate\",\n description=\"An updated job\",\n detectors={\n \"detector_index\": 0,\n \"description\": \"An updated detector description\"\n },\n groups=[\n \"kibana_sample_data\",\n \"kibana_sample_web_logs\"\n ],\n model_plot_config={\n \"enabled\": True\n },\n renormalization_window_days=30,\n background_persist_interval=\"2h\",\n model_snapshot_retention_days=7,\n results_retention_days=60,\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.ml.updateJob({\n job_id: \"low_request_rate\",\n description: \"An updated job\",\n detectors: {\n detector_index: 0,\n description: \"An updated detector description\",\n },\n groups: [\"kibana_sample_data\", \"kibana_sample_web_logs\"],\n model_plot_config: {\n enabled: true,\n },\n renormalization_window_days: 30,\n background_persist_interval: \"2h\",\n model_snapshot_retention_days: 7,\n results_retention_days: 60,\n});" + }, + { + "language": "Ruby", + "code": "response = client.ml.update_job(\n job_id: \"low_request_rate\",\n body: {\n \"description\": \"An updated job\",\n \"detectors\": {\n \"detector_index\": 0,\n \"description\": \"An updated detector description\"\n },\n \"groups\": [\n \"kibana_sample_data\",\n \"kibana_sample_web_logs\"\n ],\n \"model_plot_config\": {\n \"enabled\": true\n },\n \"renormalization_window_days\": 30,\n \"background_persist_interval\": \"2h\",\n \"model_snapshot_retention_days\": 7,\n \"results_retention_days\": 60\n }\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->ml()->updateJob([\n \"job_id\" => \"low_request_rate\",\n \"body\" => [\n \"description\" => \"An updated job\",\n \"detectors\" => [\n \"detector_index\" => 0,\n \"description\" => \"An updated detector description\",\n ],\n \"groups\" => array(\n \"kibana_sample_data\",\n \"kibana_sample_web_logs\",\n ),\n \"model_plot_config\" => [\n \"enabled\" => true,\n ],\n \"renormalization_window_days\" => 30,\n \"background_persist_interval\" => \"2h\",\n \"model_snapshot_retention_days\" => 7,\n \"results_retention_days\" => 60,\n ],\n]);" + }, + { + "language": "curl", + "code": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"description\":\"An updated job\",\"detectors\":{\"detector_index\":0,\"description\":\"An updated detector description\"},\"groups\":[\"kibana_sample_data\",\"kibana_sample_web_logs\"],\"model_plot_config\":{\"enabled\":true},\"renormalization_window_days\":30,\"background_persist_interval\":\"2h\",\"model_snapshot_retention_days\":7,\"results_retention_days\":60}' \"$ELASTICSEARCH_URL/_ml/anomaly_detectors/low_request_rate/_update\"" + }, + { + "language": "Java", + "code": "client.ml().updateJob(u -> u\n .backgroundPersistInterval(b -> b\n .time(\"2h\")\n )\n .description(\"An updated job\")\n .detectors(d -> d\n .detectorIndex(0)\n .description(\"An updated detector description\")\n )\n .groups(List.of(\"kibana_sample_data\",\"kibana_sample_web_logs\"))\n .jobId(\"low_request_rate\")\n .modelPlotConfig(m -> m\n .enabled(true)\n )\n .modelSnapshotRetentionDays(7L)\n .renormalizationWindowDays(30L)\n .resultsRetentionDays(60L)\n);\n" + } + ], + "specification/ml/upgrade_job_snapshot/examples/request/MlUpgradeJobSnapshotExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.ml.upgrade_job_snapshot(\n job_id=\"low_request_rate\",\n snapshot_id=\"1828371\",\n timeout=\"45m\",\n wait_for_completion=True,\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.ml.upgradeJobSnapshot({\n job_id: \"low_request_rate\",\n snapshot_id: 1828371,\n timeout: \"45m\",\n wait_for_completion: \"true\",\n});" + }, + { + "language": "Ruby", + "code": "response = client.ml.upgrade_job_snapshot(\n job_id: \"low_request_rate\",\n snapshot_id: \"1828371\",\n timeout: \"45m\",\n wait_for_completion: \"true\"\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->ml()->upgradeJobSnapshot([\n \"job_id\" => \"low_request_rate\",\n \"snapshot_id\" => \"1828371\",\n \"timeout\" => \"45m\",\n \"wait_for_completion\" => \"true\",\n]);" + }, + { + "language": "curl", + "code": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_ml/anomaly_detectors/low_request_rate/model_snapshots/1828371/_upgrade?timeout=45m&wait_for_completion=true\"" + }, + { + "language": "Java", + "code": "client.ml().upgradeJobSnapshot(u -> u\n .jobId(\"low_request_rate\")\n .snapshotId(\"1828371\")\n .timeout(t -> t\n .offset(45)\n )\n .waitForCompletion(true)\n);\n" + } + ], + "specification/ml/get_jobs/examples/request/MlGetJobsExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.ml.get_jobs(\n job_id=\"high_sum_total_sales\",\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.ml.getJobs({\n job_id: \"high_sum_total_sales\",\n});" + }, + { + "language": "Ruby", + "code": "response = client.ml.get_jobs(\n job_id: \"high_sum_total_sales\"\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->ml()->getJobs([\n \"job_id\" => \"high_sum_total_sales\",\n]);" + }, + { + "language": "curl", + "code": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_ml/anomaly_detectors/high_sum_total_sales\"" + }, + { + "language": "Java", + "code": "client.ml().getJobs(g -> g\n .jobId(\"high_sum_total_sales\")\n);\n" + } + ], + "specification/ml/get_model_snapshot_upgrade_stats/examples/request/MlGetModelSnapshotUpgradeStatsExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.ml.get_model_snapshot_upgrade_stats(\n job_id=\"low_request_rate\",\n snapshot_id=\"_all\",\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.ml.getModelSnapshotUpgradeStats({\n job_id: \"low_request_rate\",\n snapshot_id: \"_all\",\n});" + }, + { + "language": "Ruby", + "code": "response = client.ml.get_model_snapshot_upgrade_stats(\n job_id: \"low_request_rate\",\n snapshot_id: \"_all\"\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->ml()->getModelSnapshotUpgradeStats([\n \"job_id\" => \"low_request_rate\",\n \"snapshot_id\" => \"_all\",\n]);" + }, + { + "language": "curl", + "code": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_ml/anomaly_detectors/low_request_rate/model_snapshots/_all/_upgrade/_stats\"" + }, + { + "language": "Java", + "code": "client.ml().getModelSnapshotUpgradeStats(g -> g\n .jobId(\"low_request_rate\")\n .snapshotId(\"_all\")\n);\n" + } + ], + "specification/ml/update_model_snapshot/examples/request/MlUpdateModelSnapshotExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.ml.update_model_snapshot(\n job_id=\"it_ops_new_logs\",\n snapshot_id=\"1491852978\",\n description=\"Snapshot 1\",\n retain=True,\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.ml.updateModelSnapshot({\n job_id: \"it_ops_new_logs\",\n snapshot_id: 1491852978,\n description: \"Snapshot 1\",\n retain: true,\n});" + }, + { + "language": "Ruby", + "code": "response = client.ml.update_model_snapshot(\n job_id: \"it_ops_new_logs\",\n snapshot_id: \"1491852978\",\n body: {\n \"description\": \"Snapshot 1\",\n \"retain\": true\n }\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->ml()->updateModelSnapshot([\n \"job_id\" => \"it_ops_new_logs\",\n \"snapshot_id\" => \"1491852978\",\n \"body\" => [\n \"description\" => \"Snapshot 1\",\n \"retain\" => true,\n ],\n]);" + }, + { + "language": "curl", + "code": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"description\":\"Snapshot 1\",\"retain\":true}' \"$ELASTICSEARCH_URL/_ml/anomaly_detectors/it_ops_new_logs/model_snapshots/1491852978/_update\"" + }, + { + "language": "Java", + "code": "client.ml().updateModelSnapshot(u -> u\n .description(\"Snapshot 1\")\n .jobId(\"it_ops_new_logs\")\n .retain(true)\n .snapshotId(\"1491852978\")\n);\n" + } + ], + "specification/ml/put_calendar_job/examples/request/MlPutCalendarJobExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.ml.put_calendar_job(\n calendar_id=\"planned-outages\",\n job_id=\"total-requests\",\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.ml.putCalendarJob({\n calendar_id: \"planned-outages\",\n job_id: \"total-requests\",\n});" + }, + { + "language": "Ruby", + "code": "response = client.ml.put_calendar_job(\n calendar_id: \"planned-outages\",\n job_id: \"total-requests\"\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->ml()->putCalendarJob([\n \"calendar_id\" => \"planned-outages\",\n \"job_id\" => \"total-requests\",\n]);" + }, + { + "language": "curl", + "code": "curl -X PUT -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_ml/calendars/planned-outages/jobs/total-requests\"" + }, + { + "language": "Java", + "code": "client.ml().putCalendarJob(p -> p\n .calendarId(\"planned-outages\")\n .jobId(\"total-requests\")\n);\n" + } + ], + "specification/ml/estimate_model_memory/examples/request/MlEstimateModelMemoryRequestExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.ml.estimate_model_memory(\n analysis_config={\n \"bucket_span\": \"5m\",\n \"detectors\": [\n {\n \"function\": \"sum\",\n \"field_name\": \"bytes\",\n \"by_field_name\": \"status\",\n \"partition_field_name\": \"app\"\n }\n ],\n \"influencers\": [\n \"source_ip\",\n \"dest_ip\"\n ]\n },\n overall_cardinality={\n \"status\": 10,\n \"app\": 50\n },\n max_bucket_cardinality={\n \"source_ip\": 300,\n \"dest_ip\": 30\n },\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.ml.estimateModelMemory({\n analysis_config: {\n bucket_span: \"5m\",\n detectors: [\n {\n function: \"sum\",\n field_name: \"bytes\",\n by_field_name: \"status\",\n partition_field_name: \"app\",\n },\n ],\n influencers: [\"source_ip\", \"dest_ip\"],\n },\n overall_cardinality: {\n status: 10,\n app: 50,\n },\n max_bucket_cardinality: {\n source_ip: 300,\n dest_ip: 30,\n },\n});" + }, + { + "language": "Ruby", + "code": "response = client.ml.estimate_model_memory(\n body: {\n \"analysis_config\": {\n \"bucket_span\": \"5m\",\n \"detectors\": [\n {\n \"function\": \"sum\",\n \"field_name\": \"bytes\",\n \"by_field_name\": \"status\",\n \"partition_field_name\": \"app\"\n }\n ],\n \"influencers\": [\n \"source_ip\",\n \"dest_ip\"\n ]\n },\n \"overall_cardinality\": {\n \"status\": 10,\n \"app\": 50\n },\n \"max_bucket_cardinality\": {\n \"source_ip\": 300,\n \"dest_ip\": 30\n }\n }\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->ml()->estimateModelMemory([\n \"body\" => [\n \"analysis_config\" => [\n \"bucket_span\" => \"5m\",\n \"detectors\" => array(\n [\n \"function\" => \"sum\",\n \"field_name\" => \"bytes\",\n \"by_field_name\" => \"status\",\n \"partition_field_name\" => \"app\",\n ],\n ),\n \"influencers\" => array(\n \"source_ip\",\n \"dest_ip\",\n ),\n ],\n \"overall_cardinality\" => [\n \"status\" => 10,\n \"app\" => 50,\n ],\n \"max_bucket_cardinality\" => [\n \"source_ip\" => 300,\n \"dest_ip\" => 30,\n ],\n ],\n]);" + }, + { + "language": "curl", + "code": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"analysis_config\":{\"bucket_span\":\"5m\",\"detectors\":[{\"function\":\"sum\",\"field_name\":\"bytes\",\"by_field_name\":\"status\",\"partition_field_name\":\"app\"}],\"influencers\":[\"source_ip\",\"dest_ip\"]},\"overall_cardinality\":{\"status\":10,\"app\":50},\"max_bucket_cardinality\":{\"source_ip\":300,\"dest_ip\":30}}' \"$ELASTICSEARCH_URL/_ml/anomaly_detectors/_estimate_model_memory\"" + }, + { + "language": "Java", + "code": "client.ml().estimateModelMemory(e -> e\n .analysisConfig(a -> a\n .bucketSpan(b -> b\n .time(\"5m\")\n )\n .detectors(d -> d\n .byFieldName(\"status\")\n .fieldName(\"bytes\")\n .function(\"sum\")\n .partitionFieldName(\"app\")\n )\n .influencers(List.of(\"source_ip\",\"dest_ip\"))\n )\n .maxBucketCardinality(Map.of(\"dest_ip\", 30L,\"source_ip\", 300L))\n .overallCardinality(Map.of(\"app\", 50L,\"status\", 10L))\n);\n" + } + ], + "specification/ml/get_categories/examples/request/MlGetCategoriesExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.ml.get_categories(\n job_id=\"esxi_log\",\n page={\n \"size\": 1\n },\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.ml.getCategories({\n job_id: \"esxi_log\",\n page: {\n size: 1,\n },\n});" + }, + { + "language": "Ruby", + "code": "response = client.ml.get_categories(\n job_id: \"esxi_log\",\n body: {\n \"page\": {\n \"size\": 1\n }\n }\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->ml()->getCategories([\n \"job_id\" => \"esxi_log\",\n \"body\" => [\n \"page\" => [\n \"size\" => 1,\n ],\n ],\n]);" + }, + { + "language": "curl", + "code": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"page\":{\"size\":1}}' \"$ELASTICSEARCH_URL/_ml/anomaly_detectors/esxi_log/results/categories\"" + }, + { + "language": "Java", + "code": "client.ml().getCategories(g -> g\n .jobId(\"esxi_log\")\n .page(p -> p\n .size(1)\n )\n);\n" + } + ], + "specification/ml/post_calendar_events/examples/request/MlPostCalendarEventsExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.ml.post_calendar_events(\n calendar_id=\"planned-outages\",\n events=[\n {\n \"description\": \"event 1\",\n \"start_time\": 1513641600000,\n \"end_time\": 1513728000000\n },\n {\n \"description\": \"event 2\",\n \"start_time\": 1513814400000,\n \"end_time\": 1513900800000\n },\n {\n \"description\": \"event 3\",\n \"start_time\": 1514160000000,\n \"end_time\": 1514246400000\n }\n ],\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.ml.postCalendarEvents({\n calendar_id: \"planned-outages\",\n events: [\n {\n description: \"event 1\",\n start_time: 1513641600000,\n end_time: 1513728000000,\n },\n {\n description: \"event 2\",\n start_time: 1513814400000,\n end_time: 1513900800000,\n },\n {\n description: \"event 3\",\n start_time: 1514160000000,\n end_time: 1514246400000,\n },\n ],\n});" + }, + { + "language": "Ruby", + "code": "response = client.ml.post_calendar_events(\n calendar_id: \"planned-outages\",\n body: {\n \"events\": [\n {\n \"description\": \"event 1\",\n \"start_time\": 1513641600000,\n \"end_time\": 1513728000000\n },\n {\n \"description\": \"event 2\",\n \"start_time\": 1513814400000,\n \"end_time\": 1513900800000\n },\n {\n \"description\": \"event 3\",\n \"start_time\": 1514160000000,\n \"end_time\": 1514246400000\n }\n ]\n }\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->ml()->postCalendarEvents([\n \"calendar_id\" => \"planned-outages\",\n \"body\" => [\n \"events\" => array(\n [\n \"description\" => \"event 1\",\n \"start_time\" => 1513641600000,\n \"end_time\" => 1513728000000,\n ],\n [\n \"description\" => \"event 2\",\n \"start_time\" => 1513814400000,\n \"end_time\" => 1513900800000,\n ],\n [\n \"description\" => \"event 3\",\n \"start_time\" => 1514160000000,\n \"end_time\" => 1514246400000,\n ],\n ),\n ],\n]);" + }, + { + "language": "curl", + "code": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"events\":[{\"description\":\"event 1\",\"start_time\":1513641600000,\"end_time\":1513728000000},{\"description\":\"event 2\",\"start_time\":1513814400000,\"end_time\":1513900800000},{\"description\":\"event 3\",\"start_time\":1514160000000,\"end_time\":1514246400000}]}' \"$ELASTICSEARCH_URL/_ml/calendars/planned-outages/events\"" + }, + { + "language": "Java", + "code": "client.ml().postCalendarEvents(p -> p\n .calendarId(\"planned-outages\")\n .events(List.of(CalendarEvent.of(c -> c\n .description(\"event 1\")\n .endTime(DateTime.ofEpochMilli(1513728000000L))\n .startTime(DateTime.ofEpochMilli(1513641600000L))),CalendarEvent.of(c -> c\n .description(\"event 2\")\n .endTime(DateTime.ofEpochMilli(1513900800000L))\n .startTime(DateTime.ofEpochMilli(1513814400000L))),CalendarEvent.of(c -> c\n .description(\"event 3\")\n .endTime(DateTime.ofEpochMilli(1514246400000L))\n .startTime(DateTime.ofEpochMilli(1514160000000L)))))\n);\n" + } + ], + "specification/ml/update_datafeed/examples/request/MlUpdateDatafeedExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.ml.update_datafeed(\n datafeed_id=\"datafeed-test-job\",\n query={\n \"term\": {\n \"geo.src\": \"US\"\n }\n },\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.ml.updateDatafeed({\n datafeed_id: \"datafeed-test-job\",\n query: {\n term: {\n \"geo.src\": \"US\",\n },\n },\n});" + }, + { + "language": "Ruby", + "code": "response = client.ml.update_datafeed(\n datafeed_id: \"datafeed-test-job\",\n body: {\n \"query\": {\n \"term\": {\n \"geo.src\": \"US\"\n }\n }\n }\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->ml()->updateDatafeed([\n \"datafeed_id\" => \"datafeed-test-job\",\n \"body\" => [\n \"query\" => [\n \"term\" => [\n \"geo.src\" => \"US\",\n ],\n ],\n ],\n]);" + }, + { + "language": "curl", + "code": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"query\":{\"term\":{\"geo.src\":\"US\"}}}' \"$ELASTICSEARCH_URL/_ml/datafeeds/datafeed-test-job/_update\"" + }, + { + "language": "Java", + "code": "client.ml().updateDatafeed(u -> u\n .datafeedId(\"datafeed-test-job\")\n .query(q -> q\n .term(t -> t\n .field(\"geo.src\")\n .value(FieldValue.of(\"US\"))\n )\n )\n);\n" + } + ], + "specification/ml/put_job/examples/request/MlPutJobRequestExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.ml.put_job(\n job_id=\"job-01\",\n analysis_config={\n \"bucket_span\": \"15m\",\n \"detectors\": [\n {\n \"detector_description\": \"Sum of bytes\",\n \"function\": \"sum\",\n \"field_name\": \"bytes\"\n }\n ]\n },\n data_description={\n \"time_field\": \"timestamp\",\n \"time_format\": \"epoch_ms\"\n },\n analysis_limits={\n \"model_memory_limit\": \"11MB\"\n },\n model_plot_config={\n \"enabled\": True,\n \"annotations_enabled\": True\n },\n results_index_name=\"test-job1\",\n datafeed_config={\n \"indices\": [\n \"kibana_sample_data_logs\"\n ],\n \"query\": {\n \"bool\": {\n \"must\": [\n {\n \"match_all\": {}\n }\n ]\n }\n },\n \"runtime_mappings\": {\n \"hour_of_day\": {\n \"type\": \"long\",\n \"script\": {\n \"source\": \"emit(doc['timestamp'].value.getHour());\"\n }\n }\n },\n \"datafeed_id\": \"datafeed-test-job1\"\n },\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.ml.putJob({\n job_id: \"job-01\",\n analysis_config: {\n bucket_span: \"15m\",\n detectors: [\n {\n detector_description: \"Sum of bytes\",\n function: \"sum\",\n field_name: \"bytes\",\n },\n ],\n },\n data_description: {\n time_field: \"timestamp\",\n time_format: \"epoch_ms\",\n },\n analysis_limits: {\n model_memory_limit: \"11MB\",\n },\n model_plot_config: {\n enabled: true,\n annotations_enabled: true,\n },\n results_index_name: \"test-job1\",\n datafeed_config: {\n indices: [\"kibana_sample_data_logs\"],\n query: {\n bool: {\n must: [\n {\n match_all: {},\n },\n ],\n },\n },\n runtime_mappings: {\n hour_of_day: {\n type: \"long\",\n script: {\n source: \"emit(doc['timestamp'].value.getHour());\",\n },\n },\n },\n datafeed_id: \"datafeed-test-job1\",\n },\n});" + }, + { + "language": "Ruby", + "code": "response = client.ml.put_job(\n job_id: \"job-01\",\n body: {\n \"analysis_config\": {\n \"bucket_span\": \"15m\",\n \"detectors\": [\n {\n \"detector_description\": \"Sum of bytes\",\n \"function\": \"sum\",\n \"field_name\": \"bytes\"\n }\n ]\n },\n \"data_description\": {\n \"time_field\": \"timestamp\",\n \"time_format\": \"epoch_ms\"\n },\n \"analysis_limits\": {\n \"model_memory_limit\": \"11MB\"\n },\n \"model_plot_config\": {\n \"enabled\": true,\n \"annotations_enabled\": true\n },\n \"results_index_name\": \"test-job1\",\n \"datafeed_config\": {\n \"indices\": [\n \"kibana_sample_data_logs\"\n ],\n \"query\": {\n \"bool\": {\n \"must\": [\n {\n \"match_all\": {}\n }\n ]\n }\n },\n \"runtime_mappings\": {\n \"hour_of_day\": {\n \"type\": \"long\",\n \"script\": {\n \"source\": \"emit(doc['timestamp'].value.getHour());\"\n }\n }\n },\n \"datafeed_id\": \"datafeed-test-job1\"\n }\n }\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->ml()->putJob([\n \"job_id\" => \"job-01\",\n \"body\" => [\n \"analysis_config\" => [\n \"bucket_span\" => \"15m\",\n \"detectors\" => array(\n [\n \"detector_description\" => \"Sum of bytes\",\n \"function\" => \"sum\",\n \"field_name\" => \"bytes\",\n ],\n ),\n ],\n \"data_description\" => [\n \"time_field\" => \"timestamp\",\n \"time_format\" => \"epoch_ms\",\n ],\n \"analysis_limits\" => [\n \"model_memory_limit\" => \"11MB\",\n ],\n \"model_plot_config\" => [\n \"enabled\" => true,\n \"annotations_enabled\" => true,\n ],\n \"results_index_name\" => \"test-job1\",\n \"datafeed_config\" => [\n \"indices\" => array(\n \"kibana_sample_data_logs\",\n ),\n \"query\" => [\n \"bool\" => [\n \"must\" => array(\n [\n \"match_all\" => new ArrayObject([]),\n ],\n ),\n ],\n ],\n \"runtime_mappings\" => [\n \"hour_of_day\" => [\n \"type\" => \"long\",\n \"script\" => [\n \"source\" => \"emit(doc['timestamp'].value.getHour());\",\n ],\n ],\n ],\n \"datafeed_id\" => \"datafeed-test-job1\",\n ],\n ],\n]);" + }, + { + "language": "curl", + "code": "curl -X PUT -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"analysis_config\":{\"bucket_span\":\"15m\",\"detectors\":[{\"detector_description\":\"Sum of bytes\",\"function\":\"sum\",\"field_name\":\"bytes\"}]},\"data_description\":{\"time_field\":\"timestamp\",\"time_format\":\"epoch_ms\"},\"analysis_limits\":{\"model_memory_limit\":\"11MB\"},\"model_plot_config\":{\"enabled\":true,\"annotations_enabled\":true},\"results_index_name\":\"test-job1\",\"datafeed_config\":{\"indices\":[\"kibana_sample_data_logs\"],\"query\":{\"bool\":{\"must\":[{\"match_all\":{}}]}},\"runtime_mappings\":{\"hour_of_day\":{\"type\":\"long\",\"script\":{\"source\":\"emit(doc['\"'\"'timestamp'\"'\"'].value.getHour());\"}}},\"datafeed_id\":\"datafeed-test-job1\"}}' \"$ELASTICSEARCH_URL/_ml/anomaly_detectors/job-01\"" + }, + { + "language": "Java", + "code": "client.ml().putJob(p -> p\n .analysisConfig(a -> a\n .bucketSpan(b -> b\n .time(\"15m\")\n )\n .detectors(d -> d\n .detectorDescription(\"Sum of bytes\")\n .fieldName(\"bytes\")\n .function(\"sum\")\n )\n )\n .analysisLimits(an -> an\n .modelMemoryLimit(\"11MB\")\n )\n .dataDescription(d -> d\n .timeField(\"timestamp\")\n .timeFormat(\"epoch_ms\")\n )\n .datafeedConfig(d -> d\n .datafeedId(\"datafeed-test-job1\")\n .indices(\"kibana_sample_data_logs\")\n .query(q -> q\n .bool(b -> b\n .must(m -> m\n .matchAll(ma -> ma)\n )\n )\n )\n .runtimeMappings(\"hour_of_day\", r -> r\n .script(s -> s\n .source(so -> so\n .scriptString(\"emit(doc['timestamp'].value.getHour());\")\n )\n )\n .type(RuntimeFieldType.Long)\n )\n )\n .jobId(\"job-01\")\n .modelPlotConfig(m -> m\n .annotationsEnabled(true)\n .enabled(true)\n )\n .resultsIndexName(\"test-job1\")\n);\n" + } + ], + "specification/ml/evaluate_data_frame/examples/request/MlEvaluateDataFrameRequestExample5.yaml": [ + { + "language": "Python", + "code": "resp = client.ml.evaluate_data_frame(\n index=\"house_price_predictions\",\n query={\n \"term\": {\n \"ml.is_training\": {\n \"value\": True\n }\n }\n },\n evaluation={\n \"regression\": {\n \"actual_field\": \"price\",\n \"predicted_field\": \"ml.price_prediction\",\n \"metrics\": {\n \"r_squared\": {},\n \"mse\": {},\n \"msle\": {},\n \"huber\": {}\n }\n }\n },\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.ml.evaluateDataFrame({\n index: \"house_price_predictions\",\n query: {\n term: {\n \"ml.is_training\": {\n value: true,\n },\n },\n },\n evaluation: {\n regression: {\n actual_field: \"price\",\n predicted_field: \"ml.price_prediction\",\n metrics: {\n r_squared: {},\n mse: {},\n msle: {},\n huber: {},\n },\n },\n },\n});" + }, + { + "language": "Ruby", + "code": "response = client.ml.evaluate_data_frame(\n body: {\n \"index\": \"house_price_predictions\",\n \"query\": {\n \"term\": {\n \"ml.is_training\": {\n \"value\": true\n }\n }\n },\n \"evaluation\": {\n \"regression\": {\n \"actual_field\": \"price\",\n \"predicted_field\": \"ml.price_prediction\",\n \"metrics\": {\n \"r_squared\": {},\n \"mse\": {},\n \"msle\": {},\n \"huber\": {}\n }\n }\n }\n }\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->ml()->evaluateDataFrame([\n \"body\" => [\n \"index\" => \"house_price_predictions\",\n \"query\" => [\n \"term\" => [\n \"ml.is_training\" => [\n \"value\" => true,\n ],\n ],\n ],\n \"evaluation\" => [\n \"regression\" => [\n \"actual_field\" => \"price\",\n \"predicted_field\" => \"ml.price_prediction\",\n \"metrics\" => [\n \"r_squared\" => new ArrayObject([]),\n \"mse\" => new ArrayObject([]),\n \"msle\" => new ArrayObject([]),\n \"huber\" => new ArrayObject([]),\n ],\n ],\n ],\n ],\n]);" + }, + { + "language": "curl", + "code": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"index\":\"house_price_predictions\",\"query\":{\"term\":{\"ml.is_training\":{\"value\":true}}},\"evaluation\":{\"regression\":{\"actual_field\":\"price\",\"predicted_field\":\"ml.price_prediction\",\"metrics\":{\"r_squared\":{},\"mse\":{},\"msle\":{},\"huber\":{}}}}}' \"$ELASTICSEARCH_URL/_ml/data_frame/_evaluate\"" + }, + { + "language": "Java", + "code": "client.ml().evaluateDataFrame(e -> e\n .evaluation(ev -> ev\n .regression(r -> r\n .actualField(\"price\")\n .predictedField(\"ml.price_prediction\")\n .metrics(m -> m\n .msle(ms -> ms)\n .huber(h -> h)\n )\n )\n )\n .index(\"house_price_predictions\")\n .query(q -> q\n .term(t -> t\n .field(\"ml.is_training\")\n .value(FieldValue.of(true))\n )\n )\n);\n" + } + ], + "specification/ml/evaluate_data_frame/examples/request/MlEvaluateDataFrameRequestExample4.yaml": [ + { + "language": "Python", + "code": "resp = client.ml.evaluate_data_frame(\n index=\"house_price_predictions\",\n query={\n \"bool\": {\n \"filter\": [\n {\n \"term\": {\n \"ml.is_training\": False\n }\n }\n ]\n }\n },\n evaluation={\n \"regression\": {\n \"actual_field\": \"price\",\n \"predicted_field\": \"ml.price_prediction\",\n \"metrics\": {\n \"r_squared\": {},\n \"mse\": {},\n \"msle\": {\n \"offset\": 10\n },\n \"huber\": {\n \"delta\": 1.5\n }\n }\n }\n },\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.ml.evaluateDataFrame({\n index: \"house_price_predictions\",\n query: {\n bool: {\n filter: [\n {\n term: {\n \"ml.is_training\": false,\n },\n },\n ],\n },\n },\n evaluation: {\n regression: {\n actual_field: \"price\",\n predicted_field: \"ml.price_prediction\",\n metrics: {\n r_squared: {},\n mse: {},\n msle: {\n offset: 10,\n },\n huber: {\n delta: 1.5,\n },\n },\n },\n },\n});" + }, + { + "language": "Ruby", + "code": "response = client.ml.evaluate_data_frame(\n body: {\n \"index\": \"house_price_predictions\",\n \"query\": {\n \"bool\": {\n \"filter\": [\n {\n \"term\": {\n \"ml.is_training\": false\n }\n }\n ]\n }\n },\n \"evaluation\": {\n \"regression\": {\n \"actual_field\": \"price\",\n \"predicted_field\": \"ml.price_prediction\",\n \"metrics\": {\n \"r_squared\": {},\n \"mse\": {},\n \"msle\": {\n \"offset\": 10\n },\n \"huber\": {\n \"delta\": 1.5\n }\n }\n }\n }\n }\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->ml()->evaluateDataFrame([\n \"body\" => [\n \"index\" => \"house_price_predictions\",\n \"query\" => [\n \"bool\" => [\n \"filter\" => array(\n [\n \"term\" => [\n \"ml.is_training\" => false,\n ],\n ],\n ),\n ],\n ],\n \"evaluation\" => [\n \"regression\" => [\n \"actual_field\" => \"price\",\n \"predicted_field\" => \"ml.price_prediction\",\n \"metrics\" => [\n \"r_squared\" => new ArrayObject([]),\n \"mse\" => new ArrayObject([]),\n \"msle\" => [\n \"offset\" => 10,\n ],\n \"huber\" => [\n \"delta\" => 1.5,\n ],\n ],\n ],\n ],\n ],\n]);" + }, + { + "language": "curl", + "code": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"index\":\"house_price_predictions\",\"query\":{\"bool\":{\"filter\":[{\"term\":{\"ml.is_training\":false}}]}},\"evaluation\":{\"regression\":{\"actual_field\":\"price\",\"predicted_field\":\"ml.price_prediction\",\"metrics\":{\"r_squared\":{},\"mse\":{},\"msle\":{\"offset\":10},\"huber\":{\"delta\":1.5}}}}}' \"$ELASTICSEARCH_URL/_ml/data_frame/_evaluate\"" + }, + { + "language": "Java", + "code": "client.ml().evaluateDataFrame(e -> e\n .evaluation(ev -> ev\n .regression(r -> r\n .actualField(\"price\")\n .predictedField(\"ml.price_prediction\")\n .metrics(m -> m\n .msle(ms -> ms\n .offset(10.0D)\n )\n .huber(h -> h\n .delta(1.5D)\n )\n )\n )\n )\n .index(\"house_price_predictions\")\n .query(q -> q\n .bool(b -> b\n .filter(f -> f\n .term(t -> t\n .field(\"ml.is_training\")\n .value(FieldValue.of(false))\n )\n )\n )\n )\n);\n" + } + ], + "specification/ml/evaluate_data_frame/examples/request/MlEvaluateDataFrameRequestExample3.yaml": [ + { + "language": "Python", + "code": "resp = client.ml.evaluate_data_frame(\n index=\"my_analytics_dest_index\",\n evaluation={\n \"outlier_detection\": {\n \"actual_field\": \"is_outlier\",\n \"predicted_probability_field\": \"ml.outlier_score\"\n }\n },\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.ml.evaluateDataFrame({\n index: \"my_analytics_dest_index\",\n evaluation: {\n outlier_detection: {\n actual_field: \"is_outlier\",\n predicted_probability_field: \"ml.outlier_score\",\n },\n },\n});" + }, + { + "language": "Ruby", + "code": "response = client.ml.evaluate_data_frame(\n body: {\n \"index\": \"my_analytics_dest_index\",\n \"evaluation\": {\n \"outlier_detection\": {\n \"actual_field\": \"is_outlier\",\n \"predicted_probability_field\": \"ml.outlier_score\"\n }\n }\n }\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->ml()->evaluateDataFrame([\n \"body\" => [\n \"index\" => \"my_analytics_dest_index\",\n \"evaluation\" => [\n \"outlier_detection\" => [\n \"actual_field\" => \"is_outlier\",\n \"predicted_probability_field\" => \"ml.outlier_score\",\n ],\n ],\n ],\n]);" + }, + { + "language": "curl", + "code": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"index\":\"my_analytics_dest_index\",\"evaluation\":{\"outlier_detection\":{\"actual_field\":\"is_outlier\",\"predicted_probability_field\":\"ml.outlier_score\"}}}' \"$ELASTICSEARCH_URL/_ml/data_frame/_evaluate\"" + }, + { + "language": "Java", + "code": "client.ml().evaluateDataFrame(e -> e\n .evaluation(ev -> ev\n .outlierDetection(o -> o\n .actualField(\"is_outlier\")\n .predictedProbabilityField(\"ml.outlier_score\")\n )\n )\n .index(\"my_analytics_dest_index\")\n);\n" + } + ], + "specification/ml/evaluate_data_frame/examples/request/MlEvaluateDataFrameRequestExample2.yaml": [ + { + "language": "Python", + "code": "resp = client.ml.evaluate_data_frame(\n index=\"animal_classification\",\n evaluation={\n \"classification\": {\n \"actual_field\": \"animal_class\",\n \"metrics\": {\n \"auc_roc\": {\n \"class_name\": \"dog\"\n }\n }\n }\n },\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.ml.evaluateDataFrame({\n index: \"animal_classification\",\n evaluation: {\n classification: {\n actual_field: \"animal_class\",\n metrics: {\n auc_roc: {\n class_name: \"dog\",\n },\n },\n },\n },\n});" + }, + { + "language": "Ruby", + "code": "response = client.ml.evaluate_data_frame(\n body: {\n \"index\": \"animal_classification\",\n \"evaluation\": {\n \"classification\": {\n \"actual_field\": \"animal_class\",\n \"metrics\": {\n \"auc_roc\": {\n \"class_name\": \"dog\"\n }\n }\n }\n }\n }\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->ml()->evaluateDataFrame([\n \"body\" => [\n \"index\" => \"animal_classification\",\n \"evaluation\" => [\n \"classification\" => [\n \"actual_field\" => \"animal_class\",\n \"metrics\" => [\n \"auc_roc\" => [\n \"class_name\" => \"dog\",\n ],\n ],\n ],\n ],\n ],\n]);" + }, + { + "language": "curl", + "code": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"index\":\"animal_classification\",\"evaluation\":{\"classification\":{\"actual_field\":\"animal_class\",\"metrics\":{\"auc_roc\":{\"class_name\":\"dog\"}}}}}' \"$ELASTICSEARCH_URL/_ml/data_frame/_evaluate\"" + }, + { + "language": "Java", + "code": "client.ml().evaluateDataFrame(e -> e\n .evaluation(ev -> ev\n .classification(c -> c\n .actualField(\"animal_class\")\n .metrics(m -> m\n .aucRoc(a -> a\n .className(\"dog\")\n )\n )\n )\n )\n .index(\"animal_classification\")\n);\n" + } + ], + "specification/ml/evaluate_data_frame/examples/request/MlEvaluateDataFrameRequestExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.ml.evaluate_data_frame(\n index=\"animal_classification\",\n evaluation={\n \"classification\": {\n \"actual_field\": \"animal_class\",\n \"predicted_field\": \"ml.animal_class_prediction\",\n \"metrics\": {\n \"multiclass_confusion_matrix\": {}\n }\n }\n },\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.ml.evaluateDataFrame({\n index: \"animal_classification\",\n evaluation: {\n classification: {\n actual_field: \"animal_class\",\n predicted_field: \"ml.animal_class_prediction\",\n metrics: {\n multiclass_confusion_matrix: {},\n },\n },\n },\n});" + }, + { + "language": "Ruby", + "code": "response = client.ml.evaluate_data_frame(\n body: {\n \"index\": \"animal_classification\",\n \"evaluation\": {\n \"classification\": {\n \"actual_field\": \"animal_class\",\n \"predicted_field\": \"ml.animal_class_prediction\",\n \"metrics\": {\n \"multiclass_confusion_matrix\": {}\n }\n }\n }\n }\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->ml()->evaluateDataFrame([\n \"body\" => [\n \"index\" => \"animal_classification\",\n \"evaluation\" => [\n \"classification\" => [\n \"actual_field\" => \"animal_class\",\n \"predicted_field\" => \"ml.animal_class_prediction\",\n \"metrics\" => [\n \"multiclass_confusion_matrix\" => new ArrayObject([]),\n ],\n ],\n ],\n ],\n]);" + }, + { + "language": "curl", + "code": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"index\":\"animal_classification\",\"evaluation\":{\"classification\":{\"actual_field\":\"animal_class\",\"predicted_field\":\"ml.animal_class_prediction\",\"metrics\":{\"multiclass_confusion_matrix\":{}}}}}' \"$ELASTICSEARCH_URL/_ml/data_frame/_evaluate\"" + }, + { + "language": "Java", + "code": "client.ml().evaluateDataFrame(e -> e\n .evaluation(ev -> ev\n .classification(c -> c\n .actualField(\"animal_class\")\n .predictedField(\"ml.animal_class_prediction\")\n .metrics(m -> m)\n )\n )\n .index(\"animal_classification\")\n);\n" + } + ], + "specification/ml/delete_forecast/examples/request/MlDeleteForecastExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.ml.delete_forecast(\n job_id=\"total-requests\",\n forecast_id=\"_all\",\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.ml.deleteForecast({\n job_id: \"total-requests\",\n forecast_id: \"_all\",\n});" + }, + { + "language": "Ruby", + "code": "response = client.ml.delete_forecast(\n job_id: \"total-requests\",\n forecast_id: \"_all\"\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->ml()->deleteForecast([\n \"job_id\" => \"total-requests\",\n \"forecast_id\" => \"_all\",\n]);" + }, + { + "language": "curl", + "code": "curl -X DELETE -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_ml/anomaly_detectors/total-requests/_forecast/_all\"" + }, + { + "language": "Java", + "code": "client.ml().deleteForecast(d -> d\n .forecastId(\"_all\")\n .jobId(\"total-requests\")\n);\n" + } + ], + "specification/ml/get_trained_models/examples/request/MlGetTrainedModelsExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.ml.get_trained_models()" + }, + { + "language": "JavaScript", + "code": "const response = await client.ml.getTrainedModels();" + }, + { + "language": "Ruby", + "code": "response = client.ml.get_trained_models" + }, + { + "language": "PHP", + "code": "$resp = $client->ml()->getTrainedModels();" + }, + { + "language": "curl", + "code": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_ml/trained_models/\"" + }, + { + "language": "Java", + "code": "client.ml().getTrainedModels(g -> g);\n" + } + ], + "specification/ml/get_trained_models_stats/examples/request/MlGetTrainedModelsStatsExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.ml.get_trained_models_stats()" + }, + { + "language": "JavaScript", + "code": "const response = await client.ml.getTrainedModelsStats();" + }, + { + "language": "Ruby", + "code": "response = client.ml.get_trained_models_stats" + }, + { + "language": "PHP", + "code": "$resp = $client->ml()->getTrainedModelsStats();" + }, + { + "language": "curl", + "code": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_ml/trained_models/_stats\"" + }, + { + "language": "Java", + "code": "client.ml().getTrainedModelsStats(g -> g);\n" + } + ], + "specification/ml/get_influencers/examples/request/MlGetInfluencersExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.ml.get_influencers(\n job_id=\"high_sum_total_sales\",\n sort=\"influencer_score\",\n desc=True,\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.ml.getInfluencers({\n job_id: \"high_sum_total_sales\",\n sort: \"influencer_score\",\n desc: true,\n});" + }, + { + "language": "Ruby", + "code": "response = client.ml.get_influencers(\n job_id: \"high_sum_total_sales\",\n body: {\n \"sort\": \"influencer_score\",\n \"desc\": true\n }\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->ml()->getInfluencers([\n \"job_id\" => \"high_sum_total_sales\",\n \"body\" => [\n \"sort\" => \"influencer_score\",\n \"desc\" => true,\n ],\n]);" + }, + { + "language": "curl", + "code": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"sort\":\"influencer_score\",\"desc\":true}' \"$ELASTICSEARCH_URL/_ml/anomaly_detectors/high_sum_total_sales/results/influencers\"" + }, + { + "language": "Java", + "code": "client.ml().getInfluencers(g -> g\n .jobId(\"high_sum_total_sales\")\n);\n" + } + ], + "specification/ml/reset_job/examples/request/MlResetJobExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.ml.reset_job(\n job_id=\"total-requests\",\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.ml.resetJob({\n job_id: \"total-requests\",\n});" + }, + { + "language": "Ruby", + "code": "response = client.ml.reset_job(\n job_id: \"total-requests\"\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->ml()->resetJob([\n \"job_id\" => \"total-requests\",\n]);" + }, + { + "language": "curl", + "code": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_ml/anomaly_detectors/total-requests/_reset\"" + }, + { + "language": "Java", + "code": "client.ml().resetJob(r -> r\n .jobId(\"total-requests\")\n);\n" + } + ], + "specification/ml/get_data_frame_analytics_stats/examples/request/MlGetDataFrameAnalyticsStatsExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.ml.get_data_frame_analytics_stats(\n id=\"weblog-outliers\",\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.ml.getDataFrameAnalyticsStats({\n id: \"weblog-outliers\",\n});" + }, + { + "language": "Ruby", + "code": "response = client.ml.get_data_frame_analytics_stats(\n id: \"weblog-outliers\"\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->ml()->getDataFrameAnalyticsStats([\n \"id\" => \"weblog-outliers\",\n]);" + }, + { + "language": "curl", + "code": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_ml/data_frame/analytics/weblog-outliers/_stats\"" + }, + { + "language": "Java", + "code": "client.ml().getDataFrameAnalyticsStats(g -> g\n .id(\"weblog-outliers\")\n);\n" + } + ], + "specification/ml/put_calendar/examples/request/MlPutCalendarExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.ml.put_calendar(\n calendar_id=\"planned-outages\",\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.ml.putCalendar({\n calendar_id: \"planned-outages\",\n});" + }, + { + "language": "Ruby", + "code": "response = client.ml.put_calendar(\n calendar_id: \"planned-outages\"\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->ml()->putCalendar([\n \"calendar_id\" => \"planned-outages\",\n]);" + }, + { + "language": "curl", + "code": "curl -X PUT -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_ml/calendars/planned-outages\"" + }, + { + "language": "Java", + "code": "client.ml().putCalendar(p -> p\n .calendarId(\"planned-outages\")\n);\n" + } + ], + "specification/ml/delete_filter/examples/request/MlDeleteFilterExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.ml.delete_filter(\n filter_id=\"safe_domains\",\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.ml.deleteFilter({\n filter_id: \"safe_domains\",\n});" + }, + { + "language": "Ruby", + "code": "response = client.ml.delete_filter(\n filter_id: \"safe_domains\"\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->ml()->deleteFilter([\n \"filter_id\" => \"safe_domains\",\n]);" + }, + { + "language": "curl", + "code": "curl -X DELETE -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_ml/filters/safe_domains\"" + }, + { + "language": "Java", + "code": "client.ml().deleteFilter(d -> d\n .filterId(\"safe_domains\")\n);\n" + } + ], + "specification/ml/update_filter/examples/request/MlUpdateFilterExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.ml.update_filter(\n filter_id=\"safe_domains\",\n description=\"Updated list of domains\",\n add_items=[\n \"*.myorg.com\"\n ],\n remove_items=[\n \"wikipedia.org\"\n ],\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.ml.updateFilter({\n filter_id: \"safe_domains\",\n description: \"Updated list of domains\",\n add_items: [\"*.myorg.com\"],\n remove_items: [\"wikipedia.org\"],\n});" + }, + { + "language": "Ruby", + "code": "response = client.ml.update_filter(\n filter_id: \"safe_domains\",\n body: {\n \"description\": \"Updated list of domains\",\n \"add_items\": [\n \"*.myorg.com\"\n ],\n \"remove_items\": [\n \"wikipedia.org\"\n ]\n }\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->ml()->updateFilter([\n \"filter_id\" => \"safe_domains\",\n \"body\" => [\n \"description\" => \"Updated list of domains\",\n \"add_items\" => array(\n \"*.myorg.com\",\n ),\n \"remove_items\" => array(\n \"wikipedia.org\",\n ),\n ],\n]);" + }, + { + "language": "curl", + "code": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"description\":\"Updated list of domains\",\"add_items\":[\"*.myorg.com\"],\"remove_items\":[\"wikipedia.org\"]}' \"$ELASTICSEARCH_URL/_ml/filters/safe_domains/_update\"" + }, + { + "language": "Java", + "code": "client.ml().updateFilter(u -> u\n .addItems(\"*.myorg.com\")\n .description(\"Updated list of domains\")\n .filterId(\"safe_domains\")\n .removeItems(\"wikipedia.org\")\n);\n" + } + ], + "specification/ml/delete_expired_data/examples/request/MlDeleteExpiredDataExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.ml.delete_expired_data(\n timeout=\"1h\",\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.ml.deleteExpiredData({\n timeout: \"1h\",\n});" + }, + { + "language": "Ruby", + "code": "response = client.ml.delete_expired_data(\n timeout: \"1h\"\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->ml()->deleteExpiredData([\n \"timeout\" => \"1h\",\n]);" + }, + { + "language": "curl", + "code": "curl -X DELETE -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_ml/_delete_expired_data?timeout=1h\"" + }, + { + "language": "Java", + "code": "client.ml().deleteExpiredData(d -> d\n .timeout(t -> t\n .offset(1)\n )\n);\n" + } + ], + "specification/ml/clear_trained_model_deployment_cache/examples/request/MlClearTrainedModelDeploymentCacheExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.ml.clear_trained_model_deployment_cache(\n model_id=\"elastic__distilbert-base-uncased-finetuned-conll03-english\",\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.ml.clearTrainedModelDeploymentCache({\n model_id: \"elastic__distilbert-base-uncased-finetuned-conll03-english\",\n});" + }, + { + "language": "Ruby", + "code": "response = client.ml.clear_trained_model_deployment_cache(\n model_id: \"elastic__distilbert-base-uncased-finetuned-conll03-english\"\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->ml()->clearTrainedModelDeploymentCache([\n \"model_id\" => \"elastic__distilbert-base-uncased-finetuned-conll03-english\",\n]);" + }, + { + "language": "curl", + "code": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_ml/trained_models/elastic__distilbert-base-uncased-finetuned-conll03-english/deployment/cache/_clear\"" + }, + { + "language": "Java", + "code": "client.ml().clearTrainedModelDeploymentCache(c -> c\n .modelId(\"elastic__distilbert-base-uncased-finetuned-conll03-english\")\n);\n" + } + ], + "specification/ml/delete_calendar/examples/request/MlDeleteCalendarExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.ml.delete_calendar(\n calendar_id=\"planned-outages\",\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.ml.deleteCalendar({\n calendar_id: \"planned-outages\",\n});" + }, + { + "language": "Ruby", + "code": "response = client.ml.delete_calendar(\n calendar_id: \"planned-outages\"\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->ml()->deleteCalendar([\n \"calendar_id\" => \"planned-outages\",\n]);" + }, + { + "language": "curl", + "code": "curl -X DELETE -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_ml/calendars/planned-outages\"" + }, + { + "language": "Java", + "code": "client.ml().deleteCalendar(d -> d\n .calendarId(\"planned-outages\")\n);\n" + } + ], + "specification/ml/get_filters/examples/request/MlGetFiltersExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.ml.get_filters(\n filter_id=\"safe_domains\",\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.ml.getFilters({\n filter_id: \"safe_domains\",\n});" + }, + { + "language": "Ruby", + "code": "response = client.ml.get_filters(\n filter_id: \"safe_domains\"\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->ml()->getFilters([\n \"filter_id\" => \"safe_domains\",\n]);" + }, + { + "language": "curl", + "code": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_ml/filters/safe_domains\"" + }, + { + "language": "Java", + "code": "client.ml().getFilters(g -> g\n .filterId(\"safe_domains\")\n);\n" + } + ], + "specification/ml/put_trained_model_alias/examples/request/MlPutTrainedModelAliasExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.ml.put_trained_model_alias(\n model_id=\"flight-delay-prediction-1574775339910\",\n model_alias=\"flight_delay_model\",\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.ml.putTrainedModelAlias({\n model_id: \"flight-delay-prediction-1574775339910\",\n model_alias: \"flight_delay_model\",\n});" + }, + { + "language": "Ruby", + "code": "response = client.ml.put_trained_model_alias(\n model_id: \"flight-delay-prediction-1574775339910\",\n model_alias: \"flight_delay_model\"\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->ml()->putTrainedModelAlias([\n \"model_id\" => \"flight-delay-prediction-1574775339910\",\n \"model_alias\" => \"flight_delay_model\",\n]);" + }, + { + "language": "curl", + "code": "curl -X PUT -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_ml/trained_models/flight-delay-prediction-1574775339910/model_aliases/flight_delay_model\"" + }, + { + "language": "Java", + "code": "client.ml().putTrainedModelAlias(p -> p\n .modelAlias(\"flight_delay_model\")\n .modelId(\"flight-delay-prediction-1574775339910\")\n);\n" + } + ], + "specification/ml/update_trained_model_deployment/examples/request/MlUpdateTrainedModelDeploymentExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.ml.update_trained_model_deployment(\n model_id=\"elastic__distilbert-base-uncased-finetuned-conll03-english\",\n number_of_allocations=4,\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.ml.updateTrainedModelDeployment({\n model_id: \"elastic__distilbert-base-uncased-finetuned-conll03-english\",\n number_of_allocations: 4,\n});" + }, + { + "language": "Ruby", + "code": "response = client.ml.update_trained_model_deployment(\n model_id: \"elastic__distilbert-base-uncased-finetuned-conll03-english\",\n body: {\n \"number_of_allocations\": 4\n }\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->ml()->updateTrainedModelDeployment([\n \"model_id\" => \"elastic__distilbert-base-uncased-finetuned-conll03-english\",\n \"body\" => [\n \"number_of_allocations\" => 4,\n ],\n]);" + }, + { + "language": "curl", + "code": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"number_of_allocations\":4}' \"$ELASTICSEARCH_URL/_ml/trained_models/elastic__distilbert-base-uncased-finetuned-conll03-english/deployment/_update\"" + }, + { + "language": "Java", + "code": "client.ml().updateTrainedModelDeployment(u -> u\n .modelId(\"elastic__distilbert-base-uncased-finetuned-conll03-english\")\n .numberOfAllocations(4)\n);\n" + } + ], + "specification/ml/info/examples/request/MlInfoExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.ml.info()" + }, + { + "language": "JavaScript", + "code": "const response = await client.ml.info();" + }, + { + "language": "Ruby", + "code": "response = client.ml.info" + }, + { + "language": "PHP", + "code": "$resp = $client->ml()->info();" + }, + { + "language": "curl", + "code": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_ml/info\"" + }, + { + "language": "Java", + "code": "client.ml().info();\n" + } + ], + "specification/ml/delete_job/examples/request/MlDeleteJobExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.ml.delete_job(\n job_id=\"total-requests\",\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.ml.deleteJob({\n job_id: \"total-requests\",\n});" + }, + { + "language": "Ruby", + "code": "response = client.ml.delete_job(\n job_id: \"total-requests\"\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->ml()->deleteJob([\n \"job_id\" => \"total-requests\",\n]);" + }, + { + "language": "curl", + "code": "curl -X DELETE -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_ml/anomaly_detectors/total-requests\"" + }, + { + "language": "Java", + "code": "client.ml().deleteJob(d -> d\n .jobId(\"total-requests\")\n);\n" + } + ], + "specification/ml/get_buckets/examples/request/MlGetBucketsExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.ml.get_buckets(\n job_id=\"low_request_rate\",\n anomaly_score=80,\n start=\"1454530200001\",\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.ml.getBuckets({\n job_id: \"low_request_rate\",\n anomaly_score: 80,\n start: 1454530200001,\n});" + }, + { + "language": "Ruby", + "code": "response = client.ml.get_buckets(\n job_id: \"low_request_rate\",\n body: {\n \"anomaly_score\": 80,\n \"start\": \"1454530200001\"\n }\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->ml()->getBuckets([\n \"job_id\" => \"low_request_rate\",\n \"body\" => [\n \"anomaly_score\" => 80,\n \"start\" => \"1454530200001\",\n ],\n]);" + }, + { + "language": "curl", + "code": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"anomaly_score\":80,\"start\":\"1454530200001\"}' \"$ELASTICSEARCH_URL/_ml/anomaly_detectors/low_request_rate/results/buckets\"" + }, + { + "language": "Java", + "code": "client.ml().getBuckets(g -> g\n .anomalyScore(80.0D)\n .jobId(\"low_request_rate\")\n .start(DateTime.of(\"1454530200001\"))\n);\n" + } + ], + "specification/ml/start_trained_model_deployment/examples/request/MlStartTrainedModelDeploymentExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.ml.start_trained_model_deployment(\n model_id=\"elastic__distilbert-base-uncased-finetuned-conll03-english\",\n wait_for=\"started\",\n timeout=\"1m\",\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.ml.startTrainedModelDeployment({\n model_id: \"elastic__distilbert-base-uncased-finetuned-conll03-english\",\n wait_for: \"started\",\n timeout: \"1m\",\n});" + }, + { + "language": "Ruby", + "code": "response = client.ml.start_trained_model_deployment(\n model_id: \"elastic__distilbert-base-uncased-finetuned-conll03-english\",\n wait_for: \"started\",\n timeout: \"1m\"\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->ml()->startTrainedModelDeployment([\n \"model_id\" => \"elastic__distilbert-base-uncased-finetuned-conll03-english\",\n \"wait_for\" => \"started\",\n \"timeout\" => \"1m\",\n]);" + }, + { + "language": "curl", + "code": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_ml/trained_models/elastic__distilbert-base-uncased-finetuned-conll03-english/deployment/_start?wait_for=started&timeout=1m\"" + }, + { + "language": "Java", + "code": "client.ml().startTrainedModelDeployment(s -> s\n .modelId(\"elastic__distilbert-base-uncased-finetuned-conll03-english\")\n .timeout(t -> t\n .offset(1)\n )\n .waitFor(DeploymentAllocationState.Started)\n);\n" + } + ], + "specification/ml/delete_calendar_event/examples/request/MlDeleteCalendarEventExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.ml.delete_calendar_event(\n calendar_id=\"planned-outages\",\n event_id=\"LS8LJGEBMTCMA-qz49st\",\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.ml.deleteCalendarEvent({\n calendar_id: \"planned-outages\",\n event_id: \"LS8LJGEBMTCMA-qz49st\",\n});" + }, + { + "language": "Ruby", + "code": "response = client.ml.delete_calendar_event(\n calendar_id: \"planned-outages\",\n event_id: \"LS8LJGEBMTCMA-qz49st\"\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->ml()->deleteCalendarEvent([\n \"calendar_id\" => \"planned-outages\",\n \"event_id\" => \"LS8LJGEBMTCMA-qz49st\",\n]);" + }, + { + "language": "curl", + "code": "curl -X DELETE -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_ml/calendars/planned-outages/events/LS8LJGEBMTCMA-qz49st\"" + }, + { + "language": "Java", + "code": "client.ml().deleteCalendarEvent(d -> d\n .calendarId(\"planned-outages\")\n .eventId(\"LS8LJGEBMTCMA-qz49st\")\n);\n" + } + ], + "specification/ml/get_records/examples/request/MlGetRecordsExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.ml.get_records(\n job_id=\"low_request_rate\",\n sort=\"record_score\",\n desc=True,\n start=\"1454944100000\",\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.ml.getRecords({\n job_id: \"low_request_rate\",\n sort: \"record_score\",\n desc: true,\n start: 1454944100000,\n});" + }, + { + "language": "Ruby", + "code": "response = client.ml.get_records(\n job_id: \"low_request_rate\",\n body: {\n \"sort\": \"record_score\",\n \"desc\": true,\n \"start\": \"1454944100000\"\n }\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->ml()->getRecords([\n \"job_id\" => \"low_request_rate\",\n \"body\" => [\n \"sort\" => \"record_score\",\n \"desc\" => true,\n \"start\" => \"1454944100000\",\n ],\n]);" + }, + { + "language": "curl", + "code": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"sort\":\"record_score\",\"desc\":true,\"start\":\"1454944100000\"}' \"$ELASTICSEARCH_URL/_ml/anomaly_detectors/low_request_rate/results/records\"" + }, + { + "language": "Java", + "code": "client.ml().getRecords(g -> g\n .desc(true)\n .jobId(\"low_request_rate\")\n .sort(\"record_score\")\n .start(DateTime.of(\"1454944100000\"))\n);\n" + } + ], + "specification/ml/get_memory_stats/examples/request/MlGetMemoryStatsExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.ml.get_memory_stats(\n human=True,\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.ml.getMemoryStats({\n human: \"true\",\n});" + }, + { + "language": "Ruby", + "code": "response = client.ml.get_memory_stats(\n human: \"true\"\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->ml()->getMemoryStats([\n \"human\" => \"true\",\n]);" + }, + { + "language": "curl", + "code": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_ml/memory/_stats?human\"" + }, + { + "language": "Java", + "code": "\n" + } + ], + "specification/ml/start_datafeed/examples/request/MlStartDatafeedExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.ml.start_datafeed(\n datafeed_id=\"datafeed-low_request_rate\",\n start=\"2019-04-07T18:22:16Z\",\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.ml.startDatafeed({\n datafeed_id: \"datafeed-low_request_rate\",\n start: \"2019-04-07T18:22:16Z\",\n});" + }, + { + "language": "Ruby", + "code": "response = client.ml.start_datafeed(\n datafeed_id: \"datafeed-low_request_rate\",\n body: {\n \"start\": \"2019-04-07T18:22:16Z\"\n }\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->ml()->startDatafeed([\n \"datafeed_id\" => \"datafeed-low_request_rate\",\n \"body\" => [\n \"start\" => \"2019-04-07T18:22:16Z\",\n ],\n]);" + }, + { + "language": "curl", + "code": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"start\":\"2019-04-07T18:22:16Z\"}' \"$ELASTICSEARCH_URL/_ml/datafeeds/datafeed-low_request_rate/_start\"" + }, + { + "language": "Java", + "code": "client.ml().startDatafeed(s -> s\n .datafeedId(\"datafeed-low_request_rate\")\n .start(DateTime.of(\"2019-04-07T18:22:16Z\"))\n);\n" + } + ], + "specification/ml/explain_data_frame_analytics/examples/request/MlExplainDataFrameAnalyticsRequestExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.ml.explain_data_frame_analytics(\n source={\n \"index\": \"houses_sold_last_10_yrs\"\n },\n analysis={\n \"regression\": {\n \"dependent_variable\": \"price\"\n }\n },\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.ml.explainDataFrameAnalytics({\n source: {\n index: \"houses_sold_last_10_yrs\",\n },\n analysis: {\n regression: {\n dependent_variable: \"price\",\n },\n },\n});" + }, + { + "language": "Ruby", + "code": "response = client.ml.explain_data_frame_analytics(\n body: {\n \"source\": {\n \"index\": \"houses_sold_last_10_yrs\"\n },\n \"analysis\": {\n \"regression\": {\n \"dependent_variable\": \"price\"\n }\n }\n }\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->ml()->explainDataFrameAnalytics([\n \"body\" => [\n \"source\" => [\n \"index\" => \"houses_sold_last_10_yrs\",\n ],\n \"analysis\" => [\n \"regression\" => [\n \"dependent_variable\" => \"price\",\n ],\n ],\n ],\n]);" + }, + { + "language": "curl", + "code": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"source\":{\"index\":\"houses_sold_last_10_yrs\"},\"analysis\":{\"regression\":{\"dependent_variable\":\"price\"}}}' \"$ELASTICSEARCH_URL/_ml/data_frame/analytics/_explain\"" + }, + { + "language": "Java", + "code": "client.ml().explainDataFrameAnalytics(e -> e\n .analysis(a -> a\n .regression(r -> r\n .dependentVariable(\"price\")\n )\n )\n .source(s -> s\n .index(\"houses_sold_last_10_yrs\")\n )\n);\n" + } + ], + "specification/ml/flush_job/examples/request/MlFlushJobExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.ml.flush_job(\n job_id=\"low_request_rate\",\n calc_interim=True,\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.ml.flushJob({\n job_id: \"low_request_rate\",\n calc_interim: true,\n});" + }, + { + "language": "Ruby", + "code": "response = client.ml.flush_job(\n job_id: \"low_request_rate\",\n body: {\n \"calc_interim\": true\n }\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->ml()->flushJob([\n \"job_id\" => \"low_request_rate\",\n \"body\" => [\n \"calc_interim\" => true,\n ],\n]);" + }, + { + "language": "curl", + "code": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"calc_interim\":true}' \"$ELASTICSEARCH_URL/_ml/anomaly_detectors/low_request_rate/_flush\"" + }, + { + "language": "Java", + "code": "client.ml().flushJob(f -> f\n .calcInterim(true)\n .jobId(\"low_request_rate\")\n);\n" + } + ], + "specification/ml/get_model_snapshots/examples/request/MlGetModelSnapshotsExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.ml.get_model_snapshots(\n job_id=\"high_sum_total_sales\",\n start=\"1575402236000\",\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.ml.getModelSnapshots({\n job_id: \"high_sum_total_sales\",\n start: 1575402236000,\n});" + }, + { + "language": "Ruby", + "code": "response = client.ml.get_model_snapshots(\n job_id: \"high_sum_total_sales\",\n body: {\n \"start\": \"1575402236000\"\n }\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->ml()->getModelSnapshots([\n \"job_id\" => \"high_sum_total_sales\",\n \"body\" => [\n \"start\" => \"1575402236000\",\n ],\n]);" + }, + { + "language": "curl", + "code": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"start\":\"1575402236000\"}' \"$ELASTICSEARCH_URL/_ml/anomaly_detectors/high_sum_total_sales/model_snapshots\"" + }, + { + "language": "Java", + "code": "client.ml().getModelSnapshots(g -> g\n .jobId(\"high_sum_total_sales\")\n .start(DateTime.of(\"1575402236000\"))\n);\n" + } + ], + "specification/ml/set_upgrade_mode/examples/request/MlSetUpgradeModeExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.ml.set_upgrade_mode(\n enabled=True,\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.ml.setUpgradeMode({\n enabled: \"true\",\n});" + }, + { + "language": "Ruby", + "code": "response = client.ml.set_upgrade_mode(\n enabled: \"true\"\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->ml()->setUpgradeMode([\n \"enabled\" => \"true\",\n]);" + }, + { + "language": "curl", + "code": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_ml/set_upgrade_mode?enabled=true\"" + }, + { + "language": "Java", + "code": "client.ml().setUpgradeMode(s -> s\n .enabled(true)\n);\n" + } + ], + "specification/ml/update_data_frame_analytics/examples/request/MlUpdateDataFrameAnalyticsExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.ml.update_data_frame_analytics(\n id=\"loganalytics\",\n model_memory_limit=\"200mb\",\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.ml.updateDataFrameAnalytics({\n id: \"loganalytics\",\n model_memory_limit: \"200mb\",\n});" + }, + { + "language": "Ruby", + "code": "response = client.ml.update_data_frame_analytics(\n id: \"loganalytics\",\n body: {\n \"model_memory_limit\": \"200mb\"\n }\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->ml()->updateDataFrameAnalytics([\n \"id\" => \"loganalytics\",\n \"body\" => [\n \"model_memory_limit\" => \"200mb\",\n ],\n]);" + }, + { + "language": "curl", + "code": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"model_memory_limit\":\"200mb\"}' \"$ELASTICSEARCH_URL/_ml/data_frame/analytics/loganalytics/_update\"" + }, + { + "language": "Java", + "code": "client.ml().updateDataFrameAnalytics(u -> u\n .id(\"loganalytics\")\n .modelMemoryLimit(\"200mb\")\n);\n" + } + ], + "specification/ml/delete_trained_model/examples/request/MlDeleteTrainedModelExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.ml.delete_trained_model(\n model_id=\"regression-job-one-1574775307356\",\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.ml.deleteTrainedModel({\n model_id: \"regression-job-one-1574775307356\",\n});" + }, + { + "language": "Ruby", + "code": "response = client.ml.delete_trained_model(\n model_id: \"regression-job-one-1574775307356\"\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->ml()->deleteTrainedModel([\n \"model_id\" => \"regression-job-one-1574775307356\",\n]);" + }, + { + "language": "curl", + "code": "curl -X DELETE -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_ml/trained_models/regression-job-one-1574775307356\"" + }, + { + "language": "Java", + "code": "client.ml().deleteTrainedModel(d -> d\n .modelId(\"regression-job-one-1574775307356\")\n);\n" + } + ], + "specification/ml/get_overall_buckets/examples/request/MlGetOverallBucketsExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.ml.get_overall_buckets(\n job_id=\"job-*\",\n overall_score=80,\n start=\"1403532000000\",\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.ml.getOverallBuckets({\n job_id: \"job-*\",\n overall_score: 80,\n start: 1403532000000,\n});" + }, + { + "language": "Ruby", + "code": "response = client.ml.get_overall_buckets(\n job_id: \"job-*\",\n body: {\n \"overall_score\": 80,\n \"start\": \"1403532000000\"\n }\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->ml()->getOverallBuckets([\n \"job_id\" => \"job-*\",\n \"body\" => [\n \"overall_score\" => 80,\n \"start\" => \"1403532000000\",\n ],\n]);" + }, + { + "language": "curl", + "code": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"overall_score\":80,\"start\":\"1403532000000\"}' \"$ELASTICSEARCH_URL/_ml/anomaly_detectors/job-*/results/overall_buckets\"" + }, + { + "language": "Java", + "code": "client.ml().getOverallBuckets(g -> g\n .jobId(\"job-*\")\n .overallScore(\"80\")\n .start(DateTime.of(\"1403532000000\"))\n);\n" + } + ], + "specification/ml/preview_datafeed/examples/request/MlPreviewDatafeedExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.ml.preview_datafeed(\n datafeed_id=\"datafeed-high_sum_total_sales\",\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.ml.previewDatafeed({\n datafeed_id: \"datafeed-high_sum_total_sales\",\n});" + }, + { + "language": "Ruby", + "code": "response = client.ml.preview_datafeed(\n datafeed_id: \"datafeed-high_sum_total_sales\"\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->ml()->previewDatafeed([\n \"datafeed_id\" => \"datafeed-high_sum_total_sales\",\n]);" + }, + { + "language": "curl", + "code": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_ml/datafeeds/datafeed-high_sum_total_sales/_preview\"" + }, + { + "language": "Java", + "code": "client.ml().previewDatafeed(p -> p\n .datafeedId(\"datafeed-high_sum_total_sales\")\n);\n" + } + ], + "specification/ml/put_trained_model_vocabulary/examples/request/MlPutTrainedModelVocabularyExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.ml.put_trained_model_vocabulary(\n model_id=\"elastic__distilbert-base-uncased-finetuned-conll03-english\",\n vocabulary=[\n \"[PAD]\",\n \"[unused0]\"\n ],\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.ml.putTrainedModelVocabulary({\n model_id: \"elastic__distilbert-base-uncased-finetuned-conll03-english\",\n vocabulary: [\"[PAD]\", \"[unused0]\"],\n});" + }, + { + "language": "Ruby", + "code": "response = client.ml.put_trained_model_vocabulary(\n model_id: \"elastic__distilbert-base-uncased-finetuned-conll03-english\",\n body: {\n \"vocabulary\": [\n \"[PAD]\",\n \"[unused0]\"\n ]\n }\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->ml()->putTrainedModelVocabulary([\n \"model_id\" => \"elastic__distilbert-base-uncased-finetuned-conll03-english\",\n \"body\" => [\n \"vocabulary\" => array(\n \"[PAD]\",\n \"[unused0]\",\n ),\n ],\n]);" + }, + { + "language": "curl", + "code": "curl -X PUT -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"vocabulary\":[\"[PAD]\",\"[unused0]\"]}' \"$ELASTICSEARCH_URL/_ml/trained_models/elastic__distilbert-base-uncased-finetuned-conll03-english/vocabulary\"" + }, + { + "language": "Java", + "code": "client.ml().putTrainedModelVocabulary(p -> p\n .modelId(\"elastic__distilbert-base-uncased-finetuned-conll03-english\")\n .vocabulary(List.of(\"[PAD]\",\"[unused0]\"))\n);\n" + } + ], + "specification/ml/get_data_frame_analytics/examples/request/MlGetDataFrameAnalyticsExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.ml.get_data_frame_analytics(\n id=\"loganalytics\",\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.ml.getDataFrameAnalytics({\n id: \"loganalytics\",\n});" + }, + { + "language": "Ruby", + "code": "response = client.ml.get_data_frame_analytics(\n id: \"loganalytics\"\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->ml()->getDataFrameAnalytics([\n \"id\" => \"loganalytics\",\n]);" + }, + { + "language": "curl", + "code": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_ml/data_frame/analytics/loganalytics\"" + }, + { + "language": "Java", + "code": "client.ml().getDataFrameAnalytics(g -> g\n .id(\"loganalytics\")\n);\n" + } + ], + "specification/ml/delete_trained_model_alias/examples/request/MlDeleteTrainedModelAliasExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.ml.delete_trained_model_alias(\n model_id=\"flight-delay-prediction-1574775339910\",\n model_alias=\"flight_delay_model\",\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.ml.deleteTrainedModelAlias({\n model_id: \"flight-delay-prediction-1574775339910\",\n model_alias: \"flight_delay_model\",\n});" + }, + { + "language": "Ruby", + "code": "response = client.ml.delete_trained_model_alias(\n model_id: \"flight-delay-prediction-1574775339910\",\n model_alias: \"flight_delay_model\"\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->ml()->deleteTrainedModelAlias([\n \"model_id\" => \"flight-delay-prediction-1574775339910\",\n \"model_alias\" => \"flight_delay_model\",\n]);" + }, + { + "language": "curl", + "code": "curl -X DELETE -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_ml/trained_models/flight-delay-prediction-1574775339910/model_aliases/flight_delay_model\"" + }, + { + "language": "Java", + "code": "client.ml().deleteTrainedModelAlias(d -> d\n .modelAlias(\"flight_delay_model\")\n .modelId(\"flight-delay-prediction-1574775339910\")\n);\n" + } + ], + "specification/ml/revert_model_snapshot/examples/request/MlRevertModelSnapshotExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.ml.revert_model_snapshot(\n job_id=\"low_request_rate\",\n snapshot_id=\"1637092688\",\n delete_intervening_results=True,\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.ml.revertModelSnapshot({\n job_id: \"low_request_rate\",\n snapshot_id: 1637092688,\n delete_intervening_results: true,\n});" + }, + { + "language": "Ruby", + "code": "response = client.ml.revert_model_snapshot(\n job_id: \"low_request_rate\",\n snapshot_id: \"1637092688\",\n body: {\n \"delete_intervening_results\": true\n }\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->ml()->revertModelSnapshot([\n \"job_id\" => \"low_request_rate\",\n \"snapshot_id\" => \"1637092688\",\n \"body\" => [\n \"delete_intervening_results\" => true,\n ],\n]);" + }, + { + "language": "curl", + "code": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"delete_intervening_results\":true}' \"$ELASTICSEARCH_URL/_ml/anomaly_detectors/low_request_rate/model_snapshots/1637092688/_revert\"" + }, + { + "language": "Java", + "code": "client.ml().revertModelSnapshot(r -> r\n .deleteInterveningResults(true)\n .jobId(\"low_request_rate\")\n .snapshotId(\"1637092688\")\n);\n" + } + ], + "specification/ml/close_job/examples/request/MlCloseJobExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.ml.close_job(\n job_id=\"low_request_rate\",\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.ml.closeJob({\n job_id: \"low_request_rate\",\n});" + }, + { + "language": "Ruby", + "code": "response = client.ml.close_job(\n job_id: \"low_request_rate\"\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->ml()->closeJob([\n \"job_id\" => \"low_request_rate\",\n]);" + }, + { + "language": "curl", + "code": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_ml/anomaly_detectors/low_request_rate/_close\"" + }, + { + "language": "Java", + "code": "client.ml().closeJob(c -> c\n .jobId(\"low_request_rate\")\n);\n" + } + ], + "specification/ml/put_trained_model_definition_part/examples/request/MlPutTrainedModelDefinitionPartExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.ml.put_trained_model_definition_part(\n model_id=\"elastic__distilbert-base-uncased-finetuned-conll03-english\",\n part=\"0\",\n definition=\"...\",\n total_definition_length=265632637,\n total_parts=64,\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.ml.putTrainedModelDefinitionPart({\n model_id: \"elastic__distilbert-base-uncased-finetuned-conll03-english\",\n part: 0,\n definition: \"...\",\n total_definition_length: 265632637,\n total_parts: 64,\n});" + }, + { + "language": "Ruby", + "code": "response = client.ml.put_trained_model_definition_part(\n model_id: \"elastic__distilbert-base-uncased-finetuned-conll03-english\",\n part: \"0\",\n body: {\n \"definition\": \"...\",\n \"total_definition_length\": 265632637,\n \"total_parts\": 64\n }\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->ml()->putTrainedModelDefinitionPart([\n \"model_id\" => \"elastic__distilbert-base-uncased-finetuned-conll03-english\",\n \"part\" => \"0\",\n \"body\" => [\n \"definition\" => \"...\",\n \"total_definition_length\" => 265632637,\n \"total_parts\" => 64,\n ],\n]);" + }, + { + "language": "curl", + "code": "curl -X PUT -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"definition\":\"...\",\"total_definition_length\":265632637,\"total_parts\":64}' \"$ELASTICSEARCH_URL/_ml/trained_models/elastic__distilbert-base-uncased-finetuned-conll03-english/definition/0\"" + } + ], + "specification/ml/put_data_frame_analytics/examples/request/MlPutDataFrameAnalyticsExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.ml.put_data_frame_analytics(\n id=\"model-flight-delays-pre\",\n source={\n \"index\": [\n \"kibana_sample_data_flights\"\n ],\n \"query\": {\n \"range\": {\n \"DistanceKilometers\": {\n \"gt\": 0\n }\n }\n },\n \"_source\": {\n \"includes\": [],\n \"excludes\": [\n \"FlightDelay\",\n \"FlightDelayType\"\n ]\n }\n },\n dest={\n \"index\": \"df-flight-delays\",\n \"results_field\": \"ml-results\"\n },\n analysis={\n \"regression\": {\n \"dependent_variable\": \"FlightDelayMin\",\n \"training_percent\": 90\n }\n },\n analyzed_fields={\n \"includes\": [],\n \"excludes\": [\n \"FlightNum\"\n ]\n },\n model_memory_limit=\"100mb\",\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.ml.putDataFrameAnalytics({\n id: \"model-flight-delays-pre\",\n source: {\n index: [\"kibana_sample_data_flights\"],\n query: {\n range: {\n DistanceKilometers: {\n gt: 0,\n },\n },\n },\n _source: {\n includes: [],\n excludes: [\"FlightDelay\", \"FlightDelayType\"],\n },\n },\n dest: {\n index: \"df-flight-delays\",\n results_field: \"ml-results\",\n },\n analysis: {\n regression: {\n dependent_variable: \"FlightDelayMin\",\n training_percent: 90,\n },\n },\n analyzed_fields: {\n includes: [],\n excludes: [\"FlightNum\"],\n },\n model_memory_limit: \"100mb\",\n});" + }, + { + "language": "Ruby", + "code": "response = client.ml.put_data_frame_analytics(\n id: \"model-flight-delays-pre\",\n body: {\n \"source\": {\n \"index\": [\n \"kibana_sample_data_flights\"\n ],\n \"query\": {\n \"range\": {\n \"DistanceKilometers\": {\n \"gt\": 0\n }\n }\n },\n \"_source\": {\n \"includes\": [],\n \"excludes\": [\n \"FlightDelay\",\n \"FlightDelayType\"\n ]\n }\n },\n \"dest\": {\n \"index\": \"df-flight-delays\",\n \"results_field\": \"ml-results\"\n },\n \"analysis\": {\n \"regression\": {\n \"dependent_variable\": \"FlightDelayMin\",\n \"training_percent\": 90\n }\n },\n \"analyzed_fields\": {\n \"includes\": [],\n \"excludes\": [\n \"FlightNum\"\n ]\n },\n \"model_memory_limit\": \"100mb\"\n }\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->ml()->putDataFrameAnalytics([\n \"id\" => \"model-flight-delays-pre\",\n \"body\" => [\n \"source\" => [\n \"index\" => array(\n \"kibana_sample_data_flights\",\n ),\n \"query\" => [\n \"range\" => [\n \"DistanceKilometers\" => [\n \"gt\" => 0,\n ],\n ],\n ],\n \"_source\" => [\n \"includes\" => array(\n ),\n \"excludes\" => array(\n \"FlightDelay\",\n \"FlightDelayType\",\n ),\n ],\n ],\n \"dest\" => [\n \"index\" => \"df-flight-delays\",\n \"results_field\" => \"ml-results\",\n ],\n \"analysis\" => [\n \"regression\" => [\n \"dependent_variable\" => \"FlightDelayMin\",\n \"training_percent\" => 90,\n ],\n ],\n \"analyzed_fields\" => [\n \"includes\" => array(\n ),\n \"excludes\" => array(\n \"FlightNum\",\n ),\n ],\n \"model_memory_limit\" => \"100mb\",\n ],\n]);" + }, + { + "language": "curl", + "code": "curl -X PUT -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"source\":{\"index\":[\"kibana_sample_data_flights\"],\"query\":{\"range\":{\"DistanceKilometers\":{\"gt\":0}}},\"_source\":{\"includes\":[],\"excludes\":[\"FlightDelay\",\"FlightDelayType\"]}},\"dest\":{\"index\":\"df-flight-delays\",\"results_field\":\"ml-results\"},\"analysis\":{\"regression\":{\"dependent_variable\":\"FlightDelayMin\",\"training_percent\":90}},\"analyzed_fields\":{\"includes\":[],\"excludes\":[\"FlightNum\"]},\"model_memory_limit\":\"100mb\"}' \"$ELASTICSEARCH_URL/_ml/data_frame/analytics/model-flight-delays-pre\"" + }, + { + "language": "Java", + "code": "client.ml().putDataFrameAnalytics(p -> p\n .analysis(a -> a\n .regression(r -> r\n .dependentVariable(\"FlightDelayMin\")\n .trainingPercent(\"90\")\n )\n )\n .analyzedFields(an -> an\n .excludes(\"FlightNum\")\n )\n .dest(d -> d\n .index(\"df-flight-delays\")\n .resultsField(\"ml-results\")\n )\n .id(\"model-flight-delays-pre\")\n .modelMemoryLimit(\"100mb\")\n .source(s -> s\n .index(\"kibana_sample_data_flights\")\n .query(q -> q\n .range(r -> r\n .untyped(u -> u\n .field(\"DistanceKilometers\")\n .gt(JsonData.fromJson(\"0\"))\n )\n )\n )\n .source(so -> so\n .excludes(List.of(\"FlightDelay\",\"FlightDelayType\"))\n )\n )\n);\n" + } + ], + "specification/ml/delete_data_frame_analytics/examples/request/MlDeleteDataFrameAnalyticsExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.ml.delete_data_frame_analytics(\n id=\"loganalytics\",\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.ml.deleteDataFrameAnalytics({\n id: \"loganalytics\",\n});" + }, + { + "language": "Ruby", + "code": "response = client.ml.delete_data_frame_analytics(\n id: \"loganalytics\"\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->ml()->deleteDataFrameAnalytics([\n \"id\" => \"loganalytics\",\n]);" + }, + { + "language": "curl", + "code": "curl -X DELETE -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_ml/data_frame/analytics/loganalytics\"" + }, + { + "language": "Java", + "code": "client.ml().deleteDataFrameAnalytics(d -> d\n .id(\"loganalytics\")\n);\n" + } + ], + "specification/ml/preview_data_frame_analytics/examples/request/MlPreviewDataFrameAnalyticsExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.ml.preview_data_frame_analytics(\n config={\n \"source\": {\n \"index\": \"houses_sold_last_10_yrs\"\n },\n \"analysis\": {\n \"regression\": {\n \"dependent_variable\": \"price\"\n }\n }\n },\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.ml.previewDataFrameAnalytics({\n config: {\n source: {\n index: \"houses_sold_last_10_yrs\",\n },\n analysis: {\n regression: {\n dependent_variable: \"price\",\n },\n },\n },\n});" + }, + { + "language": "Ruby", + "code": "response = client.ml.preview_data_frame_analytics(\n body: {\n \"config\": {\n \"source\": {\n \"index\": \"houses_sold_last_10_yrs\"\n },\n \"analysis\": {\n \"regression\": {\n \"dependent_variable\": \"price\"\n }\n }\n }\n }\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->ml()->previewDataFrameAnalytics([\n \"body\" => [\n \"config\" => [\n \"source\" => [\n \"index\" => \"houses_sold_last_10_yrs\",\n ],\n \"analysis\" => [\n \"regression\" => [\n \"dependent_variable\" => \"price\",\n ],\n ],\n ],\n ],\n]);" + }, + { + "language": "curl", + "code": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"config\":{\"source\":{\"index\":\"houses_sold_last_10_yrs\"},\"analysis\":{\"regression\":{\"dependent_variable\":\"price\"}}}}' \"$ELASTICSEARCH_URL/_ml/data_frame/analytics/_preview\"" + }, + { + "language": "Java", + "code": "client.ml().previewDataFrameAnalytics(p -> p\n .config(c -> c\n .source(s -> s\n .index(\"houses_sold_last_10_yrs\")\n )\n .analysis(a -> a\n .regression(r -> r\n .dependentVariable(\"price\")\n )\n )\n )\n);\n" + } + ], + "specification/ml/put_filter/examples/request/MlPutFilterExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.ml.put_filter(\n filter_id=\"safe_domains\",\n description=\"A list of safe domains\",\n items=[\n \"*.google.com\",\n \"wikipedia.org\"\n ],\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.ml.putFilter({\n filter_id: \"safe_domains\",\n description: \"A list of safe domains\",\n items: [\"*.google.com\", \"wikipedia.org\"],\n});" + }, + { + "language": "Ruby", + "code": "response = client.ml.put_filter(\n filter_id: \"safe_domains\",\n body: {\n \"description\": \"A list of safe domains\",\n \"items\": [\n \"*.google.com\",\n \"wikipedia.org\"\n ]\n }\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->ml()->putFilter([\n \"filter_id\" => \"safe_domains\",\n \"body\" => [\n \"description\" => \"A list of safe domains\",\n \"items\" => array(\n \"*.google.com\",\n \"wikipedia.org\",\n ),\n ],\n]);" + }, + { + "language": "curl", + "code": "curl -X PUT -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"description\":\"A list of safe domains\",\"items\":[\"*.google.com\",\"wikipedia.org\"]}' \"$ELASTICSEARCH_URL/_ml/filters/safe_domains\"" + }, + { + "language": "Java", + "code": "client.ml().putFilter(p -> p\n .description(\"A list of safe domains\")\n .filterId(\"safe_domains\")\n .items(List.of(\"*.google.com\",\"wikipedia.org\"))\n);\n" + } + ], + "specification/ml/start_data_frame_analytics/examples/request/MlStartDataFrameAnalyticsExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.ml.start_data_frame_analytics(\n id=\"loganalytics\",\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.ml.startDataFrameAnalytics({\n id: \"loganalytics\",\n});" + }, + { + "language": "Ruby", + "code": "response = client.ml.start_data_frame_analytics(\n id: \"loganalytics\"\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->ml()->startDataFrameAnalytics([\n \"id\" => \"loganalytics\",\n]);" + }, + { + "language": "curl", + "code": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_ml/data_frame/analytics/loganalytics/_start\"" + }, + { + "language": "Java", + "code": "client.ml().startDataFrameAnalytics(s -> s\n .id(\"loganalytics\")\n);\n" + } + ], + "specification/ml/get_calendars/examples/request/MlGetCalendarsExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.ml.get_calendars(\n calendar_id=\"planned-outages\",\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.ml.getCalendars({\n calendar_id: \"planned-outages\",\n});" + }, + { + "language": "Ruby", + "code": "response = client.ml.get_calendars(\n calendar_id: \"planned-outages\"\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->ml()->getCalendars([\n \"calendar_id\" => \"planned-outages\",\n]);" + }, + { + "language": "curl", + "code": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_ml/calendars/planned-outages\"" + }, + { + "language": "Java", + "code": "client.ml().getCalendars(g -> g\n .calendarId(\"planned-outages\")\n);\n" + } + ], + "specification/ml/get_job_stats/examples/request/MlGetJobStatsExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.ml.get_job_stats(\n job_id=\"low_request_rate\",\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.ml.getJobStats({\n job_id: \"low_request_rate\",\n});" + }, + { + "language": "Ruby", + "code": "response = client.ml.get_job_stats(\n job_id: \"low_request_rate\"\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->ml()->getJobStats([\n \"job_id\" => \"low_request_rate\",\n]);" + }, + { + "language": "curl", + "code": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_ml/anomaly_detectors/low_request_rate/_stats\"" + }, + { + "language": "Java", + "code": "client.ml().getJobStats(g -> g\n .jobId(\"low_request_rate\")\n);\n" + } + ], + "specification/ml/open_job/examples/request/MlOpenJobRequestExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.ml.open_job(\n job_id=\"job-01\",\n timeout=\"35m\",\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.ml.openJob({\n job_id: \"job-01\",\n timeout: \"35m\",\n});" + }, + { + "language": "Ruby", + "code": "response = client.ml.open_job(\n job_id: \"job-01\",\n body: {\n \"timeout\": \"35m\"\n }\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->ml()->openJob([\n \"job_id\" => \"job-01\",\n \"body\" => [\n \"timeout\" => \"35m\",\n ],\n]);" + }, + { + "language": "curl", + "code": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"timeout\":\"35m\"}' \"$ELASTICSEARCH_URL/_ml/anomaly_detectors/job-01/_open\"" + }, + { + "language": "Java", + "code": "client.ml().openJob(o -> o\n .jobId(\"job-01\")\n .timeout(t -> t\n .time(\"35m\")\n )\n);\n" + } + ], + "specification/text_structure/test_grok_pattern/examples/request/TestGrokPatternRequestExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.text_structure.test_grok_pattern(\n grok_pattern=\"Hello %{WORD:first_name} %{WORD:last_name}\",\n text=[\n \"Hello John Doe\",\n \"this does not match\"\n ],\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.textStructure.testGrokPattern({\n grok_pattern: \"Hello %{WORD:first_name} %{WORD:last_name}\",\n text: [\"Hello John Doe\", \"this does not match\"],\n});" + }, + { + "language": "Ruby", + "code": "response = client.text_structure.test_grok_pattern(\n body: {\n \"grok_pattern\": \"Hello %{WORD:first_name} %{WORD:last_name}\",\n \"text\": [\n \"Hello John Doe\",\n \"this does not match\"\n ]\n }\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->textStructure()->testGrokPattern([\n \"body\" => [\n \"grok_pattern\" => \"Hello %{WORD:first_name} %{WORD:last_name}\",\n \"text\" => array(\n \"Hello John Doe\",\n \"this does not match\",\n ),\n ],\n]);" + }, + { + "language": "curl", + "code": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"grok_pattern\":\"Hello %{WORD:first_name} %{WORD:last_name}\",\"text\":[\"Hello John Doe\",\"this does not match\"]}' \"$ELASTICSEARCH_URL/_text_structure/test_grok_pattern\"" + }, + { + "language": "Java", + "code": "client.textStructure().testGrokPattern(t -> t\n .grokPattern(\"Hello %{WORD:first_name} %{WORD:last_name}\")\n .text(List.of(\"Hello John Doe\",\"this does not match\"))\n);\n" + } + ], + "specification/text_structure/find_structure/examples/request/FindStructureRequestExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.text_structure.find_structure(\n text_files=[\n {\n \"name\": \"Leviathan Wakes\",\n \"author\": \"James S.A. Corey\",\n \"release_date\": \"2011-06-02\",\n \"page_count\": 561\n },\n {\n \"name\": \"Hyperion\",\n \"author\": \"Dan Simmons\",\n \"release_date\": \"1989-05-26\",\n \"page_count\": 482\n },\n {\n \"name\": \"Dune\",\n \"author\": \"Frank Herbert\",\n \"release_date\": \"1965-06-01\",\n \"page_count\": 604\n },\n {\n \"name\": \"Dune Messiah\",\n \"author\": \"Frank Herbert\",\n \"release_date\": \"1969-10-15\",\n \"page_count\": 331\n },\n {\n \"name\": \"Children of Dune\",\n \"author\": \"Frank Herbert\",\n \"release_date\": \"1976-04-21\",\n \"page_count\": 408\n },\n {\n \"name\": \"God Emperor of Dune\",\n \"author\": \"Frank Herbert\",\n \"release_date\": \"1981-05-28\",\n \"page_count\": 454\n },\n {\n \"name\": \"Consider Phlebas\",\n \"author\": \"Iain M. Banks\",\n \"release_date\": \"1987-04-23\",\n \"page_count\": 471\n },\n {\n \"name\": \"Pandora's Star\",\n \"author\": \"Peter F. Hamilton\",\n \"release_date\": \"2004-03-02\",\n \"page_count\": 768\n },\n {\n \"name\": \"Revelation Space\",\n \"author\": \"Alastair Reynolds\",\n \"release_date\": \"2000-03-15\",\n \"page_count\": 585\n },\n {\n \"name\": \"A Fire Upon the Deep\",\n \"author\": \"Vernor Vinge\",\n \"release_date\": \"1992-06-01\",\n \"page_count\": 613\n },\n {\n \"name\": \"Ender's Game\",\n \"author\": \"Orson Scott Card\",\n \"release_date\": \"1985-06-01\",\n \"page_count\": 324\n },\n {\n \"name\": \"1984\",\n \"author\": \"George Orwell\",\n \"release_date\": \"1985-06-01\",\n \"page_count\": 328\n },\n {\n \"name\": \"Fahrenheit 451\",\n \"author\": \"Ray Bradbury\",\n \"release_date\": \"1953-10-15\",\n \"page_count\": 227\n },\n {\n \"name\": \"Brave New World\",\n \"author\": \"Aldous Huxley\",\n \"release_date\": \"1932-06-01\",\n \"page_count\": 268\n },\n {\n \"name\": \"Foundation\",\n \"author\": \"Isaac Asimov\",\n \"release_date\": \"1951-06-01\",\n \"page_count\": 224\n },\n {\n \"name\": \"The Giver\",\n \"author\": \"Lois Lowry\",\n \"release_date\": \"1993-04-26\",\n \"page_count\": 208\n },\n {\n \"name\": \"Slaughterhouse-Five\",\n \"author\": \"Kurt Vonnegut\",\n \"release_date\": \"1969-06-01\",\n \"page_count\": 275\n },\n {\n \"name\": \"The Hitchhiker's Guide to the Galaxy\",\n \"author\": \"Douglas Adams\",\n \"release_date\": \"1979-10-12\",\n \"page_count\": 180\n },\n {\n \"name\": \"Snow Crash\",\n \"author\": \"Neal Stephenson\",\n \"release_date\": \"1992-06-01\",\n \"page_count\": 470\n },\n {\n \"name\": \"Neuromancer\",\n \"author\": \"William Gibson\",\n \"release_date\": \"1984-07-01\",\n \"page_count\": 271\n },\n {\n \"name\": \"The Handmaid's Tale\",\n \"author\": \"Margaret Atwood\",\n \"release_date\": \"1985-06-01\",\n \"page_count\": 311\n },\n {\n \"name\": \"Starship Troopers\",\n \"author\": \"Robert A. Heinlein\",\n \"release_date\": \"1959-12-01\",\n \"page_count\": 335\n },\n {\n \"name\": \"The Left Hand of Darkness\",\n \"author\": \"Ursula K. Le Guin\",\n \"release_date\": \"1969-06-01\",\n \"page_count\": 304\n },\n {\n \"name\": \"The Moon is a Harsh Mistress\",\n \"author\": \"Robert A. Heinlein\",\n \"release_date\": \"1966-04-01\",\n \"page_count\": 288\n }\n ],\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.textStructure.findStructure({\n text_files: [\n {\n name: \"Leviathan Wakes\",\n author: \"James S.A. Corey\",\n release_date: \"2011-06-02\",\n page_count: 561,\n },\n {\n name: \"Hyperion\",\n author: \"Dan Simmons\",\n release_date: \"1989-05-26\",\n page_count: 482,\n },\n {\n name: \"Dune\",\n author: \"Frank Herbert\",\n release_date: \"1965-06-01\",\n page_count: 604,\n },\n {\n name: \"Dune Messiah\",\n author: \"Frank Herbert\",\n release_date: \"1969-10-15\",\n page_count: 331,\n },\n {\n name: \"Children of Dune\",\n author: \"Frank Herbert\",\n release_date: \"1976-04-21\",\n page_count: 408,\n },\n {\n name: \"God Emperor of Dune\",\n author: \"Frank Herbert\",\n release_date: \"1981-05-28\",\n page_count: 454,\n },\n {\n name: \"Consider Phlebas\",\n author: \"Iain M. Banks\",\n release_date: \"1987-04-23\",\n page_count: 471,\n },\n {\n name: \"Pandora's Star\",\n author: \"Peter F. Hamilton\",\n release_date: \"2004-03-02\",\n page_count: 768,\n },\n {\n name: \"Revelation Space\",\n author: \"Alastair Reynolds\",\n release_date: \"2000-03-15\",\n page_count: 585,\n },\n {\n name: \"A Fire Upon the Deep\",\n author: \"Vernor Vinge\",\n release_date: \"1992-06-01\",\n page_count: 613,\n },\n {\n name: \"Ender's Game\",\n author: \"Orson Scott Card\",\n release_date: \"1985-06-01\",\n page_count: 324,\n },\n {\n name: \"1984\",\n author: \"George Orwell\",\n release_date: \"1985-06-01\",\n page_count: 328,\n },\n {\n name: \"Fahrenheit 451\",\n author: \"Ray Bradbury\",\n release_date: \"1953-10-15\",\n page_count: 227,\n },\n {\n name: \"Brave New World\",\n author: \"Aldous Huxley\",\n release_date: \"1932-06-01\",\n page_count: 268,\n },\n {\n name: \"Foundation\",\n author: \"Isaac Asimov\",\n release_date: \"1951-06-01\",\n page_count: 224,\n },\n {\n name: \"The Giver\",\n author: \"Lois Lowry\",\n release_date: \"1993-04-26\",\n page_count: 208,\n },\n {\n name: \"Slaughterhouse-Five\",\n author: \"Kurt Vonnegut\",\n release_date: \"1969-06-01\",\n page_count: 275,\n },\n {\n name: \"The Hitchhiker's Guide to the Galaxy\",\n author: \"Douglas Adams\",\n release_date: \"1979-10-12\",\n page_count: 180,\n },\n {\n name: \"Snow Crash\",\n author: \"Neal Stephenson\",\n release_date: \"1992-06-01\",\n page_count: 470,\n },\n {\n name: \"Neuromancer\",\n author: \"William Gibson\",\n release_date: \"1984-07-01\",\n page_count: 271,\n },\n {\n name: \"The Handmaid's Tale\",\n author: \"Margaret Atwood\",\n release_date: \"1985-06-01\",\n page_count: 311,\n },\n {\n name: \"Starship Troopers\",\n author: \"Robert A. Heinlein\",\n release_date: \"1959-12-01\",\n page_count: 335,\n },\n {\n name: \"The Left Hand of Darkness\",\n author: \"Ursula K. Le Guin\",\n release_date: \"1969-06-01\",\n page_count: 304,\n },\n {\n name: \"The Moon is a Harsh Mistress\",\n author: \"Robert A. Heinlein\",\n release_date: \"1966-04-01\",\n page_count: 288,\n },\n ],\n});" + }, + { + "language": "Ruby", + "code": "response = client.text_structure.find_structure(\n body: [\n {\n \"name\": \"Leviathan Wakes\",\n \"author\": \"James S.A. Corey\",\n \"release_date\": \"2011-06-02\",\n \"page_count\": 561\n },\n {\n \"name\": \"Hyperion\",\n \"author\": \"Dan Simmons\",\n \"release_date\": \"1989-05-26\",\n \"page_count\": 482\n },\n {\n \"name\": \"Dune\",\n \"author\": \"Frank Herbert\",\n \"release_date\": \"1965-06-01\",\n \"page_count\": 604\n },\n {\n \"name\": \"Dune Messiah\",\n \"author\": \"Frank Herbert\",\n \"release_date\": \"1969-10-15\",\n \"page_count\": 331\n },\n {\n \"name\": \"Children of Dune\",\n \"author\": \"Frank Herbert\",\n \"release_date\": \"1976-04-21\",\n \"page_count\": 408\n },\n {\n \"name\": \"God Emperor of Dune\",\n \"author\": \"Frank Herbert\",\n \"release_date\": \"1981-05-28\",\n \"page_count\": 454\n },\n {\n \"name\": \"Consider Phlebas\",\n \"author\": \"Iain M. Banks\",\n \"release_date\": \"1987-04-23\",\n \"page_count\": 471\n },\n {\n \"name\": \"Pandora's Star\",\n \"author\": \"Peter F. Hamilton\",\n \"release_date\": \"2004-03-02\",\n \"page_count\": 768\n },\n {\n \"name\": \"Revelation Space\",\n \"author\": \"Alastair Reynolds\",\n \"release_date\": \"2000-03-15\",\n \"page_count\": 585\n },\n {\n \"name\": \"A Fire Upon the Deep\",\n \"author\": \"Vernor Vinge\",\n \"release_date\": \"1992-06-01\",\n \"page_count\": 613\n },\n {\n \"name\": \"Ender's Game\",\n \"author\": \"Orson Scott Card\",\n \"release_date\": \"1985-06-01\",\n \"page_count\": 324\n },\n {\n \"name\": \"1984\",\n \"author\": \"George Orwell\",\n \"release_date\": \"1985-06-01\",\n \"page_count\": 328\n },\n {\n \"name\": \"Fahrenheit 451\",\n \"author\": \"Ray Bradbury\",\n \"release_date\": \"1953-10-15\",\n \"page_count\": 227\n },\n {\n \"name\": \"Brave New World\",\n \"author\": \"Aldous Huxley\",\n \"release_date\": \"1932-06-01\",\n \"page_count\": 268\n },\n {\n \"name\": \"Foundation\",\n \"author\": \"Isaac Asimov\",\n \"release_date\": \"1951-06-01\",\n \"page_count\": 224\n },\n {\n \"name\": \"The Giver\",\n \"author\": \"Lois Lowry\",\n \"release_date\": \"1993-04-26\",\n \"page_count\": 208\n },\n {\n \"name\": \"Slaughterhouse-Five\",\n \"author\": \"Kurt Vonnegut\",\n \"release_date\": \"1969-06-01\",\n \"page_count\": 275\n },\n {\n \"name\": \"The Hitchhiker's Guide to the Galaxy\",\n \"author\": \"Douglas Adams\",\n \"release_date\": \"1979-10-12\",\n \"page_count\": 180\n },\n {\n \"name\": \"Snow Crash\",\n \"author\": \"Neal Stephenson\",\n \"release_date\": \"1992-06-01\",\n \"page_count\": 470\n },\n {\n \"name\": \"Neuromancer\",\n \"author\": \"William Gibson\",\n \"release_date\": \"1984-07-01\",\n \"page_count\": 271\n },\n {\n \"name\": \"The Handmaid's Tale\",\n \"author\": \"Margaret Atwood\",\n \"release_date\": \"1985-06-01\",\n \"page_count\": 311\n },\n {\n \"name\": \"Starship Troopers\",\n \"author\": \"Robert A. Heinlein\",\n \"release_date\": \"1959-12-01\",\n \"page_count\": 335\n },\n {\n \"name\": \"The Left Hand of Darkness\",\n \"author\": \"Ursula K. Le Guin\",\n \"release_date\": \"1969-06-01\",\n \"page_count\": 304\n },\n {\n \"name\": \"The Moon is a Harsh Mistress\",\n \"author\": \"Robert A. Heinlein\",\n \"release_date\": \"1966-04-01\",\n \"page_count\": 288\n }\n ]\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->textStructure()->findStructure([\n \"body\" => array(\n [\n \"name\" => \"Leviathan Wakes\",\n \"author\" => \"James S.A. Corey\",\n \"release_date\" => \"2011-06-02\",\n \"page_count\" => 561,\n ],\n [\n \"name\" => \"Hyperion\",\n \"author\" => \"Dan Simmons\",\n \"release_date\" => \"1989-05-26\",\n \"page_count\" => 482,\n ],\n [\n \"name\" => \"Dune\",\n \"author\" => \"Frank Herbert\",\n \"release_date\" => \"1965-06-01\",\n \"page_count\" => 604,\n ],\n [\n \"name\" => \"Dune Messiah\",\n \"author\" => \"Frank Herbert\",\n \"release_date\" => \"1969-10-15\",\n \"page_count\" => 331,\n ],\n [\n \"name\" => \"Children of Dune\",\n \"author\" => \"Frank Herbert\",\n \"release_date\" => \"1976-04-21\",\n \"page_count\" => 408,\n ],\n [\n \"name\" => \"God Emperor of Dune\",\n \"author\" => \"Frank Herbert\",\n \"release_date\" => \"1981-05-28\",\n \"page_count\" => 454,\n ],\n [\n \"name\" => \"Consider Phlebas\",\n \"author\" => \"Iain M. Banks\",\n \"release_date\" => \"1987-04-23\",\n \"page_count\" => 471,\n ],\n [\n \"name\" => \"Pandora's Star\",\n \"author\" => \"Peter F. Hamilton\",\n \"release_date\" => \"2004-03-02\",\n \"page_count\" => 768,\n ],\n [\n \"name\" => \"Revelation Space\",\n \"author\" => \"Alastair Reynolds\",\n \"release_date\" => \"2000-03-15\",\n \"page_count\" => 585,\n ],\n [\n \"name\" => \"A Fire Upon the Deep\",\n \"author\" => \"Vernor Vinge\",\n \"release_date\" => \"1992-06-01\",\n \"page_count\" => 613,\n ],\n [\n \"name\" => \"Ender's Game\",\n \"author\" => \"Orson Scott Card\",\n \"release_date\" => \"1985-06-01\",\n \"page_count\" => 324,\n ],\n [\n \"name\" => \"1984\",\n \"author\" => \"George Orwell\",\n \"release_date\" => \"1985-06-01\",\n \"page_count\" => 328,\n ],\n [\n \"name\" => \"Fahrenheit 451\",\n \"author\" => \"Ray Bradbury\",\n \"release_date\" => \"1953-10-15\",\n \"page_count\" => 227,\n ],\n [\n \"name\" => \"Brave New World\",\n \"author\" => \"Aldous Huxley\",\n \"release_date\" => \"1932-06-01\",\n \"page_count\" => 268,\n ],\n [\n \"name\" => \"Foundation\",\n \"author\" => \"Isaac Asimov\",\n \"release_date\" => \"1951-06-01\",\n \"page_count\" => 224,\n ],\n [\n \"name\" => \"The Giver\",\n \"author\" => \"Lois Lowry\",\n \"release_date\" => \"1993-04-26\",\n \"page_count\" => 208,\n ],\n [\n \"name\" => \"Slaughterhouse-Five\",\n \"author\" => \"Kurt Vonnegut\",\n \"release_date\" => \"1969-06-01\",\n \"page_count\" => 275,\n ],\n [\n \"name\" => \"The Hitchhiker's Guide to the Galaxy\",\n \"author\" => \"Douglas Adams\",\n \"release_date\" => \"1979-10-12\",\n \"page_count\" => 180,\n ],\n [\n \"name\" => \"Snow Crash\",\n \"author\" => \"Neal Stephenson\",\n \"release_date\" => \"1992-06-01\",\n \"page_count\" => 470,\n ],\n [\n \"name\" => \"Neuromancer\",\n \"author\" => \"William Gibson\",\n \"release_date\" => \"1984-07-01\",\n \"page_count\" => 271,\n ],\n [\n \"name\" => \"The Handmaid's Tale\",\n \"author\" => \"Margaret Atwood\",\n \"release_date\" => \"1985-06-01\",\n \"page_count\" => 311,\n ],\n [\n \"name\" => \"Starship Troopers\",\n \"author\" => \"Robert A. Heinlein\",\n \"release_date\" => \"1959-12-01\",\n \"page_count\" => 335,\n ],\n [\n \"name\" => \"The Left Hand of Darkness\",\n \"author\" => \"Ursula K. Le Guin\",\n \"release_date\" => \"1969-06-01\",\n \"page_count\" => 304,\n ],\n [\n \"name\" => \"The Moon is a Harsh Mistress\",\n \"author\" => \"Robert A. Heinlein\",\n \"release_date\" => \"1966-04-01\",\n \"page_count\" => 288,\n ],\n ),\n]);" + }, + { + "language": "curl", + "code": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '[{\"name\":\"Leviathan Wakes\",\"author\":\"James S.A. Corey\",\"release_date\":\"2011-06-02\",\"page_count\":561},{\"name\":\"Hyperion\",\"author\":\"Dan Simmons\",\"release_date\":\"1989-05-26\",\"page_count\":482},{\"name\":\"Dune\",\"author\":\"Frank Herbert\",\"release_date\":\"1965-06-01\",\"page_count\":604},{\"name\":\"Dune Messiah\",\"author\":\"Frank Herbert\",\"release_date\":\"1969-10-15\",\"page_count\":331},{\"name\":\"Children of Dune\",\"author\":\"Frank Herbert\",\"release_date\":\"1976-04-21\",\"page_count\":408},{\"name\":\"God Emperor of Dune\",\"author\":\"Frank Herbert\",\"release_date\":\"1981-05-28\",\"page_count\":454},{\"name\":\"Consider Phlebas\",\"author\":\"Iain M. Banks\",\"release_date\":\"1987-04-23\",\"page_count\":471},{\"name\":\"Pandora'\"'\"'s Star\",\"author\":\"Peter F. Hamilton\",\"release_date\":\"2004-03-02\",\"page_count\":768},{\"name\":\"Revelation Space\",\"author\":\"Alastair Reynolds\",\"release_date\":\"2000-03-15\",\"page_count\":585},{\"name\":\"A Fire Upon the Deep\",\"author\":\"Vernor Vinge\",\"release_date\":\"1992-06-01\",\"page_count\":613},{\"name\":\"Ender'\"'\"'s Game\",\"author\":\"Orson Scott Card\",\"release_date\":\"1985-06-01\",\"page_count\":324},{\"name\":\"1984\",\"author\":\"George Orwell\",\"release_date\":\"1985-06-01\",\"page_count\":328},{\"name\":\"Fahrenheit 451\",\"author\":\"Ray Bradbury\",\"release_date\":\"1953-10-15\",\"page_count\":227},{\"name\":\"Brave New World\",\"author\":\"Aldous Huxley\",\"release_date\":\"1932-06-01\",\"page_count\":268},{\"name\":\"Foundation\",\"author\":\"Isaac Asimov\",\"release_date\":\"1951-06-01\",\"page_count\":224},{\"name\":\"The Giver\",\"author\":\"Lois Lowry\",\"release_date\":\"1993-04-26\",\"page_count\":208},{\"name\":\"Slaughterhouse-Five\",\"author\":\"Kurt Vonnegut\",\"release_date\":\"1969-06-01\",\"page_count\":275},{\"name\":\"The Hitchhiker'\"'\"'s Guide to the Galaxy\",\"author\":\"Douglas Adams\",\"release_date\":\"1979-10-12\",\"page_count\":180},{\"name\":\"Snow Crash\",\"author\":\"Neal Stephenson\",\"release_date\":\"1992-06-01\",\"page_count\":470},{\"name\":\"Neuromancer\",\"author\":\"William Gibson\",\"release_date\":\"1984-07-01\",\"page_count\":271},{\"name\":\"The Handmaid'\"'\"'s Tale\",\"author\":\"Margaret Atwood\",\"release_date\":\"1985-06-01\",\"page_count\":311},{\"name\":\"Starship Troopers\",\"author\":\"Robert A. Heinlein\",\"release_date\":\"1959-12-01\",\"page_count\":335},{\"name\":\"The Left Hand of Darkness\",\"author\":\"Ursula K. Le Guin\",\"release_date\":\"1969-06-01\",\"page_count\":304},{\"name\":\"The Moon is a Harsh Mistress\",\"author\":\"Robert A. Heinlein\",\"release_date\":\"1966-04-01\",\"page_count\":288}]' \"$ELASTICSEARCH_URL/_text_structure/find_structure\"" + } + ], + "specification/text_structure/find_field_structure/examples/request/FindFieldStructureRequestExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.text_structure.find_field_structure(\n index=\"test-logs\",\n field=\"message\",\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.textStructure.findFieldStructure({\n index: \"test-logs\",\n field: \"message\",\n});" + }, + { + "language": "Ruby", + "code": "response = client.text_structure.find_field_structure(\n index: \"test-logs\",\n field: \"message\"\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->textStructure()->findFieldStructure([\n \"index\" => \"test-logs\",\n \"field\" => \"message\",\n]);" + }, + { + "language": "curl", + "code": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_text_structure/find_field_structure?index=test-logs&field=message\"" + }, + { + "language": "Java", + "code": "client.textStructure().findFieldStructure(f -> f\n .field(\"message\")\n .index(\"test-logs\")\n);\n" + } + ], + "specification/text_structure/find_message_structure/examples/request/FindMessageStructureRequestExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.text_structure.find_message_structure(\n messages=[\n \"[2024-03-05T10:52:36,256][INFO ][o.a.l.u.VectorUtilPanamaProvider] [laptop] Java vector incubator API enabled; uses preferredBitSize=128\",\n \"[2024-03-05T10:52:41,038][INFO ][o.e.p.PluginsService ] [laptop] loaded module [repository-url]\",\n \"[2024-03-05T10:52:41,042][INFO ][o.e.p.PluginsService ] [laptop] loaded module [rest-root]\",\n \"[2024-03-05T10:52:41,043][INFO ][o.e.p.PluginsService ] [laptop] loaded module [x-pack-core]\",\n \"[2024-03-05T10:52:41,043][INFO ][o.e.p.PluginsService ] [laptop] loaded module [x-pack-redact]\",\n \"[2024-03-05T10:52:41,043][INFO ][o.e.p.PluginsService ] [laptop] loaded module [ingest-user-agent]\",\n \"[2024-03-05T10:52:41,044][INFO ][o.e.p.PluginsService ] [laptop] loaded module [x-pack-monitoring]\",\n \"[2024-03-05T10:52:41,044][INFO ][o.e.p.PluginsService ] [laptop] loaded module [repository-s3]\",\n \"[2024-03-05T10:52:41,044][INFO ][o.e.p.PluginsService ] [laptop] loaded module [x-pack-analytics]\",\n \"[2024-03-05T10:52:41,044][INFO ][o.e.p.PluginsService ] [laptop] loaded module [x-pack-ent-search]\",\n \"[2024-03-05T10:52:41,044][INFO ][o.e.p.PluginsService ] [laptop] loaded module [x-pack-autoscaling]\",\n \"[2024-03-05T10:52:41,044][INFO ][o.e.p.PluginsService ] [laptop] loaded module [lang-painless]]\",\n \"[2024-03-05T10:52:41,059][INFO ][o.e.p.PluginsService ] [laptop] loaded module [lang-expression]\",\n \"[2024-03-05T10:52:41,059][INFO ][o.e.p.PluginsService ] [laptop] loaded module [x-pack-eql]\",\n \"[2024-03-05T10:52:43,291][INFO ][o.e.e.NodeEnvironment ] [laptop] heap size [16gb], compressed ordinary object pointers [true]\",\n \"[2024-03-05T10:52:46,098][INFO ][o.e.x.s.Security ] [laptop] Security is enabled\",\n \"[2024-03-05T10:52:47,227][INFO ][o.e.x.p.ProfilingPlugin ] [laptop] Profiling is enabled\",\n \"[2024-03-05T10:52:47,259][INFO ][o.e.x.p.ProfilingPlugin ] [laptop] profiling index templates will not be installed or reinstalled\",\n \"[2024-03-05T10:52:47,755][INFO ][o.e.i.r.RecoverySettings ] [laptop] using rate limit [40mb] with [default=40mb, read=0b, write=0b, max=0b]\",\n \"[2024-03-05T10:52:47,787][INFO ][o.e.d.DiscoveryModule ] [laptop] using discovery type [multi-node] and seed hosts providers [settings]\",\n \"[2024-03-05T10:52:49,188][INFO ][o.e.n.Node ] [laptop] initialized\",\n \"[2024-03-05T10:52:49,199][INFO ][o.e.n.Node ] [laptop] starting ...\"\n ],\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.textStructure.findMessageStructure({\n messages: [\n \"[2024-03-05T10:52:36,256][INFO ][o.a.l.u.VectorUtilPanamaProvider] [laptop] Java vector incubator API enabled; uses preferredBitSize=128\",\n \"[2024-03-05T10:52:41,038][INFO ][o.e.p.PluginsService ] [laptop] loaded module [repository-url]\",\n \"[2024-03-05T10:52:41,042][INFO ][o.e.p.PluginsService ] [laptop] loaded module [rest-root]\",\n \"[2024-03-05T10:52:41,043][INFO ][o.e.p.PluginsService ] [laptop] loaded module [x-pack-core]\",\n \"[2024-03-05T10:52:41,043][INFO ][o.e.p.PluginsService ] [laptop] loaded module [x-pack-redact]\",\n \"[2024-03-05T10:52:41,043][INFO ][o.e.p.PluginsService ] [laptop] loaded module [ingest-user-agent]\",\n \"[2024-03-05T10:52:41,044][INFO ][o.e.p.PluginsService ] [laptop] loaded module [x-pack-monitoring]\",\n \"[2024-03-05T10:52:41,044][INFO ][o.e.p.PluginsService ] [laptop] loaded module [repository-s3]\",\n \"[2024-03-05T10:52:41,044][INFO ][o.e.p.PluginsService ] [laptop] loaded module [x-pack-analytics]\",\n \"[2024-03-05T10:52:41,044][INFO ][o.e.p.PluginsService ] [laptop] loaded module [x-pack-ent-search]\",\n \"[2024-03-05T10:52:41,044][INFO ][o.e.p.PluginsService ] [laptop] loaded module [x-pack-autoscaling]\",\n \"[2024-03-05T10:52:41,044][INFO ][o.e.p.PluginsService ] [laptop] loaded module [lang-painless]]\",\n \"[2024-03-05T10:52:41,059][INFO ][o.e.p.PluginsService ] [laptop] loaded module [lang-expression]\",\n \"[2024-03-05T10:52:41,059][INFO ][o.e.p.PluginsService ] [laptop] loaded module [x-pack-eql]\",\n \"[2024-03-05T10:52:43,291][INFO ][o.e.e.NodeEnvironment ] [laptop] heap size [16gb], compressed ordinary object pointers [true]\",\n \"[2024-03-05T10:52:46,098][INFO ][o.e.x.s.Security ] [laptop] Security is enabled\",\n \"[2024-03-05T10:52:47,227][INFO ][o.e.x.p.ProfilingPlugin ] [laptop] Profiling is enabled\",\n \"[2024-03-05T10:52:47,259][INFO ][o.e.x.p.ProfilingPlugin ] [laptop] profiling index templates will not be installed or reinstalled\",\n \"[2024-03-05T10:52:47,755][INFO ][o.e.i.r.RecoverySettings ] [laptop] using rate limit [40mb] with [default=40mb, read=0b, write=0b, max=0b]\",\n \"[2024-03-05T10:52:47,787][INFO ][o.e.d.DiscoveryModule ] [laptop] using discovery type [multi-node] and seed hosts providers [settings]\",\n \"[2024-03-05T10:52:49,188][INFO ][o.e.n.Node ] [laptop] initialized\",\n \"[2024-03-05T10:52:49,199][INFO ][o.e.n.Node ] [laptop] starting ...\",\n ],\n});" + }, + { + "language": "Ruby", + "code": "response = client.text_structure.find_message_structure(\n body: {\n \"messages\": [\n \"[2024-03-05T10:52:36,256][INFO ][o.a.l.u.VectorUtilPanamaProvider] [laptop] Java vector incubator API enabled; uses preferredBitSize=128\",\n \"[2024-03-05T10:52:41,038][INFO ][o.e.p.PluginsService ] [laptop] loaded module [repository-url]\",\n \"[2024-03-05T10:52:41,042][INFO ][o.e.p.PluginsService ] [laptop] loaded module [rest-root]\",\n \"[2024-03-05T10:52:41,043][INFO ][o.e.p.PluginsService ] [laptop] loaded module [x-pack-core]\",\n \"[2024-03-05T10:52:41,043][INFO ][o.e.p.PluginsService ] [laptop] loaded module [x-pack-redact]\",\n \"[2024-03-05T10:52:41,043][INFO ][o.e.p.PluginsService ] [laptop] loaded module [ingest-user-agent]\",\n \"[2024-03-05T10:52:41,044][INFO ][o.e.p.PluginsService ] [laptop] loaded module [x-pack-monitoring]\",\n \"[2024-03-05T10:52:41,044][INFO ][o.e.p.PluginsService ] [laptop] loaded module [repository-s3]\",\n \"[2024-03-05T10:52:41,044][INFO ][o.e.p.PluginsService ] [laptop] loaded module [x-pack-analytics]\",\n \"[2024-03-05T10:52:41,044][INFO ][o.e.p.PluginsService ] [laptop] loaded module [x-pack-ent-search]\",\n \"[2024-03-05T10:52:41,044][INFO ][o.e.p.PluginsService ] [laptop] loaded module [x-pack-autoscaling]\",\n \"[2024-03-05T10:52:41,044][INFO ][o.e.p.PluginsService ] [laptop] loaded module [lang-painless]]\",\n \"[2024-03-05T10:52:41,059][INFO ][o.e.p.PluginsService ] [laptop] loaded module [lang-expression]\",\n \"[2024-03-05T10:52:41,059][INFO ][o.e.p.PluginsService ] [laptop] loaded module [x-pack-eql]\",\n \"[2024-03-05T10:52:43,291][INFO ][o.e.e.NodeEnvironment ] [laptop] heap size [16gb], compressed ordinary object pointers [true]\",\n \"[2024-03-05T10:52:46,098][INFO ][o.e.x.s.Security ] [laptop] Security is enabled\",\n \"[2024-03-05T10:52:47,227][INFO ][o.e.x.p.ProfilingPlugin ] [laptop] Profiling is enabled\",\n \"[2024-03-05T10:52:47,259][INFO ][o.e.x.p.ProfilingPlugin ] [laptop] profiling index templates will not be installed or reinstalled\",\n \"[2024-03-05T10:52:47,755][INFO ][o.e.i.r.RecoverySettings ] [laptop] using rate limit [40mb] with [default=40mb, read=0b, write=0b, max=0b]\",\n \"[2024-03-05T10:52:47,787][INFO ][o.e.d.DiscoveryModule ] [laptop] using discovery type [multi-node] and seed hosts providers [settings]\",\n \"[2024-03-05T10:52:49,188][INFO ][o.e.n.Node ] [laptop] initialized\",\n \"[2024-03-05T10:52:49,199][INFO ][o.e.n.Node ] [laptop] starting ...\"\n ]\n }\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->textStructure()->findMessageStructure([\n \"body\" => [\n \"messages\" => array(\n \"[2024-03-05T10:52:36,256][INFO ][o.a.l.u.VectorUtilPanamaProvider] [laptop] Java vector incubator API enabled; uses preferredBitSize=128\",\n \"[2024-03-05T10:52:41,038][INFO ][o.e.p.PluginsService ] [laptop] loaded module [repository-url]\",\n \"[2024-03-05T10:52:41,042][INFO ][o.e.p.PluginsService ] [laptop] loaded module [rest-root]\",\n \"[2024-03-05T10:52:41,043][INFO ][o.e.p.PluginsService ] [laptop] loaded module [x-pack-core]\",\n \"[2024-03-05T10:52:41,043][INFO ][o.e.p.PluginsService ] [laptop] loaded module [x-pack-redact]\",\n \"[2024-03-05T10:52:41,043][INFO ][o.e.p.PluginsService ] [laptop] loaded module [ingest-user-agent]\",\n \"[2024-03-05T10:52:41,044][INFO ][o.e.p.PluginsService ] [laptop] loaded module [x-pack-monitoring]\",\n \"[2024-03-05T10:52:41,044][INFO ][o.e.p.PluginsService ] [laptop] loaded module [repository-s3]\",\n \"[2024-03-05T10:52:41,044][INFO ][o.e.p.PluginsService ] [laptop] loaded module [x-pack-analytics]\",\n \"[2024-03-05T10:52:41,044][INFO ][o.e.p.PluginsService ] [laptop] loaded module [x-pack-ent-search]\",\n \"[2024-03-05T10:52:41,044][INFO ][o.e.p.PluginsService ] [laptop] loaded module [x-pack-autoscaling]\",\n \"[2024-03-05T10:52:41,044][INFO ][o.e.p.PluginsService ] [laptop] loaded module [lang-painless]]\",\n \"[2024-03-05T10:52:41,059][INFO ][o.e.p.PluginsService ] [laptop] loaded module [lang-expression]\",\n \"[2024-03-05T10:52:41,059][INFO ][o.e.p.PluginsService ] [laptop] loaded module [x-pack-eql]\",\n \"[2024-03-05T10:52:43,291][INFO ][o.e.e.NodeEnvironment ] [laptop] heap size [16gb], compressed ordinary object pointers [true]\",\n \"[2024-03-05T10:52:46,098][INFO ][o.e.x.s.Security ] [laptop] Security is enabled\",\n \"[2024-03-05T10:52:47,227][INFO ][o.e.x.p.ProfilingPlugin ] [laptop] Profiling is enabled\",\n \"[2024-03-05T10:52:47,259][INFO ][o.e.x.p.ProfilingPlugin ] [laptop] profiling index templates will not be installed or reinstalled\",\n \"[2024-03-05T10:52:47,755][INFO ][o.e.i.r.RecoverySettings ] [laptop] using rate limit [40mb] with [default=40mb, read=0b, write=0b, max=0b]\",\n \"[2024-03-05T10:52:47,787][INFO ][o.e.d.DiscoveryModule ] [laptop] using discovery type [multi-node] and seed hosts providers [settings]\",\n \"[2024-03-05T10:52:49,188][INFO ][o.e.n.Node ] [laptop] initialized\",\n \"[2024-03-05T10:52:49,199][INFO ][o.e.n.Node ] [laptop] starting ...\",\n ),\n ],\n]);" + }, + { + "language": "curl", + "code": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"messages\":[\"[2024-03-05T10:52:36,256][INFO ][o.a.l.u.VectorUtilPanamaProvider] [laptop] Java vector incubator API enabled; uses preferredBitSize=128\",\"[2024-03-05T10:52:41,038][INFO ][o.e.p.PluginsService ] [laptop] loaded module [repository-url]\",\"[2024-03-05T10:52:41,042][INFO ][o.e.p.PluginsService ] [laptop] loaded module [rest-root]\",\"[2024-03-05T10:52:41,043][INFO ][o.e.p.PluginsService ] [laptop] loaded module [x-pack-core]\",\"[2024-03-05T10:52:41,043][INFO ][o.e.p.PluginsService ] [laptop] loaded module [x-pack-redact]\",\"[2024-03-05T10:52:41,043][INFO ][o.e.p.PluginsService ] [laptop] loaded module [ingest-user-agent]\",\"[2024-03-05T10:52:41,044][INFO ][o.e.p.PluginsService ] [laptop] loaded module [x-pack-monitoring]\",\"[2024-03-05T10:52:41,044][INFO ][o.e.p.PluginsService ] [laptop] loaded module [repository-s3]\",\"[2024-03-05T10:52:41,044][INFO ][o.e.p.PluginsService ] [laptop] loaded module [x-pack-analytics]\",\"[2024-03-05T10:52:41,044][INFO ][o.e.p.PluginsService ] [laptop] loaded module [x-pack-ent-search]\",\"[2024-03-05T10:52:41,044][INFO ][o.e.p.PluginsService ] [laptop] loaded module [x-pack-autoscaling]\",\"[2024-03-05T10:52:41,044][INFO ][o.e.p.PluginsService ] [laptop] loaded module [lang-painless]]\",\"[2024-03-05T10:52:41,059][INFO ][o.e.p.PluginsService ] [laptop] loaded module [lang-expression]\",\"[2024-03-05T10:52:41,059][INFO ][o.e.p.PluginsService ] [laptop] loaded module [x-pack-eql]\",\"[2024-03-05T10:52:43,291][INFO ][o.e.e.NodeEnvironment ] [laptop] heap size [16gb], compressed ordinary object pointers [true]\",\"[2024-03-05T10:52:46,098][INFO ][o.e.x.s.Security ] [laptop] Security is enabled\",\"[2024-03-05T10:52:47,227][INFO ][o.e.x.p.ProfilingPlugin ] [laptop] Profiling is enabled\",\"[2024-03-05T10:52:47,259][INFO ][o.e.x.p.ProfilingPlugin ] [laptop] profiling index templates will not be installed or reinstalled\",\"[2024-03-05T10:52:47,755][INFO ][o.e.i.r.RecoverySettings ] [laptop] using rate limit [40mb] with [default=40mb, read=0b, write=0b, max=0b]\",\"[2024-03-05T10:52:47,787][INFO ][o.e.d.DiscoveryModule ] [laptop] using discovery type [multi-node] and seed hosts providers [settings]\",\"[2024-03-05T10:52:49,188][INFO ][o.e.n.Node ] [laptop] initialized\",\"[2024-03-05T10:52:49,199][INFO ][o.e.n.Node ] [laptop] starting ...\"]}' \"$ELASTICSEARCH_URL/_text_structure/find_message_structure\"" + }, + { + "language": "Java", + "code": "client.textStructure().findMessageStructure(f -> f\n .messages(List.of(\"[2024-03-05T10:52:36,256][INFO ][o.a.l.u.VectorUtilPanamaProvider] [laptop] Java vector incubator API enabled; uses preferredBitSize=128\",\"[2024-03-05T10:52:41,038][INFO ][o.e.p.PluginsService ] [laptop] loaded module [repository-url]\",\"[2024-03-05T10:52:41,042][INFO ][o.e.p.PluginsService ] [laptop] loaded module [rest-root]\",\"[2024-03-05T10:52:41,043][INFO ][o.e.p.PluginsService ] [laptop] loaded module [x-pack-core]\",\"[2024-03-05T10:52:41,043][INFO ][o.e.p.PluginsService ] [laptop] loaded module [x-pack-redact]\",\"[2024-03-05T10:52:41,043][INFO ][o.e.p.PluginsService ] [laptop] loaded module [ingest-user-agent]\",\"[2024-03-05T10:52:41,044][INFO ][o.e.p.PluginsService ] [laptop] loaded module [x-pack-monitoring]\",\"[2024-03-05T10:52:41,044][INFO ][o.e.p.PluginsService ] [laptop] loaded module [repository-s3]\",\"[2024-03-05T10:52:41,044][INFO ][o.e.p.PluginsService ] [laptop] loaded module [x-pack-analytics]\",\"[2024-03-05T10:52:41,044][INFO ][o.e.p.PluginsService ] [laptop] loaded module [x-pack-ent-search]\",\"[2024-03-05T10:52:41,044][INFO ][o.e.p.PluginsService ] [laptop] loaded module [x-pack-autoscaling]\",\"[2024-03-05T10:52:41,044][INFO ][o.e.p.PluginsService ] [laptop] loaded module [lang-painless]]\",\"[2024-03-05T10:52:41,059][INFO ][o.e.p.PluginsService ] [laptop] loaded module [lang-expression]\",\"[2024-03-05T10:52:41,059][INFO ][o.e.p.PluginsService ] [laptop] loaded module [x-pack-eql]\",\"[2024-03-05T10:52:43,291][INFO ][o.e.e.NodeEnvironment ] [laptop] heap size [16gb], compressed ordinary object pointers [true]\",\"[2024-03-05T10:52:46,098][INFO ][o.e.x.s.Security ] [laptop] Security is enabled\",\"[2024-03-05T10:52:47,227][INFO ][o.e.x.p.ProfilingPlugin ] [laptop] Profiling is enabled\",\"[2024-03-05T10:52:47,259][INFO ][o.e.x.p.ProfilingPlugin ] [laptop] profiling index templates will not be installed or reinstalled\",\"[2024-03-05T10:52:47,755][INFO ][o.e.i.r.RecoverySettings ] [laptop] using rate limit [40mb] with [default=40mb, read=0b, write=0b, max=0b]\",\"[2024-03-05T10:52:47,787][INFO ][o.e.d.DiscoveryModule ] [laptop] using discovery type [multi-node] and seed hosts providers [settings]\",\"[2024-03-05T10:52:49,188][INFO ][o.e.n.Node ] [laptop] initialized\",\"[2024-03-05T10:52:49,199][INFO ][o.e.n.Node ] [laptop] starting ...\"))\n);\n" + } + ], + "specification/rollup/get_rollup_index_caps/examples/request/GetRollupIndexCapabilitiesRequestExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.rollup.get_rollup_index_caps(\n index=\"sensor_rollup\",\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.rollup.getRollupIndexCaps({\n index: \"sensor_rollup\",\n});" + }, + { + "language": "Ruby", + "code": "response = client.rollup.get_rollup_index_caps(\n index: \"sensor_rollup\"\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->rollup()->getRollupIndexCaps([\n \"index\" => \"sensor_rollup\",\n]);" + }, + { + "language": "curl", + "code": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/sensor_rollup/_rollup/data\"" + }, + { + "language": "Java", + "code": "client.rollup().getRollupIndexCaps(g -> g\n .index(\"sensor_rollup\")\n);\n" + } + ], + "specification/rollup/get_jobs/examples/request/GetRollupJobRequestExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.rollup.get_jobs(\n id=\"sensor\",\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.rollup.getJobs({\n id: \"sensor\",\n});" + }, + { + "language": "Ruby", + "code": "response = client.rollup.get_jobs(\n id: \"sensor\"\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->rollup()->getJobs([\n \"id\" => \"sensor\",\n]);" + }, + { + "language": "curl", + "code": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_rollup/job/sensor\"" + }, + { + "language": "Java", + "code": "client.rollup().getJobs(g -> g\n .id(\"sensor\")\n);\n" + } + ], + "specification/rollup/stop_job/examples/request/RollupStopJobExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.rollup.stop_job(\n id=\"sensor\",\n wait_for_completion=True,\n timeout=\"10s\",\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.rollup.stopJob({\n id: \"sensor\",\n wait_for_completion: \"true\",\n timeout: \"10s\",\n});" + }, + { + "language": "Ruby", + "code": "response = client.rollup.stop_job(\n id: \"sensor\",\n wait_for_completion: \"true\",\n timeout: \"10s\"\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->rollup()->stopJob([\n \"id\" => \"sensor\",\n \"wait_for_completion\" => \"true\",\n \"timeout\" => \"10s\",\n]);" + }, + { + "language": "curl", + "code": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_rollup/job/sensor/_stop?wait_for_completion=true&timeout=10s\"" + }, + { + "language": "Java", + "code": "client.rollup().stopJob(s -> s\n .id(\"sensor\")\n .timeout(t -> t\n .offset(10)\n )\n .waitForCompletion(true)\n);\n" + } + ], + "specification/rollup/get_rollup_caps/examples/request/GetRollupCapabilitiesRequestExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.rollup.get_rollup_caps(\n id=\"sensor-*\",\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.rollup.getRollupCaps({\n id: \"sensor-*\",\n});" + }, + { + "language": "Ruby", + "code": "response = client.rollup.get_rollup_caps(\n id: \"sensor-*\"\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->rollup()->getRollupCaps([\n \"id\" => \"sensor-*\",\n]);" + }, + { + "language": "curl", + "code": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_rollup/data/sensor-*\"" + }, + { + "language": "Java", + "code": "client.rollup().getRollupCaps(g -> g\n .id(\"sensor-*\")\n);\n" + } + ], + "specification/rollup/rollup_search/examples/request/RollupSearchRequestExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.rollup.rollup_search(\n index=\"sensor_rollup\",\n size=0,\n aggregations={\n \"max_temperature\": {\n \"max\": {\n \"field\": \"temperature\"\n }\n }\n },\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.rollup.rollupSearch({\n index: \"sensor_rollup\",\n size: 0,\n aggregations: {\n max_temperature: {\n max: {\n field: \"temperature\",\n },\n },\n },\n});" + }, + { + "language": "Ruby", + "code": "response = client.rollup.rollup_search(\n index: \"sensor_rollup\",\n body: {\n \"size\": 0,\n \"aggregations\": {\n \"max_temperature\": {\n \"max\": {\n \"field\": \"temperature\"\n }\n }\n }\n }\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->rollup()->rollupSearch([\n \"index\" => \"sensor_rollup\",\n \"body\" => [\n \"size\" => 0,\n \"aggregations\" => [\n \"max_temperature\" => [\n \"max\" => [\n \"field\" => \"temperature\",\n ],\n ],\n ],\n ],\n]);" + }, + { + "language": "curl", + "code": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"size\":0,\"aggregations\":{\"max_temperature\":{\"max\":{\"field\":\"temperature\"}}}}' \"$ELASTICSEARCH_URL/sensor_rollup/_rollup_search\"" + }, + { + "language": "Java", + "code": "client.rollup().rollupSearch(r -> r\n .aggregations(\"max_temperature\", a -> a\n .max(m -> m\n .field(\"temperature\")\n )\n )\n .index(\"sensor_rollup\")\n .size(0)\n);\n" + } + ], + "specification/rollup/put_job/examples/request/CreateRollupJobRequestExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.rollup.put_job(\n id=\"sensor\",\n index_pattern=\"sensor-*\",\n rollup_index=\"sensor_rollup\",\n cron=\"*/30 * * * * ?\",\n page_size=1000,\n groups={\n \"date_histogram\": {\n \"field\": \"timestamp\",\n \"fixed_interval\": \"1h\",\n \"delay\": \"7d\"\n },\n \"terms\": {\n \"fields\": [\n \"node\"\n ]\n }\n },\n metrics=[\n {\n \"field\": \"temperature\",\n \"metrics\": [\n \"min\",\n \"max\",\n \"sum\"\n ]\n },\n {\n \"field\": \"voltage\",\n \"metrics\": [\n \"avg\"\n ]\n }\n ],\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.rollup.putJob({\n id: \"sensor\",\n index_pattern: \"sensor-*\",\n rollup_index: \"sensor_rollup\",\n cron: \"*/30 * * * * ?\",\n page_size: 1000,\n groups: {\n date_histogram: {\n field: \"timestamp\",\n fixed_interval: \"1h\",\n delay: \"7d\",\n },\n terms: {\n fields: [\"node\"],\n },\n },\n metrics: [\n {\n field: \"temperature\",\n metrics: [\"min\", \"max\", \"sum\"],\n },\n {\n field: \"voltage\",\n metrics: [\"avg\"],\n },\n ],\n});" + }, + { + "language": "Ruby", + "code": "response = client.rollup.put_job(\n id: \"sensor\",\n body: {\n \"index_pattern\": \"sensor-*\",\n \"rollup_index\": \"sensor_rollup\",\n \"cron\": \"*/30 * * * * ?\",\n \"page_size\": 1000,\n \"groups\": {\n \"date_histogram\": {\n \"field\": \"timestamp\",\n \"fixed_interval\": \"1h\",\n \"delay\": \"7d\"\n },\n \"terms\": {\n \"fields\": [\n \"node\"\n ]\n }\n },\n \"metrics\": [\n {\n \"field\": \"temperature\",\n \"metrics\": [\n \"min\",\n \"max\",\n \"sum\"\n ]\n },\n {\n \"field\": \"voltage\",\n \"metrics\": [\n \"avg\"\n ]\n }\n ]\n }\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->rollup()->putJob([\n \"id\" => \"sensor\",\n \"body\" => [\n \"index_pattern\" => \"sensor-*\",\n \"rollup_index\" => \"sensor_rollup\",\n \"cron\" => \"*/30 * * * * ?\",\n \"page_size\" => 1000,\n \"groups\" => [\n \"date_histogram\" => [\n \"field\" => \"timestamp\",\n \"fixed_interval\" => \"1h\",\n \"delay\" => \"7d\",\n ],\n \"terms\" => [\n \"fields\" => array(\n \"node\",\n ),\n ],\n ],\n \"metrics\" => array(\n [\n \"field\" => \"temperature\",\n \"metrics\" => array(\n \"min\",\n \"max\",\n \"sum\",\n ),\n ],\n [\n \"field\" => \"voltage\",\n \"metrics\" => array(\n \"avg\",\n ),\n ],\n ),\n ],\n]);" + }, + { + "language": "curl", + "code": "curl -X PUT -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"index_pattern\":\"sensor-*\",\"rollup_index\":\"sensor_rollup\",\"cron\":\"*/30 * * * * ?\",\"page_size\":1000,\"groups\":{\"date_histogram\":{\"field\":\"timestamp\",\"fixed_interval\":\"1h\",\"delay\":\"7d\"},\"terms\":{\"fields\":[\"node\"]}},\"metrics\":[{\"field\":\"temperature\",\"metrics\":[\"min\",\"max\",\"sum\"]},{\"field\":\"voltage\",\"metrics\":[\"avg\"]}]}' \"$ELASTICSEARCH_URL/_rollup/job/sensor\"" + }, + { + "language": "Java", + "code": "client.rollup().putJob(p -> p\n .cron(\"*/30 * * * * ?\")\n .groups(g -> g\n .dateHistogram(d -> d\n .delay(de -> de\n .time(\"7d\")\n )\n .field(\"timestamp\")\n .fixedInterval(f -> f\n .time(\"1h\")\n )\n )\n .terms(t -> t\n .fields(\"node\")\n )\n )\n .id(\"sensor\")\n .indexPattern(\"sensor-*\")\n .metrics(List.of(FieldMetric.of(f -> f\n .field(\"temperature\")\n .metrics(List.of(Metric.Min,Metric.Max,Metric.Sum))),FieldMetric.of(f -> f\n .field(\"voltage\")\n .metrics(Metric.Avg))))\n .pageSize(1000)\n .rollupIndex(\"sensor_rollup\")\n);\n" + } + ], + "specification/rollup/delete_job/examples/request/DeleteRollupJobRequestExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.rollup.delete_job(\n id=\"sensor\",\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.rollup.deleteJob({\n id: \"sensor\",\n});" + }, + { + "language": "Ruby", + "code": "response = client.rollup.delete_job(\n id: \"sensor\"\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->rollup()->deleteJob([\n \"id\" => \"sensor\",\n]);" + }, + { + "language": "curl", + "code": "curl -X DELETE -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_rollup/job/sensor\"" + }, + { + "language": "Java", + "code": "client.rollup().deleteJob(d -> d\n .id(\"sensor\")\n);\n" + } + ], + "specification/rollup/start_job/examples/request/StartRollupJobRequestExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.rollup.start_job(\n id=\"sensor\",\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.rollup.startJob({\n id: \"sensor\",\n});" + }, + { + "language": "Ruby", + "code": "response = client.rollup.start_job(\n id: \"sensor\"\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->rollup()->startJob([\n \"id\" => \"sensor\",\n]);" + }, + { + "language": "curl", + "code": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_rollup/job/sensor/_start\"" + }, + { + "language": "Java", + "code": "client.rollup().startJob(s -> s\n .id(\"sensor\")\n);\n" + } + ], + "specification/connector/update_service_type/examples/request/ConnectorUpdateServiceTypeRequestExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.connector.update_service_type(\n connector_id=\"my-connector\",\n service_type=\"sharepoint_online\",\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.connector.updateServiceType({\n connector_id: \"my-connector\",\n service_type: \"sharepoint_online\",\n});" + }, + { + "language": "Ruby", + "code": "response = client.connector.update_service_type(\n connector_id: \"my-connector\",\n body: {\n \"service_type\": \"sharepoint_online\"\n }\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->connector()->updateServiceType([\n \"connector_id\" => \"my-connector\",\n \"body\" => [\n \"service_type\" => \"sharepoint_online\",\n ],\n]);" + }, + { + "language": "curl", + "code": "curl -X PUT -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"service_type\":\"sharepoint_online\"}' \"$ELASTICSEARCH_URL/_connector/my-connector/_service_type\"" + }, + { + "language": "Java", + "code": "client.connector().updateServiceType(u -> u\n .connectorId(\"my-connector\")\n .serviceType(\"sharepoint_online\")\n);\n" + } + ], + "specification/connector/update_scheduling/examples/request/ConnectorUpdateSchedulingRequestExample2.yaml": [ + { + "language": "Python", + "code": "resp = client.connector.update_scheduling(\n connector_id=\"my-connector\",\n scheduling={\n \"full\": {\n \"enabled\": True,\n \"interval\": \"0 10 0 * * ?\"\n }\n },\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.connector.updateScheduling({\n connector_id: \"my-connector\",\n scheduling: {\n full: {\n enabled: true,\n interval: \"0 10 0 * * ?\",\n },\n },\n});" + }, + { + "language": "Ruby", + "code": "response = client.connector.update_scheduling(\n connector_id: \"my-connector\",\n body: {\n \"scheduling\": {\n \"full\": {\n \"enabled\": true,\n \"interval\": \"0 10 0 * * ?\"\n }\n }\n }\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->connector()->updateScheduling([\n \"connector_id\" => \"my-connector\",\n \"body\" => [\n \"scheduling\" => [\n \"full\" => [\n \"enabled\" => true,\n \"interval\" => \"0 10 0 * * ?\",\n ],\n ],\n ],\n]);" + }, + { + "language": "curl", + "code": "curl -X PUT -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"scheduling\":{\"full\":{\"enabled\":true,\"interval\":\"0 10 0 * * ?\"}}}' \"$ELASTICSEARCH_URL/_connector/my-connector/_scheduling\"" + }, + { + "language": "Java", + "code": "client.connector().updateScheduling(u -> u\n .connectorId(\"my-connector\")\n .scheduling(s -> s\n .full(f -> f\n .enabled(true)\n .interval(\"0 10 0 * * ?\")\n )\n )\n);\n" + } + ], + "specification/connector/update_scheduling/examples/request/ConnectorUpdateSchedulingRequestExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.connector.update_scheduling(\n connector_id=\"my-connector\",\n scheduling={\n \"access_control\": {\n \"enabled\": True,\n \"interval\": \"0 10 0 * * ?\"\n },\n \"full\": {\n \"enabled\": True,\n \"interval\": \"0 20 0 * * ?\"\n },\n \"incremental\": {\n \"enabled\": False,\n \"interval\": \"0 30 0 * * ?\"\n }\n },\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.connector.updateScheduling({\n connector_id: \"my-connector\",\n scheduling: {\n access_control: {\n enabled: true,\n interval: \"0 10 0 * * ?\",\n },\n full: {\n enabled: true,\n interval: \"0 20 0 * * ?\",\n },\n incremental: {\n enabled: false,\n interval: \"0 30 0 * * ?\",\n },\n },\n});" + }, + { + "language": "Ruby", + "code": "response = client.connector.update_scheduling(\n connector_id: \"my-connector\",\n body: {\n \"scheduling\": {\n \"access_control\": {\n \"enabled\": true,\n \"interval\": \"0 10 0 * * ?\"\n },\n \"full\": {\n \"enabled\": true,\n \"interval\": \"0 20 0 * * ?\"\n },\n \"incremental\": {\n \"enabled\": false,\n \"interval\": \"0 30 0 * * ?\"\n }\n }\n }\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->connector()->updateScheduling([\n \"connector_id\" => \"my-connector\",\n \"body\" => [\n \"scheduling\" => [\n \"access_control\" => [\n \"enabled\" => true,\n \"interval\" => \"0 10 0 * * ?\",\n ],\n \"full\" => [\n \"enabled\" => true,\n \"interval\" => \"0 20 0 * * ?\",\n ],\n \"incremental\" => [\n \"enabled\" => false,\n \"interval\" => \"0 30 0 * * ?\",\n ],\n ],\n ],\n]);" + }, + { + "language": "curl", + "code": "curl -X PUT -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"scheduling\":{\"access_control\":{\"enabled\":true,\"interval\":\"0 10 0 * * ?\"},\"full\":{\"enabled\":true,\"interval\":\"0 20 0 * * ?\"},\"incremental\":{\"enabled\":false,\"interval\":\"0 30 0 * * ?\"}}}' \"$ELASTICSEARCH_URL/_connector/my-connector/_scheduling\"" + }, + { + "language": "Java", + "code": "client.connector().updateScheduling(u -> u\n .connectorId(\"my-connector\")\n .scheduling(s -> s\n .accessControl(a -> a\n .enabled(true)\n .interval(\"0 10 0 * * ?\")\n )\n .full(f -> f\n .enabled(true)\n .interval(\"0 20 0 * * ?\")\n )\n .incremental(i -> i\n .enabled(false)\n .interval(\"0 30 0 * * ?\")\n )\n )\n);\n" + } + ], + "specification/connector/update_pipeline/examples/request/ConnectorUpdatePipelineRequestExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.connector.update_pipeline(\n connector_id=\"my-connector\",\n pipeline={\n \"extract_binary_content\": True,\n \"name\": \"my-connector-pipeline\",\n \"reduce_whitespace\": True,\n \"run_ml_inference\": True\n },\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.connector.updatePipeline({\n connector_id: \"my-connector\",\n pipeline: {\n extract_binary_content: true,\n name: \"my-connector-pipeline\",\n reduce_whitespace: true,\n run_ml_inference: true,\n },\n});" + }, + { + "language": "Ruby", + "code": "response = client.connector.update_pipeline(\n connector_id: \"my-connector\",\n body: {\n \"pipeline\": {\n \"extract_binary_content\": true,\n \"name\": \"my-connector-pipeline\",\n \"reduce_whitespace\": true,\n \"run_ml_inference\": true\n }\n }\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->connector()->updatePipeline([\n \"connector_id\" => \"my-connector\",\n \"body\" => [\n \"pipeline\" => [\n \"extract_binary_content\" => true,\n \"name\" => \"my-connector-pipeline\",\n \"reduce_whitespace\" => true,\n \"run_ml_inference\" => true,\n ],\n ],\n]);" + }, + { + "language": "curl", + "code": "curl -X PUT -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"pipeline\":{\"extract_binary_content\":true,\"name\":\"my-connector-pipeline\",\"reduce_whitespace\":true,\"run_ml_inference\":true}}' \"$ELASTICSEARCH_URL/_connector/my-connector/_pipeline\"" + }, + { + "language": "Java", + "code": "client.connector().updatePipeline(u -> u\n .connectorId(\"my-connector\")\n .pipeline(p -> p\n .extractBinaryContent(true)\n .name(\"my-connector-pipeline\")\n .reduceWhitespace(true)\n .runMlInference(true)\n )\n);\n" + } + ], + "specification/connector/sync_job_get/examples/request/ConnectorSyncJobGetExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.connector.sync_job_get(\n connector_sync_job_id=\"my-connector-sync-job\",\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.connector.syncJobGet({\n connector_sync_job_id: \"my-connector-sync-job\",\n});" + }, + { + "language": "Ruby", + "code": "response = client.connector.sync_job_get(\n connector_sync_job_id: \"my-connector-sync-job\"\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->connector()->syncJobGet([\n \"connector_sync_job_id\" => \"my-connector-sync-job\",\n]);" + }, + { + "language": "curl", + "code": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_connector/_sync_job/my-connector-sync-job\"" + }, + { + "language": "Java", + "code": "client.connector().syncJobGet(s -> s\n .connectorSyncJobId(\"my-connector-sync-job\")\n);\n" + } + ], + "specification/connector/sync_job_update_stats/examples/request/ConnectorSyncJobUpdateStatsExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.connector.sync_job_update_stats(\n connector_sync_job_id=\"my-connector-sync-job\",\n deleted_document_count=10,\n indexed_document_count=20,\n indexed_document_volume=1000,\n total_document_count=2000,\n last_seen=\"2023-01-02T10:00:00Z\",\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.connector.syncJobUpdateStats({\n connector_sync_job_id: \"my-connector-sync-job\",\n deleted_document_count: 10,\n indexed_document_count: 20,\n indexed_document_volume: 1000,\n total_document_count: 2000,\n last_seen: \"2023-01-02T10:00:00Z\",\n});" + }, + { + "language": "Ruby", + "code": "response = client.connector.sync_job_update_stats(\n connector_sync_job_id: \"my-connector-sync-job\",\n body: {\n \"deleted_document_count\": 10,\n \"indexed_document_count\": 20,\n \"indexed_document_volume\": 1000,\n \"total_document_count\": 2000,\n \"last_seen\": \"2023-01-02T10:00:00Z\"\n }\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->connector()->syncJobUpdateStats([\n \"connector_sync_job_id\" => \"my-connector-sync-job\",\n \"body\" => [\n \"deleted_document_count\" => 10,\n \"indexed_document_count\" => 20,\n \"indexed_document_volume\" => 1000,\n \"total_document_count\" => 2000,\n \"last_seen\" => \"2023-01-02T10:00:00Z\",\n ],\n]);" + }, + { + "language": "curl", + "code": "curl -X PUT -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"deleted_document_count\":10,\"indexed_document_count\":20,\"indexed_document_volume\":1000,\"total_document_count\":2000,\"last_seen\":\"2023-01-02T10:00:00Z\"}' \"$ELASTICSEARCH_URL/_connector/_sync_job/my-connector-sync-job/_stats\"" + }, + { + "language": "Java", + "code": "client.connector().syncJobUpdateStats(s -> s\n .connectorSyncJobId(\"my-connector-sync-job\")\n .deletedDocumentCount(10L)\n .indexedDocumentCount(20L)\n .indexedDocumentVolume(1000L)\n .lastSeen(l -> l\n .time(\"2023-01-02T10:00:00Z\")\n )\n .totalDocumentCount(2000)\n);\n" + } + ], + "specification/connector/sync_job_post/examples/request/SyncJobPostRequestExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.connector.sync_job_post(\n id=\"connector-id\",\n job_type=\"full\",\n trigger_method=\"on_demand\",\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.connector.syncJobPost({\n id: \"connector-id\",\n job_type: \"full\",\n trigger_method: \"on_demand\",\n});" + }, + { + "language": "Ruby", + "code": "response = client.connector.sync_job_post(\n body: {\n \"id\": \"connector-id\",\n \"job_type\": \"full\",\n \"trigger_method\": \"on_demand\"\n }\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->connector()->syncJobPost([\n \"body\" => [\n \"id\" => \"connector-id\",\n \"job_type\" => \"full\",\n \"trigger_method\" => \"on_demand\",\n ],\n]);" + }, + { + "language": "curl", + "code": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"id\":\"connector-id\",\"job_type\":\"full\",\"trigger_method\":\"on_demand\"}' \"$ELASTICSEARCH_URL/_connector/_sync_job\"" + }, + { + "language": "Java", + "code": "client.connector().syncJobPost(s -> s\n .id(\"connector-id\")\n .jobType(SyncJobType.Full)\n .triggerMethod(SyncJobTriggerMethod.OnDemand)\n);\n" + } + ], + "specification/connector/delete/examples/request/ConnectorDeleteExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.connector.delete(\n connector_id=\"my-connector-id&delete_sync_jobs=true\",\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.connector.delete({\n connector_id: \"my-connector-id&delete_sync_jobs=true\",\n});" + }, + { + "language": "Ruby", + "code": "response = client.connector.delete(\n connector_id: \"my-connector-id&delete_sync_jobs=true\"\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->connector()->delete([\n \"connector_id\" => \"my-connector-id&delete_sync_jobs=true\",\n]);" + }, + { + "language": "curl", + "code": "curl -X DELETE -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_connector/my-connector-id&delete_sync_jobs=true\"" + }, + { + "language": "Java", + "code": "client.connector().delete(d -> d\n .connectorId(\"my-connector-id&delete_sync_jobs=true\")\n);\n" + } + ], + "specification/connector/put/examples/request/ConnectorPutRequestExample2.yaml": [ + { + "language": "Python", + "code": "resp = client.connector.put(\n connector_id=\"my-connector\",\n index_name=\"search-google-drive\",\n name=\"My Connector\",\n description=\"My Connector to sync data to Elastic index from Google Drive\",\n service_type=\"google_drive\",\n language=\"english\",\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.connector.put({\n connector_id: \"my-connector\",\n index_name: \"search-google-drive\",\n name: \"My Connector\",\n description: \"My Connector to sync data to Elastic index from Google Drive\",\n service_type: \"google_drive\",\n language: \"english\",\n});" + }, + { + "language": "Ruby", + "code": "response = client.connector.put(\n connector_id: \"my-connector\",\n body: {\n \"index_name\": \"search-google-drive\",\n \"name\": \"My Connector\",\n \"description\": \"My Connector to sync data to Elastic index from Google Drive\",\n \"service_type\": \"google_drive\",\n \"language\": \"english\"\n }\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->connector()->put([\n \"connector_id\" => \"my-connector\",\n \"body\" => [\n \"index_name\" => \"search-google-drive\",\n \"name\" => \"My Connector\",\n \"description\" => \"My Connector to sync data to Elastic index from Google Drive\",\n \"service_type\" => \"google_drive\",\n \"language\" => \"english\",\n ],\n]);" + }, + { + "language": "curl", + "code": "curl -X PUT -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"index_name\":\"search-google-drive\",\"name\":\"My Connector\",\"description\":\"My Connector to sync data to Elastic index from Google Drive\",\"service_type\":\"google_drive\",\"language\":\"english\"}' \"$ELASTICSEARCH_URL/_connector/my-connector\"" + }, + { + "language": "Java", + "code": "client.connector().put(p -> p\n .connectorId(\"my-connector\")\n .description(\"My Connector to sync data to Elastic index from Google Drive\")\n .indexName(\"search-google-drive\")\n .language(\"english\")\n .name(\"My Connector\")\n .serviceType(\"google_drive\")\n);\n" + } + ], + "specification/connector/put/examples/request/ConnectorPutRequestExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.connector.put(\n connector_id=\"my-connector\",\n index_name=\"search-google-drive\",\n name=\"My Connector\",\n service_type=\"google_drive\",\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.connector.put({\n connector_id: \"my-connector\",\n index_name: \"search-google-drive\",\n name: \"My Connector\",\n service_type: \"google_drive\",\n});" + }, + { + "language": "Ruby", + "code": "response = client.connector.put(\n connector_id: \"my-connector\",\n body: {\n \"index_name\": \"search-google-drive\",\n \"name\": \"My Connector\",\n \"service_type\": \"google_drive\"\n }\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->connector()->put([\n \"connector_id\" => \"my-connector\",\n \"body\" => [\n \"index_name\" => \"search-google-drive\",\n \"name\" => \"My Connector\",\n \"service_type\" => \"google_drive\",\n ],\n]);" + }, + { + "language": "curl", + "code": "curl -X PUT -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"index_name\":\"search-google-drive\",\"name\":\"My Connector\",\"service_type\":\"google_drive\"}' \"$ELASTICSEARCH_URL/_connector/my-connector\"" + }, + { + "language": "Java", + "code": "client.connector().put(p -> p\n .connectorId(\"my-connector\")\n .indexName(\"search-google-drive\")\n .name(\"My Connector\")\n .serviceType(\"google_drive\")\n);\n" + } + ], + "specification/connector/update_features/examples/request/ConnectorUpdateFeaturesRequestExample2.yaml": [ + { + "language": "Python", + "code": "resp = client.connector.update_features(\n connector_id=\"my-connector\",\n features={\n \"document_level_security\": {\n \"enabled\": True\n }\n },\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.connector.updateFeatures({\n connector_id: \"my-connector\",\n features: {\n document_level_security: {\n enabled: true,\n },\n },\n});" + }, + { + "language": "Ruby", + "code": "response = client.connector.update_features(\n connector_id: \"my-connector\",\n body: {\n \"features\": {\n \"document_level_security\": {\n \"enabled\": true\n }\n }\n }\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->connector()->updateFeatures([\n \"connector_id\" => \"my-connector\",\n \"body\" => [\n \"features\" => [\n \"document_level_security\" => [\n \"enabled\" => true,\n ],\n ],\n ],\n]);" + }, + { + "language": "curl", + "code": "curl -X PUT -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"features\":{\"document_level_security\":{\"enabled\":true}}}' \"$ELASTICSEARCH_URL/_connector/my-connector/_features\"" + }, + { + "language": "Java", + "code": "client.connector().updateFeatures(u -> u\n .connectorId(\"my-connector\")\n .features(f -> f\n .documentLevelSecurity(d -> d\n .enabled(true)\n )\n )\n);\n" + } + ], + "specification/connector/update_features/examples/request/ConnectorUpdateFeaturesRequestExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.connector.update_features(\n connector_id=\"my-connector\",\n features={\n \"document_level_security\": {\n \"enabled\": True\n },\n \"incremental_sync\": {\n \"enabled\": True\n },\n \"sync_rules\": {\n \"advanced\": {\n \"enabled\": False\n },\n \"basic\": {\n \"enabled\": True\n }\n }\n },\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.connector.updateFeatures({\n connector_id: \"my-connector\",\n features: {\n document_level_security: {\n enabled: true,\n },\n incremental_sync: {\n enabled: true,\n },\n sync_rules: {\n advanced: {\n enabled: false,\n },\n basic: {\n enabled: true,\n },\n },\n },\n});" + }, + { + "language": "Ruby", + "code": "response = client.connector.update_features(\n connector_id: \"my-connector\",\n body: {\n \"features\": {\n \"document_level_security\": {\n \"enabled\": true\n },\n \"incremental_sync\": {\n \"enabled\": true\n },\n \"sync_rules\": {\n \"advanced\": {\n \"enabled\": false\n },\n \"basic\": {\n \"enabled\": true\n }\n }\n }\n }\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->connector()->updateFeatures([\n \"connector_id\" => \"my-connector\",\n \"body\" => [\n \"features\" => [\n \"document_level_security\" => [\n \"enabled\" => true,\n ],\n \"incremental_sync\" => [\n \"enabled\" => true,\n ],\n \"sync_rules\" => [\n \"advanced\" => [\n \"enabled\" => false,\n ],\n \"basic\" => [\n \"enabled\" => true,\n ],\n ],\n ],\n ],\n]);" + }, + { + "language": "curl", + "code": "curl -X PUT -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"features\":{\"document_level_security\":{\"enabled\":true},\"incremental_sync\":{\"enabled\":true},\"sync_rules\":{\"advanced\":{\"enabled\":false},\"basic\":{\"enabled\":true}}}}' \"$ELASTICSEARCH_URL/_connector/my-connector/_features\"" + }, + { + "language": "Java", + "code": "client.connector().updateFeatures(u -> u\n .connectorId(\"my-connector\")\n .features(f -> f\n .documentLevelSecurity(d -> d\n .enabled(true)\n )\n .incrementalSync(i -> i\n .enabled(true)\n )\n .syncRules(s -> s\n .advanced(a -> a\n .enabled(false)\n )\n .basic(b -> b\n .enabled(true)\n )\n )\n )\n);\n" + } + ], + "specification/connector/update_configuration/examples/request/ConnectorUpdateConfigurationRequestExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.connector.update_configuration(\n connector_id=\"my-spo-connector\",\n values={\n \"tenant_id\": \"my-tenant-id\",\n \"tenant_name\": \"my-sharepoint-site\",\n \"client_id\": \"foo\",\n \"secret_value\": \"bar\",\n \"site_collections\": \"*\"\n },\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.connector.updateConfiguration({\n connector_id: \"my-spo-connector\",\n values: {\n tenant_id: \"my-tenant-id\",\n tenant_name: \"my-sharepoint-site\",\n client_id: \"foo\",\n secret_value: \"bar\",\n site_collections: \"*\",\n },\n});" + }, + { + "language": "Ruby", + "code": "response = client.connector.update_configuration(\n connector_id: \"my-spo-connector\",\n body: {\n \"values\": {\n \"tenant_id\": \"my-tenant-id\",\n \"tenant_name\": \"my-sharepoint-site\",\n \"client_id\": \"foo\",\n \"secret_value\": \"bar\",\n \"site_collections\": \"*\"\n }\n }\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->connector()->updateConfiguration([\n \"connector_id\" => \"my-spo-connector\",\n \"body\" => [\n \"values\" => [\n \"tenant_id\" => \"my-tenant-id\",\n \"tenant_name\" => \"my-sharepoint-site\",\n \"client_id\" => \"foo\",\n \"secret_value\" => \"bar\",\n \"site_collections\" => \"*\",\n ],\n ],\n]);" + }, + { + "language": "curl", + "code": "curl -X PUT -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"values\":{\"tenant_id\":\"my-tenant-id\",\"tenant_name\":\"my-sharepoint-site\",\"client_id\":\"foo\",\"secret_value\":\"bar\",\"site_collections\":\"*\"}}' \"$ELASTICSEARCH_URL/_connector/my-spo-connector/_configuration\"" + }, + { + "language": "Java", + "code": "client.connector().updateConfiguration(u -> u\n .connectorId(\"my-spo-connector\")\n .values(Map.of(\"tenant_id\", JsonData.fromJson(\"\\\"my-tenant-id\\\"\"),\"tenant_name\", JsonData.fromJson(\"\\\"my-sharepoint-site\\\"\"),\"secret_value\", JsonData.fromJson(\"\\\"bar\\\"\"),\"client_id\", JsonData.fromJson(\"\\\"foo\\\"\"),\"site_collections\", JsonData.fromJson(\"\\\"*\\\"\")))\n);\n" + } + ], + "specification/connector/update_configuration/examples/request/ConnectorUpdateConfigurationRequestExample2.yaml": [ + { + "language": "Python", + "code": "resp = client.connector.update_configuration(\n connector_id=\"my-spo-connector\",\n values={\n \"secret_value\": \"foo-bar\"\n },\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.connector.updateConfiguration({\n connector_id: \"my-spo-connector\",\n values: {\n secret_value: \"foo-bar\",\n },\n});" + }, + { + "language": "Ruby", + "code": "response = client.connector.update_configuration(\n connector_id: \"my-spo-connector\",\n body: {\n \"values\": {\n \"secret_value\": \"foo-bar\"\n }\n }\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->connector()->updateConfiguration([\n \"connector_id\" => \"my-spo-connector\",\n \"body\" => [\n \"values\" => [\n \"secret_value\" => \"foo-bar\",\n ],\n ],\n]);" + }, + { + "language": "curl", + "code": "curl -X PUT -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"values\":{\"secret_value\":\"foo-bar\"}}' \"$ELASTICSEARCH_URL/_connector/my-spo-connector/_configuration\"" + }, + { + "language": "Java", + "code": "client.connector().updateConfiguration(u -> u\n .connectorId(\"my-spo-connector\")\n .values(\"secret_value\", JsonData.fromJson(\"\\\"foo-bar\\\"\"))\n);\n" + } + ], + "specification/connector/sync_job_check_in/examples/request/ConnectorSyncJobCheckInExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.connector.sync_job_check_in(\n connector_sync_job_id=\"my-connector-sync-job\",\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.connector.syncJobCheckIn({\n connector_sync_job_id: \"my-connector-sync-job\",\n});" + }, + { + "language": "Ruby", + "code": "response = client.connector.sync_job_check_in(\n connector_sync_job_id: \"my-connector-sync-job\"\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->connector()->syncJobCheckIn([\n \"connector_sync_job_id\" => \"my-connector-sync-job\",\n]);" + }, + { + "language": "curl", + "code": "curl -X PUT -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_connector/_sync_job/my-connector-sync-job/_check_in\"" + }, + { + "language": "Java", + "code": "client.connector().syncJobCheckIn(s -> s\n .connectorSyncJobId(\"my-connector-sync-job\")\n);\n" + } + ], + "specification/connector/get/examples/request/ConnectorGetExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.connector.get(\n connector_id=\"my-connector-id\",\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.connector.get({\n connector_id: \"my-connector-id\",\n});" + }, + { + "language": "Ruby", + "code": "response = client.connector.get(\n connector_id: \"my-connector-id\"\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->connector()->get([\n \"connector_id\" => \"my-connector-id\",\n]);" + }, + { + "language": "curl", + "code": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_connector/my-connector-id\"" + }, + { + "language": "Java", + "code": "client.connector().get(g -> g\n .connectorId(\"my-connector-id\")\n);\n" + } + ], + "specification/connector/sync_job_error/examples/request/SyncJobErrorRequestExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.connector.sync_job_error(\n connector_sync_job_id=\"my-connector-sync-job\",\n error=\"some-error\",\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.connector.syncJobError({\n connector_sync_job_id: \"my-connector-sync-job\",\n error: \"some-error\",\n});" + }, + { + "language": "Ruby", + "code": "response = client.connector.sync_job_error(\n connector_sync_job_id: \"my-connector-sync-job\",\n body: {\n \"error\": \"some-error\"\n }\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->connector()->syncJobError([\n \"connector_sync_job_id\" => \"my-connector-sync-job\",\n \"body\" => [\n \"error\" => \"some-error\",\n ],\n]);" + }, + { + "language": "curl", + "code": "curl -X PUT -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"error\":\"some-error\"}' \"$ELASTICSEARCH_URL/_connector/_sync_job/my-connector-sync-job/_error\"" + }, + { + "language": "Java", + "code": "client.connector().syncJobError(s -> s\n .connectorSyncJobId(\"my-connector-sync-job\")\n .error(\"some-error\")\n);\n" + } + ], + "specification/connector/sync_job_claim/examples/request/ConnectorSyncJobClaimExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.connector.sync_job_claim(\n connector_sync_job_id=\"my-connector-sync-job-id\",\n worker_hostname=\"some-machine\",\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.connector.syncJobClaim({\n connector_sync_job_id: \"my-connector-sync-job-id\",\n worker_hostname: \"some-machine\",\n});" + }, + { + "language": "Ruby", + "code": "response = client.connector.sync_job_claim(\n connector_sync_job_id: \"my-connector-sync-job-id\",\n body: {\n \"worker_hostname\": \"some-machine\"\n }\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->connector()->syncJobClaim([\n \"connector_sync_job_id\" => \"my-connector-sync-job-id\",\n \"body\" => [\n \"worker_hostname\" => \"some-machine\",\n ],\n]);" + }, + { + "language": "curl", + "code": "curl -X PUT -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"worker_hostname\":\"some-machine\"}' \"$ELASTICSEARCH_URL/_connector/_sync_job/my-connector-sync-job-id/_claim\"" + }, + { + "language": "Java", + "code": "client.connector().syncJobClaim(s -> s\n .connectorSyncJobId(\"my-connector-sync-job-id\")\n .workerHostname(\"some-machine\")\n);\n" + } + ], + "specification/connector/list/examples/request/ConnectorListExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.connector.list()" + }, + { + "language": "JavaScript", + "code": "const response = await client.connector.list();" + }, + { + "language": "Ruby", + "code": "response = client.connector.list" + }, + { + "language": "PHP", + "code": "$resp = $client->connector()->list();" + }, + { + "language": "curl", + "code": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_connector\"" + }, + { + "language": "Java", + "code": "client.connector().list(l -> l);\n" + } + ], + "specification/connector/update_error/examples/request/ConnectorUpdateErrorRequestExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.connector.update_error(\n connector_id=\"my-connector\",\n error=\"Houston, we have a problem!\",\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.connector.updateError({\n connector_id: \"my-connector\",\n error: \"Houston, we have a problem!\",\n});" + }, + { + "language": "Ruby", + "code": "response = client.connector.update_error(\n connector_id: \"my-connector\",\n body: {\n \"error\": \"Houston, we have a problem!\"\n }\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->connector()->updateError([\n \"connector_id\" => \"my-connector\",\n \"body\" => [\n \"error\" => \"Houston, we have a problem!\",\n ],\n]);" + }, + { + "language": "curl", + "code": "curl -X PUT -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"error\":\"Houston, we have a problem!\"}' \"$ELASTICSEARCH_URL/_connector/my-connector/_error\"" + }, + { + "language": "Java", + "code": "client.connector().updateError(u -> u\n .connectorId(\"my-connector\")\n .error(\"Houston, we have a problem!\")\n);\n" + } + ], + "specification/connector/sync_job_list/examples/request/ConnectorSyncJobListExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.connector.sync_job_list(\n connector_id=\"my-connector-id\",\n size=\"1\",\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.connector.syncJobList({\n connector_id: \"my-connector-id\",\n size: 1,\n});" + }, + { + "language": "Ruby", + "code": "response = client.connector.sync_job_list(\n connector_id: \"my-connector-id\",\n size: \"1\"\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->connector()->syncJobList([\n \"connector_id\" => \"my-connector-id\",\n \"size\" => \"1\",\n]);" + }, + { + "language": "curl", + "code": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_connector/_sync_job?connector_id=my-connector-id&size=1\"" + }, + { + "language": "Java", + "code": "client.connector().syncJobList(s -> s\n .connectorId(\"my-connector-id\")\n .size(1)\n);\n" + } + ], + "specification/connector/update_index_name/examples/request/ConnectorUpdateIndexNameRequestExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.connector.update_index_name(\n connector_id=\"my-connector\",\n index_name=\"data-from-my-google-drive\",\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.connector.updateIndexName({\n connector_id: \"my-connector\",\n index_name: \"data-from-my-google-drive\",\n});" + }, + { + "language": "Ruby", + "code": "response = client.connector.update_index_name(\n connector_id: \"my-connector\",\n body: {\n \"index_name\": \"data-from-my-google-drive\"\n }\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->connector()->updateIndexName([\n \"connector_id\" => \"my-connector\",\n \"body\" => [\n \"index_name\" => \"data-from-my-google-drive\",\n ],\n]);" + }, + { + "language": "curl", + "code": "curl -X PUT -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"index_name\":\"data-from-my-google-drive\"}' \"$ELASTICSEARCH_URL/_connector/my-connector/_index_name\"" + }, + { + "language": "Java", + "code": "client.connector().updateIndexName(u -> u\n .connectorId(\"my-connector\")\n .indexName(\"data-from-my-google-drive\")\n);\n" + } + ], + "specification/connector/update_api_key_id/examples/request/ConnectorUpdateApiKeyIDRequestExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.connector.update_api_key_id(\n connector_id=\"my-connector\",\n api_key_id=\"my-api-key-id\",\n api_key_secret_id=\"my-connector-secret-id\",\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.connector.updateApiKeyId({\n connector_id: \"my-connector\",\n api_key_id: \"my-api-key-id\",\n api_key_secret_id: \"my-connector-secret-id\",\n});" + }, + { + "language": "Ruby", + "code": "response = client.connector.update_api_key_id(\n connector_id: \"my-connector\",\n body: {\n \"api_key_id\": \"my-api-key-id\",\n \"api_key_secret_id\": \"my-connector-secret-id\"\n }\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->connector()->updateApiKeyId([\n \"connector_id\" => \"my-connector\",\n \"body\" => [\n \"api_key_id\" => \"my-api-key-id\",\n \"api_key_secret_id\" => \"my-connector-secret-id\",\n ],\n]);" + }, + { + "language": "curl", + "code": "curl -X PUT -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"api_key_id\":\"my-api-key-id\",\"api_key_secret_id\":\"my-connector-secret-id\"}' \"$ELASTICSEARCH_URL/_connector/my-connector/_api_key_id\"" + }, + { + "language": "Java", + "code": "client.connector().updateApiKeyId(u -> u\n .apiKeyId(\"my-api-key-id\")\n .apiKeySecretId(\"my-connector-secret-id\")\n .connectorId(\"my-connector\")\n);\n" + } + ], + "specification/connector/check_in/examples/request/ConnectorCheckInExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.connector.check_in(\n connector_id=\"my-connector\",\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.connector.checkIn({\n connector_id: \"my-connector\",\n});" + }, + { + "language": "Ruby", + "code": "response = client.connector.check_in(\n connector_id: \"my-connector\"\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->connector()->checkIn([\n \"connector_id\" => \"my-connector\",\n]);" + }, + { + "language": "curl", + "code": "curl -X PUT -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_connector/my-connector/_check_in\"" + }, + { + "language": "Java", + "code": "client.connector().checkIn(c -> c\n .connectorId(\"my-connector\")\n);\n" + } + ], + "specification/connector/update_status/examples/request/ConnectorUpdateStatusRequestExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.connector.update_status(\n connector_id=\"my-connector\",\n status=\"needs_configuration\",\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.connector.updateStatus({\n connector_id: \"my-connector\",\n status: \"needs_configuration\",\n});" + }, + { + "language": "Ruby", + "code": "response = client.connector.update_status(\n connector_id: \"my-connector\",\n body: {\n \"status\": \"needs_configuration\"\n }\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->connector()->updateStatus([\n \"connector_id\" => \"my-connector\",\n \"body\" => [\n \"status\" => \"needs_configuration\",\n ],\n]);" + }, + { + "language": "curl", + "code": "curl -X PUT -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"status\":\"needs_configuration\"}' \"$ELASTICSEARCH_URL/_connector/my-connector/_status\"" + }, + { + "language": "Java", + "code": "client.connector().updateStatus(u -> u\n .connectorId(\"my-connector\")\n .status(ConnectorStatus.NeedsConfiguration)\n);\n" + } + ], + "specification/connector/sync_job_cancel/examples/request/ConnectorSyncJobCancelExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.connector.sync_job_cancel(\n connector_sync_job_id=\"my-connector-sync-job-id\",\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.connector.syncJobCancel({\n connector_sync_job_id: \"my-connector-sync-job-id\",\n});" + }, + { + "language": "Ruby", + "code": "response = client.connector.sync_job_cancel(\n connector_sync_job_id: \"my-connector-sync-job-id\"\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->connector()->syncJobCancel([\n \"connector_sync_job_id\" => \"my-connector-sync-job-id\",\n]);" + }, + { + "language": "curl", + "code": "curl -X PUT -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_connector/_sync_job/my-connector-sync-job-id/_cancel\"" + }, + { + "language": "Java", + "code": "client.connector().syncJobCancel(s -> s\n .connectorSyncJobId(\"my-connector-sync-job-id\")\n);\n" + } + ], + "specification/connector/sync_job_delete/examples/request/ConnectorSyncJobDeleteExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.connector.sync_job_delete(\n connector_sync_job_id=\"my-connector-sync-job-id\",\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.connector.syncJobDelete({\n connector_sync_job_id: \"my-connector-sync-job-id\",\n});" + }, + { + "language": "Ruby", + "code": "response = client.connector.sync_job_delete(\n connector_sync_job_id: \"my-connector-sync-job-id\"\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->connector()->syncJobDelete([\n \"connector_sync_job_id\" => \"my-connector-sync-job-id\",\n]);" + }, + { + "language": "curl", + "code": "curl -X DELETE -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_connector/_sync_job/my-connector-sync-job-id\"" + }, + { + "language": "Java", + "code": "client.connector().syncJobDelete(s -> s\n .connectorSyncJobId(\"my-connector-sync-job-id\")\n);\n" + } + ], + "specification/connector/update_name/examples/request/ConnectorUpdateNameRequestExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.connector.update_name(\n connector_id=\"my-connector\",\n name=\"Custom connector\",\n description=\"This is my customized connector\",\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.connector.updateName({\n connector_id: \"my-connector\",\n name: \"Custom connector\",\n description: \"This is my customized connector\",\n});" + }, + { + "language": "Ruby", + "code": "response = client.connector.update_name(\n connector_id: \"my-connector\",\n body: {\n \"name\": \"Custom connector\",\n \"description\": \"This is my customized connector\"\n }\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->connector()->updateName([\n \"connector_id\" => \"my-connector\",\n \"body\" => [\n \"name\" => \"Custom connector\",\n \"description\" => \"This is my customized connector\",\n ],\n]);" + }, + { + "language": "curl", + "code": "curl -X PUT -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"name\":\"Custom connector\",\"description\":\"This is my customized connector\"}' \"$ELASTICSEARCH_URL/_connector/my-connector/_name\"" + }, + { + "language": "Java", + "code": "client.connector().updateName(u -> u\n .connectorId(\"my-connector\")\n .description(\"This is my customized connector\")\n .name(\"Custom connector\")\n);\n" + } + ], + "specification/connector/last_sync/examples/request/ConnectorUpdateLastSyncRequestExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.perform_request(\n \"PUT\",\n \"/_connector/my-connector/_last_sync\",\n headers={\"Content-Type\": \"application/json\"},\n body={\n \"last_access_control_sync_error\": \"Houston, we have a problem!\",\n \"last_access_control_sync_scheduled_at\": \"2023-11-09T15:13:08.231Z\",\n \"last_access_control_sync_status\": \"pending\",\n \"last_deleted_document_count\": 42,\n \"last_incremental_sync_scheduled_at\": \"2023-11-09T15:13:08.231Z\",\n \"last_indexed_document_count\": 42,\n \"last_sync_error\": \"Houston, we have a problem!\",\n \"last_sync_scheduled_at\": \"2024-11-09T15:13:08.231Z\",\n \"last_sync_status\": \"completed\",\n \"last_synced\": \"2024-11-09T15:13:08.231Z\"\n },\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.transport.request({\n method: \"PUT\",\n path: \"/_connector/my-connector/_last_sync\",\n body: {\n last_access_control_sync_error: \"Houston, we have a problem!\",\n last_access_control_sync_scheduled_at: \"2023-11-09T15:13:08.231Z\",\n last_access_control_sync_status: \"pending\",\n last_deleted_document_count: 42,\n last_incremental_sync_scheduled_at: \"2023-11-09T15:13:08.231Z\",\n last_indexed_document_count: 42,\n last_sync_error: \"Houston, we have a problem!\",\n last_sync_scheduled_at: \"2024-11-09T15:13:08.231Z\",\n last_sync_status: \"completed\",\n last_synced: \"2024-11-09T15:13:08.231Z\",\n },\n});" + }, + { + "language": "Ruby", + "code": "response = client.perform_request(\n \"PUT\",\n \"/_connector/my-connector/_last_sync\",\n {},\n {\n \"last_access_control_sync_error\": \"Houston, we have a problem!\",\n \"last_access_control_sync_scheduled_at\": \"2023-11-09T15:13:08.231Z\",\n \"last_access_control_sync_status\": \"pending\",\n \"last_deleted_document_count\": 42,\n \"last_incremental_sync_scheduled_at\": \"2023-11-09T15:13:08.231Z\",\n \"last_indexed_document_count\": 42,\n \"last_sync_error\": \"Houston, we have a problem!\",\n \"last_sync_scheduled_at\": \"2024-11-09T15:13:08.231Z\",\n \"last_sync_status\": \"completed\",\n \"last_synced\": \"2024-11-09T15:13:08.231Z\"\n },\n { \"Content-Type\": \"application/json\" },\n)" + }, + { + "language": "PHP", + "code": "$requestFactory = Psr17FactoryDiscovery::findRequestFactory();\n$streamFactory = Psr17FactoryDiscovery::findStreamFactory();\n$request = $requestFactory->createRequest(\n \"PUT\",\n \"/_connector/my-connector/_last_sync\",\n);\n$request = $request->withHeader(\"Content-Type\", \"application/json\");\n$request = $request->withBody($streamFactory->createStream(\n json_encode([\n \"last_access_control_sync_error\" => \"Houston, we have a problem!\",\n \"last_access_control_sync_scheduled_at\" => \"2023-11-09T15:13:08.231Z\",\n \"last_access_control_sync_status\" => \"pending\",\n \"last_deleted_document_count\" => 42,\n \"last_incremental_sync_scheduled_at\" => \"2023-11-09T15:13:08.231Z\",\n \"last_indexed_document_count\" => 42,\n \"last_sync_error\" => \"Houston, we have a problem!\",\n \"last_sync_scheduled_at\" => \"2024-11-09T15:13:08.231Z\",\n \"last_sync_status\" => \"completed\",\n \"last_synced\" => \"2024-11-09T15:13:08.231Z\",\n ]),\n));\n$resp = $client->sendRequest($request);" + }, + { + "language": "curl", + "code": "curl -X PUT -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"last_access_control_sync_error\":\"Houston, we have a problem!\",\"last_access_control_sync_scheduled_at\":\"2023-11-09T15:13:08.231Z\",\"last_access_control_sync_status\":\"pending\",\"last_deleted_document_count\":42,\"last_incremental_sync_scheduled_at\":\"2023-11-09T15:13:08.231Z\",\"last_indexed_document_count\":42,\"last_sync_error\":\"Houston, we have a problem!\",\"last_sync_scheduled_at\":\"2024-11-09T15:13:08.231Z\",\"last_sync_status\":\"completed\",\"last_synced\":\"2024-11-09T15:13:08.231Z\"}' \"$ELASTICSEARCH_URL/_connector/my-connector/_last_sync\"" + } + ], + "specification/connector/update_filtering/examples/request/ConnectorUpdateFilteringRequestExample2.yaml": [ + { + "language": "Python", + "code": "resp = client.connector.update_filtering(\n connector_id=\"my-sql-connector\",\n advanced_snippet={\n \"value\": [\n {\n \"tables\": [\n \"users\",\n \"orders\"\n ],\n \"query\": \"SELECT users.id AS id, orders.order_id AS order_id FROM users JOIN orders ON users.id = orders.user_id\"\n }\n ]\n },\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.connector.updateFiltering({\n connector_id: \"my-sql-connector\",\n advanced_snippet: {\n value: [\n {\n tables: [\"users\", \"orders\"],\n query:\n \"SELECT users.id AS id, orders.order_id AS order_id FROM users JOIN orders ON users.id = orders.user_id\",\n },\n ],\n },\n});" + }, + { + "language": "Ruby", + "code": "response = client.connector.update_filtering(\n connector_id: \"my-sql-connector\",\n body: {\n \"advanced_snippet\": {\n \"value\": [\n {\n \"tables\": [\n \"users\",\n \"orders\"\n ],\n \"query\": \"SELECT users.id AS id, orders.order_id AS order_id FROM users JOIN orders ON users.id = orders.user_id\"\n }\n ]\n }\n }\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->connector()->updateFiltering([\n \"connector_id\" => \"my-sql-connector\",\n \"body\" => [\n \"advanced_snippet\" => [\n \"value\" => array(\n [\n \"tables\" => array(\n \"users\",\n \"orders\",\n ),\n \"query\" => \"SELECT users.id AS id, orders.order_id AS order_id FROM users JOIN orders ON users.id = orders.user_id\",\n ],\n ),\n ],\n ],\n]);" + }, + { + "language": "curl", + "code": "curl -X PUT -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"advanced_snippet\":{\"value\":[{\"tables\":[\"users\",\"orders\"],\"query\":\"SELECT users.id AS id, orders.order_id AS order_id FROM users JOIN orders ON users.id = orders.user_id\"}]}}' \"$ELASTICSEARCH_URL/_connector/my-sql-connector/_filtering\"" + }, + { + "language": "Java", + "code": "client.connector().updateFiltering(u -> u\n .advancedSnippet(a -> a\n .value(JsonData.fromJson(\"[{\\\"tables\\\":[\\\"users\\\",\\\"orders\\\"],\\\"query\\\":\\\"SELECT users.id AS id, orders.order_id AS order_id FROM users JOIN orders ON users.id = orders.user_id\\\"}]\"))\n )\n .connectorId(\"my-sql-connector\")\n);\n" + } + ], + "specification/connector/update_filtering/examples/request/ConnectorUpdateFilteringRequestExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.connector.update_filtering(\n connector_id=\"my-g-drive-connector\",\n rules=[\n {\n \"field\": \"file_extension\",\n \"id\": \"exclude-txt-files\",\n \"order\": 0,\n \"policy\": \"exclude\",\n \"rule\": \"equals\",\n \"value\": \"txt\"\n },\n {\n \"field\": \"_\",\n \"id\": \"DEFAULT\",\n \"order\": 1,\n \"policy\": \"include\",\n \"rule\": \"regex\",\n \"value\": \".*\"\n }\n ],\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.connector.updateFiltering({\n connector_id: \"my-g-drive-connector\",\n rules: [\n {\n field: \"file_extension\",\n id: \"exclude-txt-files\",\n order: 0,\n policy: \"exclude\",\n rule: \"equals\",\n value: \"txt\",\n },\n {\n field: \"_\",\n id: \"DEFAULT\",\n order: 1,\n policy: \"include\",\n rule: \"regex\",\n value: \".*\",\n },\n ],\n});" + }, + { + "language": "Ruby", + "code": "response = client.connector.update_filtering(\n connector_id: \"my-g-drive-connector\",\n body: {\n \"rules\": [\n {\n \"field\": \"file_extension\",\n \"id\": \"exclude-txt-files\",\n \"order\": 0,\n \"policy\": \"exclude\",\n \"rule\": \"equals\",\n \"value\": \"txt\"\n },\n {\n \"field\": \"_\",\n \"id\": \"DEFAULT\",\n \"order\": 1,\n \"policy\": \"include\",\n \"rule\": \"regex\",\n \"value\": \".*\"\n }\n ]\n }\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->connector()->updateFiltering([\n \"connector_id\" => \"my-g-drive-connector\",\n \"body\" => [\n \"rules\" => array(\n [\n \"field\" => \"file_extension\",\n \"id\" => \"exclude-txt-files\",\n \"order\" => 0,\n \"policy\" => \"exclude\",\n \"rule\" => \"equals\",\n \"value\" => \"txt\",\n ],\n [\n \"field\" => \"_\",\n \"id\" => \"DEFAULT\",\n \"order\" => 1,\n \"policy\" => \"include\",\n \"rule\" => \"regex\",\n \"value\" => \".*\",\n ],\n ),\n ],\n]);" + }, + { + "language": "curl", + "code": "curl -X PUT -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"rules\":[{\"field\":\"file_extension\",\"id\":\"exclude-txt-files\",\"order\":0,\"policy\":\"exclude\",\"rule\":\"equals\",\"value\":\"txt\"},{\"field\":\"_\",\"id\":\"DEFAULT\",\"order\":1,\"policy\":\"include\",\"rule\":\"regex\",\"value\":\".*\"}]}' \"$ELASTICSEARCH_URL/_connector/my-g-drive-connector/_filtering\"" + }, + { + "language": "Java", + "code": "client.connector().updateFiltering(u -> u\n .connectorId(\"my-g-drive-connector\")\n .rules(List.of(FilteringRule.of(f -> f\n .field(\"file_extension\")\n .id(\"exclude-txt-files\")\n .order(0)\n .policy(FilteringPolicy.Exclude)\n .rule(FilteringRuleRule.Equals)\n .value(\"txt\")),FilteringRule.of(f -> f\n .field(\"_\")\n .id(\"DEFAULT\")\n .order(1)\n .policy(FilteringPolicy.Include)\n .rule(FilteringRuleRule.Regex)\n .value(\".*\"))))\n);\n" + } + ], + "specification/inference/put_mistral/examples/request/PutMistralRequestExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.inference.put(\n task_type=\"text_embedding\",\n inference_id=\"mistral-embeddings-test\",\n inference_config={\n \"service\": \"mistral\",\n \"service_settings\": {\n \"api_key\": \"Mistral-API-Key\",\n \"model\": \"mistral-embed\"\n }\n },\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.inference.put({\n task_type: \"text_embedding\",\n inference_id: \"mistral-embeddings-test\",\n inference_config: {\n service: \"mistral\",\n service_settings: {\n api_key: \"Mistral-API-Key\",\n model: \"mistral-embed\",\n },\n },\n});" + }, + { + "language": "Ruby", + "code": "response = client.inference.put(\n task_type: \"text_embedding\",\n inference_id: \"mistral-embeddings-test\",\n body: {\n \"service\": \"mistral\",\n \"service_settings\": {\n \"api_key\": \"Mistral-API-Key\",\n \"model\": \"mistral-embed\"\n }\n }\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->inference()->put([\n \"task_type\" => \"text_embedding\",\n \"inference_id\" => \"mistral-embeddings-test\",\n \"body\" => [\n \"service\" => \"mistral\",\n \"service_settings\" => [\n \"api_key\" => \"Mistral-API-Key\",\n \"model\" => \"mistral-embed\",\n ],\n ],\n]);" + }, + { + "language": "curl", + "code": "curl -X PUT -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"service\":\"mistral\",\"service_settings\":{\"api_key\":\"Mistral-API-Key\",\"model\":\"mistral-embed\"}}' \"$ELASTICSEARCH_URL/_inference/text_embedding/mistral-embeddings-test\"" + }, + { + "language": "Java", + "code": "client.inference().put(p -> p\n .inferenceId(\"mistral-embeddings-test\")\n .taskType(TaskType.TextEmbedding)\n .inferenceConfig(i -> i\n .service(\"mistral\")\n .serviceSettings(JsonData.fromJson(\"{\\\"api_key\\\":\\\"Mistral-API-Key\\\",\\\"model\\\":\\\"mistral-embed\\\"}\"))\n )\n);\n" + } + ], + "specification/inference/chat_completion_unified/examples/request/PostChatCompletionRequestExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.inference.chat_completion_unified(\n inference_id=\"openai-completion\",\n chat_completion_request={\n \"model\": \"gpt-4o\",\n \"messages\": [\n {\n \"role\": \"user\",\n \"content\": \"What is Elastic?\"\n }\n ]\n },\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.inference.chatCompletionUnified({\n inference_id: \"openai-completion\",\n chat_completion_request: {\n model: \"gpt-4o\",\n messages: [\n {\n role: \"user\",\n content: \"What is Elastic?\",\n },\n ],\n },\n});" + }, + { + "language": "Ruby", + "code": "response = client.inference.chat_completion_unified(\n inference_id: \"openai-completion\",\n body: {\n \"model\": \"gpt-4o\",\n \"messages\": [\n {\n \"role\": \"user\",\n \"content\": \"What is Elastic?\"\n }\n ]\n }\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->inference()->chatCompletionUnified([\n \"inference_id\" => \"openai-completion\",\n \"body\" => [\n \"model\" => \"gpt-4o\",\n \"messages\" => array(\n [\n \"role\" => \"user\",\n \"content\" => \"What is Elastic?\",\n ],\n ),\n ],\n]);" + }, + { + "language": "curl", + "code": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"model\":\"gpt-4o\",\"messages\":[{\"role\":\"user\",\"content\":\"What is Elastic?\"}]}' \"$ELASTICSEARCH_URL/_inference/chat_completion/openai-completion/_stream\"" + }, + { + "language": "Java", + "code": "client.inference().chatCompletionUnified(c -> c\n .inferenceId(\"openai-completion\")\n .chatCompletionRequest(ch -> ch\n .messages(m -> m\n .content(co -> co\n .string(\"What is Elastic?\")\n )\n .role(\"user\")\n )\n .model(\"gpt-4o\")\n )\n);\n" + } + ], + "specification/inference/chat_completion_unified/examples/request/PostChatCompletionRequestExample3.yaml": [ + { + "language": "Python", + "code": "resp = client.inference.chat_completion_unified(\n inference_id=\"openai-completion\",\n chat_completion_request={\n \"messages\": [\n {\n \"role\": \"user\",\n \"content\": [\n {\n \"type\": \"text\",\n \"text\": \"What's the price of a scarf?\"\n }\n ]\n }\n ],\n \"tools\": [\n {\n \"type\": \"function\",\n \"function\": {\n \"name\": \"get_current_price\",\n \"description\": \"Get the current price of a item\",\n \"parameters\": {\n \"type\": \"object\",\n \"properties\": {\n \"item\": {\n \"id\": \"123\"\n }\n }\n }\n }\n }\n ],\n \"tool_choice\": {\n \"type\": \"function\",\n \"function\": {\n \"name\": \"get_current_price\"\n }\n }\n },\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.inference.chatCompletionUnified({\n inference_id: \"openai-completion\",\n chat_completion_request: {\n messages: [\n {\n role: \"user\",\n content: [\n {\n type: \"text\",\n text: \"What's the price of a scarf?\",\n },\n ],\n },\n ],\n tools: [\n {\n type: \"function\",\n function: {\n name: \"get_current_price\",\n description: \"Get the current price of a item\",\n parameters: {\n type: \"object\",\n properties: {\n item: {\n id: \"123\",\n },\n },\n },\n },\n },\n ],\n tool_choice: {\n type: \"function\",\n function: {\n name: \"get_current_price\",\n },\n },\n },\n});" + }, + { + "language": "Ruby", + "code": "response = client.inference.chat_completion_unified(\n inference_id: \"openai-completion\",\n body: {\n \"messages\": [\n {\n \"role\": \"user\",\n \"content\": [\n {\n \"type\": \"text\",\n \"text\": \"What's the price of a scarf?\"\n }\n ]\n }\n ],\n \"tools\": [\n {\n \"type\": \"function\",\n \"function\": {\n \"name\": \"get_current_price\",\n \"description\": \"Get the current price of a item\",\n \"parameters\": {\n \"type\": \"object\",\n \"properties\": {\n \"item\": {\n \"id\": \"123\"\n }\n }\n }\n }\n }\n ],\n \"tool_choice\": {\n \"type\": \"function\",\n \"function\": {\n \"name\": \"get_current_price\"\n }\n }\n }\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->inference()->chatCompletionUnified([\n \"inference_id\" => \"openai-completion\",\n \"body\" => [\n \"messages\" => array(\n [\n \"role\" => \"user\",\n \"content\" => array(\n [\n \"type\" => \"text\",\n \"text\" => \"What's the price of a scarf?\",\n ],\n ),\n ],\n ),\n \"tools\" => array(\n [\n \"type\" => \"function\",\n \"function\" => [\n \"name\" => \"get_current_price\",\n \"description\" => \"Get the current price of a item\",\n \"parameters\" => [\n \"type\" => \"object\",\n \"properties\" => [\n \"item\" => [\n \"id\" => \"123\",\n ],\n ],\n ],\n ],\n ],\n ),\n \"tool_choice\" => [\n \"type\" => \"function\",\n \"function\" => [\n \"name\" => \"get_current_price\",\n ],\n ],\n ],\n]);" + }, + { + "language": "curl", + "code": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"messages\":[{\"role\":\"user\",\"content\":[{\"type\":\"text\",\"text\":\"What'\"'\"'s the price of a scarf?\"}]}],\"tools\":[{\"type\":\"function\",\"function\":{\"name\":\"get_current_price\",\"description\":\"Get the current price of a item\",\"parameters\":{\"type\":\"object\",\"properties\":{\"item\":{\"id\":\"123\"}}}}}],\"tool_choice\":{\"type\":\"function\",\"function\":{\"name\":\"get_current_price\"}}}' \"$ELASTICSEARCH_URL/_inference/chat_completion/openai-completion/_stream\"" + }, + { + "language": "Java", + "code": "client.inference().chatCompletionUnified(c -> c\n .inferenceId(\"openai-completion\")\n .chatCompletionRequest(ch -> ch\n .messages(m -> m\n .content(co -> co\n .string(\"What's the price of a scarf?\")\n )\n .role(\"user\")\n )\n .toolChoice(t -> t\n .object(o -> o\n .type(\"function\")\n .function(f -> f\n .name(\"get_current_price\")\n )\n )\n )\n .tools(to -> to\n .type(\"function\")\n .function(f -> f\n .description(\"Get the current price of a item\")\n .name(\"get_current_price\")\n .parameters(JsonData.fromJson(\"{\\\"type\\\":\\\"object\\\",\\\"properties\\\":{\\\"item\\\":{\\\"id\\\":\\\"123\\\"}}}\"))\n )\n )\n )\n);\n" + } + ], + "specification/inference/chat_completion_unified/examples/request/PostChatCompletionRequestExample2.yaml": [ + { + "language": "Python", + "code": "resp = client.inference.chat_completion_unified(\n inference_id=\"openai-completion\",\n chat_completion_request={\n \"messages\": [\n {\n \"role\": \"assistant\",\n \"content\": \"Let's find out what the weather is\",\n \"tool_calls\": [\n {\n \"id\": \"call_KcAjWtAww20AihPHphUh46Gd\",\n \"type\": \"function\",\n \"function\": {\n \"name\": \"get_current_weather\",\n \"arguments\": \"{\\\"location\\\":\\\"Boston, MA\\\"}\"\n }\n }\n ]\n },\n {\n \"role\": \"tool\",\n \"content\": \"The weather is cold\",\n \"tool_call_id\": \"call_KcAjWtAww20AihPHphUh46Gd\"\n }\n ]\n },\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.inference.chatCompletionUnified({\n inference_id: \"openai-completion\",\n chat_completion_request: {\n messages: [\n {\n role: \"assistant\",\n content: \"Let's find out what the weather is\",\n tool_calls: [\n {\n id: \"call_KcAjWtAww20AihPHphUh46Gd\",\n type: \"function\",\n function: {\n name: \"get_current_weather\",\n arguments: '{\"location\":\"Boston, MA\"}',\n },\n },\n ],\n },\n {\n role: \"tool\",\n content: \"The weather is cold\",\n tool_call_id: \"call_KcAjWtAww20AihPHphUh46Gd\",\n },\n ],\n },\n});" + }, + { + "language": "Ruby", + "code": "response = client.inference.chat_completion_unified(\n inference_id: \"openai-completion\",\n body: {\n \"messages\": [\n {\n \"role\": \"assistant\",\n \"content\": \"Let's find out what the weather is\",\n \"tool_calls\": [\n {\n \"id\": \"call_KcAjWtAww20AihPHphUh46Gd\",\n \"type\": \"function\",\n \"function\": {\n \"name\": \"get_current_weather\",\n \"arguments\": \"{\\\"location\\\":\\\"Boston, MA\\\"}\"\n }\n }\n ]\n },\n {\n \"role\": \"tool\",\n \"content\": \"The weather is cold\",\n \"tool_call_id\": \"call_KcAjWtAww20AihPHphUh46Gd\"\n }\n ]\n }\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->inference()->chatCompletionUnified([\n \"inference_id\" => \"openai-completion\",\n \"body\" => [\n \"messages\" => array(\n [\n \"role\" => \"assistant\",\n \"content\" => \"Let's find out what the weather is\",\n \"tool_calls\" => array(\n [\n \"id\" => \"call_KcAjWtAww20AihPHphUh46Gd\",\n \"type\" => \"function\",\n \"function\" => [\n \"name\" => \"get_current_weather\",\n \"arguments\" => \"{\\\"location\\\":\\\"Boston, MA\\\"}\",\n ],\n ],\n ),\n ],\n [\n \"role\" => \"tool\",\n \"content\" => \"The weather is cold\",\n \"tool_call_id\" => \"call_KcAjWtAww20AihPHphUh46Gd\",\n ],\n ),\n ],\n]);" + }, + { + "language": "curl", + "code": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"messages\":[{\"role\":\"assistant\",\"content\":\"Let'\"'\"'s find out what the weather is\",\"tool_calls\":[{\"id\":\"call_KcAjWtAww20AihPHphUh46Gd\",\"type\":\"function\",\"function\":{\"name\":\"get_current_weather\",\"arguments\":\"{\\\"location\\\":\\\"Boston, MA\\\"}\"}}]},{\"role\":\"tool\",\"content\":\"The weather is cold\",\"tool_call_id\":\"call_KcAjWtAww20AihPHphUh46Gd\"}]}' \"$ELASTICSEARCH_URL/_inference/chat_completion/openai-completion/_stream\"" + }, + { + "language": "Java", + "code": "client.inference().chatCompletionUnified(c -> c\n .inferenceId(\"openai-completion\")\n .chatCompletionRequest(ch -> ch\n .messages(List.of(Message.of(m -> m\n .content(co -> co\n .string(\"Let's find out what the weather is\")\n )\n .role(\"assistant\")\n .toolCalls(t -> t\n .id(\"call_KcAjWtAww20AihPHphUh46Gd\")\n .function(f -> f\n .arguments(\"{\\\"location\\\":\\\"Boston, MA\\\"}\")\n .name(\"get_current_weather\")\n )\n .type(\"function\")\n )),Message.of(me -> me\n .content(co -> co\n .string(\"The weather is cold\")\n )\n .role(\"tool\")\n .toolCallId(\"call_KcAjWtAww20AihPHphUh46Gd\"))))\n )\n);\n" + } + ], + "specification/inference/text_embedding/examples/request/TextEmbeddingRequestExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.inference.text_embedding(\n inference_id=\"my-cohere-endpoint\",\n input=\"The sky above the port was the color of television tuned to a dead channel.\",\n task_settings={\n \"input_type\": \"ingest\"\n },\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.inference.textEmbedding({\n inference_id: \"my-cohere-endpoint\",\n input:\n \"The sky above the port was the color of television tuned to a dead channel.\",\n task_settings: {\n input_type: \"ingest\",\n },\n});" + }, + { + "language": "Ruby", + "code": "response = client.inference.text_embedding(\n inference_id: \"my-cohere-endpoint\",\n body: {\n \"input\": \"The sky above the port was the color of television tuned to a dead channel.\",\n \"task_settings\": {\n \"input_type\": \"ingest\"\n }\n }\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->inference()->textEmbedding([\n \"inference_id\" => \"my-cohere-endpoint\",\n \"body\" => [\n \"input\" => \"The sky above the port was the color of television tuned to a dead channel.\",\n \"task_settings\" => [\n \"input_type\" => \"ingest\",\n ],\n ],\n]);" + }, + { + "language": "curl", + "code": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"input\":\"The sky above the port was the color of television tuned to a dead channel.\",\"task_settings\":{\"input_type\":\"ingest\"}}' \"$ELASTICSEARCH_URL/_inference/text_embedding/my-cohere-endpoint\"" + }, + { + "language": "Java", + "code": "client.inference().textEmbedding(t -> t\n .inferenceId(\"my-cohere-endpoint\")\n .input(\"The sky above the port was the color of television tuned to a dead channel.\")\n .taskSettings(JsonData.fromJson(\"{\\\"input_type\\\":\\\"ingest\\\"}\"))\n);\n" + } + ], + "specification/inference/put_jinaai/examples/request/PutJinaAiRequestExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.inference.put(\n task_type=\"text_embedding\",\n inference_id=\"jinaai-embeddings\",\n inference_config={\n \"service\": \"jinaai\",\n \"service_settings\": {\n \"model_id\": \"jina-embeddings-v3\",\n \"api_key\": \"JinaAi-Api-key\"\n }\n },\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.inference.put({\n task_type: \"text_embedding\",\n inference_id: \"jinaai-embeddings\",\n inference_config: {\n service: \"jinaai\",\n service_settings: {\n model_id: \"jina-embeddings-v3\",\n api_key: \"JinaAi-Api-key\",\n },\n },\n});" + }, + { + "language": "Ruby", + "code": "response = client.inference.put(\n task_type: \"text_embedding\",\n inference_id: \"jinaai-embeddings\",\n body: {\n \"service\": \"jinaai\",\n \"service_settings\": {\n \"model_id\": \"jina-embeddings-v3\",\n \"api_key\": \"JinaAi-Api-key\"\n }\n }\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->inference()->put([\n \"task_type\" => \"text_embedding\",\n \"inference_id\" => \"jinaai-embeddings\",\n \"body\" => [\n \"service\" => \"jinaai\",\n \"service_settings\" => [\n \"model_id\" => \"jina-embeddings-v3\",\n \"api_key\" => \"JinaAi-Api-key\",\n ],\n ],\n]);" + }, + { + "language": "curl", + "code": "curl -X PUT -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"service\":\"jinaai\",\"service_settings\":{\"model_id\":\"jina-embeddings-v3\",\"api_key\":\"JinaAi-Api-key\"}}' \"$ELASTICSEARCH_URL/_inference/text_embedding/jinaai-embeddings\"" + }, + { + "language": "Java", + "code": "client.inference().put(p -> p\n .inferenceId(\"jinaai-embeddings\")\n .taskType(TaskType.TextEmbedding)\n .inferenceConfig(i -> i\n .service(\"jinaai\")\n .serviceSettings(JsonData.fromJson(\"{\\\"model_id\\\":\\\"jina-embeddings-v3\\\",\\\"api_key\\\":\\\"JinaAi-Api-key\\\"}\"))\n )\n);\n" + } + ], + "specification/inference/put_jinaai/examples/request/PutJinaAiRequestExample2.yaml": [ + { + "language": "Python", + "code": "resp = client.inference.put(\n task_type=\"rerank\",\n inference_id=\"jinaai-rerank\",\n inference_config={\n \"service\": \"jinaai\",\n \"service_settings\": {\n \"api_key\": \"JinaAI-Api-key\",\n \"model_id\": \"jina-reranker-v2-base-multilingual\"\n },\n \"task_settings\": {\n \"top_n\": 10,\n \"return_documents\": True\n }\n },\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.inference.put({\n task_type: \"rerank\",\n inference_id: \"jinaai-rerank\",\n inference_config: {\n service: \"jinaai\",\n service_settings: {\n api_key: \"JinaAI-Api-key\",\n model_id: \"jina-reranker-v2-base-multilingual\",\n },\n task_settings: {\n top_n: 10,\n return_documents: true,\n },\n },\n});" + }, + { + "language": "Ruby", + "code": "response = client.inference.put(\n task_type: \"rerank\",\n inference_id: \"jinaai-rerank\",\n body: {\n \"service\": \"jinaai\",\n \"service_settings\": {\n \"api_key\": \"JinaAI-Api-key\",\n \"model_id\": \"jina-reranker-v2-base-multilingual\"\n },\n \"task_settings\": {\n \"top_n\": 10,\n \"return_documents\": true\n }\n }\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->inference()->put([\n \"task_type\" => \"rerank\",\n \"inference_id\" => \"jinaai-rerank\",\n \"body\" => [\n \"service\" => \"jinaai\",\n \"service_settings\" => [\n \"api_key\" => \"JinaAI-Api-key\",\n \"model_id\" => \"jina-reranker-v2-base-multilingual\",\n ],\n \"task_settings\" => [\n \"top_n\" => 10,\n \"return_documents\" => true,\n ],\n ],\n]);" + }, + { + "language": "curl", + "code": "curl -X PUT -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"service\":\"jinaai\",\"service_settings\":{\"api_key\":\"JinaAI-Api-key\",\"model_id\":\"jina-reranker-v2-base-multilingual\"},\"task_settings\":{\"top_n\":10,\"return_documents\":true}}' \"$ELASTICSEARCH_URL/_inference/rerank/jinaai-rerank\"" + }, + { + "language": "Java", + "code": "client.inference().put(p -> p\n .inferenceId(\"jinaai-rerank\")\n .taskType(TaskType.Rerank)\n .inferenceConfig(i -> i\n .service(\"jinaai\")\n .serviceSettings(JsonData.fromJson(\"{\\\"api_key\\\":\\\"JinaAI-Api-key\\\",\\\"model_id\\\":\\\"jina-reranker-v2-base-multilingual\\\"}\"))\n .taskSettings(JsonData.fromJson(\"{\\\"top_n\\\":10,\\\"return_documents\\\":true}\"))\n )\n);\n" + } + ], + "specification/inference/update/examples/request/InferenceUpdateExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.inference.update(\n inference_id=\"my-inference-endpoint\",\n inference_config={\n \"service_settings\": {\n \"api_key\": \"\"\n }\n },\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.inference.update({\n inference_id: \"my-inference-endpoint\",\n inference_config: {\n service_settings: {\n api_key: \"\",\n },\n },\n});" + }, + { + "language": "Ruby", + "code": "response = client.inference.update(\n inference_id: \"my-inference-endpoint\",\n body: {\n \"service_settings\": {\n \"api_key\": \"\"\n }\n }\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->inference()->update([\n \"inference_id\" => \"my-inference-endpoint\",\n \"body\" => [\n \"service_settings\" => [\n \"api_key\" => \"\",\n ],\n ],\n]);" + }, + { + "language": "curl", + "code": "curl -X PUT -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"service_settings\":{\"api_key\":\"\"}}' \"$ELASTICSEARCH_URL/_inference/my-inference-endpoint/_update\"" + } + ], + "specification/inference/put_elser/examples/request/PutElserRequestExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.inference.put(\n task_type=\"sparse_embedding\",\n inference_id=\"my-elser-model\",\n inference_config={\n \"service\": \"elser\",\n \"service_settings\": {\n \"num_allocations\": 1,\n \"num_threads\": 1\n }\n },\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.inference.put({\n task_type: \"sparse_embedding\",\n inference_id: \"my-elser-model\",\n inference_config: {\n service: \"elser\",\n service_settings: {\n num_allocations: 1,\n num_threads: 1,\n },\n },\n});" + }, + { + "language": "Ruby", + "code": "response = client.inference.put(\n task_type: \"sparse_embedding\",\n inference_id: \"my-elser-model\",\n body: {\n \"service\": \"elser\",\n \"service_settings\": {\n \"num_allocations\": 1,\n \"num_threads\": 1\n }\n }\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->inference()->put([\n \"task_type\" => \"sparse_embedding\",\n \"inference_id\" => \"my-elser-model\",\n \"body\" => [\n \"service\" => \"elser\",\n \"service_settings\" => [\n \"num_allocations\" => 1,\n \"num_threads\" => 1,\n ],\n ],\n]);" + }, + { + "language": "curl", + "code": "curl -X PUT -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"service\":\"elser\",\"service_settings\":{\"num_allocations\":1,\"num_threads\":1}}' \"$ELASTICSEARCH_URL/_inference/sparse_embedding/my-elser-model\"" + }, + { + "language": "Java", + "code": "client.inference().put(p -> p\n .inferenceId(\"my-elser-model\")\n .taskType(TaskType.SparseEmbedding)\n .inferenceConfig(i -> i\n .service(\"elser\")\n .serviceSettings(JsonData.fromJson(\"{\\\"num_allocations\\\":1,\\\"num_threads\\\":1}\"))\n )\n);\n" + } + ], + "specification/inference/put_elser/examples/request/PutElserRequestExample2.yaml": [ + { + "language": "Python", + "code": "resp = client.inference.put(\n task_type=\"sparse_embedding\",\n inference_id=\"my-elser-model\",\n inference_config={\n \"service\": \"elser\",\n \"service_settings\": {\n \"adaptive_allocations\": {\n \"enabled\": True,\n \"min_number_of_allocations\": 3,\n \"max_number_of_allocations\": 10\n },\n \"num_threads\": 1\n }\n },\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.inference.put({\n task_type: \"sparse_embedding\",\n inference_id: \"my-elser-model\",\n inference_config: {\n service: \"elser\",\n service_settings: {\n adaptive_allocations: {\n enabled: true,\n min_number_of_allocations: 3,\n max_number_of_allocations: 10,\n },\n num_threads: 1,\n },\n },\n});" + }, + { + "language": "Ruby", + "code": "response = client.inference.put(\n task_type: \"sparse_embedding\",\n inference_id: \"my-elser-model\",\n body: {\n \"service\": \"elser\",\n \"service_settings\": {\n \"adaptive_allocations\": {\n \"enabled\": true,\n \"min_number_of_allocations\": 3,\n \"max_number_of_allocations\": 10\n },\n \"num_threads\": 1\n }\n }\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->inference()->put([\n \"task_type\" => \"sparse_embedding\",\n \"inference_id\" => \"my-elser-model\",\n \"body\" => [\n \"service\" => \"elser\",\n \"service_settings\" => [\n \"adaptive_allocations\" => [\n \"enabled\" => true,\n \"min_number_of_allocations\" => 3,\n \"max_number_of_allocations\" => 10,\n ],\n \"num_threads\" => 1,\n ],\n ],\n]);" + }, + { + "language": "curl", + "code": "curl -X PUT -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"service\":\"elser\",\"service_settings\":{\"adaptive_allocations\":{\"enabled\":true,\"min_number_of_allocations\":3,\"max_number_of_allocations\":10},\"num_threads\":1}}' \"$ELASTICSEARCH_URL/_inference/sparse_embedding/my-elser-model\"" + }, + { + "language": "Java", + "code": "client.inference().put(p -> p\n .inferenceId(\"my-elser-model\")\n .taskType(TaskType.SparseEmbedding)\n .inferenceConfig(i -> i\n .service(\"elser\")\n .serviceSettings(JsonData.fromJson(\"{\\\"adaptive_allocations\\\":{\\\"enabled\\\":true,\\\"min_number_of_allocations\\\":3,\\\"max_number_of_allocations\\\":10},\\\"num_threads\\\":1}\"))\n )\n);\n" + } + ], + "specification/inference/delete/examples/request/InferenceDeleteExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.inference.delete(\n task_type=\"sparse_embedding\",\n inference_id=\"my-elser-model\",\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.inference.delete({\n task_type: \"sparse_embedding\",\n inference_id: \"my-elser-model\",\n});" + }, + { + "language": "Ruby", + "code": "response = client.inference.delete(\n task_type: \"sparse_embedding\",\n inference_id: \"my-elser-model\"\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->inference()->delete([\n \"task_type\" => \"sparse_embedding\",\n \"inference_id\" => \"my-elser-model\",\n]);" + }, + { + "language": "curl", + "code": "curl -X DELETE -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_inference/sparse_embedding/my-elser-model\"" + }, + { + "language": "Java", + "code": "client.inference().delete(d -> d\n .inferenceId(\"my-elser-model\")\n .taskType(TaskType.SparseEmbedding)\n);\n" + } + ], + "specification/inference/put_cohere/examples/request/PutCohereRequestExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.inference.put(\n task_type=\"text_embedding\",\n inference_id=\"cohere-embeddings\",\n inference_config={\n \"service\": \"cohere\",\n \"service_settings\": {\n \"api_key\": \"Cohere-Api-key\",\n \"model_id\": \"embed-english-light-v3.0\",\n \"embedding_type\": \"byte\"\n }\n },\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.inference.put({\n task_type: \"text_embedding\",\n inference_id: \"cohere-embeddings\",\n inference_config: {\n service: \"cohere\",\n service_settings: {\n api_key: \"Cohere-Api-key\",\n model_id: \"embed-english-light-v3.0\",\n embedding_type: \"byte\",\n },\n },\n});" + }, + { + "language": "Ruby", + "code": "response = client.inference.put(\n task_type: \"text_embedding\",\n inference_id: \"cohere-embeddings\",\n body: {\n \"service\": \"cohere\",\n \"service_settings\": {\n \"api_key\": \"Cohere-Api-key\",\n \"model_id\": \"embed-english-light-v3.0\",\n \"embedding_type\": \"byte\"\n }\n }\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->inference()->put([\n \"task_type\" => \"text_embedding\",\n \"inference_id\" => \"cohere-embeddings\",\n \"body\" => [\n \"service\" => \"cohere\",\n \"service_settings\" => [\n \"api_key\" => \"Cohere-Api-key\",\n \"model_id\" => \"embed-english-light-v3.0\",\n \"embedding_type\" => \"byte\",\n ],\n ],\n]);" + }, + { + "language": "curl", + "code": "curl -X PUT -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"service\":\"cohere\",\"service_settings\":{\"api_key\":\"Cohere-Api-key\",\"model_id\":\"embed-english-light-v3.0\",\"embedding_type\":\"byte\"}}' \"$ELASTICSEARCH_URL/_inference/text_embedding/cohere-embeddings\"" + }, + { + "language": "Java", + "code": "client.inference().put(p -> p\n .inferenceId(\"cohere-embeddings\")\n .taskType(TaskType.TextEmbedding)\n .inferenceConfig(i -> i\n .service(\"cohere\")\n .serviceSettings(JsonData.fromJson(\"{\\\"api_key\\\":\\\"Cohere-Api-key\\\",\\\"model_id\\\":\\\"embed-english-light-v3.0\\\",\\\"embedding_type\\\":\\\"byte\\\"}\"))\n )\n);\n" + } + ], + "specification/inference/put_cohere/examples/request/PutCohereRequestExample2.yaml": [ + { + "language": "Python", + "code": "resp = client.inference.put(\n task_type=\"rerank\",\n inference_id=\"cohere-rerank\",\n inference_config={\n \"service\": \"cohere\",\n \"service_settings\": {\n \"api_key\": \"Cohere-API-key\",\n \"model_id\": \"rerank-english-v3.0\"\n },\n \"task_settings\": {\n \"top_n\": 10,\n \"return_documents\": True\n }\n },\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.inference.put({\n task_type: \"rerank\",\n inference_id: \"cohere-rerank\",\n inference_config: {\n service: \"cohere\",\n service_settings: {\n api_key: \"Cohere-API-key\",\n model_id: \"rerank-english-v3.0\",\n },\n task_settings: {\n top_n: 10,\n return_documents: true,\n },\n },\n});" + }, + { + "language": "Ruby", + "code": "response = client.inference.put(\n task_type: \"rerank\",\n inference_id: \"cohere-rerank\",\n body: {\n \"service\": \"cohere\",\n \"service_settings\": {\n \"api_key\": \"Cohere-API-key\",\n \"model_id\": \"rerank-english-v3.0\"\n },\n \"task_settings\": {\n \"top_n\": 10,\n \"return_documents\": true\n }\n }\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->inference()->put([\n \"task_type\" => \"rerank\",\n \"inference_id\" => \"cohere-rerank\",\n \"body\" => [\n \"service\" => \"cohere\",\n \"service_settings\" => [\n \"api_key\" => \"Cohere-API-key\",\n \"model_id\" => \"rerank-english-v3.0\",\n ],\n \"task_settings\" => [\n \"top_n\" => 10,\n \"return_documents\" => true,\n ],\n ],\n]);" + }, + { + "language": "curl", + "code": "curl -X PUT -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"service\":\"cohere\",\"service_settings\":{\"api_key\":\"Cohere-API-key\",\"model_id\":\"rerank-english-v3.0\"},\"task_settings\":{\"top_n\":10,\"return_documents\":true}}' \"$ELASTICSEARCH_URL/_inference/rerank/cohere-rerank\"" + }, + { + "language": "Java", + "code": "client.inference().put(p -> p\n .inferenceId(\"cohere-rerank\")\n .taskType(TaskType.Rerank)\n .inferenceConfig(i -> i\n .service(\"cohere\")\n .serviceSettings(JsonData.fromJson(\"{\\\"api_key\\\":\\\"Cohere-API-key\\\",\\\"model_id\\\":\\\"rerank-english-v3.0\\\"}\"))\n .taskSettings(JsonData.fromJson(\"{\\\"top_n\\\":10,\\\"return_documents\\\":true}\"))\n )\n);\n" + } + ], + "specification/inference/put_googleaistudio/examples/request/PutGoogleAiStudioRequestExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.inference.put(\n task_type=\"completion\",\n inference_id=\"google_ai_studio_completion\",\n inference_config={\n \"service\": \"googleaistudio\",\n \"service_settings\": {\n \"api_key\": \"api-key\",\n \"model_id\": \"model-id\"\n }\n },\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.inference.put({\n task_type: \"completion\",\n inference_id: \"google_ai_studio_completion\",\n inference_config: {\n service: \"googleaistudio\",\n service_settings: {\n api_key: \"api-key\",\n model_id: \"model-id\",\n },\n },\n});" + }, + { + "language": "Ruby", + "code": "response = client.inference.put(\n task_type: \"completion\",\n inference_id: \"google_ai_studio_completion\",\n body: {\n \"service\": \"googleaistudio\",\n \"service_settings\": {\n \"api_key\": \"api-key\",\n \"model_id\": \"model-id\"\n }\n }\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->inference()->put([\n \"task_type\" => \"completion\",\n \"inference_id\" => \"google_ai_studio_completion\",\n \"body\" => [\n \"service\" => \"googleaistudio\",\n \"service_settings\" => [\n \"api_key\" => \"api-key\",\n \"model_id\" => \"model-id\",\n ],\n ],\n]);" + }, + { + "language": "curl", + "code": "curl -X PUT -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"service\":\"googleaistudio\",\"service_settings\":{\"api_key\":\"api-key\",\"model_id\":\"model-id\"}}' \"$ELASTICSEARCH_URL/_inference/completion/google_ai_studio_completion\"" + }, + { + "language": "Java", + "code": "client.inference().put(p -> p\n .inferenceId(\"google_ai_studio_completion\")\n .taskType(TaskType.Completion)\n .inferenceConfig(i -> i\n .service(\"googleaistudio\")\n .serviceSettings(JsonData.fromJson(\"{\\\"api_key\\\":\\\"api-key\\\",\\\"model_id\\\":\\\"model-id\\\"}\"))\n )\n);\n" + } + ], + "specification/inference/put/examples/request/InferencePutExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.inference.put(\n task_type=\"rerank\",\n inference_id=\"my-rerank-model\",\n inference_config={\n \"service\": \"cohere\",\n \"service_settings\": {\n \"model_id\": \"rerank-english-v3.0\",\n \"api_key\": \"{{COHERE_API_KEY}}\"\n }\n },\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.inference.put({\n task_type: \"rerank\",\n inference_id: \"my-rerank-model\",\n inference_config: {\n service: \"cohere\",\n service_settings: {\n model_id: \"rerank-english-v3.0\",\n api_key: \"{{COHERE_API_KEY}}\",\n },\n },\n});" + }, + { + "language": "Ruby", + "code": "response = client.inference.put(\n task_type: \"rerank\",\n inference_id: \"my-rerank-model\",\n body: {\n \"service\": \"cohere\",\n \"service_settings\": {\n \"model_id\": \"rerank-english-v3.0\",\n \"api_key\": \"{{COHERE_API_KEY}}\"\n }\n }\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->inference()->put([\n \"task_type\" => \"rerank\",\n \"inference_id\" => \"my-rerank-model\",\n \"body\" => [\n \"service\" => \"cohere\",\n \"service_settings\" => [\n \"model_id\" => \"rerank-english-v3.0\",\n \"api_key\" => \"{{COHERE_API_KEY}}\",\n ],\n ],\n]);" + }, + { + "language": "curl", + "code": "curl -X PUT -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"service\":\"cohere\",\"service_settings\":{\"model_id\":\"rerank-english-v3.0\",\"api_key\":\"{{COHERE_API_KEY}}\"}}' \"$ELASTICSEARCH_URL/_inference/rerank/my-rerank-model\"" + }, + { + "language": "Java", + "code": "client.inference().put(p -> p\n .inferenceId(\"my-rerank-model\")\n .taskType(TaskType.Rerank)\n .inferenceConfig(i -> i\n .service(\"cohere\")\n .serviceSettings(JsonData.fromJson(\"{\\\"model_id\\\":\\\"rerank-english-v3.0\\\",\\\"api_key\\\":\\\"{{COHERE_API_KEY}}\\\"}\"))\n )\n);\n" + } + ], + "specification/inference/put_voyageai/examples/request/PutVoyageAIRequestExample2.yaml": [ + { + "language": "Python", + "code": "resp = client.inference.put(\n task_type=\"rerank\",\n inference_id=\"voyageai-rerank\",\n inference_config={\n \"service\": \"voyageai\",\n \"service_settings\": {\n \"model_id\": \"rerank-2\"\n }\n },\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.inference.put({\n task_type: \"rerank\",\n inference_id: \"voyageai-rerank\",\n inference_config: {\n service: \"voyageai\",\n service_settings: {\n model_id: \"rerank-2\",\n },\n },\n});" + }, + { + "language": "Ruby", + "code": "response = client.inference.put(\n task_type: \"rerank\",\n inference_id: \"voyageai-rerank\",\n body: {\n \"service\": \"voyageai\",\n \"service_settings\": {\n \"model_id\": \"rerank-2\"\n }\n }\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->inference()->put([\n \"task_type\" => \"rerank\",\n \"inference_id\" => \"voyageai-rerank\",\n \"body\" => [\n \"service\" => \"voyageai\",\n \"service_settings\" => [\n \"model_id\" => \"rerank-2\",\n ],\n ],\n]);" + }, + { + "language": "curl", + "code": "curl -X PUT -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"service\":\"voyageai\",\"service_settings\":{\"model_id\":\"rerank-2\"}}' \"$ELASTICSEARCH_URL/_inference/rerank/voyageai-rerank\"" + }, + { + "language": "Java", + "code": "client.inference().put(p -> p\n .inferenceId(\"voyageai-rerank\")\n .taskType(TaskType.Rerank)\n .inferenceConfig(i -> i\n .service(\"voyageai\")\n .serviceSettings(JsonData.fromJson(\"{\\\"model_id\\\":\\\"rerank-2\\\"}\"))\n )\n);\n" + } + ], + "specification/inference/put_voyageai/examples/request/PutVoyageAIRequestExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.inference.put(\n task_type=\"text_embedding\",\n inference_id=\"openai-embeddings\",\n inference_config={\n \"service\": \"voyageai\",\n \"service_settings\": {\n \"model_id\": \"voyage-3-large\",\n \"dimensions\": 512\n }\n },\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.inference.put({\n task_type: \"text_embedding\",\n inference_id: \"openai-embeddings\",\n inference_config: {\n service: \"voyageai\",\n service_settings: {\n model_id: \"voyage-3-large\",\n dimensions: 512,\n },\n },\n});" + }, + { + "language": "Ruby", + "code": "response = client.inference.put(\n task_type: \"text_embedding\",\n inference_id: \"openai-embeddings\",\n body: {\n \"service\": \"voyageai\",\n \"service_settings\": {\n \"model_id\": \"voyage-3-large\",\n \"dimensions\": 512\n }\n }\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->inference()->put([\n \"task_type\" => \"text_embedding\",\n \"inference_id\" => \"openai-embeddings\",\n \"body\" => [\n \"service\" => \"voyageai\",\n \"service_settings\" => [\n \"model_id\" => \"voyage-3-large\",\n \"dimensions\" => 512,\n ],\n ],\n]);" + }, + { + "language": "curl", + "code": "curl -X PUT -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"service\":\"voyageai\",\"service_settings\":{\"model_id\":\"voyage-3-large\",\"dimensions\":512}}' \"$ELASTICSEARCH_URL/_inference/text_embedding/openai-embeddings\"" + }, + { + "language": "Java", + "code": "client.inference().put(p -> p\n .inferenceId(\"openai-embeddings\")\n .taskType(TaskType.TextEmbedding)\n .inferenceConfig(i -> i\n .service(\"voyageai\")\n .serviceSettings(JsonData.fromJson(\"{\\\"model_id\\\":\\\"voyage-3-large\\\",\\\"dimensions\\\":512}\"))\n )\n);\n" + } + ], + "specification/inference/put_watsonx/examples/request/PutWatsonxRequestExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.inference.put(\n task_type=\"text_embedding\",\n inference_id=\"watsonx-embeddings\",\n inference_config={\n \"service\": \"watsonxai\",\n \"service_settings\": {\n \"api_key\": \"Watsonx-API-Key\",\n \"url\": \"Wastonx-URL\",\n \"model_id\": \"ibm/slate-30m-english-rtrvr\",\n \"project_id\": \"IBM-Cloud-ID\",\n \"api_version\": \"2024-03-14\"\n }\n },\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.inference.put({\n task_type: \"text_embedding\",\n inference_id: \"watsonx-embeddings\",\n inference_config: {\n service: \"watsonxai\",\n service_settings: {\n api_key: \"Watsonx-API-Key\",\n url: \"Wastonx-URL\",\n model_id: \"ibm/slate-30m-english-rtrvr\",\n project_id: \"IBM-Cloud-ID\",\n api_version: \"2024-03-14\",\n },\n },\n});" + }, + { + "language": "Ruby", + "code": "response = client.inference.put(\n task_type: \"text_embedding\",\n inference_id: \"watsonx-embeddings\",\n body: {\n \"service\": \"watsonxai\",\n \"service_settings\": {\n \"api_key\": \"Watsonx-API-Key\",\n \"url\": \"Wastonx-URL\",\n \"model_id\": \"ibm/slate-30m-english-rtrvr\",\n \"project_id\": \"IBM-Cloud-ID\",\n \"api_version\": \"2024-03-14\"\n }\n }\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->inference()->put([\n \"task_type\" => \"text_embedding\",\n \"inference_id\" => \"watsonx-embeddings\",\n \"body\" => [\n \"service\" => \"watsonxai\",\n \"service_settings\" => [\n \"api_key\" => \"Watsonx-API-Key\",\n \"url\" => \"Wastonx-URL\",\n \"model_id\" => \"ibm/slate-30m-english-rtrvr\",\n \"project_id\" => \"IBM-Cloud-ID\",\n \"api_version\" => \"2024-03-14\",\n ],\n ],\n]);" + }, + { + "language": "curl", + "code": "curl -X PUT -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"service\":\"watsonxai\",\"service_settings\":{\"api_key\":\"Watsonx-API-Key\",\"url\":\"Wastonx-URL\",\"model_id\":\"ibm/slate-30m-english-rtrvr\",\"project_id\":\"IBM-Cloud-ID\",\"api_version\":\"2024-03-14\"}}' \"$ELASTICSEARCH_URL/_inference/text_embedding/watsonx-embeddings\"" + }, + { + "language": "Java", + "code": "client.inference().put(p -> p\n .inferenceId(\"watsonx-embeddings\")\n .taskType(TaskType.TextEmbedding)\n .inferenceConfig(i -> i\n .service(\"watsonxai\")\n .serviceSettings(JsonData.fromJson(\"{\\\"api_key\\\":\\\"Watsonx-API-Key\\\",\\\"url\\\":\\\"Wastonx-URL\\\",\\\"model_id\\\":\\\"ibm/slate-30m-english-rtrvr\\\",\\\"project_id\\\":\\\"IBM-Cloud-ID\\\",\\\"api_version\\\":\\\"2024-03-14\\\"}\"))\n )\n);\n" + } + ], + "specification/inference/completion/examples/request/CompletionRequestExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.inference.completion(\n inference_id=\"openai_chat_completions\",\n input=\"What is Elastic?\",\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.inference.completion({\n inference_id: \"openai_chat_completions\",\n input: \"What is Elastic?\",\n});" + }, + { + "language": "Ruby", + "code": "response = client.inference.completion(\n inference_id: \"openai_chat_completions\",\n body: {\n \"input\": \"What is Elastic?\"\n }\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->inference()->completion([\n \"inference_id\" => \"openai_chat_completions\",\n \"body\" => [\n \"input\" => \"What is Elastic?\",\n ],\n]);" + }, + { + "language": "curl", + "code": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"input\":\"What is Elastic?\"}' \"$ELASTICSEARCH_URL/_inference/completion/openai_chat_completions\"" + }, + { + "language": "Java", + "code": "client.inference().completion(c -> c\n .inferenceId(\"openai_chat_completions\")\n .input(\"What is Elastic?\")\n);\n" + } + ], + "specification/inference/get/examples/request/InferenceGetExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.inference.get(\n task_type=\"sparse_embedding\",\n inference_id=\"my-elser-model\",\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.inference.get({\n task_type: \"sparse_embedding\",\n inference_id: \"my-elser-model\",\n});" + }, + { + "language": "Ruby", + "code": "response = client.inference.get(\n task_type: \"sparse_embedding\",\n inference_id: \"my-elser-model\"\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->inference()->get([\n \"task_type\" => \"sparse_embedding\",\n \"inference_id\" => \"my-elser-model\",\n]);" + }, + { + "language": "curl", + "code": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_inference/sparse_embedding/my-elser-model\"" + }, + { + "language": "Java", + "code": "client.inference().get(g -> g\n .inferenceId(\"my-elser-model\")\n .taskType(TaskType.SparseEmbedding)\n);\n" + } + ], + "specification/inference/put_anthropic/examples/request/PutAnthropicRequestExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.inference.put(\n task_type=\"completion\",\n inference_id=\"anthropic_completion\",\n inference_config={\n \"service\": \"anthropic\",\n \"service_settings\": {\n \"api_key\": \"Anthropic-Api-Key\",\n \"model_id\": \"Model-ID\"\n },\n \"task_settings\": {\n \"max_tokens\": 1024\n }\n },\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.inference.put({\n task_type: \"completion\",\n inference_id: \"anthropic_completion\",\n inference_config: {\n service: \"anthropic\",\n service_settings: {\n api_key: \"Anthropic-Api-Key\",\n model_id: \"Model-ID\",\n },\n task_settings: {\n max_tokens: 1024,\n },\n },\n});" + }, + { + "language": "Ruby", + "code": "response = client.inference.put(\n task_type: \"completion\",\n inference_id: \"anthropic_completion\",\n body: {\n \"service\": \"anthropic\",\n \"service_settings\": {\n \"api_key\": \"Anthropic-Api-Key\",\n \"model_id\": \"Model-ID\"\n },\n \"task_settings\": {\n \"max_tokens\": 1024\n }\n }\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->inference()->put([\n \"task_type\" => \"completion\",\n \"inference_id\" => \"anthropic_completion\",\n \"body\" => [\n \"service\" => \"anthropic\",\n \"service_settings\" => [\n \"api_key\" => \"Anthropic-Api-Key\",\n \"model_id\" => \"Model-ID\",\n ],\n \"task_settings\" => [\n \"max_tokens\" => 1024,\n ],\n ],\n]);" + }, + { + "language": "curl", + "code": "curl -X PUT -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"service\":\"anthropic\",\"service_settings\":{\"api_key\":\"Anthropic-Api-Key\",\"model_id\":\"Model-ID\"},\"task_settings\":{\"max_tokens\":1024}}' \"$ELASTICSEARCH_URL/_inference/completion/anthropic_completion\"" + }, + { + "language": "Java", + "code": "client.inference().put(p -> p\n .inferenceId(\"anthropic_completion\")\n .taskType(TaskType.Completion)\n .inferenceConfig(i -> i\n .service(\"anthropic\")\n .serviceSettings(JsonData.fromJson(\"{\\\"api_key\\\":\\\"Anthropic-Api-Key\\\",\\\"model_id\\\":\\\"Model-ID\\\"}\"))\n .taskSettings(JsonData.fromJson(\"{\\\"max_tokens\\\":1024}\"))\n )\n);\n" + } + ], + "specification/inference/sparse_embedding/examples/request/SparseEmbeddingRequestExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.inference.sparse_embedding(\n inference_id=\"my-elser-model\",\n input=\"The sky above the port was the color of television tuned to a dead channel.\",\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.inference.sparseEmbedding({\n inference_id: \"my-elser-model\",\n input:\n \"The sky above the port was the color of television tuned to a dead channel.\",\n});" + }, + { + "language": "Ruby", + "code": "response = client.inference.sparse_embedding(\n inference_id: \"my-elser-model\",\n body: {\n \"input\": \"The sky above the port was the color of television tuned to a dead channel.\"\n }\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->inference()->sparseEmbedding([\n \"inference_id\" => \"my-elser-model\",\n \"body\" => [\n \"input\" => \"The sky above the port was the color of television tuned to a dead channel.\",\n ],\n]);" + }, + { + "language": "curl", + "code": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"input\":\"The sky above the port was the color of television tuned to a dead channel.\"}' \"$ELASTICSEARCH_URL/_inference/sparse_embedding/my-elser-model\"" + }, + { + "language": "Java", + "code": "client.inference().sparseEmbedding(s -> s\n .inferenceId(\"my-elser-model\")\n .input(\"The sky above the port was the color of television tuned to a dead channel.\")\n);\n" + } + ], + "specification/inference/put_googlevertexai/examples/request/PutGoogleVertexAiRequestExample2.yaml": [ + { + "language": "Python", + "code": "resp = client.inference.put(\n task_type=\"rerank\",\n inference_id=\"google_vertex_ai_rerank\",\n inference_config={\n \"service\": \"googlevertexai\",\n \"service_settings\": {\n \"service_account_json\": \"service-account-json\",\n \"project_id\": \"project-id\"\n }\n },\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.inference.put({\n task_type: \"rerank\",\n inference_id: \"google_vertex_ai_rerank\",\n inference_config: {\n service: \"googlevertexai\",\n service_settings: {\n service_account_json: \"service-account-json\",\n project_id: \"project-id\",\n },\n },\n});" + }, + { + "language": "Ruby", + "code": "response = client.inference.put(\n task_type: \"rerank\",\n inference_id: \"google_vertex_ai_rerank\",\n body: {\n \"service\": \"googlevertexai\",\n \"service_settings\": {\n \"service_account_json\": \"service-account-json\",\n \"project_id\": \"project-id\"\n }\n }\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->inference()->put([\n \"task_type\" => \"rerank\",\n \"inference_id\" => \"google_vertex_ai_rerank\",\n \"body\" => [\n \"service\" => \"googlevertexai\",\n \"service_settings\" => [\n \"service_account_json\" => \"service-account-json\",\n \"project_id\" => \"project-id\",\n ],\n ],\n]);" + }, + { + "language": "curl", + "code": "curl -X PUT -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"service\":\"googlevertexai\",\"service_settings\":{\"service_account_json\":\"service-account-json\",\"project_id\":\"project-id\"}}' \"$ELASTICSEARCH_URL/_inference/rerank/google_vertex_ai_rerank\"" + }, + { + "language": "Java", + "code": "client.inference().put(p -> p\n .inferenceId(\"google_vertex_ai_rerank\")\n .taskType(TaskType.Rerank)\n .inferenceConfig(i -> i\n .service(\"googlevertexai\")\n .serviceSettings(JsonData.fromJson(\"{\\\"service_account_json\\\":\\\"service-account-json\\\",\\\"project_id\\\":\\\"project-id\\\"}\"))\n )\n);\n" + } + ], + "specification/inference/put_googlevertexai/examples/request/PutGoogleVertexAiRequestExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.inference.put(\n task_type=\"text_embedding\",\n inference_id=\"google_vertex_ai_embeddingss\",\n inference_config={\n \"service\": \"googlevertexai\",\n \"service_settings\": {\n \"service_account_json\": \"service-account-json\",\n \"model_id\": \"model-id\",\n \"location\": \"location\",\n \"project_id\": \"project-id\"\n }\n },\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.inference.put({\n task_type: \"text_embedding\",\n inference_id: \"google_vertex_ai_embeddingss\",\n inference_config: {\n service: \"googlevertexai\",\n service_settings: {\n service_account_json: \"service-account-json\",\n model_id: \"model-id\",\n location: \"location\",\n project_id: \"project-id\",\n },\n },\n});" + }, + { + "language": "Ruby", + "code": "response = client.inference.put(\n task_type: \"text_embedding\",\n inference_id: \"google_vertex_ai_embeddingss\",\n body: {\n \"service\": \"googlevertexai\",\n \"service_settings\": {\n \"service_account_json\": \"service-account-json\",\n \"model_id\": \"model-id\",\n \"location\": \"location\",\n \"project_id\": \"project-id\"\n }\n }\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->inference()->put([\n \"task_type\" => \"text_embedding\",\n \"inference_id\" => \"google_vertex_ai_embeddingss\",\n \"body\" => [\n \"service\" => \"googlevertexai\",\n \"service_settings\" => [\n \"service_account_json\" => \"service-account-json\",\n \"model_id\" => \"model-id\",\n \"location\" => \"location\",\n \"project_id\" => \"project-id\",\n ],\n ],\n]);" + }, + { + "language": "curl", + "code": "curl -X PUT -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"service\":\"googlevertexai\",\"service_settings\":{\"service_account_json\":\"service-account-json\",\"model_id\":\"model-id\",\"location\":\"location\",\"project_id\":\"project-id\"}}' \"$ELASTICSEARCH_URL/_inference/text_embedding/google_vertex_ai_embeddingss\"" + }, + { + "language": "Java", + "code": "client.inference().put(p -> p\n .inferenceId(\"google_vertex_ai_embeddingss\")\n .taskType(TaskType.TextEmbedding)\n .inferenceConfig(i -> i\n .service(\"googlevertexai\")\n .serviceSettings(JsonData.fromJson(\"{\\\"service_account_json\\\":\\\"service-account-json\\\",\\\"model_id\\\":\\\"model-id\\\",\\\"location\\\":\\\"location\\\",\\\"project_id\\\":\\\"project-id\\\"}\"))\n )\n);\n" + } + ], + "specification/inference/put_hugging_face/examples/request/PutHuggingFaceRequestExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.inference.put(\n task_type=\"text_embedding\",\n inference_id=\"hugging-face-embeddings\",\n inference_config={\n \"service\": \"hugging_face\",\n \"service_settings\": {\n \"api_key\": \"hugging-face-access-token\",\n \"url\": \"url-endpoint\"\n }\n },\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.inference.put({\n task_type: \"text_embedding\",\n inference_id: \"hugging-face-embeddings\",\n inference_config: {\n service: \"hugging_face\",\n service_settings: {\n api_key: \"hugging-face-access-token\",\n url: \"url-endpoint\",\n },\n },\n});" + }, + { + "language": "Ruby", + "code": "response = client.inference.put(\n task_type: \"text_embedding\",\n inference_id: \"hugging-face-embeddings\",\n body: {\n \"service\": \"hugging_face\",\n \"service_settings\": {\n \"api_key\": \"hugging-face-access-token\",\n \"url\": \"url-endpoint\"\n }\n }\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->inference()->put([\n \"task_type\" => \"text_embedding\",\n \"inference_id\" => \"hugging-face-embeddings\",\n \"body\" => [\n \"service\" => \"hugging_face\",\n \"service_settings\" => [\n \"api_key\" => \"hugging-face-access-token\",\n \"url\" => \"url-endpoint\",\n ],\n ],\n]);" + }, + { + "language": "curl", + "code": "curl -X PUT -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"service\":\"hugging_face\",\"service_settings\":{\"api_key\":\"hugging-face-access-token\",\"url\":\"url-endpoint\"}}' \"$ELASTICSEARCH_URL/_inference/text_embedding/hugging-face-embeddings\"" + }, + { + "language": "Java", + "code": "client.inference().put(p -> p\n .inferenceId(\"hugging-face-embeddings\")\n .taskType(TaskType.TextEmbedding)\n .inferenceConfig(i -> i\n .service(\"hugging_face\")\n .serviceSettings(JsonData.fromJson(\"{\\\"api_key\\\":\\\"hugging-face-access-token\\\",\\\"url\\\":\\\"url-endpoint\\\"}\"))\n )\n);\n" + } + ], + "specification/inference/put_hugging_face/examples/request/PutHuggingFaceRequestExample2.yaml": [ + { + "language": "Python", + "code": "resp = client.inference.put(\n task_type=\"rerank\",\n inference_id=\"hugging-face-rerank\",\n inference_config={\n \"service\": \"hugging_face\",\n \"service_settings\": {\n \"api_key\": \"hugging-face-access-token\",\n \"url\": \"url-endpoint\"\n },\n \"task_settings\": {\n \"return_documents\": True,\n \"top_n\": 3\n }\n },\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.inference.put({\n task_type: \"rerank\",\n inference_id: \"hugging-face-rerank\",\n inference_config: {\n service: \"hugging_face\",\n service_settings: {\n api_key: \"hugging-face-access-token\",\n url: \"url-endpoint\",\n },\n task_settings: {\n return_documents: true,\n top_n: 3,\n },\n },\n});" + }, + { + "language": "Ruby", + "code": "response = client.inference.put(\n task_type: \"rerank\",\n inference_id: \"hugging-face-rerank\",\n body: {\n \"service\": \"hugging_face\",\n \"service_settings\": {\n \"api_key\": \"hugging-face-access-token\",\n \"url\": \"url-endpoint\"\n },\n \"task_settings\": {\n \"return_documents\": true,\n \"top_n\": 3\n }\n }\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->inference()->put([\n \"task_type\" => \"rerank\",\n \"inference_id\" => \"hugging-face-rerank\",\n \"body\" => [\n \"service\" => \"hugging_face\",\n \"service_settings\" => [\n \"api_key\" => \"hugging-face-access-token\",\n \"url\" => \"url-endpoint\",\n ],\n \"task_settings\" => [\n \"return_documents\" => true,\n \"top_n\" => 3,\n ],\n ],\n]);" + }, + { + "language": "curl", + "code": "curl -X PUT -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"service\":\"hugging_face\",\"service_settings\":{\"api_key\":\"hugging-face-access-token\",\"url\":\"url-endpoint\"},\"task_settings\":{\"return_documents\":true,\"top_n\":3}}' \"$ELASTICSEARCH_URL/_inference/rerank/hugging-face-rerank\"" + }, + { + "language": "Java", + "code": "client.inference().put(p -> p\n .inferenceId(\"hugging-face-rerank\")\n .taskType(TaskType.Rerank)\n .inferenceConfig(i -> i\n .service(\"hugging_face\")\n .serviceSettings(JsonData.fromJson(\"{\\\"api_key\\\":\\\"hugging-face-access-token\\\",\\\"url\\\":\\\"url-endpoint\\\"}\"))\n .taskSettings(JsonData.fromJson(\"{\\\"return_documents\\\":true,\\\"top_n\\\":3}\"))\n )\n);\n" + } + ], + "specification/inference/put_amazonbedrock/examples/request/PutAmazonBedrockRequestExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.inference.put(\n task_type=\"text_embedding\",\n inference_id=\"amazon_bedrock_embeddings\",\n inference_config={\n \"service\": \"amazonbedrock\",\n \"service_settings\": {\n \"access_key\": \"AWS-access-key\",\n \"secret_key\": \"AWS-secret-key\",\n \"region\": \"us-east-1\",\n \"provider\": \"amazontitan\",\n \"model\": \"amazon.titan-embed-text-v2:0\"\n }\n },\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.inference.put({\n task_type: \"text_embedding\",\n inference_id: \"amazon_bedrock_embeddings\",\n inference_config: {\n service: \"amazonbedrock\",\n service_settings: {\n access_key: \"AWS-access-key\",\n secret_key: \"AWS-secret-key\",\n region: \"us-east-1\",\n provider: \"amazontitan\",\n model: \"amazon.titan-embed-text-v2:0\",\n },\n },\n});" + }, + { + "language": "Ruby", + "code": "response = client.inference.put(\n task_type: \"text_embedding\",\n inference_id: \"amazon_bedrock_embeddings\",\n body: {\n \"service\": \"amazonbedrock\",\n \"service_settings\": {\n \"access_key\": \"AWS-access-key\",\n \"secret_key\": \"AWS-secret-key\",\n \"region\": \"us-east-1\",\n \"provider\": \"amazontitan\",\n \"model\": \"amazon.titan-embed-text-v2:0\"\n }\n }\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->inference()->put([\n \"task_type\" => \"text_embedding\",\n \"inference_id\" => \"amazon_bedrock_embeddings\",\n \"body\" => [\n \"service\" => \"amazonbedrock\",\n \"service_settings\" => [\n \"access_key\" => \"AWS-access-key\",\n \"secret_key\" => \"AWS-secret-key\",\n \"region\" => \"us-east-1\",\n \"provider\" => \"amazontitan\",\n \"model\" => \"amazon.titan-embed-text-v2:0\",\n ],\n ],\n]);" + }, + { + "language": "curl", + "code": "curl -X PUT -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"service\":\"amazonbedrock\",\"service_settings\":{\"access_key\":\"AWS-access-key\",\"secret_key\":\"AWS-secret-key\",\"region\":\"us-east-1\",\"provider\":\"amazontitan\",\"model\":\"amazon.titan-embed-text-v2:0\"}}' \"$ELASTICSEARCH_URL/_inference/text_embedding/amazon_bedrock_embeddings\"" + }, + { + "language": "Java", + "code": "client.inference().put(p -> p\n .inferenceId(\"amazon_bedrock_embeddings\")\n .taskType(TaskType.TextEmbedding)\n .inferenceConfig(i -> i\n .service(\"amazonbedrock\")\n .serviceSettings(JsonData.fromJson(\"{\\\"access_key\\\":\\\"AWS-access-key\\\",\\\"secret_key\\\":\\\"AWS-secret-key\\\",\\\"region\\\":\\\"us-east-1\\\",\\\"provider\\\":\\\"amazontitan\\\",\\\"model\\\":\\\"amazon.titan-embed-text-v2:0\\\"}\"))\n )\n);\n" + } + ], + "specification/inference/put_amazonbedrock/examples/request/PutAmazonBedrockRequestExample2.yaml": [ + { + "language": "Python", + "code": "resp = client.inference.put(\n task_type=\"completion\",\n inference_id=\"openai-completion\",\n inference_config={\n \"service\": \"openai\",\n \"service_settings\": {\n \"api_key\": \"OpenAI-API-Key\",\n \"model_id\": \"gpt-3.5-turbo\"\n }\n },\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.inference.put({\n task_type: \"completion\",\n inference_id: \"openai-completion\",\n inference_config: {\n service: \"openai\",\n service_settings: {\n api_key: \"OpenAI-API-Key\",\n model_id: \"gpt-3.5-turbo\",\n },\n },\n});" + }, + { + "language": "Ruby", + "code": "response = client.inference.put(\n task_type: \"completion\",\n inference_id: \"openai-completion\",\n body: {\n \"service\": \"openai\",\n \"service_settings\": {\n \"api_key\": \"OpenAI-API-Key\",\n \"model_id\": \"gpt-3.5-turbo\"\n }\n }\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->inference()->put([\n \"task_type\" => \"completion\",\n \"inference_id\" => \"openai-completion\",\n \"body\" => [\n \"service\" => \"openai\",\n \"service_settings\" => [\n \"api_key\" => \"OpenAI-API-Key\",\n \"model_id\" => \"gpt-3.5-turbo\",\n ],\n ],\n]);" + }, + { + "language": "curl", + "code": "curl -X PUT -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"service\":\"openai\",\"service_settings\":{\"api_key\":\"OpenAI-API-Key\",\"model_id\":\"gpt-3.5-turbo\"}}' \"$ELASTICSEARCH_URL/_inference/completion/openai-completion\"" + }, + { + "language": "Java", + "code": "client.inference().put(p -> p\n .inferenceId(\"openai-completion\")\n .taskType(TaskType.Completion)\n .inferenceConfig(i -> i\n .service(\"openai\")\n .serviceSettings(JsonData.fromJson(\"{\\\"api_key\\\":\\\"OpenAI-API-Key\\\",\\\"model_id\\\":\\\"gpt-3.5-turbo\\\"}\"))\n )\n);\n" + } + ], + "specification/inference/put_openai/examples/request/PutOpenAiRequestExample2.yaml": [ + { + "language": "Python", + "code": "resp = client.inference.put(\n task_type=\"completion\",\n inference_id=\"amazon_bedrock_completion\",\n inference_config={\n \"service\": \"amazonbedrock\",\n \"service_settings\": {\n \"access_key\": \"AWS-access-key\",\n \"secret_key\": \"AWS-secret-key\",\n \"region\": \"us-east-1\",\n \"provider\": \"amazontitan\",\n \"model\": \"amazon.titan-text-premier-v1:0\"\n }\n },\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.inference.put({\n task_type: \"completion\",\n inference_id: \"amazon_bedrock_completion\",\n inference_config: {\n service: \"amazonbedrock\",\n service_settings: {\n access_key: \"AWS-access-key\",\n secret_key: \"AWS-secret-key\",\n region: \"us-east-1\",\n provider: \"amazontitan\",\n model: \"amazon.titan-text-premier-v1:0\",\n },\n },\n});" + }, + { + "language": "Ruby", + "code": "response = client.inference.put(\n task_type: \"completion\",\n inference_id: \"amazon_bedrock_completion\",\n body: {\n \"service\": \"amazonbedrock\",\n \"service_settings\": {\n \"access_key\": \"AWS-access-key\",\n \"secret_key\": \"AWS-secret-key\",\n \"region\": \"us-east-1\",\n \"provider\": \"amazontitan\",\n \"model\": \"amazon.titan-text-premier-v1:0\"\n }\n }\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->inference()->put([\n \"task_type\" => \"completion\",\n \"inference_id\" => \"amazon_bedrock_completion\",\n \"body\" => [\n \"service\" => \"amazonbedrock\",\n \"service_settings\" => [\n \"access_key\" => \"AWS-access-key\",\n \"secret_key\" => \"AWS-secret-key\",\n \"region\" => \"us-east-1\",\n \"provider\" => \"amazontitan\",\n \"model\" => \"amazon.titan-text-premier-v1:0\",\n ],\n ],\n]);" + }, + { + "language": "curl", + "code": "curl -X PUT -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"service\":\"amazonbedrock\",\"service_settings\":{\"access_key\":\"AWS-access-key\",\"secret_key\":\"AWS-secret-key\",\"region\":\"us-east-1\",\"provider\":\"amazontitan\",\"model\":\"amazon.titan-text-premier-v1:0\"}}' \"$ELASTICSEARCH_URL/_inference/completion/amazon_bedrock_completion\"" + }, + { + "language": "Java", + "code": "client.inference().put(p -> p\n .inferenceId(\"amazon_bedrock_completion\")\n .taskType(TaskType.Completion)\n .inferenceConfig(i -> i\n .service(\"amazonbedrock\")\n .serviceSettings(JsonData.fromJson(\"{\\\"access_key\\\":\\\"AWS-access-key\\\",\\\"secret_key\\\":\\\"AWS-secret-key\\\",\\\"region\\\":\\\"us-east-1\\\",\\\"provider\\\":\\\"amazontitan\\\",\\\"model\\\":\\\"amazon.titan-text-premier-v1:0\\\"}\"))\n )\n);\n" + } + ], + "specification/inference/put_openai/examples/request/PutOpenAiRequestExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.inference.put(\n task_type=\"text_embedding\",\n inference_id=\"openai-embeddings\",\n inference_config={\n \"service\": \"openai\",\n \"service_settings\": {\n \"api_key\": \"OpenAI-API-Key\",\n \"model_id\": \"text-embedding-3-small\",\n \"dimensions\": 128\n }\n },\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.inference.put({\n task_type: \"text_embedding\",\n inference_id: \"openai-embeddings\",\n inference_config: {\n service: \"openai\",\n service_settings: {\n api_key: \"OpenAI-API-Key\",\n model_id: \"text-embedding-3-small\",\n dimensions: 128,\n },\n },\n});" + }, + { + "language": "Ruby", + "code": "response = client.inference.put(\n task_type: \"text_embedding\",\n inference_id: \"openai-embeddings\",\n body: {\n \"service\": \"openai\",\n \"service_settings\": {\n \"api_key\": \"OpenAI-API-Key\",\n \"model_id\": \"text-embedding-3-small\",\n \"dimensions\": 128\n }\n }\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->inference()->put([\n \"task_type\" => \"text_embedding\",\n \"inference_id\" => \"openai-embeddings\",\n \"body\" => [\n \"service\" => \"openai\",\n \"service_settings\" => [\n \"api_key\" => \"OpenAI-API-Key\",\n \"model_id\" => \"text-embedding-3-small\",\n \"dimensions\" => 128,\n ],\n ],\n]);" + }, + { + "language": "curl", + "code": "curl -X PUT -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"service\":\"openai\",\"service_settings\":{\"api_key\":\"OpenAI-API-Key\",\"model_id\":\"text-embedding-3-small\",\"dimensions\":128}}' \"$ELASTICSEARCH_URL/_inference/text_embedding/openai-embeddings\"" + }, + { + "language": "Java", + "code": "client.inference().put(p -> p\n .inferenceId(\"openai-embeddings\")\n .taskType(TaskType.TextEmbedding)\n .inferenceConfig(i -> i\n .service(\"openai\")\n .serviceSettings(JsonData.fromJson(\"{\\\"api_key\\\":\\\"OpenAI-API-Key\\\",\\\"model_id\\\":\\\"text-embedding-3-small\\\",\\\"dimensions\\\":128}\"))\n )\n);\n" + } + ], + "specification/inference/rerank/examples/request/RerankRequestExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.inference.rerank(\n inference_id=\"cohere_rerank\",\n input=[\n \"luke\",\n \"like\",\n \"leia\",\n \"chewy\",\n \"r2d2\",\n \"star\",\n \"wars\"\n ],\n query=\"star wars main character\",\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.inference.rerank({\n inference_id: \"cohere_rerank\",\n input: [\"luke\", \"like\", \"leia\", \"chewy\", \"r2d2\", \"star\", \"wars\"],\n query: \"star wars main character\",\n});" + }, + { + "language": "Ruby", + "code": "response = client.inference.rerank(\n inference_id: \"cohere_rerank\",\n body: {\n \"input\": [\n \"luke\",\n \"like\",\n \"leia\",\n \"chewy\",\n \"r2d2\",\n \"star\",\n \"wars\"\n ],\n \"query\": \"star wars main character\"\n }\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->inference()->rerank([\n \"inference_id\" => \"cohere_rerank\",\n \"body\" => [\n \"input\" => array(\n \"luke\",\n \"like\",\n \"leia\",\n \"chewy\",\n \"r2d2\",\n \"star\",\n \"wars\",\n ),\n \"query\" => \"star wars main character\",\n ],\n]);" + }, + { + "language": "curl", + "code": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"input\":[\"luke\",\"like\",\"leia\",\"chewy\",\"r2d2\",\"star\",\"wars\"],\"query\":\"star wars main character\"}' \"$ELASTICSEARCH_URL/_inference/rerank/cohere_rerank\"" + }, + { + "language": "Java", + "code": "client.inference().rerank(r -> r\n .inferenceId(\"cohere_rerank\")\n .input(List.of(\"luke\",\"like\",\"leia\",\"chewy\",\"r2d2\",\"star\",\"wars\"))\n .query(\"star wars main character\")\n);\n" + } + ], + "specification/inference/rerank/examples/request/RerankRequestExample2.yaml": [ + { + "language": "Python", + "code": "resp = client.inference.rerank(\n inference_id=\"bge-reranker-base-mkn\",\n input=[\n \"luke\",\n \"like\",\n \"leia\",\n \"chewy\",\n \"r2d2\",\n \"star\",\n \"wars\"\n ],\n query=\"star wars main character\",\n return_documents=False,\n top_n=2,\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.inference.rerank({\n inference_id: \"bge-reranker-base-mkn\",\n input: [\"luke\", \"like\", \"leia\", \"chewy\", \"r2d2\", \"star\", \"wars\"],\n query: \"star wars main character\",\n return_documents: false,\n top_n: 2,\n});" + }, + { + "language": "Ruby", + "code": "response = client.inference.rerank(\n inference_id: \"bge-reranker-base-mkn\",\n body: {\n \"input\": [\n \"luke\",\n \"like\",\n \"leia\",\n \"chewy\",\n \"r2d2\",\n \"star\",\n \"wars\"\n ],\n \"query\": \"star wars main character\",\n \"return_documents\": false,\n \"top_n\": 2\n }\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->inference()->rerank([\n \"inference_id\" => \"bge-reranker-base-mkn\",\n \"body\" => [\n \"input\" => array(\n \"luke\",\n \"like\",\n \"leia\",\n \"chewy\",\n \"r2d2\",\n \"star\",\n \"wars\",\n ),\n \"query\" => \"star wars main character\",\n \"return_documents\" => false,\n \"top_n\" => 2,\n ],\n]);" + }, + { + "language": "curl", + "code": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"input\":[\"luke\",\"like\",\"leia\",\"chewy\",\"r2d2\",\"star\",\"wars\"],\"query\":\"star wars main character\",\"return_documents\":false,\"top_n\":2}' \"$ELASTICSEARCH_URL/_inference/rerank/bge-reranker-base-mkn\"" + }, + { + "language": "Java", + "code": "client.inference().rerank(r -> r\n .inferenceId(\"bge-reranker-base-mkn\")\n .input(List.of(\"luke\",\"like\",\"leia\",\"chewy\",\"r2d2\",\"star\",\"wars\"))\n .query(\"star wars main character\")\n);\n" + } + ], + "specification/inference/rerank/examples/request/RerankRequestExample3.yaml": [ + { + "language": "Python", + "code": "resp = client.inference.rerank(\n inference_id=\"bge-reranker-base-mkn\",\n input=[\n \"luke\",\n \"like\",\n \"leia\",\n \"chewy\",\n \"r2d2\",\n \"star\",\n \"wars\"\n ],\n query=\"star wars main character\",\n return_documents=True,\n top_n=3,\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.inference.rerank({\n inference_id: \"bge-reranker-base-mkn\",\n input: [\"luke\", \"like\", \"leia\", \"chewy\", \"r2d2\", \"star\", \"wars\"],\n query: \"star wars main character\",\n return_documents: true,\n top_n: 3,\n});" + }, + { + "language": "Ruby", + "code": "response = client.inference.rerank(\n inference_id: \"bge-reranker-base-mkn\",\n body: {\n \"input\": [\n \"luke\",\n \"like\",\n \"leia\",\n \"chewy\",\n \"r2d2\",\n \"star\",\n \"wars\"\n ],\n \"query\": \"star wars main character\",\n \"return_documents\": true,\n \"top_n\": 3\n }\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->inference()->rerank([\n \"inference_id\" => \"bge-reranker-base-mkn\",\n \"body\" => [\n \"input\" => array(\n \"luke\",\n \"like\",\n \"leia\",\n \"chewy\",\n \"r2d2\",\n \"star\",\n \"wars\",\n ),\n \"query\" => \"star wars main character\",\n \"return_documents\" => true,\n \"top_n\" => 3,\n ],\n]);" + }, + { + "language": "curl", + "code": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"input\":[\"luke\",\"like\",\"leia\",\"chewy\",\"r2d2\",\"star\",\"wars\"],\"query\":\"star wars main character\",\"return_documents\":true,\"top_n\":3}' \"$ELASTICSEARCH_URL/_inference/rerank/bge-reranker-base-mkn\"" + }, + { + "language": "Java", + "code": "client.inference().rerank(r -> r\n .inferenceId(\"bge-reranker-base-mkn\")\n .input(List.of(\"luke\",\"like\",\"leia\",\"chewy\",\"r2d2\",\"star\",\"wars\"))\n .query(\"star wars main character\")\n);\n" + } + ], + "specification/inference/put_alibabacloud/examples/request/PutAlibabaCloudRequestExample4.yaml": [ + { + "language": "Python", + "code": "resp = client.inference.put(\n task_type=\"text_embedding\",\n inference_id=\"alibabacloud_ai_search_embeddings\",\n inference_config={\n \"service\": \"alibabacloud-ai-search\",\n \"service_settings\": {\n \"api_key\": \"AlibabaCloud-API-Key\",\n \"service_id\": \"ops-text-embedding-001\",\n \"host\": \"default-j01.platform-cn-shanghai.opensearch.aliyuncs.com\",\n \"workspace\": \"default\"\n }\n },\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.inference.put({\n task_type: \"text_embedding\",\n inference_id: \"alibabacloud_ai_search_embeddings\",\n inference_config: {\n service: \"alibabacloud-ai-search\",\n service_settings: {\n api_key: \"AlibabaCloud-API-Key\",\n service_id: \"ops-text-embedding-001\",\n host: \"default-j01.platform-cn-shanghai.opensearch.aliyuncs.com\",\n workspace: \"default\",\n },\n },\n});" + }, + { + "language": "Ruby", + "code": "response = client.inference.put(\n task_type: \"text_embedding\",\n inference_id: \"alibabacloud_ai_search_embeddings\",\n body: {\n \"service\": \"alibabacloud-ai-search\",\n \"service_settings\": {\n \"api_key\": \"AlibabaCloud-API-Key\",\n \"service_id\": \"ops-text-embedding-001\",\n \"host\": \"default-j01.platform-cn-shanghai.opensearch.aliyuncs.com\",\n \"workspace\": \"default\"\n }\n }\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->inference()->put([\n \"task_type\" => \"text_embedding\",\n \"inference_id\" => \"alibabacloud_ai_search_embeddings\",\n \"body\" => [\n \"service\" => \"alibabacloud-ai-search\",\n \"service_settings\" => [\n \"api_key\" => \"AlibabaCloud-API-Key\",\n \"service_id\" => \"ops-text-embedding-001\",\n \"host\" => \"default-j01.platform-cn-shanghai.opensearch.aliyuncs.com\",\n \"workspace\" => \"default\",\n ],\n ],\n]);" + }, + { + "language": "curl", + "code": "curl -X PUT -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"service\":\"alibabacloud-ai-search\",\"service_settings\":{\"api_key\":\"AlibabaCloud-API-Key\",\"service_id\":\"ops-text-embedding-001\",\"host\":\"default-j01.platform-cn-shanghai.opensearch.aliyuncs.com\",\"workspace\":\"default\"}}' \"$ELASTICSEARCH_URL/_inference/text_embedding/alibabacloud_ai_search_embeddings\"" + }, + { + "language": "Java", + "code": "client.inference().put(p -> p\n .inferenceId(\"alibabacloud_ai_search_embeddings\")\n .taskType(TaskType.TextEmbedding)\n .inferenceConfig(i -> i\n .service(\"alibabacloud-ai-search\")\n .serviceSettings(JsonData.fromJson(\"{\\\"api_key\\\":\\\"AlibabaCloud-API-Key\\\",\\\"service_id\\\":\\\"ops-text-embedding-001\\\",\\\"host\\\":\\\"default-j01.platform-cn-shanghai.opensearch.aliyuncs.com\\\",\\\"workspace\\\":\\\"default\\\"}\"))\n )\n);\n" + } + ], + "specification/inference/put_alibabacloud/examples/request/PutAlibabaCloudRequestExample3.yaml": [ + { + "language": "Python", + "code": "resp = client.inference.put(\n task_type=\"sparse_embedding\",\n inference_id=\"alibabacloud_ai_search_sparse\",\n inference_config={\n \"service\": \"alibabacloud-ai-search\",\n \"service_settings\": {\n \"api_key\": \"AlibabaCloud-API-Key\",\n \"service_id\": \"ops-text-sparse-embedding-001\",\n \"host\": \"default-j01.platform-cn-shanghai.opensearch.aliyuncs.com\",\n \"workspace\": \"default\"\n }\n },\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.inference.put({\n task_type: \"sparse_embedding\",\n inference_id: \"alibabacloud_ai_search_sparse\",\n inference_config: {\n service: \"alibabacloud-ai-search\",\n service_settings: {\n api_key: \"AlibabaCloud-API-Key\",\n service_id: \"ops-text-sparse-embedding-001\",\n host: \"default-j01.platform-cn-shanghai.opensearch.aliyuncs.com\",\n workspace: \"default\",\n },\n },\n});" + }, + { + "language": "Ruby", + "code": "response = client.inference.put(\n task_type: \"sparse_embedding\",\n inference_id: \"alibabacloud_ai_search_sparse\",\n body: {\n \"service\": \"alibabacloud-ai-search\",\n \"service_settings\": {\n \"api_key\": \"AlibabaCloud-API-Key\",\n \"service_id\": \"ops-text-sparse-embedding-001\",\n \"host\": \"default-j01.platform-cn-shanghai.opensearch.aliyuncs.com\",\n \"workspace\": \"default\"\n }\n }\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->inference()->put([\n \"task_type\" => \"sparse_embedding\",\n \"inference_id\" => \"alibabacloud_ai_search_sparse\",\n \"body\" => [\n \"service\" => \"alibabacloud-ai-search\",\n \"service_settings\" => [\n \"api_key\" => \"AlibabaCloud-API-Key\",\n \"service_id\" => \"ops-text-sparse-embedding-001\",\n \"host\" => \"default-j01.platform-cn-shanghai.opensearch.aliyuncs.com\",\n \"workspace\" => \"default\",\n ],\n ],\n]);" + }, + { + "language": "curl", + "code": "curl -X PUT -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"service\":\"alibabacloud-ai-search\",\"service_settings\":{\"api_key\":\"AlibabaCloud-API-Key\",\"service_id\":\"ops-text-sparse-embedding-001\",\"host\":\"default-j01.platform-cn-shanghai.opensearch.aliyuncs.com\",\"workspace\":\"default\"}}' \"$ELASTICSEARCH_URL/_inference/sparse_embedding/alibabacloud_ai_search_sparse\"" + }, + { + "language": "Java", + "code": "client.inference().put(p -> p\n .inferenceId(\"alibabacloud_ai_search_sparse\")\n .taskType(TaskType.SparseEmbedding)\n .inferenceConfig(i -> i\n .service(\"alibabacloud-ai-search\")\n .serviceSettings(JsonData.fromJson(\"{\\\"api_key\\\":\\\"AlibabaCloud-API-Key\\\",\\\"service_id\\\":\\\"ops-text-sparse-embedding-001\\\",\\\"host\\\":\\\"default-j01.platform-cn-shanghai.opensearch.aliyuncs.com\\\",\\\"workspace\\\":\\\"default\\\"}\"))\n )\n);\n" + } + ], + "specification/inference/put_alibabacloud/examples/request/PutAlibabaCloudRequestExample2.yaml": [ + { + "language": "Python", + "code": "resp = client.inference.put(\n task_type=\"rerank\",\n inference_id=\"alibabacloud_ai_search_rerank\",\n inference_config={\n \"service\": \"alibabacloud-ai-search\",\n \"service_settings\": {\n \"api_key\": \"AlibabaCloud-API-Key\",\n \"service_id\": \"ops-bge-reranker-larger\",\n \"host\": \"default-j01.platform-cn-shanghai.opensearch.aliyuncs.com\",\n \"workspace\": \"default\"\n }\n },\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.inference.put({\n task_type: \"rerank\",\n inference_id: \"alibabacloud_ai_search_rerank\",\n inference_config: {\n service: \"alibabacloud-ai-search\",\n service_settings: {\n api_key: \"AlibabaCloud-API-Key\",\n service_id: \"ops-bge-reranker-larger\",\n host: \"default-j01.platform-cn-shanghai.opensearch.aliyuncs.com\",\n workspace: \"default\",\n },\n },\n});" + }, + { + "language": "Ruby", + "code": "response = client.inference.put(\n task_type: \"rerank\",\n inference_id: \"alibabacloud_ai_search_rerank\",\n body: {\n \"service\": \"alibabacloud-ai-search\",\n \"service_settings\": {\n \"api_key\": \"AlibabaCloud-API-Key\",\n \"service_id\": \"ops-bge-reranker-larger\",\n \"host\": \"default-j01.platform-cn-shanghai.opensearch.aliyuncs.com\",\n \"workspace\": \"default\"\n }\n }\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->inference()->put([\n \"task_type\" => \"rerank\",\n \"inference_id\" => \"alibabacloud_ai_search_rerank\",\n \"body\" => [\n \"service\" => \"alibabacloud-ai-search\",\n \"service_settings\" => [\n \"api_key\" => \"AlibabaCloud-API-Key\",\n \"service_id\" => \"ops-bge-reranker-larger\",\n \"host\" => \"default-j01.platform-cn-shanghai.opensearch.aliyuncs.com\",\n \"workspace\" => \"default\",\n ],\n ],\n]);" + }, + { + "language": "curl", + "code": "curl -X PUT -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"service\":\"alibabacloud-ai-search\",\"service_settings\":{\"api_key\":\"AlibabaCloud-API-Key\",\"service_id\":\"ops-bge-reranker-larger\",\"host\":\"default-j01.platform-cn-shanghai.opensearch.aliyuncs.com\",\"workspace\":\"default\"}}' \"$ELASTICSEARCH_URL/_inference/rerank/alibabacloud_ai_search_rerank\"" + }, + { + "language": "Java", + "code": "client.inference().put(p -> p\n .inferenceId(\"alibabacloud_ai_search_rerank\")\n .taskType(TaskType.Rerank)\n .inferenceConfig(i -> i\n .service(\"alibabacloud-ai-search\")\n .serviceSettings(JsonData.fromJson(\"{\\\"api_key\\\":\\\"AlibabaCloud-API-Key\\\",\\\"service_id\\\":\\\"ops-bge-reranker-larger\\\",\\\"host\\\":\\\"default-j01.platform-cn-shanghai.opensearch.aliyuncs.com\\\",\\\"workspace\\\":\\\"default\\\"}\"))\n )\n);\n" + } + ], + "specification/inference/put_alibabacloud/examples/request/PutAlibabaCloudRequestExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.inference.put(\n task_type=\"completion\",\n inference_id=\"alibabacloud_ai_search_completion\",\n inference_config={\n \"service\": \"alibabacloud-ai-search\",\n \"service_settings\": {\n \"host\": \"default-j01.platform-cn-shanghai.opensearch.aliyuncs.com\",\n \"api_key\": \"AlibabaCloud-API-Key\",\n \"service_id\": \"ops-qwen-turbo\",\n \"workspace\": \"default\"\n }\n },\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.inference.put({\n task_type: \"completion\",\n inference_id: \"alibabacloud_ai_search_completion\",\n inference_config: {\n service: \"alibabacloud-ai-search\",\n service_settings: {\n host: \"default-j01.platform-cn-shanghai.opensearch.aliyuncs.com\",\n api_key: \"AlibabaCloud-API-Key\",\n service_id: \"ops-qwen-turbo\",\n workspace: \"default\",\n },\n },\n});" + }, + { + "language": "Ruby", + "code": "response = client.inference.put(\n task_type: \"completion\",\n inference_id: \"alibabacloud_ai_search_completion\",\n body: {\n \"service\": \"alibabacloud-ai-search\",\n \"service_settings\": {\n \"host\": \"default-j01.platform-cn-shanghai.opensearch.aliyuncs.com\",\n \"api_key\": \"AlibabaCloud-API-Key\",\n \"service_id\": \"ops-qwen-turbo\",\n \"workspace\": \"default\"\n }\n }\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->inference()->put([\n \"task_type\" => \"completion\",\n \"inference_id\" => \"alibabacloud_ai_search_completion\",\n \"body\" => [\n \"service\" => \"alibabacloud-ai-search\",\n \"service_settings\" => [\n \"host\" => \"default-j01.platform-cn-shanghai.opensearch.aliyuncs.com\",\n \"api_key\" => \"AlibabaCloud-API-Key\",\n \"service_id\" => \"ops-qwen-turbo\",\n \"workspace\" => \"default\",\n ],\n ],\n]);" + }, + { + "language": "curl", + "code": "curl -X PUT -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"service\":\"alibabacloud-ai-search\",\"service_settings\":{\"host\":\"default-j01.platform-cn-shanghai.opensearch.aliyuncs.com\",\"api_key\":\"AlibabaCloud-API-Key\",\"service_id\":\"ops-qwen-turbo\",\"workspace\":\"default\"}}' \"$ELASTICSEARCH_URL/_inference/completion/alibabacloud_ai_search_completion\"" + }, + { + "language": "Java", + "code": "client.inference().put(p -> p\n .inferenceId(\"alibabacloud_ai_search_completion\")\n .taskType(TaskType.Completion)\n .inferenceConfig(i -> i\n .service(\"alibabacloud-ai-search\")\n .serviceSettings(JsonData.fromJson(\"{\\\"host\\\":\\\"default-j01.platform-cn-shanghai.opensearch.aliyuncs.com\\\",\\\"api_key\\\":\\\"AlibabaCloud-API-Key\\\",\\\"service_id\\\":\\\"ops-qwen-turbo\\\",\\\"workspace\\\":\\\"default\\\"}\"))\n )\n);\n" + } + ], + "specification/inference/put_azureopenai/examples/request/PutAzureOpenAiRequestExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.inference.put(\n task_type=\"text_embedding\",\n inference_id=\"azure_openai_embeddings\",\n inference_config={\n \"service\": \"azureopenai\",\n \"service_settings\": {\n \"api_key\": \"Api-Key\",\n \"resource_name\": \"Resource-name\",\n \"deployment_id\": \"Deployment-id\",\n \"api_version\": \"2024-02-01\"\n }\n },\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.inference.put({\n task_type: \"text_embedding\",\n inference_id: \"azure_openai_embeddings\",\n inference_config: {\n service: \"azureopenai\",\n service_settings: {\n api_key: \"Api-Key\",\n resource_name: \"Resource-name\",\n deployment_id: \"Deployment-id\",\n api_version: \"2024-02-01\",\n },\n },\n});" + }, + { + "language": "Ruby", + "code": "response = client.inference.put(\n task_type: \"text_embedding\",\n inference_id: \"azure_openai_embeddings\",\n body: {\n \"service\": \"azureopenai\",\n \"service_settings\": {\n \"api_key\": \"Api-Key\",\n \"resource_name\": \"Resource-name\",\n \"deployment_id\": \"Deployment-id\",\n \"api_version\": \"2024-02-01\"\n }\n }\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->inference()->put([\n \"task_type\" => \"text_embedding\",\n \"inference_id\" => \"azure_openai_embeddings\",\n \"body\" => [\n \"service\" => \"azureopenai\",\n \"service_settings\" => [\n \"api_key\" => \"Api-Key\",\n \"resource_name\" => \"Resource-name\",\n \"deployment_id\" => \"Deployment-id\",\n \"api_version\" => \"2024-02-01\",\n ],\n ],\n]);" + }, + { + "language": "curl", + "code": "curl -X PUT -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"service\":\"azureopenai\",\"service_settings\":{\"api_key\":\"Api-Key\",\"resource_name\":\"Resource-name\",\"deployment_id\":\"Deployment-id\",\"api_version\":\"2024-02-01\"}}' \"$ELASTICSEARCH_URL/_inference/text_embedding/azure_openai_embeddings\"" + }, + { + "language": "Java", + "code": "client.inference().put(p -> p\n .inferenceId(\"azure_openai_embeddings\")\n .taskType(TaskType.TextEmbedding)\n .inferenceConfig(i -> i\n .service(\"azureopenai\")\n .serviceSettings(JsonData.fromJson(\"{\\\"api_key\\\":\\\"Api-Key\\\",\\\"resource_name\\\":\\\"Resource-name\\\",\\\"deployment_id\\\":\\\"Deployment-id\\\",\\\"api_version\\\":\\\"2024-02-01\\\"}\"))\n )\n);\n" + } + ], + "specification/inference/put_azureopenai/examples/request/PutAzureOpenAiRequestExample2.yaml": [ + { + "language": "Python", + "code": "resp = client.inference.put(\n task_type=\"completion\",\n inference_id=\"azure_openai_completion\",\n inference_config={\n \"service\": \"azureopenai\",\n \"service_settings\": {\n \"api_key\": \"Api-Key\",\n \"resource_name\": \"Resource-name\",\n \"deployment_id\": \"Deployment-id\",\n \"api_version\": \"2024-02-01\"\n }\n },\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.inference.put({\n task_type: \"completion\",\n inference_id: \"azure_openai_completion\",\n inference_config: {\n service: \"azureopenai\",\n service_settings: {\n api_key: \"Api-Key\",\n resource_name: \"Resource-name\",\n deployment_id: \"Deployment-id\",\n api_version: \"2024-02-01\",\n },\n },\n});" + }, + { + "language": "Ruby", + "code": "response = client.inference.put(\n task_type: \"completion\",\n inference_id: \"azure_openai_completion\",\n body: {\n \"service\": \"azureopenai\",\n \"service_settings\": {\n \"api_key\": \"Api-Key\",\n \"resource_name\": \"Resource-name\",\n \"deployment_id\": \"Deployment-id\",\n \"api_version\": \"2024-02-01\"\n }\n }\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->inference()->put([\n \"task_type\" => \"completion\",\n \"inference_id\" => \"azure_openai_completion\",\n \"body\" => [\n \"service\" => \"azureopenai\",\n \"service_settings\" => [\n \"api_key\" => \"Api-Key\",\n \"resource_name\" => \"Resource-name\",\n \"deployment_id\" => \"Deployment-id\",\n \"api_version\" => \"2024-02-01\",\n ],\n ],\n]);" + }, + { + "language": "curl", + "code": "curl -X PUT -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"service\":\"azureopenai\",\"service_settings\":{\"api_key\":\"Api-Key\",\"resource_name\":\"Resource-name\",\"deployment_id\":\"Deployment-id\",\"api_version\":\"2024-02-01\"}}' \"$ELASTICSEARCH_URL/_inference/completion/azure_openai_completion\"" + }, + { + "language": "Java", + "code": "client.inference().put(p -> p\n .inferenceId(\"azure_openai_completion\")\n .taskType(TaskType.Completion)\n .inferenceConfig(i -> i\n .service(\"azureopenai\")\n .serviceSettings(JsonData.fromJson(\"{\\\"api_key\\\":\\\"Api-Key\\\",\\\"resource_name\\\":\\\"Resource-name\\\",\\\"deployment_id\\\":\\\"Deployment-id\\\",\\\"api_version\\\":\\\"2024-02-01\\\"}\"))\n )\n);\n" + } + ], + "specification/inference/stream_completion/examples/request/StreamInferenceRequestExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.inference.stream_completion(\n inference_id=\"openai-completion\",\n input=\"What is Elastic?\",\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.inference.streamCompletion({\n inference_id: \"openai-completion\",\n input: \"What is Elastic?\",\n});" + }, + { + "language": "Ruby", + "code": "response = client.inference.stream_completion(\n inference_id: \"openai-completion\",\n body: {\n \"input\": \"What is Elastic?\"\n }\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->inference()->streamCompletion([\n \"inference_id\" => \"openai-completion\",\n \"body\" => [\n \"input\" => \"What is Elastic?\",\n ],\n]);" + }, + { + "language": "curl", + "code": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"input\":\"What is Elastic?\"}' \"$ELASTICSEARCH_URL/_inference/completion/openai-completion/_stream\"" + }, + { + "language": "Java", + "code": "client.inference().streamCompletion(s -> s\n .inferenceId(\"openai-completion\")\n .input(\"What is Elastic?\")\n);\n" + } + ], + "specification/inference/put_elasticsearch/examples/request/PutElasticsearchRequestExample5.yaml": [ + { + "language": "Python", + "code": "resp = client.inference.put(\n task_type=\"text_embedding\",\n inference_id=\"my-e5-model\",\n inference_config={\n \"service\": \"elasticsearch\",\n \"service_settings\": {\n \"adaptive_allocations\": {\n \"enabled\": True,\n \"min_number_of_allocations\": 3,\n \"max_number_of_allocations\": 10\n },\n \"num_threads\": 1,\n \"model_id\": \".multilingual-e5-small\"\n }\n },\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.inference.put({\n task_type: \"text_embedding\",\n inference_id: \"my-e5-model\",\n inference_config: {\n service: \"elasticsearch\",\n service_settings: {\n adaptive_allocations: {\n enabled: true,\n min_number_of_allocations: 3,\n max_number_of_allocations: 10,\n },\n num_threads: 1,\n model_id: \".multilingual-e5-small\",\n },\n },\n});" + }, + { + "language": "Ruby", + "code": "response = client.inference.put(\n task_type: \"text_embedding\",\n inference_id: \"my-e5-model\",\n body: {\n \"service\": \"elasticsearch\",\n \"service_settings\": {\n \"adaptive_allocations\": {\n \"enabled\": true,\n \"min_number_of_allocations\": 3,\n \"max_number_of_allocations\": 10\n },\n \"num_threads\": 1,\n \"model_id\": \".multilingual-e5-small\"\n }\n }\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->inference()->put([\n \"task_type\" => \"text_embedding\",\n \"inference_id\" => \"my-e5-model\",\n \"body\" => [\n \"service\" => \"elasticsearch\",\n \"service_settings\" => [\n \"adaptive_allocations\" => [\n \"enabled\" => true,\n \"min_number_of_allocations\" => 3,\n \"max_number_of_allocations\" => 10,\n ],\n \"num_threads\" => 1,\n \"model_id\" => \".multilingual-e5-small\",\n ],\n ],\n]);" + }, + { + "language": "curl", + "code": "curl -X PUT -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"service\":\"elasticsearch\",\"service_settings\":{\"adaptive_allocations\":{\"enabled\":true,\"min_number_of_allocations\":3,\"max_number_of_allocations\":10},\"num_threads\":1,\"model_id\":\".multilingual-e5-small\"}}' \"$ELASTICSEARCH_URL/_inference/text_embedding/my-e5-model\"" + }, + { + "language": "Java", + "code": "client.inference().put(p -> p\n .inferenceId(\"my-e5-model\")\n .taskType(TaskType.TextEmbedding)\n .inferenceConfig(i -> i\n .service(\"elasticsearch\")\n .serviceSettings(JsonData.fromJson(\"{\\\"adaptive_allocations\\\":{\\\"enabled\\\":true,\\\"min_number_of_allocations\\\":3,\\\"max_number_of_allocations\\\":10},\\\"num_threads\\\":1,\\\"model_id\\\":\\\".multilingual-e5-small\\\"}\"))\n )\n);\n" + } + ], + "specification/inference/put_elasticsearch/examples/request/PutElasticsearchRequestExample4.yaml": [ + { + "language": "Python", + "code": "resp = client.inference.put(\n task_type=\"text_embedding\",\n inference_id=\"my-msmarco-minilm-model\",\n inference_config={\n \"service\": \"elasticsearch\",\n \"service_settings\": {\n \"num_allocations\": 1,\n \"num_threads\": 1,\n \"model_id\": \"msmarco-MiniLM-L12-cos-v5\"\n }\n },\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.inference.put({\n task_type: \"text_embedding\",\n inference_id: \"my-msmarco-minilm-model\",\n inference_config: {\n service: \"elasticsearch\",\n service_settings: {\n num_allocations: 1,\n num_threads: 1,\n model_id: \"msmarco-MiniLM-L12-cos-v5\",\n },\n },\n});" + }, + { + "language": "Ruby", + "code": "response = client.inference.put(\n task_type: \"text_embedding\",\n inference_id: \"my-msmarco-minilm-model\",\n body: {\n \"service\": \"elasticsearch\",\n \"service_settings\": {\n \"num_allocations\": 1,\n \"num_threads\": 1,\n \"model_id\": \"msmarco-MiniLM-L12-cos-v5\"\n }\n }\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->inference()->put([\n \"task_type\" => \"text_embedding\",\n \"inference_id\" => \"my-msmarco-minilm-model\",\n \"body\" => [\n \"service\" => \"elasticsearch\",\n \"service_settings\" => [\n \"num_allocations\" => 1,\n \"num_threads\" => 1,\n \"model_id\" => \"msmarco-MiniLM-L12-cos-v5\",\n ],\n ],\n]);" + }, + { + "language": "curl", + "code": "curl -X PUT -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"service\":\"elasticsearch\",\"service_settings\":{\"num_allocations\":1,\"num_threads\":1,\"model_id\":\"msmarco-MiniLM-L12-cos-v5\"}}' \"$ELASTICSEARCH_URL/_inference/text_embedding/my-msmarco-minilm-model\"" + }, + { + "language": "Java", + "code": "client.inference().put(p -> p\n .inferenceId(\"my-msmarco-minilm-model\")\n .taskType(TaskType.TextEmbedding)\n .inferenceConfig(i -> i\n .service(\"elasticsearch\")\n .serviceSettings(JsonData.fromJson(\"{\\\"num_allocations\\\":1,\\\"num_threads\\\":1,\\\"model_id\\\":\\\"msmarco-MiniLM-L12-cos-v5\\\"}\"))\n )\n);\n" + } + ], + "specification/inference/put_elasticsearch/examples/request/PutElasticsearchRequestExample3.yaml": [ + { + "language": "Python", + "code": "resp = client.inference.put(\n task_type=\"text_embedding\",\n inference_id=\"my-e5-model\",\n inference_config={\n \"service\": \"elasticsearch\",\n \"service_settings\": {\n \"num_allocations\": 1,\n \"num_threads\": 1,\n \"model_id\": \".multilingual-e5-small\"\n }\n },\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.inference.put({\n task_type: \"text_embedding\",\n inference_id: \"my-e5-model\",\n inference_config: {\n service: \"elasticsearch\",\n service_settings: {\n num_allocations: 1,\n num_threads: 1,\n model_id: \".multilingual-e5-small\",\n },\n },\n});" + }, + { + "language": "Ruby", + "code": "response = client.inference.put(\n task_type: \"text_embedding\",\n inference_id: \"my-e5-model\",\n body: {\n \"service\": \"elasticsearch\",\n \"service_settings\": {\n \"num_allocations\": 1,\n \"num_threads\": 1,\n \"model_id\": \".multilingual-e5-small\"\n }\n }\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->inference()->put([\n \"task_type\" => \"text_embedding\",\n \"inference_id\" => \"my-e5-model\",\n \"body\" => [\n \"service\" => \"elasticsearch\",\n \"service_settings\" => [\n \"num_allocations\" => 1,\n \"num_threads\" => 1,\n \"model_id\" => \".multilingual-e5-small\",\n ],\n ],\n]);" + }, + { + "language": "curl", + "code": "curl -X PUT -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"service\":\"elasticsearch\",\"service_settings\":{\"num_allocations\":1,\"num_threads\":1,\"model_id\":\".multilingual-e5-small\"}}' \"$ELASTICSEARCH_URL/_inference/text_embedding/my-e5-model\"" + }, + { + "language": "Java", + "code": "client.inference().put(p -> p\n .inferenceId(\"my-e5-model\")\n .taskType(TaskType.TextEmbedding)\n .inferenceConfig(i -> i\n .service(\"elasticsearch\")\n .serviceSettings(JsonData.fromJson(\"{\\\"num_allocations\\\":1,\\\"num_threads\\\":1,\\\"model_id\\\":\\\".multilingual-e5-small\\\"}\"))\n )\n);\n" + } + ], + "specification/inference/put_elasticsearch/examples/request/PutElasticsearchRequestExample2.yaml": [ + { + "language": "Python", + "code": "resp = client.inference.put(\n task_type=\"rerank\",\n inference_id=\"my-elastic-rerank\",\n inference_config={\n \"service\": \"elasticsearch\",\n \"service_settings\": {\n \"model_id\": \".rerank-v1\",\n \"num_threads\": 1,\n \"adaptive_allocations\": {\n \"enabled\": True,\n \"min_number_of_allocations\": 1,\n \"max_number_of_allocations\": 4\n }\n }\n },\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.inference.put({\n task_type: \"rerank\",\n inference_id: \"my-elastic-rerank\",\n inference_config: {\n service: \"elasticsearch\",\n service_settings: {\n model_id: \".rerank-v1\",\n num_threads: 1,\n adaptive_allocations: {\n enabled: true,\n min_number_of_allocations: 1,\n max_number_of_allocations: 4,\n },\n },\n },\n});" + }, + { + "language": "Ruby", + "code": "response = client.inference.put(\n task_type: \"rerank\",\n inference_id: \"my-elastic-rerank\",\n body: {\n \"service\": \"elasticsearch\",\n \"service_settings\": {\n \"model_id\": \".rerank-v1\",\n \"num_threads\": 1,\n \"adaptive_allocations\": {\n \"enabled\": true,\n \"min_number_of_allocations\": 1,\n \"max_number_of_allocations\": 4\n }\n }\n }\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->inference()->put([\n \"task_type\" => \"rerank\",\n \"inference_id\" => \"my-elastic-rerank\",\n \"body\" => [\n \"service\" => \"elasticsearch\",\n \"service_settings\" => [\n \"model_id\" => \".rerank-v1\",\n \"num_threads\" => 1,\n \"adaptive_allocations\" => [\n \"enabled\" => true,\n \"min_number_of_allocations\" => 1,\n \"max_number_of_allocations\" => 4,\n ],\n ],\n ],\n]);" + }, + { + "language": "curl", + "code": "curl -X PUT -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"service\":\"elasticsearch\",\"service_settings\":{\"model_id\":\".rerank-v1\",\"num_threads\":1,\"adaptive_allocations\":{\"enabled\":true,\"min_number_of_allocations\":1,\"max_number_of_allocations\":4}}}' \"$ELASTICSEARCH_URL/_inference/rerank/my-elastic-rerank\"" + }, + { + "language": "Java", + "code": "client.inference().put(p -> p\n .inferenceId(\"my-elastic-rerank\")\n .taskType(TaskType.Rerank)\n .inferenceConfig(i -> i\n .service(\"elasticsearch\")\n .serviceSettings(JsonData.fromJson(\"{\\\"model_id\\\":\\\".rerank-v1\\\",\\\"num_threads\\\":1,\\\"adaptive_allocations\\\":{\\\"enabled\\\":true,\\\"min_number_of_allocations\\\":1,\\\"max_number_of_allocations\\\":4}}\"))\n )\n);\n" + } + ], + "specification/inference/put_elasticsearch/examples/request/PutElasticsearchRequestExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.inference.put(\n task_type=\"sparse_embedding\",\n inference_id=\"my-elser-model\",\n inference_config={\n \"service\": \"elasticsearch\",\n \"service_settings\": {\n \"adaptive_allocations\": {\n \"enabled\": True,\n \"min_number_of_allocations\": 1,\n \"max_number_of_allocations\": 4\n },\n \"num_threads\": 1,\n \"model_id\": \".elser_model_2\"\n }\n },\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.inference.put({\n task_type: \"sparse_embedding\",\n inference_id: \"my-elser-model\",\n inference_config: {\n service: \"elasticsearch\",\n service_settings: {\n adaptive_allocations: {\n enabled: true,\n min_number_of_allocations: 1,\n max_number_of_allocations: 4,\n },\n num_threads: 1,\n model_id: \".elser_model_2\",\n },\n },\n});" + }, + { + "language": "Ruby", + "code": "response = client.inference.put(\n task_type: \"sparse_embedding\",\n inference_id: \"my-elser-model\",\n body: {\n \"service\": \"elasticsearch\",\n \"service_settings\": {\n \"adaptive_allocations\": {\n \"enabled\": true,\n \"min_number_of_allocations\": 1,\n \"max_number_of_allocations\": 4\n },\n \"num_threads\": 1,\n \"model_id\": \".elser_model_2\"\n }\n }\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->inference()->put([\n \"task_type\" => \"sparse_embedding\",\n \"inference_id\" => \"my-elser-model\",\n \"body\" => [\n \"service\" => \"elasticsearch\",\n \"service_settings\" => [\n \"adaptive_allocations\" => [\n \"enabled\" => true,\n \"min_number_of_allocations\" => 1,\n \"max_number_of_allocations\" => 4,\n ],\n \"num_threads\" => 1,\n \"model_id\" => \".elser_model_2\",\n ],\n ],\n]);" + }, + { + "language": "curl", + "code": "curl -X PUT -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"service\":\"elasticsearch\",\"service_settings\":{\"adaptive_allocations\":{\"enabled\":true,\"min_number_of_allocations\":1,\"max_number_of_allocations\":4},\"num_threads\":1,\"model_id\":\".elser_model_2\"}}' \"$ELASTICSEARCH_URL/_inference/sparse_embedding/my-elser-model\"" + }, + { + "language": "Java", + "code": "client.inference().put(p -> p\n .inferenceId(\"my-elser-model\")\n .taskType(TaskType.SparseEmbedding)\n .inferenceConfig(i -> i\n .service(\"elasticsearch\")\n .serviceSettings(JsonData.fromJson(\"{\\\"adaptive_allocations\\\":{\\\"enabled\\\":true,\\\"min_number_of_allocations\\\":1,\\\"max_number_of_allocations\\\":4},\\\"num_threads\\\":1,\\\"model_id\\\":\\\".elser_model_2\\\"}\"))\n )\n);\n" + } + ], + "specification/inference/put_elasticsearch/examples/request/PutElasticsearchRequestExample6.yaml": [ + { + "language": "Python", + "code": "resp = client.inference.put(\n task_type=\"sparse_embedding\",\n inference_id=\"use_existing_deployment\",\n inference_config={\n \"service\": \"elasticsearch\",\n \"service_settings\": {\n \"deployment_id\": \".elser_model_2\"\n }\n },\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.inference.put({\n task_type: \"sparse_embedding\",\n inference_id: \"use_existing_deployment\",\n inference_config: {\n service: \"elasticsearch\",\n service_settings: {\n deployment_id: \".elser_model_2\",\n },\n },\n});" + }, + { + "language": "Ruby", + "code": "response = client.inference.put(\n task_type: \"sparse_embedding\",\n inference_id: \"use_existing_deployment\",\n body: {\n \"service\": \"elasticsearch\",\n \"service_settings\": {\n \"deployment_id\": \".elser_model_2\"\n }\n }\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->inference()->put([\n \"task_type\" => \"sparse_embedding\",\n \"inference_id\" => \"use_existing_deployment\",\n \"body\" => [\n \"service\" => \"elasticsearch\",\n \"service_settings\" => [\n \"deployment_id\" => \".elser_model_2\",\n ],\n ],\n]);" + }, + { + "language": "curl", + "code": "curl -X PUT -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"service\":\"elasticsearch\",\"service_settings\":{\"deployment_id\":\".elser_model_2\"}}' \"$ELASTICSEARCH_URL/_inference/sparse_embedding/use_existing_deployment\"" + }, + { + "language": "Java", + "code": "client.inference().put(p -> p\n .inferenceId(\"use_existing_deployment\")\n .taskType(TaskType.SparseEmbedding)\n .inferenceConfig(i -> i\n .service(\"elasticsearch\")\n .serviceSettings(JsonData.fromJson(\"{\\\"deployment_id\\\":\\\".elser_model_2\\\"}\"))\n )\n);\n" + } + ], + "specification/inference/put_azureaistudio/examples/request/PutAzureAiStudioRequestExample2.yaml": [ + { + "language": "Python", + "code": "resp = client.inference.put(\n task_type=\"completion\",\n inference_id=\"azure_ai_studio_completion\",\n inference_config={\n \"service\": \"azureaistudio\",\n \"service_settings\": {\n \"api_key\": \"Azure-AI-Studio-API-key\",\n \"target\": \"Target-URI\",\n \"provider\": \"databricks\",\n \"endpoint_type\": \"realtime\"\n }\n },\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.inference.put({\n task_type: \"completion\",\n inference_id: \"azure_ai_studio_completion\",\n inference_config: {\n service: \"azureaistudio\",\n service_settings: {\n api_key: \"Azure-AI-Studio-API-key\",\n target: \"Target-URI\",\n provider: \"databricks\",\n endpoint_type: \"realtime\",\n },\n },\n});" + }, + { + "language": "Ruby", + "code": "response = client.inference.put(\n task_type: \"completion\",\n inference_id: \"azure_ai_studio_completion\",\n body: {\n \"service\": \"azureaistudio\",\n \"service_settings\": {\n \"api_key\": \"Azure-AI-Studio-API-key\",\n \"target\": \"Target-URI\",\n \"provider\": \"databricks\",\n \"endpoint_type\": \"realtime\"\n }\n }\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->inference()->put([\n \"task_type\" => \"completion\",\n \"inference_id\" => \"azure_ai_studio_completion\",\n \"body\" => [\n \"service\" => \"azureaistudio\",\n \"service_settings\" => [\n \"api_key\" => \"Azure-AI-Studio-API-key\",\n \"target\" => \"Target-URI\",\n \"provider\" => \"databricks\",\n \"endpoint_type\" => \"realtime\",\n ],\n ],\n]);" + }, + { + "language": "curl", + "code": "curl -X PUT -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"service\":\"azureaistudio\",\"service_settings\":{\"api_key\":\"Azure-AI-Studio-API-key\",\"target\":\"Target-URI\",\"provider\":\"databricks\",\"endpoint_type\":\"realtime\"}}' \"$ELASTICSEARCH_URL/_inference/completion/azure_ai_studio_completion\"" + }, + { + "language": "Java", + "code": "client.inference().put(p -> p\n .inferenceId(\"azure_ai_studio_completion\")\n .taskType(TaskType.Completion)\n .inferenceConfig(i -> i\n .service(\"azureaistudio\")\n .serviceSettings(JsonData.fromJson(\"{\\\"api_key\\\":\\\"Azure-AI-Studio-API-key\\\",\\\"target\\\":\\\"Target-URI\\\",\\\"provider\\\":\\\"databricks\\\",\\\"endpoint_type\\\":\\\"realtime\\\"}\"))\n )\n);\n" + } + ], + "specification/inference/put_azureaistudio/examples/request/PutAzureAiStudioRequestExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.inference.put(\n task_type=\"text_embedding\",\n inference_id=\"azure_ai_studio_embeddings\",\n inference_config={\n \"service\": \"azureaistudio\",\n \"service_settings\": {\n \"api_key\": \"Azure-AI-Studio-API-key\",\n \"target\": \"Target-Uri\",\n \"provider\": \"openai\",\n \"endpoint_type\": \"token\"\n }\n },\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.inference.put({\n task_type: \"text_embedding\",\n inference_id: \"azure_ai_studio_embeddings\",\n inference_config: {\n service: \"azureaistudio\",\n service_settings: {\n api_key: \"Azure-AI-Studio-API-key\",\n target: \"Target-Uri\",\n provider: \"openai\",\n endpoint_type: \"token\",\n },\n },\n});" + }, + { + "language": "Ruby", + "code": "response = client.inference.put(\n task_type: \"text_embedding\",\n inference_id: \"azure_ai_studio_embeddings\",\n body: {\n \"service\": \"azureaistudio\",\n \"service_settings\": {\n \"api_key\": \"Azure-AI-Studio-API-key\",\n \"target\": \"Target-Uri\",\n \"provider\": \"openai\",\n \"endpoint_type\": \"token\"\n }\n }\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->inference()->put([\n \"task_type\" => \"text_embedding\",\n \"inference_id\" => \"azure_ai_studio_embeddings\",\n \"body\" => [\n \"service\" => \"azureaistudio\",\n \"service_settings\" => [\n \"api_key\" => \"Azure-AI-Studio-API-key\",\n \"target\" => \"Target-Uri\",\n \"provider\" => \"openai\",\n \"endpoint_type\" => \"token\",\n ],\n ],\n]);" + }, + { + "language": "curl", + "code": "curl -X PUT -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"service\":\"azureaistudio\",\"service_settings\":{\"api_key\":\"Azure-AI-Studio-API-key\",\"target\":\"Target-Uri\",\"provider\":\"openai\",\"endpoint_type\":\"token\"}}' \"$ELASTICSEARCH_URL/_inference/text_embedding/azure_ai_studio_embeddings\"" + }, + { + "language": "Java", + "code": "client.inference().put(p -> p\n .inferenceId(\"azure_ai_studio_embeddings\")\n .taskType(TaskType.TextEmbedding)\n .inferenceConfig(i -> i\n .service(\"azureaistudio\")\n .serviceSettings(JsonData.fromJson(\"{\\\"api_key\\\":\\\"Azure-AI-Studio-API-key\\\",\\\"target\\\":\\\"Target-Uri\\\",\\\"provider\\\":\\\"openai\\\",\\\"endpoint_type\\\":\\\"token\\\"}\"))\n )\n);\n" + } + ], + "specification/query_rules/list_rulesets/examples/request/QueryRulesetListRequestExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.query_rules.list_rulesets(\n from=\"0\",\n size=\"3\",\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.queryRules.listRulesets({\n from: 0,\n size: 3,\n});" + }, + { + "language": "Ruby", + "code": "response = client.query_rules.list_rulesets(\n from: \"0\",\n size: \"3\"\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->queryRules()->listRulesets([\n \"from\" => \"0\",\n \"size\" => \"3\",\n]);" + }, + { + "language": "curl", + "code": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_query_rules/?from=0&size=3\"" + }, + { + "language": "Java", + "code": "client.queryRules().listRulesets(l -> l\n .from(0)\n .size(3)\n);\n" + } + ], + "specification/query_rules/test/examples/request/QueryRulesetTestRequestExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.query_rules.put_ruleset(\n ruleset_id=\"my-ruleset\",\n rules=[\n {\n \"rule_id\": \"my-rule1\",\n \"type\": \"pinned\",\n \"criteria\": [\n {\n \"type\": \"contains\",\n \"metadata\": \"user_query\",\n \"values\": [\n \"pugs\",\n \"puggles\"\n ]\n },\n {\n \"type\": \"exact\",\n \"metadata\": \"user_country\",\n \"values\": [\n \"us\"\n ]\n }\n ],\n \"actions\": {\n \"ids\": [\n \"id1\",\n \"id2\"\n ]\n }\n },\n {\n \"rule_id\": \"my-rule2\",\n \"type\": \"pinned\",\n \"criteria\": [\n {\n \"type\": \"fuzzy\",\n \"metadata\": \"user_query\",\n \"values\": [\n \"rescue dogs\"\n ]\n }\n ],\n \"actions\": {\n \"docs\": [\n {\n \"_index\": \"index1\",\n \"_id\": \"id3\"\n },\n {\n \"_index\": \"index2\",\n \"_id\": \"id4\"\n }\n ]\n }\n }\n ],\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.queryRules.putRuleset({\n ruleset_id: \"my-ruleset\",\n rules: [\n {\n rule_id: \"my-rule1\",\n type: \"pinned\",\n criteria: [\n {\n type: \"contains\",\n metadata: \"user_query\",\n values: [\"pugs\", \"puggles\"],\n },\n {\n type: \"exact\",\n metadata: \"user_country\",\n values: [\"us\"],\n },\n ],\n actions: {\n ids: [\"id1\", \"id2\"],\n },\n },\n {\n rule_id: \"my-rule2\",\n type: \"pinned\",\n criteria: [\n {\n type: \"fuzzy\",\n metadata: \"user_query\",\n values: [\"rescue dogs\"],\n },\n ],\n actions: {\n docs: [\n {\n _index: \"index1\",\n _id: \"id3\",\n },\n {\n _index: \"index2\",\n _id: \"id4\",\n },\n ],\n },\n },\n ],\n});" + }, + { + "language": "Ruby", + "code": "response = client.query_rules.put_ruleset(\n ruleset_id: \"my-ruleset\",\n body: {\n \"rules\": [\n {\n \"rule_id\": \"my-rule1\",\n \"type\": \"pinned\",\n \"criteria\": [\n {\n \"type\": \"contains\",\n \"metadata\": \"user_query\",\n \"values\": [\n \"pugs\",\n \"puggles\"\n ]\n },\n {\n \"type\": \"exact\",\n \"metadata\": \"user_country\",\n \"values\": [\n \"us\"\n ]\n }\n ],\n \"actions\": {\n \"ids\": [\n \"id1\",\n \"id2\"\n ]\n }\n },\n {\n \"rule_id\": \"my-rule2\",\n \"type\": \"pinned\",\n \"criteria\": [\n {\n \"type\": \"fuzzy\",\n \"metadata\": \"user_query\",\n \"values\": [\n \"rescue dogs\"\n ]\n }\n ],\n \"actions\": {\n \"docs\": [\n {\n \"_index\": \"index1\",\n \"_id\": \"id3\"\n },\n {\n \"_index\": \"index2\",\n \"_id\": \"id4\"\n }\n ]\n }\n }\n ]\n }\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->queryRules()->putRuleset([\n \"ruleset_id\" => \"my-ruleset\",\n \"body\" => [\n \"rules\" => array(\n [\n \"rule_id\" => \"my-rule1\",\n \"type\" => \"pinned\",\n \"criteria\" => array(\n [\n \"type\" => \"contains\",\n \"metadata\" => \"user_query\",\n \"values\" => array(\n \"pugs\",\n \"puggles\",\n ),\n ],\n [\n \"type\" => \"exact\",\n \"metadata\" => \"user_country\",\n \"values\" => array(\n \"us\",\n ),\n ],\n ),\n \"actions\" => [\n \"ids\" => array(\n \"id1\",\n \"id2\",\n ),\n ],\n ],\n [\n \"rule_id\" => \"my-rule2\",\n \"type\" => \"pinned\",\n \"criteria\" => array(\n [\n \"type\" => \"fuzzy\",\n \"metadata\" => \"user_query\",\n \"values\" => array(\n \"rescue dogs\",\n ),\n ],\n ),\n \"actions\" => [\n \"docs\" => array(\n [\n \"_index\" => \"index1\",\n \"_id\" => \"id3\",\n ],\n [\n \"_index\" => \"index2\",\n \"_id\" => \"id4\",\n ],\n ),\n ],\n ],\n ),\n ],\n]);" + }, + { + "language": "curl", + "code": "curl -X PUT -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"rules\":[{\"rule_id\":\"my-rule1\",\"type\":\"pinned\",\"criteria\":[{\"type\":\"contains\",\"metadata\":\"user_query\",\"values\":[\"pugs\",\"puggles\"]},{\"type\":\"exact\",\"metadata\":\"user_country\",\"values\":[\"us\"]}],\"actions\":{\"ids\":[\"id1\",\"id2\"]}},{\"rule_id\":\"my-rule2\",\"type\":\"pinned\",\"criteria\":[{\"type\":\"fuzzy\",\"metadata\":\"user_query\",\"values\":[\"rescue dogs\"]}],\"actions\":{\"docs\":[{\"_index\":\"index1\",\"_id\":\"id3\"},{\"_index\":\"index2\",\"_id\":\"id4\"}]}}]}' \"$ELASTICSEARCH_URL/_query_rules/my-ruleset\"" + }, + { + "language": "Java", + "code": "client.queryRules().putRuleset(p -> p\n .rules(List.of(QueryRule.queryRuleOf(q -> q\n .ruleId(\"my-rule1\")\n .type(QueryRuleType.Pinned)\n .criteria(List.of(QueryRuleCriteria.of(qu -> qu\n .type(QueryRuleCriteriaType.Contains)\n .metadata(\"user_query\")\n .values(List.of(JsonData.fromJson(\"\\\"pugs\\\"\"),JsonData.fromJson(\"\\\"puggles\\\"\")))),QueryRuleCriteria.of(qu -> qu\n .type(QueryRuleCriteriaType.Exact)\n .metadata(\"user_country\")\n .values(JsonData.fromJson(\"\\\"us\\\"\")))))\n .actions(a -> a\n .ids(List.of(\"id1\",\"id2\"))\n )),QueryRule.queryRuleOf(q -> q\n .ruleId(\"my-rule2\")\n .type(QueryRuleType.Pinned)\n .criteria(c -> c\n .type(QueryRuleCriteriaType.Fuzzy)\n .metadata(\"user_query\")\n .values(JsonData.fromJson(\"\\\"rescue dogs\\\"\"))\n )\n .actions(a -> a\n .docs(List.of(PinnedDoc.of(pi -> pi\n .id(\"id3\")\n .index(\"index1\")),PinnedDoc.of(pi -> pi\n .id(\"id4\")\n .index(\"index2\"))))\n ))))\n .rulesetId(\"my-ruleset\")\n);\n" + } + ], + "specification/query_rules/put_rule/examples/request/QueryRulePutRequestExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.query_rules.test(\n ruleset_id=\"my-ruleset\",\n match_criteria={\n \"query_string\": \"puggles\"\n },\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.queryRules.test({\n ruleset_id: \"my-ruleset\",\n match_criteria: {\n query_string: \"puggles\",\n },\n});" + }, + { + "language": "Ruby", + "code": "response = client.query_rules.test(\n ruleset_id: \"my-ruleset\",\n body: {\n \"match_criteria\": {\n \"query_string\": \"puggles\"\n }\n }\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->queryRules()->test([\n \"ruleset_id\" => \"my-ruleset\",\n \"body\" => [\n \"match_criteria\" => [\n \"query_string\" => \"puggles\",\n ],\n ],\n]);" + }, + { + "language": "curl", + "code": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"match_criteria\":{\"query_string\":\"puggles\"}}' \"$ELASTICSEARCH_URL/_query_rules/my-ruleset/_test\"" + }, + { + "language": "Java", + "code": "client.queryRules().test(t -> t\n .matchCriteria(\"query_string\", JsonData.fromJson(\"\\\"puggles\\\"\"))\n .rulesetId(\"my-ruleset\")\n);\n" + } + ], + "specification/query_rules/delete_rule/examples/request/QueryRulesDeleteRuleExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.query_rules.delete_rule(\n ruleset_id=\"my-ruleset\",\n rule_id=\"my-rule1\",\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.queryRules.deleteRule({\n ruleset_id: \"my-ruleset\",\n rule_id: \"my-rule1\",\n});" + }, + { + "language": "Ruby", + "code": "response = client.query_rules.delete_rule(\n ruleset_id: \"my-ruleset\",\n rule_id: \"my-rule1\"\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->queryRules()->deleteRule([\n \"ruleset_id\" => \"my-ruleset\",\n \"rule_id\" => \"my-rule1\",\n]);" + }, + { + "language": "curl", + "code": "curl -X DELETE -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_query_rules/my-ruleset/_rule/my-rule1\"" + }, + { + "language": "Java", + "code": "client.queryRules().deleteRule(d -> d\n .ruleId(\"my-rule1\")\n .rulesetId(\"my-ruleset\")\n);\n" + } + ], + "specification/query_rules/get_rule/examples/request/QueryRuleGetRequestExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.query_rules.get_rule(\n ruleset_id=\"my-ruleset\",\n rule_id=\"my-rule1\",\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.queryRules.getRule({\n ruleset_id: \"my-ruleset\",\n rule_id: \"my-rule1\",\n});" + }, + { + "language": "Ruby", + "code": "response = client.query_rules.get_rule(\n ruleset_id: \"my-ruleset\",\n rule_id: \"my-rule1\"\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->queryRules()->getRule([\n \"ruleset_id\" => \"my-ruleset\",\n \"rule_id\" => \"my-rule1\",\n]);" + }, + { + "language": "curl", + "code": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_query_rules/my-ruleset/_rule/my-rule1\"" + }, + { + "language": "Java", + "code": "client.queryRules().getRule(g -> g\n .ruleId(\"my-rule1\")\n .rulesetId(\"my-ruleset\")\n);\n" + } + ], + "specification/query_rules/get_ruleset/examples/request/QueryRulesetGetRequestExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.query_rules.get_ruleset(\n ruleset_id=\"my-ruleset\",\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.queryRules.getRuleset({\n ruleset_id: \"my-ruleset\",\n});" + }, + { + "language": "Ruby", + "code": "response = client.query_rules.get_ruleset(\n ruleset_id: \"my-ruleset\"\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->queryRules()->getRuleset([\n \"ruleset_id\" => \"my-ruleset\",\n]);" + }, + { + "language": "curl", + "code": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_query_rules/my-ruleset/\"" + }, + { + "language": "Java", + "code": "client.queryRules().getRuleset(g -> g\n .rulesetId(\"my-ruleset\")\n);\n" + } + ], + "specification/query_rules/delete_ruleset/examples/request/QueryRulesDeleteRulesetExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.query_rules.delete_ruleset(\n ruleset_id=\"my-ruleset\",\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.queryRules.deleteRuleset({\n ruleset_id: \"my-ruleset\",\n});" + }, + { + "language": "Ruby", + "code": "response = client.query_rules.delete_ruleset(\n ruleset_id: \"my-ruleset\"\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->queryRules()->deleteRuleset([\n \"ruleset_id\" => \"my-ruleset\",\n]);" + }, + { + "language": "curl", + "code": "curl -X DELETE -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_query_rules/my-ruleset/\"" + }, + { + "language": "Java", + "code": "client.queryRules().deleteRuleset(d -> d\n .rulesetId(\"my-ruleset\")\n);\n" + } + ], + "specification/query_rules/put_ruleset/examples/request/QueryRulesetPutRequestExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.query_rules.put_ruleset(\n ruleset_id=\"my-ruleset\",\n rules=[\n {\n \"rule_id\": \"my-rule1\",\n \"type\": \"pinned\",\n \"criteria\": [\n {\n \"type\": \"contains\",\n \"metadata\": \"user_query\",\n \"values\": [\n \"pugs\",\n \"puggles\"\n ]\n },\n {\n \"type\": \"exact\",\n \"metadata\": \"user_country\",\n \"values\": [\n \"us\"\n ]\n }\n ],\n \"actions\": {\n \"ids\": [\n \"id1\",\n \"id2\"\n ]\n }\n },\n {\n \"rule_id\": \"my-rule2\",\n \"type\": \"pinned\",\n \"criteria\": [\n {\n \"type\": \"fuzzy\",\n \"metadata\": \"user_query\",\n \"values\": [\n \"rescue dogs\"\n ]\n }\n ],\n \"actions\": {\n \"docs\": [\n {\n \"_index\": \"index1\",\n \"_id\": \"id3\"\n },\n {\n \"_index\": \"index2\",\n \"_id\": \"id4\"\n }\n ]\n }\n }\n ],\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.queryRules.putRuleset({\n ruleset_id: \"my-ruleset\",\n rules: [\n {\n rule_id: \"my-rule1\",\n type: \"pinned\",\n criteria: [\n {\n type: \"contains\",\n metadata: \"user_query\",\n values: [\"pugs\", \"puggles\"],\n },\n {\n type: \"exact\",\n metadata: \"user_country\",\n values: [\"us\"],\n },\n ],\n actions: {\n ids: [\"id1\", \"id2\"],\n },\n },\n {\n rule_id: \"my-rule2\",\n type: \"pinned\",\n criteria: [\n {\n type: \"fuzzy\",\n metadata: \"user_query\",\n values: [\"rescue dogs\"],\n },\n ],\n actions: {\n docs: [\n {\n _index: \"index1\",\n _id: \"id3\",\n },\n {\n _index: \"index2\",\n _id: \"id4\",\n },\n ],\n },\n },\n ],\n});" + }, + { + "language": "Ruby", + "code": "response = client.query_rules.put_ruleset(\n ruleset_id: \"my-ruleset\",\n body: {\n \"rules\": [\n {\n \"rule_id\": \"my-rule1\",\n \"type\": \"pinned\",\n \"criteria\": [\n {\n \"type\": \"contains\",\n \"metadata\": \"user_query\",\n \"values\": [\n \"pugs\",\n \"puggles\"\n ]\n },\n {\n \"type\": \"exact\",\n \"metadata\": \"user_country\",\n \"values\": [\n \"us\"\n ]\n }\n ],\n \"actions\": {\n \"ids\": [\n \"id1\",\n \"id2\"\n ]\n }\n },\n {\n \"rule_id\": \"my-rule2\",\n \"type\": \"pinned\",\n \"criteria\": [\n {\n \"type\": \"fuzzy\",\n \"metadata\": \"user_query\",\n \"values\": [\n \"rescue dogs\"\n ]\n }\n ],\n \"actions\": {\n \"docs\": [\n {\n \"_index\": \"index1\",\n \"_id\": \"id3\"\n },\n {\n \"_index\": \"index2\",\n \"_id\": \"id4\"\n }\n ]\n }\n }\n ]\n }\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->queryRules()->putRuleset([\n \"ruleset_id\" => \"my-ruleset\",\n \"body\" => [\n \"rules\" => array(\n [\n \"rule_id\" => \"my-rule1\",\n \"type\" => \"pinned\",\n \"criteria\" => array(\n [\n \"type\" => \"contains\",\n \"metadata\" => \"user_query\",\n \"values\" => array(\n \"pugs\",\n \"puggles\",\n ),\n ],\n [\n \"type\" => \"exact\",\n \"metadata\" => \"user_country\",\n \"values\" => array(\n \"us\",\n ),\n ],\n ),\n \"actions\" => [\n \"ids\" => array(\n \"id1\",\n \"id2\",\n ),\n ],\n ],\n [\n \"rule_id\" => \"my-rule2\",\n \"type\" => \"pinned\",\n \"criteria\" => array(\n [\n \"type\" => \"fuzzy\",\n \"metadata\" => \"user_query\",\n \"values\" => array(\n \"rescue dogs\",\n ),\n ],\n ),\n \"actions\" => [\n \"docs\" => array(\n [\n \"_index\" => \"index1\",\n \"_id\" => \"id3\",\n ],\n [\n \"_index\" => \"index2\",\n \"_id\" => \"id4\",\n ],\n ),\n ],\n ],\n ),\n ],\n]);" + }, + { + "language": "curl", + "code": "curl -X PUT -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"rules\":[{\"rule_id\":\"my-rule1\",\"type\":\"pinned\",\"criteria\":[{\"type\":\"contains\",\"metadata\":\"user_query\",\"values\":[\"pugs\",\"puggles\"]},{\"type\":\"exact\",\"metadata\":\"user_country\",\"values\":[\"us\"]}],\"actions\":{\"ids\":[\"id1\",\"id2\"]}},{\"rule_id\":\"my-rule2\",\"type\":\"pinned\",\"criteria\":[{\"type\":\"fuzzy\",\"metadata\":\"user_query\",\"values\":[\"rescue dogs\"]}],\"actions\":{\"docs\":[{\"_index\":\"index1\",\"_id\":\"id3\"},{\"_index\":\"index2\",\"_id\":\"id4\"}]}}]}' \"$ELASTICSEARCH_URL/_query_rules/my-ruleset\"" + }, + { + "language": "Java", + "code": "client.queryRules().putRuleset(p -> p\n .rules(List.of(QueryRule.queryRuleOf(q -> q\n .ruleId(\"my-rule1\")\n .type(QueryRuleType.Pinned)\n .criteria(List.of(QueryRuleCriteria.of(qu -> qu\n .type(QueryRuleCriteriaType.Contains)\n .metadata(\"user_query\")\n .values(List.of(JsonData.fromJson(\"\\\"pugs\\\"\"),JsonData.fromJson(\"\\\"puggles\\\"\")))),QueryRuleCriteria.of(qu -> qu\n .type(QueryRuleCriteriaType.Exact)\n .metadata(\"user_country\")\n .values(JsonData.fromJson(\"\\\"us\\\"\")))))\n .actions(a -> a\n .ids(List.of(\"id1\",\"id2\"))\n )),QueryRule.queryRuleOf(q -> q\n .ruleId(\"my-rule2\")\n .type(QueryRuleType.Pinned)\n .criteria(c -> c\n .type(QueryRuleCriteriaType.Fuzzy)\n .metadata(\"user_query\")\n .values(JsonData.fromJson(\"\\\"rescue dogs\\\"\"))\n )\n .actions(a -> a\n .docs(List.of(PinnedDoc.of(pi -> pi\n .id(\"id3\")\n .index(\"index1\")),PinnedDoc.of(pi -> pi\n .id(\"id4\")\n .index(\"index2\"))))\n ))))\n .rulesetId(\"my-ruleset\")\n);\n" + } + ], + "specification/enrich/delete_policy/examples/request/EnrichDeletePolicyExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.enrich.delete_policy(\n name=\"my-policy\",\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.enrich.deletePolicy({\n name: \"my-policy\",\n});" + }, + { + "language": "Ruby", + "code": "response = client.enrich.delete_policy(\n name: \"my-policy\"\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->enrich()->deletePolicy([\n \"name\" => \"my-policy\",\n]);" + }, + { + "language": "curl", + "code": "curl -X DELETE -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_enrich/policy/my-policy\"" + }, + { + "language": "Java", + "code": "client.enrich().deletePolicy(d -> d\n .name(\"my-policy\")\n);\n" + } + ], + "specification/enrich/execute_policy/examples/request/EnrichExecutePolicyExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.enrich.execute_policy(\n name=\"my-policy\",\n wait_for_completion=False,\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.enrich.executePolicy({\n name: \"my-policy\",\n wait_for_completion: \"false\",\n});" + }, + { + "language": "Ruby", + "code": "response = client.enrich.execute_policy(\n name: \"my-policy\",\n wait_for_completion: \"false\"\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->enrich()->executePolicy([\n \"name\" => \"my-policy\",\n \"wait_for_completion\" => \"false\",\n]);" + }, + { + "language": "curl", + "code": "curl -X PUT -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_enrich/policy/my-policy/_execute?wait_for_completion=false\"" + }, + { + "language": "Java", + "code": "client.enrich().executePolicy(e -> e\n .name(\"my-policy\")\n .waitForCompletion(false)\n);\n" + } + ], + "specification/enrich/get_policy/examples/request/EnrichGetPolicyExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.enrich.get_policy(\n name=\"my-policy\",\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.enrich.getPolicy({\n name: \"my-policy\",\n});" + }, + { + "language": "Ruby", + "code": "response = client.enrich.get_policy(\n name: \"my-policy\"\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->enrich()->getPolicy([\n \"name\" => \"my-policy\",\n]);" + }, + { + "language": "curl", + "code": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_enrich/policy/my-policy\"" + }, + { + "language": "Java", + "code": "client.enrich().getPolicy(g -> g\n .name(\"my-policy\")\n);\n" + } + ], + "specification/enrich/put_policy/examples/request/EnrichPutPolicyExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.enrich.put_policy(\n name=\"postal_policy\",\n geo_match={\n \"indices\": \"postal_codes\",\n \"match_field\": \"location\",\n \"enrich_fields\": [\n \"location\",\n \"postal_code\"\n ]\n },\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.enrich.putPolicy({\n name: \"postal_policy\",\n geo_match: {\n indices: \"postal_codes\",\n match_field: \"location\",\n enrich_fields: [\"location\", \"postal_code\"],\n },\n});" + }, + { + "language": "Ruby", + "code": "response = client.enrich.put_policy(\n name: \"postal_policy\",\n body: {\n \"geo_match\": {\n \"indices\": \"postal_codes\",\n \"match_field\": \"location\",\n \"enrich_fields\": [\n \"location\",\n \"postal_code\"\n ]\n }\n }\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->enrich()->putPolicy([\n \"name\" => \"postal_policy\",\n \"body\" => [\n \"geo_match\" => [\n \"indices\" => \"postal_codes\",\n \"match_field\" => \"location\",\n \"enrich_fields\" => array(\n \"location\",\n \"postal_code\",\n ),\n ],\n ],\n]);" + }, + { + "language": "curl", + "code": "curl -X PUT -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"geo_match\":{\"indices\":\"postal_codes\",\"match_field\":\"location\",\"enrich_fields\":[\"location\",\"postal_code\"]}}' \"$ELASTICSEARCH_URL/_enrich/policy/postal_policy\"" + }, + { + "language": "Java", + "code": "client.enrich().putPolicy(p -> p\n .geoMatch(g -> g\n .enrichFields(List.of(\"location\",\"postal_code\"))\n .indices(\"postal_codes\")\n .matchField(\"location\")\n )\n .name(\"postal_policy\")\n);\n" + } + ], + "specification/enrich/stats/examples/request/EnrichStatsExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.enrich.stats()" + }, + { + "language": "JavaScript", + "code": "const response = await client.enrich.stats();" + }, + { + "language": "Ruby", + "code": "response = client.enrich.stats" + }, + { + "language": "PHP", + "code": "$resp = $client->enrich()->stats();" + }, + { + "language": "curl", + "code": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_enrich/_stats\"" + }, + { + "language": "Java", + "code": "client.enrich().stats(s -> s);\n" + } + ], + "specification/async_search/submit/examples/request/AsyncSearchSubmitRequestExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.async_search.submit(\n index=\"sales*\",\n size=\"0\",\n sort=[\n {\n \"date\": {\n \"order\": \"asc\"\n }\n }\n ],\n aggs={\n \"sale_date\": {\n \"date_histogram\": {\n \"field\": \"date\",\n \"calendar_interval\": \"1d\"\n }\n }\n },\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.asyncSearch.submit({\n index: \"sales*\",\n size: 0,\n sort: [\n {\n date: {\n order: \"asc\",\n },\n },\n ],\n aggs: {\n sale_date: {\n date_histogram: {\n field: \"date\",\n calendar_interval: \"1d\",\n },\n },\n },\n});" + }, + { + "language": "Ruby", + "code": "response = client.async_search.submit(\n index: \"sales*\",\n size: \"0\",\n body: {\n \"sort\": [\n {\n \"date\": {\n \"order\": \"asc\"\n }\n }\n ],\n \"aggs\": {\n \"sale_date\": {\n \"date_histogram\": {\n \"field\": \"date\",\n \"calendar_interval\": \"1d\"\n }\n }\n }\n }\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->asyncSearch()->submit([\n \"index\" => \"sales*\",\n \"size\" => \"0\",\n \"body\" => [\n \"sort\" => array(\n [\n \"date\" => [\n \"order\" => \"asc\",\n ],\n ],\n ),\n \"aggs\" => [\n \"sale_date\" => [\n \"date_histogram\" => [\n \"field\" => \"date\",\n \"calendar_interval\" => \"1d\",\n ],\n ],\n ],\n ],\n]);" + }, + { + "language": "curl", + "code": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"sort\":[{\"date\":{\"order\":\"asc\"}}],\"aggs\":{\"sale_date\":{\"date_histogram\":{\"field\":\"date\",\"calendar_interval\":\"1d\"}}}}' \"$ELASTICSEARCH_URL/sales*/_async_search?size=0\"" + }, + { + "language": "Java", + "code": "client.asyncSearch().submit(s -> s\n .aggregations(\"sale_date\", a -> a\n .dateHistogram(d -> d\n .calendarInterval(CalendarInterval.Day)\n .field(\"date\")\n )\n )\n .index(\"sales*\")\n .size(0)\n .sort(so -> so\n .field(f -> f\n .field(\"date\")\n .order(SortOrder.Asc)\n )\n )\n,Void.class);\n" + } + ], + "specification/async_search/delete/examples/request/AsyncSearchDeleteExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.async_search.delete(\n id=\"FmRldE8zREVEUzA2ZVpUeGs2ejJFUFEaMkZ5QTVrSTZSaVN3WlNFVmtlWHJsdzoxMDc=\",\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.asyncSearch.delete({\n id: \"FmRldE8zREVEUzA2ZVpUeGs2ejJFUFEaMkZ5QTVrSTZSaVN3WlNFVmtlWHJsdzoxMDc=\",\n});" + }, + { + "language": "Ruby", + "code": "response = client.async_search.delete(\n id: \"FmRldE8zREVEUzA2ZVpUeGs2ejJFUFEaMkZ5QTVrSTZSaVN3WlNFVmtlWHJsdzoxMDc=\"\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->asyncSearch()->delete([\n \"id\" => \"FmRldE8zREVEUzA2ZVpUeGs2ejJFUFEaMkZ5QTVrSTZSaVN3WlNFVmtlWHJsdzoxMDc=\",\n]);" + }, + { + "language": "curl", + "code": "curl -X DELETE -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_async_search/FmRldE8zREVEUzA2ZVpUeGs2ejJFUFEaMkZ5QTVrSTZSaVN3WlNFVmtlWHJsdzoxMDc=\"" + }, + { + "language": "Java", + "code": "client.asyncSearch().delete(d -> d\n .id(\"FmRldE8zREVEUzA2ZVpUeGs2ejJFUFEaMkZ5QTVrSTZSaVN3WlNFVmtlWHJsdzoxMDc=\")\n);\n" + } + ], + "specification/async_search/get/examples/request/AsyncSearchGetRequestExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.async_search.get(\n id=\"FmRldE8zREVEUzA2ZVpUeGs2ejJFUFEaMkZ5QTVrSTZSaVN3WlNFVmtlWHJsdzoxMDc=\",\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.asyncSearch.get({\n id: \"FmRldE8zREVEUzA2ZVpUeGs2ejJFUFEaMkZ5QTVrSTZSaVN3WlNFVmtlWHJsdzoxMDc=\",\n});" + }, + { + "language": "Ruby", + "code": "response = client.async_search.get(\n id: \"FmRldE8zREVEUzA2ZVpUeGs2ejJFUFEaMkZ5QTVrSTZSaVN3WlNFVmtlWHJsdzoxMDc=\"\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->asyncSearch()->get([\n \"id\" => \"FmRldE8zREVEUzA2ZVpUeGs2ejJFUFEaMkZ5QTVrSTZSaVN3WlNFVmtlWHJsdzoxMDc=\",\n]);" + }, + { + "language": "curl", + "code": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_async_search/FmRldE8zREVEUzA2ZVpUeGs2ejJFUFEaMkZ5QTVrSTZSaVN3WlNFVmtlWHJsdzoxMDc=\"" + }, + { + "language": "Java", + "code": "client.asyncSearch().get(g -> g\n .id(\"FmRldE8zREVEUzA2ZVpUeGs2ejJFUFEaMkZ5QTVrSTZSaVN3WlNFVmtlWHJsdzoxMDc=\")\n);\n" + } + ], + "specification/async_search/status/examples/request/AsyncSearchStatusRequestExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.async_search.status(\n id=\"FmRldE8zREVEUzA2ZVpUeGs2ejJFUFEaMkZ5QTVrSTZSaVN3WlNFVmtlWHJsdzoxMDc=\",\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.asyncSearch.status({\n id: \"FmRldE8zREVEUzA2ZVpUeGs2ejJFUFEaMkZ5QTVrSTZSaVN3WlNFVmtlWHJsdzoxMDc=\",\n});" + }, + { + "language": "Ruby", + "code": "response = client.async_search.status(\n id: \"FmRldE8zREVEUzA2ZVpUeGs2ejJFUFEaMkZ5QTVrSTZSaVN3WlNFVmtlWHJsdzoxMDc=\"\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->asyncSearch()->status([\n \"id\" => \"FmRldE8zREVEUzA2ZVpUeGs2ejJFUFEaMkZ5QTVrSTZSaVN3WlNFVmtlWHJsdzoxMDc=\",\n]);" + }, + { + "language": "curl", + "code": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_async_search/status/FmRldE8zREVEUzA2ZVpUeGs2ejJFUFEaMkZ5QTVrSTZSaVN3WlNFVmtlWHJsdzoxMDc=\"" + }, + { + "language": "Java", + "code": "client.asyncSearch().status(s -> s\n .id(\"FmRldE8zREVEUzA2ZVpUeGs2ejJFUFEaMkZ5QTVrSTZSaVN3WlNFVmtlWHJsdzoxMDc=\")\n);\n" + } + ], + "specification/eql/get_status/examples/request/EqlGetStatusExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.eql.get_status(\n id=\"FmNJRUZ1YWZCU3dHY1BIOUhaenVSRkEaaXFlZ3h4c1RTWFNocDdnY2FSaERnUTozNDE=\",\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.eql.getStatus({\n id: \"FmNJRUZ1YWZCU3dHY1BIOUhaenVSRkEaaXFlZ3h4c1RTWFNocDdnY2FSaERnUTozNDE=\",\n});" + }, + { + "language": "Ruby", + "code": "response = client.eql.get_status(\n id: \"FmNJRUZ1YWZCU3dHY1BIOUhaenVSRkEaaXFlZ3h4c1RTWFNocDdnY2FSaERnUTozNDE=\"\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->eql()->getStatus([\n \"id\" => \"FmNJRUZ1YWZCU3dHY1BIOUhaenVSRkEaaXFlZ3h4c1RTWFNocDdnY2FSaERnUTozNDE=\",\n]);" + }, + { + "language": "curl", + "code": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_eql/search/status/FmNJRUZ1YWZCU3dHY1BIOUhaenVSRkEaaXFlZ3h4c1RTWFNocDdnY2FSaERnUTozNDE=\"" + }, + { + "language": "Java", + "code": "client.eql().getStatus(g -> g\n .id(\"FmNJRUZ1YWZCU3dHY1BIOUhaenVSRkEaaXFlZ3h4c1RTWFNocDdnY2FSaERnUTozNDE=\")\n);\n" + } + ], + "specification/eql/delete/examples/request/EqlDeleteExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.eql.delete(\n id=\"FmNJRUZ1YWZCU3dHY1BIOUhaenVSRkEaaXFlZ3h4c1RTWFNocDdnY2FSaERnUTozNDE=\",\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.eql.delete({\n id: \"FmNJRUZ1YWZCU3dHY1BIOUhaenVSRkEaaXFlZ3h4c1RTWFNocDdnY2FSaERnUTozNDE=\",\n});" + }, + { + "language": "Ruby", + "code": "response = client.eql.delete(\n id: \"FmNJRUZ1YWZCU3dHY1BIOUhaenVSRkEaaXFlZ3h4c1RTWFNocDdnY2FSaERnUTozNDE=\"\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->eql()->delete([\n \"id\" => \"FmNJRUZ1YWZCU3dHY1BIOUhaenVSRkEaaXFlZ3h4c1RTWFNocDdnY2FSaERnUTozNDE=\",\n]);" + }, + { + "language": "curl", + "code": "curl -X DELETE -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_eql/search/FmNJRUZ1YWZCU3dHY1BIOUhaenVSRkEaaXFlZ3h4c1RTWFNocDdnY2FSaERnUTozNDE=\"" + }, + { + "language": "Java", + "code": "client.eql().delete(d -> d\n .id(\"FmNJRUZ1YWZCU3dHY1BIOUhaenVSRkEaaXFlZ3h4c1RTWFNocDdnY2FSaERnUTozNDE=\")\n);\n" + } + ], + "specification/eql/get/examples/request/EqlGetExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.eql.get(\n id=\"FmNJRUZ1YWZCU3dHY1BIOUhaenVSRkEaaXFlZ3h4c1RTWFNocDdnY2FSaERnUTozNDE=\",\n wait_for_completion_timeout=\"2s\",\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.eql.get({\n id: \"FmNJRUZ1YWZCU3dHY1BIOUhaenVSRkEaaXFlZ3h4c1RTWFNocDdnY2FSaERnUTozNDE=\",\n wait_for_completion_timeout: \"2s\",\n});" + }, + { + "language": "Ruby", + "code": "response = client.eql.get(\n id: \"FmNJRUZ1YWZCU3dHY1BIOUhaenVSRkEaaXFlZ3h4c1RTWFNocDdnY2FSaERnUTozNDE=\",\n wait_for_completion_timeout: \"2s\"\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->eql()->get([\n \"id\" => \"FmNJRUZ1YWZCU3dHY1BIOUhaenVSRkEaaXFlZ3h4c1RTWFNocDdnY2FSaERnUTozNDE=\",\n \"wait_for_completion_timeout\" => \"2s\",\n]);" + }, + { + "language": "curl", + "code": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_eql/search/FmNJRUZ1YWZCU3dHY1BIOUhaenVSRkEaaXFlZ3h4c1RTWFNocDdnY2FSaERnUTozNDE=?wait_for_completion_timeout=2s\"" + }, + { + "language": "Java", + "code": "client.eql().get(g -> g\n .id(\"FmNJRUZ1YWZCU3dHY1BIOUhaenVSRkEaaXFlZ3h4c1RTWFNocDdnY2FSaERnUTozNDE=\")\n .waitForCompletionTimeout(w -> w\n .offset(2)\n )\n);\n" + } + ], + "specification/eql/search/examples/request/EqlSearchRequestExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.eql.search(\n index=\"my-data-stream\",\n query=\"\\n process where (process.name == \\\"cmd.exe\\\" and process.pid != 2013)\\n \",\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.eql.search({\n index: \"my-data-stream\",\n query:\n '\\n process where (process.name == \"cmd.exe\" and process.pid != 2013)\\n ',\n});" + }, + { + "language": "Ruby", + "code": "response = client.eql.search(\n index: \"my-data-stream\",\n body: {\n \"query\": \"\\n process where (process.name == \\\"cmd.exe\\\" and process.pid != 2013)\\n \"\n }\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->eql()->search([\n \"index\" => \"my-data-stream\",\n \"body\" => [\n \"query\" => \"\\n process where (process.name == \\\"cmd.exe\\\" and process.pid != 2013)\\n \",\n ],\n]);" + }, + { + "language": "curl", + "code": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"query\":\"\\n process where (process.name == \\\"cmd.exe\\\" and process.pid != 2013)\\n \"}' \"$ELASTICSEARCH_URL/my-data-stream/_eql/search\"" + }, + { + "language": "Java", + "code": "client.eql().search(s -> s\n .index(\"my-data-stream\")\n .query(\" process where (process.name == \\\"cmd.exe\\\" and process.pid != 2013) \")\n);\n" + } + ], + "specification/eql/search/examples/request/EqlSearchRequestExample2.yaml": [ + { + "language": "Python", + "code": "resp = client.eql.search(\n index=\"my-data-stream\",\n query=\"\\n sequence by process.pid\\n [ file where file.name == \\\"cmd.exe\\\" and process.pid != 2013 ]\\n [ process where stringContains(process.executable, \\\"regsvr32\\\") ]\\n \",\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.eql.search({\n index: \"my-data-stream\",\n query:\n '\\n sequence by process.pid\\n [ file where file.name == \"cmd.exe\" and process.pid != 2013 ]\\n [ process where stringContains(process.executable, \"regsvr32\") ]\\n ',\n});" + }, + { + "language": "Ruby", + "code": "response = client.eql.search(\n index: \"my-data-stream\",\n body: {\n \"query\": \"\\n sequence by process.pid\\n [ file where file.name == \\\"cmd.exe\\\" and process.pid != 2013 ]\\n [ process where stringContains(process.executable, \\\"regsvr32\\\") ]\\n \"\n }\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->eql()->search([\n \"index\" => \"my-data-stream\",\n \"body\" => [\n \"query\" => \"\\n sequence by process.pid\\n [ file where file.name == \\\"cmd.exe\\\" and process.pid != 2013 ]\\n [ process where stringContains(process.executable, \\\"regsvr32\\\") ]\\n \",\n ],\n]);" + }, + { + "language": "curl", + "code": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"query\":\"\\n sequence by process.pid\\n [ file where file.name == \\\"cmd.exe\\\" and process.pid != 2013 ]\\n [ process where stringContains(process.executable, \\\"regsvr32\\\") ]\\n \"}' \"$ELASTICSEARCH_URL/my-data-stream/_eql/search\"" + }, + { + "language": "Java", + "code": "client.eql().search(s -> s\n .index(\"my-data-stream\")\n .query(\" sequence by process.pid [ file where file.name == \\\"cmd.exe\\\" and process.pid != 2013 ][ process where stringContains(process.executable, \\\"regsvr32\\\") ] \")\n);\n" + } + ], + "specification/esql/async_query_stop/examples/request/EsqlAsyncQueryStopExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.esql.async_query_stop(\n id=\"FkpMRkJGS1gzVDRlM3g4ZzMyRGlLbkEaTXlJZHdNT09TU2VTZVBoNDM3cFZMUToxMDM=\",\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.esql.asyncQueryStop({\n id: \"FkpMRkJGS1gzVDRlM3g4ZzMyRGlLbkEaTXlJZHdNT09TU2VTZVBoNDM3cFZMUToxMDM=\",\n});" + }, + { + "language": "Ruby", + "code": "response = client.esql.async_query_stop(\n id: \"FkpMRkJGS1gzVDRlM3g4ZzMyRGlLbkEaTXlJZHdNT09TU2VTZVBoNDM3cFZMUToxMDM=\"\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->esql()->asyncQueryStop([\n \"id\" => \"FkpMRkJGS1gzVDRlM3g4ZzMyRGlLbkEaTXlJZHdNT09TU2VTZVBoNDM3cFZMUToxMDM=\",\n]);" + }, + { + "language": "curl", + "code": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_query/async/FkpMRkJGS1gzVDRlM3g4ZzMyRGlLbkEaTXlJZHdNT09TU2VTZVBoNDM3cFZMUToxMDM=/stop\"" + } + ], + "specification/esql/async_query/examples/request/AsyncQueryRequestExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.esql.async_query(\n query=\"\\n FROM library,remote-*:library\\n | EVAL year = DATE_TRUNC(1 YEARS, release_date)\\n | STATS MAX(page_count) BY year\\n | SORT year\\n | LIMIT 5\\n \",\n wait_for_completion_timeout=\"2s\",\n include_ccs_metadata=True,\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.esql.asyncQuery({\n query:\n \"\\n FROM library,remote-*:library\\n | EVAL year = DATE_TRUNC(1 YEARS, release_date)\\n | STATS MAX(page_count) BY year\\n | SORT year\\n | LIMIT 5\\n \",\n wait_for_completion_timeout: \"2s\",\n include_ccs_metadata: true,\n});" + }, + { + "language": "Ruby", + "code": "response = client.esql.async_query(\n body: {\n \"query\": \"\\n FROM library,remote-*:library\\n | EVAL year = DATE_TRUNC(1 YEARS, release_date)\\n | STATS MAX(page_count) BY year\\n | SORT year\\n | LIMIT 5\\n \",\n \"wait_for_completion_timeout\": \"2s\",\n \"include_ccs_metadata\": true\n }\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->esql()->asyncQuery([\n \"body\" => [\n \"query\" => \"\\n FROM library,remote-*:library\\n | EVAL year = DATE_TRUNC(1 YEARS, release_date)\\n | STATS MAX(page_count) BY year\\n | SORT year\\n | LIMIT 5\\n \",\n \"wait_for_completion_timeout\" => \"2s\",\n \"include_ccs_metadata\" => true,\n ],\n]);" + }, + { + "language": "curl", + "code": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"query\":\"\\n FROM library,remote-*:library\\n | EVAL year = DATE_TRUNC(1 YEARS, release_date)\\n | STATS MAX(page_count) BY year\\n | SORT year\\n | LIMIT 5\\n \",\"wait_for_completion_timeout\":\"2s\",\"include_ccs_metadata\":true}' \"$ELASTICSEARCH_URL/_query/async\"" + } + ], + "specification/esql/async_query_get/examples/request/EsqlAsyncQueryGetExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.esql.async_query_get(\n id=\"FmNJRUZ1YWZCU3dHY1BIOUhaenVSRkEaaXFlZ3h4c1RTWFNocDdnY2FSaERnUTozNDE=\",\n wait_for_completion_timeout=\"30s\",\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.esql.asyncQueryGet({\n id: \"FmNJRUZ1YWZCU3dHY1BIOUhaenVSRkEaaXFlZ3h4c1RTWFNocDdnY2FSaERnUTozNDE=\",\n wait_for_completion_timeout: \"30s\",\n});" + }, + { + "language": "Ruby", + "code": "response = client.esql.async_query_get(\n id: \"FmNJRUZ1YWZCU3dHY1BIOUhaenVSRkEaaXFlZ3h4c1RTWFNocDdnY2FSaERnUTozNDE=\",\n wait_for_completion_timeout: \"30s\"\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->esql()->asyncQueryGet([\n \"id\" => \"FmNJRUZ1YWZCU3dHY1BIOUhaenVSRkEaaXFlZ3h4c1RTWFNocDdnY2FSaERnUTozNDE=\",\n \"wait_for_completion_timeout\" => \"30s\",\n]);" + }, + { + "language": "curl", + "code": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_query/async/FmNJRUZ1YWZCU3dHY1BIOUhaenVSRkEaaXFlZ3h4c1RTWFNocDdnY2FSaERnUTozNDE=?wait_for_completion_timeout=30s\"" + } + ], + "specification/esql/query/examples/request/QueryRequestExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.esql.query(\n query=\"\\n FROM library,remote-*:library\\n | EVAL year = DATE_TRUNC(1 YEARS, release_date)\\n | STATS MAX(page_count) BY year\\n | SORT year\\n | LIMIT 5\\n \",\n include_ccs_metadata=True,\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.esql.query({\n query:\n \"\\n FROM library,remote-*:library\\n | EVAL year = DATE_TRUNC(1 YEARS, release_date)\\n | STATS MAX(page_count) BY year\\n | SORT year\\n | LIMIT 5\\n \",\n include_ccs_metadata: true,\n});" + }, + { + "language": "Ruby", + "code": "response = client.esql.query(\n body: {\n \"query\": \"\\n FROM library,remote-*:library\\n | EVAL year = DATE_TRUNC(1 YEARS, release_date)\\n | STATS MAX(page_count) BY year\\n | SORT year\\n | LIMIT 5\\n \",\n \"include_ccs_metadata\": true\n }\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->esql()->query([\n \"body\" => [\n \"query\" => \"\\n FROM library,remote-*:library\\n | EVAL year = DATE_TRUNC(1 YEARS, release_date)\\n | STATS MAX(page_count) BY year\\n | SORT year\\n | LIMIT 5\\n \",\n \"include_ccs_metadata\" => true,\n ],\n]);" + }, + { + "language": "curl", + "code": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"query\":\"\\n FROM library,remote-*:library\\n | EVAL year = DATE_TRUNC(1 YEARS, release_date)\\n | STATS MAX(page_count) BY year\\n | SORT year\\n | LIMIT 5\\n \",\"include_ccs_metadata\":true}' \"$ELASTICSEARCH_URL/_query\"" + }, + { + "language": "Java", + "code": "client.esql().query(q -> q\n .includeCcsMetadata(true)\n .query(\" FROM library,remote-*:library | EVAL year = DATE_TRUNC(1 YEARS, release_date) | STATS MAX(page_count) BY year | SORT year | LIMIT 5 \")\n);\n" + } + ], + "specification/esql/async_query_delete/examples/request/EsqlAsyncQueryDeleteExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.esql.async_query_delete(\n id=\"FmdMX2pIang3UWhLRU5QS0lqdlppYncaMUpYQ05oSkpTc3kwZ21EdC1tbFJXQToxOTI=\",\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.esql.asyncQueryDelete({\n id: \"FmdMX2pIang3UWhLRU5QS0lqdlppYncaMUpYQ05oSkpTc3kwZ21EdC1tbFJXQToxOTI=\",\n});" + }, + { + "language": "Ruby", + "code": "response = client.esql.async_query_delete(\n id: \"FmdMX2pIang3UWhLRU5QS0lqdlppYncaMUpYQ05oSkpTc3kwZ21EdC1tbFJXQToxOTI=\"\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->esql()->asyncQueryDelete([\n \"id\" => \"FmdMX2pIang3UWhLRU5QS0lqdlppYncaMUpYQ05oSkpTc3kwZ21EdC1tbFJXQToxOTI=\",\n]);" + }, + { + "language": "curl", + "code": "curl -X DELETE -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_query/async/FmdMX2pIang3UWhLRU5QS0lqdlppYncaMUpYQ05oSkpTc3kwZ21EdC1tbFJXQToxOTI=\"" + } + ], + "specification/autoscaling/put_autoscaling_policy/examples/request/PutAutoscalingPolicyRequestExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.autoscaling.put_autoscaling_policy(\n name=\"\",\n policy={\n \"roles\": [],\n \"deciders\": {\n \"fixed\": {}\n }\n },\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.autoscaling.putAutoscalingPolicy({\n name: \"\",\n policy: {\n roles: [],\n deciders: {\n fixed: {},\n },\n },\n});" + }, + { + "language": "Ruby", + "code": "response = client.autoscaling.put_autoscaling_policy(\n name: \"\",\n body: {\n \"roles\": [],\n \"deciders\": {\n \"fixed\": {}\n }\n }\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->autoscaling()->putAutoscalingPolicy([\n \"name\" => \"\",\n \"body\" => [\n \"roles\" => array(\n ),\n \"deciders\" => [\n \"fixed\" => new ArrayObject([]),\n ],\n ],\n]);" + }, + { + "language": "curl", + "code": "curl -X PUT -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"roles\":[],\"deciders\":{\"fixed\":{}}}' \"$ELASTICSEARCH_URL/_autoscaling/policy/\"" + }, + { + "language": "Java", + "code": "client.autoscaling().putAutoscalingPolicy(p -> p\n .name(\"\")\n .policy(po -> po\n .deciders(\"fixed\", JsonData.fromJson(\"{}\"))\n )\n);\n" + } + ], + "specification/autoscaling/put_autoscaling_policy/examples/request/PutAutoscalingPolicyRequestExample2.yaml": [ + { + "language": "Python", + "code": "resp = client.autoscaling.put_autoscaling_policy(\n name=\"my_autoscaling_policy\",\n policy={\n \"roles\": [\n \"data_hot\"\n ],\n \"deciders\": {\n \"fixed\": {}\n }\n },\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.autoscaling.putAutoscalingPolicy({\n name: \"my_autoscaling_policy\",\n policy: {\n roles: [\"data_hot\"],\n deciders: {\n fixed: {},\n },\n },\n});" + }, + { + "language": "Ruby", + "code": "response = client.autoscaling.put_autoscaling_policy(\n name: \"my_autoscaling_policy\",\n body: {\n \"roles\": [\n \"data_hot\"\n ],\n \"deciders\": {\n \"fixed\": {}\n }\n }\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->autoscaling()->putAutoscalingPolicy([\n \"name\" => \"my_autoscaling_policy\",\n \"body\" => [\n \"roles\" => array(\n \"data_hot\",\n ),\n \"deciders\" => [\n \"fixed\" => new ArrayObject([]),\n ],\n ],\n]);" + }, + { + "language": "curl", + "code": "curl -X PUT -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"roles\":[\"data_hot\"],\"deciders\":{\"fixed\":{}}}' \"$ELASTICSEARCH_URL/_autoscaling/policy/my_autoscaling_policy\"" + }, + { + "language": "Java", + "code": "client.autoscaling().putAutoscalingPolicy(p -> p\n .name(\"my_autoscaling_policy\")\n .policy(po -> po\n .roles(\"data_hot\")\n .deciders(\"fixed\", JsonData.fromJson(\"{}\"))\n )\n);\n" + } + ], + "specification/autoscaling/delete_autoscaling_policy/examples/request/DeleteAutoscalingPolicyRequestExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.autoscaling.delete_autoscaling_policy(\n name=\"*\",\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.autoscaling.deleteAutoscalingPolicy({\n name: \"*\",\n});" + }, + { + "language": "Ruby", + "code": "response = client.autoscaling.delete_autoscaling_policy(\n name: \"*\"\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->autoscaling()->deleteAutoscalingPolicy([\n \"name\" => \"*\",\n]);" + }, + { + "language": "curl", + "code": "curl -X DELETE -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_autoscaling/policy/*\"" + }, + { + "language": "Java", + "code": "client.autoscaling().deleteAutoscalingPolicy(d -> d\n .name(\"*\")\n);\n" + } + ], + "specification/autoscaling/get_autoscaling_policy/examples/request/GetAutoscalingPolicyRequestExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.autoscaling.get_autoscaling_policy(\n name=\"my_autoscaling_policy\",\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.autoscaling.getAutoscalingPolicy({\n name: \"my_autoscaling_policy\",\n});" + }, + { + "language": "Ruby", + "code": "response = client.autoscaling.get_autoscaling_policy(\n name: \"my_autoscaling_policy\"\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->autoscaling()->getAutoscalingPolicy([\n \"name\" => \"my_autoscaling_policy\",\n]);" + }, + { + "language": "curl", + "code": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_autoscaling/policy/my_autoscaling_policy\"" + }, + { + "language": "Java", + "code": "client.autoscaling().getAutoscalingPolicy(g -> g\n .name(\"my_autoscaling_policy\")\n);\n" + } + ], + "specification/autoscaling/get_autoscaling_capacity/examples/request/GetAutoscalingCapacityRequestExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.autoscaling.get_autoscaling_capacity()" + }, + { + "language": "JavaScript", + "code": "const response = await client.autoscaling.getAutoscalingCapacity();" + }, + { + "language": "Ruby", + "code": "response = client.autoscaling.get_autoscaling_capacity" + }, + { + "language": "PHP", + "code": "$resp = $client->autoscaling()->getAutoscalingCapacity();" + }, + { + "language": "curl", + "code": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_autoscaling/capacity\"" + }, + { + "language": "Java", + "code": "client.autoscaling().getAutoscalingCapacity(g -> g);\n" + } + ], + "specification/search_application/render_query/examples/request/SearchApplicationsRenderQueryRequestExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.search_application.render_query(\n name=\"my-app\",\n params={\n \"query_string\": \"my first query\",\n \"text_fields\": [\n {\n \"name\": \"title\",\n \"boost\": 5\n },\n {\n \"name\": \"description\",\n \"boost\": 1\n }\n ]\n },\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.searchApplication.renderQuery({\n name: \"my-app\",\n params: {\n query_string: \"my first query\",\n text_fields: [\n {\n name: \"title\",\n boost: 5,\n },\n {\n name: \"description\",\n boost: 1,\n },\n ],\n },\n});" + }, + { + "language": "Ruby", + "code": "response = client.search_application.render_query(\n name: \"my-app\",\n body: {\n \"params\": {\n \"query_string\": \"my first query\",\n \"text_fields\": [\n {\n \"name\": \"title\",\n \"boost\": 5\n },\n {\n \"name\": \"description\",\n \"boost\": 1\n }\n ]\n }\n }\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->searchApplication()->renderQuery([\n \"name\" => \"my-app\",\n \"body\" => [\n \"params\" => [\n \"query_string\" => \"my first query\",\n \"text_fields\" => array(\n [\n \"name\" => \"title\",\n \"boost\" => 5,\n ],\n [\n \"name\" => \"description\",\n \"boost\" => 1,\n ],\n ),\n ],\n ],\n]);" + }, + { + "language": "curl", + "code": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"params\":{\"query_string\":\"my first query\",\"text_fields\":[{\"name\":\"title\",\"boost\":5},{\"name\":\"description\",\"boost\":1}]}}' \"$ELASTICSEARCH_URL/_application/search_application/my-app/_render_query\"" + }, + { + "language": "Java", + "code": "client.searchApplication().renderQuery(r -> r\n .name(\"my-app\")\n .params(Map.of(\"text_fields\", JsonData.fromJson(\"[{\\\"name\\\":\\\"title\\\",\\\"boost\\\":5},{\\\"name\\\":\\\"description\\\",\\\"boost\\\":1}]\"),\"query_string\", JsonData.fromJson(\"\\\"my first query\\\"\")))\n);\n" + } + ], + "specification/search_application/delete/examples/request/SearchApplicationDeleteExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.search_application.delete(\n name=\"my-app\",\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.searchApplication.delete({\n name: \"my-app\",\n});" + }, + { + "language": "Ruby", + "code": "response = client.search_application.delete(\n name: \"my-app\"\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->searchApplication()->delete([\n \"name\" => \"my-app\",\n]);" + }, + { + "language": "curl", + "code": "curl -X DELETE -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_application/search_application/my-app/\"" + }, + { + "language": "Java", + "code": "client.searchApplication().delete(d -> d\n .name(\"my-app\")\n);\n" + } + ], + "specification/search_application/put/examples/request/SearchApplicationPutRequestExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.search_application.put(\n name=\"my-app\",\n search_application={\n \"indices\": [\n \"index1\",\n \"index2\"\n ],\n \"template\": {\n \"script\": {\n \"source\": {\n \"query\": {\n \"query_string\": {\n \"query\": \"{{query_string}}\",\n \"default_field\": \"{{default_field}}\"\n }\n }\n },\n \"params\": {\n \"query_string\": \"*\",\n \"default_field\": \"*\"\n }\n },\n \"dictionary\": {\n \"properties\": {\n \"query_string\": {\n \"type\": \"string\"\n },\n \"default_field\": {\n \"type\": \"string\",\n \"enum\": [\n \"title\",\n \"description\"\n ]\n },\n \"additionalProperties\": False\n },\n \"required\": [\n \"query_string\"\n ]\n }\n }\n },\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.searchApplication.put({\n name: \"my-app\",\n search_application: {\n indices: [\"index1\", \"index2\"],\n template: {\n script: {\n source: {\n query: {\n query_string: {\n query: \"{{query_string}}\",\n default_field: \"{{default_field}}\",\n },\n },\n },\n params: {\n query_string: \"*\",\n default_field: \"*\",\n },\n },\n dictionary: {\n properties: {\n query_string: {\n type: \"string\",\n },\n default_field: {\n type: \"string\",\n enum: [\"title\", \"description\"],\n },\n additionalProperties: false,\n },\n required: [\"query_string\"],\n },\n },\n },\n});" + }, + { + "language": "Ruby", + "code": "response = client.search_application.put(\n name: \"my-app\",\n body: {\n \"indices\": [\n \"index1\",\n \"index2\"\n ],\n \"template\": {\n \"script\": {\n \"source\": {\n \"query\": {\n \"query_string\": {\n \"query\": \"{{query_string}}\",\n \"default_field\": \"{{default_field}}\"\n }\n }\n },\n \"params\": {\n \"query_string\": \"*\",\n \"default_field\": \"*\"\n }\n },\n \"dictionary\": {\n \"properties\": {\n \"query_string\": {\n \"type\": \"string\"\n },\n \"default_field\": {\n \"type\": \"string\",\n \"enum\": [\n \"title\",\n \"description\"\n ]\n },\n \"additionalProperties\": false\n },\n \"required\": [\n \"query_string\"\n ]\n }\n }\n }\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->searchApplication()->put([\n \"name\" => \"my-app\",\n \"body\" => [\n \"indices\" => array(\n \"index1\",\n \"index2\",\n ),\n \"template\" => [\n \"script\" => [\n \"source\" => [\n \"query\" => [\n \"query_string\" => [\n \"query\" => \"{{query_string}}\",\n \"default_field\" => \"{{default_field}}\",\n ],\n ],\n ],\n \"params\" => [\n \"query_string\" => \"*\",\n \"default_field\" => \"*\",\n ],\n ],\n \"dictionary\" => [\n \"properties\" => [\n \"query_string\" => [\n \"type\" => \"string\",\n ],\n \"default_field\" => [\n \"type\" => \"string\",\n \"enum\" => array(\n \"title\",\n \"description\",\n ),\n ],\n \"additionalProperties\" => false,\n ],\n \"required\" => array(\n \"query_string\",\n ),\n ],\n ],\n ],\n]);" + }, + { + "language": "curl", + "code": "curl -X PUT -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"indices\":[\"index1\",\"index2\"],\"template\":{\"script\":{\"source\":{\"query\":{\"query_string\":{\"query\":\"{{query_string}}\",\"default_field\":\"{{default_field}}\"}}},\"params\":{\"query_string\":\"*\",\"default_field\":\"*\"}},\"dictionary\":{\"properties\":{\"query_string\":{\"type\":\"string\"},\"default_field\":{\"type\":\"string\",\"enum\":[\"title\",\"description\"]},\"additionalProperties\":false},\"required\":[\"query_string\"]}}}' \"$ELASTICSEARCH_URL/_application/search_application/my-app\"" + }, + { + "language": "Java", + "code": "client.searchApplication().put(p -> p\n .name(\"my-app\")\n .searchApplication(s -> s\n .indices(List.of(\"index1\",\"index2\"))\n .template(t -> t\n .script(sc -> sc\n .source(so -> so\n .scriptTemplate(scr -> scr\n .query(q -> q\n .queryString(qu -> qu\n .defaultField(\"{{default_field}}\")\n .query(\"{{query_string}}\")\n )\n )\n )\n )\n .params(Map.of(\"default_field\", JsonData.fromJson(\"\\\"*\\\"\"),\"query_string\", JsonData.fromJson(\"\\\"*\\\"\")))\n )\n )\n )\n);\n" + } + ], + "specification/search_application/get/examples/request/SearchApplicationGetRequestExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.search_application.get(\n name=\"my-app\",\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.searchApplication.get({\n name: \"my-app\",\n});" + }, + { + "language": "Ruby", + "code": "response = client.search_application.get(\n name: \"my-app\"\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->searchApplication()->get([\n \"name\" => \"my-app\",\n]);" + }, + { + "language": "curl", + "code": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_application/search_application/my-app/\"" + }, + { + "language": "Java", + "code": "client.searchApplication().get(g -> g\n .name(\"my-app\")\n);\n" + } + ], + "specification/search_application/post_behavioral_analytics_event/examples/request/BehavioralAnalyticsEventPostRequestExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.search_application.post_behavioral_analytics_event(\n collection_name=\"my_analytics_collection\",\n event_type=\"search_click\",\n payload={\n \"session\": {\n \"id\": \"1797ca95-91c9-4e2e-b1bd-9c38e6f386a9\"\n },\n \"user\": {\n \"id\": \"5f26f01a-bbee-4202-9298-81261067abbd\"\n },\n \"search\": {\n \"query\": \"search term\",\n \"results\": {\n \"items\": [\n {\n \"document\": {\n \"id\": \"123\",\n \"index\": \"products\"\n }\n }\n ],\n \"total_results\": 10\n },\n \"sort\": {\n \"name\": \"relevance\"\n },\n \"search_application\": \"website\"\n },\n \"document\": {\n \"id\": \"123\",\n \"index\": \"products\"\n }\n },\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.searchApplication.postBehavioralAnalyticsEvent({\n collection_name: \"my_analytics_collection\",\n event_type: \"search_click\",\n payload: {\n session: {\n id: \"1797ca95-91c9-4e2e-b1bd-9c38e6f386a9\",\n },\n user: {\n id: \"5f26f01a-bbee-4202-9298-81261067abbd\",\n },\n search: {\n query: \"search term\",\n results: {\n items: [\n {\n document: {\n id: \"123\",\n index: \"products\",\n },\n },\n ],\n total_results: 10,\n },\n sort: {\n name: \"relevance\",\n },\n search_application: \"website\",\n },\n document: {\n id: \"123\",\n index: \"products\",\n },\n },\n});" + }, + { + "language": "Ruby", + "code": "response = client.search_application.post_behavioral_analytics_event(\n collection_name: \"my_analytics_collection\",\n event_type: \"search_click\",\n body: {\n \"session\": {\n \"id\": \"1797ca95-91c9-4e2e-b1bd-9c38e6f386a9\"\n },\n \"user\": {\n \"id\": \"5f26f01a-bbee-4202-9298-81261067abbd\"\n },\n \"search\": {\n \"query\": \"search term\",\n \"results\": {\n \"items\": [\n {\n \"document\": {\n \"id\": \"123\",\n \"index\": \"products\"\n }\n }\n ],\n \"total_results\": 10\n },\n \"sort\": {\n \"name\": \"relevance\"\n },\n \"search_application\": \"website\"\n },\n \"document\": {\n \"id\": \"123\",\n \"index\": \"products\"\n }\n }\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->searchApplication()->postBehavioralAnalyticsEvent([\n \"collection_name\" => \"my_analytics_collection\",\n \"event_type\" => \"search_click\",\n \"body\" => [\n \"session\" => [\n \"id\" => \"1797ca95-91c9-4e2e-b1bd-9c38e6f386a9\",\n ],\n \"user\" => [\n \"id\" => \"5f26f01a-bbee-4202-9298-81261067abbd\",\n ],\n \"search\" => [\n \"query\" => \"search term\",\n \"results\" => [\n \"items\" => array(\n [\n \"document\" => [\n \"id\" => \"123\",\n \"index\" => \"products\",\n ],\n ],\n ),\n \"total_results\" => 10,\n ],\n \"sort\" => [\n \"name\" => \"relevance\",\n ],\n \"search_application\" => \"website\",\n ],\n \"document\" => [\n \"id\" => \"123\",\n \"index\" => \"products\",\n ],\n ],\n]);" + }, + { + "language": "curl", + "code": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"session\":{\"id\":\"1797ca95-91c9-4e2e-b1bd-9c38e6f386a9\"},\"user\":{\"id\":\"5f26f01a-bbee-4202-9298-81261067abbd\"},\"search\":{\"query\":\"search term\",\"results\":{\"items\":[{\"document\":{\"id\":\"123\",\"index\":\"products\"}}],\"total_results\":10},\"sort\":{\"name\":\"relevance\"},\"search_application\":\"website\"},\"document\":{\"id\":\"123\",\"index\":\"products\"}}' \"$ELASTICSEARCH_URL/_application/analytics/my_analytics_collection/event/search_click\"" + }, + { + "language": "Java", + "code": "client.searchApplication().postBehavioralAnalyticsEvent(p -> p\n .collectionName(\"my_analytics_collection\")\n .eventType(EventType.SearchClick)\n .payload(JsonData.fromJson(\"{\\\"session\\\":{\\\"id\\\":\\\"1797ca95-91c9-4e2e-b1bd-9c38e6f386a9\\\"},\\\"user\\\":{\\\"id\\\":\\\"5f26f01a-bbee-4202-9298-81261067abbd\\\"},\\\"search\\\":{\\\"query\\\":\\\"search term\\\",\\\"results\\\":{\\\"items\\\":[{\\\"document\\\":{\\\"id\\\":\\\"123\\\",\\\"index\\\":\\\"products\\\"}}],\\\"total_results\\\":10},\\\"sort\\\":{\\\"name\\\":\\\"relevance\\\"},\\\"search_application\\\":\\\"website\\\"},\\\"document\\\":{\\\"id\\\":\\\"123\\\",\\\"index\\\":\\\"products\\\"}}\"))\n);\n" + } + ], + "specification/search_application/get_behavioral_analytics/examples/request/BehavioralAnalyticsGetRequestExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.search_application.get_behavioral_analytics(\n name=\"my*\",\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.searchApplication.getBehavioralAnalytics({\n name: \"my*\",\n});" + }, + { + "language": "Ruby", + "code": "response = client.search_application.get_behavioral_analytics(\n name: \"my*\"\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->searchApplication()->getBehavioralAnalytics([\n \"name\" => \"my*\",\n]);" + }, + { + "language": "curl", + "code": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_application/analytics/my*\"" + }, + { + "language": "Java", + "code": "client.searchApplication().getBehavioralAnalytics(g -> g\n .name(\"my*\")\n);\n" + } + ], + "specification/search_application/delete_behavioral_analytics/examples/request/SearchApplicationDeleteBehavioralAnalyticsExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.search_application.delete_behavioral_analytics(\n name=\"my_analytics_collection\",\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.searchApplication.deleteBehavioralAnalytics({\n name: \"my_analytics_collection\",\n});" + }, + { + "language": "Ruby", + "code": "response = client.search_application.delete_behavioral_analytics(\n name: \"my_analytics_collection\"\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->searchApplication()->deleteBehavioralAnalytics([\n \"name\" => \"my_analytics_collection\",\n]);" + }, + { + "language": "curl", + "code": "curl -X DELETE -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_application/analytics/my_analytics_collection/\"" + }, + { + "language": "Java", + "code": "client.searchApplication().deleteBehavioralAnalytics(d -> d\n .name(\"my_analytics_collection\")\n);\n" + } + ], + "specification/search_application/put_behavioral_analytics/examples/request/SearchApplicationPutBehavioralAnalyticsExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.search_application.put_behavioral_analytics(\n name=\"my_analytics_collection\",\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.searchApplication.putBehavioralAnalytics({\n name: \"my_analytics_collection\",\n});" + }, + { + "language": "Ruby", + "code": "response = client.search_application.put_behavioral_analytics(\n name: \"my_analytics_collection\"\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->searchApplication()->putBehavioralAnalytics([\n \"name\" => \"my_analytics_collection\",\n]);" + }, + { + "language": "curl", + "code": "curl -X PUT -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_application/analytics/my_analytics_collection\"" + }, + { + "language": "Java", + "code": "client.searchApplication().putBehavioralAnalytics(p -> p\n .name(\"my_analytics_collection\")\n);\n" + } + ], + "specification/search_application/search/examples/request/SearchApplicationsSearchRequestExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.search_application.search(\n name=\"my-app\",\n params={\n \"query_string\": \"my first query\",\n \"text_fields\": [\n {\n \"name\": \"title\",\n \"boost\": 5\n },\n {\n \"name\": \"description\",\n \"boost\": 1\n }\n ]\n },\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.searchApplication.search({\n name: \"my-app\",\n params: {\n query_string: \"my first query\",\n text_fields: [\n {\n name: \"title\",\n boost: 5,\n },\n {\n name: \"description\",\n boost: 1,\n },\n ],\n },\n});" + }, + { + "language": "Ruby", + "code": "response = client.search_application.search(\n name: \"my-app\",\n body: {\n \"params\": {\n \"query_string\": \"my first query\",\n \"text_fields\": [\n {\n \"name\": \"title\",\n \"boost\": 5\n },\n {\n \"name\": \"description\",\n \"boost\": 1\n }\n ]\n }\n }\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->searchApplication()->search([\n \"name\" => \"my-app\",\n \"body\" => [\n \"params\" => [\n \"query_string\" => \"my first query\",\n \"text_fields\" => array(\n [\n \"name\" => \"title\",\n \"boost\" => 5,\n ],\n [\n \"name\" => \"description\",\n \"boost\" => 1,\n ],\n ),\n ],\n ],\n]);" + }, + { + "language": "curl", + "code": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"params\":{\"query_string\":\"my first query\",\"text_fields\":[{\"name\":\"title\",\"boost\":5},{\"name\":\"description\",\"boost\":1}]}}' \"$ELASTICSEARCH_URL/_application/search_application/my-app/_search\"" + }, + { + "language": "Java", + "code": "client.searchApplication().search(s -> s\n .name(\"my-app\")\n .params(Map.of(\"text_fields\", JsonData.fromJson(\"[{\\\"name\\\":\\\"title\\\",\\\"boost\\\":5},{\\\"name\\\":\\\"description\\\",\\\"boost\\\":1}]\"),\"query_string\", JsonData.fromJson(\"\\\"my first query\\\"\")))\n);\n" + } + ], + "specification/search_application/list/examples/request/SearchApplicationsListRequestExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.search_application.list(\n from=\"0\",\n size=\"3\",\n q=\"app*\",\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.searchApplication.list({\n from: 0,\n size: 3,\n q: \"app*\",\n});" + }, + { + "language": "Ruby", + "code": "response = client.search_application.list(\n from: \"0\",\n size: \"3\",\n q: \"app*\"\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->searchApplication()->list([\n \"from\" => \"0\",\n \"size\" => \"3\",\n \"q\" => \"app*\",\n]);" + }, + { + "language": "curl", + "code": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_application/search_application?from=0&size=3&q=app*\"" + }, + { + "language": "Java", + "code": "client.searchApplication().list(l -> l\n .from(0)\n .q(\"app*\")\n .size(3)\n);\n" + } + ], + "specification/migration/get_feature_upgrade_status/examples/request/GetFeatureUpgradeStatusRequestExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.migration.get_feature_upgrade_status()" + }, + { + "language": "JavaScript", + "code": "const response = await client.migration.getFeatureUpgradeStatus();" + }, + { + "language": "Ruby", + "code": "response = client.migration.get_feature_upgrade_status" + }, + { + "language": "PHP", + "code": "$resp = $client->migration()->getFeatureUpgradeStatus();" + }, + { + "language": "curl", + "code": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_migration/system_features\"" + }, + { + "language": "Java", + "code": "client.migration().getFeatureUpgradeStatus();\n" + } + ], + "specification/migration/post_feature_upgrade/examples/request/PostFeatureUpgradeRequestExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.migration.post_feature_upgrade()" + }, + { + "language": "JavaScript", + "code": "const response = await client.migration.postFeatureUpgrade();" + }, + { + "language": "Ruby", + "code": "response = client.migration.post_feature_upgrade" + }, + { + "language": "PHP", + "code": "$resp = $client->migration()->postFeatureUpgrade();" + }, + { + "language": "curl", + "code": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_migration/system_features\"" + }, + { + "language": "Java", + "code": "client.migration().postFeatureUpgrade();\n" + } + ], + "specification/migration/deprecations/examples/request/DeprecationInfoRequestExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.migration.deprecations()" + }, + { + "language": "JavaScript", + "code": "const response = await client.migration.deprecations();" + }, + { + "language": "Ruby", + "code": "response = client.migration.deprecations" + }, + { + "language": "PHP", + "code": "$resp = $client->migration()->deprecations();" + }, + { + "language": "curl", + "code": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_migration/deprecations\"" + }, + { + "language": "Java", + "code": "client.migration().deprecations(d -> d);\n" + } + ], + "specification/transform/start_transform/examples/request/TransformStartTransformExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.transform.start_transform(\n transform_id=\"ecommerce-customer-transform\",\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.transform.startTransform({\n transform_id: \"ecommerce-customer-transform\",\n});" + }, + { + "language": "Ruby", + "code": "response = client.transform.start_transform(\n transform_id: \"ecommerce-customer-transform\"\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->transform()->startTransform([\n \"transform_id\" => \"ecommerce-customer-transform\",\n]);" + }, + { + "language": "curl", + "code": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_transform/ecommerce-customer-transform/_start\"" + }, + { + "language": "Java", + "code": "client.transform().startTransform(s -> s\n .transformId(\"ecommerce-customer-transform\")\n);\n" + } + ], + "specification/transform/schedule_now_transform/examples/request/TransformScheduleNowTransformExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.transform.schedule_now_transform(\n transform_id=\"ecommerce_transform\",\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.transform.scheduleNowTransform({\n transform_id: \"ecommerce_transform\",\n});" + }, + { + "language": "Ruby", + "code": "response = client.transform.schedule_now_transform(\n transform_id: \"ecommerce_transform\"\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->transform()->scheduleNowTransform([\n \"transform_id\" => \"ecommerce_transform\",\n]);" + }, + { + "language": "curl", + "code": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_transform/ecommerce_transform/_schedule_now\"" + }, + { + "language": "Java", + "code": "client.transform().scheduleNowTransform(s -> s\n .transformId(\"ecommerce_transform\")\n);\n" + } + ], + "specification/transform/get_transform/examples/request/TransformGetTransformExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.transform.get_transform(\n size=\"10\",\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.transform.getTransform({\n size: 10,\n});" + }, + { + "language": "Ruby", + "code": "response = client.transform.get_transform(\n size: \"10\"\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->transform()->getTransform([\n \"size\" => \"10\",\n]);" + }, + { + "language": "curl", + "code": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_transform?size=10\"" + }, + { + "language": "Java", + "code": "client.transform().getTransform(g -> g\n .size(10)\n);\n" + } + ], + "specification/transform/upgrade_transforms/examples/request/TransformUpgradeTransformsExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.transform.upgrade_transforms()" + }, + { + "language": "JavaScript", + "code": "const response = await client.transform.upgradeTransforms();" + }, + { + "language": "Ruby", + "code": "response = client.transform.upgrade_transforms" + }, + { + "language": "PHP", + "code": "$resp = $client->transform()->upgradeTransforms();" + }, + { + "language": "curl", + "code": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_transform/_upgrade\"" + }, + { + "language": "Java", + "code": "client.transform().upgradeTransforms(u -> u);\n" + } + ], + "specification/transform/preview_transform/examples/request/PreviewTransformRequestExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.transform.preview_transform(\n source={\n \"index\": \"kibana_sample_data_ecommerce\"\n },\n pivot={\n \"group_by\": {\n \"customer_id\": {\n \"terms\": {\n \"field\": \"customer_id\",\n \"missing_bucket\": True\n }\n }\n },\n \"aggregations\": {\n \"max_price\": {\n \"max\": {\n \"field\": \"taxful_total_price\"\n }\n }\n }\n },\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.transform.previewTransform({\n source: {\n index: \"kibana_sample_data_ecommerce\",\n },\n pivot: {\n group_by: {\n customer_id: {\n terms: {\n field: \"customer_id\",\n missing_bucket: true,\n },\n },\n },\n aggregations: {\n max_price: {\n max: {\n field: \"taxful_total_price\",\n },\n },\n },\n },\n});" + }, + { + "language": "Ruby", + "code": "response = client.transform.preview_transform(\n body: {\n \"source\": {\n \"index\": \"kibana_sample_data_ecommerce\"\n },\n \"pivot\": {\n \"group_by\": {\n \"customer_id\": {\n \"terms\": {\n \"field\": \"customer_id\",\n \"missing_bucket\": true\n }\n }\n },\n \"aggregations\": {\n \"max_price\": {\n \"max\": {\n \"field\": \"taxful_total_price\"\n }\n }\n }\n }\n }\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->transform()->previewTransform([\n \"body\" => [\n \"source\" => [\n \"index\" => \"kibana_sample_data_ecommerce\",\n ],\n \"pivot\" => [\n \"group_by\" => [\n \"customer_id\" => [\n \"terms\" => [\n \"field\" => \"customer_id\",\n \"missing_bucket\" => true,\n ],\n ],\n ],\n \"aggregations\" => [\n \"max_price\" => [\n \"max\" => [\n \"field\" => \"taxful_total_price\",\n ],\n ],\n ],\n ],\n ],\n]);" + }, + { + "language": "curl", + "code": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"source\":{\"index\":\"kibana_sample_data_ecommerce\"},\"pivot\":{\"group_by\":{\"customer_id\":{\"terms\":{\"field\":\"customer_id\",\"missing_bucket\":true}}},\"aggregations\":{\"max_price\":{\"max\":{\"field\":\"taxful_total_price\"}}}}}' \"$ELASTICSEARCH_URL/_transform/_preview\"" + }, + { + "language": "Java", + "code": "client.transform().previewTransform(p -> p\n .pivot(pi -> pi\n .aggregations(\"max_price\", a -> a\n .max(m -> m\n .field(\"taxful_total_price\")\n )\n )\n .groupBy(\"customer_id\", g -> g\n .terms(t -> t\n .field(\"customer_id\")\n .missingBucket(true)\n )\n )\n )\n .source(s -> s\n .index(\"kibana_sample_data_ecommerce\")\n )\n);\n" + } + ], + "specification/transform/put_transform/examples/request/PutTransformRequestExample2.yaml": [ + { + "language": "Python", + "code": "resp = client.transform.put_transform(\n transform_id=\"ecommerce_transform2\",\n source={\n \"index\": \"kibana_sample_data_ecommerce\"\n },\n latest={\n \"unique_key\": [\n \"customer_id\"\n ],\n \"sort\": \"order_date\"\n },\n description=\"Latest order for each customer\",\n dest={\n \"index\": \"kibana_sample_data_ecommerce_transform2\"\n },\n frequency=\"5m\",\n sync={\n \"time\": {\n \"field\": \"order_date\",\n \"delay\": \"60s\"\n }\n },\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.transform.putTransform({\n transform_id: \"ecommerce_transform2\",\n source: {\n index: \"kibana_sample_data_ecommerce\",\n },\n latest: {\n unique_key: [\"customer_id\"],\n sort: \"order_date\",\n },\n description: \"Latest order for each customer\",\n dest: {\n index: \"kibana_sample_data_ecommerce_transform2\",\n },\n frequency: \"5m\",\n sync: {\n time: {\n field: \"order_date\",\n delay: \"60s\",\n },\n },\n});" + }, + { + "language": "Ruby", + "code": "response = client.transform.put_transform(\n transform_id: \"ecommerce_transform2\",\n body: {\n \"source\": {\n \"index\": \"kibana_sample_data_ecommerce\"\n },\n \"latest\": {\n \"unique_key\": [\n \"customer_id\"\n ],\n \"sort\": \"order_date\"\n },\n \"description\": \"Latest order for each customer\",\n \"dest\": {\n \"index\": \"kibana_sample_data_ecommerce_transform2\"\n },\n \"frequency\": \"5m\",\n \"sync\": {\n \"time\": {\n \"field\": \"order_date\",\n \"delay\": \"60s\"\n }\n }\n }\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->transform()->putTransform([\n \"transform_id\" => \"ecommerce_transform2\",\n \"body\" => [\n \"source\" => [\n \"index\" => \"kibana_sample_data_ecommerce\",\n ],\n \"latest\" => [\n \"unique_key\" => array(\n \"customer_id\",\n ),\n \"sort\" => \"order_date\",\n ],\n \"description\" => \"Latest order for each customer\",\n \"dest\" => [\n \"index\" => \"kibana_sample_data_ecommerce_transform2\",\n ],\n \"frequency\" => \"5m\",\n \"sync\" => [\n \"time\" => [\n \"field\" => \"order_date\",\n \"delay\" => \"60s\",\n ],\n ],\n ],\n]);" + }, + { + "language": "curl", + "code": "curl -X PUT -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"source\":{\"index\":\"kibana_sample_data_ecommerce\"},\"latest\":{\"unique_key\":[\"customer_id\"],\"sort\":\"order_date\"},\"description\":\"Latest order for each customer\",\"dest\":{\"index\":\"kibana_sample_data_ecommerce_transform2\"},\"frequency\":\"5m\",\"sync\":{\"time\":{\"field\":\"order_date\",\"delay\":\"60s\"}}}' \"$ELASTICSEARCH_URL/_transform/ecommerce_transform2\"" + }, + { + "language": "Java", + "code": "client.transform().putTransform(p -> p\n .description(\"Latest order for each customer\")\n .dest(d -> d\n .index(\"kibana_sample_data_ecommerce_transform2\")\n )\n .frequency(f -> f\n .time(\"5m\")\n )\n .latest(l -> l\n .sort(\"order_date\")\n .uniqueKey(\"customer_id\")\n )\n .source(s -> s\n .index(\"kibana_sample_data_ecommerce\")\n )\n .sync(s -> s\n .time(t -> t\n .delay(d -> d\n .time(\"60s\")\n )\n .field(\"order_date\")\n )\n )\n .transformId(\"ecommerce_transform2\")\n);\n" + } + ], + "specification/transform/put_transform/examples/request/PutTransformRequestExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.transform.put_transform(\n transform_id=\"ecommerce_transform1\",\n source={\n \"index\": \"kibana_sample_data_ecommerce\",\n \"query\": {\n \"term\": {\n \"geoip.continent_name\": {\n \"value\": \"Asia\"\n }\n }\n }\n },\n pivot={\n \"group_by\": {\n \"customer_id\": {\n \"terms\": {\n \"field\": \"customer_id\",\n \"missing_bucket\": True\n }\n }\n },\n \"aggregations\": {\n \"max_price\": {\n \"max\": {\n \"field\": \"taxful_total_price\"\n }\n }\n }\n },\n description=\"Maximum priced ecommerce data by customer_id in Asia\",\n dest={\n \"index\": \"kibana_sample_data_ecommerce_transform1\",\n \"pipeline\": \"add_timestamp_pipeline\"\n },\n frequency=\"5m\",\n sync={\n \"time\": {\n \"field\": \"order_date\",\n \"delay\": \"60s\"\n }\n },\n retention_policy={\n \"time\": {\n \"field\": \"order_date\",\n \"max_age\": \"30d\"\n }\n },\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.transform.putTransform({\n transform_id: \"ecommerce_transform1\",\n source: {\n index: \"kibana_sample_data_ecommerce\",\n query: {\n term: {\n \"geoip.continent_name\": {\n value: \"Asia\",\n },\n },\n },\n },\n pivot: {\n group_by: {\n customer_id: {\n terms: {\n field: \"customer_id\",\n missing_bucket: true,\n },\n },\n },\n aggregations: {\n max_price: {\n max: {\n field: \"taxful_total_price\",\n },\n },\n },\n },\n description: \"Maximum priced ecommerce data by customer_id in Asia\",\n dest: {\n index: \"kibana_sample_data_ecommerce_transform1\",\n pipeline: \"add_timestamp_pipeline\",\n },\n frequency: \"5m\",\n sync: {\n time: {\n field: \"order_date\",\n delay: \"60s\",\n },\n },\n retention_policy: {\n time: {\n field: \"order_date\",\n max_age: \"30d\",\n },\n },\n});" + }, + { + "language": "Ruby", + "code": "response = client.transform.put_transform(\n transform_id: \"ecommerce_transform1\",\n body: {\n \"source\": {\n \"index\": \"kibana_sample_data_ecommerce\",\n \"query\": {\n \"term\": {\n \"geoip.continent_name\": {\n \"value\": \"Asia\"\n }\n }\n }\n },\n \"pivot\": {\n \"group_by\": {\n \"customer_id\": {\n \"terms\": {\n \"field\": \"customer_id\",\n \"missing_bucket\": true\n }\n }\n },\n \"aggregations\": {\n \"max_price\": {\n \"max\": {\n \"field\": \"taxful_total_price\"\n }\n }\n }\n },\n \"description\": \"Maximum priced ecommerce data by customer_id in Asia\",\n \"dest\": {\n \"index\": \"kibana_sample_data_ecommerce_transform1\",\n \"pipeline\": \"add_timestamp_pipeline\"\n },\n \"frequency\": \"5m\",\n \"sync\": {\n \"time\": {\n \"field\": \"order_date\",\n \"delay\": \"60s\"\n }\n },\n \"retention_policy\": {\n \"time\": {\n \"field\": \"order_date\",\n \"max_age\": \"30d\"\n }\n }\n }\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->transform()->putTransform([\n \"transform_id\" => \"ecommerce_transform1\",\n \"body\" => [\n \"source\" => [\n \"index\" => \"kibana_sample_data_ecommerce\",\n \"query\" => [\n \"term\" => [\n \"geoip.continent_name\" => [\n \"value\" => \"Asia\",\n ],\n ],\n ],\n ],\n \"pivot\" => [\n \"group_by\" => [\n \"customer_id\" => [\n \"terms\" => [\n \"field\" => \"customer_id\",\n \"missing_bucket\" => true,\n ],\n ],\n ],\n \"aggregations\" => [\n \"max_price\" => [\n \"max\" => [\n \"field\" => \"taxful_total_price\",\n ],\n ],\n ],\n ],\n \"description\" => \"Maximum priced ecommerce data by customer_id in Asia\",\n \"dest\" => [\n \"index\" => \"kibana_sample_data_ecommerce_transform1\",\n \"pipeline\" => \"add_timestamp_pipeline\",\n ],\n \"frequency\" => \"5m\",\n \"sync\" => [\n \"time\" => [\n \"field\" => \"order_date\",\n \"delay\" => \"60s\",\n ],\n ],\n \"retention_policy\" => [\n \"time\" => [\n \"field\" => \"order_date\",\n \"max_age\" => \"30d\",\n ],\n ],\n ],\n]);" + }, + { + "language": "curl", + "code": "curl -X PUT -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"source\":{\"index\":\"kibana_sample_data_ecommerce\",\"query\":{\"term\":{\"geoip.continent_name\":{\"value\":\"Asia\"}}}},\"pivot\":{\"group_by\":{\"customer_id\":{\"terms\":{\"field\":\"customer_id\",\"missing_bucket\":true}}},\"aggregations\":{\"max_price\":{\"max\":{\"field\":\"taxful_total_price\"}}}},\"description\":\"Maximum priced ecommerce data by customer_id in Asia\",\"dest\":{\"index\":\"kibana_sample_data_ecommerce_transform1\",\"pipeline\":\"add_timestamp_pipeline\"},\"frequency\":\"5m\",\"sync\":{\"time\":{\"field\":\"order_date\",\"delay\":\"60s\"}},\"retention_policy\":{\"time\":{\"field\":\"order_date\",\"max_age\":\"30d\"}}}' \"$ELASTICSEARCH_URL/_transform/ecommerce_transform1\"" + }, + { + "language": "Java", + "code": "client.transform().putTransform(p -> p\n .description(\"Maximum priced ecommerce data by customer_id in Asia\")\n .dest(d -> d\n .index(\"kibana_sample_data_ecommerce_transform1\")\n .pipeline(\"add_timestamp_pipeline\")\n )\n .frequency(f -> f\n .time(\"5m\")\n )\n .pivot(pi -> pi\n .aggregations(\"max_price\", a -> a\n .max(m -> m\n .field(\"taxful_total_price\")\n )\n )\n .groupBy(\"customer_id\", g -> g\n .terms(t -> t\n .field(\"customer_id\")\n .missingBucket(true)\n )\n )\n )\n .retentionPolicy(r -> r\n .time(t -> t\n .field(\"order_date\")\n .maxAge(m -> m\n .time(\"30d\")\n )\n )\n )\n .source(s -> s\n .index(\"kibana_sample_data_ecommerce\")\n .query(q -> q\n .term(te -> te\n .field(\"geoip.continent_name\")\n .value(FieldValue.of(\"Asia\"))\n )\n )\n )\n .sync(sy -> sy\n .time(ti -> ti\n .delay(d -> d\n .time(\"60s\")\n )\n .field(\"order_date\")\n )\n )\n .transformId(\"ecommerce_transform1\")\n);\n" + } + ], + "specification/transform/update_transform/examples/request/UpdateTransformRequestExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.transform.update_transform(\n transform_id=\"simple-kibana-ecomm-pivot\",\n source={\n \"index\": \"kibana_sample_data_ecommerce\",\n \"query\": {\n \"term\": {\n \"geoip.continent_name\": {\n \"value\": \"Asia\"\n }\n }\n }\n },\n pivot={\n \"group_by\": {\n \"customer_id\": {\n \"terms\": {\n \"field\": \"customer_id\",\n \"missing_bucket\": True\n }\n }\n },\n \"aggregations\": {\n \"max_price\": {\n \"max\": {\n \"field\": \"taxful_total_price\"\n }\n }\n }\n },\n description=\"Maximum priced ecommerce data by customer_id in Asia\",\n dest={\n \"index\": \"kibana_sample_data_ecommerce_transform1\",\n \"pipeline\": \"add_timestamp_pipeline\"\n },\n frequency=\"5m\",\n sync={\n \"time\": {\n \"field\": \"order_date\",\n \"delay\": \"60s\"\n }\n },\n retention_policy={\n \"time\": {\n \"field\": \"order_date\",\n \"max_age\": \"30d\"\n }\n },\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.transform.updateTransform({\n transform_id: \"simple-kibana-ecomm-pivot\",\n source: {\n index: \"kibana_sample_data_ecommerce\",\n query: {\n term: {\n \"geoip.continent_name\": {\n value: \"Asia\",\n },\n },\n },\n },\n pivot: {\n group_by: {\n customer_id: {\n terms: {\n field: \"customer_id\",\n missing_bucket: true,\n },\n },\n },\n aggregations: {\n max_price: {\n max: {\n field: \"taxful_total_price\",\n },\n },\n },\n },\n description: \"Maximum priced ecommerce data by customer_id in Asia\",\n dest: {\n index: \"kibana_sample_data_ecommerce_transform1\",\n pipeline: \"add_timestamp_pipeline\",\n },\n frequency: \"5m\",\n sync: {\n time: {\n field: \"order_date\",\n delay: \"60s\",\n },\n },\n retention_policy: {\n time: {\n field: \"order_date\",\n max_age: \"30d\",\n },\n },\n});" + }, + { + "language": "Ruby", + "code": "response = client.transform.update_transform(\n transform_id: \"simple-kibana-ecomm-pivot\",\n body: {\n \"source\": {\n \"index\": \"kibana_sample_data_ecommerce\",\n \"query\": {\n \"term\": {\n \"geoip.continent_name\": {\n \"value\": \"Asia\"\n }\n }\n }\n },\n \"pivot\": {\n \"group_by\": {\n \"customer_id\": {\n \"terms\": {\n \"field\": \"customer_id\",\n \"missing_bucket\": true\n }\n }\n },\n \"aggregations\": {\n \"max_price\": {\n \"max\": {\n \"field\": \"taxful_total_price\"\n }\n }\n }\n },\n \"description\": \"Maximum priced ecommerce data by customer_id in Asia\",\n \"dest\": {\n \"index\": \"kibana_sample_data_ecommerce_transform1\",\n \"pipeline\": \"add_timestamp_pipeline\"\n },\n \"frequency\": \"5m\",\n \"sync\": {\n \"time\": {\n \"field\": \"order_date\",\n \"delay\": \"60s\"\n }\n },\n \"retention_policy\": {\n \"time\": {\n \"field\": \"order_date\",\n \"max_age\": \"30d\"\n }\n }\n }\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->transform()->updateTransform([\n \"transform_id\" => \"simple-kibana-ecomm-pivot\",\n \"body\" => [\n \"source\" => [\n \"index\" => \"kibana_sample_data_ecommerce\",\n \"query\" => [\n \"term\" => [\n \"geoip.continent_name\" => [\n \"value\" => \"Asia\",\n ],\n ],\n ],\n ],\n \"pivot\" => [\n \"group_by\" => [\n \"customer_id\" => [\n \"terms\" => [\n \"field\" => \"customer_id\",\n \"missing_bucket\" => true,\n ],\n ],\n ],\n \"aggregations\" => [\n \"max_price\" => [\n \"max\" => [\n \"field\" => \"taxful_total_price\",\n ],\n ],\n ],\n ],\n \"description\" => \"Maximum priced ecommerce data by customer_id in Asia\",\n \"dest\" => [\n \"index\" => \"kibana_sample_data_ecommerce_transform1\",\n \"pipeline\" => \"add_timestamp_pipeline\",\n ],\n \"frequency\" => \"5m\",\n \"sync\" => [\n \"time\" => [\n \"field\" => \"order_date\",\n \"delay\" => \"60s\",\n ],\n ],\n \"retention_policy\" => [\n \"time\" => [\n \"field\" => \"order_date\",\n \"max_age\" => \"30d\",\n ],\n ],\n ],\n]);" + }, + { + "language": "curl", + "code": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"source\":{\"index\":\"kibana_sample_data_ecommerce\",\"query\":{\"term\":{\"geoip.continent_name\":{\"value\":\"Asia\"}}}},\"pivot\":{\"group_by\":{\"customer_id\":{\"terms\":{\"field\":\"customer_id\",\"missing_bucket\":true}}},\"aggregations\":{\"max_price\":{\"max\":{\"field\":\"taxful_total_price\"}}}},\"description\":\"Maximum priced ecommerce data by customer_id in Asia\",\"dest\":{\"index\":\"kibana_sample_data_ecommerce_transform1\",\"pipeline\":\"add_timestamp_pipeline\"},\"frequency\":\"5m\",\"sync\":{\"time\":{\"field\":\"order_date\",\"delay\":\"60s\"}},\"retention_policy\":{\"time\":{\"field\":\"order_date\",\"max_age\":\"30d\"}}}' \"$ELASTICSEARCH_URL/_transform/simple-kibana-ecomm-pivot/_update\"" + }, + { + "language": "Java", + "code": "client.transform().updateTransform(u -> u\n .description(\"Maximum priced ecommerce data by customer_id in Asia\")\n .dest(d -> d\n .index(\"kibana_sample_data_ecommerce_transform1\")\n .pipeline(\"add_timestamp_pipeline\")\n )\n .frequency(f -> f\n .time(\"5m\")\n )\n .retentionPolicy(r -> r\n .time(t -> t\n .field(\"order_date\")\n .maxAge(m -> m\n .time(\"30d\")\n )\n )\n )\n .source(s -> s\n .index(\"kibana_sample_data_ecommerce\")\n .query(q -> q\n .term(te -> te\n .field(\"geoip.continent_name\")\n .value(FieldValue.of(\"Asia\"))\n )\n )\n )\n .sync(sy -> sy\n .time(ti -> ti\n .delay(d -> d\n .time(\"60s\")\n )\n .field(\"order_date\")\n )\n )\n .transformId(\"simple-kibana-ecomm-pivot\")\n);\n" + } + ], + "specification/transform/reset_transform/examples/request/TransformResetTransformExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.transform.reset_transform(\n transform_id=\"ecommerce_transform\",\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.transform.resetTransform({\n transform_id: \"ecommerce_transform\",\n});" + }, + { + "language": "Ruby", + "code": "response = client.transform.reset_transform(\n transform_id: \"ecommerce_transform\"\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->transform()->resetTransform([\n \"transform_id\" => \"ecommerce_transform\",\n]);" + }, + { + "language": "curl", + "code": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_transform/ecommerce_transform/_reset\"" + }, + { + "language": "Java", + "code": "client.transform().resetTransform(r -> r\n .transformId(\"ecommerce_transform\")\n);\n" + } + ], + "specification/transform/stop_transform/examples/request/TransformStopTransformExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.transform.stop_transform(\n transform_id=\"ecommerce_transform\",\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.transform.stopTransform({\n transform_id: \"ecommerce_transform\",\n});" + }, + { + "language": "Ruby", + "code": "response = client.transform.stop_transform(\n transform_id: \"ecommerce_transform\"\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->transform()->stopTransform([\n \"transform_id\" => \"ecommerce_transform\",\n]);" + }, + { + "language": "curl", + "code": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_transform/ecommerce_transform/_stop\"" + }, + { + "language": "Java", + "code": "client.transform().stopTransform(s -> s\n .transformId(\"ecommerce_transform\")\n);\n" + } + ], + "specification/transform/get_transform_stats/examples/request/TransformGetTransformStatsExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.transform.get_transform_stats(\n transform_id=\"ecommerce-customer-transform\",\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.transform.getTransformStats({\n transform_id: \"ecommerce-customer-transform\",\n});" + }, + { + "language": "Ruby", + "code": "response = client.transform.get_transform_stats(\n transform_id: \"ecommerce-customer-transform\"\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->transform()->getTransformStats([\n \"transform_id\" => \"ecommerce-customer-transform\",\n]);" + }, + { + "language": "curl", + "code": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_transform/ecommerce-customer-transform/_stats\"" + }, + { + "language": "Java", + "code": "client.transform().getTransformStats(g -> g\n .transformId(\"ecommerce-customer-transform\")\n);\n" + } + ], + "specification/transform/delete_transform/examples/request/TransformDeleteTransformExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.transform.delete_transform(\n transform_id=\"ecommerce_transform\",\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.transform.deleteTransform({\n transform_id: \"ecommerce_transform\",\n});" + }, + { + "language": "Ruby", + "code": "response = client.transform.delete_transform(\n transform_id: \"ecommerce_transform\"\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->transform()->deleteTransform([\n \"transform_id\" => \"ecommerce_transform\",\n]);" + }, + { + "language": "curl", + "code": "curl -X DELETE -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_transform/ecommerce_transform\"" + }, + { + "language": "Java", + "code": "client.transform().deleteTransform(d -> d\n .transformId(\"ecommerce_transform\")\n);\n" + } + ], + "specification/ccr/forget_follower/examples/request/ForgetFollowerIndexRequestExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.ccr.forget_follower(\n index=\"\",\n follower_cluster=\"\",\n follower_index=\"\",\n follower_index_uuid=\"\",\n leader_remote_cluster=\"\",\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.ccr.forgetFollower({\n index: \"\",\n follower_cluster: \"\",\n follower_index: \"\",\n follower_index_uuid: \"\",\n leader_remote_cluster: \"\",\n});" + }, + { + "language": "Ruby", + "code": "response = client.ccr.forget_follower(\n index: \"\",\n body: {\n \"follower_cluster\": \"\",\n \"follower_index\": \"\",\n \"follower_index_uuid\": \"\",\n \"leader_remote_cluster\": \"\"\n }\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->ccr()->forgetFollower([\n \"index\" => \"\",\n \"body\" => [\n \"follower_cluster\" => \"\",\n \"follower_index\" => \"\",\n \"follower_index_uuid\" => \"\",\n \"leader_remote_cluster\" => \"\",\n ],\n]);" + }, + { + "language": "curl", + "code": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"follower_cluster\":\"\",\"follower_index\":\"\",\"follower_index_uuid\":\"\",\"leader_remote_cluster\":\"\"}' \"$ELASTICSEARCH_URL//_ccr/forget_follower\"" + }, + { + "language": "Java", + "code": "client.ccr().forgetFollower(f -> f\n .followerCluster(\"\")\n .followerIndex(\"\")\n .followerIndexUuid(\"\")\n .index(\"\")\n .leaderRemoteCluster(\"\")\n);\n" + } + ], + "specification/ccr/delete_auto_follow_pattern/examples/request/DeleteAutoFollowPatternRequestExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.ccr.delete_auto_follow_pattern(\n name=\"my_auto_follow_pattern\",\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.ccr.deleteAutoFollowPattern({\n name: \"my_auto_follow_pattern\",\n});" + }, + { + "language": "Ruby", + "code": "response = client.ccr.delete_auto_follow_pattern(\n name: \"my_auto_follow_pattern\"\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->ccr()->deleteAutoFollowPattern([\n \"name\" => \"my_auto_follow_pattern\",\n]);" + }, + { + "language": "curl", + "code": "curl -X DELETE -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_ccr/auto_follow/my_auto_follow_pattern\"" + }, + { + "language": "Java", + "code": "client.ccr().deleteAutoFollowPattern(d -> d\n .name(\"my_auto_follow_pattern\")\n);\n" + } + ], + "specification/ccr/resume_auto_follow_pattern/examples/request/ResumeAutoFollowPatternRequestExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.ccr.resume_auto_follow_pattern(\n name=\"my_auto_follow_pattern\",\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.ccr.resumeAutoFollowPattern({\n name: \"my_auto_follow_pattern\",\n});" + }, + { + "language": "Ruby", + "code": "response = client.ccr.resume_auto_follow_pattern(\n name: \"my_auto_follow_pattern\"\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->ccr()->resumeAutoFollowPattern([\n \"name\" => \"my_auto_follow_pattern\",\n]);" + }, + { + "language": "curl", + "code": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_ccr/auto_follow/my_auto_follow_pattern/resume\"" + }, + { + "language": "Java", + "code": "client.ccr().resumeAutoFollowPattern(r -> r\n .name(\"my_auto_follow_pattern\")\n);\n" + } + ], + "specification/ccr/pause_follow/examples/request/PauseFollowIndexRequestExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.ccr.pause_follow(\n index=\"follower_index\",\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.ccr.pauseFollow({\n index: \"follower_index\",\n});" + }, + { + "language": "Ruby", + "code": "response = client.ccr.pause_follow(\n index: \"follower_index\"\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->ccr()->pauseFollow([\n \"index\" => \"follower_index\",\n]);" + }, + { + "language": "curl", + "code": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/follower_index/_ccr/pause_follow\"" + }, + { + "language": "Java", + "code": "client.ccr().pauseFollow(p -> p\n .index(\"follower_index\")\n);\n" + } + ], + "specification/ccr/follow/examples/request/CreateFollowIndexRequestExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.ccr.follow(\n index=\"follower_index\",\n wait_for_active_shards=\"1\",\n remote_cluster=\"remote_cluster\",\n leader_index=\"leader_index\",\n settings={\n \"index.number_of_replicas\": 0\n },\n max_read_request_operation_count=1024,\n max_outstanding_read_requests=16,\n max_read_request_size=\"1024k\",\n max_write_request_operation_count=32768,\n max_write_request_size=\"16k\",\n max_outstanding_write_requests=8,\n max_write_buffer_count=512,\n max_write_buffer_size=\"512k\",\n max_retry_delay=\"10s\",\n read_poll_timeout=\"30s\",\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.ccr.follow({\n index: \"follower_index\",\n wait_for_active_shards: 1,\n remote_cluster: \"remote_cluster\",\n leader_index: \"leader_index\",\n settings: {\n \"index.number_of_replicas\": 0,\n },\n max_read_request_operation_count: 1024,\n max_outstanding_read_requests: 16,\n max_read_request_size: \"1024k\",\n max_write_request_operation_count: 32768,\n max_write_request_size: \"16k\",\n max_outstanding_write_requests: 8,\n max_write_buffer_count: 512,\n max_write_buffer_size: \"512k\",\n max_retry_delay: \"10s\",\n read_poll_timeout: \"30s\",\n});" + }, + { + "language": "Ruby", + "code": "response = client.ccr.follow(\n index: \"follower_index\",\n wait_for_active_shards: \"1\",\n body: {\n \"remote_cluster\": \"remote_cluster\",\n \"leader_index\": \"leader_index\",\n \"settings\": {\n \"index.number_of_replicas\": 0\n },\n \"max_read_request_operation_count\": 1024,\n \"max_outstanding_read_requests\": 16,\n \"max_read_request_size\": \"1024k\",\n \"max_write_request_operation_count\": 32768,\n \"max_write_request_size\": \"16k\",\n \"max_outstanding_write_requests\": 8,\n \"max_write_buffer_count\": 512,\n \"max_write_buffer_size\": \"512k\",\n \"max_retry_delay\": \"10s\",\n \"read_poll_timeout\": \"30s\"\n }\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->ccr()->follow([\n \"index\" => \"follower_index\",\n \"wait_for_active_shards\" => \"1\",\n \"body\" => [\n \"remote_cluster\" => \"remote_cluster\",\n \"leader_index\" => \"leader_index\",\n \"settings\" => [\n \"index.number_of_replicas\" => 0,\n ],\n \"max_read_request_operation_count\" => 1024,\n \"max_outstanding_read_requests\" => 16,\n \"max_read_request_size\" => \"1024k\",\n \"max_write_request_operation_count\" => 32768,\n \"max_write_request_size\" => \"16k\",\n \"max_outstanding_write_requests\" => 8,\n \"max_write_buffer_count\" => 512,\n \"max_write_buffer_size\" => \"512k\",\n \"max_retry_delay\" => \"10s\",\n \"read_poll_timeout\" => \"30s\",\n ],\n]);" + }, + { + "language": "curl", + "code": "curl -X PUT -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"remote_cluster\":\"remote_cluster\",\"leader_index\":\"leader_index\",\"settings\":{\"index.number_of_replicas\":0},\"max_read_request_operation_count\":1024,\"max_outstanding_read_requests\":16,\"max_read_request_size\":\"1024k\",\"max_write_request_operation_count\":32768,\"max_write_request_size\":\"16k\",\"max_outstanding_write_requests\":8,\"max_write_buffer_count\":512,\"max_write_buffer_size\":\"512k\",\"max_retry_delay\":\"10s\",\"read_poll_timeout\":\"30s\"}' \"$ELASTICSEARCH_URL/follower_index/_ccr/follow?wait_for_active_shards=1\"" + }, + { + "language": "Java", + "code": "client.ccr().follow(f -> f\n .index(\"follower_index\")\n .leaderIndex(\"leader_index\")\n .maxOutstandingReadRequests(16L)\n .maxOutstandingWriteRequests(8)\n .maxReadRequestOperationCount(1024)\n .maxReadRequestSize(\"1024k\")\n .maxRetryDelay(m -> m\n .time(\"10s\")\n )\n .maxWriteBufferCount(512)\n .maxWriteBufferSize(\"512k\")\n .maxWriteRequestOperationCount(32768)\n .maxWriteRequestSize(\"16k\")\n .readPollTimeout(r -> r\n .time(\"30s\")\n )\n .remoteCluster(\"remote_cluster\")\n .settings(s -> s\n .otherSettings(\"index.number_of_replicas\", JsonData.fromJson(\"0\"))\n )\n .waitForActiveShards(w -> w\n .count(1)\n )\n);\n" + } + ], + "specification/ccr/get_auto_follow_pattern/examples/request/GetAutoFollowPatternRequestExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.ccr.get_auto_follow_pattern(\n name=\"my_auto_follow_pattern\",\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.ccr.getAutoFollowPattern({\n name: \"my_auto_follow_pattern\",\n});" + }, + { + "language": "Ruby", + "code": "response = client.ccr.get_auto_follow_pattern(\n name: \"my_auto_follow_pattern\"\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->ccr()->getAutoFollowPattern([\n \"name\" => \"my_auto_follow_pattern\",\n]);" + }, + { + "language": "curl", + "code": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_ccr/auto_follow/my_auto_follow_pattern\"" + }, + { + "language": "Java", + "code": "client.ccr().getAutoFollowPattern(g -> g\n .name(\"my_auto_follow_pattern\")\n);\n" + } + ], + "specification/ccr/put_auto_follow_pattern/examples/request/PutAutoFollowPatternRequestExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.ccr.put_auto_follow_pattern(\n name=\"my_auto_follow_pattern\",\n remote_cluster=\"remote_cluster\",\n leader_index_patterns=[\n \"leader_index*\"\n ],\n follow_index_pattern=\"{{leader_index}}-follower\",\n settings={\n \"index.number_of_replicas\": 0\n },\n max_read_request_operation_count=1024,\n max_outstanding_read_requests=16,\n max_read_request_size=\"1024k\",\n max_write_request_operation_count=32768,\n max_write_request_size=\"16k\",\n max_outstanding_write_requests=8,\n max_write_buffer_count=512,\n max_write_buffer_size=\"512k\",\n max_retry_delay=\"10s\",\n read_poll_timeout=\"30s\",\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.ccr.putAutoFollowPattern({\n name: \"my_auto_follow_pattern\",\n remote_cluster: \"remote_cluster\",\n leader_index_patterns: [\"leader_index*\"],\n follow_index_pattern: \"{{leader_index}}-follower\",\n settings: {\n \"index.number_of_replicas\": 0,\n },\n max_read_request_operation_count: 1024,\n max_outstanding_read_requests: 16,\n max_read_request_size: \"1024k\",\n max_write_request_operation_count: 32768,\n max_write_request_size: \"16k\",\n max_outstanding_write_requests: 8,\n max_write_buffer_count: 512,\n max_write_buffer_size: \"512k\",\n max_retry_delay: \"10s\",\n read_poll_timeout: \"30s\",\n});" + }, + { + "language": "Ruby", + "code": "response = client.ccr.put_auto_follow_pattern(\n name: \"my_auto_follow_pattern\",\n body: {\n \"remote_cluster\": \"remote_cluster\",\n \"leader_index_patterns\": [\n \"leader_index*\"\n ],\n \"follow_index_pattern\": \"{{leader_index}}-follower\",\n \"settings\": {\n \"index.number_of_replicas\": 0\n },\n \"max_read_request_operation_count\": 1024,\n \"max_outstanding_read_requests\": 16,\n \"max_read_request_size\": \"1024k\",\n \"max_write_request_operation_count\": 32768,\n \"max_write_request_size\": \"16k\",\n \"max_outstanding_write_requests\": 8,\n \"max_write_buffer_count\": 512,\n \"max_write_buffer_size\": \"512k\",\n \"max_retry_delay\": \"10s\",\n \"read_poll_timeout\": \"30s\"\n }\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->ccr()->putAutoFollowPattern([\n \"name\" => \"my_auto_follow_pattern\",\n \"body\" => [\n \"remote_cluster\" => \"remote_cluster\",\n \"leader_index_patterns\" => array(\n \"leader_index*\",\n ),\n \"follow_index_pattern\" => \"{{leader_index}}-follower\",\n \"settings\" => [\n \"index.number_of_replicas\" => 0,\n ],\n \"max_read_request_operation_count\" => 1024,\n \"max_outstanding_read_requests\" => 16,\n \"max_read_request_size\" => \"1024k\",\n \"max_write_request_operation_count\" => 32768,\n \"max_write_request_size\" => \"16k\",\n \"max_outstanding_write_requests\" => 8,\n \"max_write_buffer_count\" => 512,\n \"max_write_buffer_size\" => \"512k\",\n \"max_retry_delay\" => \"10s\",\n \"read_poll_timeout\" => \"30s\",\n ],\n]);" + }, + { + "language": "curl", + "code": "curl -X PUT -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"remote_cluster\":\"remote_cluster\",\"leader_index_patterns\":[\"leader_index*\"],\"follow_index_pattern\":\"{{leader_index}}-follower\",\"settings\":{\"index.number_of_replicas\":0},\"max_read_request_operation_count\":1024,\"max_outstanding_read_requests\":16,\"max_read_request_size\":\"1024k\",\"max_write_request_operation_count\":32768,\"max_write_request_size\":\"16k\",\"max_outstanding_write_requests\":8,\"max_write_buffer_count\":512,\"max_write_buffer_size\":\"512k\",\"max_retry_delay\":\"10s\",\"read_poll_timeout\":\"30s\"}' \"$ELASTICSEARCH_URL/_ccr/auto_follow/my_auto_follow_pattern\"" + }, + { + "language": "Java", + "code": "client.ccr().putAutoFollowPattern(p -> p\n .followIndexPattern(\"{{leader_index}}-follower\")\n .leaderIndexPatterns(\"leader_index*\")\n .maxOutstandingReadRequests(16)\n .maxOutstandingWriteRequests(8)\n .maxReadRequestOperationCount(1024)\n .maxReadRequestSize(\"1024k\")\n .maxRetryDelay(m -> m\n .time(\"10s\")\n )\n .maxWriteBufferCount(512)\n .maxWriteBufferSize(\"512k\")\n .maxWriteRequestOperationCount(32768)\n .maxWriteRequestSize(\"16k\")\n .name(\"my_auto_follow_pattern\")\n .readPollTimeout(r -> r\n .time(\"30s\")\n )\n .remoteCluster(\"remote_cluster\")\n .settings(\"index.number_of_replicas\", JsonData.fromJson(\"0\"))\n);\n" + } + ], + "specification/ccr/follow_info/examples/request/FollowInfoRequestExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.ccr.follow_info(\n index=\"follower_index\",\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.ccr.followInfo({\n index: \"follower_index\",\n});" + }, + { + "language": "Ruby", + "code": "response = client.ccr.follow_info(\n index: \"follower_index\"\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->ccr()->followInfo([\n \"index\" => \"follower_index\",\n]);" + }, + { + "language": "curl", + "code": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/follower_index/_ccr/info\"" + }, + { + "language": "Java", + "code": "client.ccr().followInfo(f -> f\n .index(\"follower_index\")\n);\n" + } + ], + "specification/ccr/unfollow/examples/request/UnfollowIndexRequestExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.ccr.unfollow(\n index=\"follower_index\",\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.ccr.unfollow({\n index: \"follower_index\",\n});" + }, + { + "language": "Ruby", + "code": "response = client.ccr.unfollow(\n index: \"follower_index\"\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->ccr()->unfollow([\n \"index\" => \"follower_index\",\n]);" + }, + { + "language": "curl", + "code": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/follower_index/_ccr/unfollow\"" + }, + { + "language": "Java", + "code": "client.ccr().unfollow(u -> u\n .index(\"follower_index\")\n);\n" + } + ], + "specification/ccr/resume_follow/examples/request/ResumeFollowIndexRequestExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.ccr.resume_follow(\n index=\"follower_index\",\n max_read_request_operation_count=1024,\n max_outstanding_read_requests=16,\n max_read_request_size=\"1024k\",\n max_write_request_operation_count=32768,\n max_write_request_size=\"16k\",\n max_outstanding_write_requests=8,\n max_write_buffer_count=512,\n max_write_buffer_size=\"512k\",\n max_retry_delay=\"10s\",\n read_poll_timeout=\"30s\",\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.ccr.resumeFollow({\n index: \"follower_index\",\n max_read_request_operation_count: 1024,\n max_outstanding_read_requests: 16,\n max_read_request_size: \"1024k\",\n max_write_request_operation_count: 32768,\n max_write_request_size: \"16k\",\n max_outstanding_write_requests: 8,\n max_write_buffer_count: 512,\n max_write_buffer_size: \"512k\",\n max_retry_delay: \"10s\",\n read_poll_timeout: \"30s\",\n});" + }, + { + "language": "Ruby", + "code": "response = client.ccr.resume_follow(\n index: \"follower_index\",\n body: {\n \"max_read_request_operation_count\": 1024,\n \"max_outstanding_read_requests\": 16,\n \"max_read_request_size\": \"1024k\",\n \"max_write_request_operation_count\": 32768,\n \"max_write_request_size\": \"16k\",\n \"max_outstanding_write_requests\": 8,\n \"max_write_buffer_count\": 512,\n \"max_write_buffer_size\": \"512k\",\n \"max_retry_delay\": \"10s\",\n \"read_poll_timeout\": \"30s\"\n }\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->ccr()->resumeFollow([\n \"index\" => \"follower_index\",\n \"body\" => [\n \"max_read_request_operation_count\" => 1024,\n \"max_outstanding_read_requests\" => 16,\n \"max_read_request_size\" => \"1024k\",\n \"max_write_request_operation_count\" => 32768,\n \"max_write_request_size\" => \"16k\",\n \"max_outstanding_write_requests\" => 8,\n \"max_write_buffer_count\" => 512,\n \"max_write_buffer_size\" => \"512k\",\n \"max_retry_delay\" => \"10s\",\n \"read_poll_timeout\" => \"30s\",\n ],\n]);" + }, + { + "language": "curl", + "code": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"max_read_request_operation_count\":1024,\"max_outstanding_read_requests\":16,\"max_read_request_size\":\"1024k\",\"max_write_request_operation_count\":32768,\"max_write_request_size\":\"16k\",\"max_outstanding_write_requests\":8,\"max_write_buffer_count\":512,\"max_write_buffer_size\":\"512k\",\"max_retry_delay\":\"10s\",\"read_poll_timeout\":\"30s\"}' \"$ELASTICSEARCH_URL/follower_index/_ccr/resume_follow\"" + }, + { + "language": "Java", + "code": "client.ccr().resumeFollow(r -> r\n .index(\"follower_index\")\n .maxOutstandingReadRequests(16L)\n .maxOutstandingWriteRequests(8L)\n .maxReadRequestOperationCount(1024L)\n .maxReadRequestSize(\"1024k\")\n .maxRetryDelay(m -> m\n .time(\"10s\")\n )\n .maxWriteBufferCount(512L)\n .maxWriteBufferSize(\"512k\")\n .maxWriteRequestOperationCount(32768L)\n .maxWriteRequestSize(\"16k\")\n .readPollTimeout(re -> re\n .time(\"30s\")\n )\n);\n" + } + ], + "specification/ccr/follow_stats/examples/request/FollowIndexStatsRequestExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.ccr.follow_stats(\n index=\"follower_index\",\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.ccr.followStats({\n index: \"follower_index\",\n});" + }, + { + "language": "Ruby", + "code": "response = client.ccr.follow_stats(\n index: \"follower_index\"\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->ccr()->followStats([\n \"index\" => \"follower_index\",\n]);" + }, + { + "language": "curl", + "code": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/follower_index/_ccr/stats\"" + }, + { + "language": "Java", + "code": "client.ccr().followStats(f -> f\n .index(\"follower_index\")\n);\n" + } + ], + "specification/ccr/stats/examples/request/CcrStatsRequestExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.ccr.stats()" + }, + { + "language": "JavaScript", + "code": "const response = await client.ccr.stats();" + }, + { + "language": "Ruby", + "code": "response = client.ccr.stats" + }, + { + "language": "PHP", + "code": "$resp = $client->ccr()->stats();" + }, + { + "language": "curl", + "code": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_ccr/stats\"" + }, + { + "language": "Java", + "code": "client.ccr().stats(s -> s);\n" + } + ], + "specification/ccr/pause_auto_follow_pattern/examples/request/PauseAutoFollowPatternRequestExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.ccr.pause_auto_follow_pattern(\n name=\"my_auto_follow_pattern\",\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.ccr.pauseAutoFollowPattern({\n name: \"my_auto_follow_pattern\",\n});" + }, + { + "language": "Ruby", + "code": "response = client.ccr.pause_auto_follow_pattern(\n name: \"my_auto_follow_pattern\"\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->ccr()->pauseAutoFollowPattern([\n \"name\" => \"my_auto_follow_pattern\",\n]);" + }, + { + "language": "curl", + "code": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_ccr/auto_follow/my_auto_follow_pattern/pause\"" + }, + { + "language": "Java", + "code": "client.ccr().pauseAutoFollowPattern(p -> p\n .name(\"my_auto_follow_pattern\")\n);\n" + } + ], + "specification/ilm/get_status/examples/request/IlmGetStatusExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.ilm.get_status()" + }, + { + "language": "JavaScript", + "code": "const response = await client.ilm.getStatus();" + }, + { + "language": "Ruby", + "code": "response = client.ilm.get_status" + }, + { + "language": "PHP", + "code": "$resp = $client->ilm()->getStatus();" + }, + { + "language": "curl", + "code": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_ilm/status\"" + }, + { + "language": "Java", + "code": "client.ilm().getStatus();\n" + } + ], + "specification/ilm/move_to_step/examples/request/MoveToStepRequestExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.ilm.move_to_step(\n index=\"my-index-000001\",\n current_step={\n \"phase\": \"new\",\n \"action\": \"complete\",\n \"name\": \"complete\"\n },\n next_step={\n \"phase\": \"warm\",\n \"action\": \"forcemerge\",\n \"name\": \"forcemerge\"\n },\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.ilm.moveToStep({\n index: \"my-index-000001\",\n current_step: {\n phase: \"new\",\n action: \"complete\",\n name: \"complete\",\n },\n next_step: {\n phase: \"warm\",\n action: \"forcemerge\",\n name: \"forcemerge\",\n },\n});" + }, + { + "language": "Ruby", + "code": "response = client.ilm.move_to_step(\n index: \"my-index-000001\",\n body: {\n \"current_step\": {\n \"phase\": \"new\",\n \"action\": \"complete\",\n \"name\": \"complete\"\n },\n \"next_step\": {\n \"phase\": \"warm\",\n \"action\": \"forcemerge\",\n \"name\": \"forcemerge\"\n }\n }\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->ilm()->moveToStep([\n \"index\" => \"my-index-000001\",\n \"body\" => [\n \"current_step\" => [\n \"phase\" => \"new\",\n \"action\" => \"complete\",\n \"name\" => \"complete\",\n ],\n \"next_step\" => [\n \"phase\" => \"warm\",\n \"action\" => \"forcemerge\",\n \"name\" => \"forcemerge\",\n ],\n ],\n]);" + }, + { + "language": "curl", + "code": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"current_step\":{\"phase\":\"new\",\"action\":\"complete\",\"name\":\"complete\"},\"next_step\":{\"phase\":\"warm\",\"action\":\"forcemerge\",\"name\":\"forcemerge\"}}' \"$ELASTICSEARCH_URL/_ilm/move/my-index-000001\"" + }, + { + "language": "Java", + "code": "client.ilm().moveToStep(m -> m\n .currentStep(c -> c\n .action(\"complete\")\n .name(\"complete\")\n .phase(\"new\")\n )\n .index(\"my-index-000001\")\n .nextStep(n -> n\n .action(\"forcemerge\")\n .name(\"forcemerge\")\n .phase(\"warm\")\n )\n);\n" + } + ], + "specification/ilm/move_to_step/examples/request/MoveToStepRequestExample2.yaml": [ + { + "language": "Python", + "code": "resp = client.ilm.move_to_step(\n index=\"my-index-000001\",\n current_step={\n \"phase\": \"hot\",\n \"action\": \"complete\",\n \"name\": \"complete\"\n },\n next_step={\n \"phase\": \"warm\"\n },\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.ilm.moveToStep({\n index: \"my-index-000001\",\n current_step: {\n phase: \"hot\",\n action: \"complete\",\n name: \"complete\",\n },\n next_step: {\n phase: \"warm\",\n },\n});" + }, + { + "language": "Ruby", + "code": "response = client.ilm.move_to_step(\n index: \"my-index-000001\",\n body: {\n \"current_step\": {\n \"phase\": \"hot\",\n \"action\": \"complete\",\n \"name\": \"complete\"\n },\n \"next_step\": {\n \"phase\": \"warm\"\n }\n }\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->ilm()->moveToStep([\n \"index\" => \"my-index-000001\",\n \"body\" => [\n \"current_step\" => [\n \"phase\" => \"hot\",\n \"action\" => \"complete\",\n \"name\" => \"complete\",\n ],\n \"next_step\" => [\n \"phase\" => \"warm\",\n ],\n ],\n]);" + }, + { + "language": "curl", + "code": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"current_step\":{\"phase\":\"hot\",\"action\":\"complete\",\"name\":\"complete\"},\"next_step\":{\"phase\":\"warm\"}}' \"$ELASTICSEARCH_URL/_ilm/move/my-index-000001\"" + }, + { + "language": "Java", + "code": "client.ilm().moveToStep(m -> m\n .currentStep(c -> c\n .action(\"complete\")\n .name(\"complete\")\n .phase(\"hot\")\n )\n .index(\"my-index-000001\")\n .nextStep(n -> n\n .phase(\"warm\")\n )\n);\n" + } + ], + "specification/ilm/migrate_to_data_tiers/examples/request/MigrateToDataTiersRequestExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.ilm.migrate_to_data_tiers(\n legacy_template_to_delete=\"global-template\",\n node_attribute=\"custom_attribute_name\",\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.ilm.migrateToDataTiers({\n legacy_template_to_delete: \"global-template\",\n node_attribute: \"custom_attribute_name\",\n});" + }, + { + "language": "Ruby", + "code": "response = client.ilm.migrate_to_data_tiers(\n body: {\n \"legacy_template_to_delete\": \"global-template\",\n \"node_attribute\": \"custom_attribute_name\"\n }\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->ilm()->migrateToDataTiers([\n \"body\" => [\n \"legacy_template_to_delete\" => \"global-template\",\n \"node_attribute\" => \"custom_attribute_name\",\n ],\n]);" + }, + { + "language": "curl", + "code": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"legacy_template_to_delete\":\"global-template\",\"node_attribute\":\"custom_attribute_name\"}' \"$ELASTICSEARCH_URL/_ilm/migrate_to_data_tiers\"" + }, + { + "language": "Java", + "code": "client.ilm().migrateToDataTiers(m -> m\n .legacyTemplateToDelete(\"global-template\")\n .nodeAttribute(\"custom_attribute_name\")\n);\n" + } + ], + "specification/ilm/retry/examples/request/IlmRetryExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.ilm.retry(\n index=\"my-index-000001\",\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.ilm.retry({\n index: \"my-index-000001\",\n});" + }, + { + "language": "Ruby", + "code": "response = client.ilm.retry(\n index: \"my-index-000001\"\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->ilm()->retry([\n \"index\" => \"my-index-000001\",\n]);" + }, + { + "language": "curl", + "code": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/my-index-000001/_ilm/retry\"" + }, + { + "language": "Java", + "code": "client.ilm().retry(r -> r\n .index(\"my-index-000001\")\n);\n" + } + ], + "specification/ilm/delete_lifecycle/examples/request/IlmDeleteLifecycleExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.ilm.delete_lifecycle(\n name=\"my_policy\",\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.ilm.deleteLifecycle({\n name: \"my_policy\",\n});" + }, + { + "language": "Ruby", + "code": "response = client.ilm.delete_lifecycle(\n policy: \"my_policy\"\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->ilm()->deleteLifecycle([\n \"policy\" => \"my_policy\",\n]);" + }, + { + "language": "curl", + "code": "curl -X DELETE -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_ilm/policy/my_policy\"" + }, + { + "language": "Java", + "code": "client.ilm().deleteLifecycle(d -> d\n .name(\"my_policy\")\n);\n" + } + ], + "specification/ilm/start/examples/request/IlmStartExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.ilm.start()" + }, + { + "language": "JavaScript", + "code": "const response = await client.ilm.start();" + }, + { + "language": "Ruby", + "code": "response = client.ilm.start" + }, + { + "language": "PHP", + "code": "$resp = $client->ilm()->start();" + }, + { + "language": "curl", + "code": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_ilm/start\"" + }, + { + "language": "Java", + "code": "client.ilm().start(s -> s);\n" + } + ], + "specification/ilm/explain_lifecycle/examples/request/IlmExplainLifecycleExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.ilm.explain_lifecycle(\n index=\".ds-timeseries-*\",\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.ilm.explainLifecycle({\n index: \".ds-timeseries-*\",\n});" + }, + { + "language": "Ruby", + "code": "response = client.ilm.explain_lifecycle(\n index: \".ds-timeseries-*\"\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->ilm()->explainLifecycle([\n \"index\" => \".ds-timeseries-*\",\n]);" + }, + { + "language": "curl", + "code": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/.ds-timeseries-*/_ilm/explain\"" + }, + { + "language": "Java", + "code": "client.ilm().explainLifecycle(e -> e\n .index(\".ds-timeseries-*\")\n);\n" + } + ], + "specification/ilm/stop/examples/request/IlmStopExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.ilm.stop()" + }, + { + "language": "JavaScript", + "code": "const response = await client.ilm.stop();" + }, + { + "language": "Ruby", + "code": "response = client.ilm.stop" + }, + { + "language": "PHP", + "code": "$resp = $client->ilm()->stop();" + }, + { + "language": "curl", + "code": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_ilm/stop\"" + }, + { + "language": "Java", + "code": "client.ilm().stop(s -> s);\n" + } + ], + "specification/ilm/remove_policy/examples/request/IlmRemovePolicyExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.ilm.remove_policy(\n index=\"logs-my_app-default\",\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.ilm.removePolicy({\n index: \"logs-my_app-default\",\n});" + }, + { + "language": "Ruby", + "code": "response = client.ilm.remove_policy(\n index: \"logs-my_app-default\"\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->ilm()->removePolicy([\n \"index\" => \"logs-my_app-default\",\n]);" + }, + { + "language": "curl", + "code": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/logs-my_app-default/_ilm/remove\"" + }, + { + "language": "Java", + "code": "client.ilm().removePolicy(r -> r\n .index(\"logs-my_app-default\")\n);\n" + } + ], + "specification/ilm/get_lifecycle/examples/request/IlmGetLifecycleExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.ilm.get_lifecycle(\n name=\"my_policy\",\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.ilm.getLifecycle({\n name: \"my_policy\",\n});" + }, + { + "language": "Ruby", + "code": "response = client.ilm.get_lifecycle(\n policy: \"my_policy\"\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->ilm()->getLifecycle([\n \"policy\" => \"my_policy\",\n]);" + }, + { + "language": "curl", + "code": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_ilm/policy/my_policy\"" + }, + { + "language": "Java", + "code": "client.ilm().getLifecycle(g -> g\n .name(\"my_policy\")\n);\n" + } + ], + "specification/ilm/put_lifecycle/examples/request/PutLifecycleRequestExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.ilm.put_lifecycle(\n name=\"my_policy\",\n policy={\n \"_meta\": {\n \"description\": \"used for nginx log\",\n \"project\": {\n \"name\": \"myProject\",\n \"department\": \"myDepartment\"\n }\n },\n \"phases\": {\n \"warm\": {\n \"min_age\": \"10d\",\n \"actions\": {\n \"forcemerge\": {\n \"max_num_segments\": 1\n }\n }\n },\n \"delete\": {\n \"min_age\": \"30d\",\n \"actions\": {\n \"delete\": {}\n }\n }\n }\n },\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.ilm.putLifecycle({\n name: \"my_policy\",\n policy: {\n _meta: {\n description: \"used for nginx log\",\n project: {\n name: \"myProject\",\n department: \"myDepartment\",\n },\n },\n phases: {\n warm: {\n min_age: \"10d\",\n actions: {\n forcemerge: {\n max_num_segments: 1,\n },\n },\n },\n delete: {\n min_age: \"30d\",\n actions: {\n delete: {},\n },\n },\n },\n },\n});" + }, + { + "language": "Ruby", + "code": "response = client.ilm.put_lifecycle(\n policy: \"my_policy\",\n body: {\n \"policy\": {\n \"_meta\": {\n \"description\": \"used for nginx log\",\n \"project\": {\n \"name\": \"myProject\",\n \"department\": \"myDepartment\"\n }\n },\n \"phases\": {\n \"warm\": {\n \"min_age\": \"10d\",\n \"actions\": {\n \"forcemerge\": {\n \"max_num_segments\": 1\n }\n }\n },\n \"delete\": {\n \"min_age\": \"30d\",\n \"actions\": {\n \"delete\": {}\n }\n }\n }\n }\n }\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->ilm()->putLifecycle([\n \"policy\" => \"my_policy\",\n \"body\" => [\n \"policy\" => [\n \"_meta\" => [\n \"description\" => \"used for nginx log\",\n \"project\" => [\n \"name\" => \"myProject\",\n \"department\" => \"myDepartment\",\n ],\n ],\n \"phases\" => [\n \"warm\" => [\n \"min_age\" => \"10d\",\n \"actions\" => [\n \"forcemerge\" => [\n \"max_num_segments\" => 1,\n ],\n ],\n ],\n \"delete\" => [\n \"min_age\" => \"30d\",\n \"actions\" => [\n \"delete\" => new ArrayObject([]),\n ],\n ],\n ],\n ],\n ],\n]);" + }, + { + "language": "curl", + "code": "curl -X PUT -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"policy\":{\"_meta\":{\"description\":\"used for nginx log\",\"project\":{\"name\":\"myProject\",\"department\":\"myDepartment\"}},\"phases\":{\"warm\":{\"min_age\":\"10d\",\"actions\":{\"forcemerge\":{\"max_num_segments\":1}}},\"delete\":{\"min_age\":\"30d\",\"actions\":{\"delete\":{}}}}}}' \"$ELASTICSEARCH_URL/_ilm/policy/my_policy\"" + }, + { + "language": "Java", + "code": "client.ilm().putLifecycle(p -> p\n .name(\"my_policy\")\n .policy(po -> po\n .phases(ph -> ph\n .delete(d -> d\n .actions(a -> a\n .delete(de -> de)\n )\n .minAge(m -> m\n .time(\"30d\")\n )\n )\n .warm(w -> w\n .actions(a -> a\n .forcemerge(f -> f\n .maxNumSegments(1)\n )\n )\n .minAge(m -> m\n .time(\"10d\")\n )\n )\n )\n .meta(Map.of(\"description\", JsonData.fromJson(\"\\\"used for nginx log\\\"\"),\"project\", JsonData.fromJson(\"{\\\"name\\\":\\\"myProject\\\",\\\"department\\\":\\\"myDepartment\\\"}\")))\n )\n);\n" + } + ], + "specification/sql/delete_async/examples/request/SqlDeleteAsyncExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.sql.delete_async(\n id=\"FmdMX2pIang3UWhLRU5QS0lqdlppYncaMUpYQ05oSkpTc3kwZ21EdC1tbFJXQToxOTI=\",\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.sql.deleteAsync({\n id: \"FmdMX2pIang3UWhLRU5QS0lqdlppYncaMUpYQ05oSkpTc3kwZ21EdC1tbFJXQToxOTI=\",\n});" + }, + { + "language": "Ruby", + "code": "response = client.sql.delete_async(\n id: \"FmdMX2pIang3UWhLRU5QS0lqdlppYncaMUpYQ05oSkpTc3kwZ21EdC1tbFJXQToxOTI=\"\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->sql()->deleteAsync([\n \"id\" => \"FmdMX2pIang3UWhLRU5QS0lqdlppYncaMUpYQ05oSkpTc3kwZ21EdC1tbFJXQToxOTI=\",\n]);" + }, + { + "language": "curl", + "code": "curl -X DELETE -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_sql/async/delete/FmdMX2pIang3UWhLRU5QS0lqdlppYncaMUpYQ05oSkpTc3kwZ21EdC1tbFJXQToxOTI=\"" + }, + { + "language": "Java", + "code": "client.sql().deleteAsync(d -> d\n .id(\"FmdMX2pIang3UWhLRU5QS0lqdlppYncaMUpYQ05oSkpTc3kwZ21EdC1tbFJXQToxOTI=\")\n);\n" + } + ], + "specification/sql/translate/examples/request/TranslateSqlRequestExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.sql.translate(\n query=\"SELECT * FROM library ORDER BY page_count DESC\",\n fetch_size=10,\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.sql.translate({\n query: \"SELECT * FROM library ORDER BY page_count DESC\",\n fetch_size: 10,\n});" + }, + { + "language": "Ruby", + "code": "response = client.sql.translate(\n body: {\n \"query\": \"SELECT * FROM library ORDER BY page_count DESC\",\n \"fetch_size\": 10\n }\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->sql()->translate([\n \"body\" => [\n \"query\" => \"SELECT * FROM library ORDER BY page_count DESC\",\n \"fetch_size\" => 10,\n ],\n]);" + }, + { + "language": "curl", + "code": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"query\":\"SELECT * FROM library ORDER BY page_count DESC\",\"fetch_size\":10}' \"$ELASTICSEARCH_URL/_sql/translate\"" + }, + { + "language": "Java", + "code": "client.sql().translate(t -> t\n .fetchSize(10)\n .query(\"SELECT * FROM library ORDER BY page_count DESC\")\n);\n" + } + ], + "specification/sql/clear_cursor/examples/request/ClearSqlCursorRequestExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.sql.clear_cursor(\n cursor=\"sDXF1ZXJ5QW5kRmV0Y2gBAAAAAAAAAAEWYUpOYklQMHhRUEtld3RsNnFtYU1hQQ==:BAFmBGRhdGUBZgVsaWtlcwFzB21lc3NhZ2UBZgR1c2Vy9f///w8=\",\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.sql.clearCursor({\n cursor:\n \"sDXF1ZXJ5QW5kRmV0Y2gBAAAAAAAAAAEWYUpOYklQMHhRUEtld3RsNnFtYU1hQQ==:BAFmBGRhdGUBZgVsaWtlcwFzB21lc3NhZ2UBZgR1c2Vy9f///w8=\",\n});" + }, + { + "language": "Ruby", + "code": "response = client.sql.clear_cursor(\n body: {\n \"cursor\": \"sDXF1ZXJ5QW5kRmV0Y2gBAAAAAAAAAAEWYUpOYklQMHhRUEtld3RsNnFtYU1hQQ==:BAFmBGRhdGUBZgVsaWtlcwFzB21lc3NhZ2UBZgR1c2Vy9f///w8=\"\n }\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->sql()->clearCursor([\n \"body\" => [\n \"cursor\" => \"sDXF1ZXJ5QW5kRmV0Y2gBAAAAAAAAAAEWYUpOYklQMHhRUEtld3RsNnFtYU1hQQ==:BAFmBGRhdGUBZgVsaWtlcwFzB21lc3NhZ2UBZgR1c2Vy9f///w8=\",\n ],\n]);" + }, + { + "language": "curl", + "code": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"cursor\":\"sDXF1ZXJ5QW5kRmV0Y2gBAAAAAAAAAAEWYUpOYklQMHhRUEtld3RsNnFtYU1hQQ==:BAFmBGRhdGUBZgVsaWtlcwFzB21lc3NhZ2UBZgR1c2Vy9f///w8=\"}' \"$ELASTICSEARCH_URL/_sql/close\"" + }, + { + "language": "Java", + "code": "client.sql().clearCursor(c -> c\n .cursor(\"sDXF1ZXJ5QW5kRmV0Y2gBAAAAAAAAAAEWYUpOYklQMHhRUEtld3RsNnFtYU1hQQ==:BAFmBGRhdGUBZgVsaWtlcwFzB21lc3NhZ2UBZgR1c2Vy9f///w8=\")\n);\n" + } + ], + "specification/sql/get_async/examples/request/SqlGetAsyncExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.sql.get_async(\n id=\"FnR0TDhyWUVmUmVtWXRWZER4MXZiNFEad2F5UDk2ZVdTVHV1S0xDUy00SklUdzozMTU=\",\n wait_for_completion_timeout=\"2s\",\n format=\"json\",\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.sql.getAsync({\n id: \"FnR0TDhyWUVmUmVtWXRWZER4MXZiNFEad2F5UDk2ZVdTVHV1S0xDUy00SklUdzozMTU=\",\n wait_for_completion_timeout: \"2s\",\n format: \"json\",\n});" + }, + { + "language": "Ruby", + "code": "response = client.sql.get_async(\n id: \"FnR0TDhyWUVmUmVtWXRWZER4MXZiNFEad2F5UDk2ZVdTVHV1S0xDUy00SklUdzozMTU=\",\n wait_for_completion_timeout: \"2s\",\n format: \"json\"\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->sql()->getAsync([\n \"id\" => \"FnR0TDhyWUVmUmVtWXRWZER4MXZiNFEad2F5UDk2ZVdTVHV1S0xDUy00SklUdzozMTU=\",\n \"wait_for_completion_timeout\" => \"2s\",\n \"format\" => \"json\",\n]);" + }, + { + "language": "curl", + "code": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_sql/async/FnR0TDhyWUVmUmVtWXRWZER4MXZiNFEad2F5UDk2ZVdTVHV1S0xDUy00SklUdzozMTU=?wait_for_completion_timeout=2s&format=json\"" + }, + { + "language": "Java", + "code": "client.sql().getAsync(g -> g\n .format(\"json\")\n .id(\"FnR0TDhyWUVmUmVtWXRWZER4MXZiNFEad2F5UDk2ZVdTVHV1S0xDUy00SklUdzozMTU=\")\n .waitForCompletionTimeout(w -> w\n .offset(2)\n )\n);\n" + } + ], + "specification/sql/get_async_status/examples/request/SqlGetAsyncStatusExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.sql.get_async_status(\n id=\"FnR0TDhyWUVmUmVtWXRWZER4MXZiNFEad2F5UDk2ZVdTVHV1S0xDUy00SklUdzozMTU=\",\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.sql.getAsyncStatus({\n id: \"FnR0TDhyWUVmUmVtWXRWZER4MXZiNFEad2F5UDk2ZVdTVHV1S0xDUy00SklUdzozMTU=\",\n});" + }, + { + "language": "Ruby", + "code": "response = client.sql.get_async_status(\n id: \"FnR0TDhyWUVmUmVtWXRWZER4MXZiNFEad2F5UDk2ZVdTVHV1S0xDUy00SklUdzozMTU=\"\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->sql()->getAsyncStatus([\n \"id\" => \"FnR0TDhyWUVmUmVtWXRWZER4MXZiNFEad2F5UDk2ZVdTVHV1S0xDUy00SklUdzozMTU=\",\n]);" + }, + { + "language": "curl", + "code": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_sql/async/status/FnR0TDhyWUVmUmVtWXRWZER4MXZiNFEad2F5UDk2ZVdTVHV1S0xDUy00SklUdzozMTU=\"" + }, + { + "language": "Java", + "code": "client.sql().getAsyncStatus(g -> g\n .id(\"FnR0TDhyWUVmUmVtWXRWZER4MXZiNFEad2F5UDk2ZVdTVHV1S0xDUy00SklUdzozMTU=\")\n);\n" + } + ], + "specification/sql/query/examples/request/QuerySqlRequestExample1.yaml": [ + { + "language": "Python", + "code": "resp = client.sql.query(\n format=\"txt\",\n query=\"SELECT * FROM library ORDER BY page_count DESC LIMIT 5\",\n)" + }, + { + "language": "JavaScript", + "code": "const response = await client.sql.query({\n format: \"txt\",\n query: \"SELECT * FROM library ORDER BY page_count DESC LIMIT 5\",\n});" + }, + { + "language": "Ruby", + "code": "response = client.sql.query(\n format: \"txt\",\n body: {\n \"query\": \"SELECT * FROM library ORDER BY page_count DESC LIMIT 5\"\n }\n)" + }, + { + "language": "PHP", + "code": "$resp = $client->sql()->query([\n \"format\" => \"txt\",\n \"body\" => [\n \"query\" => \"SELECT * FROM library ORDER BY page_count DESC LIMIT 5\",\n ],\n]);" + }, + { + "language": "curl", + "code": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"query\":\"SELECT * FROM library ORDER BY page_count DESC LIMIT 5\"}' \"$ELASTICSEARCH_URL/_sql?format=txt\"" + }, + { + "language": "Java", + "code": "client.sql().query(q -> q\n .format(SqlFormat.Txt)\n .query(\"SELECT * FROM library ORDER BY page_count DESC LIMIT 5\")\n);\n" + } + ] +} \ No newline at end of file diff --git a/docs/examples/package-lock.json b/docs/examples/package-lock.json index 0e17f38c6e..b395eb9e23 100644 --- a/docs/examples/package-lock.json +++ b/docs/examples/package-lock.json @@ -5,7 +5,7 @@ "packages": { "": { "dependencies": { - "@elastic/request-converter": "^9.1.1", + "@elastic/request-converter": "^9.1.2", "@redocly/cli": "^1.34.3", "@stoplight/spectral-cli": "^6.14.2", "java-caller": "^4.1.1", @@ -54,9 +54,9 @@ } }, "node_modules/@elastic/request-converter": { - "version": "9.1.1", - "resolved": "https://registry.npmjs.org/@elastic/request-converter/-/request-converter-9.1.1.tgz", - "integrity": "sha512-aFNNKvYgyasn97bh2cJx0dL0NgLFQuFMHCLQGnAebe1cwE/vc2mOh+DWWMGICndIKeP/F1aVpCy7KYbCXmyjzA==", + "version": "9.1.2", + "resolved": "https://registry.npmjs.org/@elastic/request-converter/-/request-converter-9.1.2.tgz", + "integrity": "sha512-7UTpzcKMAAB75ObfUpTvsE1v00rC5zyoZf2f12KkWsxmCZvaG0RLtYXrsxufSJe9SscUqzTeEgdK/tv3ZJNhYQ==", "license": "Apache-2.0", "dependencies": { "base64url": "^3.0.1", diff --git a/docs/examples/package.json b/docs/examples/package.json index 0475768d2d..8cfc1ae845 100644 --- a/docs/examples/package.json +++ b/docs/examples/package.json @@ -3,7 +3,7 @@ "transform-to-openapi": "npm run transform-to-openapi --prefix compiler --" }, "dependencies": { - "@elastic/request-converter": "^9.1.1", + "@elastic/request-converter": "^9.1.2", "@redocly/cli": "^1.34.3", "@stoplight/spectral-cli": "^6.14.2", "yaml": "^2.8.0", diff --git a/output/openapi/elasticsearch-openapi-docs.redirects.csv b/output/openapi/elasticsearch-openapi-docs.redirects.csv new file mode 100644 index 0000000000..a053b1593d --- /dev/null +++ b/output/openapi/elasticsearch-openapi-docs.redirects.csv @@ -0,0 +1,149 @@ +async-search-submit-1,async-search-submit +bulk-1,bulk +cat-aliases-1,cat-aliases +cat-allocation-1,cat-allocation +cat-component-templates-1,cat-component-templates +cat-count-1,cat-count +cat-fielddata-1,cat-fielddata +cat-indices-1,cat-indices +cat-ml-data-frame-analytics-1,cat-ml-data-frame-analytics +cat-ml-datafeeds-1,cat-ml-datafeeds +cat-ml-jobs-1,cat-ml-jobs +cat-ml-trained-models-1,cat-ml-trained-models +cat-recovery-1,cat-recovery +cat-segments-1,cat-segments +cat-shards-1,cat-shards +cat-snapshots-1,cat-snapshots +cat-templates-1,cat-templates +cat-thread-pool-1,cat-thread-pool +cat-transforms-1,cat-transforms +ccr-get-auto-follow-pattern-1,ccr-get-auto-follow-pattern +clear-scroll-1,clear-scroll +cluster-get-component-template-1,cluster-get-component-template +cluster-health-1,cluster-health +cluster-state-1,cluster-state +cluster-state-2,cluster-state +cluster-stats-1,cluster-stats +connector-put-1,connector-put +count-1,count +enrich-get-policy-1,enrich-get-policy +field-caps-1,field-caps +fleet-msearch-1,fleet-msearch +health-report-1,health-report +ilm-get-lifecycle-1,ilm-get-lifecycle +index-1,index +indices-analyze-1,indices-analyze +indices-clear-cache-1,indices-clear-cache +indices-data-streams-stats-1,indices-data-streams-stats +indices-delete-alias-1,indices-delete-alias +indices-exists-alias-1,indices-exists-alias +indices-flush-1,indices-flush +indices-forcemerge-1,indices-forcemerge +indices-get-alias-1,indices-get-alias +indices-get-alias-2,indices-get-alias +indices-get-alias-3,indices-get-alias +indices-get-data-stream-1,indices-get-data-stream +indices-get-field-mapping-1,indices-get-field-mapping +indices-get-index-template-1,indices-get-index-template +indices-get-mapping-1,indices-get-mapping +indices-get-settings-1,indices-get-settings +indices-get-settings-2,indices-get-settings +indices-get-settings-3,indices-get-settings +indices-get-template-1,indices-get-template +indices-put-alias-1,indices-put-alias +indices-put-settings-1,indices-put-settings +indices-recovery-1,indices-recovery +indices-refresh-1,indices-refresh +indices-resolve-cluster-1,indices-resolve-cluster +indices-rollover-1,indices-rollover +indices-segments-1,indices-segments +indices-shard-stores-1,indices-shard-stores +indices-simulate-template-1,indices-simulate-template +indices-stats-1,indices-stats +indices-stats-2,indices-stats +indices-stats-3,indices-stats +indices-validate-query-1,indices-validate-query +inference-delete-1,inference-delete +inference-get-1,inference-get +inference-get-2,inference-get +inference-inference-1,inference-inference +inference-put-1,inference-put +inference-update-1,inference-update +ingest-get-geoip-database-1,ingest-get-geoip-database +ingest-get-ip-location-database-1,ingest-get-ip-location-database +ingest-get-pipeline-1,ingest-get-pipeline +ingest-simulate-1,ingest-simulate +logstash-get-pipeline-1,logstash-get-pipeline +mget-1,mget +migration-deprecations-1,migration-deprecations +ml-delete-expired-data-1,ml-delete-expired-data +ml-delete-forecast-1,ml-delete-forecast +ml-explain-data-frame-analytics-1,ml-explain-data-frame-analytics +ml-get-buckets-1,ml-get-buckets +ml-get-calendars-1,ml-get-calendars +ml-get-categories-1,ml-get-categories +ml-get-data-frame-analytics-1,ml-get-data-frame-analytics +ml-get-data-frame-analytics-stats-1,ml-get-data-frame-analytics-stats +ml-get-datafeed-stats-1,ml-get-datafeed-stats +ml-get-datafeeds-1,ml-get-datafeeds +ml-get-filters-1,ml-get-filters +ml-get-job-stats-1,ml-get-job-stats +ml-get-jobs-1,ml-get-jobs +ml-get-memory-stats-1,ml-get-memory-stats +ml-get-model-snapshots-1,ml-get-model-snapshots +ml-get-trained-models-1,ml-get-trained-models +ml-get-trained-models-stats-1,ml-get-trained-models-stats +ml-preview-data-frame-analytics-1,ml-preview-data-frame-analytics +ml-preview-datafeed-1,ml-preview-datafeed +msearch-1,msearch +msearch-template-1,msearch-template +mtermvectors-1,mtermvectors +nodes-hot-threads-1,nodes-hot-threads +nodes-info-1,nodes-info +nodes-info-2,nodes-info +nodes-info-3,nodes-info +nodes-reload-secure-settings-1,nodes-reload-secure-settings +nodes-stats-1,nodes-stats +nodes-stats-2,nodes-stats +nodes-stats-3,nodes-stats +nodes-stats-4,nodes-stats +nodes-stats-5,nodes-stats +nodes-usage-1,nodes-usage +nodes-usage-2,nodes-usage +nodes-usage-3,nodes-usage +put-script-1,put-script +rank-eval-1,rank-eval +render-search-template-1,render-search-template +rollup-get-jobs-1,rollup-get-jobs +rollup-get-rollup-caps-1,rollup-get-rollup-caps +scroll-1,scroll +search-1,search +search-application-get-behavioral-analytics-1,search-application-get-behavioral-analytics +search-shards-1,search-shards +search-template-1,search-template +searchable-snapshots-cache-stats-1,searchable-snapshots-cache-stats +searchable-snapshots-clear-cache-1,searchable-snapshots-clear-cache +searchable-snapshots-stats-1,searchable-snapshots-stats +security-change-password-1,security-change-password +security-create-service-token-1,security-create-service-token +security-get-privileges-1,security-get-privileges +security-get-privileges-2,security-get-privileges +security-get-role-1,security-get-role +security-get-role-mapping-1,security-get-role-mapping +security-get-service-accounts-1,security-get-service-accounts +security-get-service-accounts-2,security-get-service-accounts +security-get-user-1,security-get-user +security-has-privileges-1,security-has-privileges +shutdown-get-node-1,shutdown-get-node +simulate-ingest-1,simulate-ingest +slm-get-lifecycle-1,slm-get-lifecycle +snapshot-get-repository-1,snapshot-get-repository +snapshot-status-1,snapshot-status +snapshot-status-2,snapshot-status +tasks-cancel-1,tasks-cancel +termvectors-1,termvectors +transform-get-transform-1,transform-get-transform +transform-preview-transform-1,transform-preview-transform +watcher-ack-watch-1,watcher-ack-watch +watcher-execute-watch-1,watcher-execute-watch +watcher-stats-1,watcher-stats diff --git a/output/openapi/elasticsearch-openapi.json b/output/openapi/elasticsearch-openapi.json index f5ef554b47..e81215c773 100644 --- a/output/openapi/elasticsearch-openapi.json +++ b/output/openapi/elasticsearch-openapi.json @@ -79,7 +79,12 @@ } }, "x-state": "Generally available; Added in 7.7.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] }, "delete": { "tags": [ @@ -114,7 +119,12 @@ } }, "x-state": "Generally available; Added in 7.7.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_async_search/status/{id}": { @@ -178,7 +188,12 @@ } }, "x-state": "Generally available; Added in 7.11.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_async_search": { @@ -329,7 +344,12 @@ } }, "x-state": "Generally available; Added in 7.7.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/{index}/_async_search": { @@ -483,7 +503,12 @@ } }, "x-state": "Generally available; Added in 7.7.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_autoscaling/policy/{name}": { @@ -541,7 +566,12 @@ } }, "x-state": "Generally available; Added in 7.11.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] }, "put": { "tags": [ @@ -627,7 +657,12 @@ } }, "x-state": "Generally available; Added in 7.11.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] }, "delete": { "tags": [ @@ -693,7 +728,12 @@ } }, "x-state": "Generally available; Added in 7.11.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_autoscaling/capacity": { @@ -751,7 +791,12 @@ } }, "x-state": "Generally available; Added in 7.11.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_bulk": { @@ -813,7 +858,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] }, "post": { "tags": [ @@ -873,7 +923,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/{index}/_bulk": { @@ -938,7 +993,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] }, "post": { "tags": [ @@ -1001,7 +1061,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_cat/aliases": { @@ -1032,7 +1097,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_cat/aliases/{name}": { @@ -1066,7 +1136,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_cat/allocation": { @@ -1100,7 +1175,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_cat/allocation/{node_id}": { @@ -1137,7 +1217,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_cat/component_templates": { @@ -1168,7 +1253,12 @@ } }, "x-state": "Generally available; Added in 5.1.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_cat/component_templates/{name}": { @@ -1202,7 +1292,12 @@ } }, "x-state": "Generally available; Added in 5.1.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_cat/count": { @@ -1227,7 +1322,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_cat/count/{index}": { @@ -1255,7 +1355,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_cat/fielddata": { @@ -1286,7 +1391,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_cat/fielddata/{fields}": { @@ -1320,7 +1430,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_cat/health": { @@ -1395,7 +1510,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_cat": { @@ -1419,7 +1539,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_cat/indices": { @@ -1465,7 +1590,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_cat/indices/{index}": { @@ -1514,7 +1644,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_cat/master": { @@ -1589,7 +1724,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_cat/ml/data_frame/analytics": { @@ -1623,7 +1763,12 @@ } }, "x-state": "Generally available; Added in 7.7.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_cat/ml/data_frame/analytics/{id}": { @@ -1660,7 +1805,12 @@ } }, "x-state": "Generally available; Added in 7.7.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_cat/ml/datafeeds": { @@ -1691,7 +1841,12 @@ } }, "x-state": "Generally available; Added in 7.7.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_cat/ml/datafeeds/{datafeed_id}": { @@ -1725,7 +1880,12 @@ } }, "x-state": "Generally available; Added in 7.7.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_cat/ml/anomaly_detectors": { @@ -1759,7 +1919,12 @@ } }, "x-state": "Generally available; Added in 7.7.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_cat/ml/anomaly_detectors/{job_id}": { @@ -1796,7 +1961,12 @@ } }, "x-state": "Generally available; Added in 7.7.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_cat/ml/trained_models": { @@ -1836,7 +2006,12 @@ } }, "x-state": "Generally available; Added in 7.7.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_cat/ml/trained_models/{model_id}": { @@ -1879,7 +2054,12 @@ } }, "x-state": "Generally available; Added in 7.7.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_cat/nodeattrs": { @@ -1960,7 +2140,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_cat/nodes": { @@ -2078,7 +2263,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_cat/pending_tasks": { @@ -2163,7 +2353,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_cat/plugins": { @@ -2248,7 +2443,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_cat/recovery": { @@ -2288,7 +2488,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_cat/recovery/{index}": { @@ -2331,7 +2536,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_cat/repositories": { @@ -2406,7 +2616,12 @@ } }, "x-state": "Generally available; Added in 2.1.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_cat/segments": { @@ -2440,7 +2655,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_cat/segments/{index}": { @@ -2477,7 +2697,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_cat/shards": { @@ -2511,7 +2736,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_cat/shards/{index}": { @@ -2548,7 +2778,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_cat/snapshots": { @@ -2582,7 +2817,12 @@ } }, "x-state": "Generally available; Added in 2.1.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_cat/snapshots/{repository}": { @@ -2619,7 +2859,12 @@ } }, "x-state": "Generally available; Added in 2.1.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_cat/tasks": { @@ -2750,7 +2995,12 @@ } }, "x-state": "Technical preview; Added in 5.0.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_cat/templates": { @@ -2781,7 +3031,12 @@ } }, "x-state": "Generally available; Added in 5.2.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_cat/templates/{name}": { @@ -2815,7 +3070,12 @@ } }, "x-state": "Generally available; Added in 5.2.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_cat/thread_pool": { @@ -2849,7 +3109,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_cat/thread_pool/{thread_pool_patterns}": { @@ -2886,7 +3151,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_cat/transforms": { @@ -2923,7 +3193,12 @@ } }, "x-state": "Generally available; Added in 7.7.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_cat/transforms/{transform_id}": { @@ -2963,7 +3238,12 @@ } }, "x-state": "Generally available; Added in 7.7.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_ccr/auto_follow/{name}": { @@ -2992,7 +3272,12 @@ } }, "x-state": "Generally available; Added in 6.5.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] }, "put": { "tags": [ @@ -3049,6 +3334,7 @@ }, "max_outstanding_read_requests": { "description": "The maximum number of outstanding reads requests from the remote cluster.", + "default": 12.0, "type": "number" }, "settings": { @@ -3060,6 +3346,7 @@ }, "max_outstanding_write_requests": { "description": "The maximum number of outstanding reads requests from the remote cluster.", + "default": 9.0, "type": "number" }, "read_poll_timeout": { @@ -3067,6 +3354,7 @@ }, "max_read_request_operation_count": { "description": "The maximum number of operations to pull per read from the remote cluster.", + "default": 5120.0, "type": "number" }, "max_read_request_size": { @@ -3077,6 +3365,7 @@ }, "max_write_buffer_count": { "description": "The maximum number of operations that can be queued for writing. When this limit is reached, reads from the remote cluster will be deferred until the number of queued operations goes below the limit.", + "default": 2147483647.0, "type": "number" }, "max_write_buffer_size": { @@ -3084,6 +3373,7 @@ }, "max_write_request_operation_count": { "description": "The maximum number of operations per bulk write request executed on the follower.", + "default": 5120.0, "type": "number" }, "max_write_request_size": { @@ -3123,7 +3413,12 @@ } }, "x-state": "Generally available; Added in 6.5.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] }, "delete": { "tags": [ @@ -3178,7 +3473,12 @@ } }, "x-state": "Generally available; Added in 6.5.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/{index}/_ccr/follow": { @@ -3328,7 +3628,12 @@ } }, "x-state": "Generally available; Added in 6.5.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/{index}/_ccr/info": { @@ -3402,7 +3707,12 @@ } }, "x-state": "Generally available; Added in 6.7.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/{index}/_ccr/stats": { @@ -3471,7 +3781,12 @@ } }, "x-state": "Generally available; Added in 6.5.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/{index}/_ccr/forget_follower": { @@ -3566,7 +3881,12 @@ } }, "x-state": "Generally available; Added in 6.7.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_ccr/auto_follow": { @@ -3592,7 +3912,12 @@ } }, "x-state": "Generally available; Added in 6.5.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_ccr/auto_follow/{name}/pause": { @@ -3649,7 +3974,12 @@ } }, "x-state": "Generally available; Added in 7.5.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/{index}/_ccr/pause_follow": { @@ -3702,7 +4032,12 @@ } }, "x-state": "Generally available; Added in 6.5.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_ccr/auto_follow/{name}/resume": { @@ -3759,7 +4094,12 @@ } }, "x-state": "Generally available; Added in 7.5.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/{index}/_ccr/resume_follow": { @@ -3863,7 +4203,12 @@ } }, "x-state": "Generally available; Added in 6.5.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_ccr/stats": { @@ -3927,7 +4272,12 @@ } }, "x-state": "Generally available; Added in 6.5.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/{index}/_ccr/unfollow": { @@ -3984,7 +4334,12 @@ } }, "x-state": "Generally available; Added in 6.5.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_search/scroll": { @@ -4019,7 +4374,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] }, "post": { "tags": [ @@ -4052,7 +4412,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] }, "delete": { "tags": [ @@ -4074,7 +4439,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_search/scroll/{scroll_id}": { @@ -4112,7 +4482,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] }, "post": { "tags": [ @@ -4148,7 +4523,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] }, "delete": { "tags": [ @@ -4175,7 +4555,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_pit": { @@ -4242,7 +4627,12 @@ } }, "x-state": "Generally available; Added in 7.10.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_cluster/allocation/explain": { @@ -4277,7 +4667,12 @@ } }, "x-state": "Generally available; Added in 5.0.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] }, "post": { "tags": [ @@ -4310,7 +4705,12 @@ } }, "x-state": "Generally available; Added in 5.0.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_component_template/{name}": { @@ -4328,6 +4728,9 @@ { "$ref": "#/components/parameters/cluster.get_component_template-flat_settings" }, + { + "$ref": "#/components/parameters/cluster.get_component_template-settings_filter" + }, { "$ref": "#/components/parameters/cluster.get_component_template-include_defaults" }, @@ -4344,7 +4747,12 @@ } }, "x-state": "Generally available; Added in 7.8.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] }, "put": { "tags": [ @@ -4360,6 +4768,9 @@ { "$ref": "#/components/parameters/cluster.put_component_template-create" }, + { + "$ref": "#/components/parameters/cluster.put_component_template-cause" + }, { "$ref": "#/components/parameters/cluster.put_component_template-master_timeout" } @@ -4373,7 +4784,12 @@ } }, "x-state": "Generally available; Added in 7.8.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] }, "post": { "tags": [ @@ -4389,6 +4805,9 @@ { "$ref": "#/components/parameters/cluster.put_component_template-create" }, + { + "$ref": "#/components/parameters/cluster.put_component_template-cause" + }, { "$ref": "#/components/parameters/cluster.put_component_template-master_timeout" } @@ -4402,7 +4821,12 @@ } }, "x-state": "Generally available; Added in 7.8.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] }, "delete": { "tags": [ @@ -4457,7 +4881,12 @@ } }, "x-state": "Generally available; Added in 7.8.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] }, "head": { "tags": [ @@ -4508,7 +4937,12 @@ } }, "x-state": "Generally available; Added in 7.8.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_cluster/voting_config_exclusions": { @@ -4574,7 +5008,12 @@ } }, "x-state": "Generally available; Added in 7.0.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] }, "delete": { "tags": [ @@ -4618,7 +5057,12 @@ } }, "x-state": "Generally available; Added in 7.0.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_component_template": { @@ -4633,6 +5077,9 @@ { "$ref": "#/components/parameters/cluster.get_component_template-flat_settings" }, + { + "$ref": "#/components/parameters/cluster.get_component_template-settings_filter" + }, { "$ref": "#/components/parameters/cluster.get_component_template-include_defaults" }, @@ -4649,7 +5096,12 @@ } }, "x-state": "Generally available; Added in 7.8.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_cluster/settings": { @@ -4746,7 +5198,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] }, "put": { "tags": [ @@ -4864,7 +5321,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_cluster/health": { @@ -4916,7 +5378,12 @@ } }, "x-state": "Generally available; Added in 1.3.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_cluster/health/{index}": { @@ -4971,7 +5438,12 @@ } }, "x-state": "Generally available; Added in 1.3.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_info/{target}": { @@ -5031,7 +5503,12 @@ } }, "x-state": "Generally available; Added in 8.9.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_cluster/pending_tasks": { @@ -5088,7 +5565,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_remote/info": { @@ -5119,7 +5601,12 @@ } }, "x-state": "Generally available; Added in 6.1.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_cluster/reroute": { @@ -5247,7 +5734,12 @@ } }, "x-state": "Generally available; Added in 5.0.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_cluster/state": { @@ -5290,7 +5782,12 @@ } }, "x-state": "Generally available; Added in 1.3.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_cluster/state/{metric}": { @@ -5336,7 +5833,12 @@ } }, "x-state": "Generally available; Added in 1.3.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_cluster/state/{metric}/{index}": { @@ -5385,7 +5887,12 @@ } }, "x-state": "Generally available; Added in 1.3.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_cluster/stats": { @@ -5410,7 +5917,12 @@ } }, "x-state": "Generally available; Added in 1.3.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_cluster/stats/nodes/{node_id}": { @@ -5438,7 +5950,12 @@ } }, "x-state": "Generally available; Added in 1.3.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_connector/{connector_id}/_check_in": { @@ -5488,7 +6005,12 @@ } }, "x-state": "Technical preview; Added in 8.12.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_connector/{connector_id}": { @@ -5535,7 +6057,12 @@ } }, "x-state": "Beta; Added in 8.12.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] }, "put": { "tags": [ @@ -5557,7 +6084,12 @@ } }, "x-state": "Beta; Added in 8.12.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] }, "delete": { "tags": [ @@ -5617,7 +6149,12 @@ } }, "x-state": "Beta; Added in 8.12.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_connector": { @@ -5728,7 +6265,12 @@ } }, "x-state": "Beta; Added in 8.12.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] }, "put": { "tags": [ @@ -5745,7 +6287,12 @@ } }, "x-state": "Beta; Added in 8.12.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] }, "post": { "tags": [ @@ -5808,7 +6355,12 @@ } }, "x-state": "Beta; Added in 8.12.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_connector/_sync_job/{connector_sync_job_id}/_cancel": { @@ -5853,7 +6405,12 @@ } }, "x-state": "Beta; Added in 8.12.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_connector/_sync_job/{connector_sync_job_id}/_check_in": { @@ -5890,7 +6447,12 @@ } }, "x-state": "Technical preview", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_connector/_sync_job/{connector_sync_job_id}/_claim": { @@ -5956,7 +6518,12 @@ } }, "x-state": "Technical preview", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_connector/_sync_job/{connector_sync_job_id}": { @@ -5992,7 +6559,12 @@ } }, "x-state": "Beta; Added in 8.12.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] }, "delete": { "tags": [ @@ -6032,7 +6604,12 @@ } }, "x-state": "Beta; Added in 8.12.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_connector/_sync_job/{connector_sync_job_id}/_error": { @@ -6093,7 +6670,12 @@ } }, "x-state": "Technical preview", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_connector/_sync_job": { @@ -6194,7 +6776,12 @@ } }, "x-state": "Beta; Added in 8.12.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] }, "post": { "tags": [ @@ -6253,7 +6840,12 @@ } }, "x-state": "Beta; Added in 8.12.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_connector/_sync_job/{connector_sync_job_id}/_stats": { @@ -6335,7 +6927,12 @@ } }, "x-state": "Technical preview", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_connector/{connector_id}/_filtering/_activate": { @@ -6380,7 +6977,12 @@ } }, "x-state": "Technical preview; Added in 8.12.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_connector/{connector_id}/_api_key_id": { @@ -6453,7 +7055,12 @@ } }, "x-state": "Beta; Added in 8.12.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_connector/{connector_id}/_configuration": { @@ -6532,7 +7139,12 @@ } }, "x-state": "Beta; Added in 8.12.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_connector/{connector_id}/_error": { @@ -6612,7 +7224,12 @@ } }, "x-state": "Technical preview; Added in 8.12.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_connector/{connector_id}/_features": { @@ -6688,7 +7305,12 @@ } }, "x-state": "Technical preview", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_connector/{connector_id}/_filtering": { @@ -6773,7 +7395,12 @@ } }, "x-state": "Beta; Added in 8.12.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_connector/{connector_id}/_filtering/_validation": { @@ -6836,7 +7463,12 @@ } }, "x-state": "Technical preview; Added in 8.12.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_connector/{connector_id}/_index_name": { @@ -6916,7 +7548,12 @@ } }, "x-state": "Beta; Added in 8.12.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_connector/{connector_id}/_name": { @@ -6988,7 +7625,12 @@ } }, "x-state": "Beta; Added in 8.12.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_connector/{connector_id}/_native": { @@ -7050,7 +7692,12 @@ } }, "x-state": "Beta; Added in 8.12.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_connector/{connector_id}/_pipeline": { @@ -7123,7 +7770,12 @@ } }, "x-state": "Beta; Added in 8.12.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_connector/{connector_id}/_scheduling": { @@ -7198,7 +7850,12 @@ } }, "x-state": "Beta; Added in 8.12.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_connector/{connector_id}/_service_type": { @@ -7270,7 +7927,12 @@ } }, "x-state": "Beta; Added in 8.12.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_connector/{connector_id}/_status": { @@ -7342,7 +8004,12 @@ } }, "x-state": "Technical preview; Added in 8.12.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_count": { @@ -7406,7 +8073,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] }, "post": { "tags": [ @@ -7468,7 +8140,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/{index}/_count": { @@ -7535,7 +8212,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] }, "post": { "tags": [ @@ -7600,7 +8282,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/{index}/_create/{id}": { @@ -7622,18 +8309,9 @@ { "$ref": "#/components/parameters/create-id" }, - { - "$ref": "#/components/parameters/create-if_primary_term" - }, - { - "$ref": "#/components/parameters/create-if_seq_no" - }, { "$ref": "#/components/parameters/create-include_source_on_error" }, - { - "$ref": "#/components/parameters/create-op_type" - }, { "$ref": "#/components/parameters/create-pipeline" }, @@ -7671,7 +8349,12 @@ } }, "x-state": "Generally available; Added in 5.0.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] }, "post": { "tags": [ @@ -7691,18 +8374,9 @@ { "$ref": "#/components/parameters/create-id" }, - { - "$ref": "#/components/parameters/create-if_primary_term" - }, - { - "$ref": "#/components/parameters/create-if_seq_no" - }, { "$ref": "#/components/parameters/create-include_source_on_error" }, - { - "$ref": "#/components/parameters/create-op_type" - }, { "$ref": "#/components/parameters/create-pipeline" }, @@ -7740,7 +8414,12 @@ } }, "x-state": "Generally available; Added in 5.0.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_dangling/{index_uuid}": { @@ -7814,7 +8493,12 @@ } }, "x-state": "Generally available; Added in 7.9.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] }, "delete": { "tags": [ @@ -7880,7 +8564,12 @@ } }, "x-state": "Generally available; Added in 7.9.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_dangling": { @@ -7920,7 +8609,12 @@ } }, "x-state": "Generally available; Added in 7.9.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/{index}/_doc/{id}": { @@ -8085,7 +8779,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] }, "put": { "tags": [ @@ -8140,6 +8839,9 @@ }, { "$ref": "#/components/parameters/index-require_alias" + }, + { + "$ref": "#/components/parameters/index-require_data_stream" } ], "requestBody": { @@ -8151,7 +8853,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] }, "post": { "tags": [ @@ -8206,6 +8913,9 @@ }, { "$ref": "#/components/parameters/index-require_alias" + }, + { + "$ref": "#/components/parameters/index-require_data_stream" } ], "requestBody": { @@ -8217,7 +8927,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] }, "delete": { "tags": [ @@ -8349,7 +9064,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] }, "head": { "tags": [ @@ -8491,7 +9211,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/{index}/_delete_by_query": { @@ -8935,7 +9660,12 @@ } }, "x-state": "Generally available; Added in 5.0.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_delete_by_query/{task_id}/_rethrottle": { @@ -8982,7 +9712,12 @@ } }, "x-state": "Generally available; Added in 6.5.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_scripts/{id}": { @@ -9044,7 +9779,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] }, "put": { "tags": [ @@ -9080,7 +9820,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] }, "post": { "tags": [ @@ -9116,7 +9861,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] }, "delete": { "tags": [ @@ -9171,7 +9921,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_enrich/policy/{name}": { @@ -9196,7 +9951,12 @@ } }, "x-state": "Generally available; Added in 7.5.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] }, "put": { "tags": [ @@ -9268,7 +10028,12 @@ } }, "x-state": "Generally available; Added in 7.5.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] }, "delete": { "tags": [ @@ -9313,7 +10078,12 @@ } }, "x-state": "Generally available; Added in 7.5.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_enrich/policy/{name}/_execute": { @@ -9378,7 +10148,12 @@ } }, "x-state": "Generally available; Added in 7.5.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_enrich/policy": { @@ -9400,7 +10175,12 @@ } }, "x-state": "Generally available; Added in 7.5.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_enrich/_stats": { @@ -9464,7 +10244,12 @@ } }, "x-state": "Generally available; Added in 7.5.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_eql/search/{id}": { @@ -9521,7 +10306,12 @@ } }, "x-state": "Generally available; Added in 7.9.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] }, "delete": { "tags": [ @@ -9556,7 +10346,12 @@ } }, "x-state": "Generally available; Added in 7.9.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_eql/search/status/{id}": { @@ -9627,7 +10422,12 @@ } }, "x-state": "Generally available; Added in 7.9.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/{index}/_eql/search": { @@ -9658,6 +10458,9 @@ { "$ref": "#/components/parameters/eql.search-expand_wildcards" }, + { + "$ref": "#/components/parameters/eql.search-ccs_minimize_roundtrips" + }, { "$ref": "#/components/parameters/eql.search-ignore_unavailable" }, @@ -9680,7 +10483,12 @@ } }, "x-state": "Generally available; Added in 7.9.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] }, "post": { "tags": [ @@ -9709,6 +10517,9 @@ { "$ref": "#/components/parameters/eql.search-expand_wildcards" }, + { + "$ref": "#/components/parameters/eql.search-ccs_minimize_roundtrips" + }, { "$ref": "#/components/parameters/eql.search-ignore_unavailable" }, @@ -9731,7 +10542,12 @@ } }, "x-state": "Generally available; Added in 7.9.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_query/async": { @@ -9780,7 +10596,7 @@ { "in": "query", "name": "format", - "description": "A short version of the Accept header, for example `json` or `yaml`.", + "description": "A short version of the Accept header, e.g. json, yaml.\n\n`csv`, `tsv`, and `txt` formats will return results in a tabular format, excluding other metadata fields from the response.\n\nFor async requests, nothing will be returned if the async query doesn't finish within the timeout.\nThe query ID and running status are available in the `X-Elasticsearch-Async-Id` and `X-Elasticsearch-Async-Is-Running` HTTP headers of the response, respectively.", "deprecated": false, "schema": { "$ref": "#/components/schemas/esql._types.EsqlFormat" @@ -9831,6 +10647,7 @@ }, "include_ccs_metadata": { "description": "When set to `true` and performing a cross-cluster query, the response will include an extra `_clusters`\nobject with information about the clusters that participated in the search along with info such as shards\ncount.", + "default": false, "type": "boolean" }, "wait_for_completion_timeout": { @@ -9841,6 +10658,7 @@ }, "keep_on_completion": { "description": "Indicates whether the query and its results are stored in the cluster.\nIf false, the query and its results are stored in the cluster only if the request does not complete during the period set by the `wait_for_completion_timeout` parameter.", + "default": false, "type": "boolean" } }, @@ -9870,7 +10688,12 @@ } }, "x-state": "Generally available; Added in 8.13.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_query/async/{id}": { @@ -9951,7 +10774,12 @@ } }, "x-state": "Generally available; Added in 8.13.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] }, "delete": { "tags": [ @@ -9990,7 +10818,12 @@ } }, "x-state": "Generally available; Added in 8.13.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_query/async/{id}/stop": { @@ -10040,7 +10873,12 @@ } }, "x-state": "Generally available; Added in 8.18.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_query/queries/{id}": { @@ -10112,7 +10950,12 @@ } }, "x-state": "Technical preview; Added in 9.1.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_query/queries": { @@ -10147,7 +10990,12 @@ } }, "x-state": "Technical preview; Added in 9.1.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_query": { @@ -10165,7 +11013,7 @@ { "in": "query", "name": "format", - "description": "A short version of the Accept header, e.g. json, yaml.", + "description": "A short version of the Accept header, e.g. json, yaml.\n\n`csv`, `tsv`, and `txt` formats will return results in a tabular format, excluding other metadata fields from the response.", "deprecated": false, "schema": { "$ref": "#/components/schemas/esql._types.EsqlFormat" @@ -10246,6 +11094,7 @@ }, "include_ccs_metadata": { "description": "When set to `true` and performing a cross-cluster query, the response will include an extra `_clusters`\nobject with information about the clusters that participated in the search along with info such as shards\ncount.", + "default": false, "type": "boolean" } }, @@ -10276,7 +11125,12 @@ } }, "x-state": "Generally available; Added in 8.11.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/{index}/_source/{id}": { @@ -10384,16 +11238,6 @@ }, "style": "form" }, - { - "in": "query", - "name": "stored_fields", - "description": "A comma-separated list of stored fields to return as part of a hit.", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Fields" - }, - "style": "form" - }, { "in": "query", "name": "version", @@ -10428,7 +11272,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] }, "head": { "tags": [ @@ -10564,7 +11413,12 @@ } }, "x-state": "Generally available; Added in 5.4.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/{index}/_explain/{id}": { @@ -10628,7 +11482,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] }, "post": { "tags": [ @@ -10690,7 +11549,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_features": { @@ -10747,7 +11611,12 @@ } }, "x-state": "Generally available; Added in 7.12.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_features/_reset": { @@ -10800,7 +11669,12 @@ } }, "x-state": "Technical preview; Added in 7.12.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_field_caps": { @@ -10846,7 +11720,12 @@ } }, "x-state": "Generally available; Added in 5.4.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] }, "post": { "tags": [ @@ -10890,7 +11769,12 @@ } }, "x-state": "Generally available; Added in 5.4.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/{index}/_field_caps": { @@ -10939,7 +11823,12 @@ } }, "x-state": "Generally available; Added in 5.4.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] }, "post": { "tags": [ @@ -10986,7 +11875,12 @@ } }, "x-state": "Generally available; Added in 5.4.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/{index}/_fleet/global_checkpoints": { @@ -11088,7 +11982,12 @@ } }, "x-state": "Generally available; Added in 7.13.0", - "x-product-feature": "elasticsearch, fleet" + "x-metaTags": [ + { + "content": "Elasticsearch, Fleet", + "name": "product_name" + } + ] } }, "/_fleet/_fleet_msearch": { @@ -11149,7 +12048,12 @@ } }, "x-state": "Technical preview; Added in 7.16.0", - "x-product-feature": "elasticsearch, fleet" + "x-metaTags": [ + { + "content": "Elasticsearch, Fleet", + "name": "product_name" + } + ] }, "post": { "tags": [ @@ -11208,7 +12112,12 @@ } }, "x-state": "Technical preview; Added in 7.16.0", - "x-product-feature": "elasticsearch, fleet" + "x-metaTags": [ + { + "content": "Elasticsearch, Fleet", + "name": "product_name" + } + ] } }, "/{index}/_fleet/_fleet_msearch": { @@ -11272,7 +12181,12 @@ } }, "x-state": "Technical preview; Added in 7.16.0", - "x-product-feature": "elasticsearch, fleet" + "x-metaTags": [ + { + "content": "Elasticsearch, Fleet", + "name": "product_name" + } + ] }, "post": { "tags": [ @@ -11334,7 +12248,12 @@ } }, "x-state": "Technical preview; Added in 7.16.0", - "x-product-feature": "elasticsearch, fleet" + "x-metaTags": [ + { + "content": "Elasticsearch, Fleet", + "name": "product_name" + } + ] } }, "/{index}/_fleet/_fleet_search": { @@ -11488,7 +12407,12 @@ } }, "x-state": "Technical preview; Added in 7.16.0", - "x-product-feature": "elasticsearch, fleet" + "x-metaTags": [ + { + "content": "Elasticsearch, Fleet", + "name": "product_name" + } + ] }, "post": { "tags": [ @@ -11640,7 +12564,12 @@ } }, "x-state": "Technical preview; Added in 7.16.0", - "x-product-feature": "elasticsearch, fleet" + "x-metaTags": [ + { + "content": "Elasticsearch, Fleet", + "name": "product_name" + } + ] } }, "/_script_context": { @@ -11675,7 +12604,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_script_language": { @@ -11717,7 +12651,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/{index}/_graph/explore": { @@ -11752,7 +12691,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] }, "post": { "tags": [ @@ -11785,7 +12729,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_health_report": { @@ -11813,7 +12762,12 @@ } }, "x-state": "Generally available; Added in 8.7.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_health_report/{feature}": { @@ -11844,7 +12798,12 @@ } }, "x-state": "Generally available; Added in 8.7.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_ilm/policy/{policy}": { @@ -11872,7 +12831,12 @@ } }, "x-state": "Generally available; Added in 6.6.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] }, "put": { "tags": [ @@ -11957,7 +12921,12 @@ } }, "x-state": "Generally available; Added in 6.6.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] }, "delete": { "tags": [ @@ -12018,7 +12987,12 @@ } }, "x-state": "Generally available; Added in 6.6.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/{index}/_ilm/explain": { @@ -12102,7 +13076,12 @@ } }, "x-state": "Generally available; Added in 6.6.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_ilm/policy": { @@ -12127,7 +13106,12 @@ } }, "x-state": "Generally available; Added in 6.6.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_ilm/status": { @@ -12165,7 +13149,12 @@ } }, "x-state": "Generally available; Added in 6.6.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_ilm/migrate_to_data_tiers": { @@ -12293,7 +13282,12 @@ } }, "x-state": "Generally available; Added in 7.14.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_ilm/move/{index}": { @@ -12369,7 +13363,12 @@ } }, "x-state": "Generally available; Added in 6.6.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/{index}/_ilm/remove": { @@ -12427,7 +13426,12 @@ } }, "x-state": "Generally available; Added in 6.6.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/{index}/_ilm/retry": { @@ -12464,7 +13468,12 @@ } }, "x-state": "Generally available; Added in 6.6.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_ilm/start": { @@ -12516,7 +13525,12 @@ } }, "x-state": "Generally available; Added in 6.6.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_ilm/stop": { @@ -12568,7 +13582,12 @@ } }, "x-state": "Generally available; Added in 6.6.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/{index}/_doc": { @@ -12622,6 +13641,9 @@ }, { "$ref": "#/components/parameters/index-require_alias" + }, + { + "$ref": "#/components/parameters/index-require_data_stream" } ], "requestBody": { @@ -12633,7 +13655,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/{index}/_block/{block}": { @@ -12663,7 +13690,7 @@ "required": true, "deprecated": false, "schema": { - "$ref": "#/components/schemas/indices.add_block.IndicesBlockOptions" + "$ref": "#/components/schemas/indices._types.IndicesBlockOptions" }, "style": "simple" }, @@ -12735,7 +13762,7 @@ "indices": { "type": "array", "items": { - "$ref": "#/components/schemas/indices.add_block.IndicesBlockStatus" + "$ref": "#/components/schemas/indices.add_block.AddIndicesBlockStatus" } } }, @@ -12756,7 +13783,134 @@ } }, "x-state": "Generally available; Added in 7.9.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] + }, + "delete": { + "tags": [ + "indices" + ], + "summary": "Remove an index block", + "description": "Remove an index block from an index.\nIndex blocks limit the operations allowed on an index by blocking specific operation types.\n\n## Required authorization\n\n* Index privileges: `manage`\n", + "operationId": "indices-remove-block", + "parameters": [ + { + "in": "path", + "name": "index", + "description": "A comma-separated list or wildcard expression of index names used to limit the request.\nBy default, you must explicitly name the indices you are removing blocks from.\nTo allow the removal of blocks from indices with `_all`, `*`, or other wildcard expressions, change the `action.destructive_requires_name` setting to `false`.\nYou can update this setting in the `elasticsearch.yml` file or by using the cluster update settings API.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.IndexName" + }, + "style": "simple" + }, + { + "in": "path", + "name": "block", + "description": "The block type to remove from the index.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/indices._types.IndicesBlockOptions" + }, + "style": "simple" + }, + { + "in": "query", + "name": "allow_no_indices", + "description": "If `false`, the request returns an error if any wildcard expression, index alias, or `_all` value targets only missing or closed indices.\nThis behavior applies even if the request targets other open indices.\nFor example, a request targeting `foo*,bar*` returns an error if an index starts with `foo` but no index starts with `bar`.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" + }, + { + "in": "query", + "name": "expand_wildcards", + "description": "The type of index that wildcard patterns can match.\nIf the request can target data streams, this argument determines whether wildcard expressions match hidden data streams.\nIt supports comma-separated values, such as `open,hidden`.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.ExpandWildcards" + }, + "style": "form" + }, + { + "in": "query", + "name": "ignore_unavailable", + "description": "If `false`, the request returns an error if it targets a missing or closed index.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" + }, + { + "in": "query", + "name": "master_timeout", + "description": "The period to wait for the master node.\nIf the master node is not available before the timeout expires, the request fails and returns an error.\nIt can also be set to `-1` to indicate that the request should never timeout.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Duration" + }, + "style": "form" + }, + { + "in": "query", + "name": "timeout", + "description": "The period to wait for a response from all relevant nodes in the cluster after updating the cluster metadata.\nIf no response is received before the timeout expires, the cluster metadata update still applies but the response will indicate that it was not completely acknowledged.\nIt can also be set to `-1` to indicate that the request should never timeout.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Duration" + }, + "style": "form" + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "acknowledged": { + "type": "boolean" + }, + "indices": { + "type": "array", + "items": { + "$ref": "#/components/schemas/indices.remove_block.RemoveIndicesBlockStatus" + } + } + }, + "required": [ + "acknowledged", + "indices" + ] + }, + "examples": { + "IndicesRemoveBlockResponseExample1": { + "description": "A successful response from `DELETE /my-index-000001/_block/write`, which removes an index block from an index.'", + "value": "{\n \"acknowledged\" : true,\n \"indices\" : [ {\n \"name\" : \"my-index-000001\",\n \"unblocked\" : true\n } ]\n}" + } + } + } + } + } + }, + "x-state": "Generally available; Added in 9.1.0", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_analyze": { @@ -12785,7 +13939,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] }, "post": { "tags": [ @@ -12812,7 +13971,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/{index}/_analyze": { @@ -12844,7 +14008,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] }, "post": { "tags": [ @@ -12874,7 +14043,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_migration/reindex/{index}/_cancel": { @@ -12911,7 +14085,12 @@ } }, "x-state": "Technical preview; Added in 8.18.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_cache/clear": { @@ -12954,7 +14133,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/{index}/_cache/clear": { @@ -13000,7 +14184,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/{index}/_clone/{target}": { @@ -13037,7 +14226,12 @@ } }, "x-state": "Generally available; Added in 7.4.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] }, "post": { "tags": [ @@ -13072,7 +14266,12 @@ } }, "x-state": "Generally available; Added in 7.4.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/{index}/_close": { @@ -13194,7 +14393,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/{index}": { @@ -13295,6 +14499,7 @@ "schema": { "$ref": "#/components/schemas/indices.get.Features" }, + "x-state": "Generally available; Added in 8.1.0", "style": "form" } ], @@ -13314,7 +14519,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] }, "put": { "tags": [ @@ -13436,7 +14646,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] }, "delete": { "tags": [ @@ -13521,7 +14736,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] }, "head": { "tags": [ @@ -13612,7 +14832,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_data_stream/{name}": { @@ -13646,7 +14871,12 @@ } }, "x-state": "Generally available; Added in 7.9.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] }, "put": { "tags": [ @@ -13701,7 +14931,12 @@ } }, "x-state": "Generally available; Added in 7.9.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] }, "delete": { "tags": [ @@ -13756,7 +14991,12 @@ } }, "x-state": "Generally available; Added in 7.9.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_create_from/{source}/{dest}": { @@ -13784,7 +15024,12 @@ } }, "x-state": "Technical preview; Added in 8.18.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] }, "post": { "tags": [ @@ -13810,7 +15055,12 @@ } }, "x-state": "Technical preview; Added in 8.18.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_data_stream/_stats": { @@ -13832,7 +15082,12 @@ } }, "x-state": "Generally available; Added in 7.9.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_data_stream/{name}/_stats": { @@ -13857,7 +15112,12 @@ } }, "x-state": "Generally available; Added in 7.9.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/{index}/_alias/{name}": { @@ -13894,7 +15154,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] }, "put": { "tags": [ @@ -13926,7 +15191,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] }, "post": { "tags": [ @@ -13958,7 +15228,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] }, "delete": { "tags": [ @@ -13987,7 +15262,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] }, "head": { "tags": [ @@ -14022,7 +15302,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/{index}/_aliases/{name}": { @@ -14056,7 +15341,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] }, "post": { "tags": [ @@ -14088,7 +15378,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] }, "delete": { "tags": [ @@ -14117,7 +15412,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_data_stream/{name}/_lifecycle": { @@ -14205,7 +15505,12 @@ } }, "x-state": "Generally available; Added in 8.11.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] }, "put": { "tags": [ @@ -14275,6 +15580,7 @@ }, "enabled": { "description": "If defined, it turns data stream lifecycle on/off (`true`/`false`) for this data stream. A data stream lifecycle\nthat's disabled (enabled: `false`) will have no effect on the data stream.", + "default": true, "type": "boolean" } } @@ -14312,7 +15618,12 @@ } }, "x-state": "Generally available; Added in 8.11.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] }, "delete": { "tags": [ @@ -14387,7 +15698,12 @@ } }, "x-state": "Generally available; Added in 8.11.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_data_stream/{name}/_options": { @@ -14455,7 +15771,12 @@ } }, "x-state": "Generally available; Added in 8.19.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] }, "put": { "tags": [ @@ -14534,7 +15855,12 @@ } }, "x-state": "Generally available; Added in 8.19.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] }, "delete": { "tags": [ @@ -14605,7 +15931,12 @@ } }, "x-state": "Generally available; Added in 8.19.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_index_template/{name}": { @@ -14639,7 +15970,12 @@ } }, "x-state": "Generally available; Added in 7.9.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] }, "put": { "tags": [ @@ -14671,7 +16007,12 @@ } }, "x-state": "Generally available; Added in 7.9.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] }, "post": { "tags": [ @@ -14703,7 +16044,12 @@ } }, "x-state": "Generally available; Added in 7.9.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] }, "delete": { "tags": [ @@ -14758,14 +16104,19 @@ } }, "x-state": "Generally available; Added in 7.8.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] }, "head": { "tags": [ "indices" ], "summary": "Check index templates", - "description": "Check whether index templates exist.", + "description": "Check whether index templates exist.\n\n## Required authorization\n\n* Cluster privileges: `manage_index_templates`\n", "operationId": "indices-exists-index-template", "parameters": [ { @@ -14819,7 +16170,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_template/{name}": { @@ -14855,7 +16211,12 @@ }, "deprecated": true, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] }, "put": { "tags": [ @@ -14895,7 +16256,12 @@ }, "deprecated": true, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] }, "post": { "tags": [ @@ -14935,7 +16301,12 @@ }, "deprecated": true, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] }, "delete": { "tags": [ @@ -14991,7 +16362,12 @@ }, "deprecated": true, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] }, "head": { "tags": [ @@ -15056,7 +16432,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/{index}/_disk_usage": { @@ -15143,7 +16524,12 @@ } }, "x-state": "Technical preview; Added in 7.15.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/{index}/_downsample/{target_index}": { @@ -15206,7 +16592,12 @@ } }, "x-state": "Technical preview; Added in 8.5.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_alias/{name}": { @@ -15240,7 +16631,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] }, "head": { "tags": [ @@ -15272,7 +16668,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/{index}/_lifecycle/explain": { @@ -15356,7 +16757,12 @@ } }, "x-state": "Generally available; Added in 8.11.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/{index}/_field_usage_stats": { @@ -15439,7 +16845,12 @@ } }, "x-state": "Technical preview; Added in 7.15.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_flush": { @@ -15473,7 +16884,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] }, "post": { "tags": [ @@ -15505,7 +16921,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/{index}/_flush": { @@ -15542,7 +16963,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] }, "post": { "tags": [ @@ -15577,7 +17003,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_forcemerge": { @@ -15621,7 +17052,12 @@ } }, "x-state": "Generally available; Added in 2.1.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/{index}/_forcemerge": { @@ -15668,7 +17104,12 @@ } }, "x-state": "Generally available; Added in 2.1.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_alias": { @@ -15699,7 +17140,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/{index}/_alias": { @@ -15733,7 +17179,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_lifecycle/stats": { @@ -15790,7 +17241,12 @@ } }, "x-state": "Generally available; Added in 8.12.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_data_stream": { @@ -15821,7 +17277,12 @@ } }, "x-state": "Generally available; Added in 7.9.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_data_stream/{name}/_settings": { @@ -15886,7 +17347,12 @@ } }, "x-state": "Generally available; Added in 9.1.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] }, "put": { "tags": [ @@ -15996,7 +17462,12 @@ } }, "x-state": "Generally available; Added in 9.1.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_mapping/field/{fields}": { @@ -16030,7 +17501,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/{index}/_mapping/field/{fields}": { @@ -16067,7 +17543,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_index_template": { @@ -16098,7 +17579,12 @@ } }, "x-state": "Generally available; Added in 7.9.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_mapping": { @@ -16132,7 +17618,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/{index}/_mapping": { @@ -16169,7 +17660,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] }, "put": { "tags": [ @@ -16214,7 +17710,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] }, "post": { "tags": [ @@ -16259,7 +17760,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_migration/reindex/{index}/_status": { @@ -16344,7 +17850,12 @@ } }, "x-state": "Technical preview; Added in 8.18.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_settings": { @@ -16384,7 +17895,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] }, "put": { "tags": [ @@ -16432,7 +17948,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/{index}/_settings": { @@ -16475,7 +17996,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] }, "put": { "tags": [ @@ -16526,7 +18052,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/{index}/_settings/{name}": { @@ -16572,7 +18103,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_settings/{name}": { @@ -16615,7 +18151,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_template": { @@ -16648,7 +18189,12 @@ }, "deprecated": true, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_migration/reindex": { @@ -16688,7 +18234,12 @@ } }, "x-state": "Technical preview; Added in 8.18.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_data_stream/_migrate/{name}": { @@ -16745,7 +18296,12 @@ } }, "x-state": "Generally available; Added in 7.9.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_data_stream/_modify": { @@ -16797,7 +18353,12 @@ } }, "x-state": "Generally available; Added in 7.16.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/{index}/_open": { @@ -16912,7 +18473,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_data_stream/_promote/{name}": { @@ -16959,7 +18525,12 @@ } }, "x-state": "Generally available; Added in 7.9.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_recovery": { @@ -16976,6 +18547,15 @@ }, { "$ref": "#/components/parameters/indices.recovery-detailed" + }, + { + "$ref": "#/components/parameters/indices.recovery-allow_no_indices" + }, + { + "$ref": "#/components/parameters/indices.recovery-expand_wildcards" + }, + { + "$ref": "#/components/parameters/indices.recovery-ignore_unavailable" } ], "responses": { @@ -16984,7 +18564,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/{index}/_recovery": { @@ -17004,6 +18589,15 @@ }, { "$ref": "#/components/parameters/indices.recovery-detailed" + }, + { + "$ref": "#/components/parameters/indices.recovery-allow_no_indices" + }, + { + "$ref": "#/components/parameters/indices.recovery-expand_wildcards" + }, + { + "$ref": "#/components/parameters/indices.recovery-ignore_unavailable" } ], "responses": { @@ -17012,7 +18606,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_refresh": { @@ -17040,7 +18639,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] }, "post": { "tags": [ @@ -17066,7 +18670,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/{index}/_refresh": { @@ -17097,7 +18706,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] }, "post": { "tags": [ @@ -17126,7 +18740,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/{index}/_reload_search_analyzers": { @@ -17164,7 +18783,12 @@ } }, "x-state": "Generally available; Added in 7.3.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] }, "post": { "tags": [ @@ -17200,7 +18824,12 @@ } }, "x-state": "Generally available; Added in 7.3.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_resolve/cluster": { @@ -17234,7 +18863,12 @@ } }, "x-state": "Generally available; Added in 8.13.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_resolve/cluster/{name}": { @@ -17271,7 +18905,12 @@ } }, "x-state": "Generally available; Added in 8.13.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_resolve/index/{name}": { @@ -17369,7 +19008,12 @@ } }, "x-state": "Generally available; Added in 7.9.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/{alias}/_rollover": { @@ -17409,7 +19053,12 @@ } }, "x-state": "Generally available; Added in 5.0.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/{alias}/_rollover/{new_index}": { @@ -17452,7 +19101,12 @@ } }, "x-state": "Generally available; Added in 5.0.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_segments": { @@ -17480,7 +19134,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/{index}/_segments": { @@ -17511,7 +19170,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_shard_stores": { @@ -17542,7 +19206,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/{index}/_shard_stores": { @@ -17576,7 +19245,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/{index}/_shrink/{target}": { @@ -17613,7 +19287,12 @@ } }, "x-state": "Generally available; Added in 5.0.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] }, "post": { "tags": [ @@ -17648,7 +19327,12 @@ } }, "x-state": "Generally available; Added in 5.0.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_index_template/_simulate_index/{name}": { @@ -17709,6 +19393,7 @@ "schema": { "type": "boolean" }, + "x-state": "Generally available; Added in 8.11.0", "style": "form" } ], @@ -17745,7 +19430,12 @@ } }, "x-state": "Generally available; Added in 7.9.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_index_template/_simulate": { @@ -17779,7 +19469,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_index_template/_simulate/{name}": { @@ -17816,7 +19511,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/{index}/_split/{target}": { @@ -17853,7 +19553,12 @@ } }, "x-state": "Generally available; Added in 6.1.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] }, "post": { "tags": [ @@ -17888,7 +19593,12 @@ } }, "x-state": "Generally available; Added in 6.1.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_stats": { @@ -17934,7 +19644,12 @@ } }, "x-state": "Generally available; Added in 1.3.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_stats/{metric}": { @@ -17983,7 +19698,12 @@ } }, "x-state": "Generally available; Added in 1.3.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/{index}/_stats": { @@ -18032,7 +19752,12 @@ } }, "x-state": "Generally available; Added in 1.3.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/{index}/_stats/{metric}": { @@ -18084,7 +19809,12 @@ } }, "x-state": "Generally available; Added in 1.3.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_aliases": { @@ -18155,7 +19885,12 @@ } }, "x-state": "Generally available; Added in 1.3.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_validate/query": { @@ -18213,7 +19948,12 @@ } }, "x-state": "Generally available; Added in 1.3.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] }, "post": { "tags": [ @@ -18269,7 +20009,12 @@ } }, "x-state": "Generally available; Added in 1.3.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/{index}/_validate/query": { @@ -18330,7 +20075,12 @@ } }, "x-state": "Generally available; Added in 1.3.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] }, "post": { "tags": [ @@ -18389,7 +20139,12 @@ } }, "x-state": "Generally available; Added in 1.3.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_inference/chat_completion/{inference_id}/_stream": { @@ -18469,7 +20224,12 @@ } }, "x-state": "Generally available; Added in 8.18.0", - "x-product-feature": "elasticsearch, machine-learning" + "x-metaTags": [ + { + "content": "Elasticsearch, Machine Learning", + "name": "product_name" + } + ] } }, "/_inference/completion/{inference_id}": { @@ -18560,7 +20320,12 @@ } }, "x-state": "Generally available; Added in 8.11.0", - "x-product-feature": "elasticsearch, machine-learning" + "x-metaTags": [ + { + "content": "Elasticsearch, Machine Learning", + "name": "product_name" + } + ] } }, "/_inference/{inference_id}": { @@ -18581,18 +20346,26 @@ } }, "x-state": "Generally available; Added in 8.11.0", - "x-product-feature": "elasticsearch, machine-learning" + "x-metaTags": [ + { + "content": "Elasticsearch, Machine Learning", + "name": "product_name" + } + ] }, "put": { "tags": [ "inference" ], "summary": "Create an inference endpoint", - "description": "IMPORTANT: The inference APIs enable you to use certain services, such as built-in machine learning models (ELSER, E5), models uploaded through Eland, Cohere, OpenAI, Mistral, Azure OpenAI, Google AI Studio, Google Vertex AI, Anthropic, Watsonx.ai, or Hugging Face.\nFor built-in models and models uploaded through Eland, the inference APIs offer an alternative way to use and manage trained models.\nHowever, if you do not plan to use the inference APIs to use these models or if you want to use non-NLP models, use the machine learning trained model APIs.\n\nThe following integrations are available through the inference API. You can find the available task types next to the integration name:\n* AlibabaCloud AI Search (`completion`, `rerank`, `sparse_embedding`, `text_embedding`)\n* Amazon Bedrock (`completion`, `text_embedding`)\n* Anthropic (`completion`)\n* Azure AI Studio (`completion`, `text_embedding`)\n* Azure OpenAI (`completion`, `text_embedding`)\n* Cohere (`completion`, `rerank`, `text_embedding`)\n* Elasticsearch (`rerank`, `sparse_embedding`, `text_embedding` - this service is for built-in models and models uploaded through Eland)\n* ELSER (`sparse_embedding`)\n* Google AI Studio (`completion`, `text_embedding`)\n* Google Vertex AI (`rerank`, `text_embedding`)\n* Hugging Face (`chat_completion`, `completion`, `rerank`, `text_embedding`)\n* Mistral (`chat_completion`, `completion`, `text_embedding`)\n* OpenAI (`chat_completion`, `completion`, `text_embedding`)\n* VoyageAI (`text_embedding`, `rerank`)\n* Watsonx inference integration (`text_embedding`)\n* JinaAI (`text_embedding`, `rerank`)\n\n## Required authorization\n\n* Cluster privileges: `manage_inference`\n", + "description": "IMPORTANT: The inference APIs enable you to use certain services, such as built-in machine learning models (ELSER, E5), models uploaded through Eland, Cohere, OpenAI, Mistral, Azure OpenAI, Google AI Studio, Google Vertex AI, Anthropic, Watsonx.ai, or Hugging Face.\nFor built-in models and models uploaded through Eland, the inference APIs offer an alternative way to use and manage trained models.\nHowever, if you do not plan to use the inference APIs to use these models or if you want to use non-NLP models, use the machine learning trained model APIs.\n\nThe following integrations are available through the inference API. You can find the available task types next to the integration name:\n* AlibabaCloud AI Search (`completion`, `rerank`, `sparse_embedding`, `text_embedding`)\n* Amazon Bedrock (`completion`, `text_embedding`)\n* Anthropic (`completion`)\n* Azure AI Studio (`completion`, `text_embedding`)\n* Azure OpenAI (`completion`, `text_embedding`)\n* Cohere (`completion`, `rerank`, `text_embedding`)\n* DeepSeek (`completion`, `chat_completion`)\n* Elasticsearch (`rerank`, `sparse_embedding`, `text_embedding` - this service is for built-in models and models uploaded through Eland)\n* ELSER (`sparse_embedding`)\n* Google AI Studio (`completion`, `text_embedding`)\n* Google Vertex AI (`rerank`, `text_embedding`)\n* Hugging Face (`chat_completion`, `completion`, `rerank`, `text_embedding`)\n* Mistral (`chat_completion`, `completion`, `text_embedding`)\n* OpenAI (`chat_completion`, `completion`, `text_embedding`)\n* VoyageAI (`text_embedding`, `rerank`)\n* Watsonx inference integration (`text_embedding`)\n* JinaAI (`text_embedding`, `rerank`)\n\n## Required authorization\n\n* Cluster privileges: `manage_inference`\n", "operationId": "inference-put", "parameters": [ { "$ref": "#/components/parameters/inference.put-inference_id" + }, + { + "$ref": "#/components/parameters/inference.put-timeout" } ], "requestBody": { @@ -18604,7 +20377,12 @@ } }, "x-state": "Generally available; Added in 8.11.0", - "x-product-feature": "elasticsearch, machine-learning" + "x-metaTags": [ + { + "content": "Elasticsearch, Machine Learning", + "name": "product_name" + } + ] }, "post": { "tags": [ @@ -18630,7 +20408,12 @@ } }, "x-state": "Generally available; Added in 8.11.0", - "x-product-feature": "elasticsearch, machine-learning" + "x-metaTags": [ + { + "content": "Elasticsearch, Machine Learning", + "name": "product_name" + } + ] }, "delete": { "tags": [ @@ -18655,7 +20438,12 @@ } }, "x-state": "Generally available; Added in 8.11.0", - "x-product-feature": "elasticsearch, machine-learning" + "x-metaTags": [ + { + "content": "Elasticsearch, Machine Learning", + "name": "product_name" + } + ] } }, "/_inference/{task_type}/{inference_id}": { @@ -18679,14 +20467,19 @@ } }, "x-state": "Generally available; Added in 8.11.0", - "x-product-feature": "elasticsearch, machine-learning" + "x-metaTags": [ + { + "content": "Elasticsearch, Machine Learning", + "name": "product_name" + } + ] }, "put": { "tags": [ "inference" ], "summary": "Create an inference endpoint", - "description": "IMPORTANT: The inference APIs enable you to use certain services, such as built-in machine learning models (ELSER, E5), models uploaded through Eland, Cohere, OpenAI, Mistral, Azure OpenAI, Google AI Studio, Google Vertex AI, Anthropic, Watsonx.ai, or Hugging Face.\nFor built-in models and models uploaded through Eland, the inference APIs offer an alternative way to use and manage trained models.\nHowever, if you do not plan to use the inference APIs to use these models or if you want to use non-NLP models, use the machine learning trained model APIs.\n\nThe following integrations are available through the inference API. You can find the available task types next to the integration name:\n* AlibabaCloud AI Search (`completion`, `rerank`, `sparse_embedding`, `text_embedding`)\n* Amazon Bedrock (`completion`, `text_embedding`)\n* Anthropic (`completion`)\n* Azure AI Studio (`completion`, `text_embedding`)\n* Azure OpenAI (`completion`, `text_embedding`)\n* Cohere (`completion`, `rerank`, `text_embedding`)\n* Elasticsearch (`rerank`, `sparse_embedding`, `text_embedding` - this service is for built-in models and models uploaded through Eland)\n* ELSER (`sparse_embedding`)\n* Google AI Studio (`completion`, `text_embedding`)\n* Google Vertex AI (`rerank`, `text_embedding`)\n* Hugging Face (`chat_completion`, `completion`, `rerank`, `text_embedding`)\n* Mistral (`chat_completion`, `completion`, `text_embedding`)\n* OpenAI (`chat_completion`, `completion`, `text_embedding`)\n* VoyageAI (`text_embedding`, `rerank`)\n* Watsonx inference integration (`text_embedding`)\n* JinaAI (`text_embedding`, `rerank`)\n\n## Required authorization\n\n* Cluster privileges: `manage_inference`\n", + "description": "IMPORTANT: The inference APIs enable you to use certain services, such as built-in machine learning models (ELSER, E5), models uploaded through Eland, Cohere, OpenAI, Mistral, Azure OpenAI, Google AI Studio, Google Vertex AI, Anthropic, Watsonx.ai, or Hugging Face.\nFor built-in models and models uploaded through Eland, the inference APIs offer an alternative way to use and manage trained models.\nHowever, if you do not plan to use the inference APIs to use these models or if you want to use non-NLP models, use the machine learning trained model APIs.\n\nThe following integrations are available through the inference API. You can find the available task types next to the integration name:\n* AlibabaCloud AI Search (`completion`, `rerank`, `sparse_embedding`, `text_embedding`)\n* Amazon Bedrock (`completion`, `text_embedding`)\n* Anthropic (`completion`)\n* Azure AI Studio (`completion`, `text_embedding`)\n* Azure OpenAI (`completion`, `text_embedding`)\n* Cohere (`completion`, `rerank`, `text_embedding`)\n* DeepSeek (`completion`, `chat_completion`)\n* Elasticsearch (`rerank`, `sparse_embedding`, `text_embedding` - this service is for built-in models and models uploaded through Eland)\n* ELSER (`sparse_embedding`)\n* Google AI Studio (`completion`, `text_embedding`)\n* Google Vertex AI (`rerank`, `text_embedding`)\n* Hugging Face (`chat_completion`, `completion`, `rerank`, `text_embedding`)\n* Mistral (`chat_completion`, `completion`, `text_embedding`)\n* OpenAI (`chat_completion`, `completion`, `text_embedding`)\n* VoyageAI (`text_embedding`, `rerank`)\n* Watsonx inference integration (`text_embedding`)\n* JinaAI (`text_embedding`, `rerank`)\n\n## Required authorization\n\n* Cluster privileges: `manage_inference`\n", "operationId": "inference-put-1", "parameters": [ { @@ -18694,6 +20487,9 @@ }, { "$ref": "#/components/parameters/inference.put-inference_id" + }, + { + "$ref": "#/components/parameters/inference.put-timeout" } ], "requestBody": { @@ -18705,7 +20501,12 @@ } }, "x-state": "Generally available; Added in 8.11.0", - "x-product-feature": "elasticsearch, machine-learning" + "x-metaTags": [ + { + "content": "Elasticsearch, Machine Learning", + "name": "product_name" + } + ] }, "post": { "tags": [ @@ -18734,7 +20535,12 @@ } }, "x-state": "Generally available; Added in 8.11.0", - "x-product-feature": "elasticsearch, machine-learning" + "x-metaTags": [ + { + "content": "Elasticsearch, Machine Learning", + "name": "product_name" + } + ] }, "delete": { "tags": [ @@ -18762,7 +20568,12 @@ } }, "x-state": "Generally available; Added in 8.11.0", - "x-product-feature": "elasticsearch, machine-learning" + "x-metaTags": [ + { + "content": "Elasticsearch, Machine Learning", + "name": "product_name" + } + ] } }, "/_inference": { @@ -18778,7 +20589,12 @@ } }, "x-state": "Generally available; Added in 8.11.0", - "x-product-feature": "elasticsearch, machine-learning" + "x-metaTags": [ + { + "content": "Elasticsearch, Machine Learning", + "name": "product_name" + } + ] } }, "/_inference/{task_type}/{alibabacloud_inference_id}": { @@ -18811,6 +20627,16 @@ "$ref": "#/components/schemas/_types.Id" }, "style": "simple" + }, + { + "in": "query", + "name": "timeout", + "description": "Specifies the amount of time to wait for the inference endpoint to be created.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Duration" + }, + "style": "form" } ], "requestBody": { @@ -18875,7 +20701,12 @@ } }, "x-state": "Generally available; Added in 8.16.0", - "x-product-feature": "elasticsearch, machine-learning" + "x-metaTags": [ + { + "content": "Elasticsearch, Machine Learning", + "name": "product_name" + } + ] } }, "/_inference/{task_type}/{amazonbedrock_inference_id}": { @@ -18908,6 +20739,16 @@ "$ref": "#/components/schemas/_types.Id" }, "style": "simple" + }, + { + "in": "query", + "name": "timeout", + "description": "Specifies the amount of time to wait for the inference endpoint to be created.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Duration" + }, + "style": "form" } ], "requestBody": { @@ -18962,7 +20803,12 @@ } }, "x-state": "Generally available; Added in 8.12.0", - "x-product-feature": "elasticsearch, machine-learning" + "x-metaTags": [ + { + "content": "Elasticsearch, Machine Learning", + "name": "product_name" + } + ] } }, "/_inference/{task_type}/{anthropic_inference_id}": { @@ -18995,6 +20841,16 @@ "$ref": "#/components/schemas/_types.Id" }, "style": "simple" + }, + { + "in": "query", + "name": "timeout", + "description": "Specifies the amount of time to wait for the inference endpoint to be created.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Duration" + }, + "style": "form" } ], "requestBody": { @@ -19043,7 +20899,12 @@ } }, "x-state": "Generally available; Added in 8.16.0", - "x-product-feature": "elasticsearch, machine-learning" + "x-metaTags": [ + { + "content": "Elasticsearch, Machine Learning", + "name": "product_name" + } + ] } }, "/_inference/{task_type}/{azureaistudio_inference_id}": { @@ -19076,6 +20937,16 @@ "$ref": "#/components/schemas/_types.Id" }, "style": "simple" + }, + { + "in": "query", + "name": "timeout", + "description": "Specifies the amount of time to wait for the inference endpoint to be created.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Duration" + }, + "style": "form" } ], "requestBody": { @@ -19130,7 +21001,12 @@ } }, "x-state": "Generally available; Added in 8.14.0", - "x-product-feature": "elasticsearch, machine-learning" + "x-metaTags": [ + { + "content": "Elasticsearch, Machine Learning", + "name": "product_name" + } + ] } }, "/_inference/{task_type}/{azureopenai_inference_id}": { @@ -19163,6 +21039,16 @@ "$ref": "#/components/schemas/_types.Id" }, "style": "simple" + }, + { + "in": "query", + "name": "timeout", + "description": "Specifies the amount of time to wait for the inference endpoint to be created.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Duration" + }, + "style": "form" } ], "requestBody": { @@ -19217,7 +21103,12 @@ } }, "x-state": "Generally available; Added in 8.14.0", - "x-product-feature": "elasticsearch, machine-learning" + "x-metaTags": [ + { + "content": "Elasticsearch, Machine Learning", + "name": "product_name" + } + ] } }, "/_inference/{task_type}/{cohere_inference_id}": { @@ -19250,6 +21141,16 @@ "$ref": "#/components/schemas/_types.Id" }, "style": "simple" + }, + { + "in": "query", + "name": "timeout", + "description": "Specifies the amount of time to wait for the inference endpoint to be created.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Duration" + }, + "style": "form" } ], "requestBody": { @@ -19286,6 +21187,11 @@ "summary": "A rerank task", "description": "Run `PUT _inference/rerank/cohere-rerank` to create an inference endpoint that performs a rerank task.", "value": "{\n \"service\": \"cohere\",\n \"service_settings\": {\n \"api_key\": \"Cohere-API-key\",\n \"model_id\": \"rerank-english-v3.0\"\n },\n \"task_settings\": {\n \"top_n\": 10,\n \"return_documents\": true\n }\n}" + }, + "PutCohereRequestExample3": { + "summary": "A completion task", + "description": "Run `PUT _inference/completion/cohere-completion` to create an inference endpoint that performs a completion task.", + "value": "{\n \"service\": \"cohere\",\n \"service_settings\": {\n \"api_key\": \"Cohere-API-key\",\n \"model_id\": \"command-a-03-2025\"\n }\n}" } } } @@ -19304,7 +21210,179 @@ } }, "x-state": "Generally available; Added in 8.13.0", - "x-product-feature": "elasticsearch, machine-learning" + "x-metaTags": [ + { + "content": "Elasticsearch, Machine Learning", + "name": "product_name" + } + ] + } + }, + "/_inference/{task_type}/{custom_inference_id}": { + "put": { + "tags": [ + "inference" + ], + "summary": "Create a custom inference endpoint", + "description": "The custom service gives more control over how to interact with external inference services that aren't explicitly supported through dedicated integrations.\nThe custom service gives you the ability to define the headers, url, query parameters, request body, and secrets.\nThe custom service supports the template replacement functionality, which enables you to define a template that can be replaced with the value associated with that key.\nTemplates are portions of a string that start with `${` and end with `}`.\nThe parameters `secret_parameters` and `task_settings` are checked for keys for template replacement. Template replacement is supported in the `request`, `headers`, `url`, and `query_parameters`.\nIf the definition (key) is not found for a template, an error message is returned.\nIn case of an endpoint definition like the following:\n```\nPUT _inference/text_embedding/test-text-embedding\n{\n \"service\": \"custom\",\n \"service_settings\": {\n \"secret_parameters\": {\n \"api_key\": \"\"\n },\n \"url\": \"...endpoints.huggingface.cloud/v1/embeddings\",\n \"headers\": {\n \"Authorization\": \"Bearer ${api_key}\",\n \"Content-Type\": \"application/json\"\n },\n \"request\": \"{\\\"input\\\": ${input}}\",\n \"response\": {\n \"json_parser\": {\n \"text_embeddings\":\"$.data[*].embedding[*]\"\n }\n }\n }\n}\n```\nTo replace `${api_key}` the `secret_parameters` and `task_settings` are checked for a key named `api_key`.\n\n> info\n> Templates should not be surrounded by quotes.\n\nPre-defined templates:\n* `${input}` refers to the array of input strings that comes from the `input` field of the subsequent inference requests.\n* `${input_type}` refers to the input type translation values.\n* `${query}` refers to the query field used specifically for reranking tasks.\n* `${top_n}` refers to the `top_n` field available when performing rerank requests.\n* `${return_documents}` refers to the `return_documents` field available when performing rerank requests.\n\n## Required authorization\n\n* Cluster privileges: `manage_inference`\n", + "operationId": "inference-put-custom", + "parameters": [ + { + "in": "path", + "name": "task_type", + "description": "The type of the inference task that the model will perform.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/inference._types.CustomTaskType" + }, + "style": "simple" + }, + { + "in": "path", + "name": "custom_inference_id", + "description": "The unique identifier of the inference endpoint.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Id" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "chunking_settings": { + "$ref": "#/components/schemas/inference._types.InferenceChunkingSettings" + }, + "service": { + "$ref": "#/components/schemas/inference._types.CustomServiceType" + }, + "service_settings": { + "$ref": "#/components/schemas/inference._types.CustomServiceSettings" + }, + "task_settings": { + "$ref": "#/components/schemas/inference._types.CustomTaskSettings" + } + }, + "required": [ + "service", + "service_settings" + ] + } + } + } + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/inference._types.InferenceEndpointInfoCustom" + } + } + } + } + }, + "x-state": "Generally available; Added in 8.13.0", + "x-metaTags": [ + { + "content": "Elasticsearch, Machine Learning", + "name": "product_name" + } + ] + } + }, + "/_inference/{task_type}/{deepseek_inference_id}": { + "put": { + "tags": [ + "inference" + ], + "summary": "Create a DeepSeek inference endpoint", + "description": "Create an inference endpoint to perform an inference task with the `deepseek` service.\n\n## Required authorization\n\n* Cluster privileges: `manage_inference`\n", + "operationId": "inference-put-deepseek", + "parameters": [ + { + "in": "path", + "name": "task_type", + "description": "The type of the inference task that the model will perform.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/inference._types.TaskTypeDeepSeek" + }, + "style": "simple" + }, + { + "in": "path", + "name": "deepseek_inference_id", + "description": "The unique identifier of the inference endpoint.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Id" + }, + "style": "simple" + }, + { + "in": "query", + "name": "timeout", + "description": "Specifies the amount of time to wait for the inference endpoint to be created.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Duration" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "chunking_settings": { + "$ref": "#/components/schemas/inference._types.InferenceChunkingSettings" + }, + "service": { + "$ref": "#/components/schemas/inference._types.DeepSeekServiceType" + }, + "service_settings": { + "$ref": "#/components/schemas/inference._types.DeepSeekServiceSettings" + } + }, + "required": [ + "service", + "service_settings" + ] + } + } + } + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/inference._types.InferenceEndpointInfoDeepSeek" + } + } + } + } + }, + "x-state": "Generally available; Added in 9.1.0", + "x-metaTags": [ + { + "content": "Elasticsearch, Machine Learning", + "name": "product_name" + } + ] } }, "/_inference/{task_type}/{elasticsearch_inference_id}": { @@ -19337,6 +21415,16 @@ "$ref": "#/components/schemas/_types.Id" }, "style": "simple" + }, + { + "in": "query", + "name": "timeout", + "description": "Specifies the amount of time to wait for the inference endpoint to be created.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Duration" + }, + "style": "form" } ], "requestBody": { @@ -19417,7 +21505,12 @@ } }, "x-state": "Generally available; Added in 8.13.0", - "x-product-feature": "elasticsearch, machine-learning" + "x-metaTags": [ + { + "content": "Elasticsearch, Machine Learning", + "name": "product_name" + } + ] } }, "/_inference/{task_type}/{elser_inference_id}": { @@ -19450,6 +21543,16 @@ "$ref": "#/components/schemas/_types.Id" }, "style": "simple" + }, + { + "in": "query", + "name": "timeout", + "description": "Specifies the amount of time to wait for the inference endpoint to be created.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Duration" + }, + "style": "form" } ], "requestBody": { @@ -19508,7 +21611,12 @@ }, "deprecated": true, "x-state": "Generally available; Added in 8.11.0", - "x-product-feature": "elasticsearch, machine-learning" + "x-metaTags": [ + { + "content": "Elasticsearch, Machine Learning", + "name": "product_name" + } + ] } }, "/_inference/{task_type}/{googleaistudio_inference_id}": { @@ -19541,6 +21649,16 @@ "$ref": "#/components/schemas/_types.Id" }, "style": "simple" + }, + { + "in": "query", + "name": "timeout", + "description": "Specifies the amount of time to wait for the inference endpoint to be created.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Duration" + }, + "style": "form" } ], "requestBody": { @@ -19587,7 +21705,12 @@ } }, "x-state": "Generally available; Added in 8.15.0", - "x-product-feature": "elasticsearch, machine-learning" + "x-metaTags": [ + { + "content": "Elasticsearch, Machine Learning", + "name": "product_name" + } + ] } }, "/_inference/{task_type}/{googlevertexai_inference_id}": { @@ -19620,6 +21743,16 @@ "$ref": "#/components/schemas/_types.Id" }, "style": "simple" + }, + { + "in": "query", + "name": "timeout", + "description": "Specifies the amount of time to wait for the inference endpoint to be created.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Duration" + }, + "style": "form" } ], "requestBody": { @@ -19674,7 +21807,12 @@ } }, "x-state": "Generally available; Added in 8.15.0", - "x-product-feature": "elasticsearch, machine-learning" + "x-metaTags": [ + { + "content": "Elasticsearch, Machine Learning", + "name": "product_name" + } + ] } }, "/_inference/{task_type}/{huggingface_inference_id}": { @@ -19707,6 +21845,16 @@ "$ref": "#/components/schemas/_types.Id" }, "style": "simple" + }, + { + "in": "query", + "name": "timeout", + "description": "Specifies the amount of time to wait for the inference endpoint to be created.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Duration" + }, + "style": "form" } ], "requestBody": { @@ -19761,7 +21909,12 @@ } }, "x-state": "Generally available; Added in 8.12.0", - "x-product-feature": "elasticsearch, machine-learning" + "x-metaTags": [ + { + "content": "Elasticsearch, Machine Learning", + "name": "product_name" + } + ] } }, "/_inference/{task_type}/{jinaai_inference_id}": { @@ -19794,6 +21947,16 @@ "$ref": "#/components/schemas/_types.Id" }, "style": "simple" + }, + { + "in": "query", + "name": "timeout", + "description": "Specifies the amount of time to wait for the inference endpoint to be created.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Duration" + }, + "style": "form" } ], "requestBody": { @@ -19848,7 +22011,12 @@ } }, "x-state": "Generally available; Added in 8.18.0", - "x-product-feature": "elasticsearch, machine-learning" + "x-metaTags": [ + { + "content": "Elasticsearch, Machine Learning", + "name": "product_name" + } + ] } }, "/_inference/{task_type}/{mistral_inference_id}": { @@ -19881,6 +22049,16 @@ "$ref": "#/components/schemas/_types.Id" }, "style": "simple" + }, + { + "in": "query", + "name": "timeout", + "description": "Specifies the amount of time to wait for the inference endpoint to be created.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Duration" + }, + "style": "form" } ], "requestBody": { @@ -19926,7 +22104,12 @@ } }, "x-state": "Generally available; Added in 8.15.0", - "x-product-feature": "elasticsearch, machine-learning" + "x-metaTags": [ + { + "content": "Elasticsearch, Machine Learning", + "name": "product_name" + } + ] } }, "/_inference/{task_type}/{openai_inference_id}": { @@ -19959,6 +22142,16 @@ "$ref": "#/components/schemas/_types.Id" }, "style": "simple" + }, + { + "in": "query", + "name": "timeout", + "description": "Specifies the amount of time to wait for the inference endpoint to be created.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Duration" + }, + "style": "form" } ], "requestBody": { @@ -20013,7 +22206,12 @@ } }, "x-state": "Generally available; Added in 8.12.0", - "x-product-feature": "elasticsearch, machine-learning" + "x-metaTags": [ + { + "content": "Elasticsearch, Machine Learning", + "name": "product_name" + } + ] } }, "/_inference/{task_type}/{voyageai_inference_id}": { @@ -20046,6 +22244,16 @@ "$ref": "#/components/schemas/_types.Id" }, "style": "simple" + }, + { + "in": "query", + "name": "timeout", + "description": "Specifies the amount of time to wait for the inference endpoint to be created.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Duration" + }, + "style": "form" } ], "requestBody": { @@ -20100,7 +22308,12 @@ } }, "x-state": "Generally available; Added in 8.19.0", - "x-product-feature": "elasticsearch, machine-learning" + "x-metaTags": [ + { + "content": "Elasticsearch, Machine Learning", + "name": "product_name" + } + ] } }, "/_inference/{task_type}/{watsonx_inference_id}": { @@ -20133,6 +22346,16 @@ "$ref": "#/components/schemas/_types.Id" }, "style": "simple" + }, + { + "in": "query", + "name": "timeout", + "description": "Specifies the amount of time to wait for the inference endpoint to be created.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Duration" + }, + "style": "form" } ], "requestBody": { @@ -20175,7 +22398,12 @@ } }, "x-state": "Generally available; Added in 8.16.0", - "x-product-feature": "elasticsearch, machine-learning" + "x-metaTags": [ + { + "content": "Elasticsearch, Machine Learning", + "name": "product_name" + } + ] } }, "/_inference/rerank/{inference_id}": { @@ -20183,7 +22411,7 @@ "tags": [ "inference" ], - "summary": "Perform rereanking inference on the service", + "summary": "Perform reranking inference on the service", "description": "\n\n## Required authorization\n\n* Cluster privileges: `monitor_inference`\n", "operationId": "inference-rerank", "parameters": [ @@ -20292,7 +22520,12 @@ } }, "x-state": "Generally available; Added in 8.11.0", - "x-product-feature": "elasticsearch, machine-learning" + "x-metaTags": [ + { + "content": "Elasticsearch, Machine Learning", + "name": "product_name" + } + ] } }, "/_inference/sparse_embedding/{inference_id}": { @@ -20383,7 +22616,12 @@ } }, "x-state": "Generally available; Added in 8.11.0", - "x-product-feature": "elasticsearch, machine-learning" + "x-metaTags": [ + { + "content": "Elasticsearch, Machine Learning", + "name": "product_name" + } + ] } }, "/_inference/completion/{inference_id}/_stream": { @@ -20405,6 +22643,16 @@ "$ref": "#/components/schemas/_types.Id" }, "style": "simple" + }, + { + "in": "query", + "name": "timeout", + "description": "The amount of time to wait for the inference request to complete.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Duration" + }, + "style": "form" } ], "requestBody": { @@ -20458,7 +22706,12 @@ } }, "x-state": "Generally available; Added in 8.16.0", - "x-product-feature": "elasticsearch, machine-learning" + "x-metaTags": [ + { + "content": "Elasticsearch, Machine Learning", + "name": "product_name" + } + ] } }, "/_inference/text_embedding/{inference_id}": { @@ -20549,7 +22802,12 @@ } }, "x-state": "Generally available; Added in 8.11.0", - "x-product-feature": "elasticsearch, machine-learning" + "x-metaTags": [ + { + "content": "Elasticsearch, Machine Learning", + "name": "product_name" + } + ] } }, "/_inference/{inference_id}/_update": { @@ -20574,7 +22832,12 @@ } }, "x-state": "Generally available; Added in 8.17.0", - "x-product-feature": "elasticsearch, machine-learning" + "x-metaTags": [ + { + "content": "Elasticsearch, Machine Learning", + "name": "product_name" + } + ] } }, "/_inference/{task_type}/{inference_id}/_update": { @@ -20602,7 +22865,12 @@ } }, "x-state": "Generally available; Added in 8.17.0", - "x-product-feature": "elasticsearch, machine-learning" + "x-metaTags": [ + { + "content": "Elasticsearch, Machine Learning", + "name": "product_name" + } + ] } }, "/": { @@ -20611,7 +22879,7 @@ "info" ], "summary": "Get cluster info", - "description": "Get basic build, version, and cluster information.\n\n## Required authorization\n\n* Cluster privileges: `monitor`\n", + "description": "Get basic build, version, and cluster information.\n::: In Serverless, this API is retained for backward compatibility only. Some response fields, such as the version number, should be ignored.\n\n## Required authorization\n\n* Cluster privileges: `monitor`\n", "operationId": "info", "responses": { "200": { @@ -20647,8 +22915,14 @@ }, "examples": { "RootNodeInfoResponseExample1": { - "description": "A successful response from `GET /`s.", - "value": "{\n \"name\": \"instance-0000000000\",\n \"cluster_name\": \"my_test_cluster\",\n \"cluster_uuid\": \"5QaxoN0pRZuOmWSxstBBwQ\",\n \"version\": {\n \"build_date\": \"2024-02-01T13:07:13.727175297Z\",\n \"minimum_wire_compatibility_version\": \"7.17.0\",\n \"build_hash\": \"6185ba65d27469afabc9bc951cded6c17c21e3f3\",\n \"number\": \"8.12.1\",\n \"lucene_version\": \"9.9.2\",\n \"minimum_index_compatibility_version\": \"7.0.0\",\n \"build_flavor\": \"default\",\n \"build_snapshot\": false,\n \"build_type\": \"docker\"\n },\n \"tagline\": \"You Know, for Search\"\n}" + "summary": "Stack response", + "description": "A successful response from `GET /`.", + "value": "{\n \"name\": \"instance-0000000000\",\n \"cluster_name\": \"my_test_cluster\",\n \"cluster_uuid\": \"zk-HjQtYQGyL3NFSSu7InA\",\n \"version\": {\n \"number\": \"9.1.0\",\n \"build_flavor\": \"default\",\n \"build_type\": \"docker\",\n \"build_hash\": 0,\n \"build_date\": \"2025-07-09T22:10:13.578Z\",\n \"build_snapshot\": false,\n \"lucene_version\": \"10.2.2\",\n \"minimum_wire_compatibility_version\": \"8.19.0\",\n \"minimum_index_compatibility_version\": \"8.0.0\"\n },\n \"tagline\": \"You Know, for Search\"\n}" + }, + "RootNodeInfoResponseExample2": { + "summary": "Serverless response", + "description": "A successful response from `GET /` on Serverless. This API is retained for backward compatibility only. Some fields, such as the version number, return static values and should be ignored.", + "value": "{\n \"name\": \"serverless\",\n \"cluster_name\": \"my_test_serverless_cluster\",\n \"cluster_uuid\": \"8xx0pi24Squnf4PFDOAtwg\",\n \"version\": {\n \"number\": \"8.11.0\",\n \"build_flavor\": \"serverless\",\n \"build_type\": \"docker\",\n \"build_hash\": 0,\n \"build_date\": \"2023-10-31T00:00:00.000Z\",\n \"build_snapshot\": false,\n \"lucene_version\": \"9.7.0\",\n \"minimum_wire_compatibility_version\": \"8.11.0\",\n \"minimum_index_compatibility_version\": \"8.11.0\"\n },\n \"tagline\": \"You Know, for Search\"\n}" } } } @@ -20656,7 +22930,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] }, "head": { "tags": [ @@ -20674,7 +22953,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_ingest/geoip/database/{id}": { @@ -20696,7 +22980,12 @@ } }, "x-state": "Generally available; Added in 8.15.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] }, "put": { "tags": [ @@ -20773,7 +23062,12 @@ } }, "x-state": "Generally available; Added in 8.15.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] }, "delete": { "tags": [ @@ -20828,7 +23122,12 @@ } }, "x-state": "Generally available; Added in 8.15.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_ingest/ip_location/database/{id}": { @@ -20842,9 +23141,6 @@ "parameters": [ { "$ref": "#/components/parameters/ingest.get_ip_location_database-id" - }, - { - "$ref": "#/components/parameters/ingest.get_ip_location_database-master_timeout" } ], "responses": { @@ -20853,7 +23149,12 @@ } }, "x-state": "Generally available; Added in 8.15.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] }, "put": { "tags": [ @@ -20924,7 +23225,12 @@ } }, "x-state": "Generally available; Added in 8.15.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] }, "delete": { "tags": [ @@ -20979,7 +23285,12 @@ } }, "x-state": "Generally available; Added in 8.15.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_ingest/pipeline/{id}": { @@ -21011,7 +23322,12 @@ } }, "x-state": "Generally available; Added in 5.0.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] }, "put": { "tags": [ @@ -21098,6 +23414,7 @@ }, "deprecated": { "description": "Marks this ingest pipeline as deprecated.\nWhen a deprecated ingest pipeline is referenced as the default or final pipeline when creating or updating a non-deprecated index template, Elasticsearch will emit a deprecation warning.", + "default": false, "type": "boolean" } } @@ -21130,7 +23447,12 @@ } }, "x-state": "Generally available; Added in 5.0.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] }, "delete": { "tags": [ @@ -21189,7 +23511,12 @@ } }, "x-state": "Generally available; Added in 5.0.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_ingest/geoip/stats": { @@ -21232,7 +23559,12 @@ } }, "x-state": "Generally available; Added in 7.13.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_ingest/geoip/database": { @@ -21249,7 +23581,12 @@ } }, "x-state": "Generally available; Added in 8.15.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_ingest/ip_location/database": { @@ -21260,18 +23597,18 @@ "summary": "Get IP geolocation database configurations", "description": "\n\n## Required authorization\n\n* Cluster privileges: `manage`\n", "operationId": "ingest-get-ip-location-database", - "parameters": [ - { - "$ref": "#/components/parameters/ingest.get_ip_location_database-master_timeout" - } - ], "responses": { "200": { "$ref": "#/components/responses/ingest.get_ip_location_database-200" } }, "x-state": "Generally available; Added in 8.15.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_ingest/pipeline": { @@ -21300,7 +23637,12 @@ } }, "x-state": "Generally available; Added in 5.0.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_ingest/processor/grok": { @@ -21338,7 +23680,12 @@ } }, "x-state": "Generally available; Added in 6.1.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_ingest/pipeline/_simulate": { @@ -21363,7 +23710,12 @@ } }, "x-state": "Generally available; Added in 5.0.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] }, "post": { "tags": [ @@ -21386,7 +23738,12 @@ } }, "x-state": "Generally available; Added in 5.0.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_ingest/pipeline/{id}/_simulate": { @@ -21414,7 +23771,12 @@ } }, "x-state": "Generally available; Added in 5.0.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] }, "post": { "tags": [ @@ -21440,7 +23802,12 @@ } }, "x-state": "Generally available; Added in 5.0.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_license": { @@ -21500,7 +23867,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] }, "put": { "tags": [ @@ -21529,7 +23901,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] }, "post": { "tags": [ @@ -21558,7 +23935,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] }, "delete": { "tags": [ @@ -21606,7 +23988,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_license/basic_status": { @@ -21644,7 +24031,12 @@ } }, "x-state": "Generally available; Added in 6.3.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_license/trial_status": { @@ -21682,7 +24074,12 @@ } }, "x-state": "Generally available; Added in 6.1.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_license/start_basic": { @@ -21778,7 +24175,12 @@ } }, "x-state": "Generally available; Added in 6.3.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_license/start_trial": { @@ -21802,7 +24204,8 @@ }, { "in": "query", - "name": "type_query_string", + "name": "type", + "description": "The type of trial license to generate (default: \"trial\")", "deprecated": false, "schema": { "type": "string" @@ -21857,7 +24260,12 @@ } }, "x-state": "Generally available; Added in 6.1.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_logstash/pipeline/{id}": { @@ -21883,7 +24291,12 @@ } }, "x-state": "Generally available; Added in 7.12.0", - "x-product-feature": "elasticsearch, logstash" + "x-metaTags": [ + { + "content": "Elasticsearch, Logstash", + "name": "product_name" + } + ] }, "put": { "tags": [ @@ -21935,7 +24348,12 @@ } }, "x-state": "Generally available; Added in 7.12.0", - "x-product-feature": "elasticsearch, logstash" + "x-metaTags": [ + { + "content": "Elasticsearch, Logstash", + "name": "product_name" + } + ] }, "delete": { "tags": [ @@ -21970,7 +24388,12 @@ } }, "x-state": "Generally available; Added in 7.12.0", - "x-product-feature": "elasticsearch, logstash" + "x-metaTags": [ + { + "content": "Elasticsearch, Logstash", + "name": "product_name" + } + ] } }, "/_logstash/pipeline": { @@ -21991,7 +24414,12 @@ } }, "x-state": "Generally available; Added in 7.12.0", - "x-product-feature": "elasticsearch, logstash" + "x-metaTags": [ + { + "content": "Elasticsearch, Logstash", + "name": "product_name" + } + ] } }, "/_mget": { @@ -22037,7 +24465,12 @@ } }, "x-state": "Generally available; Added in 1.3.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] }, "post": { "tags": [ @@ -22081,7 +24514,12 @@ } }, "x-state": "Generally available; Added in 1.3.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/{index}/_mget": { @@ -22130,7 +24568,12 @@ } }, "x-state": "Generally available; Added in 1.3.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] }, "post": { "tags": [ @@ -22177,7 +24620,12 @@ } }, "x-state": "Generally available; Added in 1.3.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_migration/deprecations": { @@ -22194,7 +24642,12 @@ } }, "x-state": "Generally available; Added in 6.1.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/{index}/_migration/deprecations": { @@ -22216,7 +24669,12 @@ } }, "x-state": "Generally available; Added in 6.1.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_migration/system_features": { @@ -22261,7 +24719,12 @@ } }, "x-state": "Generally available; Added in 7.16.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] }, "post": { "tags": [ @@ -22306,7 +24769,12 @@ } }, "x-state": "Generally available; Added in 7.16.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_ml/trained_models/{model_id}/deployment/cache/_clear": { @@ -22357,7 +24825,12 @@ } }, "x-state": "Generally available; Added in 8.5.0", - "x-product-feature": "elasticsearch, machine-learning" + "x-metaTags": [ + { + "content": "Elasticsearch, Machine Learning", + "name": "product_name" + } + ] } }, "/_ml/anomaly_detectors/{job_id}/_close": { @@ -22419,10 +24892,12 @@ "properties": { "allow_no_match": { "description": "Refer to the description for the `allow_no_match` query parameter.", + "default": true, "type": "boolean" }, "force": { "description": "Refer to the descriptiion for the `force` query parameter.", + "default": false, "type": "boolean" }, "timeout": { @@ -22460,7 +24935,12 @@ } }, "x-state": "Generally available; Added in 5.4.0", - "x-product-feature": "elasticsearch, machine-learning" + "x-metaTags": [ + { + "content": "Elasticsearch, Machine Learning", + "name": "product_name" + } + ] } }, "/_ml/calendars/{calendar_id}": { @@ -22491,7 +24971,12 @@ } }, "x-state": "Generally available; Added in 6.2.0", - "x-product-feature": "elasticsearch, machine-learning" + "x-metaTags": [ + { + "content": "Elasticsearch, Machine Learning", + "name": "product_name" + } + ] }, "put": { "tags": [ @@ -22564,7 +25049,12 @@ } }, "x-state": "Generally available; Added in 6.2.0", - "x-product-feature": "elasticsearch, machine-learning" + "x-metaTags": [ + { + "content": "Elasticsearch, Machine Learning", + "name": "product_name" + } + ] }, "post": { "tags": [ @@ -22593,7 +25083,12 @@ } }, "x-state": "Generally available; Added in 6.2.0", - "x-product-feature": "elasticsearch, machine-learning" + "x-metaTags": [ + { + "content": "Elasticsearch, Machine Learning", + "name": "product_name" + } + ] }, "delete": { "tags": [ @@ -22634,7 +25129,12 @@ } }, "x-state": "Generally available; Added in 6.2.0", - "x-product-feature": "elasticsearch, machine-learning" + "x-metaTags": [ + { + "content": "Elasticsearch, Machine Learning", + "name": "product_name" + } + ] } }, "/_ml/calendars/{calendar_id}/events/{event_id}": { @@ -22687,7 +25187,12 @@ } }, "x-state": "Generally available; Added in 6.2.0", - "x-product-feature": "elasticsearch, machine-learning" + "x-metaTags": [ + { + "content": "Elasticsearch, Machine Learning", + "name": "product_name" + } + ] } }, "/_ml/calendars/{calendar_id}/jobs/{job_id}": { @@ -22751,7 +25256,12 @@ } }, "x-state": "Generally available; Added in 6.2.0", - "x-product-feature": "elasticsearch, machine-learning" + "x-metaTags": [ + { + "content": "Elasticsearch, Machine Learning", + "name": "product_name" + } + ] }, "delete": { "tags": [ @@ -22819,7 +25329,12 @@ } }, "x-state": "Generally available; Added in 6.2.0", - "x-product-feature": "elasticsearch, machine-learning" + "x-metaTags": [ + { + "content": "Elasticsearch, Machine Learning", + "name": "product_name" + } + ] } }, "/_ml/data_frame/analytics/{id}": { @@ -22853,7 +25368,12 @@ } }, "x-state": "Generally available; Added in 7.3.0", - "x-product-feature": "elasticsearch, machine-learning" + "x-metaTags": [ + { + "content": "Elasticsearch, Machine Learning", + "name": "product_name" + } + ] }, "put": { "tags": [ @@ -22883,6 +25403,7 @@ "properties": { "allow_lazy_start": { "description": "Specifies whether this job can start when there is insufficient machine\nlearning node capacity for it to be immediately assigned to a node. If\nset to `false` and a machine learning node with capacity to run the job\ncannot be immediately found, the API returns an error. If set to `true`,\nthe API does not return an error; the job waits in the `starting` state\nuntil sufficient machine learning node capacity is available. This\nbehavior is also affected by the cluster-wide\n`xpack.ml.max_lazy_ml_nodes` setting.", + "default": false, "type": "boolean" }, "analysis": { @@ -22900,6 +25421,7 @@ }, "max_num_threads": { "description": "The maximum number of threads to be used by the analysis. Using more\nthreads may decrease the time necessary to complete the analysis at the\ncost of using more CPU. Note that the process may use additional threads\nfor operational functionality other than the analysis itself.", + "default": 1.0, "type": "number" }, "_meta": { @@ -22907,6 +25429,7 @@ }, "model_memory_limit": { "description": "The approximate maximum amount of memory resources that are permitted for\nanalytical processing. If your `elasticsearch.yml` file contains an\n`xpack.ml.max_model_memory_limit` setting, an error occurs when you try\nto create data frame analytics jobs that have `model_memory_limit` values\ngreater than that setting.", + "default": "1gb", "type": "string" }, "source": { @@ -23000,7 +25523,12 @@ } }, "x-state": "Generally available; Added in 7.3.0", - "x-product-feature": "elasticsearch, machine-learning" + "x-metaTags": [ + { + "content": "Elasticsearch, Machine Learning", + "name": "product_name" + } + ] }, "delete": { "tags": [ @@ -23061,7 +25589,12 @@ } }, "x-state": "Generally available; Added in 7.3.0", - "x-product-feature": "elasticsearch, machine-learning" + "x-metaTags": [ + { + "content": "Elasticsearch, Machine Learning", + "name": "product_name" + } + ] } }, "/_ml/datafeeds/{datafeed_id}": { @@ -23089,7 +25622,12 @@ } }, "x-state": "Generally available; Added in 5.5.0", - "x-product-feature": "elasticsearch, machine-learning" + "x-metaTags": [ + { + "content": "Elasticsearch, Machine Learning", + "name": "product_name" + } + ] }, "put": { "tags": [ @@ -23204,6 +25742,7 @@ }, "scroll_size": { "description": "The size parameter that is used in Elasticsearch searches when the datafeed does not use aggregations.\nThe maximum value is the value of `index.max_result_window`, which is 10,000 by default.", + "default": 1000.0, "type": "number" }, "headers": { @@ -23299,7 +25838,12 @@ } }, "x-state": "Generally available; Added in 5.4.0", - "x-product-feature": "elasticsearch, machine-learning" + "x-metaTags": [ + { + "content": "Elasticsearch, Machine Learning", + "name": "product_name" + } + ] }, "delete": { "tags": [ @@ -23350,7 +25894,12 @@ } }, "x-state": "Generally available; Added in 5.4.0", - "x-product-feature": "elasticsearch, machine-learning" + "x-metaTags": [ + { + "content": "Elasticsearch, Machine Learning", + "name": "product_name" + } + ] } }, "/_ml/_delete_expired_data/{job_id}": { @@ -23381,7 +25930,12 @@ } }, "x-state": "Generally available; Added in 5.4.0", - "x-product-feature": "elasticsearch, machine-learning" + "x-metaTags": [ + { + "content": "Elasticsearch, Machine Learning", + "name": "product_name" + } + ] } }, "/_ml/_delete_expired_data": { @@ -23409,7 +25963,12 @@ } }, "x-state": "Generally available; Added in 5.4.0", - "x-product-feature": "elasticsearch, machine-learning" + "x-metaTags": [ + { + "content": "Elasticsearch, Machine Learning", + "name": "product_name" + } + ] } }, "/_ml/filters/{filter_id}": { @@ -23437,7 +25996,12 @@ } }, "x-state": "Generally available; Added in 5.5.0", - "x-product-feature": "elasticsearch, machine-learning" + "x-metaTags": [ + { + "content": "Elasticsearch, Machine Learning", + "name": "product_name" + } + ] }, "put": { "tags": [ @@ -23520,7 +26084,12 @@ } }, "x-state": "Generally available; Added in 5.4.0", - "x-product-feature": "elasticsearch, machine-learning" + "x-metaTags": [ + { + "content": "Elasticsearch, Machine Learning", + "name": "product_name" + } + ] }, "delete": { "tags": [ @@ -23561,7 +26130,12 @@ } }, "x-state": "Generally available; Added in 5.4.0", - "x-product-feature": "elasticsearch, machine-learning" + "x-metaTags": [ + { + "content": "Elasticsearch, Machine Learning", + "name": "product_name" + } + ] } }, "/_ml/anomaly_detectors/{job_id}/_forecast": { @@ -23629,6 +26203,7 @@ }, "max_model_memory": { "description": "Refer to the description for the `max_model_memory` query parameter.", + "default": "20mb", "type": "string" } } @@ -23667,7 +26242,12 @@ } }, "x-state": "Generally available; Added in 6.1.0", - "x-product-feature": "elasticsearch, machine-learning" + "x-metaTags": [ + { + "content": "Elasticsearch, Machine Learning", + "name": "product_name" + } + ] }, "delete": { "tags": [ @@ -23693,7 +26273,12 @@ } }, "x-state": "Generally available; Added in 6.5.0", - "x-product-feature": "elasticsearch, machine-learning" + "x-metaTags": [ + { + "content": "Elasticsearch, Machine Learning", + "name": "product_name" + } + ] } }, "/_ml/anomaly_detectors/{job_id}/_forecast/{forecast_id}": { @@ -23724,7 +26309,12 @@ } }, "x-state": "Generally available; Added in 6.5.0", - "x-product-feature": "elasticsearch, machine-learning" + "x-metaTags": [ + { + "content": "Elasticsearch, Machine Learning", + "name": "product_name" + } + ] } }, "/_ml/anomaly_detectors/{job_id}": { @@ -23752,7 +26342,12 @@ } }, "x-state": "Generally available; Added in 5.5.0", - "x-product-feature": "elasticsearch, machine-learning" + "x-metaTags": [ + { + "content": "Elasticsearch, Machine Learning", + "name": "product_name" + } + ] }, "put": { "tags": [ @@ -23822,6 +26417,7 @@ "properties": { "allow_lazy_open": { "description": "Advanced configuration option. Specifies whether this job can open when there is insufficient machine learning node capacity for it to be immediately assigned to a node. By default, if a machine learning node with capacity to run the job cannot immediately be found, the open anomaly detection jobs API returns an error. However, this is also subject to the cluster-wide `xpack.ml.max_lazy_ml_nodes` setting. If this option is set to true, the open anomaly detection jobs API does not return an error and the job waits in the opening state until sufficient machine learning node capacity is available.", + "default": false, "type": "boolean" }, "analysis_config": { @@ -23838,6 +26434,7 @@ }, "daily_model_snapshot_retention_after_days": { "description": "Advanced configuration option, which affects the automatic removal of old model snapshots for this job. It specifies a period of time (in days) after which only the first snapshot per day is retained. This period is relative to the timestamp of the most recent snapshot for this job. Valid values range from 0 to `model_snapshot_retention_days`.", + "default": 1.0, "type": "number" }, "data_description": { @@ -23865,6 +26462,7 @@ }, "model_snapshot_retention_days": { "description": "Advanced configuration option, which affects the automatic removal of old model snapshots for this job. It specifies the maximum period of time (in days) that snapshots are retained. This period is relative to the timestamp of the most recent snapshot for this job. By default, snapshots ten days older than the newest snapshot are deleted.", + "default": 10.0, "type": "number" }, "renormalization_window_days": { @@ -23991,7 +26589,12 @@ } }, "x-state": "Generally available; Added in 5.4.0", - "x-product-feature": "elasticsearch, machine-learning" + "x-metaTags": [ + { + "content": "Elasticsearch, Machine Learning", + "name": "product_name" + } + ] }, "delete": { "tags": [ @@ -24068,7 +26671,12 @@ } }, "x-state": "Generally available; Added in 5.4.0", - "x-product-feature": "elasticsearch, machine-learning" + "x-metaTags": [ + { + "content": "Elasticsearch, Machine Learning", + "name": "product_name" + } + ] } }, "/_ml/anomaly_detectors/{job_id}/model_snapshots/{snapshot_id}": { @@ -24114,7 +26722,12 @@ } }, "x-state": "Generally available; Added in 5.4.0", - "x-product-feature": "elasticsearch, machine-learning" + "x-metaTags": [ + { + "content": "Elasticsearch, Machine Learning", + "name": "product_name" + } + ] }, "post": { "tags": [ @@ -24158,7 +26771,12 @@ } }, "x-state": "Generally available; Added in 5.4.0", - "x-product-feature": "elasticsearch, machine-learning" + "x-metaTags": [ + { + "content": "Elasticsearch, Machine Learning", + "name": "product_name" + } + ] }, "delete": { "tags": [ @@ -24210,7 +26828,12 @@ } }, "x-state": "Generally available; Added in 5.4.0", - "x-product-feature": "elasticsearch, machine-learning" + "x-metaTags": [ + { + "content": "Elasticsearch, Machine Learning", + "name": "product_name" + } + ] } }, "/_ml/trained_models/{model_id}": { @@ -24253,7 +26876,12 @@ } }, "x-state": "Generally available; Added in 7.10.0", - "x-product-feature": "elasticsearch, machine-learning" + "x-metaTags": [ + { + "content": "Elasticsearch, Machine Learning", + "name": "product_name" + } + ] }, "put": { "tags": [ @@ -24282,6 +26910,7 @@ "schema": { "type": "boolean" }, + "x-state": "Generally available; Added in 8.0.0", "style": "form" }, { @@ -24292,6 +26921,7 @@ "schema": { "type": "boolean" }, + "x-state": "Generally available; Added in 8.8.0", "style": "form" } ], @@ -24362,7 +26992,12 @@ } }, "x-state": "Generally available; Added in 7.10.0", - "x-product-feature": "elasticsearch, machine-learning" + "x-metaTags": [ + { + "content": "Elasticsearch, Machine Learning", + "name": "product_name" + } + ] }, "delete": { "tags": [ @@ -24423,7 +27058,12 @@ } }, "x-state": "Generally available; Added in 7.10.0", - "x-product-feature": "elasticsearch, machine-learning" + "x-metaTags": [ + { + "content": "Elasticsearch, Machine Learning", + "name": "product_name" + } + ] } }, "/_ml/trained_models/{model_id}/model_aliases/{model_alias}": { @@ -24481,7 +27121,12 @@ } }, "x-state": "Generally available; Added in 7.13.0", - "x-product-feature": "elasticsearch, machine-learning" + "x-metaTags": [ + { + "content": "Elasticsearch, Machine Learning", + "name": "product_name" + } + ] }, "delete": { "tags": [ @@ -24533,7 +27178,12 @@ } }, "x-state": "Generally available; Added in 7.13.0", - "x-product-feature": "elasticsearch, machine-learning" + "x-metaTags": [ + { + "content": "Elasticsearch, Machine Learning", + "name": "product_name" + } + ] } }, "/_ml/anomaly_detectors/_estimate_model_memory": { @@ -24606,7 +27256,12 @@ } }, "x-state": "Generally available; Added in 7.7.0", - "x-product-feature": "elasticsearch, machine-learning" + "x-metaTags": [ + { + "content": "Elasticsearch, Machine Learning", + "name": "product_name" + } + ] } }, "/_ml/data_frame/_evaluate": { @@ -24710,7 +27365,12 @@ } }, "x-state": "Generally available; Added in 7.3.0", - "x-product-feature": "elasticsearch, machine-learning" + "x-metaTags": [ + { + "content": "Elasticsearch, Machine Learning", + "name": "product_name" + } + ] } }, "/_ml/data_frame/analytics/_explain": { @@ -24730,7 +27390,12 @@ } }, "x-state": "Generally available; Added in 7.3.0", - "x-product-feature": "elasticsearch, machine-learning" + "x-metaTags": [ + { + "content": "Elasticsearch, Machine Learning", + "name": "product_name" + } + ] }, "post": { "tags": [ @@ -24748,7 +27413,12 @@ } }, "x-state": "Generally available; Added in 7.3.0", - "x-product-feature": "elasticsearch, machine-learning" + "x-metaTags": [ + { + "content": "Elasticsearch, Machine Learning", + "name": "product_name" + } + ] } }, "/_ml/data_frame/analytics/{id}/_explain": { @@ -24773,7 +27443,12 @@ } }, "x-state": "Generally available; Added in 7.3.0", - "x-product-feature": "elasticsearch, machine-learning" + "x-metaTags": [ + { + "content": "Elasticsearch, Machine Learning", + "name": "product_name" + } + ] }, "post": { "tags": [ @@ -24796,7 +27471,12 @@ } }, "x-state": "Generally available; Added in 7.3.0", - "x-product-feature": "elasticsearch, machine-learning" + "x-metaTags": [ + { + "content": "Elasticsearch, Machine Learning", + "name": "product_name" + } + ] } }, "/_ml/anomaly_detectors/{job_id}/_flush": { @@ -24929,7 +27609,12 @@ }, "deprecated": true, "x-state": "Generally available; Added in 5.4.0", - "x-product-feature": "elasticsearch, machine-learning" + "x-metaTags": [ + { + "content": "Elasticsearch, Machine Learning", + "name": "product_name" + } + ] } }, "/_ml/anomaly_detectors/{job_id}/results/buckets/{timestamp}": { @@ -24984,7 +27669,12 @@ } }, "x-state": "Generally available; Added in 5.4.0", - "x-product-feature": "elasticsearch, machine-learning" + "x-metaTags": [ + { + "content": "Elasticsearch, Machine Learning", + "name": "product_name" + } + ] }, "post": { "tags": [ @@ -25037,7 +27727,12 @@ } }, "x-state": "Generally available; Added in 5.4.0", - "x-product-feature": "elasticsearch, machine-learning" + "x-metaTags": [ + { + "content": "Elasticsearch, Machine Learning", + "name": "product_name" + } + ] } }, "/_ml/anomaly_detectors/{job_id}/results/buckets": { @@ -25089,7 +27784,12 @@ } }, "x-state": "Generally available; Added in 5.4.0", - "x-product-feature": "elasticsearch, machine-learning" + "x-metaTags": [ + { + "content": "Elasticsearch, Machine Learning", + "name": "product_name" + } + ] }, "post": { "tags": [ @@ -25139,7 +27839,12 @@ } }, "x-state": "Generally available; Added in 5.4.0", - "x-product-feature": "elasticsearch, machine-learning" + "x-metaTags": [ + { + "content": "Elasticsearch, Machine Learning", + "name": "product_name" + } + ] } }, "/_ml/calendars/{calendar_id}/events": { @@ -25241,7 +27946,12 @@ } }, "x-state": "Generally available; Added in 6.2.0", - "x-product-feature": "elasticsearch, machine-learning" + "x-metaTags": [ + { + "content": "Elasticsearch, Machine Learning", + "name": "product_name" + } + ] }, "post": { "tags": [ @@ -25315,7 +28025,12 @@ } }, "x-state": "Generally available; Added in 6.2.0", - "x-product-feature": "elasticsearch, machine-learning" + "x-metaTags": [ + { + "content": "Elasticsearch, Machine Learning", + "name": "product_name" + } + ] } }, "/_ml/calendars": { @@ -25343,7 +28058,12 @@ } }, "x-state": "Generally available; Added in 6.2.0", - "x-product-feature": "elasticsearch, machine-learning" + "x-metaTags": [ + { + "content": "Elasticsearch, Machine Learning", + "name": "product_name" + } + ] }, "post": { "tags": [ @@ -25369,7 +28089,12 @@ } }, "x-state": "Generally available; Added in 6.2.0", - "x-product-feature": "elasticsearch, machine-learning" + "x-metaTags": [ + { + "content": "Elasticsearch, Machine Learning", + "name": "product_name" + } + ] } }, "/_ml/anomaly_detectors/{job_id}/results/categories/{category_id}": { @@ -25406,7 +28131,12 @@ } }, "x-state": "Generally available; Added in 5.4.0", - "x-product-feature": "elasticsearch, machine-learning" + "x-metaTags": [ + { + "content": "Elasticsearch, Machine Learning", + "name": "product_name" + } + ] }, "post": { "tags": [ @@ -25441,7 +28171,12 @@ } }, "x-state": "Generally available; Added in 5.4.0", - "x-product-feature": "elasticsearch, machine-learning" + "x-metaTags": [ + { + "content": "Elasticsearch, Machine Learning", + "name": "product_name" + } + ] } }, "/_ml/anomaly_detectors/{job_id}/results/categories": { @@ -25475,7 +28210,12 @@ } }, "x-state": "Generally available; Added in 5.4.0", - "x-product-feature": "elasticsearch, machine-learning" + "x-metaTags": [ + { + "content": "Elasticsearch, Machine Learning", + "name": "product_name" + } + ] }, "post": { "tags": [ @@ -25507,7 +28247,12 @@ } }, "x-state": "Generally available; Added in 5.4.0", - "x-product-feature": "elasticsearch, machine-learning" + "x-metaTags": [ + { + "content": "Elasticsearch, Machine Learning", + "name": "product_name" + } + ] } }, "/_ml/data_frame/analytics": { @@ -25538,7 +28283,12 @@ } }, "x-state": "Generally available; Added in 7.3.0", - "x-product-feature": "elasticsearch, machine-learning" + "x-metaTags": [ + { + "content": "Elasticsearch, Machine Learning", + "name": "product_name" + } + ] } }, "/_ml/data_frame/analytics/_stats": { @@ -25569,7 +28319,12 @@ } }, "x-state": "Generally available; Added in 7.3.0", - "x-product-feature": "elasticsearch, machine-learning" + "x-metaTags": [ + { + "content": "Elasticsearch, Machine Learning", + "name": "product_name" + } + ] } }, "/_ml/data_frame/analytics/{id}/_stats": { @@ -25603,7 +28358,12 @@ } }, "x-state": "Generally available; Added in 7.3.0", - "x-product-feature": "elasticsearch, machine-learning" + "x-metaTags": [ + { + "content": "Elasticsearch, Machine Learning", + "name": "product_name" + } + ] } }, "/_ml/datafeeds/{datafeed_id}/_stats": { @@ -25628,7 +28388,12 @@ } }, "x-state": "Generally available; Added in 5.5.0", - "x-product-feature": "elasticsearch, machine-learning" + "x-metaTags": [ + { + "content": "Elasticsearch, Machine Learning", + "name": "product_name" + } + ] } }, "/_ml/datafeeds/_stats": { @@ -25650,7 +28415,12 @@ } }, "x-state": "Generally available; Added in 5.5.0", - "x-product-feature": "elasticsearch, machine-learning" + "x-metaTags": [ + { + "content": "Elasticsearch, Machine Learning", + "name": "product_name" + } + ] } }, "/_ml/datafeeds": { @@ -25675,7 +28445,12 @@ } }, "x-state": "Generally available; Added in 5.5.0", - "x-product-feature": "elasticsearch, machine-learning" + "x-metaTags": [ + { + "content": "Elasticsearch, Machine Learning", + "name": "product_name" + } + ] } }, "/_ml/filters": { @@ -25700,7 +28475,12 @@ } }, "x-state": "Generally available; Added in 5.5.0", - "x-product-feature": "elasticsearch, machine-learning" + "x-metaTags": [ + { + "content": "Elasticsearch, Machine Learning", + "name": "product_name" + } + ] } }, "/_ml/anomaly_detectors/{job_id}/results/influencers": { @@ -25749,7 +28529,12 @@ } }, "x-state": "Generally available; Added in 5.4.0", - "x-product-feature": "elasticsearch, machine-learning" + "x-metaTags": [ + { + "content": "Elasticsearch, Machine Learning", + "name": "product_name" + } + ] }, "post": { "tags": [ @@ -25796,7 +28581,12 @@ } }, "x-state": "Generally available; Added in 5.4.0", - "x-product-feature": "elasticsearch, machine-learning" + "x-metaTags": [ + { + "content": "Elasticsearch, Machine Learning", + "name": "product_name" + } + ] } }, "/_ml/anomaly_detectors/_stats": { @@ -25818,7 +28608,12 @@ } }, "x-state": "Generally available; Added in 5.5.0", - "x-product-feature": "elasticsearch, machine-learning" + "x-metaTags": [ + { + "content": "Elasticsearch, Machine Learning", + "name": "product_name" + } + ] } }, "/_ml/anomaly_detectors/{job_id}/_stats": { @@ -25843,7 +28638,12 @@ } }, "x-state": "Generally available; Added in 5.5.0", - "x-product-feature": "elasticsearch, machine-learning" + "x-metaTags": [ + { + "content": "Elasticsearch, Machine Learning", + "name": "product_name" + } + ] } }, "/_ml/anomaly_detectors": { @@ -25868,7 +28668,12 @@ } }, "x-state": "Generally available; Added in 5.5.0", - "x-product-feature": "elasticsearch, machine-learning" + "x-metaTags": [ + { + "content": "Elasticsearch, Machine Learning", + "name": "product_name" + } + ] } }, "/_ml/memory/_stats": { @@ -25893,7 +28698,12 @@ } }, "x-state": "Generally available; Added in 8.2.0", - "x-product-feature": "elasticsearch, machine-learning" + "x-metaTags": [ + { + "content": "Elasticsearch, Machine Learning", + "name": "product_name" + } + ] } }, "/_ml/memory/{node_id}/_stats": { @@ -25921,7 +28731,12 @@ } }, "x-state": "Generally available; Added in 8.2.0", - "x-product-feature": "elasticsearch, machine-learning" + "x-metaTags": [ + { + "content": "Elasticsearch, Machine Learning", + "name": "product_name" + } + ] } }, "/_ml/anomaly_detectors/{job_id}/model_snapshots/{snapshot_id}/_upgrade/_stats": { @@ -25994,7 +28809,12 @@ } }, "x-state": "Generally available; Added in 7.16.0", - "x-product-feature": "elasticsearch, machine-learning" + "x-metaTags": [ + { + "content": "Elasticsearch, Machine Learning", + "name": "product_name" + } + ] } }, "/_ml/anomaly_detectors/{job_id}/model_snapshots": { @@ -26037,7 +28857,12 @@ } }, "x-state": "Generally available; Added in 5.4.0", - "x-product-feature": "elasticsearch, machine-learning" + "x-metaTags": [ + { + "content": "Elasticsearch, Machine Learning", + "name": "product_name" + } + ] }, "post": { "tags": [ @@ -26078,7 +28903,12 @@ } }, "x-state": "Generally available; Added in 5.4.0", - "x-product-feature": "elasticsearch, machine-learning" + "x-metaTags": [ + { + "content": "Elasticsearch, Machine Learning", + "name": "product_name" + } + ] } }, "/_ml/anomaly_detectors/{job_id}/results/overall_buckets": { @@ -26124,7 +28954,12 @@ } }, "x-state": "Generally available; Added in 6.1.0", - "x-product-feature": "elasticsearch, machine-learning" + "x-metaTags": [ + { + "content": "Elasticsearch, Machine Learning", + "name": "product_name" + } + ] }, "post": { "tags": [ @@ -26168,7 +29003,12 @@ } }, "x-state": "Generally available; Added in 6.1.0", - "x-product-feature": "elasticsearch, machine-learning" + "x-metaTags": [ + { + "content": "Elasticsearch, Machine Learning", + "name": "product_name" + } + ] } }, "/_ml/anomaly_detectors/{job_id}/results/records": { @@ -26217,7 +29057,12 @@ } }, "x-state": "Generally available; Added in 5.4.0", - "x-product-feature": "elasticsearch, machine-learning" + "x-metaTags": [ + { + "content": "Elasticsearch, Machine Learning", + "name": "product_name" + } + ] }, "post": { "tags": [ @@ -26264,7 +29109,12 @@ } }, "x-state": "Generally available; Added in 5.4.0", - "x-product-feature": "elasticsearch, machine-learning" + "x-metaTags": [ + { + "content": "Elasticsearch, Machine Learning", + "name": "product_name" + } + ] } }, "/_ml/trained_models": { @@ -26304,7 +29154,12 @@ } }, "x-state": "Generally available; Added in 7.10.0", - "x-product-feature": "elasticsearch, machine-learning" + "x-metaTags": [ + { + "content": "Elasticsearch, Machine Learning", + "name": "product_name" + } + ] } }, "/_ml/trained_models/{model_id}/_stats": { @@ -26335,7 +29190,12 @@ } }, "x-state": "Generally available; Added in 7.10.0", - "x-product-feature": "elasticsearch, machine-learning" + "x-metaTags": [ + { + "content": "Elasticsearch, Machine Learning", + "name": "product_name" + } + ] } }, "/_ml/trained_models/_stats": { @@ -26363,7 +29223,12 @@ } }, "x-state": "Generally available; Added in 7.10.0", - "x-product-feature": "elasticsearch, machine-learning" + "x-metaTags": [ + { + "content": "Elasticsearch, Machine Learning", + "name": "product_name" + } + ] } }, "/_ml/trained_models/{model_id}/_infer": { @@ -26454,7 +29319,12 @@ } }, "x-state": "Generally available; Added in 8.3.0", - "x-product-feature": "elasticsearch, machine-learning" + "x-metaTags": [ + { + "content": "Elasticsearch, Machine Learning", + "name": "product_name" + } + ] } }, "/_ml/info": { @@ -26498,7 +29368,12 @@ } }, "x-state": "Generally available; Added in 6.3.0", - "x-product-feature": "elasticsearch, machine-learning" + "x-metaTags": [ + { + "content": "Elasticsearch, Machine Learning", + "name": "product_name" + } + ] } }, "/_ml/anomaly_detectors/{job_id}/_open": { @@ -26583,7 +29458,12 @@ } }, "x-state": "Generally available; Added in 5.4.0", - "x-product-feature": "elasticsearch, machine-learning" + "x-metaTags": [ + { + "content": "Elasticsearch, Machine Learning", + "name": "product_name" + } + ] } }, "/_ml/anomaly_detectors/{job_id}/_data": { @@ -26724,7 +29604,12 @@ }, "deprecated": true, "x-state": "Generally available; Added in 5.4.0", - "x-product-feature": "elasticsearch, machine-learning" + "x-metaTags": [ + { + "content": "Elasticsearch, Machine Learning", + "name": "product_name" + } + ] } }, "/_ml/data_frame/analytics/_preview": { @@ -26744,7 +29629,12 @@ } }, "x-state": "Generally available; Added in 7.13.0", - "x-product-feature": "elasticsearch, machine-learning" + "x-metaTags": [ + { + "content": "Elasticsearch, Machine Learning", + "name": "product_name" + } + ] }, "post": { "tags": [ @@ -26762,7 +29652,12 @@ } }, "x-state": "Generally available; Added in 7.13.0", - "x-product-feature": "elasticsearch, machine-learning" + "x-metaTags": [ + { + "content": "Elasticsearch, Machine Learning", + "name": "product_name" + } + ] } }, "/_ml/data_frame/analytics/{id}/_preview": { @@ -26787,7 +29682,12 @@ } }, "x-state": "Generally available; Added in 7.13.0", - "x-product-feature": "elasticsearch, machine-learning" + "x-metaTags": [ + { + "content": "Elasticsearch, Machine Learning", + "name": "product_name" + } + ] }, "post": { "tags": [ @@ -26810,7 +29710,12 @@ } }, "x-state": "Generally available; Added in 7.13.0", - "x-product-feature": "elasticsearch, machine-learning" + "x-metaTags": [ + { + "content": "Elasticsearch, Machine Learning", + "name": "product_name" + } + ] } }, "/_ml/datafeeds/{datafeed_id}/_preview": { @@ -26841,7 +29746,12 @@ } }, "x-state": "Generally available; Added in 5.4.0", - "x-product-feature": "elasticsearch, machine-learning" + "x-metaTags": [ + { + "content": "Elasticsearch, Machine Learning", + "name": "product_name" + } + ] }, "post": { "tags": [ @@ -26870,7 +29780,12 @@ } }, "x-state": "Generally available; Added in 5.4.0", - "x-product-feature": "elasticsearch, machine-learning" + "x-metaTags": [ + { + "content": "Elasticsearch, Machine Learning", + "name": "product_name" + } + ] } }, "/_ml/datafeeds/_preview": { @@ -26898,7 +29813,12 @@ } }, "x-state": "Generally available; Added in 5.4.0", - "x-product-feature": "elasticsearch, machine-learning" + "x-metaTags": [ + { + "content": "Elasticsearch, Machine Learning", + "name": "product_name" + } + ] }, "post": { "tags": [ @@ -26924,7 +29844,12 @@ } }, "x-state": "Generally available; Added in 5.4.0", - "x-product-feature": "elasticsearch, machine-learning" + "x-metaTags": [ + { + "content": "Elasticsearch, Machine Learning", + "name": "product_name" + } + ] } }, "/_ml/trained_models/{model_id}/definition/{part}": { @@ -27007,7 +29932,12 @@ } }, "x-state": "Generally available; Added in 8.0.0", - "x-product-feature": "elasticsearch, machine-learning" + "x-metaTags": [ + { + "content": "Elasticsearch, Machine Learning", + "name": "product_name" + } + ] } }, "/_ml/trained_models/{model_id}/vocabulary": { @@ -27088,7 +30018,12 @@ } }, "x-state": "Generally available; Added in 8.0.0", - "x-product-feature": "elasticsearch, machine-learning" + "x-metaTags": [ + { + "content": "Elasticsearch, Machine Learning", + "name": "product_name" + } + ] } }, "/_ml/anomaly_detectors/{job_id}/_reset": { @@ -27145,7 +30080,12 @@ } }, "x-state": "Generally available; Added in 7.14.0", - "x-product-feature": "elasticsearch, machine-learning" + "x-metaTags": [ + { + "content": "Elasticsearch, Machine Learning", + "name": "product_name" + } + ] } }, "/_ml/anomaly_detectors/{job_id}/model_snapshots/{snapshot_id}/_revert": { @@ -27198,6 +30138,7 @@ "properties": { "delete_intervening_results": { "description": "Refer to the description for the `delete_intervening_results` query parameter.", + "default": false, "type": "boolean" } } @@ -27232,7 +30173,12 @@ } }, "x-state": "Generally available; Added in 5.4.0", - "x-product-feature": "elasticsearch, machine-learning" + "x-metaTags": [ + { + "content": "Elasticsearch, Machine Learning", + "name": "product_name" + } + ] } }, "/_ml/set_upgrade_mode": { @@ -27278,7 +30224,12 @@ } }, "x-state": "Generally available; Added in 6.7.0", - "x-product-feature": "elasticsearch, machine-learning" + "x-metaTags": [ + { + "content": "Elasticsearch, Machine Learning", + "name": "product_name" + } + ] } }, "/_ml/data_frame/analytics/{id}/_start": { @@ -27337,7 +30288,12 @@ } }, "x-state": "Generally available; Added in 7.3.0", - "x-product-feature": "elasticsearch, machine-learning" + "x-metaTags": [ + { + "content": "Elasticsearch, Machine Learning", + "name": "product_name" + } + ] } }, "/_ml/datafeeds/{datafeed_id}/_start": { @@ -27443,7 +30399,12 @@ } }, "x-state": "Generally available; Added in 5.5.0", - "x-product-feature": "elasticsearch, machine-learning" + "x-metaTags": [ + { + "content": "Elasticsearch, Machine Learning", + "name": "product_name" + } + ] } }, "/_ml/trained_models/{model_id}/deployment/_start": { @@ -27484,6 +30445,7 @@ "schema": { "type": "string" }, + "x-state": "Generally available; Added in 8.8.0", "style": "form" }, { @@ -27582,7 +30544,12 @@ } }, "x-state": "Generally available; Added in 8.0.0", - "x-product-feature": "elasticsearch, machine-learning" + "x-metaTags": [ + { + "content": "Elasticsearch, Machine Learning", + "name": "product_name" + } + ] } }, "/_ml/data_frame/analytics/{id}/_stop": { @@ -27657,7 +30624,12 @@ } }, "x-state": "Generally available; Added in 7.3.0", - "x-product-feature": "elasticsearch, machine-learning" + "x-metaTags": [ + { + "content": "Elasticsearch, Machine Learning", + "name": "product_name" + } + ] } }, "/_ml/datafeeds/{datafeed_id}/_stop": { @@ -27719,10 +30691,12 @@ "properties": { "allow_no_match": { "description": "Refer to the description for the `allow_no_match` query parameter.", + "default": true, "type": "boolean" }, "force": { "description": "Refer to the description for the `force` query parameter.", + "default": false, "type": "boolean" }, "timeout": { @@ -27760,7 +30734,12 @@ } }, "x-state": "Generally available; Added in 5.4.0", - "x-product-feature": "elasticsearch, machine-learning" + "x-metaTags": [ + { + "content": "Elasticsearch, Machine Learning", + "name": "product_name" + } + ] } }, "/_ml/trained_models/{model_id}/deployment/_stop": { @@ -27825,7 +30804,12 @@ } }, "x-state": "Generally available; Added in 8.0.0", - "x-product-feature": "elasticsearch, machine-learning" + "x-metaTags": [ + { + "content": "Elasticsearch, Machine Learning", + "name": "product_name" + } + ] } }, "/_ml/data_frame/analytics/{id}/_update": { @@ -27861,14 +30845,17 @@ }, "model_memory_limit": { "description": "The approximate maximum amount of memory resources that are permitted for\nanalytical processing. If your `elasticsearch.yml` file contains an\n`xpack.ml.max_model_memory_limit` setting, an error occurs when you try\nto create data frame analytics jobs that have `model_memory_limit` values\ngreater than that setting.", + "default": "1gb", "type": "string" }, "max_num_threads": { "description": "The maximum number of threads to be used by the analysis. Using more\nthreads may decrease the time necessary to complete the analysis at the\ncost of using more CPU. Note that the process may use additional threads\nfor operational functionality other than the analysis itself.", + "default": 1.0, "type": "number" }, "allow_lazy_start": { "description": "Specifies whether this job can start when there is insufficient machine\nlearning node capacity for it to be immediately assigned to a node.", + "default": false, "type": "boolean" } } @@ -27945,7 +30932,12 @@ } }, "x-state": "Generally available; Added in 7.3.0", - "x-product-feature": "elasticsearch, machine-learning" + "x-metaTags": [ + { + "content": "Elasticsearch, Machine Learning", + "name": "product_name" + } + ] } }, "/_ml/datafeeds/{datafeed_id}/_update": { @@ -28066,6 +31058,7 @@ }, "scroll_size": { "description": "The size parameter that is used in Elasticsearch searches when the datafeed does not use aggregations.\nThe maximum value is the value of `index.max_result_window`.", + "default": 1000.0, "type": "number" } } @@ -28158,7 +31151,12 @@ } }, "x-state": "Generally available; Added in 6.4.0", - "x-product-feature": "elasticsearch, machine-learning" + "x-metaTags": [ + { + "content": "Elasticsearch, Machine Learning", + "name": "product_name" + } + ] } }, "/_ml/filters/{filter_id}/_update": { @@ -28250,7 +31248,12 @@ } }, "x-state": "Generally available; Added in 6.4.0", - "x-product-feature": "elasticsearch, machine-learning" + "x-metaTags": [ + { + "content": "Elasticsearch, Machine Learning", + "name": "product_name" + } + ] } }, "/_ml/anomaly_detectors/{job_id}/_update": { @@ -28282,6 +31285,7 @@ "properties": { "allow_lazy_open": { "description": "Advanced configuration option. Specifies whether this job can open when\nthere is insufficient machine learning node capacity for it to be\nimmediately assigned to a node. If `false` and a machine learning node\nwith capacity to run the job cannot immediately be found, the open\nanomaly detection jobs API returns an error. However, this is also\nsubject to the cluster-wide `xpack.ml.max_lazy_ml_nodes` setting. If this\noption is set to `true`, the open anomaly detection jobs API does not\nreturn an error and the job waits in the opening state until sufficient\nmachine learning node capacity is available.", + "default": false, "type": "boolean" }, "analysis_limits": { @@ -28315,10 +31319,12 @@ }, "daily_model_snapshot_retention_after_days": { "description": "Advanced configuration option, which affects the automatic removal of old\nmodel snapshots for this job. It specifies a period of time (in days)\nafter which only the first snapshot per day is retained. This period is\nrelative to the timestamp of the most recent snapshot for this job. Valid\nvalues range from 0 to `model_snapshot_retention_days`. For jobs created\nbefore version 7.8.0, the default value matches\n`model_snapshot_retention_days`.", + "default": 1.0, "type": "number" }, "model_snapshot_retention_days": { "description": "Advanced configuration option, which affects the automatic removal of old\nmodel snapshots for this job. It specifies the maximum period of time (in\ndays) that snapshots are retained. This period is relative to the\ntimestamp of the most recent snapshot for this job.", + "default": 10.0, "type": "number" }, "renormalization_window_days": { @@ -28455,7 +31461,12 @@ } }, "x-state": "Generally available; Added in 5.5.0", - "x-product-feature": "elasticsearch, machine-learning" + "x-metaTags": [ + { + "content": "Elasticsearch, Machine Learning", + "name": "product_name" + } + ] } }, "/_ml/anomaly_detectors/{job_id}/model_snapshots/{snapshot_id}/_update": { @@ -28502,6 +31513,7 @@ }, "retain": { "description": "If `true`, this snapshot will not be deleted during automatic cleanup of\nsnapshots older than `model_snapshot_retention_days`. However, this\nsnapshot will be deleted when the job is deleted.", + "default": false, "type": "boolean" } } @@ -28541,7 +31553,12 @@ } }, "x-state": "Generally available; Added in 5.4.0", - "x-product-feature": "elasticsearch, machine-learning" + "x-metaTags": [ + { + "content": "Elasticsearch, Machine Learning", + "name": "product_name" + } + ] } }, "/_ml/trained_models/{model_id}/deployment/_update": { @@ -28583,6 +31600,7 @@ "properties": { "number_of_allocations": { "description": "The number of model allocations on each node where the model is deployed.\nAll allocations on a node share the same copy of the model in memory but use\na separate set of threads to evaluate the model.\nIncreasing this value generally increases the throughput.\nIf this setting is greater than the number of hardware threads\nit will automatically be changed to a value less than the number of hardware threads.\nIf adaptive_allocations is enabled, do not set this value, because it’s automatically set.", + "default": 1.0, "type": "number" }, "adaptive_allocations": { @@ -28620,7 +31638,12 @@ } }, "x-state": "Generally available; Added in 8.6.0", - "x-product-feature": "elasticsearch, machine-learning" + "x-metaTags": [ + { + "content": "Elasticsearch, Machine Learning", + "name": "product_name" + } + ] } }, "/_ml/anomaly_detectors/{job_id}/model_snapshots/{snapshot_id}/_upgrade": { @@ -28701,7 +31724,12 @@ } }, "x-state": "Generally available; Added in 5.4.0", - "x-product-feature": "elasticsearch, machine-learning" + "x-metaTags": [ + { + "content": "Elasticsearch, Machine Learning", + "name": "product_name" + } + ] } }, "/_msearch": { @@ -28731,6 +31759,9 @@ { "$ref": "#/components/parameters/msearch-include_named_queries_score" }, + { + "$ref": "#/components/parameters/msearch-index_" + }, { "$ref": "#/components/parameters/msearch-max_concurrent_searches" }, @@ -28762,7 +31793,12 @@ } }, "x-state": "Generally available; Added in 1.3.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] }, "post": { "tags": [ @@ -28790,6 +31826,9 @@ { "$ref": "#/components/parameters/msearch-include_named_queries_score" }, + { + "$ref": "#/components/parameters/msearch-index_" + }, { "$ref": "#/components/parameters/msearch-max_concurrent_searches" }, @@ -28821,7 +31860,12 @@ } }, "x-state": "Generally available; Added in 1.3.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/{index}/_msearch": { @@ -28854,6 +31898,9 @@ { "$ref": "#/components/parameters/msearch-include_named_queries_score" }, + { + "$ref": "#/components/parameters/msearch-index_" + }, { "$ref": "#/components/parameters/msearch-max_concurrent_searches" }, @@ -28885,7 +31932,12 @@ } }, "x-state": "Generally available; Added in 1.3.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] }, "post": { "tags": [ @@ -28916,6 +31968,9 @@ { "$ref": "#/components/parameters/msearch-include_named_queries_score" }, + { + "$ref": "#/components/parameters/msearch-index_" + }, { "$ref": "#/components/parameters/msearch-max_concurrent_searches" }, @@ -28947,7 +32002,12 @@ } }, "x-state": "Generally available; Added in 1.3.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_msearch/template": { @@ -28988,7 +32048,12 @@ } }, "x-state": "Generally available; Added in 5.0.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] }, "post": { "tags": [ @@ -29027,7 +32092,12 @@ } }, "x-state": "Generally available; Added in 5.0.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/{index}/_msearch/template": { @@ -29071,7 +32141,12 @@ } }, "x-state": "Generally available; Added in 5.0.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] }, "post": { "tags": [ @@ -29113,7 +32188,12 @@ } }, "x-state": "Generally available; Added in 5.0.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_mtermvectors": { @@ -29171,7 +32251,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] }, "post": { "tags": [ @@ -29227,7 +32312,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/{index}/_mtermvectors": { @@ -29288,7 +32378,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] }, "post": { "tags": [ @@ -29347,7 +32442,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_nodes/{node_id}/_repositories_metering/{max_archive_version}": { @@ -29395,7 +32495,12 @@ } }, "x-state": "Technical preview; Added in 7.16.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_nodes/{node_id}/_repositories_metering": { @@ -29432,7 +32537,12 @@ } }, "x-state": "Technical preview; Added in 7.16.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_nodes/hot_threads": { @@ -29472,7 +32582,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_nodes/{node_id}/hot_threads": { @@ -29515,7 +32630,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_nodes": { @@ -29540,7 +32660,12 @@ } }, "x-state": "Generally available; Added in 1.3.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_nodes/{node_id}": { @@ -29568,7 +32693,12 @@ } }, "x-state": "Generally available; Added in 1.3.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_nodes/{metric}": { @@ -29596,7 +32726,12 @@ } }, "x-state": "Generally available; Added in 1.3.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_nodes/{node_id}/{metric}": { @@ -29627,7 +32762,12 @@ } }, "x-state": "Generally available; Added in 1.3.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_nodes/reload_secure_settings": { @@ -29652,7 +32792,12 @@ } }, "x-state": "Generally available; Added in 6.5.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_nodes/{node_id}/reload_secure_settings": { @@ -29680,7 +32825,12 @@ } }, "x-state": "Generally available; Added in 6.5.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_nodes/stats": { @@ -29726,7 +32876,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_nodes/{node_id}/stats": { @@ -29775,7 +32930,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_nodes/stats/{metric}": { @@ -29824,7 +32984,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_nodes/{node_id}/stats/{metric}": { @@ -29876,7 +33041,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_nodes/stats/{metric}/{index_metric}": { @@ -29928,7 +33098,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_nodes/{node_id}/stats/{metric}/{index_metric}": { @@ -29983,7 +33158,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_nodes/usage": { @@ -30005,7 +33185,12 @@ } }, "x-state": "Generally available; Added in 6.0.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_nodes/{node_id}/usage": { @@ -30030,7 +33215,12 @@ } }, "x-state": "Generally available; Added in 6.0.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_nodes/usage/{metric}": { @@ -30055,7 +33245,12 @@ } }, "x-state": "Generally available; Added in 6.0.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_nodes/{node_id}/usage/{metric}": { @@ -30083,7 +33278,12 @@ } }, "x-state": "Generally available; Added in 6.0.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/{index}/_pit": { @@ -30223,7 +33423,12 @@ } }, "x-state": "Generally available; Added in 7.10.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_scripts/{id}/{context}": { @@ -30264,7 +33469,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] }, "post": { "tags": [ @@ -30303,7 +33513,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_query_rules/{ruleset_id}/_rule/{rule_id}": { @@ -30361,7 +33576,12 @@ } }, "x-state": "Generally available; Added in 8.15.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] }, "put": { "tags": [ @@ -30461,7 +33681,12 @@ } }, "x-state": "Generally available; Added in 8.15.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] }, "delete": { "tags": [ @@ -30507,7 +33732,12 @@ } }, "x-state": "Generally available; Added in 8.15.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_query_rules/{ruleset_id}": { @@ -30550,7 +33780,12 @@ } }, "x-state": "Generally available; Added in 8.10.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] }, "put": { "tags": [ @@ -30631,7 +33866,12 @@ } }, "x-state": "Generally available; Added in 8.10.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] }, "delete": { "tags": [ @@ -30666,7 +33906,12 @@ } }, "x-state": "Generally available; Added in 8.10.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_query_rules": { @@ -30733,7 +33978,12 @@ } }, "x-state": "Generally available; Added in 8.10.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_query_rules/{ruleset_id}/_test": { @@ -30819,7 +34069,12 @@ } }, "x-state": "Generally available; Added in 8.10.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_rank_eval": { @@ -30853,7 +34108,12 @@ } }, "x-state": "Generally available; Added in 6.2.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] }, "post": { "tags": [ @@ -30885,7 +34145,12 @@ } }, "x-state": "Generally available; Added in 6.2.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/{index}/_rank_eval": { @@ -30922,7 +34187,12 @@ } }, "x-state": "Generally available; Added in 6.2.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] }, "post": { "tags": [ @@ -30957,7 +34227,12 @@ } }, "x-state": "Generally available; Added in 6.2.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_reindex": { @@ -31013,6 +34288,16 @@ }, "style": "form" }, + { + "in": "query", + "name": "max_docs", + "description": "The maximum number of documents to reindex.\nBy default, all documents are reindexed.\nIf it is a value less then or equal to `scroll_size`, a scroll will not be used to retrieve the results for the operation.\n\nIf `conflicts` is set to `proceed`, the reindex operation could attempt to reindex more documents from the source than `max_docs` until it has successfully indexed `max_docs` documents into the target or it has gone through every document in the source query.", + "deprecated": false, + "schema": { + "type": "number" + }, + "style": "form" + }, { "in": "query", "name": "timeout", @@ -31090,6 +34375,66 @@ "summary": "Reindex multiple sources", "description": "Run `POST _reindex` to reindex from multiple sources. The `index` attribute in source can be a list, which enables you to copy from lots of sources in one request. This example copies documents from the `my-index-000001` and `my-index-000002` indices.\n", "value": "{\n \"source\": {\n \"index\": [\"my-index-000001\", \"my-index-000002\"]\n },\n \"dest\": {\n \"index\": \"my-new-index-000002\"\n }\n}" + }, + "ReindexRequestExample10": { + "summary": "Reindex with Painless", + "description": "You can use Painless to reindex daily indices to apply a new template to the existing documents. The script extracts the date from the index name and creates a new index with `-1` appended. For example, all data from `metricbeat-2016.05.31` will be reindexed into `metricbeat-2016.05.31-1`.\n", + "value": "{\n \"source\": {\n \"index\": \"metricbeat-*\"\n },\n \"dest\": {\n \"index\": \"metricbeat\"\n },\n \"script\": {\n \"lang\": \"painless\",\n \"source\": \"ctx._index = 'metricbeat-' + (ctx._index.substring('metricbeat-'.length(), ctx._index.length())) + '-1'\"\n }\n}" + }, + "ReindexRequestExample11": { + "summary": "Reindex a random subset", + "description": "Run `POST _reindex` to extract a random subset of the source for testing. You might need to adjust the `min_score` value depending on the relative amount of data extracted from source.\n", + "value": "{\n \"max_docs\": 10,\n \"source\": {\n \"index\": \"my-index-000001\",\n \"query\": {\n \"function_score\" : {\n \"random_score\" : {},\n \"min_score\" : 0.9\n }\n }\n },\n \"dest\": {\n \"index\": \"my-new-index-000001\"\n }\n}" + }, + "ReindexRequestExample12": { + "summary": "Reindex modified documents", + "description": "Run `POST _reindex` to modify documents during reindexing. This example bumps the version of the source document.\n", + "value": "{\n \"source\": {\n \"index\": \"my-index-000001\"\n },\n \"dest\": {\n \"index\": \"my-new-index-000001\",\n \"version_type\": \"external\"\n },\n \"script\": {\n \"source\": \"if (ctx._source.foo == 'bar') {ctx._version++; ctx._source.remove('foo')}\",\n \"lang\": \"painless\"\n }\n}" + }, + "ReindexRequestExample13": { + "summary": "Reindex from remote on Elastic Cloud", + "description": "When using Elastic Cloud, you can run `POST _reindex` and authenticate against a remote cluster with an API key.\n", + "value": "{\n \"source\": {\n \"remote\": {\n \"host\": \"http://otherhost:9200\",\n \"username\": \"user\",\n \"password\": \"pass\"\n },\n \"index\": \"my-index-000001\",\n \"query\": {\n \"match\": {\n \"test\": \"data\"\n }\n }\n },\n \"dest\": {\n \"index\": \"my-new-index-000001\"\n }\n}" + }, + "ReindexRequestExample2": { + "summary": "Manual slicing", + "description": "Run `POST _reindex` to slice a reindex request manually. Provide a slice ID and total number of slices to each request.\n", + "value": "{\n \"source\": {\n \"index\": \"my-index-000001\",\n \"slice\": {\n \"id\": 0,\n \"max\": 2\n }\n },\n \"dest\": {\n \"index\": \"my-new-index-000001\"\n }\n}" + }, + "ReindexRequestExample3": { + "summary": "Automatic slicing", + "description": "Run `POST _reindex?slices=5&refresh` to automatically parallelize using sliced scroll to slice on `_id`. The `slices` parameter specifies the number of slices to use.\n", + "value": "{\n \"source\": {\n \"index\": \"my-index-000001\"\n },\n \"dest\": {\n \"index\": \"my-new-index-000001\"\n }\n}" + }, + "ReindexRequestExample4": { + "summary": "Routing", + "description": "By default if reindex sees a document with routing then the routing is preserved unless it's changed by the script. You can set `routing` on the `dest` request to change this behavior. In this example, run `POST _reindex` to copy all documents from the `source` with the company name `cat` into the `dest` with routing set to `cat`.\n", + "value": "{\n \"source\": {\n \"index\": \"source\",\n \"query\": {\n \"match\": {\n \"company\": \"cat\"\n }\n }\n },\n \"dest\": {\n \"index\": \"dest\",\n \"routing\": \"=cat\"\n }\n}" + }, + "ReindexRequestExample5": { + "summary": "Ingest pipelines", + "description": "Run `POST _reindex` and use the ingest pipelines feature.", + "value": "{\n \"source\": {\n \"index\": \"source\"\n },\n \"dest\": {\n \"index\": \"dest\",\n \"pipeline\": \"some_ingest_pipeline\"\n }\n}" + }, + "ReindexRequestExample6": { + "summary": "Reindex with a query", + "description": "Run `POST _reindex` and add a query to the `source` to limit the documents to reindex. For example, this request copies documents into `my-new-index-000001` only if they have a `user.id` of `kimchy`.\n", + "value": "{\n \"source\": {\n \"index\": \"my-index-000001\",\n \"query\": {\n \"term\": {\n \"user.id\": \"kimchy\"\n }\n }\n },\n \"dest\": {\n \"index\": \"my-new-index-000001\"\n }\n}" + }, + "ReindexRequestExample7": { + "summary": "Reindex with max_docs", + "description": "You can limit the number of processed documents by setting `max_docs`. For example, run `POST _reindex` to copy a single document from `my-index-000001` to `my-new-index-000001`.\n", + "value": "{\n \"max_docs\": 1,\n \"source\": {\n \"index\": \"my-index-000001\"\n },\n \"dest\": {\n \"index\": \"my-new-index-000001\"\n }\n}" + }, + "ReindexRequestExample8": { + "summary": "Reindex selected fields", + "description": "You can use source filtering to reindex a subset of the fields in the original documents. For example, run `POST _reindex` the reindex only the `user.id` and `_doc` fields of each document.\n", + "value": "{\n \"source\": {\n \"index\": \"my-index-000001\",\n \"_source\": [\"user.id\", \"_doc\"]\n },\n \"dest\": {\n \"index\": \"my-new-index-000001\"\n }\n}" + }, + "ReindexRequestExample9": { + "summary": "Reindex new field names", + "description": "A reindex operation can build a copy of an index with renamed fields. If your index has documents with `text` and `flag` fields, you can change the latter field name to `tag` during the reindex.\n", + "value": "{\n \"source\": {\n \"index\": \"my-index-000001\"\n },\n \"dest\": {\n \"index\": \"my-new-index-000001\"\n },\n \"script\": {\n \"source\": \"ctx._source.tag = ctx._source.remove(\\\"flag\\\")\"\n }\n}" } } } @@ -31172,7 +34517,12 @@ } }, "x-state": "Generally available; Added in 2.3.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_reindex/{task_id}/_rethrottle": { @@ -31230,7 +34580,12 @@ } }, "x-state": "Generally available; Added in 2.4.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_render/template": { @@ -31250,7 +34605,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] }, "post": { "tags": [ @@ -31268,7 +34628,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_render/template/{id}": { @@ -31293,7 +34658,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] }, "post": { "tags": [ @@ -31316,7 +34686,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_rollup/job/{id}": { @@ -31339,7 +34714,12 @@ }, "deprecated": true, "x-state": "Technical preview; Added in 6.3.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] }, "put": { "tags": [ @@ -31436,7 +34816,12 @@ }, "deprecated": true, "x-state": "Technical preview; Added in 6.3.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] }, "delete": { "tags": [ @@ -31492,7 +34877,12 @@ }, "deprecated": true, "x-state": "Technical preview; Added in 6.3.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_rollup/job": { @@ -31510,7 +34900,12 @@ }, "deprecated": true, "x-state": "Technical preview; Added in 6.3.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_rollup/data/{id}": { @@ -31533,7 +34928,12 @@ }, "deprecated": true, "x-state": "Technical preview; Added in 6.3.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_rollup/data": { @@ -31551,7 +34951,12 @@ }, "deprecated": true, "x-state": "Technical preview; Added in 6.3.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/{index}/_rollup/data": { @@ -31598,7 +35003,12 @@ }, "deprecated": true, "x-state": "Technical preview; Added in 6.4.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/{index}/_rollup_search": { @@ -31607,7 +35017,11 @@ "rollup" ], "summary": "Search rolled-up data", - "description": "The rollup search endpoint is needed because, internally, rolled-up documents utilize a different document structure than the original data.\nIt rewrites standard Query DSL into a format that matches the rollup documents then takes the response and rewrites it back to what a client would expect given the original query.\n\nThe request body supports a subset of features from the regular search API.\nThe following functionality is not available:\n\n`size`: Because rollups work on pre-aggregated data, no search hits can be returned and so size must be set to zero or omitted entirely.\n`highlighter`, `suggestors`, `post_filter`, `profile`, `explain`: These are similarly disallowed.\n\n**Searching both historical rollup and non-rollup data**\n\nThe rollup search API has the capability to search across both \"live\" non-rollup data and the aggregated rollup data.\nThis is done by simply adding the live indices to the URI. For example:\n\n```\nGET sensor-1,sensor_rollup/_rollup_search\n{\n \"size\": 0,\n \"aggregations\": {\n \"max_temperature\": {\n \"max\": {\n \"field\": \"temperature\"\n }\n }\n }\n}\n```\n\nThe rollup search endpoint does two things when the search runs:\n\n* The original request is sent to the non-rollup index unaltered.\n* A rewritten version of the original request is sent to the rollup index.\n\nWhen the two responses are received, the endpoint rewrites the rollup response and merges the two together.\nDuring the merging process, if there is any overlap in buckets between the two responses, the buckets from the non-rollup index are used.", + "description": "The rollup search endpoint is needed because, internally, rolled-up documents utilize a different document structure than the original data.\nIt rewrites standard Query DSL into a format that matches the rollup documents then takes the response and rewrites it back to what a client would expect given the original query.\n\nThe request body supports a subset of features from the regular search API.\nThe following functionality is not available:\n\n`size`: Because rollups work on pre-aggregated data, no search hits can be returned and so size must be set to zero or omitted entirely.\n`highlighter`, `suggestors`, `post_filter`, `profile`, `explain`: These are similarly disallowed.\n\nFor more detailed examples of using the rollup search API, including querying rolled-up data only or combining rolled-up and live data, refer to the External documentation.", + "externalDocs": { + "url": "https://www.elastic.co/docs/manage-data/lifecycle/rollup/getting-started-api#historical-only-search-example", + "x-previousVersionUrl": "https://www.elastic.co/guide/en/elasticsearch/reference/8.18/rollup-search.html" + }, "operationId": "rollup-rollup-search", "parameters": [ { @@ -31630,14 +35044,23 @@ }, "deprecated": true, "x-state": "Technical preview; Added in 6.3.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] }, "post": { "tags": [ "rollup" ], "summary": "Search rolled-up data", - "description": "The rollup search endpoint is needed because, internally, rolled-up documents utilize a different document structure than the original data.\nIt rewrites standard Query DSL into a format that matches the rollup documents then takes the response and rewrites it back to what a client would expect given the original query.\n\nThe request body supports a subset of features from the regular search API.\nThe following functionality is not available:\n\n`size`: Because rollups work on pre-aggregated data, no search hits can be returned and so size must be set to zero or omitted entirely.\n`highlighter`, `suggestors`, `post_filter`, `profile`, `explain`: These are similarly disallowed.\n\n**Searching both historical rollup and non-rollup data**\n\nThe rollup search API has the capability to search across both \"live\" non-rollup data and the aggregated rollup data.\nThis is done by simply adding the live indices to the URI. For example:\n\n```\nGET sensor-1,sensor_rollup/_rollup_search\n{\n \"size\": 0,\n \"aggregations\": {\n \"max_temperature\": {\n \"max\": {\n \"field\": \"temperature\"\n }\n }\n }\n}\n```\n\nThe rollup search endpoint does two things when the search runs:\n\n* The original request is sent to the non-rollup index unaltered.\n* A rewritten version of the original request is sent to the rollup index.\n\nWhen the two responses are received, the endpoint rewrites the rollup response and merges the two together.\nDuring the merging process, if there is any overlap in buckets between the two responses, the buckets from the non-rollup index are used.", + "description": "The rollup search endpoint is needed because, internally, rolled-up documents utilize a different document structure than the original data.\nIt rewrites standard Query DSL into a format that matches the rollup documents then takes the response and rewrites it back to what a client would expect given the original query.\n\nThe request body supports a subset of features from the regular search API.\nThe following functionality is not available:\n\n`size`: Because rollups work on pre-aggregated data, no search hits can be returned and so size must be set to zero or omitted entirely.\n`highlighter`, `suggestors`, `post_filter`, `profile`, `explain`: These are similarly disallowed.\n\nFor more detailed examples of using the rollup search API, including querying rolled-up data only or combining rolled-up and live data, refer to the External documentation.", + "externalDocs": { + "url": "https://www.elastic.co/docs/manage-data/lifecycle/rollup/getting-started-api#historical-only-search-example", + "x-previousVersionUrl": "https://www.elastic.co/guide/en/elasticsearch/reference/8.18/rollup-search.html" + }, "operationId": "rollup-rollup-search-1", "parameters": [ { @@ -31660,7 +35083,12 @@ }, "deprecated": true, "x-state": "Technical preview; Added in 6.3.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_rollup/job/{id}/_start": { @@ -31712,7 +35140,12 @@ }, "deprecated": true, "x-state": "Technical preview; Added in 6.3.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_rollup/job/{id}/_stop": { @@ -31778,7 +35211,12 @@ }, "deprecated": true, "x-state": "Technical preview; Added in 6.3.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_scripts/painless/_execute": { @@ -31798,7 +35236,12 @@ } }, "x-state": "Technical preview; Added in 6.3.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] }, "post": { "tags": [ @@ -31816,7 +35259,12 @@ } }, "x-state": "Technical preview; Added in 6.3.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_search": { @@ -31971,7 +35419,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] }, "post": { "tags": [ @@ -32124,7 +35577,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/{index}/_search": { @@ -32282,7 +35740,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] }, "post": { "tags": [ @@ -32438,7 +35901,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_application/search_application/{name}": { @@ -32481,7 +35949,12 @@ } }, "x-state": "Beta; Added in 8.8.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] }, "put": { "tags": [ @@ -32550,7 +36023,12 @@ } }, "x-state": "Beta; Added in 8.8.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] }, "delete": { "tags": [ @@ -32585,7 +36063,12 @@ } }, "x-state": "Beta; Added in 8.8.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_application/analytics/{name}": { @@ -32607,7 +36090,12 @@ }, "deprecated": true, "x-state": "Technical preview; Added in 8.8.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] }, "put": { "tags": [ @@ -32642,7 +36130,12 @@ }, "deprecated": true, "x-state": "Technical preview; Added in 8.8.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] }, "delete": { "tags": [ @@ -32678,7 +36171,12 @@ }, "deprecated": true, "x-state": "Technical preview; Added in 8.8.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_application/analytics": { @@ -32695,7 +36193,12 @@ }, "deprecated": true, "x-state": "Technical preview; Added in 8.8.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_application/search_application": { @@ -32772,7 +36275,12 @@ } }, "x-state": "Beta; Added in 8.8.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_application/analytics/{collection_name}/event/{event_type}": { @@ -32861,7 +36369,12 @@ }, "deprecated": true, "x-state": "Technical preview", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_application/search_application/{name}/_render_query": { @@ -32927,7 +36440,12 @@ } }, "x-state": "Technical preview; Added in 8.9.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_application/search_application/{name}/_search": { @@ -32955,7 +36473,12 @@ } }, "x-state": "Beta; Added in 8.8.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] }, "post": { "tags": [ @@ -32981,7 +36504,12 @@ } }, "x-state": "Beta; Added in 8.8.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/{index}/_mvt/{field}/{zoom}/{x}/{y}": { @@ -33030,6 +36558,9 @@ { "$ref": "#/components/parameters/search_mvt-size" }, + { + "$ref": "#/components/parameters/search_mvt-track_total_hits" + }, { "$ref": "#/components/parameters/search_mvt-with_labels" } @@ -33043,7 +36574,12 @@ } }, "x-state": "Generally available; Added in 7.15.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] }, "post": { "tags": [ @@ -33090,6 +36626,9 @@ { "$ref": "#/components/parameters/search_mvt-size" }, + { + "$ref": "#/components/parameters/search_mvt-track_total_hits" + }, { "$ref": "#/components/parameters/search_mvt-with_labels" } @@ -33103,7 +36642,12 @@ } }, "x-state": "Generally available; Added in 7.15.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_search_shards": { @@ -33143,7 +36687,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] }, "post": { "tags": [ @@ -33181,7 +36730,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/{index}/_search_shards": { @@ -33224,7 +36778,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] }, "post": { "tags": [ @@ -33265,7 +36824,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_search/template": { @@ -33330,7 +36894,12 @@ } }, "x-state": "Generally available; Added in 2.0.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] }, "post": { "tags": [ @@ -33393,7 +36962,12 @@ } }, "x-state": "Generally available; Added in 2.0.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/{index}/_search/template": { @@ -33461,7 +37035,12 @@ } }, "x-state": "Generally available; Added in 2.0.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] }, "post": { "tags": [ @@ -33527,7 +37106,12 @@ } }, "x-state": "Generally available; Added in 2.0.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_searchable_snapshots/cache/stats": { @@ -33553,7 +37137,12 @@ } }, "x-state": "Technical preview; Added in 7.13.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_searchable_snapshots/{node_id}/cache/stats": { @@ -33582,7 +37171,12 @@ } }, "x-state": "Technical preview; Added in 7.13.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_searchable_snapshots/cache/clear": { @@ -33614,7 +37208,12 @@ } }, "x-state": "Technical preview; Added in 7.10.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/{index}/_searchable_snapshots/cache/clear": { @@ -33649,7 +37248,12 @@ } }, "x-state": "Technical preview; Added in 7.10.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_snapshot/{repository}/{snapshot}/_mount": { @@ -33776,7 +37380,12 @@ } }, "x-state": "Generally available; Added in 7.10.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_searchable_snapshots/stats": { @@ -33798,7 +37407,12 @@ } }, "x-state": "Generally available; Added in 7.10.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/{index}/_searchable_snapshots/stats": { @@ -33823,7 +37437,12 @@ } }, "x-state": "Generally available; Added in 7.10.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_security/profile/_activate": { @@ -33889,7 +37508,12 @@ } }, "x-state": "Generally available; Added in 8.2.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_security/_authenticate": { @@ -33982,7 +37606,12 @@ } }, "x-state": "Generally available; Added in 5.5.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_security/role": { @@ -33999,7 +37628,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] }, "post": { "tags": [ @@ -34110,7 +37744,12 @@ } }, "x-state": "Generally available; Added in 8.15.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] }, "delete": { "tags": [ @@ -34209,7 +37848,12 @@ } }, "x-state": "Generally available; Added in 8.15.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_security/api_key/_bulk_update": { @@ -34312,7 +37956,12 @@ } }, "x-state": "Generally available; Added in 8.5.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_security/user/{username}/_password": { @@ -34340,7 +37989,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] }, "post": { "tags": [ @@ -34366,7 +38020,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_security/user/_password": { @@ -34391,7 +38050,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] }, "post": { "tags": [ @@ -34414,7 +38078,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_security/api_key/{ids}/_clear_cache": { @@ -34470,7 +38139,12 @@ } }, "x-state": "Generally available; Added in 7.10.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_security/privilege/{application}/_clear_cache": { @@ -34526,7 +38200,12 @@ } }, "x-state": "Generally available; Added in 7.9.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_security/realm/{realms}/_clear_cache": { @@ -34599,7 +38278,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_security/role/{name}/_clear_cache": { @@ -34655,7 +38339,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_security/service/{namespace}/{service}/credential/token/{name}/_clear_cache": { @@ -34737,7 +38426,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_security/api_key": { @@ -34807,6 +38501,7 @@ "schema": { "type": "boolean" }, + "x-state": "Generally available; Added in 8.5.0", "style": "form" }, { @@ -34817,6 +38512,7 @@ "schema": { "type": "boolean" }, + "x-state": "Generally available; Added in 8.10.0", "style": "form" }, { @@ -34827,6 +38523,7 @@ "schema": { "type": "boolean" }, + "x-state": "Generally available; Added in 8.14.0", "style": "form" } ], @@ -34866,7 +38563,12 @@ } }, "x-state": "Generally available; Added in 6.7.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] }, "put": { "tags": [ @@ -34893,7 +38595,12 @@ } }, "x-state": "Generally available; Added in 6.7.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] }, "post": { "tags": [ @@ -34920,7 +38627,12 @@ } }, "x-state": "Generally available; Added in 6.7.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] }, "delete": { "tags": [ @@ -34950,6 +38662,7 @@ }, "owner": { "description": "Query API keys owned by the currently authenticated user.\nThe `realm_name` or `username` parameters cannot be specified when this parameter is set to `true` as they are assumed to be the currently authenticated ones.\n\nNOTE: At least one of `ids`, `name`, `username`, and `realm_name` must be specified if `owner` is `false`.", + "default": false, "type": "boolean" }, "realm_name": { @@ -35048,7 +38761,12 @@ } }, "x-state": "Generally available; Added in 6.7.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_security/cross_cluster/api_key": { @@ -35141,7 +38859,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_security/service/{namespace}/{service}/credential/token/{name}": { @@ -35176,7 +38899,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] }, "post": { "tags": [ @@ -35209,7 +38937,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] }, "delete": { "tags": [ @@ -35295,7 +39028,12 @@ } }, "x-state": "Generally available; Added in 5.5.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_security/service/{namespace}/{service}/credential/token": { @@ -35327,7 +39065,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_security/delegate_pki": { @@ -35411,7 +39154,12 @@ } }, "x-state": "Generally available; Added in 7.4.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_security/privilege/{application}/{name}": { @@ -35440,7 +39188,12 @@ } }, "x-state": "Generally available; Added in 6.4.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] }, "delete": { "tags": [ @@ -35512,7 +39265,12 @@ } }, "x-state": "Generally available; Added in 6.4.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_security/role/{name}": { @@ -35534,7 +39292,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] }, "put": { "tags": [ @@ -35564,7 +39327,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] }, "post": { "tags": [ @@ -35594,7 +39362,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] }, "delete": { "tags": [ @@ -35654,7 +39427,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_security/role_mapping/{name}": { @@ -35680,7 +39458,12 @@ } }, "x-state": "Generally available; Added in 5.5.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] }, "put": { "tags": [ @@ -35710,7 +39493,12 @@ } }, "x-state": "Generally available; Added in 5.5.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] }, "post": { "tags": [ @@ -35740,7 +39528,12 @@ } }, "x-state": "Generally available; Added in 5.5.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] }, "delete": { "tags": [ @@ -35804,7 +39597,12 @@ } }, "x-state": "Generally available; Added in 5.5.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_security/user/{username}": { @@ -35829,7 +39627,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] }, "put": { "tags": [ @@ -35855,7 +39658,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] }, "post": { "tags": [ @@ -35881,7 +39689,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] }, "delete": { "tags": [ @@ -35941,7 +39754,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_security/user/{username}/_disable": { @@ -35966,7 +39784,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] }, "post": { "tags": [ @@ -35989,7 +39812,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_security/profile/{uid}/_disable": { @@ -36014,7 +39842,12 @@ } }, "x-state": "Generally available; Added in 8.2.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] }, "post": { "tags": [ @@ -36037,7 +39870,12 @@ } }, "x-state": "Generally available; Added in 8.2.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_security/user/{username}/_enable": { @@ -36062,7 +39900,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] }, "post": { "tags": [ @@ -36085,7 +39928,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_security/profile/{uid}/_enable": { @@ -36110,7 +39958,12 @@ } }, "x-state": "Generally available; Added in 8.2.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] }, "post": { "tags": [ @@ -36133,7 +39986,12 @@ } }, "x-state": "Generally available; Added in 8.2.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_security/enroll/kibana": { @@ -36176,7 +40034,12 @@ } }, "x-state": "Generally available; Added in 8.0.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_security/enroll/node": { @@ -36243,7 +40106,12 @@ } }, "x-state": "Generally available; Added in 8.0.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_security/privilege/_builtin": { @@ -36306,7 +40174,12 @@ } }, "x-state": "Generally available; Added in 7.3.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_security/privilege": { @@ -36327,7 +40200,12 @@ } }, "x-state": "Generally available; Added in 6.4.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] }, "put": { "tags": [ @@ -36354,7 +40232,12 @@ } }, "x-state": "Generally available; Added in 6.4.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] }, "post": { "tags": [ @@ -36381,7 +40264,12 @@ } }, "x-state": "Generally available; Added in 6.4.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_security/privilege/{application}": { @@ -36407,7 +40295,12 @@ } }, "x-state": "Generally available; Added in 6.4.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_security/role_mapping": { @@ -36428,7 +40321,12 @@ } }, "x-state": "Generally available; Added in 5.5.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_security/service/{namespace}/{service}": { @@ -36457,7 +40355,12 @@ } }, "x-state": "Generally available; Added in 7.13.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_security/service/{namespace}": { @@ -36483,7 +40386,12 @@ } }, "x-state": "Generally available; Added in 7.13.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_security/service": { @@ -36504,7 +40412,12 @@ } }, "x-state": "Generally available; Added in 7.13.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_security/service/{namespace}/{service}/credential": { @@ -36585,7 +40498,12 @@ } }, "x-state": "Generally available; Added in 7.13.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_security/settings": { @@ -36637,7 +40555,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] }, "put": { "tags": [ @@ -36716,7 +40639,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_security/oauth2/token": { @@ -36830,7 +40758,12 @@ } }, "x-state": "Generally available; Added in 5.5.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] }, "delete": { "tags": [ @@ -36937,7 +40870,12 @@ } }, "x-state": "Generally available; Added in 5.5.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_security/user": { @@ -36959,7 +40897,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_security/user/_privileges": { @@ -36970,45 +40913,6 @@ "summary": "Get user privileges", "description": "Get the security privileges for the logged in user.\nAll users can use this API, but only to determine their own privileges.\nTo check the privileges of other users, you must use the run as feature.\nTo check whether a user has a specific list of privileges, use the has privileges API.", "operationId": "security-get-user-privileges", - "parameters": [ - { - "in": "query", - "name": "application", - "description": "The name of the application. Application privileges are always associated with exactly one application. If you do not specify this parameter, the API returns information about all privileges for all applications.", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Name" - }, - "style": "form" - }, - { - "in": "query", - "name": "priviledge", - "description": "The name of the privilege. If you do not specify this parameter, the API returns information about all privileges for the requested application.", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Name" - }, - "style": "form" - }, - { - "in": "query", - "name": "username", - "deprecated": false, - "schema": { - "oneOf": [ - { - "$ref": "#/components/schemas/_types.Name" - }, - { - "nullable": true, - "type": "string" - } - ] - }, - "style": "form" - } - ], "responses": { "200": { "description": "", @@ -37079,7 +40983,12 @@ } }, "x-state": "Generally available; Added in 6.5.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_security/profile/{uid}": { @@ -37178,7 +41087,12 @@ } }, "x-state": "Generally available; Added in 8.2.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_security/api_key/grant": { @@ -37189,6 +41103,18 @@ "summary": "Grant an API key", "description": "Create an API key on behalf of another user.\nThis API is similar to the create API keys API, however it creates the API key for a user that is different than the user that runs the API.\nThe caller must have authentication credentials for the user on whose behalf the API key will be created.\nIt is not possible to use this API to create an API key without that user's credentials.\nThe supported user authentication credential types are:\n\n* username and password\n* Elasticsearch access tokens\n* JWTs\n\nThe user, for whom the authentication credentials is provided, can optionally \"run as\" (impersonate) another user.\nIn this case, the API key will be created on behalf of the impersonated user.\n\nThis API is intended be used by applications that need to create and manage API keys for end users, but cannot guarantee that those users have permission to create API keys on their own behalf.\nThe API keys are created by the Elasticsearch API key service, which is automatically enabled.\n\nA successful grant API key API call returns a JSON structure that contains the API key, its unique id, and its name.\nIf applicable, it also returns expiration information for the API key in milliseconds.\n\nBy default, API keys never expire. You can specify expiration information when you create the API keys.\n\n## Required authorization\n\n* Cluster privileges: `grant_api_key`\n", "operationId": "security-grant-api-key", + "parameters": [ + { + "in": "query", + "name": "refresh", + "description": "If 'true', Elasticsearch refreshes the affected shards to make this operation\nvisible to search.\nIf 'wait_for', it waits for a refresh to make this operation visible to search.\nIf 'false', nothing is done with refreshes.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Refresh" + }, + "style": "form" + } + ], "requestBody": { "content": { "application/json": { @@ -37272,7 +41198,12 @@ } }, "x-state": "Generally available; Added in 7.9.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_security/user/_has_privileges": { @@ -37296,7 +41227,12 @@ } }, "x-state": "Generally available; Added in 6.4.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] }, "post": { "tags": [ @@ -37318,7 +41254,12 @@ } }, "x-state": "Generally available; Added in 6.4.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_security/user/{user}/_has_privileges": { @@ -37347,7 +41288,12 @@ } }, "x-state": "Generally available; Added in 6.4.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] }, "post": { "tags": [ @@ -37374,7 +41320,12 @@ } }, "x-state": "Generally available; Added in 6.4.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_security/profile/_has_privileges": { @@ -37398,7 +41349,12 @@ } }, "x-state": "Generally available; Added in 8.3.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] }, "post": { "tags": [ @@ -37420,7 +41376,12 @@ } }, "x-state": "Generally available; Added in 8.3.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_security/oidc/authenticate": { @@ -37513,7 +41474,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_security/oidc/logout": { @@ -37581,7 +41547,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_security/oidc/prepare": { @@ -37681,7 +41652,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_security/_query/api_key": { @@ -37716,7 +41692,12 @@ } }, "x-state": "Generally available; Added in 7.15.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] }, "post": { "tags": [ @@ -37749,7 +41730,12 @@ } }, "x-state": "Generally available; Added in 7.15.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_security/_query/role": { @@ -37769,7 +41755,12 @@ } }, "x-state": "Generally available; Added in 8.15.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] }, "post": { "tags": [ @@ -37787,7 +41778,12 @@ } }, "x-state": "Generally available; Added in 8.15.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_security/_query/user": { @@ -37812,7 +41808,12 @@ } }, "x-state": "Generally available; Added in 8.14.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] }, "post": { "tags": [ @@ -37835,7 +41836,12 @@ } }, "x-state": "Generally available; Added in 8.14.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_security/saml/authenticate": { @@ -37931,7 +41937,12 @@ } }, "x-state": "Generally available; Added in 7.5.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_security/saml/complete_logout": { @@ -37998,7 +42009,12 @@ } }, "x-state": "Generally available; Added in 7.14.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_security/saml/invalidate": { @@ -38084,7 +42100,12 @@ } }, "x-state": "Generally available; Added in 7.5.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_security/saml/logout": { @@ -38156,7 +42177,12 @@ } }, "x-state": "Generally available; Added in 7.5.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_security/saml/prepare": { @@ -38244,7 +42270,12 @@ } }, "x-state": "Generally available; Added in 7.5.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_security/saml/metadata/{realm_name}": { @@ -38296,7 +42327,12 @@ } }, "x-state": "Generally available; Added in 7.11.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_security/profile/_suggest": { @@ -38321,7 +42357,12 @@ } }, "x-state": "Generally available; Added in 8.2.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] }, "post": { "tags": [ @@ -38344,7 +42385,12 @@ } }, "x-state": "Generally available; Added in 8.2.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_security/api_key/{id}": { @@ -38433,7 +42479,12 @@ } }, "x-state": "Generally available; Added in 8.4.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_security/cross_cluster/api_key/{id}": { @@ -38519,7 +42570,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_security/profile/{uid}/_data": { @@ -38553,7 +42609,12 @@ } }, "x-state": "Generally available; Added in 8.2.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] }, "post": { "tags": [ @@ -38585,7 +42646,12 @@ } }, "x-state": "Generally available; Added in 8.2.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_nodes/{node_id}/shutdown": { @@ -38610,7 +42676,12 @@ } }, "x-state": "Generally available; Added in 7.13.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] }, "put": { "tags": [ @@ -38702,7 +42773,12 @@ } }, "x-state": "Generally available; Added in 7.13.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] }, "delete": { "tags": [ @@ -38763,7 +42839,12 @@ } }, "x-state": "Generally available; Added in 7.13.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_nodes/shutdown": { @@ -38785,7 +42866,12 @@ } }, "x-state": "Generally available; Added in 7.13.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_ingest/_simulate": { @@ -38810,7 +42896,12 @@ } }, "x-state": "Technical preview; Added in 8.12.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] }, "post": { "tags": [ @@ -38833,7 +42924,12 @@ } }, "x-state": "Technical preview; Added in 8.12.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_ingest/{index}/_simulate": { @@ -38861,7 +42957,12 @@ } }, "x-state": "Technical preview; Added in 8.12.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] }, "post": { "tags": [ @@ -38887,7 +42988,12 @@ } }, "x-state": "Technical preview; Added in 8.12.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_slm/policy/{policy_id}": { @@ -38915,7 +43021,12 @@ } }, "x-state": "Generally available; Added in 7.4.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] }, "put": { "tags": [ @@ -39009,7 +43120,12 @@ } }, "x-state": "Generally available; Added in 7.4.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] }, "delete": { "tags": [ @@ -39064,7 +43180,12 @@ } }, "x-state": "Generally available; Added in 7.4.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_slm/policy/{policy_id}/_execute": { @@ -39135,7 +43256,12 @@ } }, "x-state": "Generally available; Added in 7.4.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_slm/_execute_retention": { @@ -39181,7 +43307,12 @@ } }, "x-state": "Generally available; Added in 7.5.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_slm/policy": { @@ -39206,7 +43337,12 @@ } }, "x-state": "Generally available; Added in 7.4.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_slm/stats": { @@ -39305,7 +43441,12 @@ } }, "x-state": "Generally available; Added in 7.5.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_slm/status": { @@ -39365,7 +43506,12 @@ } }, "x-state": "Generally available; Added in 7.6.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_slm/start": { @@ -39417,7 +43563,12 @@ } }, "x-state": "Generally available; Added in 7.6.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_slm/stop": { @@ -39463,7 +43614,12 @@ } }, "x-state": "Generally available; Added in 7.6.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_snapshot/{repository}/_cleanup": { @@ -39538,7 +43694,12 @@ } }, "x-state": "Generally available; Added in 7.4.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_snapshot/{repository}/{snapshot}/_clone/{target_snapshot}": { @@ -39632,7 +43793,12 @@ } }, "x-state": "Generally available; Added in 7.10.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_snapshot/{repository}/{snapshot}": { @@ -39674,6 +43840,7 @@ "schema": { "type": "string" }, + "x-state": "Generally available; Added in 7.14.0", "style": "form" }, { @@ -39684,6 +43851,7 @@ "schema": { "type": "string" }, + "x-state": "Generally available; Added in 7.16.0", "style": "form" }, { @@ -39704,6 +43872,7 @@ "schema": { "type": "boolean" }, + "x-state": "Generally available; Added in 7.13.0", "style": "form" }, { @@ -39714,6 +43883,7 @@ "schema": { "type": "boolean" }, + "x-state": "Generally available; Added in 8.3.0", "style": "form" }, { @@ -39744,6 +43914,7 @@ "schema": { "$ref": "#/components/schemas/_types.SortOrder" }, + "x-state": "Generally available; Added in 7.14.0", "style": "form" }, { @@ -39754,6 +43925,7 @@ "schema": { "type": "number" }, + "x-state": "Generally available; Added in 7.15.0", "style": "form" }, { @@ -39764,6 +43936,7 @@ "schema": { "type": "number" }, + "x-state": "Generally available; Added in 7.14.0", "style": "form" }, { @@ -39774,6 +43947,7 @@ "schema": { "$ref": "#/components/schemas/_types.Name" }, + "x-state": "Generally available; Added in 7.16.0", "style": "form" }, { @@ -39784,6 +43958,7 @@ "schema": { "$ref": "#/components/schemas/snapshot._types.SnapshotSort" }, + "x-state": "Generally available; Added in 7.14.0", "style": "form" }, { @@ -39804,6 +43979,7 @@ } ] }, + "x-state": "Generally available; Added in 9.1.0", "style": "form" }, { @@ -39868,7 +44044,12 @@ } }, "x-state": "Generally available; Added in 0.0.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] }, "put": { "tags": [ @@ -39904,7 +44085,12 @@ } }, "x-state": "Generally available; Added in 0.0.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] }, "post": { "tags": [ @@ -39940,7 +44126,12 @@ } }, "x-state": "Generally available; Added in 0.0.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] }, "delete": { "tags": [ @@ -39981,6 +44172,16 @@ "$ref": "#/components/schemas/_types.Duration" }, "style": "form" + }, + { + "in": "query", + "name": "wait_for_completion", + "description": "If `true`, the request returns a response when the matching snapshots are all deleted.\nIf `false`, the request returns a response as soon as the deletes are scheduled.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" } ], "responses": { @@ -40002,7 +44203,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_snapshot/{repository}": { @@ -40030,7 +44236,12 @@ } }, "x-state": "Generally available; Added in 0.0.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] }, "put": { "tags": [ @@ -40066,7 +44277,12 @@ } }, "x-state": "Generally available; Added in 0.0.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] }, "post": { "tags": [ @@ -40102,7 +44318,12 @@ } }, "x-state": "Generally available; Added in 0.0.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] }, "delete": { "tags": [ @@ -40157,7 +44378,12 @@ } }, "x-state": "Generally available; Added in 0.0.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_snapshot": { @@ -40182,7 +44408,12 @@ } }, "x-state": "Generally available; Added in 0.0.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_snapshot/{repository}/_analyze": { @@ -40437,7 +44668,12 @@ } }, "x-state": "Generally available; Added in 7.12.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_snapshot/{repository}/_verify_integrity": { @@ -40554,7 +44790,12 @@ } }, "x-state": "Technical preview; Added in 8.16.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_snapshot/{repository}/{snapshot}/_restore": { @@ -40638,14 +44879,17 @@ }, "ignore_unavailable": { "description": "If `true`, the request ignores any index or data stream in indices that's missing from the snapshot.\nIf `false`, the request returns an error for any missing index or data stream.", + "default": false, "type": "boolean" }, "include_aliases": { "description": "If `true`, the request restores aliases for any restored data streams and indices.\nIf `false`, the request doesn’t restore aliases.", + "default": true, "type": "boolean" }, "include_global_state": { "description": "If `true`, restore the cluster state. The cluster state includes:\n\n* Persistent cluster settings\n* Index templates\n* Legacy index templates\n* Ingest pipelines\n* Index lifecycle management (ILM) policies\n* Stored scripts\n* For snapshots taken after 7.12.0, feature states\n\nIf `include_global_state` is `true`, the restore operation merges the legacy index templates in your cluster with the templates contained in the snapshot, replacing any existing ones whose name matches one in the snapshot.\nIt completely removes all persistent settings, non-legacy index templates, ingest pipelines, and ILM lifecycle policies that exist in your cluster and replaces them with the corresponding items from the snapshot.\n\nUse the `feature_states` parameter to configure how feature states are restored.\n\nIf `include_global_state` is `true` and a snapshot was created without a global state then the restore request will fail.", + "default": false, "type": "boolean" }, "index_settings": { @@ -40656,6 +44900,7 @@ }, "partial": { "description": "If `false`, the entire restore operation will fail if one or more indices included in the snapshot do not have all primary shards available.\n\nIf true, it allows restoring a partial snapshot of indices with unavailable shards.\nOnly shards that were successfully included in the snapshot will be restored.\nAll missing shards will be recreated as empty.", + "default": false, "type": "boolean" }, "rename_pattern": { @@ -40707,7 +44952,12 @@ } }, "x-state": "Generally available; Added in 0.0.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_snapshot/_status": { @@ -40732,7 +44982,12 @@ } }, "x-state": "Generally available; Added in 7.8.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_snapshot/{repository}/_status": { @@ -40760,7 +45015,12 @@ } }, "x-state": "Generally available; Added in 7.8.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_snapshot/{repository}/{snapshot}/_status": { @@ -40791,7 +45051,12 @@ } }, "x-state": "Generally available; Added in 7.8.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_snapshot/{repository}/_verify": { @@ -40864,7 +45129,12 @@ } }, "x-state": "Generally available; Added in 0.0.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_sql/close": { @@ -40920,7 +45190,12 @@ } }, "x-state": "Generally available; Added in 6.3.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_sql/async/delete/{id}": { @@ -40957,7 +45232,12 @@ } }, "x-state": "Generally available; Added in 7.15.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_sql/async/{id}": { @@ -41071,7 +45351,12 @@ } }, "x-state": "Generally available; Added in 7.15.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_sql/async/status/{id}": { @@ -41138,7 +45423,12 @@ } }, "x-state": "Generally available; Added in 7.15.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_sql": { @@ -41163,7 +45453,12 @@ } }, "x-state": "Generally available; Added in 6.3.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] }, "post": { "tags": [ @@ -41186,7 +45481,12 @@ } }, "x-state": "Generally available; Added in 6.3.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_sql/translate": { @@ -41206,7 +45506,12 @@ } }, "x-state": "Generally available; Added in 6.3.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] }, "post": { "tags": [ @@ -41224,7 +45529,12 @@ } }, "x-state": "Generally available; Added in 6.3.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_ssl/certificates": { @@ -41261,7 +45571,12 @@ } }, "x-state": "Generally available; Added in 6.2.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_synonyms/{id}": { @@ -41341,14 +45656,23 @@ } }, "x-state": "Generally available; Added in 8.10.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] }, "put": { "tags": [ "synonyms" ], "summary": "Create or update a synonym set", - "description": "Synonyms sets are limited to a maximum of 10,000 synonym rules per set.\nIf you need to manage more synonym rules, you can create multiple synonym sets.\n\nWhen an existing synonyms set is updated, the search analyzers that use the synonyms set are reloaded automatically for all indices.\nThis is equivalent to invoking the reload search analyzers API for all indices that use the synonyms set.\n\n## Required authorization\n\n* Cluster privileges: `manage_search_synonyms`\n", + "description": "Synonyms sets are limited to a maximum of 10,000 synonym rules per set.\nIf you need to manage more synonym rules, you can create multiple synonym sets.\n\nWhen an existing synonyms set is updated, the search analyzers that use the synonyms set are reloaded automatically for all indices.\nThis is equivalent to invoking the reload search analyzers API for all indices that use the synonyms set.\n\nFor practical examples of how to create or update a synonyms set, refer to the External documentation.\n\n## Required authorization\n\n* Cluster privileges: `manage_search_synonyms`\n", + "externalDocs": { + "url": "https://www.elastic.co/docs/solutions/search/full-text/create-update-synonyms-api-example", + "x-previousVersionUrl": "https://www.elastic.co/guide/en/elasticsearch/reference/8.18/put-synonyms-set.html" + }, "operationId": "synonyms-put-synonym", "parameters": [ { @@ -41370,6 +45694,7 @@ "schema": { "type": "boolean" }, + "x-state": "Generally available; Added in 9.1.0", "style": "form" } ], @@ -41426,7 +45751,12 @@ } }, "x-state": "Generally available; Added in 8.10.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] }, "delete": { "tags": [ @@ -41461,7 +45791,12 @@ } }, "x-state": "Generally available; Added in 8.10.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_synonyms/{set_id}/{rule_id}": { @@ -41515,7 +45850,12 @@ } }, "x-state": "Generally available; Added in 8.10.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] }, "put": { "tags": [ @@ -41555,6 +45895,7 @@ "schema": { "type": "boolean" }, + "x-state": "Generally available; Added in 9.1.0", "style": "form" } ], @@ -41602,7 +45943,12 @@ } }, "x-state": "Generally available; Added in 8.10.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] }, "delete": { "tags": [ @@ -41642,6 +45988,7 @@ "schema": { "type": "boolean" }, + "x-state": "Generally available; Added in 9.1.0", "style": "form" } ], @@ -41664,7 +46011,12 @@ } }, "x-state": "Generally available; Added in 8.10.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_synonyms": { @@ -41733,7 +46085,12 @@ } }, "x-state": "Generally available; Added in 8.10.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_tasks/_cancel": { @@ -41764,7 +46121,12 @@ } }, "x-state": "Technical preview; Added in 2.3.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_tasks/{task_id}/_cancel": { @@ -41798,7 +46160,12 @@ } }, "x-state": "Technical preview; Added in 2.3.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_tasks/{task_id}": { @@ -41885,7 +46252,12 @@ } }, "x-state": "Technical preview; Added in 5.0.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_tasks": { @@ -41997,7 +46369,12 @@ } }, "x-state": "Technical preview; Added in 2.3.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/{index}/_terms_enum": { @@ -42022,7 +46399,12 @@ } }, "x-state": "Generally available; Added in 7.14.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] }, "post": { "tags": [ @@ -42045,7 +46427,12 @@ } }, "x-state": "Generally available; Added in 7.14.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/{index}/_termvectors/{id}": { @@ -42110,7 +46497,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] }, "post": { "tags": [ @@ -42173,7 +46565,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/{index}/_termvectors": { @@ -42235,7 +46632,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] }, "post": { "tags": [ @@ -42295,7 +46697,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_text_structure/find_field_structure": { @@ -42536,7 +46943,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_text_structure/find_message_structure": { @@ -42591,7 +47003,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] }, "post": { "tags": [ @@ -42644,7 +47061,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_text_structure/find_structure": { @@ -42955,7 +47377,12 @@ } }, "x-state": "Generally available; Added in 7.13.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_text_structure/test_grok_pattern": { @@ -42984,7 +47411,12 @@ } }, "x-state": "Generally available; Added in 8.13.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] }, "post": { "tags": [ @@ -43011,7 +47443,12 @@ } }, "x-state": "Generally available; Added in 8.13.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_transform/{transform_id}": { @@ -43045,7 +47482,12 @@ } }, "x-state": "Generally available; Added in 7.5.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] }, "put": { "tags": [ @@ -43165,7 +47607,12 @@ } }, "x-state": "Generally available; Added in 7.2.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] }, "delete": { "tags": [ @@ -43236,7 +47683,12 @@ } }, "x-state": "Generally available; Added in 7.5.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_transform": { @@ -43267,7 +47719,12 @@ } }, "x-state": "Generally available; Added in 7.5.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_transform/{transform_id}/_stats": { @@ -43365,7 +47822,12 @@ } }, "x-state": "Generally available; Added in 7.5.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_transform/{transform_id}/_preview": { @@ -43393,7 +47855,12 @@ } }, "x-state": "Generally available; Added in 7.2.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] }, "post": { "tags": [ @@ -43419,7 +47886,12 @@ } }, "x-state": "Generally available; Added in 7.2.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_transform/_preview": { @@ -43444,7 +47916,12 @@ } }, "x-state": "Generally available; Added in 7.2.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] }, "post": { "tags": [ @@ -43467,7 +47944,12 @@ } }, "x-state": "Generally available; Added in 7.2.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_transform/{transform_id}/_reset": { @@ -43530,7 +48012,12 @@ } }, "x-state": "Generally available; Added in 8.1.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_transform/{transform_id}/_schedule_now": { @@ -43583,7 +48070,12 @@ } }, "x-state": "Generally available; Added in 8.7.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_transform/{transform_id}/_start": { @@ -43646,7 +48138,12 @@ } }, "x-state": "Generally available; Added in 7.5.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_transform/{transform_id}/_stop": { @@ -43739,7 +48236,12 @@ } }, "x-state": "Generally available; Added in 7.5.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_transform/{transform_id}/_update": { @@ -43828,7 +48330,7 @@ "examples": { "UpdateTransformRequestExample1": { "description": "Run `POST _transform/simple-kibana-ecomm-pivot/_update` to update a transform that uses the pivot method.", - "value": "{\n \"source\": {\n \"index\": \"kibana_sample_data_ecommerce\",\n \"query\": {\n \"term\": {\n \"geoip.continent_name\": {\n \"value\": \"Asia\"\n }\n }\n }\n },\n \"pivot\": {\n \"group_by\": {\n \"customer_id\": {\n \"terms\": {\n \"field\": \"customer_id\",\n \"missing_bucket\": true\n }\n }\n },\n \"aggregations\": {\n \"max_price\": {\n \"max\": {\n \"field\": \"taxful_total_price\"\n }\n }\n }\n },\n \"description\": \"Maximum priced ecommerce data by customer_id in Asia\",\n \"dest\": {\n \"index\": \"kibana_sample_data_ecommerce_transform1\",\n \"pipeline\": \"add_timestamp_pipeline\"\n },\n \"frequency\": \"5m\",\n \"sync\": {\n \"time\": {\n \"field\": \"order_date\",\n \"delay\": \"60s\"\n }\n },\n \"retention_policy\": {\n \"time\": {\n \"field\": \"order_date\",\n \"max_age\": \"30d\"\n }\n }\n}" + "value": "{\n \"source\": {\n \"index\": \"kibana_sample_data_ecommerce\",\n \"query\": {\n \"term\": {\n \"geoip.continent_name\": {\n \"value\": \"Asia\"\n }\n }\n }\n },\n \"description\": \"Maximum priced ecommerce data by customer_id in Asia\",\n \"dest\": {\n \"index\": \"kibana_sample_data_ecommerce_transform_v2\",\n \"pipeline\": \"add_timestamp_pipeline\"\n },\n \"frequency\": \"15m\",\n \"sync\": {\n \"time\": {\n \"field\": \"order_date\",\n \"delay\": \"120s\"\n }\n }\n}" } } } @@ -43907,7 +48409,12 @@ } }, "x-state": "Generally available; Added in 7.2.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_transform/_upgrade": { @@ -43978,7 +48485,12 @@ } }, "x-state": "Generally available; Added in 7.16.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/{index}/_update/{id}": { @@ -43987,7 +48499,11 @@ "document" ], "summary": "Update a document", - "description": "Update a document by running a script or passing a partial document.\n\nIf the Elasticsearch security features are enabled, you must have the `index` or `write` index privilege for the target index or index alias.\n\nThe script can update, delete, or skip modifying the document.\nThe API also supports passing a partial document, which is merged into the existing document.\nTo fully replace an existing document, use the index API.\nThis operation:\n\n* Gets the document (collocated with the shard) from the index.\n* Runs the specified script.\n* Indexes the result.\n\nThe document must still be reindexed, but using this API removes some network roundtrips and reduces chances of version conflicts between the GET and the index operation.\n\nThe `_source` field must be enabled to use this API.\nIn addition to `_source`, you can access the following variables through the `ctx` map: `_index`, `_type`, `_id`, `_version`, `_routing`, and `_now` (the current timestamp).\n\n## Required authorization\n\n* Index privileges: `write`\n", + "description": "Update a document by running a script or passing a partial document.\n\nIf the Elasticsearch security features are enabled, you must have the `index` or `write` index privilege for the target index or index alias.\n\nThe script can update, delete, or skip modifying the document.\nThe API also supports passing a partial document, which is merged into the existing document.\nTo fully replace an existing document, use the index API.\nThis operation:\n\n* Gets the document (collocated with the shard) from the index.\n* Runs the specified script.\n* Indexes the result.\n\nThe document must still be reindexed, but using this API removes some network roundtrips and reduces chances of version conflicts between the GET and the index operation.\n\nThe `_source` field must be enabled to use this API.\nIn addition to `_source`, you can access the following variables through the `ctx` map: `_index`, `_type`, `_id`, `_version`, `_routing`, and `_now` (the current timestamp).\nFor usage examples such as partial updates, upserts, and scripted updates, see the External documentation.\n\n## Required authorization\n\n* Index privileges: `write`\n", + "externalDocs": { + "url": "https://www.elastic.co/docs/reference/elasticsearch/rest-apis/update-document", + "x-previousVersionUrl": "https://www.elastic.co/guide/en/elasticsearch/reference/8.18/docs-update.html" + }, "operationId": "update", "parameters": [ { @@ -44151,6 +48667,7 @@ "properties": { "detect_noop": { "description": "If `true`, the `result` in the response is set to `noop` (no operation) when there are no changes to the document.", + "default": true, "type": "boolean" }, "doc": { @@ -44159,6 +48676,7 @@ }, "doc_as_upsert": { "description": "If `true`, use the contents of 'doc' as the value of 'upsert'.\nNOTE: Using ingest pipelines with `doc_as_upsert` is not supported.", + "default": false, "type": "boolean" }, "script": { @@ -44166,6 +48684,7 @@ }, "scripted_upsert": { "description": "If `true`, run the script whether or not the document exists.", + "default": false, "type": "boolean" }, "_source": { @@ -44258,7 +48777,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/{index}/_update_by_query": { @@ -44267,7 +48791,11 @@ "document" ], "summary": "Update documents", - "description": "Updates documents that match the specified query.\nIf no query is specified, performs an update on every document in the data stream or index without modifying the source, which is useful for picking up mapping changes.\n\nIf the Elasticsearch security features are enabled, you must have the following index privileges for the target data stream, index, or alias:\n\n* `read`\n* `index` or `write`\n\nYou can specify the query criteria in the request URI or the request body using the same syntax as the search API.\n\nWhen you submit an update by query request, Elasticsearch gets a snapshot of the data stream or index when it begins processing the request and updates matching documents using internal versioning.\nWhen the versions match, the document is updated and the version number is incremented.\nIf a document changes between the time that the snapshot is taken and the update operation is processed, it results in a version conflict and the operation fails.\nYou can opt to count version conflicts instead of halting and returning by setting `conflicts` to `proceed`.\nNote that if you opt to count version conflicts, the operation could attempt to update more documents from the source than `max_docs` until it has successfully updated `max_docs` documents or it has gone through every document in the source query.\n\nNOTE: Documents with a version equal to 0 cannot be updated using update by query because internal versioning does not support 0 as a valid version number.\n\nWhile processing an update by query request, Elasticsearch performs multiple search requests sequentially to find all of the matching documents.\nA bulk update request is performed for each batch of matching documents.\nAny query or update failures cause the update by query request to fail and the failures are shown in the response.\nAny update requests that completed successfully still stick, they are not rolled back.\n\n**Throttling update requests**\n\nTo control the rate at which update by query issues batches of update operations, you can set `requests_per_second` to any positive decimal number.\nThis pads each batch with a wait time to throttle the rate.\nSet `requests_per_second` to `-1` to turn off throttling.\n\nThrottling uses a wait time between batches so that the internal scroll requests can be given a timeout that takes the request padding into account.\nThe padding time is the difference between the batch size divided by the `requests_per_second` and the time spent writing.\nBy default the batch size is 1000, so if `requests_per_second` is set to `500`:\n\n```\ntarget_time = 1000 / 500 per second = 2 seconds\nwait_time = target_time - write_time = 2 seconds - .5 seconds = 1.5 seconds\n```\n\nSince the batch is issued as a single _bulk request, large batch sizes cause Elasticsearch to create many requests and wait before starting the next set.\nThis is \"bursty\" instead of \"smooth\".\n\n**Slicing**\n\nUpdate by query supports sliced scroll to parallelize the update process.\nThis can improve efficiency and provide a convenient way to break the request down into smaller parts.\n\nSetting `slices` to `auto` chooses a reasonable number for most data streams and indices.\nThis setting will use one slice per shard, up to a certain limit.\nIf there are multiple source data streams or indices, it will choose the number of slices based on the index or backing index with the smallest number of shards.\n\nAdding `slices` to `_update_by_query` just automates the manual process of creating sub-requests, which means it has some quirks:\n\n* You can see these requests in the tasks APIs. These sub-requests are \"child\" tasks of the task for the request with slices.\n* Fetching the status of the task for the request with `slices` only contains the status of completed slices.\n* These sub-requests are individually addressable for things like cancellation and rethrottling.\n* Rethrottling the request with `slices` will rethrottle the unfinished sub-request proportionally.\n* Canceling the request with slices will cancel each sub-request.\n* Due to the nature of slices each sub-request won't get a perfectly even portion of the documents. All documents will be addressed, but some slices may be larger than others. Expect larger slices to have a more even distribution.\n* Parameters like `requests_per_second` and `max_docs` on a request with slices are distributed proportionally to each sub-request. Combine that with the point above about distribution being uneven and you should conclude that using `max_docs` with `slices` might not result in exactly `max_docs` documents being updated.\n* Each sub-request gets a slightly different snapshot of the source data stream or index though these are all taken at approximately the same time.\n\nIf you're slicing manually or otherwise tuning automatic slicing, keep in mind that:\n\n* Query performance is most efficient when the number of slices is equal to the number of shards in the index or backing index. If that number is large (for example, 500), choose a lower number as too many slices hurts performance. Setting slices higher than the number of shards generally does not improve efficiency and adds overhead.\n* Update performance scales linearly across available resources with the number of slices.\n\nWhether query or update performance dominates the runtime depends on the documents being reindexed and cluster resources.\n\n**Update the document source**\n\nUpdate by query supports scripts to update the document source.\nAs with the update API, you can set `ctx.op` to change the operation that is performed.\n\nSet `ctx.op = \"noop\"` if your script decides that it doesn't have to make any changes.\nThe update by query operation skips updating the document and increments the `noop` counter.\n\nSet `ctx.op = \"delete\"` if your script decides that the document should be deleted.\nThe update by query operation deletes the document and increments the `deleted` counter.\n\nUpdate by query supports only `index`, `noop`, and `delete`.\nSetting `ctx.op` to anything else is an error.\nSetting any other field in `ctx` is an error.\nThis API enables you to only modify the source of matching documents; you cannot move them.\n\n## Required authorization\n\n* Index privileges: `read`,`write`\n", + "description": "Updates documents that match the specified query.\nIf no query is specified, performs an update on every document in the data stream or index without modifying the source, which is useful for picking up mapping changes.\n\nIf the Elasticsearch security features are enabled, you must have the following index privileges for the target data stream, index, or alias:\n\n* `read`\n* `index` or `write`\n\nYou can specify the query criteria in the request URI or the request body using the same syntax as the search API.\n\nWhen you submit an update by query request, Elasticsearch gets a snapshot of the data stream or index when it begins processing the request and updates matching documents using internal versioning.\nWhen the versions match, the document is updated and the version number is incremented.\nIf a document changes between the time that the snapshot is taken and the update operation is processed, it results in a version conflict and the operation fails.\nYou can opt to count version conflicts instead of halting and returning by setting `conflicts` to `proceed`.\nNote that if you opt to count version conflicts, the operation could attempt to update more documents from the source than `max_docs` until it has successfully updated `max_docs` documents or it has gone through every document in the source query.\n\nNOTE: Documents with a version equal to 0 cannot be updated using update by query because internal versioning does not support 0 as a valid version number.\n\nWhile processing an update by query request, Elasticsearch performs multiple search requests sequentially to find all of the matching documents.\nA bulk update request is performed for each batch of matching documents.\nAny query or update failures cause the update by query request to fail and the failures are shown in the response.\nAny update requests that completed successfully still stick, they are not rolled back.\n\n**Refreshing shards**\n\nSpecifying the `refresh` parameter refreshes all shards once the request completes.\nThis is different to the update API's `refresh` parameter, which causes only the shard\nthat received the request to be refreshed. Unlike the update API, it does not support\n`wait_for`.\n\n**Running update by query asynchronously**\n\nIf the request contains `wait_for_completion=false`, Elasticsearch\nperforms some preflight checks, launches the request, and returns a\n[task](https://www.elastic.co/docs/api/doc/elasticsearch/group/endpoint-tasks) you can use to cancel or get the status of the task.\nElasticsearch creates a record of this task as a document at `.tasks/task/${taskId}`.\n\n**Waiting for active shards**\n\n`wait_for_active_shards` controls how many copies of a shard must be active\nbefore proceeding with the request. See [`wait_for_active_shards`](https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-create#operation-create-wait_for_active_shards)\nfor details. `timeout` controls how long each write request waits for unavailable\nshards to become available. Both work exactly the way they work in the\n[Bulk API](https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-bulk). Update by query uses scrolled searches, so you can also\nspecify the `scroll` parameter to control how long it keeps the search context\nalive, for example `?scroll=10m`. The default is 5 minutes.\n\n**Throttling update requests**\n\nTo control the rate at which update by query issues batches of update operations, you can set `requests_per_second` to any positive decimal number.\nThis pads each batch with a wait time to throttle the rate.\nSet `requests_per_second` to `-1` to turn off throttling.\n\nThrottling uses a wait time between batches so that the internal scroll requests can be given a timeout that takes the request padding into account.\nThe padding time is the difference between the batch size divided by the `requests_per_second` and the time spent writing.\nBy default the batch size is 1000, so if `requests_per_second` is set to `500`:\n\n```\ntarget_time = 1000 / 500 per second = 2 seconds\nwait_time = target_time - write_time = 2 seconds - .5 seconds = 1.5 seconds\n```\n\nSince the batch is issued as a single _bulk request, large batch sizes cause Elasticsearch to create many requests and wait before starting the next set.\nThis is \"bursty\" instead of \"smooth\".\n\n**Slicing**\n\nUpdate by query supports sliced scroll to parallelize the update process.\nThis can improve efficiency and provide a convenient way to break the request down into smaller parts.\n\nSetting `slices` to `auto` chooses a reasonable number for most data streams and indices.\nThis setting will use one slice per shard, up to a certain limit.\nIf there are multiple source data streams or indices, it will choose the number of slices based on the index or backing index with the smallest number of shards.\n\nAdding `slices` to `_update_by_query` just automates the manual process of creating sub-requests, which means it has some quirks:\n\n* You can see these requests in the tasks APIs. These sub-requests are \"child\" tasks of the task for the request with slices.\n* Fetching the status of the task for the request with `slices` only contains the status of completed slices.\n* These sub-requests are individually addressable for things like cancellation and rethrottling.\n* Rethrottling the request with `slices` will rethrottle the unfinished sub-request proportionally.\n* Canceling the request with slices will cancel each sub-request.\n* Due to the nature of slices each sub-request won't get a perfectly even portion of the documents. All documents will be addressed, but some slices may be larger than others. Expect larger slices to have a more even distribution.\n* Parameters like `requests_per_second` and `max_docs` on a request with slices are distributed proportionally to each sub-request. Combine that with the point above about distribution being uneven and you should conclude that using `max_docs` with `slices` might not result in exactly `max_docs` documents being updated.\n* Each sub-request gets a slightly different snapshot of the source data stream or index though these are all taken at approximately the same time.\n\nIf you're slicing manually or otherwise tuning automatic slicing, keep in mind that:\n\n* Query performance is most efficient when the number of slices is equal to the number of shards in the index or backing index. If that number is large (for example, 500), choose a lower number as too many slices hurts performance. Setting slices higher than the number of shards generally does not improve efficiency and adds overhead.\n* Update performance scales linearly across available resources with the number of slices.\n\nWhether query or update performance dominates the runtime depends on the documents being reindexed and cluster resources.\nRefer to the linked documentation for examples of how to update documents using the `_update_by_query` API:\n\n## Required authorization\n\n* Index privileges: `read`,`write`\n", + "externalDocs": { + "url": "https://www.elastic.co/docs/reference/elasticsearch/rest-apis/update-by-query-api", + "x-previousVersionUrl": "https://www.elastic.co/guide/en/elasticsearch/reference/8.18/docs-update-by-query.html" + }, "operationId": "update-by-query", "parameters": [ { @@ -44722,7 +49250,12 @@ } }, "x-state": "Generally available; Added in 2.4.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_update_by_query/{task_id}/_rethrottle": { @@ -44780,7 +49313,12 @@ } }, "x-state": "Generally available; Added in 6.5.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_watcher/watch/{watch_id}/_ack": { @@ -44806,7 +49344,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] }, "post": { "tags": [ @@ -44830,7 +49373,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_watcher/watch/{watch_id}/_ack/{action_id}": { @@ -44859,7 +49407,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] }, "post": { "tags": [ @@ -44886,7 +49439,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_watcher/watch/{watch_id}/_activate": { @@ -44912,7 +49470,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] }, "post": { "tags": [ @@ -44936,7 +49499,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_watcher/watch/{watch_id}/_deactivate": { @@ -44962,7 +49530,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] }, "post": { "tags": [ @@ -44986,7 +49559,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_watcher/watch/{id}": { @@ -45056,7 +49634,12 @@ } }, "x-state": "Generally available; Added in 5.6.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] }, "put": { "tags": [ @@ -45091,7 +49674,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] }, "post": { "tags": [ @@ -45126,7 +49714,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] }, "delete": { "tags": [ @@ -45183,7 +49776,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_watcher/watch/{id}/_execute": { @@ -45215,7 +49813,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] }, "post": { "tags": [ @@ -45245,7 +49848,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_watcher/watch/_execute": { @@ -45274,7 +49882,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] }, "post": { "tags": [ @@ -45301,7 +49914,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_watcher/settings": { @@ -45351,7 +49969,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] }, "put": { "tags": [ @@ -45426,7 +50049,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_watcher/_query/watches": { @@ -45446,7 +50074,12 @@ } }, "x-state": "Generally available; Added in 7.11.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] }, "post": { "tags": [ @@ -45464,7 +50097,12 @@ } }, "x-state": "Generally available; Added in 7.11.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_watcher/_start": { @@ -45506,7 +50144,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_watcher/stats": { @@ -45531,7 +50174,12 @@ } }, "x-state": "Generally available; Added in 5.5.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_watcher/stats/{metric}": { @@ -45559,7 +50207,12 @@ } }, "x-state": "Generally available; Added in 5.5.0", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_watcher/_stop": { @@ -45601,7 +50254,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_xpack": { @@ -45686,7 +50344,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_xpack/usage": { @@ -45836,7 +50499,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } } }, @@ -48412,7 +53080,12 @@ "$ref": "#/components/schemas/_types.aggregations.MultiBucketBase" }, { - "type": "object" + "type": "object", + "properties": { + "key": { + "type": "string" + } + } } ] }, @@ -51781,6 +56454,7 @@ "properties": { "boost": { "description": "Floating point number used to decrease or increase the relevance scores of the query.\nBoost values are relative to the default value of 1.0.\nA boost value between 0 and 1.0 decreases the relevance score.\nA value greater than 1.0 increases the relevance score.", + "default": 1.0, "type": "number" }, "_name": { @@ -51869,6 +56543,7 @@ }, "auto_generate_synonyms_phrase_query": { "description": "If true, match phrase queries are automatically created for multi-term synonyms.", + "default": true, "type": "boolean" }, "operator": { @@ -51937,6 +56612,7 @@ }, "tie_breaker": { "description": "Floating point number between 0 and 1.0 used to increase the relevance scores of documents matching multiple query clauses.", + "default": 0.0, "type": "number" } }, @@ -52288,6 +56964,7 @@ }, "factor": { "description": "Optional factor to multiply the field value with.", + "default": 1.0, "type": "number" }, "missing": { @@ -52401,6 +57078,7 @@ }, "explain": { "description": "If `true`, the request returns detailed information about score computation as part of a hit.", + "default": false, "type": "boolean" }, "ext": { @@ -52412,6 +57090,7 @@ }, "from": { "description": "The starting document offset, which must be non-negative.\nBy default, you cannot page through more than 10,000 hits using the `from` and `size` parameters.\nTo page through more hits, use the `search_after` parameter.", + "default": 0.0, "type": "number" }, "highlight": { @@ -52475,6 +57154,7 @@ }, "profile": { "description": "Set to `true` to return detailed timing information about the execution of individual components in a search request.\nNOTE: This is a debugging tool and adds significant overhead to search execution.", + "default": false, "type": "boolean" }, "query": { @@ -52509,6 +57189,7 @@ }, "size": { "description": "The number of hits to return, which must not be negative.\nBy default, you cannot page through more than 10,000 hits using the `from` and `size` parameters.\nTo page through more hits, use the `search_after` property.", + "default": 10.0, "type": "number" }, "slice": { @@ -52532,6 +57213,7 @@ }, "terminate_after": { "description": "The maximum number of documents to collect for each shard.\nIf a query reaches this limit, Elasticsearch terminates the query early.\nElasticsearch collects documents before sorting.\n\nIMPORTANT: Use with caution.\nElasticsearch applies this property to each shard handling the request.\nWhen possible, let Elasticsearch perform early termination automatically.\nAvoid specifying this property for requests that target data streams with backing indices across multiple data tiers.\n\nIf set to `0` (default), the query does not terminate early.", + "default": 0.0, "type": "number" }, "timeout": { @@ -52540,10 +57222,12 @@ }, "track_scores": { "description": "If `true`, calculate and return document scores, even if the scores are not used for sorting.", + "default": false, "type": "boolean" }, "version": { "description": "If `true`, the request returns the document version as part of a hit.", + "default": false, "type": "boolean" }, "seq_no_primary_term": { @@ -52611,10 +57295,12 @@ }, "size": { "description": "The maximum number of hits to return per `inner_hits`.", + "default": 3.0, "type": "number" }, "from": { "description": "Inner hit starting document offset.", + "default": 0.0, "type": "number" }, "collapse": { @@ -52660,6 +57346,7 @@ "$ref": "#/components/schemas/_types.Fields" }, "track_scores": { + "default": false, "type": "boolean" }, "version": { @@ -52763,10 +57450,12 @@ }, "boundary_chars": { "description": "A string that contains each boundary character.", + "default": ".,!? \\t\\n", "type": "string" }, "boundary_max_scan": { "description": "How far to scan for boundary characters.", + "default": 20.0, "type": "number" }, "boundary_scanner": { @@ -52774,6 +57463,7 @@ }, "boundary_scanner_locale": { "description": "Controls which locale is used to search for sentence and word boundaries.\nThis parameter takes a form of a language tag, for example: `\"en-US\"`, `\"fr-FR\"`, `\"ja-JP\"`.", + "default": "Locale.ROOT", "type": "string" }, "force_source": { @@ -52785,6 +57475,7 @@ }, "fragment_size": { "description": "The size of the highlighted fragment in characters.", + "default": 100.0, "type": "number" }, "highlight_filter": { @@ -52802,10 +57493,12 @@ }, "no_match_size": { "description": "The amount of text you want to return from the beginning of the field if there are no matching fragments to highlight.", + "default": 0.0, "type": "number" }, "number_of_fragments": { "description": "The maximum number of fragments to return.\nIf the number of fragments is set to `0`, no fragments are returned.\nInstead, the entire field contents are highlighted and returned.\nThis can be handy when you need to highlight short texts such as a title or address, but fragmentation is not required.\nIf `number_of_fragments` is `0`, `fragment_size` is ignored.", + "default": 5.0, "type": "number" }, "options": { @@ -52819,6 +57512,7 @@ }, "phrase_limit": { "description": "Controls the number of matching phrases in a document that are considered.\nPrevents the `fvh` highlighter from analyzing too many phrases and consuming too much memory.\nWhen using `matched_fields`, `phrase_limit` phrases per matched field are considered. Raising the limit increases query time and consumes more memory.\nOnly supported by the `fvh` highlighter.", + "default": 256.0, "type": "number" }, "post_tags": { @@ -52837,6 +57531,7 @@ }, "require_field_match": { "description": "By default, only fields that contains a query match are highlighted.\nSet to `false` to highlight all fields.", + "default": true, "type": "boolean" }, "tags_schema": { @@ -53250,10 +57945,12 @@ }, "query_weight": { "description": "Relative importance of the original query versus the rescore query.", + "default": 1.0, "type": "number" }, "rescore_query_weight": { "description": "Relative importance of the rescore query versus the original query.", + "default": 1.0, "type": "number" }, "score_mode": { @@ -53443,6 +58140,15 @@ "rank_window_size": { "description": "This value determines the size of the individual result sets per query.", "type": "number" + }, + "query": { + "type": "string" + }, + "fields": { + "type": "array", + "items": { + "type": "string" + } } }, "required": [ @@ -53578,6 +58284,18 @@ }, "rank_window_size": { "type": "number" + }, + "query": { + "type": "string" + }, + "fields": { + "type": "array", + "items": { + "type": "string" + } + }, + "normalizer": { + "$ref": "#/components/schemas/_types.ScoreNormalizer" } } } @@ -53822,10 +58540,12 @@ "properties": { "max_expansions": { "description": "Maximum number of variations created.", + "default": 50.0, "type": "number" }, "prefix_length": { "description": "Number of beginning characters left unchanged when creating expansions.", + "default": 0.0, "type": "number" }, "rewrite": { @@ -53833,6 +58553,7 @@ }, "transpositions": { "description": "Indicates whether edits include transpositions of two adjacent characters (for example `ab` to `ba`).", + "default": true, "type": "boolean" }, "fuzziness": { @@ -53888,6 +58609,7 @@ }, "ignore_unmapped": { "description": "Set to `true` to ignore an unmapped field and not match any documents for this query.\nSet to `false` to throw an exception if the field is not mapped.", + "default": false, "type": "boolean" } } @@ -53928,6 +58650,7 @@ }, "ignore_unmapped": { "description": "Set to `true` to ignore an unmapped field and not match any documents for this query.\nSet to `false` to throw an exception if the field is not mapped.", + "default": false, "type": "boolean" } }, @@ -53988,6 +58711,7 @@ "properties": { "ignore_unmapped": { "description": "Set to `true` to ignore an unmapped field and not match any documents for this query.\nSet to `false` to throw an exception if the field is not mapped.", + "default": false, "type": "boolean" } } @@ -54004,6 +58728,7 @@ "properties": { "ignore_unmapped": { "description": "Indicates whether to ignore an unmapped `type` and not return any documents instead of an error.", + "default": false, "type": "boolean" }, "inner_hits": { @@ -54057,6 +58782,7 @@ "properties": { "ignore_unmapped": { "description": "Indicates whether to ignore an unmapped `parent_type` and not return any documents instead of an error.\nYou can use this parameter to query multiple indices that may not contain the `parent_type`.", + "default": false, "type": "boolean" }, "inner_hits": { @@ -54070,6 +58796,7 @@ }, "score": { "description": "Indicates whether the relevance score of a matching parent document is aggregated into its child documents.", + "default": false, "type": "boolean" } }, @@ -54161,10 +58888,12 @@ }, "max_gaps": { "description": "Maximum number of positions between the matching terms.\nIntervals produced by the rules further apart than this are not considered matches.", + "default": -1.0, "type": "number" }, "ordered": { "description": "If `true`, intervals produced by the rules should appear in the order in which they are specified.", + "default": false, "type": "boolean" }, "filter": { @@ -54270,6 +58999,7 @@ }, "prefix_length": { "description": "Number of beginning characters left unchanged when creating expansions.", + "default": 0.0, "type": "number" }, "term": { @@ -54278,6 +59008,7 @@ }, "transpositions": { "description": "Indicates whether edits include transpositions of two adjacent characters (for example, `ab` to `ba`).", + "default": true, "type": "boolean" }, "use_field": { @@ -54297,10 +59028,12 @@ }, "max_gaps": { "description": "Maximum number of positions between the matching terms.\nTerms further apart than this are not considered matches.", + "default": -1.0, "type": "number" }, "ordered": { "description": "If `true`, matching terms must appear in their specified order.", + "default": false, "type": "boolean" }, "query": { @@ -54470,6 +59203,7 @@ }, "auto_generate_synonyms_phrase_query": { "description": "If `true`, match phrase queries are automatically created for multi-term synonyms.", + "default": true, "type": "boolean" }, "cutoff_frequency": { @@ -54484,14 +59218,17 @@ }, "fuzzy_transpositions": { "description": "If `true`, edits for fuzzy matching include transpositions of two adjacent characters (for example, `ab` to `ba`).", + "default": true, "type": "boolean" }, "lenient": { "description": "If `true`, format-based errors, such as providing a text query value for a numeric field, are ignored.", + "default": false, "type": "boolean" }, "max_expansions": { "description": "Maximum number of terms to which the query will expand.", + "default": 50.0, "type": "number" }, "minimum_should_match": { @@ -54502,6 +59239,7 @@ }, "prefix_length": { "description": "Number of beginning characters left unchanged for fuzzy matching.", + "default": 0.0, "type": "number" }, "query": { @@ -54565,10 +59303,12 @@ }, "fuzzy_transpositions": { "description": "If `true`, edits for fuzzy matching include transpositions of two adjacent characters (for example, `ab` to `ba`).\nCan be applied to the term subqueries constructed for all terms but the final term.", + "default": true, "type": "boolean" }, "max_expansions": { "description": "Maximum number of terms to which the query will expand.\nCan be applied to the term subqueries constructed for all terms but the final term.", + "default": 50.0, "type": "number" }, "minimum_should_match": { @@ -54579,6 +59319,7 @@ }, "prefix_length": { "description": "Number of beginning characters left unchanged for fuzzy matching.\nCan be applied to the term subqueries constructed for all terms but the final term.", + "default": 0.0, "type": "number" }, "query": { @@ -54620,6 +59361,7 @@ }, "slop": { "description": "Maximum number of positions allowed between matching tokens.", + "default": 0.0, "type": "number" }, "zero_terms_query": { @@ -54646,6 +59388,7 @@ }, "max_expansions": { "description": "Maximum number of terms to which the last provided term of the query value will expand.", + "default": 50.0, "type": "number" }, "query": { @@ -54654,6 +59397,7 @@ }, "slop": { "description": "Maximum number of positions allowed between matching tokens.", + "default": 0.0, "type": "number" }, "zero_terms_query": { @@ -54683,10 +59427,12 @@ }, "boost_terms": { "description": "Each term in the formed query could be further boosted by their tf-idf score.\nThis sets the boost factor to use when using this feature.\nDefaults to deactivated (0).", + "default": 0.0, "type": "number" }, "fail_on_unsupported_field": { "description": "Controls whether the query should fail (throw an exception) if any of the specified fields are not of the supported types (`text` or `keyword`).", + "default": true, "type": "boolean" }, "fields": { @@ -54698,6 +59444,7 @@ }, "include": { "description": "Specifies whether the input documents should also be included in the search results returned.", + "default": false, "type": "boolean" }, "like": { @@ -54720,14 +59467,17 @@ }, "max_query_terms": { "description": "The maximum number of query terms that can be selected.", + "default": 25.0, "type": "number" }, "max_word_length": { "description": "The maximum word length above which the terms are ignored.\nDefaults to unbounded (`0`).", + "default": 0.0, "type": "number" }, "min_doc_freq": { "description": "The minimum document frequency below which the terms are ignored from the input document.", + "default": 5.0, "type": "number" }, "minimum_should_match": { @@ -54735,10 +59485,12 @@ }, "min_term_freq": { "description": "The minimum term frequency below which the terms are ignored from the input document.", + "default": 2.0, "type": "number" }, "min_word_length": { "description": "The minimum word length below which the terms are ignored.", + "default": 0.0, "type": "number" }, "routing": { @@ -54901,6 +59653,7 @@ }, "auto_generate_synonyms_phrase_query": { "description": "If `true`, match phrase queries are automatically created for multi-term synonyms.", + "default": true, "type": "boolean" }, "cutoff_frequency": { @@ -54918,14 +59671,17 @@ }, "fuzzy_transpositions": { "description": "If `true`, edits for fuzzy matching include transpositions of two adjacent characters (for example, `ab` to `ba`).\nCan be applied to the term subqueries constructed for all terms but the final term.", + "default": true, "type": "boolean" }, "lenient": { "description": "If `true`, format-based errors, such as providing a text query value for a numeric field, are ignored.", + "default": false, "type": "boolean" }, "max_expansions": { "description": "Maximum number of terms to which the query will expand.", + "default": 50.0, "type": "number" }, "minimum_should_match": { @@ -54936,6 +59692,7 @@ }, "prefix_length": { "description": "Number of beginning characters left unchanged for fuzzy matching.", + "default": 0.0, "type": "number" }, "query": { @@ -54944,10 +59701,12 @@ }, "slop": { "description": "Maximum number of positions allowed between matching tokens.", + "default": 0.0, "type": "number" }, "tie_breaker": { "description": "Determines how scores for each per-term blended query and scores across groups are combined.", + "default": 0.0, "type": "number" }, "type": { @@ -54984,6 +59743,7 @@ "properties": { "ignore_unmapped": { "description": "Indicates whether to ignore an unmapped path and not return any documents instead of an error.", + "default": false, "type": "boolean" }, "inner_hits": { @@ -55019,6 +59779,7 @@ }, "ignore_unmapped": { "description": "Indicates whether to ignore an unmapped `type` and not return any documents instead of an error.", + "default": false, "type": "boolean" }, "type": { @@ -55154,6 +59915,7 @@ }, "case_insensitive": { "description": "Allows ASCII case insensitive matching of the value with the indexed field values when set to `true`.\nDefault is `false` which means the case sensitivity of matching depends on the underlying field’s mapping.", + "default": false, "x-state": "Generally available; Added in 7.10.0", "type": "boolean" } @@ -55174,6 +59936,7 @@ "properties": { "allow_leading_wildcard": { "description": "If `true`, the wildcard characters `*` and `?` are allowed as the first character of the query string.", + "default": true, "type": "boolean" }, "analyzer": { @@ -55182,10 +59945,12 @@ }, "analyze_wildcard": { "description": "If `true`, the query attempts to analyze wildcard terms in the query string.", + "default": false, "type": "boolean" }, "auto_generate_synonyms_phrase_query": { "description": "If `true`, match phrase queries are automatically created for multi-term synonyms.", + "default": true, "type": "boolean" }, "default_field": { @@ -55196,9 +59961,11 @@ }, "enable_position_increments": { "description": "If `true`, enable position increments in queries constructed from a `query_string` search.", + "default": true, "type": "boolean" }, "escape": { + "default": false, "type": "boolean" }, "fields": { @@ -55213,10 +59980,12 @@ }, "fuzzy_max_expansions": { "description": "Maximum number of terms to which the query expands for fuzzy matching.", + "default": 50.0, "type": "number" }, "fuzzy_prefix_length": { "description": "Number of beginning characters left unchanged for fuzzy matching.", + "default": 0.0, "type": "number" }, "fuzzy_rewrite": { @@ -55224,14 +59993,17 @@ }, "fuzzy_transpositions": { "description": "If `true`, edits for fuzzy matching include transpositions of two adjacent characters (for example, `ab` to `ba`).", + "default": true, "type": "boolean" }, "lenient": { "description": "If `true`, format-based errors, such as providing a text value for a numeric field, are ignored.", + "default": false, "type": "boolean" }, "max_determinized_states": { "description": "Maximum number of automaton states required for the query.", + "default": 10000.0, "type": "number" }, "minimum_should_match": { @@ -55239,6 +60011,7 @@ }, "phrase_slop": { "description": "Maximum number of positions allowed between matching tokens for phrases.", + "default": 0.0, "type": "number" }, "query": { @@ -55594,6 +60367,7 @@ "properties": { "case_insensitive": { "description": "Allows case insensitive matching of the regular expression value with the indexed field values when set to `true`.\nWhen `false`, case sensitivity of matching depends on the underlying field’s mapping.", + "default": false, "x-state": "Generally available; Added in 7.10.0", "type": "boolean" }, @@ -55603,6 +60377,7 @@ }, "max_determinized_states": { "description": "Maximum number of automaton states required for the query.", + "default": 10000.0, "type": "number" }, "rewrite": { @@ -55755,10 +60530,12 @@ }, "analyze_wildcard": { "description": "If `true`, the query attempts to analyze wildcard terms in the query string.", + "default": false, "type": "boolean" }, "auto_generate_synonyms_phrase_query": { "description": "If `true`, the parser creates a match_phrase query for each multi-position token.", + "default": true, "type": "boolean" }, "default_operator": { @@ -55776,10 +60553,12 @@ }, "fuzzy_max_expansions": { "description": "Maximum number of terms to which the query expands for fuzzy matching.", + "default": 50.0, "type": "number" }, "fuzzy_prefix_length": { "description": "Number of beginning characters left unchanged for fuzzy matching.", + "default": 0.0, "type": "number" }, "fuzzy_transpositions": { @@ -55788,6 +60567,7 @@ }, "lenient": { "description": "If `true`, format-based errors, such as providing a text value for a numeric field, are ignored.", + "default": false, "type": "boolean" }, "minimum_should_match": { @@ -56032,10 +60812,12 @@ }, "post": { "description": "The number of tokens after the include span that can’t have overlap with the exclude span.", + "default": 0.0, "type": "number" }, "pre": { "description": "The number of tokens before the include span that can’t have overlap with the exclude span.", + "default": 0.0, "type": "number" } }, @@ -56134,7 +60916,7 @@ "type": "boolean" }, "pruning_config": { - "$ref": "#/components/schemas/_types.query_dsl.TokenPruningConfig" + "$ref": "#/components/schemas/_types.TokenPruningConfig" } }, "required": [ @@ -56162,19 +60944,22 @@ } ] }, - "_types.query_dsl.TokenPruningConfig": { + "_types.TokenPruningConfig": { "type": "object", "properties": { "tokens_freq_ratio_threshold": { "description": "Tokens whose frequency is more than this threshold times the average frequency of all tokens in the specified field are considered outliers and pruned.", + "default": 5.0, "type": "number" }, "tokens_weight_threshold": { "description": "Tokens whose weight is less than this threshold are considered nonsignificant and pruned.", + "default": 0.4, "type": "number" }, "only_score_pruned_tokens": { "description": "Whether to only score pruned tokens, vs only scoring kept tokens.", + "default": false, "type": "boolean" } } @@ -56192,6 +60977,7 @@ }, "case_insensitive": { "description": "Allows ASCII case insensitive matching of the value with the indexed field values when set to `true`.\nWhen `false`, the case sensitivity of matching depends on the underlying field’s mapping.", + "default": false, "x-state": "Generally available; Added in 7.10.0", "type": "boolean" } @@ -56260,7 +61046,7 @@ "type": "string" }, "pruning_config": { - "$ref": "#/components/schemas/_types.query_dsl.TokenPruningConfig" + "$ref": "#/components/schemas/_types.TokenPruningConfig" } }, "required": [ @@ -56299,7 +61085,7 @@ ] }, "pruning_config": { - "$ref": "#/components/schemas/_types.query_dsl.TokenPruningConfig" + "$ref": "#/components/schemas/_types.TokenPruningConfig" } }, "required": [ @@ -56397,6 +61183,7 @@ "properties": { "buckets": { "description": "The target number of buckets.", + "default": 10.0, "type": "number" }, "field": { @@ -56761,6 +61548,7 @@ "properties": { "precision_threshold": { "description": "A unique count below which counts are expected to be close to accurate.\nThis allows to trade memory for accuracy.", + "default": 3000.0, "type": "number" }, "rehash": { @@ -56797,14 +61585,17 @@ }, "max_unique_tokens": { "description": "The maximum number of unique tokens at any position up to max_matched_tokens. Must be larger than 1.\nSmaller values use less memory and create fewer categories. Larger values will use more memory and\ncreate narrower categories. Max allowed value is 100.", + "default": 50.0, "type": "number" }, "max_matched_tokens": { "description": "The maximum number of token positions to match on before attempting to merge categories. Larger\nvalues will use more memory and create narrower categories. Max allowed value is 100.", + "default": 5.0, "type": "number" }, "similarity_threshold": { "description": "The minimum percentage of tokens that must match for text to be added to the category bucket. Must\nbe between 1 and 100. The larger the value the narrower the categories. Larger values will increase memory\nusage and create narrower categories.", + "default": 50.0, "type": "number" }, "categorization_filters": { @@ -56823,6 +61614,7 @@ }, "size": { "description": "The number of buckets to return.", + "default": 10.0, "type": "number" }, "min_doc_count": { @@ -56898,6 +61690,7 @@ }, "size": { "description": "The number of composite buckets that should be returned.", + "default": 10.0, "type": "number" }, "sources": { @@ -57273,6 +62066,7 @@ }, "max_docs_per_value": { "description": "Limits how many documents are permitted per choice of de-duplicating value.", + "default": 1.0, "type": "number" }, "script": { @@ -57280,6 +62074,7 @@ }, "shard_size": { "description": "Limits how many top-scoring documents are collected in the sample processed on each shard.", + "default": 100.0, "type": "number" }, "field": { @@ -57341,14 +62136,17 @@ }, "minimum_set_size": { "description": "The minimum size of one item set.", + "default": 1.0, "type": "number" }, "minimum_support": { "description": "The minimum support of one item set.", + "default": 0.1, "type": "number" }, "size": { "description": "The number of top item sets to return.", + "default": 10.0, "type": "number" }, "filter": { @@ -57439,10 +62237,12 @@ }, "other_bucket_key": { "description": "The key with which the other bucket is returned.", + "default": "_other_", "type": "string" }, "keyed": { "description": "By default, the named filters aggregation returns the buckets as an object.\nSet to `false` to return the buckets as an array of objects.", + "default": true, "type": "boolean" } } @@ -57476,6 +62276,7 @@ "properties": { "wrap_longitude": { "description": "Specifies whether the bounding box should be allowed to overlap the international date line.", + "default": true, "type": "boolean" } } @@ -57587,6 +62388,7 @@ }, "size": { "description": "The maximum number of geohash buckets to return.", + "default": 10000.0, "type": "number" } } @@ -57622,6 +62424,7 @@ }, "size": { "description": "The maximum length of the line represented in the aggregation.\nValid sizes are between 1 and 10000.", + "default": 10000.0, "type": "number" } }, @@ -57672,6 +62475,7 @@ }, "size": { "description": "The maximum number of buckets to return.", + "default": 10000.0, "type": "number" }, "bounds": { @@ -57697,6 +62501,7 @@ }, "precision": { "description": "Integer zoom of the key used to defined cells or buckets\nin the results. Value should be between 0-15.", + "default": 6.0, "type": "number" }, "bounds": { @@ -57704,6 +62509,7 @@ }, "size": { "description": "Maximum number of buckets to return.", + "default": 10000.0, "type": "number" }, "shard_size": { @@ -57771,6 +62577,7 @@ }, "keyed": { "description": "If `true`, returns buckets as a hash instead of an array, keyed by the bucket keys.", + "default": false, "type": "boolean" } } @@ -57862,10 +62669,12 @@ }, "is_ipv6": { "description": "Defines whether the prefix applies to IPv6 addresses.", + "default": false, "type": "boolean" }, "append_prefix_length": { "description": "Defines whether the prefix length is appended to IP address keys in the response.", + "default": false, "type": "boolean" }, "keyed": { @@ -57874,6 +62683,7 @@ }, "min_doc_count": { "description": "Minimum number of documents in a bucket for it to be included in the response.", + "default": 1.0, "type": "number" } }, @@ -57926,6 +62736,7 @@ }, "num_top_feature_importance_values": { "description": "Specifies the maximum number of feature importance values per document.", + "default": 0.0, "type": "number" } } @@ -57939,6 +62750,7 @@ }, "num_top_feature_importance_values": { "description": "Specifies the maximum number of feature importance values per document.", + "default": 0.0, "type": "number" }, "prediction_field_type": { @@ -58022,6 +62834,7 @@ "properties": { "compression": { "description": "Limits the maximum number of nodes used by the underlying TDigest algorithm to `20 * compression`, enabling control of memory usage and approximation error.", + "default": 1000.0, "type": "number" }, "execution_hint": { @@ -58304,6 +63117,7 @@ }, "shift": { "description": "By default, the window consists of the last n values excluding the current bucket.\nIncreasing `shift` by 1, moves the starting window position by 1 to the right.", + "default": 0.0, "type": "number" }, "keyed": { @@ -58327,6 +63141,7 @@ }, "shift": { "description": "By default, the window consists of the last n values excluding the current bucket.\nIncreasing `shift` by 1, moves the starting window position by 1 to the right.", + "default": 0.0, "type": "number" }, "window": { @@ -58353,10 +63168,12 @@ }, "min_doc_count": { "description": "The minimum number of documents in a bucket for it to be returned.", + "default": 1.0, "type": "number" }, "shard_min_doc_count": { "description": "The minimum number of documents in a bucket on each shard for it to be returned.", + "default": 1.0, "type": "number" }, "shard_size": { @@ -58365,10 +63182,12 @@ }, "show_term_doc_count_error": { "description": "Calculates the doc count error on per term basis.", + "default": false, "type": "boolean" }, "size": { "description": "The number of term buckets should be returned out of the overall terms list.", + "default": 10.0, "type": "number" }, "terms": { @@ -58472,6 +63291,7 @@ "properties": { "keyed": { "description": "By default, the aggregation associates a unique string key with each bucket and returns the ranges as a hash rather than an array.\nSet to `false` to disable this behavior.", + "default": true, "type": "boolean" }, "values": { @@ -58530,6 +63350,7 @@ "properties": { "keyed": { "description": "By default, the aggregation associates a unique string key with each bucket and returns the ranges as a hash rather than an array.\nSet to `false` to disable this behavior.", + "default": true, "type": "boolean" }, "percents": { @@ -58623,6 +63444,7 @@ }, "max_doc_count": { "description": "The maximum number of documents a term should appear in.", + "default": 1.0, "type": "number" }, "missing": { @@ -58630,6 +63452,7 @@ }, "precision": { "description": "The precision of the internal CuckooFilters.\nSmaller precision leads to better approximation, but higher memory usage.", + "default": 0.001, "type": "number" }, "value_type": { @@ -58717,6 +63540,7 @@ "properties": { "shard_size": { "description": "Limits how many top-scoring documents are collected in the sample processed on each shard.", + "default": 100.0, "type": "number" } } @@ -58804,6 +63628,7 @@ }, "min_doc_count": { "description": "Only return terms that are found in more than `min_doc_count` hits.", + "default": 3.0, "type": "number" }, "mutual_information": { @@ -58931,6 +63756,7 @@ }, "min_doc_count": { "description": "Only return values that are found in more than `min_doc_count` hits.", + "default": 3.0, "type": "number" }, "mutual_information": { @@ -58991,6 +63817,7 @@ "properties": { "show_distribution": { "description": "Shows the probability distribution for all characters.", + "default": false, "type": "boolean" } } @@ -59042,6 +63869,7 @@ }, "min_doc_count": { "description": "Only return values that are found in more than `min_doc_count` hits.", + "default": 1.0, "type": "number" }, "missing": { @@ -59077,6 +63905,7 @@ }, "size": { "description": "The number of buckets returned out of the overall terms list.", + "default": 10.0, "type": "number" }, "format": { @@ -59096,6 +63925,7 @@ "properties": { "size": { "description": "The maximum number of results to return.", + "default": 10000.0, "type": "number" }, "keyed": { @@ -59123,6 +63953,7 @@ }, "explain": { "description": "If `true`, returns detailed information about score computation as part of a hit.", + "default": false, "type": "boolean" }, "fields": { @@ -59134,6 +63965,7 @@ }, "from": { "description": "Starting document offset.", + "default": 0.0, "type": "number" }, "highlight": { @@ -59148,6 +63980,7 @@ }, "size": { "description": "The maximum number of top matching hits to return per bucket.", + "default": 3.0, "type": "number" }, "sort": { @@ -59161,10 +63994,12 @@ }, "track_scores": { "description": "If `true`, calculates and returns document scores, even if the scores are not used for sorting.", + "default": false, "type": "boolean" }, "version": { "description": "If `true`, returns document version as part of a hit.", + "default": false, "type": "boolean" }, "seq_no_primary_term": { @@ -59245,6 +64080,7 @@ }, "size": { "description": "The number of top documents from which to return metrics.", + "default": 1.0, "type": "number" }, "sort": { @@ -59338,6 +64174,7 @@ }, "buckets": { "description": "The target number of buckets.", + "default": 10.0, "type": "number" }, "shard_size": { @@ -59543,6 +64380,7 @@ }, "require_alias": { "description": "If `true`, the request's actions must target an index alias.", + "default": false, "type": "boolean" } } @@ -59595,6 +64433,7 @@ "properties": { "require_alias": { "description": "If `true`, the request's actions must target an index alias.", + "default": false, "type": "boolean" }, "retry_on_conflict": { @@ -59620,6 +64459,7 @@ "properties": { "detect_noop": { "description": "If true, the `result` in the response is set to 'noop' when no changes to the document occur.", + "default": true, "type": "boolean" }, "doc": { @@ -59628,6 +64468,7 @@ }, "doc_as_upsert": { "description": "Set to `true` to use the contents of `doc` as the value of `upsert`.", + "default": false, "type": "boolean" }, "script": { @@ -59635,6 +64476,7 @@ }, "scripted_upsert": { "description": "Set to `true` to run the script whether or not the document exists.", + "default": false, "type": "boolean" }, "_source": { @@ -60188,7 +65030,9 @@ "yellow", "YELLOW", "red", - "RED" + "RED", + "unknown", + "unavailable" ] }, "cat.indices.IndicesRecord": { @@ -62384,6 +67228,86 @@ } } }, + "cat._types.CatRecoveryColumns": { + "oneOf": [ + { + "$ref": "#/components/schemas/cat._types.CatRecoveryColumn" + }, + { + "type": "array", + "items": { + "$ref": "#/components/schemas/cat._types.CatRecoveryColumn" + } + } + ] + }, + "cat._types.CatRecoveryColumn": { + "anyOf": [ + { + "type": "string", + "enum": [ + "index", + "i", + "idx", + "shard", + "s", + "sh", + "time", + "t", + "ti", + "primaryOrReplica", + "type", + "stage", + "st", + "source_host", + "shost", + "source_node", + "snode", + "target_host", + "thost", + "target_node", + "tnode", + "repository", + "tnode", + "snapshot", + "snap", + "files", + "f", + "files_recovered", + "fr", + "files_percent", + "fp", + "files_total", + "tf", + "bytes", + "b", + "bytes_recovered", + "br", + "bytes_percent", + "bp", + "bytes_total", + "tb", + "translog_ops", + "to", + "translog_ops_recovered", + "tor", + "translog_ops_percent", + "top", + "start_time", + "start", + "start_time_millis", + "start_millis", + "stop_time", + "stop", + "stop_time_millis", + "stop_millis" + ] + }, + { + "type": "string" + } + ] + }, "cat.recovery.RecoveryRecord": { "type": "object", "properties": { @@ -62497,6 +67421,53 @@ } } }, + "cat._types.CatSegmentsColumns": { + "oneOf": [ + { + "$ref": "#/components/schemas/cat._types.CatSegmentsColumn" + }, + { + "type": "array", + "items": { + "$ref": "#/components/schemas/cat._types.CatSegmentsColumn" + } + } + ] + }, + "cat._types.CatSegmentsColumn": { + "anyOf": [ + { + "type": "string", + "enum": [ + "index", + "i", + "idx", + "shard", + "s", + "sh", + "prirep", + "p", + "pr", + "primaryOrReplica", + "ip", + "segment", + "generation", + "docs.count", + "docs.deleted", + "size", + "size.memory", + "committed", + "searchable", + "version", + "compound", + "id" + ] + }, + { + "type": "string" + } + ] + }, "cat.segments.SegmentsRecord": { "type": "object", "properties": { @@ -62557,6 +67528,226 @@ } } }, + "cat._types.CatShardColumns": { + "oneOf": [ + { + "$ref": "#/components/schemas/cat._types.CatShardColumn" + }, + { + "type": "array", + "items": { + "$ref": "#/components/schemas/cat._types.CatShardColumn" + } + } + ] + }, + "cat._types.CatShardColumn": { + "anyOf": [ + { + "type": "string", + "enum": [ + "completion.size", + "cs", + "completionSize", + "dataset.size", + "dense_vector.value_count", + "dvc", + "denseVectorCount", + "docs", + "d", + "dc", + "fielddata.evictions", + "fe", + "fielddataEvictions", + "fielddata.memory_size", + "fm", + "fielddataMemory", + "flush.total", + "ft", + "flushTotal", + "flush.total_time", + "ftt", + "flushTotalTime", + "get.current", + "gc", + "getCurrent", + "get.exists_time", + "geti", + "getExistsTime", + "get.exists_total", + "geto", + "getExistsTotal", + "get.missing_time", + "gmti", + "getMissingTime", + "get.missing_total", + "gmto", + "getMissingTotal", + "get.time", + "gti", + "getTime", + "get.total", + "gto", + "getTotal", + "id", + "index", + "i", + "idx", + "indexing.delete_current", + "idc", + "indexingDeleteCurrent", + "indexing.delete_time", + "idti", + "indexingDeleteTime", + "indexing.delete_total", + "idto", + "indexingDeleteTotal", + "indexing.index_current", + "iic", + "indexingIndexCurrent", + "indexing.index_failed_due_to_version_conflict", + "iifvc", + "indexingIndexFailedDueToVersionConflict", + "indexing.index_failed", + "iif", + "indexingIndexFailed", + "indexing.index_time", + "iiti", + "indexingIndexTime", + "indexing.index_total", + "iito", + "indexingIndexTotal", + "ip", + "merges.current", + "mc", + "mergesCurrent", + "merges.current_docs", + "mcd", + "mergesCurrentDocs", + "merges.current_size", + "mcs", + "mergesCurrentSize", + "merges.total", + "mt", + "mergesTotal", + "merges.total_docs", + "mtd", + "mergesTotalDocs", + "merges.total_size", + "mts", + "mergesTotalSize", + "merges.total_time", + "mtt", + "mergesTotalTime", + "node", + "n", + "prirep", + "p", + "pr", + "primaryOrReplica", + "query_cache.evictions", + "qce", + "queryCacheEvictions", + "query_cache.memory_size", + "qcm", + "queryCacheMemory", + "recoverysource.type", + "rs", + "refresh.time", + "rti", + "refreshTime", + "refresh.total", + "rto", + "refreshTotal", + "search.fetch_current", + "sfc", + "searchFetchCurrent", + "search.fetch_time", + "sfti", + "searchFetchTime", + "search.fetch_total", + "sfto", + "searchFetchTotal", + "search.open_contexts", + "so", + "searchOpenContexts", + "search.query_current", + "sqc", + "searchQueryCurrent", + "search.query_time", + "sqti", + "searchQueryTime", + "search.query_total", + "sqto", + "searchQueryTotal", + "search.scroll_current", + "scc", + "searchScrollCurrent", + "search.scroll_time", + "scti", + "searchScrollTime", + "search.scroll_total", + "scto", + "searchScrollTotal", + "segments.count", + "sc", + "segmentsCount", + "segments.fixed_bitset_memory", + "sfbm", + "fixedBitsetMemory", + "segments.index_writer_memory", + "siwm", + "segmentsIndexWriterMemory", + "segments.memory", + "sm", + "segmentsMemory", + "segments.version_map_memory", + "svmm", + "segmentsVersionMapMemory", + "seq_no.global_checkpoint", + "sqg", + "globalCheckpoint", + "seq_no.local_checkpoint", + "sql", + "localCheckpoint", + "seq_no.max", + "sqm", + "maxSeqNo", + "shard", + "s", + "sh", + "dsparse_vector.value_count", + "svc", + "sparseVectorCount", + "state", + "st", + "store", + "sto", + "suggest.current", + "suc", + "suggestCurrent", + "suggest.time", + "suti", + "suggestTime", + "suggest.total", + "suto", + "suggestTotal", + "sync_id", + "unassigned.at", + "ua", + "unassigned.details", + "ud", + "unassigned.for", + "uf", + "unassigned.reason", + "ur" + ] + }, + { + "type": "string" + } + ] + }, "cat.shards.ShardsRecord": { "type": "object", "properties": { @@ -62911,6 +68102,62 @@ } } }, + "cat._types.CatSnapshotsColumns": { + "oneOf": [ + { + "$ref": "#/components/schemas/cat._types.CatSnapshotsColumn" + }, + { + "type": "array", + "items": { + "$ref": "#/components/schemas/cat._types.CatSnapshotsColumn" + } + } + ] + }, + "cat._types.CatSnapshotsColumn": { + "anyOf": [ + { + "type": "string", + "enum": [ + "id", + "snapshot", + "repository", + "re", + "repo", + "status", + "s", + "start_epoch", + "ste", + "startEpoch", + "start_time", + "sti", + "startTime", + "end_epoch", + "ete", + "endEpoch", + "end_time", + "eti", + "endTime", + "duration", + "dur", + "indices", + "i", + "successful_shards", + "ss", + "failed_shards", + "fs", + "total_shards", + "ts", + "reason", + "r" + ] + }, + { + "type": "string" + } + ] + }, "cat.snapshots.SnapshotsRecord": { "type": "object", "properties": { @@ -63092,6 +68339,69 @@ } } }, + "cat._types.CatThreadPoolColumns": { + "oneOf": [ + { + "$ref": "#/components/schemas/cat._types.CatThreadPoolColumn" + }, + { + "type": "array", + "items": { + "$ref": "#/components/schemas/cat._types.CatThreadPoolColumn" + } + } + ] + }, + "cat._types.CatThreadPoolColumn": { + "anyOf": [ + { + "type": "string", + "enum": [ + "active", + "a", + "completed", + "c", + "core", + "cr", + "ephemeral_id", + "eid", + "host", + "h", + "ip", + "i", + "keep_alive", + "k", + "largest", + "l", + "max", + "mx", + "name", + "node_id", + "id", + "node_name", + "pid", + "p", + "pool_size", + "psz", + "port", + "po", + "queue", + "q", + "queue_size", + "qs", + "rejected", + "r", + "size", + "sz", + "type", + "t" + ] + }, + { + "type": "string" + } + ] + }, "cat.thread_pool.ThreadPoolRecord": { "type": "object", "properties": { @@ -63485,6 +68795,7 @@ "$ref": "#/components/schemas/indices._types.IndexSegmentSort" }, "number_of_shards": { + "default": "1", "x-state": "Generally available", "oneOf": [ { @@ -63496,6 +68807,7 @@ ] }, "number_of_replicas": { + "default": "0", "x-state": "Generally available", "oneOf": [ { @@ -63513,15 +68825,18 @@ "$ref": "#/components/schemas/indices._types.IndexCheckOnStartup" }, "codec": { + "default": "LZ4", "type": "string" }, "routing_partition_size": { "$ref": "#/components/schemas/_spec_utils.Stringifiedinteger" }, "load_fixed_bitset_filters_eagerly": { + "default": true, "type": "boolean" }, "hidden": { + "default": "false", "oneOf": [ { "type": "boolean" @@ -63532,6 +68847,7 @@ ] }, "auto_expand_replicas": { + "default": "false", "oneOf": [ { "type": "string" @@ -63551,24 +68867,31 @@ "$ref": "#/components/schemas/_types.Duration" }, "max_result_window": { + "default": 10000.0, "type": "number" }, "max_inner_result_window": { + "default": 100.0, "type": "number" }, "max_rescore_window": { + "default": 10000.0, "type": "number" }, "max_docvalue_fields_search": { + "default": 100.0, "type": "number" }, "max_script_fields": { + "default": 32.0, "type": "number" }, "max_ngram_diff": { + "default": 1.0, "type": "number" }, "max_shingle_diff": { + "default": 3.0, "type": "number" }, "blocks": { @@ -63584,9 +68907,11 @@ "$ref": "#/components/schemas/indices._types.SettingsHighlight" }, "max_terms_count": { + "default": 65536.0, "type": "number" }, "max_regex_length": { + "default": 1000.0, "type": "number" }, "routing": { @@ -63699,6 +69024,7 @@ "properties": { "enabled": { "description": "Indicates whether soft deletes are enabled on the index.", + "default": true, "type": "boolean" }, "retention_lease": { @@ -63939,6 +69265,7 @@ "type": "object", "properties": { "max_analyzed_offset": { + "default": 1000000.0, "type": "number" } } @@ -64048,6 +69375,7 @@ }, "origination_date": { "description": "If specified, this is the timestamp used to calculate the index age for its phase transitions. Use this setting\nif you create a new index that contains old data and want to use the original creation date to calculate the index\nage. Specified as a Unix epoch value in milliseconds.", + "default": 0.0, "type": "number" }, "parse_origination_date": { @@ -64059,10 +69387,12 @@ }, "rollover_alias": { "description": "The index alias to update when the index rolls over. Specify when using a policy that contains a rollover action.\nWhen the index rolls over, the alias is updated to reflect that the index is no longer the write index. For more\ninformation about rolling indices, see Rollover.", + "default": "", "type": "string" }, "prefer_ilm": { "description": "Preference for the system that manages a data stream backing index (preferring ILM when both ILM and DLM are\napplicable for an index).", + "default": "true", "oneOf": [ { "type": "boolean" @@ -64408,6 +69738,7 @@ }, "max_output_size": { "description": "The maximum token size to emit. Tokens larger than this size will be discarded.\nDefaults to `255`", + "default": 255.0, "type": "number" }, "separator": { @@ -64498,10 +69829,12 @@ }, "lowercase": { "description": "Should terms be lowercased or not.\nDefaults to `true`.", + "default": true, "type": "boolean" }, "pattern": { "description": "A Java regular expression.\nDefaults to `\\W+`.", + "default": "\\W+", "type": "string" }, "stopwords": { @@ -64544,6 +69877,7 @@ }, "max_token_length": { "description": "The maximum token length. If a token is seen that exceeds this length then it is split at `max_token_length` intervals.\nDefaults to `255`.", + "default": 255.0, "type": "number" }, "stopwords": { @@ -65846,12 +71180,21 @@ { "$ref": "#/components/schemas/_types.analysis.ApostropheTokenFilter" }, + { + "$ref": "#/components/schemas/_types.analysis.ArabicStemTokenFilter" + }, { "$ref": "#/components/schemas/_types.analysis.ArabicNormalizationTokenFilter" }, { "$ref": "#/components/schemas/_types.analysis.AsciiFoldingTokenFilter" }, + { + "$ref": "#/components/schemas/_types.analysis.BengaliNormalizationTokenFilter" + }, + { + "$ref": "#/components/schemas/_types.analysis.BrazilianStemTokenFilter" + }, { "$ref": "#/components/schemas/_types.analysis.CjkBigramTokenFilter" }, @@ -65867,12 +71210,18 @@ { "$ref": "#/components/schemas/_types.analysis.ConditionTokenFilter" }, + { + "$ref": "#/components/schemas/_types.analysis.CzechStemTokenFilter" + }, { "$ref": "#/components/schemas/_types.analysis.DecimalDigitTokenFilter" }, { "$ref": "#/components/schemas/_types.analysis.DelimitedPayloadTokenFilter" }, + { + "$ref": "#/components/schemas/_types.analysis.DutchStemTokenFilter" + }, { "$ref": "#/components/schemas/_types.analysis.EdgeNGramTokenFilter" }, @@ -65885,9 +71234,15 @@ { "$ref": "#/components/schemas/_types.analysis.FlattenGraphTokenFilter" }, + { + "$ref": "#/components/schemas/_types.analysis.FrenchStemTokenFilter" + }, { "$ref": "#/components/schemas/_types.analysis.GermanNormalizationTokenFilter" }, + { + "$ref": "#/components/schemas/_types.analysis.GermanStemTokenFilter" + }, { "$ref": "#/components/schemas/_types.analysis.HindiNormalizationTokenFilter" }, @@ -65945,6 +71300,9 @@ { "$ref": "#/components/schemas/_types.analysis.PersianNormalizationTokenFilter" }, + { + "$ref": "#/components/schemas/_types.analysis.PersianStemTokenFilter" + }, { "$ref": "#/components/schemas/_types.analysis.PorterStemTokenFilter" }, @@ -65957,6 +71315,9 @@ { "$ref": "#/components/schemas/_types.analysis.ReverseTokenFilter" }, + { + "$ref": "#/components/schemas/_types.analysis.RussianStemTokenFilter" + }, { "$ref": "#/components/schemas/_types.analysis.ScandinavianFoldingTokenFilter" }, @@ -66069,6 +71430,27 @@ } } }, + "_types.analysis.ArabicStemTokenFilter": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.analysis.TokenFilterBase" + }, + { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "arabic_stem" + ] + } + }, + "required": [ + "type" + ] + } + ] + }, "_types.analysis.ArabicNormalizationTokenFilter": { "allOf": [ { @@ -66114,6 +71496,48 @@ } ] }, + "_types.analysis.BengaliNormalizationTokenFilter": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.analysis.TokenFilterBase" + }, + { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "bengali_normalization" + ] + } + }, + "required": [ + "type" + ] + } + ] + }, + "_types.analysis.BrazilianStemTokenFilter": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.analysis.TokenFilterBase" + }, + { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "brazilian_stem" + ] + } + }, + "required": [ + "type" + ] + } + ] + }, "_types.analysis.CjkBigramTokenFilter": { "allOf": [ { @@ -66270,6 +71694,27 @@ } ] }, + "_types.analysis.CzechStemTokenFilter": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.analysis.TokenFilterBase" + }, + { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "czech_stem" + ] + } + }, + "required": [ + "type" + ] + } + ] + }, "_types.analysis.DecimalDigitTokenFilter": { "allOf": [ { @@ -66327,6 +71772,27 @@ "identity" ] }, + "_types.analysis.DutchStemTokenFilter": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.analysis.TokenFilterBase" + }, + { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "dutch_stem" + ] + } + }, + "required": [ + "type" + ] + } + ] + }, "_types.analysis.EdgeNGramTokenFilter": { "allOf": [ { @@ -66454,6 +71920,27 @@ } ] }, + "_types.analysis.FrenchStemTokenFilter": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.analysis.TokenFilterBase" + }, + { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "french_stem" + ] + } + }, + "required": [ + "type" + ] + } + ] + }, "_types.analysis.GermanNormalizationTokenFilter": { "allOf": [ { @@ -66475,6 +71962,27 @@ } ] }, + "_types.analysis.GermanStemTokenFilter": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.analysis.TokenFilterBase" + }, + { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "german_stem" + ] + } + }, + "required": [ + "type" + ] + } + ] + }, "_types.analysis.HindiNormalizationTokenFilter": { "allOf": [ { @@ -67060,6 +72568,9 @@ "description": "If `true`, all substrings matching the pattern parameter’s regular expression are replaced. If `false`, the filter replaces only the first matching substring in each token. Defaults to `true`.", "type": "boolean" }, + "flags": { + "type": "string" + }, "pattern": { "description": "Regular expression, written in Java’s regular expression syntax. The filter replaces token substrings matching this pattern with the substring in the `replacement` parameter.", "type": "string" @@ -67097,6 +72608,27 @@ } ] }, + "_types.analysis.PersianStemTokenFilter": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.analysis.TokenFilterBase" + }, + { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "persian_stem" + ] + } + }, + "required": [ + "type" + ] + } + ] + }, "_types.analysis.PorterStemTokenFilter": { "allOf": [ { @@ -67185,6 +72717,27 @@ } ] }, + "_types.analysis.RussianStemTokenFilter": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.analysis.TokenFilterBase" + }, + { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "russian_stem" + ] + } + }, + "required": [ + "type" + ] + } + ] + }, "_types.analysis.ScandinavianFoldingTokenFilter": { "allOf": [ { @@ -67854,10 +73407,10 @@ "alternate": { "$ref": "#/components/schemas/_types.analysis.IcuCollationAlternate" }, - "case_first": { + "caseFirst": { "$ref": "#/components/schemas/_types.analysis.IcuCollationCaseFirst" }, - "case_level": { + "caseLevel": { "type": "boolean" }, "country": { @@ -67866,7 +73419,7 @@ "decomposition": { "$ref": "#/components/schemas/_types.analysis.IcuCollationDecomposition" }, - "hiragana_quaternary_mode": { + "hiraganaQuaternaryMode": { "type": "boolean" }, "language": { @@ -67881,7 +73434,7 @@ "strength": { "$ref": "#/components/schemas/_types.analysis.IcuCollationStrength" }, - "variable_top": { + "variableTop": { "type": "string" }, "variant": { @@ -68344,6 +73897,7 @@ "type": "number" }, "token_chars": { + "default": [], "type": "array", "items": { "$ref": "#/components/schemas/_types.analysis.TokenChar" @@ -68382,6 +73936,7 @@ ] }, "buffer_size": { + "default": 256.0, "type": "number" } }, @@ -68457,6 +74012,7 @@ "type": "number" }, "token_chars": { + "default": [], "type": "array", "items": { "$ref": "#/components/schemas/_types.analysis.TokenChar" @@ -69103,6 +74659,7 @@ "properties": { "limit": { "description": "The maximum number of fields in an index. Field and object mappings, as well as field aliases count towards this limit.\nThe limit is in place to prevent mappings and searches from becoming too large. Higher values can lead to performance\ndegradations and memory issues, especially in clusters with a high load or few resources.", + "default": "1000", "oneOf": [ { "type": "number" @@ -69114,6 +74671,7 @@ }, "ignore_dynamic_beyond_limit": { "description": "This setting determines what happens when a dynamically mapped field would exceed the total fields limit. When set\nto false (the default), the index request of the document that tries to add a dynamic field to the mapping will fail\nwith the message Limit of total fields [X] has been exceeded. When set to true, the index request will not fail.\nInstead, fields that would exceed the limit are not added to the mapping, similar to dynamic: false.\nThe fields that were not added to the mapping will be added to the _ignored field.", + "default": "false", "oneOf": [ { "type": "boolean" @@ -69130,6 +74688,7 @@ "properties": { "limit": { "description": "The maximum depth for a field, which is measured as the number of inner objects. For instance, if all fields are defined\nat the root object level, then the depth is 1. If there is one object mapping, then the depth is 2, etc.", + "default": 20.0, "type": "number" } } @@ -69139,6 +74698,7 @@ "properties": { "limit": { "description": "The maximum number of distinct nested mappings in an index. The nested type should only be used in special cases, when\narrays of objects need to be queried independently of each other. To safeguard against poorly designed mappings, this\nsetting limits the number of unique nested types per index.", + "default": 50.0, "type": "number" } } @@ -69148,6 +74708,7 @@ "properties": { "limit": { "description": "The maximum number of nested JSON objects that a single document can contain across all nested types. This limit helps\nto prevent out of memory errors when a document contains too many nested objects.", + "default": 10000.0, "type": "number" } } @@ -69243,6 +74804,9 @@ "allow_mmap": { "description": "You can restrict the use of the mmapfs and the related hybridfs store type via the setting node.store.allow_mmap.\nThis is a boolean setting indicating whether or not memory-mapping is allowed. The default is to allow it. This\nsetting is useful, for example, if you are in an environment where you can not control the ability to create a lot\nof memory maps so you need disable the ability to use memory-mapping.", "type": "boolean" + }, + "stats_refresh_interval": { + "$ref": "#/components/schemas/_types.Duration" } }, "required": [ @@ -70395,6 +75959,9 @@ { "$ref": "#/components/schemas/_types.mapping.PassthroughObjectProperty" }, + { + "$ref": "#/components/schemas/_types.mapping.RankVectorProperty" + }, { "$ref": "#/components/schemas/_types.mapping.SemanticTextProperty" }, @@ -71319,6 +76886,9 @@ "default_metric": { "type": "string" }, + "ignore_malformed": { + "type": "boolean" + }, "metrics": { "type": "array", "items": { @@ -71360,6 +76930,7 @@ }, "index": { "description": "If `true`, you can search this field using the kNN search API.", + "default": true, "type": "boolean" }, "index_options": { @@ -71392,10 +76963,12 @@ }, "ef_construction": { "description": "The number of candidates to track while assembling the list of nearest neighbors for each new node.\n\nOnly applicable to `hnsw`, `int8_hnsw`, `bbq_hnsw`, and `int4_hnsw` index types.", + "default": 100.0, "type": "number" }, "m": { "description": "The number of neighbors each node will be connected to in the HNSW graph.\n\nOnly applicable to `hnsw`, `int8_hnsw`, `bbq_hnsw`, and `int4_hnsw` index types.", + "default": 16.0, "type": "number" }, "type": { @@ -71478,6 +77051,12 @@ "split_queries_on_whitespace": { "type": "boolean" }, + "time_series_dimensions": { + "type": "array", + "items": { + "type": "string" + } + }, "type": { "type": "string", "enum": [ @@ -71579,6 +77158,42 @@ } ] }, + "_types.mapping.RankVectorProperty": { + "description": "Technical preview", + "allOf": [ + { + "$ref": "#/components/schemas/_types.mapping.PropertyBase" + }, + { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "rank_vectors" + ] + }, + "element_type": { + "$ref": "#/components/schemas/_types.mapping.RankVectorElementType" + }, + "dims": { + "type": "number" + } + }, + "required": [ + "type" + ] + } + ] + }, + "_types.mapping.RankVectorElementType": { + "type": "string", + "enum": [ + "byte", + "float", + "bit" + ] + }, "_types.mapping.SemanticTextProperty": { "type": "object", "properties": { @@ -71613,18 +77228,22 @@ "properties": { "strategy": { "description": "The chunking strategy: `sentence` or `word`.", + "default": "sentence", "type": "string" }, "max_chunk_size": { "description": "The maximum size of a chunk in words.\nThis value cannot be higher than `300` or lower than `20` (for `sentence` strategy) or `10` (for `word` strategy).", + "default": 250.0, "type": "number" }, "overlap": { "description": "The number of overlapping words for chunks.\nIt is applicable only to a `word` chunking strategy.\nThis value cannot be higher than half the `max_chunk_size` value.", + "default": 100.0, "type": "number" }, "sentence_overlap": { "description": "The number of overlapping sentences for chunks.\nIt is applicable only for a `sentence` chunking strategy.\nIt can be either `1` or `0`.", + "default": 1.0, "type": "number" } }, @@ -71641,11 +77260,17 @@ { "type": "object", "properties": { + "store": { + "type": "boolean" + }, "type": { "type": "string", "enum": [ "sparse_vector" ] + }, + "index_options": { + "$ref": "#/components/schemas/_types.mapping.SparseVectorIndexOptions" } }, "required": [ @@ -71654,6 +77279,19 @@ } ] }, + "_types.mapping.SparseVectorIndexOptions": { + "type": "object", + "properties": { + "prune": { + "description": "Whether to perform pruning, omitting the non-significant tokens from the query to improve query performance.\nIf prune is true but the pruning_config is not specified, pruning will occur but default values will be used.\nDefault: false", + "x-state": "Generally available; Added in 8.19.0", + "type": "boolean" + }, + "pruning_config": { + "$ref": "#/components/schemas/_types.TokenPruningConfig" + } + } + }, "_types.mapping.CompletionProperty": { "allOf": [ { @@ -71952,6 +77590,9 @@ "enum": [ "geo_point" ] + }, + "time_series_metric": { + "$ref": "#/components/schemas/_types.mapping.GeoPointMetricType" } }, "required": [ @@ -71960,6 +77601,14 @@ } ] }, + "_types.mapping.GeoPointMetricType": { + "type": "string", + "enum": [ + "gauge", + "counter", + "position" + ] + }, "_types.mapping.GeoShapeProperty": { "description": "The `geo_shape` data type facilitates the indexing of and searching with arbitrary geo shapes such as rectangles\nand polygons.", "allOf": [ @@ -72142,6 +77791,7 @@ }, "time_series_dimension": { "description": "For internal use by Elastic only. Marks the field as a time series dimension. Defaults to false.", + "default": false, "x-state": "Technical preview", "type": "boolean" } @@ -72682,6 +78332,7 @@ }, "is_write_index": { "description": "If `true`, the index is the write index for the alias.", + "default": false, "type": "boolean" }, "routing": { @@ -72694,6 +78345,7 @@ }, "is_hidden": { "description": "If `true`, the alias is hidden.\nAll indices for the alias must have the same `is_hidden` value.", + "default": false, "x-state": "Generally available; Added in 7.16.0", "type": "boolean" } @@ -72762,6 +78414,7 @@ }, "enabled": { "description": "If defined, it turns data stream lifecycle on/off (`true`/`false`) for this data stream. A data stream lifecycle\nthat's disabled (enabled: `false`) will have no effect on the data stream.", + "default": true, "type": "boolean" } } @@ -72830,6 +78483,7 @@ "properties": { "enabled": { "description": "If defined, it turns the failure store on/off (`true`/`false`) for this data stream. A data stream failure store\nthat's disabled (enabled: `false`) will redirect no new failed indices to the failure store; however, it will\nnot remove any existing data from the failure store.", + "default": "true", "oneOf": [ { "type": "boolean" @@ -72872,6 +78526,7 @@ }, "enabled": { "description": "If defined, it turns data stream lifecycle on/off (`true`/`false`) for this data stream. A data stream lifecycle\nthat's disabled (enabled: `false`) will have no effect on the data stream.", + "default": true, "type": "boolean" } } @@ -73557,10 +79212,12 @@ }, "is_hidden": { "description": "If `true`, the alias is hidden.\nAll indices for the alias must have the same `is_hidden` value.", + "default": false, "type": "boolean" }, "is_write_index": { "description": "If `true`, the index is the write index for the alias.", + "default": false, "type": "boolean" }, "routing": { @@ -73899,6 +79556,19 @@ "nodes": { "$ref": "#/components/schemas/cluster.stats.ClusterNodes" }, + "repositories": { + "description": "Contains stats on repository feature usage exposed in cluster stats for telemetry.", + "type": "object", + "additionalProperties": { + "type": "object", + "additionalProperties": { + "type": "number" + } + } + }, + "snapshots": { + "$ref": "#/components/schemas/cluster.stats.ClusterSnapshotStats" + }, "status": { "$ref": "#/components/schemas/_types.HealthStatus" }, @@ -73915,7 +79585,8 @@ "cluster_uuid", "indices", "nodes", - "status", + "repositories", + "snapshots", "timestamp", "ccs" ] @@ -73944,6 +79615,9 @@ "query_cache": { "$ref": "#/components/schemas/_types.QueryCacheStats" }, + "search": { + "$ref": "#/components/schemas/cluster.stats.SearchUsageStats" + }, "segments": { "$ref": "#/components/schemas/_types.SegmentsStats" }, @@ -73962,19 +79636,26 @@ "items": { "$ref": "#/components/schemas/cluster.stats.IndicesVersions" } + }, + "dense_vector": { + "$ref": "#/components/schemas/cluster.stats.DenseVectorStats" + }, + "sparse_vector": { + "$ref": "#/components/schemas/cluster.stats.SparseVectorStats" } }, "required": [ - "analysis", "completion", "count", "docs", "fielddata", "query_cache", + "search", "segments", "shards", "store", - "mappings" + "dense_vector", + "sparse_vector" ] }, "cluster.stats.CharFilterTypes": { @@ -74035,6 +79716,13 @@ "items": { "$ref": "#/components/schemas/cluster.stats.FieldTypes" } + }, + "synonyms": { + "description": "Contains statistics about synonyms types used in selected nodes.", + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/cluster.stats.SynonymsStats" + } } }, "required": [ @@ -74045,7 +79733,8 @@ "built_in_tokenizers", "char_filter_types", "filter_types", - "tokenizer_types" + "tokenizer_types", + "synonyms" ] }, "cluster.stats.FieldTypes": { @@ -74078,6 +79767,27 @@ "description": "The number of fields that declare a script.", "x-state": "Generally available; Added in 7.13.0", "type": "number" + }, + "vector_index_type_count": { + "description": "For dense_vector field types, count of mappings by index type", + "type": "object", + "additionalProperties": { + "type": "number" + } + }, + "vector_similarity_type_count": { + "description": "For dense_vector field types, count of mappings by similarity", + "type": "object", + "additionalProperties": { + "type": "number" + } + }, + "vector_element_type_count": { + "description": "For dense_vector field types, count of mappings by element type", + "type": "object", + "additionalProperties": { + "type": "number" + } } }, "required": [ @@ -74086,6 +79796,21 @@ "index_count" ] }, + "cluster.stats.SynonymsStats": { + "type": "object", + "properties": { + "count": { + "type": "number" + }, + "index_count": { + "type": "number" + } + }, + "required": [ + "count", + "index_count" + ] + }, "_types.CompletionStats": { "type": "object", "properties": { @@ -74131,10 +79856,18 @@ "deleted": { "description": "Total number of deleted documents across all primary shards assigned to selected nodes.\nThis number is based on documents in Lucene segments.\nElasticsearch reclaims the disk space of deleted Lucene documents when a segment is merged.", "type": "number" + }, + "total_size_in_bytes": { + "description": "Returns the total size in bytes of all documents in this stats.\nThis value may be more reliable than store_stats.size_in_bytes in estimating the index size.", + "type": "number" + }, + "total_size": { + "$ref": "#/components/schemas/_types.ByteSize" } }, "required": [ - "count" + "count", + "total_size_in_bytes" ] }, "_types.FielddataStats": { @@ -74154,10 +79887,14 @@ "additionalProperties": { "$ref": "#/components/schemas/_types.FieldMemoryUsage" } + }, + "global_ordinals": { + "$ref": "#/components/schemas/_types.GlobalOrdinalsStats" } }, "required": [ - "memory_size_in_bytes" + "memory_size_in_bytes", + "global_ordinals" ] }, "_types.FieldMemoryUsage": { @@ -74174,6 +79911,44 @@ "memory_size_in_bytes" ] }, + "_types.GlobalOrdinalsStats": { + "type": "object", + "properties": { + "build_time_in_millis": { + "$ref": "#/components/schemas/_types.UnitMillis" + }, + "build_time": { + "type": "string" + }, + "fields": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/_types.GlobalOrdinalFieldStats" + } + } + }, + "required": [ + "build_time_in_millis" + ] + }, + "_types.GlobalOrdinalFieldStats": { + "type": "object", + "properties": { + "build_time_in_millis": { + "$ref": "#/components/schemas/_types.UnitMillis" + }, + "build_time": { + "type": "string" + }, + "shard_max_value_count": { + "type": "number" + } + }, + "required": [ + "build_time_in_millis", + "shard_max_value_count" + ] + }, "_types.QueryCacheStats": { "type": "object", "properties": { @@ -74219,6 +79994,45 @@ "total_count" ] }, + "cluster.stats.SearchUsageStats": { + "type": "object", + "properties": { + "total": { + "type": "number" + }, + "queries": { + "type": "object", + "additionalProperties": { + "type": "number" + } + }, + "rescorers": { + "type": "object", + "additionalProperties": { + "type": "number" + } + }, + "sections": { + "type": "object", + "additionalProperties": { + "type": "number" + } + }, + "retrievers": { + "type": "object", + "additionalProperties": { + "type": "number" + } + } + }, + "required": [ + "total", + "queries", + "rescorers", + "sections", + "retrievers" + ] + }, "_types.SegmentsStats": { "type": "object", "properties": { @@ -74250,9 +80064,6 @@ "index_writer_memory": { "$ref": "#/components/schemas/_types.ByteSize" }, - "index_writer_max_memory_in_bytes": { - "type": "number" - }, "index_writer_memory_in_bytes": { "description": "Total amount, in bytes, of memory used by all index writers across all shards assigned to selected nodes.", "type": "number" @@ -74282,13 +80093,13 @@ "description": "Total amount, in bytes, of memory used for points across all shards assigned to selected nodes.", "type": "number" }, - "stored_memory": { - "$ref": "#/components/schemas/_types.ByteSize" - }, "stored_fields_memory_in_bytes": { "description": "Total amount, in bytes, of memory used for stored fields across all shards assigned to selected nodes.", "type": "number" }, + "stored_fields_memory": { + "$ref": "#/components/schemas/_types.ByteSize" + }, "terms_memory_in_bytes": { "description": "Total amount, in bytes, of memory used for terms across all shards assigned to selected nodes.", "type": "number" @@ -74296,7 +80107,7 @@ "terms_memory": { "$ref": "#/components/schemas/_types.ByteSize" }, - "term_vectory_memory": { + "term_vectors_memory": { "$ref": "#/components/schemas/_types.ByteSize" }, "term_vectors_memory_in_bytes": { @@ -74477,10 +80288,19 @@ "total_deduplicated_mapping_size_in_bytes": { "description": "Total size of all mappings, in bytes, after deduplication and compression.", "type": "number" + }, + "source_modes": { + "description": "Source mode usage count.", + "type": "object", + "additionalProperties": { + "type": "number" + } } }, "required": [ - "field_types" + "field_types", + "runtime_field_types", + "source_modes" ] }, "cluster.stats.RuntimeFieldTypes": { @@ -74574,6 +80394,9 @@ "total_primary_bytes": { "type": "number" }, + "total_primary_size": { + "$ref": "#/components/schemas/_types.ByteSize" + }, "version": { "$ref": "#/components/schemas/_types.VersionString" } @@ -74585,6 +80408,82 @@ "version" ] }, + "cluster.stats.DenseVectorStats": { + "type": "object", + "properties": { + "value_count": { + "type": "number" + }, + "off_heap": { + "$ref": "#/components/schemas/cluster.stats.DenseVectorOffHeapStats" + } + }, + "required": [ + "value_count" + ] + }, + "cluster.stats.DenseVectorOffHeapStats": { + "type": "object", + "properties": { + "total_size_bytes": { + "type": "number" + }, + "total_size": { + "$ref": "#/components/schemas/_types.ByteSize" + }, + "total_veb_size_bytes": { + "type": "number" + }, + "total_veb_size": { + "$ref": "#/components/schemas/_types.ByteSize" + }, + "total_vec_size_bytes": { + "type": "number" + }, + "total_vec_size": { + "$ref": "#/components/schemas/_types.ByteSize" + }, + "total_veq_size_bytes": { + "type": "number" + }, + "total_veq_size": { + "$ref": "#/components/schemas/_types.ByteSize" + }, + "total_vex_size_bytes": { + "type": "number" + }, + "total_vex_size": { + "$ref": "#/components/schemas/_types.ByteSize" + }, + "fielddata": { + "type": "object", + "additionalProperties": { + "type": "object", + "additionalProperties": { + "type": "number" + } + } + } + }, + "required": [ + "total_size_bytes", + "total_veb_size_bytes", + "total_vec_size_bytes", + "total_veq_size_bytes", + "total_vex_size_bytes" + ] + }, + "cluster.stats.SparseVectorStats": { + "type": "object", + "properties": { + "value_count": { + "type": "number" + } + }, + "required": [ + "value_count" + ] + }, "cluster.stats.ClusterNodes": { "type": "object", "properties": { @@ -74659,6 +80558,9 @@ "cluster.stats.ClusterNodeCount": { "type": "object", "properties": { + "total": { + "type": "number" + }, "coordinating_only": { "type": "number" }, @@ -74681,6 +80583,9 @@ "data_warm": { "type": "number" }, + "index": { + "type": "number" + }, "ingest": { "type": "number" }, @@ -74693,7 +80598,7 @@ "remote_cluster_client": { "type": "number" }, - "total": { + "search": { "type": "number" }, "transform": { @@ -74704,108 +80609,154 @@ } }, "required": [ - "coordinating_only", - "data", - "data_cold", - "data_content", - "data_hot", - "data_warm", - "ingest", - "master", - "ml", - "remote_cluster_client", - "total", - "transform", - "voting_only" + "total" ] }, "cluster.stats.ClusterFileSystem": { "type": "object", "properties": { + "path": { + "type": "string" + }, + "mount": { + "type": "string" + }, + "type": { + "type": "string" + }, "available_in_bytes": { "description": "Total number of bytes available to JVM in file stores across all selected nodes.\nDepending on operating system or process-level restrictions, this number may be less than `nodes.fs.free_in_byes`.\nThis is the actual amount of free disk space the selected Elasticsearch nodes can use.", "type": "number" }, + "available": { + "$ref": "#/components/schemas/_types.ByteSize" + }, "free_in_bytes": { - "description": "Total number of unallocated bytes in file stores across all selected nodes.", + "description": "Total number, in bytes, of unallocated bytes in file stores across all selected nodes.", "type": "number" }, + "free": { + "$ref": "#/components/schemas/_types.ByteSize" + }, "total_in_bytes": { "description": "Total size, in bytes, of all file stores across all selected nodes.", "type": "number" + }, + "total": { + "$ref": "#/components/schemas/_types.ByteSize" + }, + "low_watermark_free_space": { + "$ref": "#/components/schemas/_types.ByteSize" + }, + "low_watermark_free_space_in_bytes": { + "type": "number" + }, + "high_watermark_free_space": { + "$ref": "#/components/schemas/_types.ByteSize" + }, + "high_watermark_free_space_in_bytes": { + "type": "number" + }, + "flood_stage_free_space": { + "$ref": "#/components/schemas/_types.ByteSize" + }, + "flood_stage_free_space_in_bytes": { + "type": "number" + }, + "frozen_flood_stage_free_space": { + "$ref": "#/components/schemas/_types.ByteSize" + }, + "frozen_flood_stage_free_space_in_bytes": { + "type": "number" } - }, - "required": [ - "available_in_bytes", - "free_in_bytes", - "total_in_bytes" - ] + } }, "cluster.stats.IndexingPressure": { "type": "object", "properties": { "memory": { - "$ref": "#/components/schemas/cluster.stats.IndexingPressureMemory" + "$ref": "#/components/schemas/nodes._types.IndexingPressureMemory" } }, "required": [ "memory" ] }, - "cluster.stats.IndexingPressureMemory": { + "nodes._types.IndexingPressureMemory": { "type": "object", "properties": { - "current": { - "$ref": "#/components/schemas/cluster.stats.IndexingPressureMemorySummary" + "limit": { + "$ref": "#/components/schemas/_types.ByteSize" }, "limit_in_bytes": { + "description": "Configured memory limit, in bytes, for the indexing requests.\nReplica requests have an automatic limit that is 1.5x this value.", "type": "number" }, + "current": { + "$ref": "#/components/schemas/nodes._types.PressureMemory" + }, "total": { - "$ref": "#/components/schemas/cluster.stats.IndexingPressureMemorySummary" + "$ref": "#/components/schemas/nodes._types.PressureMemory" } - }, - "required": [ - "current", - "limit_in_bytes", - "total" - ] + } }, - "cluster.stats.IndexingPressureMemorySummary": { + "nodes._types.PressureMemory": { "type": "object", "properties": { + "all": { + "$ref": "#/components/schemas/_types.ByteSize" + }, "all_in_bytes": { + "description": "Memory consumed, in bytes, by indexing requests in the coordinating, primary, or replica stage.", "type": "number" }, + "combined_coordinating_and_primary": { + "$ref": "#/components/schemas/_types.ByteSize" + }, "combined_coordinating_and_primary_in_bytes": { + "description": "Memory consumed, in bytes, by indexing requests in the coordinating or primary stage.\nThis value is not the sum of coordinating and primary as a node can reuse the coordinating memory if the primary stage is executed locally.", "type": "number" }, + "coordinating": { + "$ref": "#/components/schemas/_types.ByteSize" + }, "coordinating_in_bytes": { + "description": "Memory consumed, in bytes, by indexing requests in the coordinating stage.", "type": "number" }, - "coordinating_rejections": { - "type": "number" + "primary": { + "$ref": "#/components/schemas/_types.ByteSize" }, "primary_in_bytes": { + "description": "Memory consumed, in bytes, by indexing requests in the primary stage.", "type": "number" }, - "primary_rejections": { - "type": "number" + "replica": { + "$ref": "#/components/schemas/_types.ByteSize" }, "replica_in_bytes": { + "description": "Memory consumed, in bytes, by indexing requests in the replica stage.", + "type": "number" + }, + "coordinating_rejections": { + "description": "Number of indexing requests rejected in the coordinating stage.", + "type": "number" + }, + "primary_rejections": { + "description": "Number of indexing requests rejected in the primary stage.", "type": "number" }, "replica_rejections": { + "description": "Number of indexing requests rejected in the replica stage.", + "type": "number" + }, + "primary_document_rejections": { + "type": "number" + }, + "large_operation_rejections": { "type": "number" } - }, - "required": [ - "all_in_bytes", - "combined_coordinating_and_primary_in_bytes", - "coordinating_in_bytes", - "primary_in_bytes", - "replica_in_bytes" - ] + } }, "cluster.stats.ClusterIngest": { "type": "object", @@ -74857,6 +80808,9 @@ "max_uptime_in_millis": { "$ref": "#/components/schemas/_types.DurationValueUnitMillis" }, + "max_uptime": { + "$ref": "#/components/schemas/_types.Duration" + }, "mem": { "$ref": "#/components/schemas/cluster.stats.ClusterJvmMemory" }, @@ -74886,9 +80840,15 @@ "description": "Maximum amount of memory, in bytes, available for use by the heap across all selected nodes.", "type": "number" }, + "heap_max": { + "$ref": "#/components/schemas/_types.ByteSize" + }, "heap_used_in_bytes": { "description": "Memory, in bytes, currently in use by the heap across all selected nodes.", "type": "number" + }, + "heap_used": { + "$ref": "#/components/schemas/_types.ByteSize" } }, "required": [ @@ -75028,10 +80988,16 @@ "x-state": "Generally available; Added in 7.16.0", "type": "number" }, + "adjusted_total": { + "$ref": "#/components/schemas/_types.ByteSize" + }, "free_in_bytes": { "description": "Amount, in bytes, of free physical memory across all selected nodes.", "type": "number" }, + "free": { + "$ref": "#/components/schemas/_types.ByteSize" + }, "free_percent": { "description": "Percentage of free physical memory across all selected nodes.", "type": "number" @@ -75040,10 +81006,16 @@ "description": "Total amount, in bytes, of physical memory across all selected nodes.", "type": "number" }, + "total": { + "$ref": "#/components/schemas/_types.ByteSize" + }, "used_in_bytes": { "description": "Amount, in bytes, of physical memory in use across all selected nodes.", "type": "number" }, + "used": { + "$ref": "#/components/schemas/_types.ByteSize" + }, "used_percent": { "description": "Percentage of physical memory in use across all selected nodes.", "type": "number" @@ -75206,6 +81178,139 @@ "min" ] }, + "cluster.stats.ClusterSnapshotStats": { + "type": "object", + "properties": { + "current_counts": { + "$ref": "#/components/schemas/cluster.stats.SnapshotCurrentCounts" + }, + "repositories": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/cluster.stats.PerRepositoryStats" + } + } + }, + "required": [ + "current_counts", + "repositories" + ] + }, + "cluster.stats.SnapshotCurrentCounts": { + "type": "object", + "properties": { + "snapshots": { + "description": "Snapshots currently in progress", + "type": "number" + }, + "shard_snapshots": { + "description": "Incomplete shard snapshots", + "type": "number" + }, + "snapshot_deletions": { + "description": "Snapshots deletions in progress", + "type": "number" + }, + "concurrent_operations": { + "description": "Sum of snapshots and snapshot_deletions", + "type": "number" + }, + "cleanups": { + "description": "Cleanups in progress, not counted in concurrent_operations as they are not concurrent", + "type": "number" + } + }, + "required": [ + "snapshots", + "shard_snapshots", + "snapshot_deletions", + "concurrent_operations", + "cleanups" + ] + }, + "cluster.stats.PerRepositoryStats": { + "type": "object", + "properties": { + "type": { + "type": "string" + }, + "oldest_start_time_millis": { + "$ref": "#/components/schemas/_types.UnitMillis" + }, + "oldest_start_time": { + "$ref": "#/components/schemas/_types.DateFormat" + }, + "current_counts": { + "$ref": "#/components/schemas/cluster.stats.RepositoryStatsCurrentCounts" + } + }, + "required": [ + "type", + "oldest_start_time_millis", + "current_counts" + ] + }, + "cluster.stats.RepositoryStatsCurrentCounts": { + "type": "object", + "properties": { + "snapshots": { + "type": "number" + }, + "clones": { + "type": "number" + }, + "finalizations": { + "type": "number" + }, + "deletions": { + "type": "number" + }, + "snapshot_deletions": { + "type": "number" + }, + "active_deletions": { + "type": "number" + }, + "shards": { + "$ref": "#/components/schemas/cluster.stats.RepositoryStatsShards" + } + }, + "required": [ + "snapshots", + "clones", + "finalizations", + "deletions", + "snapshot_deletions", + "active_deletions", + "shards" + ] + }, + "cluster.stats.RepositoryStatsShards": { + "type": "object", + "properties": { + "total": { + "type": "number" + }, + "complete": { + "type": "number" + }, + "incomplete": { + "type": "number" + }, + "states": { + "type": "object", + "additionalProperties": { + "type": "number" + } + } + }, + "required": [ + "total", + "complete", + "incomplete", + "states" + ] + }, "cluster.stats.CCSStats": { "type": "object", "properties": { @@ -75242,7 +81347,7 @@ "description": "The `skip_unavailable` setting used for this remote cluster.", "type": "boolean" }, - "transport_compress": { + "transport.compress": { "description": "Transport compression setting used for this remote cluster.", "type": "string" }, @@ -75297,7 +81402,7 @@ "cluster_uuid", "mode", "skip_unavailable", - "transport_compress", + "transport.compress", "status", "version", "nodes_count", @@ -76328,13 +82433,6 @@ "scheduled" ] }, - "_types.OpType": { - "type": "string", - "enum": [ - "index", - "create" - ] - }, "_types.WriteResponseBase": { "type": "object", "properties": { @@ -77017,9 +83115,11 @@ "type": "object", "properties": { "id": { + "description": "The ID of the async query, to be used in subsequent requests to check the status or retrieve results.\n\nAlso available in the `X-Elasticsearch-Async-Id` HTTP header.", "type": "string" }, "is_running": { + "description": "Indicates whether the async query is still running or has completed.\n\nAlso available in the `X-Elasticsearch-Async-Is-Running` HTTP header.", "type": "boolean" } }, @@ -77695,14 +83795,17 @@ }, "min_doc_count": { "description": "Specifies how many documents must contain a pair of terms before it is considered to be a useful connection.\nThis setting acts as a certainty threshold.", + "default": 3.0, "type": "number" }, "shard_min_doc_count": { "description": "Controls how many documents on a particular shard have to contain a pair of terms before the connection is returned for global consideration.", + "default": 2.0, "type": "number" }, "size": { "description": "Specifies the maximum number of vertex terms returned for each field.", + "default": 5.0, "type": "number" } }, @@ -77732,6 +83835,7 @@ }, "sample_size": { "description": "Each hop considers a sample of the best-matching documents on each shard.\nUsing samples improves the speed of execution and keeps exploration focused on meaningfully-connected terms.\nVery small values (less than 50) might not provide sufficient weight-of-evidence to identify significant connections between terms.\nVery large sample sizes can dilute the quality of the results and increase execution times.", + "default": 100.0, "type": "number" }, "timeout": { @@ -77979,7 +84083,8 @@ "green", "yellow", "red", - "unknown" + "unknown", + "unavailable" ] }, "_global.health_report.Impact": { @@ -78879,7 +84984,14 @@ "phase" ] }, - "indices.add_block.IndicesBlockOptions": { + "_types.OpType": { + "type": "string", + "enum": [ + "index", + "create" + ] + }, + "indices._types.IndicesBlockOptions": { "type": "string", "enum": [ "metadata", @@ -78888,7 +85000,7 @@ "write" ] }, - "indices.add_block.IndicesBlockStatus": { + "indices.add_block.AddIndicesBlockStatus": { "type": "object", "properties": { "name": { @@ -79121,6 +85233,7 @@ }, "remove_index_blocks": { "description": "If index blocks should be removed when creating destination index (optional)", + "default": true, "type": "boolean" } } @@ -79168,6 +85281,21 @@ } ] }, + "indices.delete_alias.IndicesAliasesResponseBody": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.AcknowledgedResponseBase" + }, + { + "type": "object", + "properties": { + "errors": { + "type": "boolean" + } + } + } + ] + }, "_types.DataStreamNames": { "oneOf": [ { @@ -79265,7 +85393,7 @@ "settings" ] }, - "indices.get_alias.IndexAliases": { + "indices.get_alias._types.IndexAliases": { "type": "object", "properties": { "aliases": { @@ -79508,6 +85636,7 @@ "properties": { "enabled": { "description": "If defined, it turns the failure store on/off (`true`/`false`) for this data stream. A data stream failure store\nthat's disabled (enabled: `false`) will redirect no new failed indices to the failure store; however, it will\nnot remove any existing data from the failure store.", + "default": true, "type": "boolean" }, "lifecycle": { @@ -79524,6 +85653,7 @@ }, "enabled": { "description": "If defined, it turns data stream lifecycle on/off (`true`/`false`) for this data stream. A data stream lifecycle\nthat's disabled (enabled: `false`) will have no effect on the data stream.", + "default": true, "type": "boolean" } } @@ -79681,10 +85811,12 @@ "properties": { "hidden": { "description": "If true, the data stream is hidden.", + "default": false, "type": "boolean" }, "allow_custom_routing": { "description": "If true, the data stream supports custom routing.", + "default": false, "type": "boolean" } } @@ -80306,6 +86438,23 @@ "reloaded_node_ids" ] }, + "indices.remove_block.RemoveIndicesBlockStatus": { + "type": "object", + "properties": { + "name": { + "$ref": "#/components/schemas/_types.IndexName" + }, + "unblocked": { + "type": "boolean" + }, + "exception": { + "$ref": "#/components/schemas/_types.ErrorCause" + } + }, + "required": [ + "name" + ] + }, "indices.resolve_cluster.ResolveClusterInfo": { "description": "Provides information about each cluster request relevant to doing a cross-cluster search.", "type": "object", @@ -81127,6 +87276,9 @@ "suggest_total": { "type": "number" }, + "recent_search_load": { + "type": "number" + }, "groups": { "type": "object", "additionalProperties": { @@ -81599,6 +87751,7 @@ }, "is_hidden": { "description": "If `true`, the alias is hidden.", + "default": false, "type": "boolean" }, "is_write_index": { @@ -81613,6 +87766,7 @@ }, "must_exist": { "description": "If `true`, the alias must exist to perform the action.", + "default": false, "type": "boolean" } } @@ -81645,6 +87799,7 @@ }, "must_exist": { "description": "If `true`, the alias must exist to perform the action.", + "default": false, "type": "boolean" } } @@ -81660,6 +87815,7 @@ }, "must_exist": { "description": "If `true`, the alias must exist to perform the action.", + "default": false, "type": "boolean" } } @@ -82029,18 +88185,22 @@ "properties": { "max_chunk_size": { "description": "The maximum size of a chunk in words.\nThis value cannot be higher than `300` or lower than `20` (for `sentence` strategy) or `10` (for `word` strategy).", + "default": 250.0, "type": "number" }, "overlap": { "description": "The number of overlapping words for chunks.\nIt is applicable only to a `word` chunking strategy.\nThis value cannot be higher than half the `max_chunk_size` value.", + "default": 100.0, "type": "number" }, "sentence_overlap": { "description": "The number of overlapping sentences for chunks.\nIt is applicable only for a `sentence` chunking strategy.\nIt can be either `1` or `0`.", + "default": 1.0, "type": "number" }, "strategy": { "description": "The chunking strategy: `sentence` or `word`.", + "default": "sentence", "type": "string" } } @@ -82331,6 +88491,7 @@ "properties": { "max_new_tokens": { "description": "For a `completion` task, it sets the maximum number for the output tokens to be generated.", + "default": 64.0, "type": "number" }, "temperature": { @@ -82523,6 +88684,7 @@ }, "max_new_tokens": { "description": "For a `completion` task, provide a hint for the maximum number of output tokens to be generated.", + "default": 64.0, "type": "number" }, "temperature": { @@ -82793,6 +88955,182 @@ "completion" ] }, + "inference._types.CustomTaskType": { + "type": "string", + "enum": [ + "text_embedding", + "sparse_embedding", + "rerank", + "completion" + ] + }, + "inference._types.CustomServiceType": { + "type": "string", + "enum": [ + "custom" + ] + }, + "inference._types.CustomServiceSettings": { + "type": "object", + "properties": { + "headers": { + "description": "Specifies the HTTPS header parameters – such as `Authentication` or `Contet-Type` – that are required to access the custom service.\nFor example:\n```\n\"headers\":{\n \"Authorization\": \"Bearer ${api_key}\",\n \"Content-Type\": \"application/json;charset=utf-8\"\n}\n```", + "type": "object" + }, + "input_type": { + "description": "Specifies the input type translation values that are used to replace the `${input_type}` template in the request body.\nFor example:\n```\n\"input_type\": {\n \"translation\": {\n \"ingest\": \"do_ingest\",\n \"search\": \"do_search\"\n },\n \"default\": \"a_default\"\n},\n```\nIf the subsequent inference requests come from a search context, the `search` key will be used and the template will be replaced with `do_search`.\nIf it comes from the ingest context `do_ingest` is used. If it's a different context that is not specified, the default value will be used. If no default is specified an empty string is used.\n`translation` can be:\n* `classification`\n* `clustering`\n* `ingest`\n* `search`", + "type": "object" + }, + "query_parameters": { + "description": "Specifies the query parameters as a list of tuples. The arrays inside the `query_parameters` must have two items, a key and a value.\nFor example:\n```\n\"query_parameters\":[\n [\"param_key\", \"some_value\"],\n [\"param_key\", \"another_value\"],\n [\"other_key\", \"other_value\"]\n]\n```\nIf the base url is `https://www.elastic.co` it results in: `https://www.elastic.co?param_key=some_value¶m_key=another_value&other_key=other_value`.", + "type": "object" + }, + "request": { + "$ref": "#/components/schemas/inference._types.CustomRequestParams" + }, + "response": { + "$ref": "#/components/schemas/inference._types.CustomResponseParams" + }, + "secret_parameters": { + "description": "Specifies secret parameters, like `api_key` or `api_token`, that are required to access the custom service.\nFor example:\n```\n\"secret_parameters\":{\n \"api_key\":\"\"\n}\n```", + "type": "object" + }, + "url": { + "description": "The URL endpoint to use for the requests.", + "type": "string" + } + }, + "required": [ + "request", + "response", + "secret_parameters" + ] + }, + "inference._types.CustomRequestParams": { + "type": "object", + "properties": { + "content": { + "description": "The body structure of the request. It requires passing in the string-escaped result of the JSON format HTTP request body.\nFor example:\n```\n\"request\": \"{\\\"input\\\":${input}}\"\n```\n> info\n> The content string needs to be a single line except when using the Kibana console.", + "type": "string" + } + }, + "required": [ + "content" + ] + }, + "inference._types.CustomResponseParams": { + "type": "object", + "properties": { + "json_parser": { + "description": "Specifies the JSON parser that is used to parse the response from the custom service.\nDifferent task types require different json_parser parameters.\nFor example:\n```\n# text_embedding\n# For a response like this:\n\n{\n \"object\": \"list\",\n \"data\": [\n {\n \"object\": \"embedding\",\n \"index\": 0,\n \"embedding\": [\n 0.014539449,\n -0.015288644\n ]\n }\n ],\n \"model\": \"text-embedding-ada-002-v2\",\n \"usage\": {\n \"prompt_tokens\": 8,\n \"total_tokens\": 8\n }\n}\n\n# the json_parser definition should look like this:\n\n\"response\":{\n \"json_parser\":{\n \"text_embeddings\":\"$.data[*].embedding[*]\"\n }\n}\n\n# sparse_embedding\n# For a response like this:\n\n{\n \"request_id\": \"75C50B5B-E79E-4930-****-F48DBB392231\",\n \"latency\": 22,\n \"usage\": {\n \"token_count\": 11\n },\n \"result\": {\n \"sparse_embeddings\": [\n {\n \"index\": 0,\n \"embedding\": [\n {\n \"token_id\": 6,\n \"weight\": 0.101\n },\n {\n \"token_id\": 163040,\n \"weight\": 0.28417\n }\n ]\n }\n ]\n }\n}\n\n# the json_parser definition should look like this:\n\n\"response\":{\n \"json_parser\":{\n \"token_path\":\"$.result.sparse_embeddings[*].embedding[*].token_id\",\n \"weight_path\":\"$.result.sparse_embeddings[*].embedding[*].weight\"\n }\n}\n\n# rerank\n# For a response like this:\n\n{\n \"results\": [\n {\n \"index\": 3,\n \"relevance_score\": 0.999071,\n \"document\": \"abc\"\n },\n {\n \"index\": 4,\n \"relevance_score\": 0.7867867,\n \"document\": \"123\"\n },\n {\n \"index\": 0,\n \"relevance_score\": 0.32713068,\n \"document\": \"super\"\n }\n ],\n}\n\n# the json_parser definition should look like this:\n\n\"response\":{\n \"json_parser\":{\n \"reranked_index\":\"$.result.scores[*].index\", // optional\n \"relevance_score\":\"$.result.scores[*].score\",\n \"document_text\":\"xxx\" // optional\n }\n}\n\n# completion\n# For a response like this:\n\n{\n \"id\": \"chatcmpl-B9MBs8CjcvOU2jLn4n570S5qMJKcT\",\n \"object\": \"chat.completion\",\n \"created\": 1741569952,\n \"model\": \"gpt-4.1-2025-04-14\",\n \"choices\": [\n {\n \"index\": 0,\n \"message\": {\n \"role\": \"assistant\",\n \"content\": \"Hello! How can I assist you today?\",\n \"refusal\": null,\n \"annotations\": []\n },\n \"logprobs\": null,\n \"finish_reason\": \"stop\"\n }\n ]\n}\n\n# the json_parser definition should look like this:\n\n\"response\":{\n \"json_parser\":{\n \"completion_result\":\"$.choices[*].message.content\"\n }\n}", + "type": "object" + } + }, + "required": [ + "json_parser" + ] + }, + "inference._types.CustomTaskSettings": { + "type": "object", + "properties": { + "parameters": { + "description": "Specifies parameters that are required to run the custom service. The parameters depend on the model your custom service uses.\nFor example:\n```\n\"task_settings\":{\n \"parameters\":{\n \"input_type\":\"query\",\n \"return_token\":true\n }\n}\n```", + "type": "object" + } + } + }, + "inference._types.InferenceEndpointInfoCustom": { + "allOf": [ + { + "$ref": "#/components/schemas/inference._types.InferenceEndpoint" + }, + { + "type": "object", + "properties": { + "inference_id": { + "description": "The inference Id", + "type": "string" + }, + "task_type": { + "$ref": "#/components/schemas/inference._types.TaskTypeCustom" + } + }, + "required": [ + "inference_id", + "task_type" + ] + } + ] + }, + "inference._types.TaskTypeCustom": { + "type": "string", + "enum": [ + "text_embedding", + "sparse_embedding", + "rerank", + "completion" + ] + }, + "inference._types.TaskTypeDeepSeek": { + "type": "string", + "enum": [ + "completion", + "chat_completion" + ] + }, + "inference._types.DeepSeekServiceType": { + "type": "string", + "enum": [ + "deepseek" + ] + }, + "inference._types.DeepSeekServiceSettings": { + "type": "object", + "properties": { + "api_key": { + "externalDocs": { + "url": "https://api-docs.deepseek.com/" + }, + "description": "A valid API key for your DeepSeek account.\nYou can find or create your DeepSeek API keys on the DeepSeek API key page.\n\nIMPORTANT: You need to provide the API key only once, during the inference model creation.\nThe get inference endpoint API does not retrieve your API key.\nAfter creating the inference model, you cannot change the associated API key.\nIf you want to use a different API key, delete the inference model and recreate it with the same name and the updated API key.", + "type": "string" + }, + "model_id": { + "description": "For a `completion` or `chat_completion` task, the name of the model to use for the inference task.\n\nFor the available `completion` and `chat_completion` models, refer to the [DeepSeek Models & Pricing docs](https://api-docs.deepseek.com/quick_start/pricing).", + "type": "string" + }, + "url": { + "description": "The URL endpoint to use for the requests. Defaults to `https://api.deepseek.com/chat/completions`.", + "type": "string" + } + }, + "required": [ + "api_key", + "model_id" + ] + }, + "inference._types.InferenceEndpointInfoDeepSeek": { + "allOf": [ + { + "$ref": "#/components/schemas/inference._types.InferenceEndpoint" + }, + { + "type": "object", + "properties": { + "inference_id": { + "description": "The inference Id", + "type": "string" + }, + "task_type": { + "$ref": "#/components/schemas/inference._types.TaskTypeDeepSeek" + } + }, + "required": [ + "inference_id", + "task_type" + ] + } + ] + }, "inference._types.ElasticsearchTaskType": { "type": "string", "enum": [ @@ -82843,6 +89181,7 @@ "properties": { "enabled": { "description": "Turn on `adaptive_allocations`.", + "default": false, "type": "boolean" }, "max_number_of_allocations": { @@ -82860,6 +89199,7 @@ "properties": { "return_documents": { "description": "For a `rerank` task, return the document instead of only the index.", + "default": true, "type": "boolean" } } @@ -83426,6 +89766,7 @@ }, "url": { "description": "The URL endpoint to use for the requests.\nIt can be changed for testing purposes.", + "default": "https://api.openai.com/v1/embeddings.", "type": "string" } }, @@ -83528,6 +89869,7 @@ }, "return_documents": { "description": "Whether to return the source documents in the response.\nOnly for the `rerank` task type.", + "default": false, "type": "boolean" }, "top_k": { @@ -83536,6 +89878,7 @@ }, "truncation": { "description": "Whether to truncate the input texts to fit within the context length.", + "default": true, "type": "boolean" } } @@ -83747,7 +90090,7 @@ "$ref": "#/components/schemas/_types.VersionString" }, "number": { - "description": "The Elasticsearch version number.", + "description": "The Elasticsearch version number.\n\n::: IMPORTANT: For Serverless deployments, this static value is always `8.11.0` and is used solely for backward compatibility with legacy clients.\n Serverless environments are versionless and automatically upgraded, so this value can be safely ignored.", "type": "string" } }, @@ -83999,6 +90342,7 @@ }, "deprecated": { "description": "Marks this ingest pipeline as deprecated.\nWhen a deprecated ingest pipeline is referenced as the default or final pipeline when creating or updating a non-deprecated index template, Elasticsearch will emit a deprecation warning.", + "default": false, "type": "boolean" }, "_meta": { @@ -84175,6 +90519,7 @@ }, "allow_duplicates": { "description": "If `false`, the processor does not append values already present in the field.", + "default": true, "type": "boolean" } }, @@ -84225,10 +90570,12 @@ }, "ignore_missing": { "description": "If `true` and field does not exist, the processor quietly exits without modifying the document.", + "default": false, "type": "boolean" }, "indexed_chars": { "description": "The number of chars being used for extraction to prevent huge fields.\nUse `-1` for no limit.", + "default": 100000.0, "type": "number" }, "indexed_chars_field": { @@ -84246,6 +90593,7 @@ }, "remove_binary": { "description": "If true, the binary field will be removed from the document", + "default": false, "type": "boolean" }, "resource_name": { @@ -84272,6 +90620,7 @@ }, "ignore_missing": { "description": "If `true` and `field` does not exist or is `null`, the processor quietly exits without modifying the document.", + "default": false, "type": "boolean" }, "target_field": { @@ -84301,6 +90650,7 @@ }, "ignore_missing": { "description": "If `true` and `field` does not exist, the processor quietly exits without modifying the document.", + "default": false, "type": "boolean" }, "shape_type": { @@ -84362,10 +90712,12 @@ }, "seed": { "description": "Seed for the community ID hash. Must be between 0 and 65535 (inclusive). The\nseed can prevent hash collisions between network domains, such as a staging\nand production network that use the same addressing scheme.", + "default": 0.0, "type": "number" }, "ignore_missing": { "description": "If true and any required fields are missing, the processor quietly exits\nwithout modifying the document.", + "default": true, "type": "boolean" } } @@ -84385,6 +90737,7 @@ }, "ignore_missing": { "description": "If `true` and `field` does not exist or is `null`, the processor quietly exits without modifying the document.", + "default": false, "type": "boolean" }, "target_field": { @@ -84435,10 +90788,12 @@ }, "quote": { "description": "Quote used in CSV, has to be single character string.", + "default": "\"", "type": "string" }, "separator": { "description": "Separator used in CSV, has to be single character string.", + "default": ",", "type": "string" }, "target_fields": { @@ -84476,6 +90831,7 @@ }, "locale": { "description": "The locale to use when parsing the date, relevant when parsing month names or week days.\nSupports template snippets.", + "default": "ENGLISH", "type": "string" }, "target_field": { @@ -84483,10 +90839,12 @@ }, "timezone": { "description": "The timezone to use when parsing the date.\nSupports template snippets.", + "default": "UTC", "type": "string" }, "output_format": { "description": "The format to use when writing the date to target_field. Must be a valid\njava time pattern.", + "default": "yyyy-MM-dd'T'HH:mm:ss.SSSXXX", "type": "string" } }, @@ -84521,6 +90879,7 @@ }, "index_name_format": { "description": "The format to be used when printing the parsed date into the index name.\nA valid java time pattern is expected here.\nSupports template snippets.", + "default": "yyyy-MM-dd", "type": "string" }, "index_name_prefix": { @@ -84529,10 +90888,12 @@ }, "locale": { "description": "The locale to use when parsing the date from the document being preprocessed, relevant when parsing month names or week days.", + "default": "ENGLISH", "type": "string" }, "timezone": { "description": "The timezone to use when parsing the date and when date math index supports resolves expressions into concrete index names.", + "default": "UTC", "type": "string" } }, @@ -84553,6 +90914,7 @@ "properties": { "append_separator": { "description": "The character(s) that separate the appended fields.", + "default": "\"\"", "type": "string" }, "field": { @@ -84560,6 +90922,7 @@ }, "ignore_missing": { "description": "If `true` and `field` does not exist or is `null`, the processor quietly exits without modifying the document.", + "default": false, "type": "boolean" }, "pattern": { @@ -84587,6 +90950,7 @@ }, "override": { "description": "Controls the behavior when there is already an existing nested object that conflicts with the expanded field.\nWhen `false`, the processor will merge conflicts by combining the old and the new values into an array.\nWhen `true`, the value from the expanded field will overwrite the existing value.", + "default": false, "type": "boolean" }, "path": { @@ -84623,14 +90987,17 @@ }, "ignore_missing": { "description": "If `true` and `field` does not exist, the processor quietly exits without modifying the document.", + "default": false, "type": "boolean" }, "max_matches": { "description": "The maximum number of matched documents to include under the configured target field.\nThe `target_field` will be turned into a json array if `max_matches` is higher than 1, otherwise `target_field` will become a json object.\nIn order to avoid documents getting too large, the maximum allowed value is 128.", + "default": 1.0, "type": "number" }, "override": { "description": "If processor will update fields with pre-existing non-null-valued field.\nWhen set to `false`, such fields will not be touched.", + "default": true, "type": "boolean" }, "policy_name": { @@ -84703,6 +91070,7 @@ }, "ignore_missing": { "description": "If true, the processor ignores any missing fields. If all fields are\nmissing, the processor silently exits without modifying the document.", + "default": false, "type": "boolean" } }, @@ -84735,6 +91103,7 @@ }, "ignore_missing": { "description": "If `true`, the processor silently exits without changing the document if the `field` is `null` or missing.", + "default": false, "type": "boolean" }, "processor": { @@ -84758,6 +91127,7 @@ "properties": { "database_file": { "description": "The database filename referring to a database the module ships with (GeoLite2-City.mmdb, GeoLite2-Country.mmdb, or GeoLite2-ASN.mmdb) or a custom database in the ingest-geoip config directory.", + "default": "GeoLite2-City.mmdb", "type": "string" }, "field": { @@ -84765,10 +91135,12 @@ }, "first_only": { "description": "If `true`, only the first found IP location data will be returned, even if the field contains an array.", + "default": true, "type": "boolean" }, "ignore_missing": { "description": "If `true` and `field` does not exist, the processor quietly exits without modifying the document.", + "default": false, "type": "boolean" }, "properties": { @@ -84824,6 +91196,7 @@ }, "ignore_missing": { "description": "If `true` and `field` does not exist, the processor quietly exits without modifying the document.", + "default": false, "type": "boolean" }, "target_format": { @@ -84862,6 +91235,7 @@ "properties": { "database_file": { "description": "The database filename referring to a database the module ships with (GeoLite2-City.mmdb, GeoLite2-Country.mmdb, or GeoLite2-ASN.mmdb) or a custom database in the ingest-geoip config directory.", + "default": "GeoLite2-City.mmdb", "type": "string" }, "field": { @@ -84869,10 +91243,12 @@ }, "first_only": { "description": "If `true`, only the first found geoip data will be returned, even if the field contains an array.", + "default": true, "type": "boolean" }, "ignore_missing": { "description": "If `true` and `field` does not exist, the processor quietly exits without modifying the document.", + "default": false, "type": "boolean" }, "properties": { @@ -84906,6 +91282,7 @@ "properties": { "ecs_compatibility": { "description": "Must be disabled or v1. If v1, the processor uses patterns with Elastic\nCommon Schema (ECS) field names.", + "default": "disabled", "type": "string" }, "field": { @@ -84913,6 +91290,7 @@ }, "ignore_missing": { "description": "If `true` and `field` does not exist or is `null`, the processor quietly exits without modifying the document.", + "default": false, "type": "boolean" }, "pattern_definitions": { @@ -84931,6 +91309,7 @@ }, "trace_match": { "description": "When `true`, `_ingest._grok_match_index` will be inserted into your matched document’s metadata with the index into the pattern found in `patterns` that matched.", + "default": false, "type": "boolean" } }, @@ -84957,6 +91336,7 @@ }, "ignore_missing": { "description": "If `true` and `field` does not exist or is `null`, the processor quietly exits without modifying the document.", + "default": false, "type": "boolean" }, "pattern": { @@ -84992,6 +91372,7 @@ }, "ignore_missing": { "description": "If `true` and `field` does not exist or is `null`, the processor quietly exits without modifying the document,", + "default": false, "type": "boolean" }, "target_field": { @@ -85074,6 +91455,7 @@ }, "num_top_feature_importance_values": { "description": "Specifies the maximum number of feature importance values per document.", + "default": 0.0, "type": "number" } } @@ -85083,10 +91465,12 @@ "properties": { "num_top_classes": { "description": "Specifies the number of top class predictions to return.", + "default": 0.0, "type": "number" }, "num_top_feature_importance_values": { "description": "Specifies the maximum number of feature importance values per document.", + "default": 0.0, "type": "number" }, "results_field": { @@ -85152,6 +91536,7 @@ "properties": { "add_to_root": { "description": "Flag that forces the parsed JSON to be added at the top level of the document.\n`target_field` must not be set when this option is chosen.", + "default": false, "type": "boolean" }, "add_to_root_conflict_strategy": { @@ -85159,6 +91544,7 @@ }, "allow_duplicate_keys": { "description": "When set to `true`, the JSON parser will not fail if the JSON contains duplicate keys.\nInstead, the last encountered value for any duplicate key wins.", + "default": false, "type": "boolean" }, "field": { @@ -85205,6 +91591,7 @@ }, "ignore_missing": { "description": "If `true` and `field` does not exist or is `null`, the processor quietly exits without modifying the document.", + "default": false, "type": "boolean" }, "include_keys": { @@ -85216,10 +91603,12 @@ }, "prefix": { "description": "Prefix to be added to extracted keys.", + "default": "null", "type": "string" }, "strip_brackets": { "description": "If `true`. strip brackets `()`, `<>`, `[]` as well as quotes `'` and `\"` from extracted values.", + "default": false, "type": "boolean" }, "target_field": { @@ -85259,6 +91648,7 @@ }, "ignore_missing": { "description": "If `true` and `field` does not exist or is `null`, the processor quietly exits without modifying the document.", + "default": false, "type": "boolean" }, "target_field": { @@ -85300,6 +91690,7 @@ }, "ignore_missing": { "description": "If true and any required fields are missing, the processor quietly exits\nwithout modifying the document.", + "default": true, "type": "boolean" } } @@ -85319,6 +91710,7 @@ }, "ignore_missing_pipeline": { "description": "Whether to ignore missing pipelines instead of failing.", + "default": false, "type": "boolean" } }, @@ -85354,22 +91746,27 @@ }, "prefix": { "description": "Start a redacted section with this token", + "default": "<", "type": "string" }, "suffix": { "description": "End a redacted section with this token", + "default": ">", "type": "string" }, "ignore_missing": { "description": "If `true` and `field` does not exist or is `null`, the processor quietly exits without modifying the document.", + "default": false, "type": "boolean" }, "skip_if_unlicensed": { "description": "If `true` and the current license does not support running redact processors, then the processor quietly exits without modifying the document", + "default": false, "type": "boolean" }, "trace_redact": { "description": "If `true` then ingest metadata `_ingest._redact._is_redacted` is set to `true` if the document has been redacted", + "default": false, "x-state": "Generally available; Added in 8.16.0", "type": "boolean" } @@ -85397,6 +91794,7 @@ }, "ignore_missing": { "description": "If true and any required fields are missing, the processor quietly exits\nwithout modifying the document.", + "default": true, "type": "boolean" } }, @@ -85422,6 +91820,7 @@ }, "ignore_missing": { "description": "If `true` and `field` does not exist or is `null`, the processor quietly exits without modifying the document.", + "default": false, "type": "boolean" } }, @@ -85444,6 +91843,7 @@ }, "ignore_missing": { "description": "If `true` and `field` does not exist, the processor quietly exits without modifying the document.", + "default": false, "type": "boolean" }, "target_field": { @@ -85545,6 +91945,7 @@ }, "ignore_empty_value": { "description": "If `true` and `value` is a template snippet that evaluates to `null` or the empty string, the processor quietly exits without modifying the document.", + "default": false, "type": "boolean" }, "media_type": { @@ -85553,6 +91954,7 @@ }, "override": { "description": "If `true` processor will update fields with pre-existing non-null-valued field.\nWhen set to `false`, such fields will not be touched.", + "default": true, "type": "boolean" }, "value": { @@ -85628,10 +92030,12 @@ }, "ignore_missing": { "description": "If `true` and `field` does not exist, the processor quietly exits without modifying the document.", + "default": false, "type": "boolean" }, "preserve_trailing": { "description": "Preserves empty trailing fields, if any.", + "default": false, "type": "boolean" }, "separator": { @@ -85672,6 +92076,7 @@ }, "ignore_missing": { "description": "If `true` and `field` does not exist, the processor quietly exits without modifying the document.", + "default": false, "type": "boolean" }, "target_field": { @@ -85697,6 +92102,7 @@ }, "ignore_missing": { "description": "If `true` and `field` does not exist or is `null`, the processor quietly exits without modifying the document.", + "default": false, "type": "boolean" }, "target_field": { @@ -85722,6 +92128,7 @@ }, "ignore_missing": { "description": "If `true` and `field` does not exist or is `null`, the processor quietly exits without modifying the document.", + "default": false, "type": "boolean" }, "target_field": { @@ -85747,14 +92154,17 @@ }, "ignore_missing": { "description": "If `true` and `field` does not exist, the processor quietly exits without modifying the document.", + "default": false, "type": "boolean" }, "keep_original": { "description": "If `true`, the processor copies the unparsed URI to `.original`.", + "default": true, "type": "boolean" }, "remove_if_successful": { "description": "If `true`, the processor removes the `field` after parsing the URI string.\nIf parsing fails, the processor does not remove the `field`.", + "default": false, "type": "boolean" }, "target_field": { @@ -85780,6 +92190,7 @@ }, "ignore_missing": { "description": "If `true` and `field` does not exist, the processor quietly exits without modifying the document.", + "default": false, "type": "boolean" }, "regex_file": { @@ -85791,6 +92202,18 @@ }, "properties": { "description": "Controls what properties are added to `target_field`.", + "default": [ + "name", + "major", + "minor", + "patch", + "build", + "os", + "os_name", + "os_major", + "os_minor", + "device" + ], "type": "array", "items": { "$ref": "#/components/schemas/ingest._types.UserAgentProperty" @@ -85798,6 +92221,7 @@ }, "extract_device_type": { "description": "Extracts device type from the user agent string on a best-effort basis.", + "default": false, "x-state": "Beta; Added in 8.9.0", "type": "boolean" } @@ -86508,6 +92932,7 @@ }, "use_null": { "description": "Defines whether a new series is used as the null series when there is no value for the by or partition fields.", + "default": false, "type": "boolean" } } @@ -86517,6 +92942,9 @@ "properties": { "actions": { "description": "The set of actions to be triggered when the rule applies. If more than one action is specified the effects of all actions are combined.", + "default": [ + "skip_result" + ], "type": "array", "items": { "$ref": "#/components/schemas/ml._types.RuleAction" @@ -87174,6 +93602,7 @@ }, "num_top_classes": { "description": "Defines the number of categories for which the predicted probabilities are reported. It must be non-negative or -1. If it is -1 or greater than the total number of categories, probabilities are reported for all categories; if you have a large number of categories, there could be a significant effect on the size of your destination index. NOTE: To use the AUC ROC evaluation method, `num_top_classes` must be set to -1 or a value greater than or equal to the total number of categories.", + "default": 2.0, "type": "number" } } @@ -87197,6 +93626,7 @@ }, "early_stopping_enabled": { "description": "Advanced configuration option. Specifies whether the training process should finish if it is not finding any better performing models. If disabled, the training process can take significantly longer and the chance of finding a better performing model is unremarkable.", + "default": true, "type": "boolean" }, "eta": { @@ -87236,6 +93666,7 @@ }, "num_top_feature_importance_values": { "description": "Advanced configuration option. Specifies the maximum number of feature importance values per document to return. By default, no feature importance calculation occurs.", + "default": 0.0, "type": "number" }, "prediction_field_name": { @@ -87404,14 +93835,17 @@ "properties": { "compute_feature_influence": { "description": "Specifies whether the feature influence calculation is enabled.", + "default": true, "type": "boolean" }, "feature_influence_threshold": { "description": "The minimum outlier score that a document needs to have in order to calculate its feature influence score. Value range: 0-1.", + "default": 0.1, "type": "number" }, "method": { "description": "The method that outlier detection uses. Available methods are `lof`, `ldof`, `distance_kth_nn`, `distance_knn`, and `ensemble`. The default value is ensemble, which means that outlier detection uses an ensemble of different methods and normalises and combines their individual outlier scores to obtain the overall outlier score.", + "default": "ensemble", "type": "string" }, "n_neighbors": { @@ -87424,6 +93858,7 @@ }, "standardization_enabled": { "description": "If true, the following operation is performed on the columns before computing outlier scores: `(x_i - mean(x_i)) / sd(x_i)`.", + "default": true, "type": "boolean" } } @@ -87438,6 +93873,7 @@ "properties": { "loss_function": { "description": "The loss function used during regression. Available options are `mse` (mean squared error), `msle` (mean squared logarithmic error), `huber` (Pseudo-Huber loss).", + "default": "mse", "type": "string" }, "loss_function_parameter": { @@ -87507,10 +93943,12 @@ "properties": { "from": { "description": "Skips the specified number of items.", + "default": 0.0, "type": "number" }, "size": { "description": "Specifies the maximum number of items to obtain.", + "default": 10000.0, "type": "number" } } @@ -87657,10 +94095,12 @@ }, "skip_result": { "description": "When true the model will not create results for this calendar period.", + "default": true, "type": "boolean" }, "skip_model_update": { "description": "When true the model will not be updated for this calendar period.", + "default": true, "type": "boolean" }, "force_time_shift": { @@ -88060,10 +94500,12 @@ "properties": { "compute_feature_influence": { "description": "Specifies whether the feature influence calculation is enabled.", + "default": true, "type": "boolean" }, "feature_influence_threshold": { "description": "The minimum outlier score that a document needs to have in order to calculate its feature influence score.\nValue range: 0-1", + "default": 0.1, "type": "number" }, "method": { @@ -88080,6 +94522,7 @@ }, "standardization_enabled": { "description": "If `true`, the following operation is performed on the columns before computing outlier scores: (x_i - mean(x_i)) / sd(x_i).", + "default": true, "type": "boolean" } } @@ -88491,10 +94934,12 @@ }, "ignore_unavailable": { "description": "If true, missing or closed indices are not included in the response.", + "default": false, "type": "boolean" }, "ignore_throttled": { "description": "If true, concrete, expanded or aliased indices are ignored when frozen.", + "default": true, "type": "boolean" } } @@ -88905,6 +95350,7 @@ }, "daily_model_snapshot_retention_after_days": { "description": "Advanced configuration option, which affects the automatic removal of old model snapshots for this job.\nIt specifies a period of time (in days) after which only the first snapshot per day is retained.\nThis period is relative to the timestamp of the most recent snapshot for this job.\nValid values range from 0 to `model_snapshot_retention_days`.", + "default": 1.0, "type": "number" }, "data_description": { @@ -88977,6 +95423,7 @@ "properties": { "categorization_examples_limit": { "description": "The maximum number of examples stored per category in memory and in the results data store. If you increase this value, more examples are available, however it requires that you have more storage available. If you set this value to 0, no examples are stored. NOTE: The `categorization_examples_limit` applies only to analysis that uses categorization.", + "default": 4.0, "type": "number" }, "model_memory_limit": { @@ -89022,6 +95469,7 @@ }, "time_format": { "description": "The time format, which can be `epoch`, `epoch_ms`, or a custom pattern. The value `epoch` refers to UNIX or Epoch time (the number of seconds since 1 Jan 1970). The value `epoch_ms` indicates that time is measured in milliseconds since the epoch. The `epoch` and `epoch_ms` time formats accept either integer or real values. Custom patterns must conform to the Java DateTimeFormatter class. When you use date-time formatting patterns, it is recommended that you provide the full date, time and time zone. For example: `yyyy-MM-dd'T'HH:mm:ssX`. If the pattern that you specify is not sufficient to produce a complete timestamp, job creation fails.", + "default": "epoch", "type": "string" }, "field_delimiter": { @@ -89034,11 +95482,13 @@ "properties": { "annotations_enabled": { "description": "If true, enables calculation and storage of the model change annotations for each entity that is being analyzed.", + "default": true, "x-state": "Generally available; Added in 7.9.0", "type": "boolean" }, "enabled": { "description": "If true, enables calculation and storage of the model bounds for each entity that is being analyzed.", + "default": false, "type": "boolean" }, "terms": { @@ -89860,14 +96310,17 @@ "properties": { "do_lower_case": { "description": "Should the tokenizer lower case the text", + "default": false, "type": "boolean" }, "max_sequence_length": { "description": "Maximum input sequence length for the model", + "default": 512.0, "type": "number" }, "span": { "description": "Tokenization spanning options. Special value of -1 indicates no spanning takes place", + "default": -1.0, "type": "number" }, "truncate": { @@ -89875,6 +96328,7 @@ }, "with_special_tokens": { "description": "Is tokenization completed with special tokens", + "default": true, "type": "boolean" } } @@ -89898,6 +96352,7 @@ "properties": { "add_prefix_space": { "description": "Should the tokenizer prefix input with a space character", + "default": false, "type": "boolean" } } @@ -89934,6 +96389,7 @@ }, "hypothesis_template": { "description": "Hypothesis template used when tokenizing labels for prediction", + "default": "\"This example is {}.\"", "type": "string" }, "classification_labels": { @@ -89949,6 +96405,7 @@ }, "multi_label": { "description": "Indicates if more than one true label exists.", + "default": false, "type": "boolean" }, "labels": { @@ -91208,6 +97665,7 @@ }, "scroll_size": { "description": "The size parameter that is used in Elasticsearch searches when the datafeed does not use aggregations. The maximum value is the value of `index.max_result_window`, which is 10,000 by default.", + "default": 1000.0, "type": "number" } } @@ -91217,6 +97675,7 @@ "properties": { "allow_lazy_open": { "description": "Advanced configuration option. Specifies whether this job can open when there is insufficient machine learning node capacity for it to be immediately assigned to a node.", + "default": false, "type": "boolean" }, "analysis_config": { @@ -91233,6 +97692,7 @@ }, "daily_model_snapshot_retention_after_days": { "description": "Advanced configuration option, which affects the automatic removal of old model snapshots for this job.\nIt specifies a period of time (in days) after which only the first snapshot per day is retained.\nThis period is relative to the timestamp of the most recent snapshot for this job.", + "default": 1.0, "type": "number" }, "data_description": { @@ -91264,6 +97724,7 @@ }, "model_snapshot_retention_days": { "description": "Advanced configuration option, which affects the automatic removal of old model snapshots for this job.\nIt specifies the maximum period of time (in days) that snapshots are retained.\nThis period is relative to the timestamp of the most recent snapshot for this job.\nThe default value is `10`, which means snapshots ten days older than the newest snapshot are deleted.", + "default": 10.0, "type": "number" }, "renormalization_window_days": { @@ -91394,6 +97855,7 @@ }, "use_null": { "description": "Defines whether a new series is used as the null series when there is no value for the by or partition fields.", + "default": false, "type": "boolean" } }, @@ -91837,6 +98299,7 @@ "properties": { "explain": { "description": "If `true`, returns detailed information about score calculation as part of each hit.", + "default": false, "type": "boolean" }, "id": { @@ -91851,6 +98314,7 @@ }, "profile": { "description": "If `true`, the query execution is profiled.", + "default": false, "type": "boolean" }, "source": { @@ -91876,6 +98340,7 @@ }, "field_statistics": { "description": "If `true`, the response includes the document count, sum of document frequencies, and sum of total term frequencies.", + "default": true, "type": "boolean" }, "filter": { @@ -91883,14 +98348,17 @@ }, "offsets": { "description": "If `true`, the response includes term offsets.", + "default": true, "type": "boolean" }, "payloads": { "description": "If `true`, the response includes term payloads.", + "default": true, "type": "boolean" }, "positions": { "description": "If `true`, the response includes term positions.", + "default": true, "type": "boolean" }, "routing": { @@ -91898,6 +98366,7 @@ }, "term_statistics": { "description": "If true, the response includes term frequency and document frequency.", + "default": false, "type": "boolean" }, "version": { @@ -91917,6 +98386,7 @@ }, "max_num_terms": { "description": "The maximum number of terms that must be returned per field.", + "default": 25.0, "type": "number" }, "max_term_freq": { @@ -91925,18 +98395,22 @@ }, "max_word_length": { "description": "The maximum word length above which words will be ignored.\nDefaults to unbounded.", + "default": 0.0, "type": "number" }, "min_doc_freq": { "description": "Ignore terms which do not occur in at least this many docs.", + "default": 1.0, "type": "number" }, "min_term_freq": { "description": "Ignore words with less than this frequency in the source doc.", + "default": 1.0, "type": "number" }, "min_word_length": { "description": "The minimum word length below which words will be ignored.", + "default": 0.0, "type": "number" } } @@ -92272,12 +98746,21 @@ "build_type": { "type": "string" }, + "component_versions": { + "type": "object", + "additionalProperties": { + "type": "number" + } + }, "host": { "$ref": "#/components/schemas/_types.Host" }, "http": { "$ref": "#/components/schemas/nodes.info.NodeInfoHttp" }, + "index_version": { + "$ref": "#/components/schemas/_types.VersionNumber" + }, "ip": { "$ref": "#/components/schemas/_types.Ip" }, @@ -92287,9 +98770,6 @@ "name": { "$ref": "#/components/schemas/_types.Name" }, - "network": { - "$ref": "#/components/schemas/nodes.info.NodeInfoNetwork" - }, "os": { "$ref": "#/components/schemas/nodes.info.NodeOperatingSystemInfo" }, @@ -92327,6 +98807,9 @@ "transport_address": { "$ref": "#/components/schemas/_types.TransportAddress" }, + "transport_version": { + "$ref": "#/components/schemas/_types.VersionNumber" + }, "version": { "$ref": "#/components/schemas/_types.VersionString" }, @@ -92344,6 +98827,9 @@ "additionalProperties": { "$ref": "#/components/schemas/nodes.info.NodeInfoAggregation" } + }, + "remote_cluster_server": { + "$ref": "#/components/schemas/nodes.info.RemoveClusterServer" } }, "required": [ @@ -92351,11 +98837,14 @@ "build_flavor", "build_hash", "build_type", + "component_versions", "host", + "index_version", "ip", "name", "roles", "transport_address", + "transport_version", "version" ] }, @@ -92496,40 +98985,6 @@ "non_heap_max_in_bytes" ] }, - "nodes.info.NodeInfoNetwork": { - "type": "object", - "properties": { - "primary_interface": { - "$ref": "#/components/schemas/nodes.info.NodeInfoNetworkInterface" - }, - "refresh_interval": { - "type": "number" - } - }, - "required": [ - "primary_interface", - "refresh_interval" - ] - }, - "nodes.info.NodeInfoNetworkInterface": { - "type": "object", - "properties": { - "address": { - "type": "string" - }, - "mac_address": { - "type": "string" - }, - "name": { - "$ref": "#/components/schemas/_types.Name" - } - }, - "required": [ - "address", - "mac_address", - "name" - ] - }, "nodes.info.NodeOperatingSystemInfo": { "type": "object", "properties": { @@ -92720,10 +99175,17 @@ "$ref": "#/components/schemas/nodes.info.NodeInfoSettingsClusterElection" }, "initial_master_nodes": { - "type": "array", - "items": { - "type": "string" - } + "oneOf": [ + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "type": "string" + } + ] }, "deprecation_indexing": { "$ref": "#/components/schemas/nodes.info.DeprecationIndexing" @@ -92840,10 +99302,17 @@ "type": "object", "properties": { "seed_hosts": { - "type": "array", - "items": { - "type": "string" - } + "oneOf": [ + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "type": "string" + } + ] }, "type": { "type": "string" @@ -93393,6 +99862,24 @@ "types" ] }, + "nodes.info.RemoveClusterServer": { + "type": "object", + "properties": { + "bound_address": { + "type": "array", + "items": { + "$ref": "#/components/schemas/_types.TransportAddress" + } + }, + "publish_address": { + "$ref": "#/components/schemas/_types.TransportAddress" + } + }, + "required": [ + "bound_address", + "publish_address" + ] + }, "_types.Password": { "type": "string" }, @@ -93913,6 +100400,9 @@ "description": "Maximum amount of memory, in bytes, available for use by the heap.", "type": "number" }, + "heap_max": { + "$ref": "#/components/schemas/_types.ByteSize" + }, "non_heap_used_in_bytes": { "description": "Non-heap memory used, in bytes.", "type": "number" @@ -94444,76 +100934,6 @@ } } }, - "nodes._types.IndexingPressureMemory": { - "type": "object", - "properties": { - "limit": { - "$ref": "#/components/schemas/_types.ByteSize" - }, - "limit_in_bytes": { - "description": "Configured memory limit, in bytes, for the indexing requests.\nReplica requests have an automatic limit that is 1.5x this value.", - "type": "number" - }, - "current": { - "$ref": "#/components/schemas/nodes._types.PressureMemory" - }, - "total": { - "$ref": "#/components/schemas/nodes._types.PressureMemory" - } - } - }, - "nodes._types.PressureMemory": { - "type": "object", - "properties": { - "all": { - "$ref": "#/components/schemas/_types.ByteSize" - }, - "all_in_bytes": { - "description": "Memory consumed, in bytes, by indexing requests in the coordinating, primary, or replica stage.", - "type": "number" - }, - "combined_coordinating_and_primary": { - "$ref": "#/components/schemas/_types.ByteSize" - }, - "combined_coordinating_and_primary_in_bytes": { - "description": "Memory consumed, in bytes, by indexing requests in the coordinating or primary stage.\nThis value is not the sum of coordinating and primary as a node can reuse the coordinating memory if the primary stage is executed locally.", - "type": "number" - }, - "coordinating": { - "$ref": "#/components/schemas/_types.ByteSize" - }, - "coordinating_in_bytes": { - "description": "Memory consumed, in bytes, by indexing requests in the coordinating stage.", - "type": "number" - }, - "primary": { - "$ref": "#/components/schemas/_types.ByteSize" - }, - "primary_in_bytes": { - "description": "Memory consumed, in bytes, by indexing requests in the primary stage.", - "type": "number" - }, - "replica": { - "$ref": "#/components/schemas/_types.ByteSize" - }, - "replica_in_bytes": { - "description": "Memory consumed, in bytes, by indexing requests in the replica stage.", - "type": "number" - }, - "coordinating_rejections": { - "description": "Number of indexing requests rejected in the coordinating stage.", - "type": "number" - }, - "primary_rejections": { - "description": "Number of indexing requests rejected in the primary stage.", - "type": "number" - }, - "replica_rejections": { - "description": "Number of indexing requests rejected in the replica stage.", - "type": "number" - } - } - }, "nodes.usage.ResponseBase": { "allOf": [ { @@ -94833,6 +101253,7 @@ "properties": { "ignore_unlabeled": { "description": "Controls how unlabeled documents in the search results are counted. If set to true, unlabeled documents are ignored and neither count as relevant or irrelevant. Set to false (the default), they are treated as irrelevant.", + "default": false, "type": "boolean" } } @@ -94849,6 +101270,7 @@ "properties": { "relevant_rating_threshold": { "description": "Sets the rating threshold above which documents are considered to be \"relevant\".", + "default": 1.0, "type": "number" } } @@ -94860,6 +101282,7 @@ "properties": { "k": { "description": "Sets the maximum number of documents retrieved per query. This value will act in place of the usual size parameter in the query.", + "default": 10.0, "type": "number" } } @@ -94897,6 +101320,7 @@ "properties": { "normalize": { "description": "If set to true, this metric will calculate the Normalized DCG.", + "default": false, "type": "boolean" } } @@ -95056,6 +101480,7 @@ }, "size": { "description": "The number of documents to index per batch.\nUse it when you are indexing from remote to ensure that the batches fit within the on-heap buffer, which defaults to a maximum size of 100 MB.", + "default": 1000.0, "type": "number" }, "slice": { @@ -96384,6 +102809,7 @@ }, "allow_restricted_indices": { "description": "Set to `true` if using wildcard or regular expressions for patterns that cover restricted indices. Implicitly, restricted indices have limited privileges that can cause pattern tests to fail. If restricted indices are explicitly included in the `names` list, Elasticsearch checks privileges against these indices regardless of the value set for `allow_restricted_indices`.", + "default": false, "x-state": "Generally available", "type": "boolean" } @@ -96533,6 +102959,7 @@ }, "allow_restricted_indices": { "description": "Set to `true` if using wildcard or regular expressions for patterns that cover restricted indices. Implicitly, restricted indices have limited privileges that can cause pattern tests to fail. If restricted indices are explicitly included in the `names` list, Elasticsearch checks privileges against these indices regardless of the value set for `allow_restricted_indices`.", + "default": false, "x-state": "Generally available", "type": "boolean" } @@ -96717,6 +103144,7 @@ }, "allow_restricted_indices": { "description": "This needs to be set to true if the patterns in the names field should cover system indices.", + "default": false, "type": "boolean" } }, @@ -96749,6 +103177,7 @@ }, "allow_restricted_indices": { "description": "Set to `true` if using wildcard or regular expressions for patterns that cover restricted indices. Implicitly, restricted indices have limited privileges that can cause pattern tests to fail. If restricted indices are explicitly included in the `names` list, Elasticsearch checks privileges against these indices regardless of the value set for `allow_restricted_indices`.", + "default": false, "x-state": "Generally available", "type": "boolean" } @@ -97871,10 +104300,12 @@ }, "other_bucket_key": { "description": "The key with which the other bucket is returned.", + "default": "_other_", "type": "string" }, "keyed": { "description": "By default, the named filters aggregation returns the buckets as an object.\nSet to `false` to return the buckets as an array of objects.", + "default": true, "type": "boolean" } } @@ -98425,6 +104856,7 @@ "properties": { "ignore_unavailable": { "description": "If false, the snapshot fails if any data stream or index in indices is missing or closed. If true, the snapshot ignores missing or closed data streams and indices.", + "default": false, "type": "boolean" }, "indices": { @@ -98432,6 +104864,7 @@ }, "include_global_state": { "description": "If true, the current global state is included in the snapshot.", + "default": true, "type": "boolean" }, "feature_states": { @@ -98446,6 +104879,7 @@ }, "partial": { "description": "If false, the entire snapshot will fail if one or more indices included in the snapshot do not have all primary shards available.", + "default": false, "type": "boolean" } } @@ -98776,26 +105210,32 @@ }, "client": { "description": "The name of the Azure repository client to use.", + "default": "default", "type": "string" }, "container": { "description": "The Azure container.", + "default": "elasticsearch-snapshots", "type": "string" }, "delete_objects_max_size": { "description": "The maxmimum batch size, between 1 and 256, used for `BlobBatch` requests.\nDefaults to 256 which is the maximum number supported by the Azure blob batch API.", + "default": 256.0, "type": "number" }, "location_mode": { "description": "Either `primary_only` or `secondary_only`.\nNote that if you set it to `secondary_only`, it will force `readonly` to `true`.", + "default": "primary_only", "type": "string" }, "max_concurrent_batch_deletes": { "description": "The maximum number of concurrent batch delete requests that will be submitted for any individual bulk delete with `BlobBatch`.\nNote that the effective number of concurrent deletes is further limited by the Azure client connection and event loop thread limits.\nDefaults to 10, minimum is 1, maximum is 100.", + "default": 10.0, "type": "number" }, "readonly": { "description": "If `true`, the repository is read-only.\nThe cluster can retrieve and restore snapshots from the repository but not write to the repository or create snapshots in it.\n\nOnly a cluster with write access can create snapshots in the repository.\nAll other clusters connected to the repository should have the `readonly` parameter set to `true`.\nIf `false`, the cluster can write to the repository and create snapshots in it.\n\nIMPORTANT: If you register the same snapshot repository with multiple clusters, only one cluster should have write access to the repository.\nHaving multiple clusters write to the repository at the same time risks corrupting the contents of the repository.", + "default": false, "type": "boolean" } } @@ -98810,6 +105250,7 @@ }, "compress": { "description": "When set to `true`, metadata files are stored in compressed format.\nThis setting doesn't affect index files that are already compressed by default.", + "default": true, "type": "boolean" }, "max_restore_bytes_per_sec": { @@ -98880,10 +105321,12 @@ }, "client": { "description": "The name of the client to use to connect to Google Cloud Storage.", + "default": "default", "type": "string" }, "readonly": { "description": "If `true`, the repository is read-only.\nThe cluster can retrieve and restore snapshots from the repository but not write to the repository or create snapshots in it.\n\nOnly a cluster with write access can create snapshots in the repository.\nAll other clusters connected to the repository should have the `readonly` parameter set to `true`.\n\nIf `false`, the cluster can write to the repository and create snapshots in it.\n\nIMPORTANT: If you register the same snapshot repository with multiple clusters, only one cluster should have write access to the repository.\nHaving multiple clusters write to the repository at the same time risks corrupting the contents of the repository.", + "default": false, "type": "boolean" } }, @@ -98949,10 +105392,12 @@ "url": "https://docs.aws.amazon.com/AmazonS3/latest/userguide/acl-overview.html#canned-acl" }, "description": "The S3 repository supports all S3 canned ACLs: `private`, `public-read`, `public-read-write`, `authenticated-read`, `log-delivery-write`, `bucket-owner-read`, `bucket-owner-full-control`.\nYou could specify a canned ACL using the `canned_acl` setting.\nWhen the S3 repository creates buckets and objects, it adds the canned ACL into the buckets and objects.", + "default": "private", "type": "string" }, "client": { "description": "The name of the S3 client to use to connect to S3.", + "default": "default", "type": "string" }, "delete_objects_max_size": { @@ -98960,6 +105405,7 @@ "url": "https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteObjects.html" }, "description": "The maxmimum batch size, between 1 and 1000, used for `DeleteObjects` requests.\nDefaults to 1000 which is the maximum number supported by the AWS DeleteObjects API.", + "default": 1000.0, "type": "number" }, "get_register_retry_delay": { @@ -98967,6 +105413,7 @@ }, "max_multipart_parts": { "description": "The maximum number of parts that Elasticsearch will write during a multipart upload of a single object.\nFiles which are larger than `buffer_size × max_multipart_parts` will be chunked into several smaller objects.\nElasticsearch may also split a file across multiple objects to satisfy other constraints such as the `chunk_size` limit.\nDefaults to `10000` which is the maximum number of parts in a multipart upload in AWS S3.", + "default": 10000.0, "type": "number" }, "max_multipart_upload_cleanup_size": { @@ -98974,14 +105421,17 @@ "url": "https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListMultipartUploads.html" }, "description": "The maximum number of possibly-dangling multipart uploads to clean up in each batch of snapshot deletions.\nDefaults to 1000 which is the maximum number supported by the AWS ListMultipartUploads API.\nIf set to `0`, Elasticsearch will not attempt to clean up dangling multipart uploads.", + "default": 1000.0, "type": "number" }, "readonly": { "description": "If true, the repository is read-only.\nThe cluster can retrieve and restore snapshots from the repository but not write to the repository or create snapshots in it.\n\nOnly a cluster with write access can create snapshots in the repository.\nAll other clusters connected to the repository should have the `readonly` parameter set to `true`.\n\nIf `false`, the cluster can write to the repository and create snapshots in it.\n\nIMPORTANT: If you register the same snapshot repository with multiple clusters, only one cluster should have write access to the repository.\nHaving multiple clusters write to the repository at the same time risks corrupting the contents of the repository.", + "default": false, "type": "boolean" }, "server_side_encryption": { "description": "When set to `true`, files are encrypted on server side using an AES256 algorithm.", + "default": false, "type": "boolean" }, "storage_class": { @@ -98989,6 +105439,7 @@ "url": "https://www.elastic.co/docs/deploy-manage/tools/snapshot-and-restore/s3-repository#repository-s3-storage-classes" }, "description": "The S3 storage class for objects written to the repository.\nValues may be `standard`, `reduced_redundancy`, `standard_ia`, `onezone_ia`, and `intelligent_tiering`.", + "default": "standard", "type": "string" }, "throttled_delete_retry.delay_increment": { @@ -99051,10 +105502,12 @@ }, "max_number_of_snapshots": { "description": "The maximum number of snapshots the repository can contain.\nThe default is `Integer.MAX_VALUE`, which is 2^31-1 or `2147483647`.", + "default": 2147483647.0, "type": "number" }, "readonly": { "description": "If `true`, the repository is read-only.\nThe cluster can retrieve and restore snapshots from the repository but not write to the repository or create snapshots in it.\n\nOnly a cluster with write access can create snapshots in the repository.\nAll other clusters connected to the repository should have the `readonly` parameter set to `true`.\n\nIf `false`, the cluster can write to the repository and create snapshots in it.\n\nIMPORTANT: If you register the same snapshot repository with multiple clusters, only one cluster should have write access to the repository.\nHaving multiple clusters write to the repository at the same time risks corrupting the contents of the repository.", + "default": false, "type": "boolean" } }, @@ -99103,6 +105556,7 @@ "properties": { "http_max_retries": { "description": "The maximum number of retries for HTTP and HTTPS URLs.", + "default": 5.0, "type": "number" }, "http_socket_timeout": { @@ -99110,6 +105564,7 @@ }, "max_number_of_snapshots": { "description": "The maximum number of snapshots the repository can contain.\nThe default is `Integer.MAX_VALUE`, which is 2^31-1 or `2147483647`.", + "default": 2147483647.0, "type": "number" }, "url": { @@ -99166,10 +105621,12 @@ }, "max_number_of_snapshots": { "description": "The maximum number of snapshots the repository can contain.\nThe default is `Integer.MAX_VALUE`, which is 2^31-1 or `2147483647`.", + "default": 2147483647.0, "type": "number" }, "read_only": { "description": "If `true`, the repository is read-only.\nThe cluster can retrieve and restore snapshots from the repository but not write to the repository or create snapshots in it.\n\nOnly a cluster with write access can create snapshots in the repository.\nAll other clusters connected to the repository should have the `readonly` parameter set to `true`.\n\nIf `false`, the cluster can write to the repository and create snapshots in it.\n\nIMPORTANT: If you register the same snapshot repository with multiple clusters, only one cluster should have write access to the repository.\nHaving multiple clusters write to the repository at the same time risks corrupting the contents of the repository.", + "default": false, "type": "boolean" } } @@ -100155,14 +106612,17 @@ "properties": { "align_checkpoints": { "description": "Specifies whether the transform checkpoint ranges should be optimized for performance. Such optimization can align\ncheckpoint ranges with the date histogram interval when date histogram is specified as a group source in the\ntransform config. As a result, less document updates in the destination index will be performed thus improving\noverall performance.", + "default": true, "type": "boolean" }, "dates_as_epoch_millis": { "description": "Defines if dates in the ouput should be written as ISO formatted string or as millis since epoch. epoch_millis was\nthe default for transforms created before version 7.11. For compatible output set this value to `true`.", + "default": false, "type": "boolean" }, "deduce_mappings": { "description": "Specifies whether the transform should deduce the destination index mappings from the transform configuration.", + "default": true, "type": "boolean" }, "docs_per_second": { @@ -100171,10 +106631,12 @@ }, "max_page_search_size": { "description": "Defines the initial page size to use for the composite aggregation for each checkpoint. If circuit breaker\nexceptions occur, the page size is dynamically adjusted to a lower value. The minimum value is `10` and the\nmaximum is `65,536`.", + "default": 500.0, "type": "number" }, "unattended": { "description": "If `true`, the transform runs in unattended mode. In unattended mode, the transform retries indefinitely in case\nof an error which means the transform never fails. Setting the number of retries other than infinite fails in\nvalidation.", + "default": false, "x-state": "Generally available; Added in 8.5.0", "type": "boolean" } @@ -100889,6 +107351,7 @@ "type": "object", "properties": { "lang": { + "default": "painless", "type": "string" }, "params": { @@ -100961,6 +107424,7 @@ "type": "object", "properties": { "explain": { + "default": false, "type": "boolean" }, "id": { @@ -100973,6 +107437,7 @@ } }, "profile": { + "default": false, "type": "boolean" }, "source": { @@ -101288,6 +107753,7 @@ "type": "boolean" }, "retries": { + "default": 40.0, "type": "number" }, "interval": { @@ -104790,6 +111256,12 @@ "application/json": { "schema": { "$ref": "#/components/schemas/_types.WriteResponseBase" + }, + "examples": { + "CreateResponseExample1": { + "description": "A successful response from `PUT my-index-000001/_create/1` which indexes a document.", + "value": "{\n \"_index\": \"my-index-000001\",\n \"_id\": \"1\",\n \"_version\": 1,\n \"result\": \"created\",\n \"_shards\": {\n \"total\": 1,\n \"successful\": 1,\n \"failed\": 0\n },\n \"_seq_no\": 0,\n \"_primary_term\": 1\n}" + } } } } @@ -105256,7 +111728,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/_types.AcknowledgedResponseBase" + "$ref": "#/components/schemas/indices.delete_alias.IndicesAliasesResponseBody" } } } @@ -105294,7 +111766,7 @@ "schema": { "type": "object", "additionalProperties": { - "$ref": "#/components/schemas/indices.get_alias.IndexAliases" + "$ref": "#/components/schemas/indices.get_alias._types.IndexAliases" } } } @@ -107613,6 +114085,23 @@ "count", "api_keys" ] + }, + "examples": { + "QueryApiKeysResponseExample1": { + "summary": "Query API keys by ID", + "description": "A successful response from `GET /_security/_query/api_key?with_limited_by=true`. The `limited_by` details are the owner user's permissions associated with the API key. It is a point-in-time snapshot captured at creation and subsequent updates. An API key's effective permissions are an intersection of its assigned privileges and the owner user's permissions.\n", + "value": "{\n \"api_keys\": [\n {\n \"id\": \"VuaCfGcBCdbkQm-e5aOx\",\n \"name\": \"application-key-1\",\n \"creation\": 1548550550158,\n \"expiration\": 1548551550158,\n \"invalidated\": false,\n \"username\": \"myuser\",\n \"realm\": \"native1\",\n \"realm_type\": \"native\",\n \"metadata\": {\n \"application\": \"my-application\"\n },\n \"role_descriptors\": { },\n \"limited_by\": [ \n {\n \"role-power-user\": {\n \"cluster\": [\n \"monitor\"\n ],\n \"indices\": [\n {\n \"names\": [\n \"*\"\n ],\n \"privileges\": [\n \"read\"\n ],\n \"allow_restricted_indices\": false\n }\n ],\n \"applications\": [ ],\n \"run_as\": [ ],\n \"metadata\": { },\n \"transient_metadata\": {\n \"enabled\": true\n }\n }\n }\n ]\n }\n ]\n}" + }, + "QueryApiKeysResponseExample2": { + "summary": "Query API keys with pagination", + "description": "An abbreviated response from `GET /_security/_query/api_key` that contains a list of matched API keys along with their sort values. The first sort value is creation time, which is displayed in `date_time` format. The second sort value is the API key name.\n", + "value": "{\n \"total\": 100,\n \"count\": 10,\n \"api_keys\": [\n {\n \"id\": \"CLXgVnsBOGkf8IyjcXU7\",\n \"name\": \"app1-key-79\",\n \"creation\": 1629250154811,\n \"invalidated\": false,\n \"username\": \"org-admin-user\",\n \"realm\": \"native1\",\n \"metadata\": {\n \"environment\": \"production\"\n },\n \"role_descriptors\": { },\n \"_sort\": [\n \"2021-08-18T01:29:14.811Z\", \n \"app1-key-79\" \n ]\n },\n {\n \"id\": \"BrXgVnsBOGkf8IyjbXVB\",\n \"name\": \"app1-key-78\",\n \"creation\": 1629250153794,\n \"invalidated\": false,\n \"username\": \"org-admin-user\",\n \"realm\": \"native1\",\n \"metadata\": {\n \"environment\": \"production\"\n },\n \"role_descriptors\": { },\n \"_sort\": [\n \"2021-08-18T01:29:13.794Z\",\n \"app1-key-78\"\n ]\n }\n ]\n}" + }, + "QueryApiKeysResponseExample3": { + "summary": "Query all API keys", + "description": "A successful response from `GET /_security/_query/api_key`. It includes the role descriptors that are assigned to each API key when it was created or last updated. Note that an API key's effective permissions are an intersection of its assigned privileges and the point-in-time snapshot of the owner user's permissions. An empty role descriptors object means the API key inherits the owner user's permissions.\n", + "value": "{\n \"total\": 3,\n \"count\": 3,\n \"api_keys\": [ \n {\n \"id\": \"nkvrGXsB8w290t56q3Rg\",\n \"name\": \"my-api-key-1\",\n \"creation\": 1628227480421,\n \"expiration\": 1629091480421,\n \"invalidated\": false,\n \"username\": \"elastic\",\n \"realm\": \"reserved\",\n \"realm_type\": \"reserved\",\n \"metadata\": {\n \"letter\": \"a\"\n },\n \"role_descriptors\": { \n \"role-a\": {\n \"cluster\": [\n \"monitor\"\n ],\n \"indices\": [\n {\n \"names\": [\n \"index-a\"\n ],\n \"privileges\": [\n \"read\"\n ],\n \"allow_restricted_indices\": false\n }\n ],\n \"applications\": [ ],\n \"run_as\": [ ],\n \"metadata\": { },\n \"transient_metadata\": {\n \"enabled\": true\n }\n }\n }\n },\n {\n \"id\": \"oEvrGXsB8w290t5683TI\",\n \"name\": \"my-api-key-2\",\n \"creation\": 1628227498953,\n \"expiration\": 1628313898953,\n \"invalidated\": false,\n \"username\": \"elastic\",\n \"realm\": \"reserved\",\n \"metadata\": {\n \"letter\": \"b\"\n },\n \"role_descriptors\": { } \n }\n ]\n}" + } } } } @@ -109729,17 +116218,17 @@ "cat.recovery-h": { "in": "query", "name": "h", - "description": "List of columns to appear in the response. Supports simple wildcards.", + "description": "A comma-separated list of columns names to display.\nIt supports simple wildcards.", "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.Names" + "$ref": "#/components/schemas/cat._types.CatRecoveryColumns" }, "style": "form" }, "cat.recovery-s": { "in": "query", "name": "s", - "description": "List of columns that determine how the table should be sorted.\nSorting defaults to ascending and can be changed by setting `:asc`\nor `:desc` as a suffix to the column name.", + "description": "A comma-separated list of column names or aliases that determines the sort order.\nSorting defaults to ascending and can be changed by setting `:asc`\nor `:desc` as a suffix to the column name.", "deprecated": false, "schema": { "$ref": "#/components/schemas/_types.Names" @@ -109749,7 +116238,7 @@ "cat.recovery-time": { "in": "query", "name": "time", - "description": "Unit used to display time values.", + "description": "The unit used to display time values.", "deprecated": false, "schema": { "$ref": "#/components/schemas/_types.TimeUnit" @@ -109780,17 +116269,17 @@ "cat.segments-h": { "in": "query", "name": "h", - "description": "List of columns to appear in the response. Supports simple wildcards.", + "description": "A comma-separated list of columns names to display.\nIt supports simple wildcards.", "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.Names" + "$ref": "#/components/schemas/cat._types.CatSegmentsColumns" }, "style": "form" }, "cat.segments-s": { "in": "query", "name": "s", - "description": "List of columns that determine how the table should be sorted.\nSorting defaults to ascending and can be changed by setting `:asc`\nor `:desc` as a suffix to the column name.", + "description": "A comma-separated list of column names or aliases that determines the sort order.\nSorting defaults to ascending and can be changed by setting `:asc`\nor `:desc` as a suffix to the column name.", "deprecated": false, "schema": { "$ref": "#/components/schemas/_types.Names" @@ -109844,14 +116333,14 @@ "description": "List of columns to appear in the response. Supports simple wildcards.", "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.Names" + "$ref": "#/components/schemas/cat._types.CatShardColumns" }, "style": "form" }, "cat.shards-s": { "in": "query", "name": "s", - "description": "List of columns that determine how the table should be sorted.\nSorting defaults to ascending and can be changed by setting `:asc`\nor `:desc` as a suffix to the column name.", + "description": "A comma-separated list of column names or aliases that determines the sort order.\nSorting defaults to ascending and can be changed by setting `:asc`\nor `:desc` as a suffix to the column name.", "deprecated": false, "schema": { "$ref": "#/components/schemas/_types.Names" @@ -109861,7 +116350,7 @@ "cat.shards-master_timeout": { "in": "query", "name": "master_timeout", - "description": "Period to wait for a connection to the master node.", + "description": "The period to wait for a connection to the master node.", "deprecated": false, "schema": { "$ref": "#/components/schemas/_types.Duration" @@ -109871,7 +116360,7 @@ "cat.shards-time": { "in": "query", "name": "time", - "description": "Unit used to display time values.", + "description": "The unit used to display time values.", "deprecated": false, "schema": { "$ref": "#/components/schemas/_types.TimeUnit" @@ -109902,10 +116391,10 @@ "cat.snapshots-h": { "in": "query", "name": "h", - "description": "List of columns to appear in the response. Supports simple wildcards.", + "description": "A comma-separated list of columns names to display.\nIt supports simple wildcards.", "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.Names" + "$ref": "#/components/schemas/cat._types.CatSnapshotsColumns" }, "style": "form" }, @@ -110007,14 +116496,14 @@ "description": "List of columns to appear in the response. Supports simple wildcards.", "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.Names" + "$ref": "#/components/schemas/cat._types.CatThreadPoolColumns" }, "style": "form" }, "cat.thread_pool-s": { "in": "query", "name": "s", - "description": "List of columns that determine how the table should be sorted.\nSorting defaults to ascending and can be changed by setting `:asc`\nor `:desc` as a suffix to the column name.", + "description": "A comma-separated list of column names or aliases that determines the sort order.\nSorting defaults to ascending and can be changed by setting `:asc`\nor `:desc` as a suffix to the column name.", "deprecated": false, "schema": { "$ref": "#/components/schemas/_types.Names" @@ -110044,7 +116533,7 @@ "cat.thread_pool-master_timeout": { "in": "query", "name": "master_timeout", - "description": "Period to wait for a connection to the master node.", + "description": "The period to wait for a connection to the master node.", "deprecated": false, "schema": { "$ref": "#/components/schemas/_types.Duration" @@ -110205,6 +116694,26 @@ }, "style": "form" }, + "cluster.get_component_template-settings_filter": { + "in": "query", + "name": "settings_filter", + "description": "Filter out results, for example to filter out sensitive information. Supports wildcards or full settings keys", + "deprecated": false, + "schema": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "array", + "items": { + "type": "string" + } + } + ] + }, + "style": "form" + }, "cluster.get_component_template-include_defaults": { "in": "query", "name": "include_defaults", @@ -110213,6 +116722,7 @@ "schema": { "type": "boolean" }, + "x-state": "Generally available; Added in 8.11.0", "style": "form" }, "cluster.get_component_template-local": { @@ -110377,6 +116887,16 @@ }, "style": "form" }, + "cluster.put_component_template-cause": { + "in": "query", + "name": "cause", + "description": "User defined reason for create the component template.", + "deprecated": false, + "schema": { + "type": "string" + }, + "style": "form" + }, "cluster.put_component_template-master_timeout": { "in": "query", "name": "master_timeout", @@ -110704,26 +117224,6 @@ }, "style": "simple" }, - "create-if_primary_term": { - "in": "query", - "name": "if_primary_term", - "description": "Only perform the operation if the document has this primary term.", - "deprecated": false, - "schema": { - "type": "number" - }, - "style": "form" - }, - "create-if_seq_no": { - "in": "query", - "name": "if_seq_no", - "description": "Only perform the operation if the document has this sequence number.", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.SequenceNumber" - }, - "style": "form" - }, "create-include_source_on_error": { "in": "query", "name": "include_source_on_error", @@ -110734,16 +117234,6 @@ }, "style": "form" }, - "create-op_type": { - "in": "query", - "name": "op_type", - "description": "Set to `create` to only index the document if it does not already exist (put if absent).\nIf a document with the specified `_id` already exists, the indexing operation will fail.\nThe behavior is the same as using the `/_create` endpoint.\nIf a document ID is specified, this paramater defaults to `index`.\nOtherwise, it defaults to `create`.\nIf the request targets a data stream, an `op_type` of `create` is required.", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.OpType" - }, - "style": "form" - }, "create-pipeline": { "in": "query", "name": "pipeline", @@ -110869,6 +117359,7 @@ "eql.search-allow_no_indices": { "in": "query", "name": "allow_no_indices", + "description": "Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)", "deprecated": false, "schema": { "type": "boolean" @@ -110898,12 +117389,23 @@ "eql.search-expand_wildcards": { "in": "query", "name": "expand_wildcards", + "description": "Whether to expand wildcard expression to concrete indices that are open, closed or both.", "deprecated": false, "schema": { "$ref": "#/components/schemas/_types.ExpandWildcards" }, "style": "form" }, + "eql.search-ccs_minimize_roundtrips": { + "in": "query", + "name": "ccs_minimize_roundtrips", + "description": "Indicates whether network round-trips should be minimized as part of cross-cluster search requests execution", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" + }, "eql.search-ignore_unavailable": { "in": "query", "name": "ignore_unavailable", @@ -111155,6 +117657,7 @@ "schema": { "type": "string" }, + "x-state": "Generally available; Added in 8.2.0", "style": "form" }, "field_caps-types": { @@ -111168,6 +117671,7 @@ "type": "string" } }, + "x-state": "Generally available; Added in 8.2.0", "style": "form" }, "field_caps-include_empty_fields": { @@ -111178,6 +117682,7 @@ "schema": { "type": "boolean" }, + "x-state": "Generally available; Added in 8.13.0", "style": "form" }, "fleet.msearch-index": { @@ -112011,6 +118516,16 @@ }, "style": "form" }, + "index-require_data_stream": { + "in": "query", + "name": "require_data_stream", + "description": "If `true`, the request's actions must target a data stream (existing or to be created).", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" + }, "indices.analyze-index": { "in": "path", "name": "index", @@ -112555,6 +119070,7 @@ "schema": { "type": "boolean" }, + "x-state": "Generally available; Added in 8.11.0", "style": "form" }, "indices.get_data_stream-master_timeout": { @@ -112688,6 +119204,7 @@ "schema": { "type": "boolean" }, + "x-state": "Generally available; Added in 8.11.0", "style": "form" }, "indices.get_mapping-index": { @@ -113211,6 +119728,36 @@ }, "style": "form" }, + "indices.recovery-allow_no_indices": { + "in": "query", + "name": "allow_no_indices", + "description": "If `false`, the request returns an error if any wildcard expression, index alias, or `_all` value targets only missing or closed indices.\nThis behavior applies even if the request targets other open indices.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" + }, + "indices.recovery-expand_wildcards": { + "in": "query", + "name": "expand_wildcards", + "description": "Type of index that wildcard patterns can match.\nIf the request can target data streams, this argument determines whether wildcard expressions match hidden data streams.\nSupports comma-separated values, such as `open,hidden`.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.ExpandWildcards" + }, + "style": "form" + }, + "indices.recovery-ignore_unavailable": { + "in": "query", + "name": "ignore_unavailable", + "description": "If `false`, the request returns an error if it targets a missing or closed index.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" + }, "indices.refresh-index": { "in": "path", "name": "index", @@ -113639,6 +120186,7 @@ "schema": { "type": "boolean" }, + "x-state": "Generally available; Added in 8.11.0", "style": "form" }, "indices.split-index": { @@ -114064,6 +120612,16 @@ }, "style": "simple" }, + "inference.put-timeout": { + "in": "query", + "name": "timeout", + "description": "Specifies the amount of time to wait for the inference endpoint to be created.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Duration" + }, + "style": "form" + }, "inference.update-inference_id": { "in": "path", "name": "inference_id", @@ -114108,16 +120666,6 @@ }, "style": "simple" }, - "ingest.get_ip_location_database-master_timeout": { - "in": "query", - "name": "master_timeout", - "description": "The period to wait for a connection to the master node.\nIf no response is received before the timeout expires, the request fails and returns an error.\nA value of `-1` indicates that the request should never time out.", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Duration" - }, - "style": "form" - }, "ingest.get_pipeline-id": { "in": "path", "name": "id", @@ -115457,6 +122005,16 @@ }, "style": "form" }, + "msearch-index_": { + "in": "query", + "name": "index", + "description": "Comma-separated list of data streams, indices, and index aliases to use as default", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Indices" + }, + "style": "form" + }, "msearch-max_concurrent_searches": { "in": "query", "name": "max_concurrent_searches", @@ -116719,6 +123277,7 @@ "schema": { "type": "boolean" }, + "x-state": "Generally available; Added in 8.14.0", "style": "form" }, "search_mvt-index": { @@ -116836,6 +123395,16 @@ }, "style": "form" }, + "search_mvt-track_total_hits": { + "in": "query", + "name": "track_total_hits", + "description": "The number of hits matching the query to count accurately.\nIf `true`, the exact number of hits is returned at the cost of some performance.\nIf `false`, the response does not include the total number of hits matching the query.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_global.search._types.TrackHits" + }, + "style": "form" + }, "search_mvt-with_labels": { "in": "query", "name": "with_labels", @@ -117056,6 +123625,7 @@ "schema": { "type": "boolean" }, + "x-state": "Generally available; Added in 7.0.0", "style": "form" }, "search_template-typed_keys": { @@ -117403,6 +123973,7 @@ "schema": { "type": "boolean" }, + "x-state": "Generally available; Added in 8.5.0", "style": "form" }, "security.has_privileges-user": { @@ -117497,6 +124068,7 @@ "schema": { "type": "boolean" }, + "x-state": "Generally available; Added in 8.5.0", "style": "form" }, "security.query_api_keys-with_profile_uid": { @@ -117507,6 +124079,7 @@ "schema": { "type": "boolean" }, + "x-state": "Generally available; Added in 8.14.0", "style": "form" }, "security.query_api_keys-typed_keys": { @@ -117517,6 +124090,7 @@ "schema": { "type": "boolean" }, + "x-state": "Generally available; Added in 8.14.0", "style": "form" }, "security.query_user-with_profile_uid": { @@ -118414,6 +124988,7 @@ }, "explain": { "description": "If true, returns detailed information about score computation as part of a hit.", + "default": false, "type": "boolean" }, "ext": { @@ -118425,6 +125000,7 @@ }, "from": { "description": "Starting document offset. By default, you cannot page through more than 10,000\nhits using the from and size parameters. To page through more hits, use the\nsearch_after parameter.", + "default": 0.0, "type": "number" }, "highlight": { @@ -118505,6 +125081,7 @@ }, "size": { "description": "The number of hits to return. By default, you cannot page through more\nthan 10,000 hits using the from and size parameters. To page through more\nhits, use the search_after parameter.", + "default": 10.0, "type": "number" }, "slice": { @@ -118528,6 +125105,7 @@ }, "terminate_after": { "description": "Maximum number of documents to collect for each shard. If a query reaches this\nlimit, Elasticsearch terminates the query early. Elasticsearch collects documents\nbefore sorting. Defaults to 0, which does not terminate query execution early.", + "default": 0.0, "type": "number" }, "timeout": { @@ -118536,10 +125114,12 @@ }, "track_scores": { "description": "If true, calculate and return document scores, even if the scores are not used for sorting.", + "default": false, "type": "boolean" }, "version": { "description": "If true, returns document version as part of a hit.", + "default": false, "type": "boolean" }, "seq_no_primary_term": { @@ -118832,10 +125412,12 @@ }, "allow_partial_search_results": { "description": "Allow query execution also in case of shard failures.\nIf true, the query will keep running and will return results based on the available shards.\nFor sequences, the behavior can be further refined using allow_partial_sequence_results", + "default": true, "type": "boolean" }, "allow_partial_sequence_results": { "description": "This flag applies only to sequences and has effect only if allow_partial_search_results=true.\nIf true, the sequence query will return results based on the available shards, ignoring the others.\nIf false, the sequence query will return successfully, but will always have empty results.", + "default": false, "type": "boolean" }, "size": { @@ -118863,6 +125445,7 @@ }, "max_samples_per_key": { "description": "By default, the response of a sample query contains up to `10` samples, with one sample per unique set of join keys. Use the `size`\nparameter to get a smaller or larger set of samples. To retrieve more than one sample per set of join keys, use the\n`max_samples_per_key` parameter. Pipes are not supported for sample queries.", + "default": 1.0, "type": "number" } }, @@ -118962,6 +125545,7 @@ }, "explain": { "description": "If true, returns detailed information about score computation as part of a hit.", + "default": false, "type": "boolean" }, "ext": { @@ -118973,6 +125557,7 @@ }, "from": { "description": "Starting document offset. By default, you cannot page through more than 10,000\nhits using the from and size parameters. To page through more hits, use the\nsearch_after parameter.", + "default": 0.0, "type": "number" }, "highlight": { @@ -119038,6 +125623,7 @@ }, "size": { "description": "The number of hits to return. By default, you cannot page through more\nthan 10,000 hits using the from and size parameters. To page through more\nhits, use the search_after parameter.", + "default": 10.0, "type": "number" }, "slice": { @@ -119061,6 +125647,7 @@ }, "terminate_after": { "description": "Maximum number of documents to collect for each shard. If a query reaches this\nlimit, Elasticsearch terminates the query early. Elasticsearch collects documents\nbefore sorting. Defaults to 0, which does not terminate query execution early.", + "default": 0.0, "type": "number" }, "timeout": { @@ -119069,10 +125656,12 @@ }, "track_scores": { "description": "If true, calculate and return document scores, even if the scores are not used for sorting.", + "default": false, "type": "boolean" }, "version": { "description": "If true, returns document version as part of a hit.", + "default": false, "type": "boolean" }, "seq_no_primary_term": { @@ -119181,6 +125770,7 @@ }, "explain": { "description": "If `true`, the response includes token attributes and additional details.", + "default": false, "type": "boolean" }, "field": { @@ -119423,6 +126013,7 @@ }, "numeric_detection": { "description": "Automatically map strings into numeric data types for all fields.", + "default": false, "type": "boolean" }, "properties": { @@ -119472,8 +126063,8 @@ }, "indicesPutSettingsRequestExample3": { "summary": "Update index analysis", - "description": "To add an analyzer, you must close the index, define the analyzer, then reopen the index.", - "value": "{\n \"analysis\" : {\n \"analyzer\":{\n \"content\":{\n \"type\":\"custom\",\n \"tokenizer\":\"whitespace\"\n }\n }\n }\n}\n\nPOST /my-index-000001/_open" + "description": "To add an analyzer, you must close the index (`POST /my-index-000001/_close`), define the analyzer, then reopen the index (`POST /my-index-000001/_open`).", + "value": "{\n \"analysis\": {\n \"analyzer\": {\n \"content\": {\n \"type\": \"custom\",\n \"tokenizer\": \"whitespace\"\n }\n }\n }\n}" } } } @@ -119732,6 +126323,10 @@ } ] }, + "input_type": { + "description": "Specifies the input data type for the text embedding model. The `input_type` parameter only applies to Inference Endpoints with the `text_embedding` task type. Possible values include:\n* `SEARCH`\n* `INGEST`\n* `CLASSIFICATION`\n* `CLUSTERING`\nNot all services support all values. Unsupported values will trigger a validation exception.\nAccepted values depend on the configured inference service, refer to the relevant service-specific documentation for more info.\n\n> info\n> The `input_type` parameter specified on the root level of the request body will take precedence over the `input_type` parameter specified in `task_settings`.", + "type": "string" + }, "task_settings": { "$ref": "#/components/schemas/inference._types.TaskSettings" } @@ -119917,10 +126512,12 @@ }, "model_memory_limit": { "description": "The approximate maximum amount of memory resources that are permitted for\nanalytical processing. If your `elasticsearch.yml` file contains an\n`xpack.ml.max_model_memory_limit` setting, an error occurs when you try to\ncreate data frame analytics jobs that have `model_memory_limit` values\ngreater than that setting.", + "default": "1gb", "type": "string" }, "max_num_threads": { "description": "The maximum number of threads to be used by the analysis. Using more\nthreads may decrease the time necessary to complete the analysis at the\ncost of using more CPU. Note that the process may use additional threads\nfor operational functionality other than the analysis itself.", + "default": 1.0, "type": "number" }, "analyzed_fields": { @@ -119928,6 +126525,7 @@ }, "allow_lazy_start": { "description": "Specifies whether this job can start when there is insufficient machine\nlearning node capacity for it to be immediately assigned to a node.", + "default": false, "type": "boolean" } } @@ -119949,10 +126547,12 @@ "properties": { "anomaly_score": { "description": "Refer to the description for the `anomaly_score` query parameter.", + "default": 0.0, "type": "number" }, "desc": { "description": "Refer to the description for the `desc` query parameter.", + "default": false, "type": "boolean" }, "end": { @@ -119960,10 +126560,12 @@ }, "exclude_interim": { "description": "Refer to the description for the `exclude_interim` query parameter.", + "default": false, "type": "boolean" }, "expand": { "description": "Refer to the description for the `expand` query parameter.", + "default": false, "type": "boolean" }, "page": { @@ -120048,6 +126650,7 @@ "properties": { "desc": { "description": "Refer to the description for the `desc` query parameter.", + "default": false, "type": "boolean" }, "end": { @@ -120081,6 +126684,7 @@ "properties": { "allow_no_match": { "description": "Refer to the description for the `allow_no_match` query parameter.", + "default": true, "type": "boolean" }, "bucket_span": { @@ -120091,6 +126695,7 @@ }, "exclude_interim": { "description": "Refer to the description for the `exclude_interim` query parameter.", + "default": false, "type": "boolean" }, "overall_score": { @@ -120109,6 +126714,7 @@ }, "top_n": { "description": "Refer to the description for the `top_n` query parameter.", + "default": 1.0, "type": "number" } } @@ -120130,6 +126736,7 @@ "properties": { "desc": { "description": "Refer to the description for the `desc` query parameter.", + "default": false, "type": "boolean" }, "end": { @@ -120137,6 +126744,7 @@ }, "exclude_interim": { "description": "Refer to the description for the `exclude_interim` query parameter.", + "default": false, "type": "boolean" }, "page": { @@ -120144,6 +126752,7 @@ }, "record_score": { "description": "Refer to the description for the `record_score` query parameter.", + "default": 0.0, "type": "number" }, "sort": { @@ -120513,6 +127122,7 @@ }, "explain": { "description": "If `true`, the request returns detailed information about score computation as part of a hit.", + "default": false, "type": "boolean" }, "ext": { @@ -120524,6 +127134,7 @@ }, "from": { "description": "The starting document offset, which must be non-negative.\nBy default, you cannot page through more than 10,000 hits using the `from` and `size` parameters.\nTo page through more hits, use the `search_after` parameter.", + "default": 0.0, "type": "number" }, "highlight": { @@ -120587,6 +127198,7 @@ }, "profile": { "description": "Set to `true` to return detailed timing information about the execution of individual components in a search request.\nNOTE: This is a debugging tool and adds significant overhead to search execution.", + "default": false, "type": "boolean" }, "query": { @@ -120621,6 +127233,7 @@ }, "size": { "description": "The number of hits to return, which must not be negative.\nBy default, you cannot page through more than 10,000 hits using the `from` and `size` parameters.\nTo page through more hits, use the `search_after` property.", + "default": 10.0, "type": "number" }, "slice": { @@ -120644,6 +127257,7 @@ }, "terminate_after": { "description": "The maximum number of documents to collect for each shard.\nIf a query reaches this limit, Elasticsearch terminates the query early.\nElasticsearch collects documents before sorting.\n\nIMPORTANT: Use with caution.\nElasticsearch applies this property to each shard handling the request.\nWhen possible, let Elasticsearch perform early termination automatically.\nAvoid specifying this property for requests that target data streams with backing indices across multiple data tiers.\n\nIf set to `0` (default), the query does not terminate early.", + "default": 0.0, "type": "number" }, "timeout": { @@ -120652,10 +127266,12 @@ }, "track_scores": { "description": "If `true`, calculate and return document scores, even if the scores are not used for sorting.", + "default": false, "type": "boolean" }, "version": { "description": "If `true`, the request returns the document version as part of a hit.", + "default": false, "type": "boolean" }, "seq_no_primary_term": { @@ -120742,14 +127358,17 @@ }, "buffer": { "description": "The size, in pixels, of a clipping buffer outside the tile. This allows renderers\nto avoid outline artifacts from geometries that extend past the extent of the tile.", + "default": 5.0, "type": "number" }, "exact_bounds": { "description": "If `false`, the meta layer's feature is the bounding box of the tile.\nIf `true`, the meta layer's feature is a bounding box resulting from a\n`geo_bounds` aggregation. The aggregation runs on values that intersect\nthe `//` tile with `wrap_longitude` set to `false`. The resulting\nbounding box may be larger than the vector tile.", + "default": false, "type": "boolean" }, "extent": { "description": "The size, in pixels, of a side of the tile. Vector tiles are square with equal sides.", + "default": 4096.0, "type": "number" }, "fields": { @@ -120760,6 +127379,7 @@ }, "grid_precision": { "description": "Additional zoom levels available through the aggs layer. For example, if `` is `7`\nand `grid_precision` is `8`, you can zoom in up to level 15. Accepts 0-8. If 0, results\ndon't include the aggs layer.", + "default": 8.0, "type": "number" }, "grid_type": { @@ -120773,6 +127393,7 @@ }, "size": { "description": "The maximum number of features to return in the hits layer. Accepts 0-10000.\nIf 0, results don't include the hits layer.", + "default": 10000.0, "type": "number" }, "sort": { @@ -120804,6 +127425,7 @@ "properties": { "explain": { "description": "If `true`, returns detailed information about score calculation as part of each hit.\nIf you specify both this and the `explain` query parameter, the API uses only the query parameter.", + "default": false, "type": "boolean" }, "id": { @@ -120818,6 +127440,7 @@ }, "profile": { "description": "If `true`, the query execution is profiled.", + "default": false, "type": "boolean" }, "source": { @@ -121236,6 +127859,7 @@ }, "enabled": { "description": "Specifies whether the user is enabled.", + "default": true, "type": "boolean" } } @@ -121268,6 +127892,7 @@ }, "from": { "description": "The starting document offset.\nIt must not be negative.\nBy default, you cannot page through more than 10,000 hits using the `from` and `size` parameters.\nTo page through more hits, use the `search_after` parameter.", + "default": 0.0, "type": "number" }, "sort": { @@ -121275,6 +127900,7 @@ }, "size": { "description": "The number of hits to return.\nIt must not be negative.\nThe `size` parameter can be set to `0`, in which case no API key matches are returned, only the aggregation results.\nBy default, you cannot page through more than 10,000 hits using the `from` and `size` parameters.\nTo page through more hits, use the `search_after` parameter.", + "default": 10.0, "type": "number" }, "search_after": { @@ -121287,6 +127913,16 @@ "summary": "Query API keys by ID", "description": "Run `GET /_security/_query/api_key?with_limited_by=true` to retrieve an API key by ID.", "value": "{\n \"query\": {\n \"ids\": {\n \"values\": [\n \"VuaCfGcBCdbkQm-e5aOx\"\n ]\n }\n }\n}" + }, + "QueryApiKeysRequestExample2": { + "summary": "Query API keys with pagination", + "description": "Run `GET /_security/_query/api_key`. Use a `bool` query to issue complex logical conditions and use `from`, `size`, and `sort` to help paginate the result. For example, the API key name must begin with `app1-key-` and must not be `app1-key-01`. It must be owned by a username with the wildcard pattern `org-*-user` and the `environment` metadata field must have a `production` value. The offset to begin the search result is the twentieth (zero-based index) API key. The page size of the response is 10 API keys. The result is first sorted by creation date in descending order, then by name in ascending order.\n", + "value": "{\n \"query\": {\n \"bool\": {\n \"must\": [\n {\n \"prefix\": {\n \"name\": \"app1-key-\" \n }\n },\n {\n \"term\": {\n \"invalidated\": \"false\" \n }\n }\n ],\n \"must_not\": [\n {\n \"term\": {\n \"name\": \"app1-key-01\" \n }\n }\n ],\n \"filter\": [\n {\n \"wildcard\": {\n \"username\": \"org-*-user\" \n }\n },\n {\n \"term\": {\n \"metadata.environment\": \"production\" \n }\n }\n ]\n }\n },\n \"from\": 20, \n \"size\": 10, \n \"sort\": [ \n { \"creation\": { \"order\": \"desc\", \"format\": \"date_time\" } },\n \"name\"\n ]\n}" + }, + "QueryApiKeysRequestExample3": { + "summary": "Query API keys by name", + "description": "Run `GET /_security/_query/api_key` to retrieve the API key by name.", + "value": "{\n \"query\": {\n \"term\": {\n \"name\": {\n \"value\": \"application-key-1\"\n }\n }\n }\n}" } } } @@ -121303,6 +127939,7 @@ }, "from": { "description": "The starting document offset.\nIt must not be negative.\nBy default, you cannot page through more than 10,000 hits using the `from` and `size` parameters.\nTo page through more hits, use the `search_after` parameter.", + "default": 0.0, "type": "number" }, "sort": { @@ -121310,6 +127947,7 @@ }, "size": { "description": "The number of hits to return.\nIt must not be negative.\nBy default, you cannot page through more than 10,000 hits using the `from` and `size` parameters.\nTo page through more hits, use the `search_after` parameter.", + "default": 10.0, "type": "number" }, "search_after": { @@ -121343,6 +127981,7 @@ }, "from": { "description": "The starting document offset.\nIt must not be negative.\nBy default, you cannot page through more than 10,000 hits using the `from` and `size` parameters.\nTo page through more hits, use the `search_after` parameter.", + "default": 0.0, "type": "number" }, "sort": { @@ -121350,6 +127989,7 @@ }, "size": { "description": "The number of hits to return.\nIt must not be negative.\nBy default, you cannot page through more than 10,000 hits using the `from` and `size` parameters.\nTo page through more hits, use the `search_after` parameter.", + "default": 10.0, "type": "number" }, "search_after": { @@ -121384,6 +128024,7 @@ }, "size": { "description": "The number of profiles to return.", + "default": 10.0, "type": "number" }, "data": { @@ -121535,10 +128176,12 @@ }, "ignore_unavailable": { "description": "If `true`, the request ignores data streams and indices in `indices` that are missing or closed.\nIf `false`, the request returns an error for any data stream or index that is missing or closed.", + "default": false, "type": "boolean" }, "include_global_state": { "description": "If `true`, the current cluster state is included in the snapshot.\nThe cluster state includes persistent cluster settings, composable index templates, legacy index templates, ingest pipelines, and ILM policies.\nIt also includes data stored in system indices, such as Watches and task records (configurable via `feature_states`).", + "default": true, "type": "boolean" }, "indices": { @@ -121549,6 +128192,7 @@ }, "partial": { "description": "If `true`, it enables you to restore a partial snapshot of indices with unavailable shards.\nOnly shards that were successfully included in the snapshot will be restored.\nAll missing shards will be recreated as empty.\n\nIf `false`, the entire restore operation will fail if one or more indices included in the snapshot do not have all primary shards available.", + "default": false, "type": "boolean" } } @@ -121612,6 +128256,7 @@ "properties": { "allow_partial_search_results": { "description": "If `true`, the response has partial results when there are shard request timeouts or shard failures.\nIf `false`, the API returns an error with no partial results.", + "default": false, "type": "boolean" }, "catalog": { @@ -121623,6 +128268,7 @@ "url": "https://www.elastic.co/docs/explore-analyze/query-filter/languages/sql-rest-columnar" }, "description": "If `true`, the results are in a columnar fashion: one row represents all the values of a certain column from the current page of results.\nThe API supports this parameter only for CBOR, JSON, SMILE, and YAML responses.", + "default": false, "type": "boolean" }, "cursor": { @@ -121631,10 +128277,12 @@ }, "fetch_size": { "description": "The maximum number of rows (or entries) to return in one response.", + "default": 1000.0, "type": "number" }, "field_multi_value_leniency": { "description": "If `false`, the API returns an exception when encountering multiple values for a field.\nIf `true`, the API is lenient and returns the first value from the array with no guarantee of consistent results.", + "default": false, "type": "boolean" }, "filter": { @@ -121642,6 +128290,7 @@ }, "index_using_frozen": { "description": "If `true`, the search can run on frozen indices.", + "default": false, "type": "boolean" }, "keep_alive": { @@ -121649,6 +128298,7 @@ }, "keep_on_completion": { "description": "If `true`, Elasticsearch stores synchronous searches if you also specify the `wait_for_completion_timeout` parameter.\nIf `false`, Elasticsearch only stores async searches that don't finish before the `wait_for_completion_timeout`.", + "default": false, "type": "boolean" }, "page_timeout": { @@ -121700,6 +128350,7 @@ "properties": { "fetch_size": { "description": "The maximum number of rows (or entries) to return in one response.", + "default": 1000.0, "type": "number" }, "filter": { @@ -121739,6 +128390,7 @@ }, "size": { "description": "The number of matching terms to return.", + "default": 10.0, "type": "number" }, "timeout": { @@ -121746,6 +128398,7 @@ }, "case_insensitive": { "description": "When `true`, the provided search string is matched against index terms without case sensitivity.", + "default": false, "type": "boolean" }, "index_filter": { @@ -121798,22 +128451,27 @@ }, "field_statistics": { "description": "If `true`, the response includes:\n\n* The document count (how many documents contain this field).\n* The sum of document frequencies (the sum of document frequencies for all terms in this field).\n* The sum of total term frequencies (the sum of total term frequencies of each term in this field).", + "default": true, "type": "boolean" }, "offsets": { "description": "If `true`, the response includes term offsets.", + "default": true, "type": "boolean" }, "payloads": { "description": "If `true`, the response includes term payloads.", + "default": true, "type": "boolean" }, "positions": { "description": "If `true`, the response includes term positions.", + "default": true, "type": "boolean" }, "term_statistics": { "description": "If `true`, the response includes:\n\n* The total term frequency (how often a term occurs in all documents).\n* The document frequency (the number of documents containing the current term).\n\nBy default these values are not returned since term statistics can have a serious performance impact.", + "default": false, "type": "boolean" }, "routing": { @@ -121984,10 +128642,12 @@ }, "ignore_condition": { "description": "When set to `true`, the watch execution uses the always condition. This can also be specified as an HTTP parameter.", + "default": false, "type": "boolean" }, "record_execution": { "description": "When set to `true`, the watch record representing the watch execution result is persisted to the `.watcher-history` index for the current time.\nIn addition, the status of the watch is updated, possibly throttling subsequent runs.\nThis can also be specified as an HTTP parameter.", + "default": false, "type": "boolean" }, "simulated_actions": { @@ -122006,6 +128666,16 @@ "summary": "Run a watch", "description": "Run `POST _watcher/watch/my_watch/_execute` to run a watch. The input defined in the watch is ignored and the `alternative_input` is used as the payload. The condition as defined by the watch is ignored and is assumed to evaluate to true. The `force_simulate` action forces the simulation of `my-action`. Forcing the simulation means that throttling is ignored and the watch is simulated by Watcher instead of being run normally.\n", "value": "{\n \"trigger_data\" : { \n \"triggered_time\" : \"now\",\n \"scheduled_time\" : \"now\"\n },\n \"alternative_input\" : { \n \"foo\" : \"bar\"\n },\n \"ignore_condition\" : true, \n \"action_modes\" : {\n \"my-action\" : \"force_simulate\" \n },\n \"record_execution\" : true \n}" + }, + "WatcherExecuteRequestExample2": { + "summary": "Run a watch with multiple action modes", + "description": "Run `POST _watcher/watch/my_watch/_execute` and set a different mode for each action.\n", + "value": "{\n \"action_modes\" : {\n \"action1\" : \"force_simulate\",\n \"action2\" : \"skip\"\n }\n}" + }, + "WatcherExecuteRequestExample3": { + "summary": "Run a watch inline", + "description": "Run `POST _watcher/watch/_execute` to run a watch inline. All other settings for this API still apply when inlining a watch. In this example, while the inline watch defines a compare condition, during the execution this condition will be ignored.\n", + "value": "{\n \"watch\" : {\n \"trigger\" : { \"schedule\" : { \"interval\" : \"10s\" } },\n \"input\" : {\n \"search\" : {\n \"request\" : {\n \"indices\" : [ \"logs\" ],\n \"body\" : {\n \"query\" : {\n \"match\" : { \"message\": \"error\" }\n }\n }\n }\n }\n },\n \"condition\" : {\n \"compare\" : { \"ctx.payload.hits.total\" : { \"gt\" : 0 }}\n },\n \"actions\" : {\n \"log_error\" : {\n \"logging\" : {\n \"text\" : \"Found {{ctx.payload.hits.total}} errors in the logs\"\n }\n }\n }\n }\n}" } } } @@ -122064,10 +128734,12 @@ "properties": { "from": { "description": "The offset from the first result to fetch.\nIt must be non-negative.", + "default": 0.0, "type": "number" }, "size": { "description": "The number of hits to return.\nIt must be non-negative.", + "default": 10.0, "type": "number" }, "query": { diff --git a/output/openapi/elasticsearch-serverless-openapi-docs.redirects.csv b/output/openapi/elasticsearch-serverless-openapi-docs.redirects.csv new file mode 100644 index 0000000000..30434f4649 --- /dev/null +++ b/output/openapi/elasticsearch-serverless-openapi-docs.redirects.csv @@ -0,0 +1,72 @@ +async-search-submit-1,async-search-submit +bulk-1,bulk +cat-aliases-1,cat-aliases +cat-component-templates-1,cat-component-templates +cat-count-1,cat-count +cat-indices-1,cat-indices +cat-ml-data-frame-analytics-1,cat-ml-data-frame-analytics +cat-ml-datafeeds-1,cat-ml-datafeeds +cat-ml-jobs-1,cat-ml-jobs +cat-ml-trained-models-1,cat-ml-trained-models +cat-transforms-1,cat-transforms +clear-scroll-1,clear-scroll +cluster-get-component-template-1,cluster-get-component-template +connector-put-1,connector-put +count-1,count +enrich-get-policy-1,enrich-get-policy +field-caps-1,field-caps +index-1,index +indices-analyze-1,indices-analyze +indices-delete-alias-1,indices-delete-alias +indices-exists-alias-1,indices-exists-alias +indices-get-alias-1,indices-get-alias +indices-get-alias-2,indices-get-alias +indices-get-alias-3,indices-get-alias +indices-get-data-stream-1,indices-get-data-stream +indices-get-index-template-1,indices-get-index-template +indices-get-mapping-1,indices-get-mapping +indices-get-settings-1,indices-get-settings +indices-get-settings-2,indices-get-settings +indices-get-settings-3,indices-get-settings +indices-put-alias-1,indices-put-alias +indices-put-settings-1,indices-put-settings +indices-refresh-1,indices-refresh +indices-rollover-1,indices-rollover +indices-simulate-template-1,indices-simulate-template +indices-validate-query-1,indices-validate-query +inference-delete-1,inference-delete +inference-get-1,inference-get +inference-get-2,inference-get +inference-inference-1,inference-inference +inference-put-1,inference-put +ingest-get-pipeline-1,ingest-get-pipeline +ingest-simulate-1,ingest-simulate +logstash-get-pipeline-1,logstash-get-pipeline +mget-1,mget +ml-get-calendars-1,ml-get-calendars +ml-get-data-frame-analytics-1,ml-get-data-frame-analytics +ml-get-data-frame-analytics-stats-1,ml-get-data-frame-analytics-stats +ml-get-datafeed-stats-1,ml-get-datafeed-stats +ml-get-datafeeds-1,ml-get-datafeeds +ml-get-filters-1,ml-get-filters +ml-get-job-stats-1,ml-get-job-stats +ml-get-jobs-1,ml-get-jobs +ml-get-trained-models-1,ml-get-trained-models +ml-get-trained-models-stats-1,ml-get-trained-models-stats +ml-preview-data-frame-analytics-1,ml-preview-data-frame-analytics +ml-preview-datafeed-1,ml-preview-datafeed +msearch-1,msearch +msearch-template-1,msearch-template +mtermvectors-1,mtermvectors +put-script-1,put-script +rank-eval-1,rank-eval +render-search-template-1,render-search-template +scroll-1,scroll +search-1,search +search-application-get-behavioral-analytics-1,search-application-get-behavioral-analytics +search-template-1,search-template +security-get-role-1,security-get-role +security-has-privileges-1,security-has-privileges +termvectors-1,termvectors +transform-get-transform-1,transform-get-transform +transform-preview-transform-1,transform-preview-transform diff --git a/output/openapi/elasticsearch-serverless-openapi.json b/output/openapi/elasticsearch-serverless-openapi.json index de43ba1f39..2e7af79da1 100644 --- a/output/openapi/elasticsearch-serverless-openapi.json +++ b/output/openapi/elasticsearch-serverless-openapi.json @@ -79,7 +79,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] }, "delete": { "tags": [ @@ -114,7 +119,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_async_search/status/{id}": { @@ -178,7 +188,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_async_search": { @@ -329,7 +344,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/{index}/_async_search": { @@ -483,7 +503,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_bulk": { @@ -545,7 +570,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] }, "post": { "tags": [ @@ -605,7 +635,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/{index}/_bulk": { @@ -670,7 +705,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] }, "post": { "tags": [ @@ -733,7 +773,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_cat/aliases": { @@ -764,7 +809,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_cat/aliases/{name}": { @@ -798,7 +848,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_cat/component_templates": { @@ -829,7 +884,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_cat/component_templates/{name}": { @@ -863,7 +923,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_cat/count": { @@ -888,7 +953,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_cat/count/{index}": { @@ -916,7 +986,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_cat": { @@ -940,7 +1015,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_cat/indices": { @@ -986,7 +1066,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_cat/indices/{index}": { @@ -1035,7 +1120,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_cat/ml/data_frame/analytics": { @@ -1069,7 +1159,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_cat/ml/data_frame/analytics/{id}": { @@ -1106,7 +1201,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_cat/ml/datafeeds": { @@ -1137,7 +1237,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_cat/ml/datafeeds/{datafeed_id}": { @@ -1171,7 +1276,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_cat/ml/anomaly_detectors": { @@ -1205,7 +1315,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_cat/ml/anomaly_detectors/{job_id}": { @@ -1242,7 +1357,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_cat/ml/trained_models": { @@ -1282,7 +1402,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_cat/ml/trained_models/{model_id}": { @@ -1325,7 +1450,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_cat/transforms": { @@ -1362,7 +1492,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_cat/transforms/{transform_id}": { @@ -1402,7 +1537,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_search/scroll": { @@ -1437,7 +1577,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] }, "post": { "tags": [ @@ -1470,7 +1615,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] }, "delete": { "tags": [ @@ -1492,7 +1642,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_search/scroll/{scroll_id}": { @@ -1530,7 +1685,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] }, "post": { "tags": [ @@ -1566,7 +1726,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] }, "delete": { "tags": [ @@ -1593,7 +1758,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_pit": { @@ -1660,7 +1830,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_component_template/{name}": { @@ -1678,6 +1853,9 @@ { "$ref": "#/components/parameters/cluster.get_component_template-flat_settings" }, + { + "$ref": "#/components/parameters/cluster.get_component_template-settings_filter" + }, { "$ref": "#/components/parameters/cluster.get_component_template-include_defaults" }, @@ -1694,7 +1872,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] }, "put": { "tags": [ @@ -1710,6 +1893,9 @@ { "$ref": "#/components/parameters/cluster.put_component_template-create" }, + { + "$ref": "#/components/parameters/cluster.put_component_template-cause" + }, { "$ref": "#/components/parameters/cluster.put_component_template-master_timeout" } @@ -1723,7 +1909,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] }, "post": { "tags": [ @@ -1739,6 +1930,9 @@ { "$ref": "#/components/parameters/cluster.put_component_template-create" }, + { + "$ref": "#/components/parameters/cluster.put_component_template-cause" + }, { "$ref": "#/components/parameters/cluster.put_component_template-master_timeout" } @@ -1752,7 +1946,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] }, "delete": { "tags": [ @@ -1807,7 +2006,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] }, "head": { "tags": [ @@ -1858,7 +2062,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_component_template": { @@ -1873,6 +2082,9 @@ { "$ref": "#/components/parameters/cluster.get_component_template-flat_settings" }, + { + "$ref": "#/components/parameters/cluster.get_component_template-settings_filter" + }, { "$ref": "#/components/parameters/cluster.get_component_template-include_defaults" }, @@ -1889,7 +2101,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_info/{target}": { @@ -1949,7 +2166,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_connector/{connector_id}/_check_in": { @@ -1999,7 +2221,12 @@ } }, "x-state": "Technical preview", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_connector/{connector_id}": { @@ -2046,7 +2273,12 @@ } }, "x-state": "Beta", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] }, "put": { "tags": [ @@ -2068,7 +2300,12 @@ } }, "x-state": "Beta", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] }, "delete": { "tags": [ @@ -2128,7 +2365,12 @@ } }, "x-state": "Beta", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_connector": { @@ -2239,7 +2481,12 @@ } }, "x-state": "Beta", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] }, "put": { "tags": [ @@ -2256,7 +2503,12 @@ } }, "x-state": "Beta", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] }, "post": { "tags": [ @@ -2319,7 +2571,12 @@ } }, "x-state": "Beta", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_connector/_sync_job/{connector_sync_job_id}/_cancel": { @@ -2364,7 +2621,12 @@ } }, "x-state": "Beta", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_connector/_sync_job/{connector_sync_job_id}": { @@ -2400,7 +2662,12 @@ } }, "x-state": "Beta", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] }, "delete": { "tags": [ @@ -2440,7 +2707,12 @@ } }, "x-state": "Beta", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_connector/_sync_job": { @@ -2541,7 +2813,12 @@ } }, "x-state": "Beta", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] }, "post": { "tags": [ @@ -2600,7 +2877,12 @@ } }, "x-state": "Beta", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_connector/{connector_id}/_filtering/_activate": { @@ -2645,7 +2927,12 @@ } }, "x-state": "Technical preview", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_connector/{connector_id}/_api_key_id": { @@ -2718,7 +3005,12 @@ } }, "x-state": "Beta", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_connector/{connector_id}/_configuration": { @@ -2797,7 +3089,12 @@ } }, "x-state": "Beta", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_connector/{connector_id}/_error": { @@ -2877,7 +3174,12 @@ } }, "x-state": "Technical preview", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_connector/{connector_id}/_filtering": { @@ -2962,7 +3264,12 @@ } }, "x-state": "Beta", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_connector/{connector_id}/_filtering/_validation": { @@ -3025,7 +3332,12 @@ } }, "x-state": "Technical preview", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_connector/{connector_id}/_index_name": { @@ -3105,7 +3417,12 @@ } }, "x-state": "Beta", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_connector/{connector_id}/_name": { @@ -3177,7 +3494,12 @@ } }, "x-state": "Beta", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_connector/{connector_id}/_native": { @@ -3239,7 +3561,12 @@ } }, "x-state": "Beta", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_connector/{connector_id}/_pipeline": { @@ -3312,7 +3639,12 @@ } }, "x-state": "Beta", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_connector/{connector_id}/_scheduling": { @@ -3387,7 +3719,12 @@ } }, "x-state": "Beta", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_connector/{connector_id}/_service_type": { @@ -3459,7 +3796,12 @@ } }, "x-state": "Beta", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_connector/{connector_id}/_status": { @@ -3531,7 +3873,12 @@ } }, "x-state": "Technical preview", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_count": { @@ -3595,7 +3942,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] }, "post": { "tags": [ @@ -3657,7 +4009,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/{index}/_count": { @@ -3724,7 +4081,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] }, "post": { "tags": [ @@ -3789,7 +4151,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/{index}/_create/{id}": { @@ -3811,18 +4178,9 @@ { "$ref": "#/components/parameters/create-id" }, - { - "$ref": "#/components/parameters/create-if_primary_term" - }, - { - "$ref": "#/components/parameters/create-if_seq_no" - }, { "$ref": "#/components/parameters/create-include_source_on_error" }, - { - "$ref": "#/components/parameters/create-op_type" - }, { "$ref": "#/components/parameters/create-pipeline" }, @@ -3860,7 +4218,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] }, "post": { "tags": [ @@ -3880,18 +4243,9 @@ { "$ref": "#/components/parameters/create-id" }, - { - "$ref": "#/components/parameters/create-if_primary_term" - }, - { - "$ref": "#/components/parameters/create-if_seq_no" - }, { "$ref": "#/components/parameters/create-include_source_on_error" }, - { - "$ref": "#/components/parameters/create-op_type" - }, { "$ref": "#/components/parameters/create-pipeline" }, @@ -3929,7 +4283,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/{index}/_doc/{id}": { @@ -4094,7 +4453,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] }, "put": { "tags": [ @@ -4149,6 +4513,9 @@ }, { "$ref": "#/components/parameters/index-require_alias" + }, + { + "$ref": "#/components/parameters/index-require_data_stream" } ], "requestBody": { @@ -4160,7 +4527,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] }, "post": { "tags": [ @@ -4215,6 +4587,9 @@ }, { "$ref": "#/components/parameters/index-require_alias" + }, + { + "$ref": "#/components/parameters/index-require_data_stream" } ], "requestBody": { @@ -4226,7 +4601,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] }, "delete": { "tags": [ @@ -4358,7 +4738,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] }, "head": { "tags": [ @@ -4500,7 +4885,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/{index}/_delete_by_query": { @@ -4944,7 +5334,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_scripts/{id}": { @@ -5006,7 +5401,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] }, "put": { "tags": [ @@ -5042,7 +5442,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] }, "post": { "tags": [ @@ -5078,7 +5483,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] }, "delete": { "tags": [ @@ -5133,7 +5543,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_enrich/policy/{name}": { @@ -5158,7 +5573,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] }, "put": { "tags": [ @@ -5230,7 +5650,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] }, "delete": { "tags": [ @@ -5275,7 +5700,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_enrich/policy/{name}/_execute": { @@ -5340,7 +5770,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_enrich/policy": { @@ -5362,7 +5797,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_eql/search/{id}": { @@ -5419,7 +5859,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] }, "delete": { "tags": [ @@ -5454,7 +5899,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_eql/search/status/{id}": { @@ -5525,7 +5975,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/{index}/_eql/search": { @@ -5556,6 +6011,9 @@ { "$ref": "#/components/parameters/eql.search-expand_wildcards" }, + { + "$ref": "#/components/parameters/eql.search-ccs_minimize_roundtrips" + }, { "$ref": "#/components/parameters/eql.search-ignore_unavailable" }, @@ -5578,7 +6036,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] }, "post": { "tags": [ @@ -5607,6 +6070,9 @@ { "$ref": "#/components/parameters/eql.search-expand_wildcards" }, + { + "$ref": "#/components/parameters/eql.search-ccs_minimize_roundtrips" + }, { "$ref": "#/components/parameters/eql.search-ignore_unavailable" }, @@ -5629,7 +6095,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_query/queries/{id}": { @@ -5701,7 +6172,12 @@ } }, "x-state": "Technical preview", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_query/queries": { @@ -5736,7 +6212,12 @@ } }, "x-state": "Technical preview", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_query": { @@ -5754,7 +6235,7 @@ { "in": "query", "name": "format", - "description": "A short version of the Accept header, e.g. json, yaml.", + "description": "A short version of the Accept header, e.g. json, yaml.\n\n`csv`, `tsv`, and `txt` formats will return results in a tabular format, excluding other metadata fields from the response.", "deprecated": false, "schema": { "$ref": "#/components/schemas/esql._types.EsqlFormat" @@ -5835,6 +6316,7 @@ }, "include_ccs_metadata": { "description": "When set to `true` and performing a cross-cluster query, the response will include an extra `_clusters`\nobject with information about the clusters that participated in the search along with info such as shards\ncount.", + "default": false, "type": "boolean" } }, @@ -5865,7 +6347,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/{index}/_source/{id}": { @@ -5973,16 +6460,6 @@ }, "style": "form" }, - { - "in": "query", - "name": "stored_fields", - "description": "A comma-separated list of stored fields to return as part of a hit.", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Fields" - }, - "style": "form" - }, { "in": "query", "name": "version", @@ -6017,7 +6494,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] }, "head": { "tags": [ @@ -6153,7 +6635,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/{index}/_explain/{id}": { @@ -6217,7 +6704,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] }, "post": { "tags": [ @@ -6279,7 +6771,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_field_caps": { @@ -6325,7 +6822,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] }, "post": { "tags": [ @@ -6369,7 +6871,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/{index}/_field_caps": { @@ -6418,7 +6925,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] }, "post": { "tags": [ @@ -6465,7 +6977,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/{index}/_graph/explore": { @@ -6500,7 +7017,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] }, "post": { "tags": [ @@ -6533,7 +7055,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/{index}/_doc": { @@ -6587,6 +7114,9 @@ }, { "$ref": "#/components/parameters/index-require_alias" + }, + { + "$ref": "#/components/parameters/index-require_data_stream" } ], "requestBody": { @@ -6598,7 +7128,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/{index}/_block/{block}": { @@ -6628,7 +7163,7 @@ "required": true, "deprecated": false, "schema": { - "$ref": "#/components/schemas/indices.add_block.IndicesBlockOptions" + "$ref": "#/components/schemas/indices._types.IndicesBlockOptions" }, "style": "simple" }, @@ -6700,7 +7235,7 @@ "indices": { "type": "array", "items": { - "$ref": "#/components/schemas/indices.add_block.IndicesBlockStatus" + "$ref": "#/components/schemas/indices.add_block.AddIndicesBlockStatus" } } }, @@ -6721,7 +7256,134 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] + }, + "delete": { + "tags": [ + "indices" + ], + "summary": "Remove an index block", + "description": "Remove an index block from an index.\nIndex blocks limit the operations allowed on an index by blocking specific operation types.\n\n## Required authorization\n\n* Index privileges: `manage`\n", + "operationId": "indices-remove-block", + "parameters": [ + { + "in": "path", + "name": "index", + "description": "A comma-separated list or wildcard expression of index names used to limit the request.\nBy default, you must explicitly name the indices you are removing blocks from.\nTo allow the removal of blocks from indices with `_all`, `*`, or other wildcard expressions, change the `action.destructive_requires_name` setting to `false`.\nYou can update this setting in the `elasticsearch.yml` file or by using the cluster update settings API.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.IndexName" + }, + "style": "simple" + }, + { + "in": "path", + "name": "block", + "description": "The block type to remove from the index.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/indices._types.IndicesBlockOptions" + }, + "style": "simple" + }, + { + "in": "query", + "name": "allow_no_indices", + "description": "If `false`, the request returns an error if any wildcard expression, index alias, or `_all` value targets only missing or closed indices.\nThis behavior applies even if the request targets other open indices.\nFor example, a request targeting `foo*,bar*` returns an error if an index starts with `foo` but no index starts with `bar`.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" + }, + { + "in": "query", + "name": "expand_wildcards", + "description": "The type of index that wildcard patterns can match.\nIf the request can target data streams, this argument determines whether wildcard expressions match hidden data streams.\nIt supports comma-separated values, such as `open,hidden`.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.ExpandWildcards" + }, + "style": "form" + }, + { + "in": "query", + "name": "ignore_unavailable", + "description": "If `false`, the request returns an error if it targets a missing or closed index.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" + }, + { + "in": "query", + "name": "master_timeout", + "description": "The period to wait for the master node.\nIf the master node is not available before the timeout expires, the request fails and returns an error.\nIt can also be set to `-1` to indicate that the request should never timeout.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Duration" + }, + "style": "form" + }, + { + "in": "query", + "name": "timeout", + "description": "The period to wait for a response from all relevant nodes in the cluster after updating the cluster metadata.\nIf no response is received before the timeout expires, the cluster metadata update still applies but the response will indicate that it was not completely acknowledged.\nIt can also be set to `-1` to indicate that the request should never timeout.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Duration" + }, + "style": "form" + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "acknowledged": { + "type": "boolean" + }, + "indices": { + "type": "array", + "items": { + "$ref": "#/components/schemas/indices.remove_block.RemoveIndicesBlockStatus" + } + } + }, + "required": [ + "acknowledged", + "indices" + ] + }, + "examples": { + "IndicesRemoveBlockResponseExample1": { + "description": "A successful response from `DELETE /my-index-000001/_block/write`, which removes an index block from an index.'", + "value": "{\n \"acknowledged\" : true,\n \"indices\" : [ {\n \"name\" : \"my-index-000001\",\n \"unblocked\" : true\n } ]\n}" + } + } + } + } + } + }, + "x-state": "Generally available", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_analyze": { @@ -6750,7 +7412,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] }, "post": { "tags": [ @@ -6777,7 +7444,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/{index}/_analyze": { @@ -6809,7 +7481,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] }, "post": { "tags": [ @@ -6839,7 +7516,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/{index}": { @@ -6940,6 +7622,7 @@ "schema": { "$ref": "#/components/schemas/indices.get.Features" }, + "x-state": "Generally available", "style": "form" } ], @@ -6959,7 +7642,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] }, "put": { "tags": [ @@ -7081,7 +7769,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] }, "delete": { "tags": [ @@ -7166,7 +7859,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] }, "head": { "tags": [ @@ -7257,7 +7955,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_data_stream/{name}": { @@ -7291,7 +7994,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] }, "put": { "tags": [ @@ -7346,7 +8054,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] }, "delete": { "tags": [ @@ -7401,7 +8114,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/{index}/_alias/{name}": { @@ -7438,7 +8156,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] }, "put": { "tags": [ @@ -7470,7 +8193,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] }, "post": { "tags": [ @@ -7502,7 +8230,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] }, "delete": { "tags": [ @@ -7531,7 +8264,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] }, "head": { "tags": [ @@ -7566,7 +8304,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/{index}/_aliases/{name}": { @@ -7600,7 +8343,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] }, "post": { "tags": [ @@ -7632,7 +8380,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] }, "delete": { "tags": [ @@ -7661,7 +8414,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_index_template/{name}": { @@ -7695,7 +8453,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] }, "put": { "tags": [ @@ -7727,7 +8490,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] }, "post": { "tags": [ @@ -7759,7 +8527,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] }, "delete": { "tags": [ @@ -7814,14 +8587,19 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] }, "head": { "tags": [ "indices" ], "summary": "Check index templates", - "description": "Check whether index templates exist.", + "description": "Check whether index templates exist.\n\n## Required authorization\n\n* Cluster privileges: `manage_index_templates`\n", "operationId": "indices-exists-index-template", "parameters": [ { @@ -7875,7 +8653,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_alias/{name}": { @@ -7909,7 +8692,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] }, "head": { "tags": [ @@ -7941,7 +8729,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/{index}/_lifecycle/explain": { @@ -8025,7 +8818,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_alias": { @@ -8056,7 +8854,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/{index}/_alias": { @@ -8090,7 +8893,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_data_stream/{name}/_lifecycle": { @@ -8178,7 +8986,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] }, "put": { "tags": [ @@ -8248,6 +9061,7 @@ }, "enabled": { "description": "If defined, it turns data stream lifecycle on/off (`true`/`false`) for this data stream. A data stream lifecycle\nthat's disabled (enabled: `false`) will have no effect on the data stream.", + "default": true, "type": "boolean" } } @@ -8285,7 +9099,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_data_stream": { @@ -8316,7 +9135,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_data_stream/{name}/_options": { @@ -8384,7 +9208,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] }, "put": { "tags": [ @@ -8463,7 +9292,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_data_stream/{name}/_settings": { @@ -8528,7 +9362,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] }, "put": { "tags": [ @@ -8638,7 +9477,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_index_template": { @@ -8669,7 +9513,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_mapping": { @@ -8703,7 +9552,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/{index}/_mapping": { @@ -8740,7 +9594,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] }, "put": { "tags": [ @@ -8785,7 +9644,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] }, "post": { "tags": [ @@ -8830,7 +9694,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_settings": { @@ -8870,7 +9739,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] }, "put": { "tags": [ @@ -8918,7 +9792,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/{index}/_settings": { @@ -8961,7 +9840,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] }, "put": { "tags": [ @@ -9012,7 +9896,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/{index}/_settings/{name}": { @@ -9058,7 +9947,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_settings/{name}": { @@ -9101,7 +9995,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_data_stream/_migrate/{name}": { @@ -9158,7 +10057,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_data_stream/_modify": { @@ -9210,7 +10114,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_refresh": { @@ -9238,7 +10147,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] }, "post": { "tags": [ @@ -9264,7 +10178,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/{index}/_refresh": { @@ -9295,7 +10214,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] }, "post": { "tags": [ @@ -9324,7 +10248,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_resolve/index/{name}": { @@ -9422,7 +10351,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/{alias}/_rollover": { @@ -9462,7 +10396,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/{alias}/_rollover/{new_index}": { @@ -9505,7 +10444,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_index_template/_simulate_index/{name}": { @@ -9566,6 +10510,7 @@ "schema": { "type": "boolean" }, + "x-state": "Generally available", "style": "form" } ], @@ -9602,7 +10547,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_index_template/_simulate": { @@ -9636,7 +10586,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_index_template/_simulate/{name}": { @@ -9673,7 +10628,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_aliases": { @@ -9744,7 +10704,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_validate/query": { @@ -9802,7 +10767,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] }, "post": { "tags": [ @@ -9858,7 +10828,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/{index}/_validate/query": { @@ -9919,7 +10894,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] }, "post": { "tags": [ @@ -9978,7 +10958,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_inference/chat_completion/{inference_id}/_stream": { @@ -10058,7 +11043,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch, machine-learning" + "x-metaTags": [ + { + "content": "Elasticsearch, Machine Learning", + "name": "product_name" + } + ] } }, "/_inference/completion/{inference_id}": { @@ -10149,7 +11139,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch, machine-learning" + "x-metaTags": [ + { + "content": "Elasticsearch, Machine Learning", + "name": "product_name" + } + ] } }, "/_inference/{inference_id}": { @@ -10170,18 +11165,26 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch, machine-learning" + "x-metaTags": [ + { + "content": "Elasticsearch, Machine Learning", + "name": "product_name" + } + ] }, "put": { "tags": [ "inference" ], "summary": "Create an inference endpoint", - "description": "IMPORTANT: The inference APIs enable you to use certain services, such as built-in machine learning models (ELSER, E5), models uploaded through Eland, Cohere, OpenAI, Mistral, Azure OpenAI, Google AI Studio, Google Vertex AI, Anthropic, Watsonx.ai, or Hugging Face.\nFor built-in models and models uploaded through Eland, the inference APIs offer an alternative way to use and manage trained models.\nHowever, if you do not plan to use the inference APIs to use these models or if you want to use non-NLP models, use the machine learning trained model APIs.\n\nThe following integrations are available through the inference API. You can find the available task types next to the integration name:\n* AlibabaCloud AI Search (`completion`, `rerank`, `sparse_embedding`, `text_embedding`)\n* Amazon Bedrock (`completion`, `text_embedding`)\n* Anthropic (`completion`)\n* Azure AI Studio (`completion`, `text_embedding`)\n* Azure OpenAI (`completion`, `text_embedding`)\n* Cohere (`completion`, `rerank`, `text_embedding`)\n* Elasticsearch (`rerank`, `sparse_embedding`, `text_embedding` - this service is for built-in models and models uploaded through Eland)\n* ELSER (`sparse_embedding`)\n* Google AI Studio (`completion`, `text_embedding`)\n* Google Vertex AI (`rerank`, `text_embedding`)\n* Hugging Face (`chat_completion`, `completion`, `rerank`, `text_embedding`)\n* Mistral (`chat_completion`, `completion`, `text_embedding`)\n* OpenAI (`chat_completion`, `completion`, `text_embedding`)\n* VoyageAI (`text_embedding`, `rerank`)\n* Watsonx inference integration (`text_embedding`)\n* JinaAI (`text_embedding`, `rerank`)\n\n## Required authorization\n\n* Cluster privileges: `manage_inference`\n", + "description": "IMPORTANT: The inference APIs enable you to use certain services, such as built-in machine learning models (ELSER, E5), models uploaded through Eland, Cohere, OpenAI, Mistral, Azure OpenAI, Google AI Studio, Google Vertex AI, Anthropic, Watsonx.ai, or Hugging Face.\nFor built-in models and models uploaded through Eland, the inference APIs offer an alternative way to use and manage trained models.\nHowever, if you do not plan to use the inference APIs to use these models or if you want to use non-NLP models, use the machine learning trained model APIs.\n\nThe following integrations are available through the inference API. You can find the available task types next to the integration name:\n* AlibabaCloud AI Search (`completion`, `rerank`, `sparse_embedding`, `text_embedding`)\n* Amazon Bedrock (`completion`, `text_embedding`)\n* Anthropic (`completion`)\n* Azure AI Studio (`completion`, `text_embedding`)\n* Azure OpenAI (`completion`, `text_embedding`)\n* Cohere (`completion`, `rerank`, `text_embedding`)\n* DeepSeek (`completion`, `chat_completion`)\n* Elasticsearch (`rerank`, `sparse_embedding`, `text_embedding` - this service is for built-in models and models uploaded through Eland)\n* ELSER (`sparse_embedding`)\n* Google AI Studio (`completion`, `text_embedding`)\n* Google Vertex AI (`rerank`, `text_embedding`)\n* Hugging Face (`chat_completion`, `completion`, `rerank`, `text_embedding`)\n* Mistral (`chat_completion`, `completion`, `text_embedding`)\n* OpenAI (`chat_completion`, `completion`, `text_embedding`)\n* VoyageAI (`text_embedding`, `rerank`)\n* Watsonx inference integration (`text_embedding`)\n* JinaAI (`text_embedding`, `rerank`)\n\n## Required authorization\n\n* Cluster privileges: `manage_inference`\n", "operationId": "inference-put", "parameters": [ { "$ref": "#/components/parameters/inference.put-inference_id" + }, + { + "$ref": "#/components/parameters/inference.put-timeout" } ], "requestBody": { @@ -10193,7 +11196,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch, machine-learning" + "x-metaTags": [ + { + "content": "Elasticsearch, Machine Learning", + "name": "product_name" + } + ] }, "post": { "tags": [ @@ -10219,7 +11227,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch, machine-learning" + "x-metaTags": [ + { + "content": "Elasticsearch, Machine Learning", + "name": "product_name" + } + ] }, "delete": { "tags": [ @@ -10244,7 +11257,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch, machine-learning" + "x-metaTags": [ + { + "content": "Elasticsearch, Machine Learning", + "name": "product_name" + } + ] } }, "/_inference/{task_type}/{inference_id}": { @@ -10268,14 +11286,19 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch, machine-learning" + "x-metaTags": [ + { + "content": "Elasticsearch, Machine Learning", + "name": "product_name" + } + ] }, "put": { "tags": [ "inference" ], "summary": "Create an inference endpoint", - "description": "IMPORTANT: The inference APIs enable you to use certain services, such as built-in machine learning models (ELSER, E5), models uploaded through Eland, Cohere, OpenAI, Mistral, Azure OpenAI, Google AI Studio, Google Vertex AI, Anthropic, Watsonx.ai, or Hugging Face.\nFor built-in models and models uploaded through Eland, the inference APIs offer an alternative way to use and manage trained models.\nHowever, if you do not plan to use the inference APIs to use these models or if you want to use non-NLP models, use the machine learning trained model APIs.\n\nThe following integrations are available through the inference API. You can find the available task types next to the integration name:\n* AlibabaCloud AI Search (`completion`, `rerank`, `sparse_embedding`, `text_embedding`)\n* Amazon Bedrock (`completion`, `text_embedding`)\n* Anthropic (`completion`)\n* Azure AI Studio (`completion`, `text_embedding`)\n* Azure OpenAI (`completion`, `text_embedding`)\n* Cohere (`completion`, `rerank`, `text_embedding`)\n* Elasticsearch (`rerank`, `sparse_embedding`, `text_embedding` - this service is for built-in models and models uploaded through Eland)\n* ELSER (`sparse_embedding`)\n* Google AI Studio (`completion`, `text_embedding`)\n* Google Vertex AI (`rerank`, `text_embedding`)\n* Hugging Face (`chat_completion`, `completion`, `rerank`, `text_embedding`)\n* Mistral (`chat_completion`, `completion`, `text_embedding`)\n* OpenAI (`chat_completion`, `completion`, `text_embedding`)\n* VoyageAI (`text_embedding`, `rerank`)\n* Watsonx inference integration (`text_embedding`)\n* JinaAI (`text_embedding`, `rerank`)\n\n## Required authorization\n\n* Cluster privileges: `manage_inference`\n", + "description": "IMPORTANT: The inference APIs enable you to use certain services, such as built-in machine learning models (ELSER, E5), models uploaded through Eland, Cohere, OpenAI, Mistral, Azure OpenAI, Google AI Studio, Google Vertex AI, Anthropic, Watsonx.ai, or Hugging Face.\nFor built-in models and models uploaded through Eland, the inference APIs offer an alternative way to use and manage trained models.\nHowever, if you do not plan to use the inference APIs to use these models or if you want to use non-NLP models, use the machine learning trained model APIs.\n\nThe following integrations are available through the inference API. You can find the available task types next to the integration name:\n* AlibabaCloud AI Search (`completion`, `rerank`, `sparse_embedding`, `text_embedding`)\n* Amazon Bedrock (`completion`, `text_embedding`)\n* Anthropic (`completion`)\n* Azure AI Studio (`completion`, `text_embedding`)\n* Azure OpenAI (`completion`, `text_embedding`)\n* Cohere (`completion`, `rerank`, `text_embedding`)\n* DeepSeek (`completion`, `chat_completion`)\n* Elasticsearch (`rerank`, `sparse_embedding`, `text_embedding` - this service is for built-in models and models uploaded through Eland)\n* ELSER (`sparse_embedding`)\n* Google AI Studio (`completion`, `text_embedding`)\n* Google Vertex AI (`rerank`, `text_embedding`)\n* Hugging Face (`chat_completion`, `completion`, `rerank`, `text_embedding`)\n* Mistral (`chat_completion`, `completion`, `text_embedding`)\n* OpenAI (`chat_completion`, `completion`, `text_embedding`)\n* VoyageAI (`text_embedding`, `rerank`)\n* Watsonx inference integration (`text_embedding`)\n* JinaAI (`text_embedding`, `rerank`)\n\n## Required authorization\n\n* Cluster privileges: `manage_inference`\n", "operationId": "inference-put-1", "parameters": [ { @@ -10283,6 +11306,9 @@ }, { "$ref": "#/components/parameters/inference.put-inference_id" + }, + { + "$ref": "#/components/parameters/inference.put-timeout" } ], "requestBody": { @@ -10294,7 +11320,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch, machine-learning" + "x-metaTags": [ + { + "content": "Elasticsearch, Machine Learning", + "name": "product_name" + } + ] }, "post": { "tags": [ @@ -10323,7 +11354,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch, machine-learning" + "x-metaTags": [ + { + "content": "Elasticsearch, Machine Learning", + "name": "product_name" + } + ] }, "delete": { "tags": [ @@ -10351,7 +11387,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch, machine-learning" + "x-metaTags": [ + { + "content": "Elasticsearch, Machine Learning", + "name": "product_name" + } + ] } }, "/_inference": { @@ -10367,7 +11408,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch, machine-learning" + "x-metaTags": [ + { + "content": "Elasticsearch, Machine Learning", + "name": "product_name" + } + ] } }, "/_inference/{task_type}/{alibabacloud_inference_id}": { @@ -10400,6 +11446,16 @@ "$ref": "#/components/schemas/_types.Id" }, "style": "simple" + }, + { + "in": "query", + "name": "timeout", + "description": "Specifies the amount of time to wait for the inference endpoint to be created.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Duration" + }, + "style": "form" } ], "requestBody": { @@ -10464,7 +11520,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch, machine-learning" + "x-metaTags": [ + { + "content": "Elasticsearch, Machine Learning", + "name": "product_name" + } + ] } }, "/_inference/{task_type}/{amazonbedrock_inference_id}": { @@ -10497,6 +11558,16 @@ "$ref": "#/components/schemas/_types.Id" }, "style": "simple" + }, + { + "in": "query", + "name": "timeout", + "description": "Specifies the amount of time to wait for the inference endpoint to be created.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Duration" + }, + "style": "form" } ], "requestBody": { @@ -10551,7 +11622,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch, machine-learning" + "x-metaTags": [ + { + "content": "Elasticsearch, Machine Learning", + "name": "product_name" + } + ] } }, "/_inference/{task_type}/{anthropic_inference_id}": { @@ -10584,6 +11660,16 @@ "$ref": "#/components/schemas/_types.Id" }, "style": "simple" + }, + { + "in": "query", + "name": "timeout", + "description": "Specifies the amount of time to wait for the inference endpoint to be created.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Duration" + }, + "style": "form" } ], "requestBody": { @@ -10632,7 +11718,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch, machine-learning" + "x-metaTags": [ + { + "content": "Elasticsearch, Machine Learning", + "name": "product_name" + } + ] } }, "/_inference/{task_type}/{azureaistudio_inference_id}": { @@ -10665,6 +11756,16 @@ "$ref": "#/components/schemas/_types.Id" }, "style": "simple" + }, + { + "in": "query", + "name": "timeout", + "description": "Specifies the amount of time to wait for the inference endpoint to be created.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Duration" + }, + "style": "form" } ], "requestBody": { @@ -10719,7 +11820,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch, machine-learning" + "x-metaTags": [ + { + "content": "Elasticsearch, Machine Learning", + "name": "product_name" + } + ] } }, "/_inference/{task_type}/{azureopenai_inference_id}": { @@ -10752,6 +11858,16 @@ "$ref": "#/components/schemas/_types.Id" }, "style": "simple" + }, + { + "in": "query", + "name": "timeout", + "description": "Specifies the amount of time to wait for the inference endpoint to be created.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Duration" + }, + "style": "form" } ], "requestBody": { @@ -10806,7 +11922,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch, machine-learning" + "x-metaTags": [ + { + "content": "Elasticsearch, Machine Learning", + "name": "product_name" + } + ] } }, "/_inference/{task_type}/{cohere_inference_id}": { @@ -10839,6 +11960,16 @@ "$ref": "#/components/schemas/_types.Id" }, "style": "simple" + }, + { + "in": "query", + "name": "timeout", + "description": "Specifies the amount of time to wait for the inference endpoint to be created.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Duration" + }, + "style": "form" } ], "requestBody": { @@ -10875,6 +12006,11 @@ "summary": "A rerank task", "description": "Run `PUT _inference/rerank/cohere-rerank` to create an inference endpoint that performs a rerank task.", "value": "{\n \"service\": \"cohere\",\n \"service_settings\": {\n \"api_key\": \"Cohere-API-key\",\n \"model_id\": \"rerank-english-v3.0\"\n },\n \"task_settings\": {\n \"top_n\": 10,\n \"return_documents\": true\n }\n}" + }, + "PutCohereRequestExample3": { + "summary": "A completion task", + "description": "Run `PUT _inference/completion/cohere-completion` to create an inference endpoint that performs a completion task.", + "value": "{\n \"service\": \"cohere\",\n \"service_settings\": {\n \"api_key\": \"Cohere-API-key\",\n \"model_id\": \"command-a-03-2025\"\n }\n}" } } } @@ -10893,7 +12029,179 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch, machine-learning" + "x-metaTags": [ + { + "content": "Elasticsearch, Machine Learning", + "name": "product_name" + } + ] + } + }, + "/_inference/{task_type}/{custom_inference_id}": { + "put": { + "tags": [ + "inference" + ], + "summary": "Create a custom inference endpoint", + "description": "The custom service gives more control over how to interact with external inference services that aren't explicitly supported through dedicated integrations.\nThe custom service gives you the ability to define the headers, url, query parameters, request body, and secrets.\nThe custom service supports the template replacement functionality, which enables you to define a template that can be replaced with the value associated with that key.\nTemplates are portions of a string that start with `${` and end with `}`.\nThe parameters `secret_parameters` and `task_settings` are checked for keys for template replacement. Template replacement is supported in the `request`, `headers`, `url`, and `query_parameters`.\nIf the definition (key) is not found for a template, an error message is returned.\nIn case of an endpoint definition like the following:\n```\nPUT _inference/text_embedding/test-text-embedding\n{\n \"service\": \"custom\",\n \"service_settings\": {\n \"secret_parameters\": {\n \"api_key\": \"\"\n },\n \"url\": \"...endpoints.huggingface.cloud/v1/embeddings\",\n \"headers\": {\n \"Authorization\": \"Bearer ${api_key}\",\n \"Content-Type\": \"application/json\"\n },\n \"request\": \"{\\\"input\\\": ${input}}\",\n \"response\": {\n \"json_parser\": {\n \"text_embeddings\":\"$.data[*].embedding[*]\"\n }\n }\n }\n}\n```\nTo replace `${api_key}` the `secret_parameters` and `task_settings` are checked for a key named `api_key`.\n\n> info\n> Templates should not be surrounded by quotes.\n\nPre-defined templates:\n* `${input}` refers to the array of input strings that comes from the `input` field of the subsequent inference requests.\n* `${input_type}` refers to the input type translation values.\n* `${query}` refers to the query field used specifically for reranking tasks.\n* `${top_n}` refers to the `top_n` field available when performing rerank requests.\n* `${return_documents}` refers to the `return_documents` field available when performing rerank requests.\n\n## Required authorization\n\n* Cluster privileges: `manage_inference`\n", + "operationId": "inference-put-custom", + "parameters": [ + { + "in": "path", + "name": "task_type", + "description": "The type of the inference task that the model will perform.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/inference._types.CustomTaskType" + }, + "style": "simple" + }, + { + "in": "path", + "name": "custom_inference_id", + "description": "The unique identifier of the inference endpoint.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Id" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "chunking_settings": { + "$ref": "#/components/schemas/inference._types.InferenceChunkingSettings" + }, + "service": { + "$ref": "#/components/schemas/inference._types.CustomServiceType" + }, + "service_settings": { + "$ref": "#/components/schemas/inference._types.CustomServiceSettings" + }, + "task_settings": { + "$ref": "#/components/schemas/inference._types.CustomTaskSettings" + } + }, + "required": [ + "service", + "service_settings" + ] + } + } + } + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/inference._types.InferenceEndpointInfoCustom" + } + } + } + } + }, + "x-state": "Generally available", + "x-metaTags": [ + { + "content": "Elasticsearch, Machine Learning", + "name": "product_name" + } + ] + } + }, + "/_inference/{task_type}/{deepseek_inference_id}": { + "put": { + "tags": [ + "inference" + ], + "summary": "Create a DeepSeek inference endpoint", + "description": "Create an inference endpoint to perform an inference task with the `deepseek` service.\n\n## Required authorization\n\n* Cluster privileges: `manage_inference`\n", + "operationId": "inference-put-deepseek", + "parameters": [ + { + "in": "path", + "name": "task_type", + "description": "The type of the inference task that the model will perform.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/inference._types.TaskTypeDeepSeek" + }, + "style": "simple" + }, + { + "in": "path", + "name": "deepseek_inference_id", + "description": "The unique identifier of the inference endpoint.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Id" + }, + "style": "simple" + }, + { + "in": "query", + "name": "timeout", + "description": "Specifies the amount of time to wait for the inference endpoint to be created.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Duration" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "chunking_settings": { + "$ref": "#/components/schemas/inference._types.InferenceChunkingSettings" + }, + "service": { + "$ref": "#/components/schemas/inference._types.DeepSeekServiceType" + }, + "service_settings": { + "$ref": "#/components/schemas/inference._types.DeepSeekServiceSettings" + } + }, + "required": [ + "service", + "service_settings" + ] + } + } + } + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/inference._types.InferenceEndpointInfoDeepSeek" + } + } + } + } + }, + "x-state": "Generally available", + "x-metaTags": [ + { + "content": "Elasticsearch, Machine Learning", + "name": "product_name" + } + ] } }, "/_inference/{task_type}/{elasticsearch_inference_id}": { @@ -10926,6 +12234,16 @@ "$ref": "#/components/schemas/_types.Id" }, "style": "simple" + }, + { + "in": "query", + "name": "timeout", + "description": "Specifies the amount of time to wait for the inference endpoint to be created.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Duration" + }, + "style": "form" } ], "requestBody": { @@ -11006,7 +12324,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch, machine-learning" + "x-metaTags": [ + { + "content": "Elasticsearch, Machine Learning", + "name": "product_name" + } + ] } }, "/_inference/{task_type}/{elser_inference_id}": { @@ -11039,6 +12362,16 @@ "$ref": "#/components/schemas/_types.Id" }, "style": "simple" + }, + { + "in": "query", + "name": "timeout", + "description": "Specifies the amount of time to wait for the inference endpoint to be created.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Duration" + }, + "style": "form" } ], "requestBody": { @@ -11097,7 +12430,12 @@ }, "deprecated": true, "x-state": "Generally available", - "x-product-feature": "elasticsearch, machine-learning" + "x-metaTags": [ + { + "content": "Elasticsearch, Machine Learning", + "name": "product_name" + } + ] } }, "/_inference/{task_type}/{googleaistudio_inference_id}": { @@ -11130,6 +12468,16 @@ "$ref": "#/components/schemas/_types.Id" }, "style": "simple" + }, + { + "in": "query", + "name": "timeout", + "description": "Specifies the amount of time to wait for the inference endpoint to be created.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Duration" + }, + "style": "form" } ], "requestBody": { @@ -11176,7 +12524,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch, machine-learning" + "x-metaTags": [ + { + "content": "Elasticsearch, Machine Learning", + "name": "product_name" + } + ] } }, "/_inference/{task_type}/{googlevertexai_inference_id}": { @@ -11209,6 +12562,16 @@ "$ref": "#/components/schemas/_types.Id" }, "style": "simple" + }, + { + "in": "query", + "name": "timeout", + "description": "Specifies the amount of time to wait for the inference endpoint to be created.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Duration" + }, + "style": "form" } ], "requestBody": { @@ -11263,7 +12626,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch, machine-learning" + "x-metaTags": [ + { + "content": "Elasticsearch, Machine Learning", + "name": "product_name" + } + ] } }, "/_inference/{task_type}/{huggingface_inference_id}": { @@ -11296,6 +12664,16 @@ "$ref": "#/components/schemas/_types.Id" }, "style": "simple" + }, + { + "in": "query", + "name": "timeout", + "description": "Specifies the amount of time to wait for the inference endpoint to be created.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Duration" + }, + "style": "form" } ], "requestBody": { @@ -11350,7 +12728,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch, machine-learning" + "x-metaTags": [ + { + "content": "Elasticsearch, Machine Learning", + "name": "product_name" + } + ] } }, "/_inference/{task_type}/{jinaai_inference_id}": { @@ -11383,6 +12766,16 @@ "$ref": "#/components/schemas/_types.Id" }, "style": "simple" + }, + { + "in": "query", + "name": "timeout", + "description": "Specifies the amount of time to wait for the inference endpoint to be created.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Duration" + }, + "style": "form" } ], "requestBody": { @@ -11437,7 +12830,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch, machine-learning" + "x-metaTags": [ + { + "content": "Elasticsearch, Machine Learning", + "name": "product_name" + } + ] } }, "/_inference/{task_type}/{mistral_inference_id}": { @@ -11470,6 +12868,16 @@ "$ref": "#/components/schemas/_types.Id" }, "style": "simple" + }, + { + "in": "query", + "name": "timeout", + "description": "Specifies the amount of time to wait for the inference endpoint to be created.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Duration" + }, + "style": "form" } ], "requestBody": { @@ -11515,7 +12923,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch, machine-learning" + "x-metaTags": [ + { + "content": "Elasticsearch, Machine Learning", + "name": "product_name" + } + ] } }, "/_inference/{task_type}/{openai_inference_id}": { @@ -11548,6 +12961,16 @@ "$ref": "#/components/schemas/_types.Id" }, "style": "simple" + }, + { + "in": "query", + "name": "timeout", + "description": "Specifies the amount of time to wait for the inference endpoint to be created.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Duration" + }, + "style": "form" } ], "requestBody": { @@ -11602,7 +13025,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch, machine-learning" + "x-metaTags": [ + { + "content": "Elasticsearch, Machine Learning", + "name": "product_name" + } + ] } }, "/_inference/{task_type}/{voyageai_inference_id}": { @@ -11635,6 +13063,16 @@ "$ref": "#/components/schemas/_types.Id" }, "style": "simple" + }, + { + "in": "query", + "name": "timeout", + "description": "Specifies the amount of time to wait for the inference endpoint to be created.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Duration" + }, + "style": "form" } ], "requestBody": { @@ -11689,7 +13127,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch, machine-learning" + "x-metaTags": [ + { + "content": "Elasticsearch, Machine Learning", + "name": "product_name" + } + ] } }, "/_inference/{task_type}/{watsonx_inference_id}": { @@ -11722,6 +13165,16 @@ "$ref": "#/components/schemas/_types.Id" }, "style": "simple" + }, + { + "in": "query", + "name": "timeout", + "description": "Specifies the amount of time to wait for the inference endpoint to be created.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Duration" + }, + "style": "form" } ], "requestBody": { @@ -11764,7 +13217,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch, machine-learning" + "x-metaTags": [ + { + "content": "Elasticsearch, Machine Learning", + "name": "product_name" + } + ] } }, "/_inference/rerank/{inference_id}": { @@ -11772,7 +13230,7 @@ "tags": [ "inference" ], - "summary": "Perform rereanking inference on the service", + "summary": "Perform reranking inference on the service", "description": "\n\n## Required authorization\n\n* Cluster privileges: `monitor_inference`\n", "operationId": "inference-rerank", "parameters": [ @@ -11881,7 +13339,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch, machine-learning" + "x-metaTags": [ + { + "content": "Elasticsearch, Machine Learning", + "name": "product_name" + } + ] } }, "/_inference/sparse_embedding/{inference_id}": { @@ -11972,7 +13435,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch, machine-learning" + "x-metaTags": [ + { + "content": "Elasticsearch, Machine Learning", + "name": "product_name" + } + ] } }, "/_inference/text_embedding/{inference_id}": { @@ -12063,7 +13531,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch, machine-learning" + "x-metaTags": [ + { + "content": "Elasticsearch, Machine Learning", + "name": "product_name" + } + ] } }, "/": { @@ -12072,7 +13545,7 @@ "info" ], "summary": "Get cluster info", - "description": "Get basic build, version, and cluster information.\n\n## Required authorization\n\n* Cluster privileges: `monitor`\n", + "description": "Get basic build, version, and cluster information.\n::: In Serverless, this API is retained for backward compatibility only. Some response fields, such as the version number, should be ignored.\n\n## Required authorization\n\n* Cluster privileges: `monitor`\n", "operationId": "info", "responses": { "200": { @@ -12108,8 +13581,14 @@ }, "examples": { "RootNodeInfoResponseExample1": { - "description": "A successful response from `GET /`s.", - "value": "{\n \"name\": \"instance-0000000000\",\n \"cluster_name\": \"my_test_cluster\",\n \"cluster_uuid\": \"5QaxoN0pRZuOmWSxstBBwQ\",\n \"version\": {\n \"build_date\": \"2024-02-01T13:07:13.727175297Z\",\n \"minimum_wire_compatibility_version\": \"7.17.0\",\n \"build_hash\": \"6185ba65d27469afabc9bc951cded6c17c21e3f3\",\n \"number\": \"8.12.1\",\n \"lucene_version\": \"9.9.2\",\n \"minimum_index_compatibility_version\": \"7.0.0\",\n \"build_flavor\": \"default\",\n \"build_snapshot\": false,\n \"build_type\": \"docker\"\n },\n \"tagline\": \"You Know, for Search\"\n}" + "summary": "Stack response", + "description": "A successful response from `GET /`.", + "value": "{\n \"name\": \"instance-0000000000\",\n \"cluster_name\": \"my_test_cluster\",\n \"cluster_uuid\": \"zk-HjQtYQGyL3NFSSu7InA\",\n \"version\": {\n \"number\": \"9.1.0\",\n \"build_flavor\": \"default\",\n \"build_type\": \"docker\",\n \"build_hash\": 0,\n \"build_date\": \"2025-07-09T22:10:13.578Z\",\n \"build_snapshot\": false,\n \"lucene_version\": \"10.2.2\",\n \"minimum_wire_compatibility_version\": \"8.19.0\",\n \"minimum_index_compatibility_version\": \"8.0.0\"\n },\n \"tagline\": \"You Know, for Search\"\n}" + }, + "RootNodeInfoResponseExample2": { + "summary": "Serverless response", + "description": "A successful response from `GET /` on Serverless. This API is retained for backward compatibility only. Some fields, such as the version number, return static values and should be ignored.", + "value": "{\n \"name\": \"serverless\",\n \"cluster_name\": \"my_test_serverless_cluster\",\n \"cluster_uuid\": \"8xx0pi24Squnf4PFDOAtwg\",\n \"version\": {\n \"number\": \"8.11.0\",\n \"build_flavor\": \"serverless\",\n \"build_type\": \"docker\",\n \"build_hash\": 0,\n \"build_date\": \"2023-10-31T00:00:00.000Z\",\n \"build_snapshot\": false,\n \"lucene_version\": \"9.7.0\",\n \"minimum_wire_compatibility_version\": \"8.11.0\",\n \"minimum_index_compatibility_version\": \"8.11.0\"\n },\n \"tagline\": \"You Know, for Search\"\n}" } } } @@ -12117,7 +13596,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] }, "head": { "tags": [ @@ -12135,7 +13619,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_ingest/pipeline/{id}": { @@ -12167,7 +13656,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] }, "put": { "tags": [ @@ -12254,6 +13748,7 @@ }, "deprecated": { "description": "Marks this ingest pipeline as deprecated.\nWhen a deprecated ingest pipeline is referenced as the default or final pipeline when creating or updating a non-deprecated index template, Elasticsearch will emit a deprecation warning.", + "default": false, "type": "boolean" } } @@ -12286,7 +13781,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] }, "delete": { "tags": [ @@ -12345,7 +13845,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_ingest/pipeline": { @@ -12374,7 +13879,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_ingest/processor/grok": { @@ -12412,7 +13922,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_ingest/pipeline/_simulate": { @@ -12437,7 +13952,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] }, "post": { "tags": [ @@ -12460,7 +13980,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_ingest/pipeline/{id}/_simulate": { @@ -12488,7 +14013,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] }, "post": { "tags": [ @@ -12514,7 +14044,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_license": { @@ -12574,7 +14109,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_logstash/pipeline/{id}": { @@ -12600,7 +14140,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch, logstash" + "x-metaTags": [ + { + "content": "Elasticsearch, Logstash", + "name": "product_name" + } + ] }, "put": { "tags": [ @@ -12652,7 +14197,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch, logstash" + "x-metaTags": [ + { + "content": "Elasticsearch, Logstash", + "name": "product_name" + } + ] }, "delete": { "tags": [ @@ -12687,7 +14237,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch, logstash" + "x-metaTags": [ + { + "content": "Elasticsearch, Logstash", + "name": "product_name" + } + ] } }, "/_logstash/pipeline": { @@ -12708,7 +14263,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch, logstash" + "x-metaTags": [ + { + "content": "Elasticsearch, Logstash", + "name": "product_name" + } + ] } }, "/_mget": { @@ -12754,7 +14314,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] }, "post": { "tags": [ @@ -12798,7 +14363,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/{index}/_mget": { @@ -12847,7 +14417,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] }, "post": { "tags": [ @@ -12894,7 +14469,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_ml/anomaly_detectors/{job_id}/_close": { @@ -12956,10 +14536,12 @@ "properties": { "allow_no_match": { "description": "Refer to the description for the `allow_no_match` query parameter.", + "default": true, "type": "boolean" }, "force": { "description": "Refer to the descriptiion for the `force` query parameter.", + "default": false, "type": "boolean" }, "timeout": { @@ -12997,7 +14579,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch, machine-learning" + "x-metaTags": [ + { + "content": "Elasticsearch, Machine Learning", + "name": "product_name" + } + ] } }, "/_ml/calendars/{calendar_id}": { @@ -13028,7 +14615,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch, machine-learning" + "x-metaTags": [ + { + "content": "Elasticsearch, Machine Learning", + "name": "product_name" + } + ] }, "put": { "tags": [ @@ -13101,7 +14693,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch, machine-learning" + "x-metaTags": [ + { + "content": "Elasticsearch, Machine Learning", + "name": "product_name" + } + ] }, "post": { "tags": [ @@ -13130,7 +14727,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch, machine-learning" + "x-metaTags": [ + { + "content": "Elasticsearch, Machine Learning", + "name": "product_name" + } + ] }, "delete": { "tags": [ @@ -13171,7 +14773,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch, machine-learning" + "x-metaTags": [ + { + "content": "Elasticsearch, Machine Learning", + "name": "product_name" + } + ] } }, "/_ml/calendars/{calendar_id}/events/{event_id}": { @@ -13224,7 +14831,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch, machine-learning" + "x-metaTags": [ + { + "content": "Elasticsearch, Machine Learning", + "name": "product_name" + } + ] } }, "/_ml/calendars/{calendar_id}/jobs/{job_id}": { @@ -13288,7 +14900,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch, machine-learning" + "x-metaTags": [ + { + "content": "Elasticsearch, Machine Learning", + "name": "product_name" + } + ] }, "delete": { "tags": [ @@ -13356,7 +14973,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch, machine-learning" + "x-metaTags": [ + { + "content": "Elasticsearch, Machine Learning", + "name": "product_name" + } + ] } }, "/_ml/data_frame/analytics/{id}": { @@ -13390,7 +15012,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch, machine-learning" + "x-metaTags": [ + { + "content": "Elasticsearch, Machine Learning", + "name": "product_name" + } + ] }, "put": { "tags": [ @@ -13420,6 +15047,7 @@ "properties": { "allow_lazy_start": { "description": "Specifies whether this job can start when there is insufficient machine\nlearning node capacity for it to be immediately assigned to a node. If\nset to `false` and a machine learning node with capacity to run the job\ncannot be immediately found, the API returns an error. If set to `true`,\nthe API does not return an error; the job waits in the `starting` state\nuntil sufficient machine learning node capacity is available. This\nbehavior is also affected by the cluster-wide\n`xpack.ml.max_lazy_ml_nodes` setting.", + "default": false, "type": "boolean" }, "analysis": { @@ -13437,6 +15065,7 @@ }, "max_num_threads": { "description": "The maximum number of threads to be used by the analysis. Using more\nthreads may decrease the time necessary to complete the analysis at the\ncost of using more CPU. Note that the process may use additional threads\nfor operational functionality other than the analysis itself.", + "default": 1.0, "type": "number" }, "_meta": { @@ -13444,6 +15073,7 @@ }, "model_memory_limit": { "description": "The approximate maximum amount of memory resources that are permitted for\nanalytical processing. If your `elasticsearch.yml` file contains an\n`xpack.ml.max_model_memory_limit` setting, an error occurs when you try\nto create data frame analytics jobs that have `model_memory_limit` values\ngreater than that setting.", + "default": "1gb", "type": "string" }, "source": { @@ -13537,7 +15167,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch, machine-learning" + "x-metaTags": [ + { + "content": "Elasticsearch, Machine Learning", + "name": "product_name" + } + ] }, "delete": { "tags": [ @@ -13598,7 +15233,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch, machine-learning" + "x-metaTags": [ + { + "content": "Elasticsearch, Machine Learning", + "name": "product_name" + } + ] } }, "/_ml/datafeeds/{datafeed_id}": { @@ -13626,7 +15266,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch, machine-learning" + "x-metaTags": [ + { + "content": "Elasticsearch, Machine Learning", + "name": "product_name" + } + ] }, "put": { "tags": [ @@ -13741,6 +15386,7 @@ }, "scroll_size": { "description": "The size parameter that is used in Elasticsearch searches when the datafeed does not use aggregations.\nThe maximum value is the value of `index.max_result_window`, which is 10,000 by default.", + "default": 1000.0, "type": "number" }, "headers": { @@ -13836,7 +15482,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch, machine-learning" + "x-metaTags": [ + { + "content": "Elasticsearch, Machine Learning", + "name": "product_name" + } + ] }, "delete": { "tags": [ @@ -13887,7 +15538,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch, machine-learning" + "x-metaTags": [ + { + "content": "Elasticsearch, Machine Learning", + "name": "product_name" + } + ] } }, "/_ml/filters/{filter_id}": { @@ -13915,7 +15571,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch, machine-learning" + "x-metaTags": [ + { + "content": "Elasticsearch, Machine Learning", + "name": "product_name" + } + ] }, "put": { "tags": [ @@ -13998,7 +15659,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch, machine-learning" + "x-metaTags": [ + { + "content": "Elasticsearch, Machine Learning", + "name": "product_name" + } + ] }, "delete": { "tags": [ @@ -14039,7 +15705,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch, machine-learning" + "x-metaTags": [ + { + "content": "Elasticsearch, Machine Learning", + "name": "product_name" + } + ] } }, "/_ml/anomaly_detectors/{job_id}": { @@ -14067,7 +15738,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch, machine-learning" + "x-metaTags": [ + { + "content": "Elasticsearch, Machine Learning", + "name": "product_name" + } + ] }, "put": { "tags": [ @@ -14137,6 +15813,7 @@ "properties": { "allow_lazy_open": { "description": "Advanced configuration option. Specifies whether this job can open when there is insufficient machine learning node capacity for it to be immediately assigned to a node. By default, if a machine learning node with capacity to run the job cannot immediately be found, the open anomaly detection jobs API returns an error. However, this is also subject to the cluster-wide `xpack.ml.max_lazy_ml_nodes` setting. If this option is set to true, the open anomaly detection jobs API does not return an error and the job waits in the opening state until sufficient machine learning node capacity is available.", + "default": false, "type": "boolean" }, "analysis_config": { @@ -14153,6 +15830,7 @@ }, "daily_model_snapshot_retention_after_days": { "description": "Advanced configuration option, which affects the automatic removal of old model snapshots for this job. It specifies a period of time (in days) after which only the first snapshot per day is retained. This period is relative to the timestamp of the most recent snapshot for this job. Valid values range from 0 to `model_snapshot_retention_days`.", + "default": 1.0, "type": "number" }, "data_description": { @@ -14180,6 +15858,7 @@ }, "model_snapshot_retention_days": { "description": "Advanced configuration option, which affects the automatic removal of old model snapshots for this job. It specifies the maximum period of time (in days) that snapshots are retained. This period is relative to the timestamp of the most recent snapshot for this job. By default, snapshots ten days older than the newest snapshot are deleted.", + "default": 10.0, "type": "number" }, "renormalization_window_days": { @@ -14306,7 +15985,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch, machine-learning" + "x-metaTags": [ + { + "content": "Elasticsearch, Machine Learning", + "name": "product_name" + } + ] }, "delete": { "tags": [ @@ -14383,7 +16067,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch, machine-learning" + "x-metaTags": [ + { + "content": "Elasticsearch, Machine Learning", + "name": "product_name" + } + ] } }, "/_ml/trained_models/{model_id}": { @@ -14426,7 +16115,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch, machine-learning" + "x-metaTags": [ + { + "content": "Elasticsearch, Machine Learning", + "name": "product_name" + } + ] }, "put": { "tags": [ @@ -14455,6 +16149,7 @@ "schema": { "type": "boolean" }, + "x-state": "Generally available", "style": "form" }, { @@ -14465,6 +16160,7 @@ "schema": { "type": "boolean" }, + "x-state": "Generally available", "style": "form" } ], @@ -14535,7 +16231,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch, machine-learning" + "x-metaTags": [ + { + "content": "Elasticsearch, Machine Learning", + "name": "product_name" + } + ] }, "delete": { "tags": [ @@ -14596,7 +16297,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch, machine-learning" + "x-metaTags": [ + { + "content": "Elasticsearch, Machine Learning", + "name": "product_name" + } + ] } }, "/_ml/trained_models/{model_id}/model_aliases/{model_alias}": { @@ -14654,7 +16360,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch, machine-learning" + "x-metaTags": [ + { + "content": "Elasticsearch, Machine Learning", + "name": "product_name" + } + ] }, "delete": { "tags": [ @@ -14706,7 +16417,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch, machine-learning" + "x-metaTags": [ + { + "content": "Elasticsearch, Machine Learning", + "name": "product_name" + } + ] } }, "/_ml/anomaly_detectors/_estimate_model_memory": { @@ -14779,7 +16495,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch, machine-learning" + "x-metaTags": [ + { + "content": "Elasticsearch, Machine Learning", + "name": "product_name" + } + ] } }, "/_ml/data_frame/_evaluate": { @@ -14883,7 +16604,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch, machine-learning" + "x-metaTags": [ + { + "content": "Elasticsearch, Machine Learning", + "name": "product_name" + } + ] } }, "/_ml/anomaly_detectors/{job_id}/_flush": { @@ -15016,7 +16742,12 @@ }, "deprecated": true, "x-state": "Generally available", - "x-product-feature": "elasticsearch, machine-learning" + "x-metaTags": [ + { + "content": "Elasticsearch, Machine Learning", + "name": "product_name" + } + ] } }, "/_ml/calendars/{calendar_id}/events": { @@ -15118,7 +16849,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch, machine-learning" + "x-metaTags": [ + { + "content": "Elasticsearch, Machine Learning", + "name": "product_name" + } + ] }, "post": { "tags": [ @@ -15192,7 +16928,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch, machine-learning" + "x-metaTags": [ + { + "content": "Elasticsearch, Machine Learning", + "name": "product_name" + } + ] } }, "/_ml/calendars": { @@ -15220,7 +16961,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch, machine-learning" + "x-metaTags": [ + { + "content": "Elasticsearch, Machine Learning", + "name": "product_name" + } + ] }, "post": { "tags": [ @@ -15246,7 +16992,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch, machine-learning" + "x-metaTags": [ + { + "content": "Elasticsearch, Machine Learning", + "name": "product_name" + } + ] } }, "/_ml/data_frame/analytics": { @@ -15277,7 +17028,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch, machine-learning" + "x-metaTags": [ + { + "content": "Elasticsearch, Machine Learning", + "name": "product_name" + } + ] } }, "/_ml/data_frame/analytics/_stats": { @@ -15308,7 +17064,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch, machine-learning" + "x-metaTags": [ + { + "content": "Elasticsearch, Machine Learning", + "name": "product_name" + } + ] } }, "/_ml/data_frame/analytics/{id}/_stats": { @@ -15342,7 +17103,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch, machine-learning" + "x-metaTags": [ + { + "content": "Elasticsearch, Machine Learning", + "name": "product_name" + } + ] } }, "/_ml/datafeeds/{datafeed_id}/_stats": { @@ -15367,7 +17133,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch, machine-learning" + "x-metaTags": [ + { + "content": "Elasticsearch, Machine Learning", + "name": "product_name" + } + ] } }, "/_ml/datafeeds/_stats": { @@ -15389,7 +17160,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch, machine-learning" + "x-metaTags": [ + { + "content": "Elasticsearch, Machine Learning", + "name": "product_name" + } + ] } }, "/_ml/datafeeds": { @@ -15414,7 +17190,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch, machine-learning" + "x-metaTags": [ + { + "content": "Elasticsearch, Machine Learning", + "name": "product_name" + } + ] } }, "/_ml/filters": { @@ -15439,7 +17220,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch, machine-learning" + "x-metaTags": [ + { + "content": "Elasticsearch, Machine Learning", + "name": "product_name" + } + ] } }, "/_ml/anomaly_detectors/_stats": { @@ -15461,7 +17247,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch, machine-learning" + "x-metaTags": [ + { + "content": "Elasticsearch, Machine Learning", + "name": "product_name" + } + ] } }, "/_ml/anomaly_detectors/{job_id}/_stats": { @@ -15486,7 +17277,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch, machine-learning" + "x-metaTags": [ + { + "content": "Elasticsearch, Machine Learning", + "name": "product_name" + } + ] } }, "/_ml/anomaly_detectors": { @@ -15511,7 +17307,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch, machine-learning" + "x-metaTags": [ + { + "content": "Elasticsearch, Machine Learning", + "name": "product_name" + } + ] } }, "/_ml/anomaly_detectors/{job_id}/results/overall_buckets": { @@ -15557,7 +17358,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch, machine-learning" + "x-metaTags": [ + { + "content": "Elasticsearch, Machine Learning", + "name": "product_name" + } + ] }, "post": { "tags": [ @@ -15601,7 +17407,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch, machine-learning" + "x-metaTags": [ + { + "content": "Elasticsearch, Machine Learning", + "name": "product_name" + } + ] } }, "/_ml/trained_models": { @@ -15641,7 +17452,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch, machine-learning" + "x-metaTags": [ + { + "content": "Elasticsearch, Machine Learning", + "name": "product_name" + } + ] } }, "/_ml/trained_models/{model_id}/_stats": { @@ -15672,7 +17488,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch, machine-learning" + "x-metaTags": [ + { + "content": "Elasticsearch, Machine Learning", + "name": "product_name" + } + ] } }, "/_ml/trained_models/_stats": { @@ -15700,7 +17521,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch, machine-learning" + "x-metaTags": [ + { + "content": "Elasticsearch, Machine Learning", + "name": "product_name" + } + ] } }, "/_ml/trained_models/{model_id}/_infer": { @@ -15791,7 +17617,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch, machine-learning" + "x-metaTags": [ + { + "content": "Elasticsearch, Machine Learning", + "name": "product_name" + } + ] } }, "/_ml/anomaly_detectors/{job_id}/_open": { @@ -15876,7 +17707,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch, machine-learning" + "x-metaTags": [ + { + "content": "Elasticsearch, Machine Learning", + "name": "product_name" + } + ] } }, "/_ml/data_frame/analytics/_preview": { @@ -15896,7 +17732,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch, machine-learning" + "x-metaTags": [ + { + "content": "Elasticsearch, Machine Learning", + "name": "product_name" + } + ] }, "post": { "tags": [ @@ -15914,7 +17755,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch, machine-learning" + "x-metaTags": [ + { + "content": "Elasticsearch, Machine Learning", + "name": "product_name" + } + ] } }, "/_ml/data_frame/analytics/{id}/_preview": { @@ -15939,7 +17785,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch, machine-learning" + "x-metaTags": [ + { + "content": "Elasticsearch, Machine Learning", + "name": "product_name" + } + ] }, "post": { "tags": [ @@ -15962,7 +17813,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch, machine-learning" + "x-metaTags": [ + { + "content": "Elasticsearch, Machine Learning", + "name": "product_name" + } + ] } }, "/_ml/datafeeds/{datafeed_id}/_preview": { @@ -15993,7 +17849,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch, machine-learning" + "x-metaTags": [ + { + "content": "Elasticsearch, Machine Learning", + "name": "product_name" + } + ] }, "post": { "tags": [ @@ -16022,7 +17883,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch, machine-learning" + "x-metaTags": [ + { + "content": "Elasticsearch, Machine Learning", + "name": "product_name" + } + ] } }, "/_ml/datafeeds/_preview": { @@ -16050,7 +17916,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch, machine-learning" + "x-metaTags": [ + { + "content": "Elasticsearch, Machine Learning", + "name": "product_name" + } + ] }, "post": { "tags": [ @@ -16076,7 +17947,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch, machine-learning" + "x-metaTags": [ + { + "content": "Elasticsearch, Machine Learning", + "name": "product_name" + } + ] } }, "/_ml/trained_models/{model_id}/definition/{part}": { @@ -16159,7 +18035,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch, machine-learning" + "x-metaTags": [ + { + "content": "Elasticsearch, Machine Learning", + "name": "product_name" + } + ] } }, "/_ml/trained_models/{model_id}/vocabulary": { @@ -16240,7 +18121,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch, machine-learning" + "x-metaTags": [ + { + "content": "Elasticsearch, Machine Learning", + "name": "product_name" + } + ] } }, "/_ml/anomaly_detectors/{job_id}/_reset": { @@ -16297,7 +18183,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch, machine-learning" + "x-metaTags": [ + { + "content": "Elasticsearch, Machine Learning", + "name": "product_name" + } + ] } }, "/_ml/data_frame/analytics/{id}/_start": { @@ -16356,7 +18247,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch, machine-learning" + "x-metaTags": [ + { + "content": "Elasticsearch, Machine Learning", + "name": "product_name" + } + ] } }, "/_ml/datafeeds/{datafeed_id}/_start": { @@ -16462,7 +18358,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch, machine-learning" + "x-metaTags": [ + { + "content": "Elasticsearch, Machine Learning", + "name": "product_name" + } + ] } }, "/_ml/trained_models/{model_id}/deployment/_start": { @@ -16591,7 +18492,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch, machine-learning" + "x-metaTags": [ + { + "content": "Elasticsearch, Machine Learning", + "name": "product_name" + } + ] } }, "/_ml/data_frame/analytics/{id}/_stop": { @@ -16666,7 +18572,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch, machine-learning" + "x-metaTags": [ + { + "content": "Elasticsearch, Machine Learning", + "name": "product_name" + } + ] } }, "/_ml/datafeeds/{datafeed_id}/_stop": { @@ -16728,10 +18639,12 @@ "properties": { "allow_no_match": { "description": "Refer to the description for the `allow_no_match` query parameter.", + "default": true, "type": "boolean" }, "force": { "description": "Refer to the description for the `force` query parameter.", + "default": false, "type": "boolean" }, "timeout": { @@ -16769,7 +18682,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch, machine-learning" + "x-metaTags": [ + { + "content": "Elasticsearch, Machine Learning", + "name": "product_name" + } + ] } }, "/_ml/trained_models/{model_id}/deployment/_stop": { @@ -16834,7 +18752,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch, machine-learning" + "x-metaTags": [ + { + "content": "Elasticsearch, Machine Learning", + "name": "product_name" + } + ] } }, "/_ml/data_frame/analytics/{id}/_update": { @@ -16870,14 +18793,17 @@ }, "model_memory_limit": { "description": "The approximate maximum amount of memory resources that are permitted for\nanalytical processing. If your `elasticsearch.yml` file contains an\n`xpack.ml.max_model_memory_limit` setting, an error occurs when you try\nto create data frame analytics jobs that have `model_memory_limit` values\ngreater than that setting.", + "default": "1gb", "type": "string" }, "max_num_threads": { "description": "The maximum number of threads to be used by the analysis. Using more\nthreads may decrease the time necessary to complete the analysis at the\ncost of using more CPU. Note that the process may use additional threads\nfor operational functionality other than the analysis itself.", + "default": 1.0, "type": "number" }, "allow_lazy_start": { "description": "Specifies whether this job can start when there is insufficient machine\nlearning node capacity for it to be immediately assigned to a node.", + "default": false, "type": "boolean" } } @@ -16954,7 +18880,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch, machine-learning" + "x-metaTags": [ + { + "content": "Elasticsearch, Machine Learning", + "name": "product_name" + } + ] } }, "/_ml/datafeeds/{datafeed_id}/_update": { @@ -17075,6 +19006,7 @@ }, "scroll_size": { "description": "The size parameter that is used in Elasticsearch searches when the datafeed does not use aggregations.\nThe maximum value is the value of `index.max_result_window`.", + "default": 1000.0, "type": "number" } } @@ -17167,7 +19099,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch, machine-learning" + "x-metaTags": [ + { + "content": "Elasticsearch, Machine Learning", + "name": "product_name" + } + ] } }, "/_ml/filters/{filter_id}/_update": { @@ -17259,7 +19196,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch, machine-learning" + "x-metaTags": [ + { + "content": "Elasticsearch, Machine Learning", + "name": "product_name" + } + ] } }, "/_ml/anomaly_detectors/{job_id}/_update": { @@ -17291,6 +19233,7 @@ "properties": { "allow_lazy_open": { "description": "Advanced configuration option. Specifies whether this job can open when\nthere is insufficient machine learning node capacity for it to be\nimmediately assigned to a node. If `false` and a machine learning node\nwith capacity to run the job cannot immediately be found, the open\nanomaly detection jobs API returns an error. However, this is also\nsubject to the cluster-wide `xpack.ml.max_lazy_ml_nodes` setting. If this\noption is set to `true`, the open anomaly detection jobs API does not\nreturn an error and the job waits in the opening state until sufficient\nmachine learning node capacity is available.", + "default": false, "type": "boolean" }, "analysis_limits": { @@ -17324,10 +19267,12 @@ }, "daily_model_snapshot_retention_after_days": { "description": "Advanced configuration option, which affects the automatic removal of old\nmodel snapshots for this job. It specifies a period of time (in days)\nafter which only the first snapshot per day is retained. This period is\nrelative to the timestamp of the most recent snapshot for this job. Valid\nvalues range from 0 to `model_snapshot_retention_days`. For jobs created\nbefore version 7.8.0, the default value matches\n`model_snapshot_retention_days`.", + "default": 1.0, "type": "number" }, "model_snapshot_retention_days": { "description": "Advanced configuration option, which affects the automatic removal of old\nmodel snapshots for this job. It specifies the maximum period of time (in\ndays) that snapshots are retained. This period is relative to the\ntimestamp of the most recent snapshot for this job.", + "default": 10.0, "type": "number" }, "renormalization_window_days": { @@ -17464,7 +19409,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch, machine-learning" + "x-metaTags": [ + { + "content": "Elasticsearch, Machine Learning", + "name": "product_name" + } + ] } }, "/_ml/trained_models/{model_id}/deployment/_update": { @@ -17506,6 +19456,7 @@ "properties": { "number_of_allocations": { "description": "The number of model allocations on each node where the model is deployed.\nAll allocations on a node share the same copy of the model in memory but use\na separate set of threads to evaluate the model.\nIncreasing this value generally increases the throughput.\nIf this setting is greater than the number of hardware threads\nit will automatically be changed to a value less than the number of hardware threads.\nIf adaptive_allocations is enabled, do not set this value, because it’s automatically set.", + "default": 1.0, "type": "number" }, "adaptive_allocations": { @@ -17543,7 +19494,12 @@ } }, "x-state": "Beta", - "x-product-feature": "elasticsearch, machine-learning" + "x-metaTags": [ + { + "content": "Elasticsearch, Machine Learning", + "name": "product_name" + } + ] } }, "/_msearch": { @@ -17573,6 +19529,9 @@ { "$ref": "#/components/parameters/msearch-include_named_queries_score" }, + { + "$ref": "#/components/parameters/msearch-index_" + }, { "$ref": "#/components/parameters/msearch-max_concurrent_searches" }, @@ -17604,7 +19563,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] }, "post": { "tags": [ @@ -17632,6 +19596,9 @@ { "$ref": "#/components/parameters/msearch-include_named_queries_score" }, + { + "$ref": "#/components/parameters/msearch-index_" + }, { "$ref": "#/components/parameters/msearch-max_concurrent_searches" }, @@ -17663,7 +19630,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/{index}/_msearch": { @@ -17696,6 +19668,9 @@ { "$ref": "#/components/parameters/msearch-include_named_queries_score" }, + { + "$ref": "#/components/parameters/msearch-index_" + }, { "$ref": "#/components/parameters/msearch-max_concurrent_searches" }, @@ -17727,7 +19702,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] }, "post": { "tags": [ @@ -17758,6 +19738,9 @@ { "$ref": "#/components/parameters/msearch-include_named_queries_score" }, + { + "$ref": "#/components/parameters/msearch-index_" + }, { "$ref": "#/components/parameters/msearch-max_concurrent_searches" }, @@ -17789,7 +19772,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_msearch/template": { @@ -17830,7 +19818,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] }, "post": { "tags": [ @@ -17869,7 +19862,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/{index}/_msearch/template": { @@ -17913,7 +19911,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] }, "post": { "tags": [ @@ -17955,7 +19958,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_mtermvectors": { @@ -18013,7 +20021,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] }, "post": { "tags": [ @@ -18069,7 +20082,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/{index}/_mtermvectors": { @@ -18130,7 +20148,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] }, "post": { "tags": [ @@ -18189,7 +20212,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/{index}/_pit": { @@ -18329,7 +20357,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_scripts/{id}/{context}": { @@ -18370,7 +20403,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] }, "post": { "tags": [ @@ -18409,7 +20447,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_query_rules/{ruleset_id}/_rule/{rule_id}": { @@ -18467,7 +20510,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] }, "put": { "tags": [ @@ -18567,7 +20615,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] }, "delete": { "tags": [ @@ -18613,7 +20666,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_query_rules/{ruleset_id}": { @@ -18656,7 +20714,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] }, "put": { "tags": [ @@ -18737,7 +20800,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] }, "delete": { "tags": [ @@ -18772,7 +20840,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_query_rules": { @@ -18839,7 +20912,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_query_rules/{ruleset_id}/_test": { @@ -18925,7 +21003,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_rank_eval": { @@ -18959,7 +21042,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] }, "post": { "tags": [ @@ -18991,7 +21079,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/{index}/_rank_eval": { @@ -19028,7 +21121,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] }, "post": { "tags": [ @@ -19063,7 +21161,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_reindex": { @@ -19119,6 +21222,16 @@ }, "style": "form" }, + { + "in": "query", + "name": "max_docs", + "description": "The maximum number of documents to reindex.\nBy default, all documents are reindexed.\nIf it is a value less then or equal to `scroll_size`, a scroll will not be used to retrieve the results for the operation.\n\nIf `conflicts` is set to `proceed`, the reindex operation could attempt to reindex more documents from the source than `max_docs` until it has successfully indexed `max_docs` documents into the target or it has gone through every document in the source query.", + "deprecated": false, + "schema": { + "type": "number" + }, + "style": "form" + }, { "in": "query", "name": "timeout", @@ -19196,6 +21309,66 @@ "summary": "Reindex multiple sources", "description": "Run `POST _reindex` to reindex from multiple sources. The `index` attribute in source can be a list, which enables you to copy from lots of sources in one request. This example copies documents from the `my-index-000001` and `my-index-000002` indices.\n", "value": "{\n \"source\": {\n \"index\": [\"my-index-000001\", \"my-index-000002\"]\n },\n \"dest\": {\n \"index\": \"my-new-index-000002\"\n }\n}" + }, + "ReindexRequestExample10": { + "summary": "Reindex with Painless", + "description": "You can use Painless to reindex daily indices to apply a new template to the existing documents. The script extracts the date from the index name and creates a new index with `-1` appended. For example, all data from `metricbeat-2016.05.31` will be reindexed into `metricbeat-2016.05.31-1`.\n", + "value": "{\n \"source\": {\n \"index\": \"metricbeat-*\"\n },\n \"dest\": {\n \"index\": \"metricbeat\"\n },\n \"script\": {\n \"lang\": \"painless\",\n \"source\": \"ctx._index = 'metricbeat-' + (ctx._index.substring('metricbeat-'.length(), ctx._index.length())) + '-1'\"\n }\n}" + }, + "ReindexRequestExample11": { + "summary": "Reindex a random subset", + "description": "Run `POST _reindex` to extract a random subset of the source for testing. You might need to adjust the `min_score` value depending on the relative amount of data extracted from source.\n", + "value": "{\n \"max_docs\": 10,\n \"source\": {\n \"index\": \"my-index-000001\",\n \"query\": {\n \"function_score\" : {\n \"random_score\" : {},\n \"min_score\" : 0.9\n }\n }\n },\n \"dest\": {\n \"index\": \"my-new-index-000001\"\n }\n}" + }, + "ReindexRequestExample12": { + "summary": "Reindex modified documents", + "description": "Run `POST _reindex` to modify documents during reindexing. This example bumps the version of the source document.\n", + "value": "{\n \"source\": {\n \"index\": \"my-index-000001\"\n },\n \"dest\": {\n \"index\": \"my-new-index-000001\",\n \"version_type\": \"external\"\n },\n \"script\": {\n \"source\": \"if (ctx._source.foo == 'bar') {ctx._version++; ctx._source.remove('foo')}\",\n \"lang\": \"painless\"\n }\n}" + }, + "ReindexRequestExample13": { + "summary": "Reindex from remote on Elastic Cloud", + "description": "When using Elastic Cloud, you can run `POST _reindex` and authenticate against a remote cluster with an API key.\n", + "value": "{\n \"source\": {\n \"remote\": {\n \"host\": \"http://otherhost:9200\",\n \"username\": \"user\",\n \"password\": \"pass\"\n },\n \"index\": \"my-index-000001\",\n \"query\": {\n \"match\": {\n \"test\": \"data\"\n }\n }\n },\n \"dest\": {\n \"index\": \"my-new-index-000001\"\n }\n}" + }, + "ReindexRequestExample2": { + "summary": "Manual slicing", + "description": "Run `POST _reindex` to slice a reindex request manually. Provide a slice ID and total number of slices to each request.\n", + "value": "{\n \"source\": {\n \"index\": \"my-index-000001\",\n \"slice\": {\n \"id\": 0,\n \"max\": 2\n }\n },\n \"dest\": {\n \"index\": \"my-new-index-000001\"\n }\n}" + }, + "ReindexRequestExample3": { + "summary": "Automatic slicing", + "description": "Run `POST _reindex?slices=5&refresh` to automatically parallelize using sliced scroll to slice on `_id`. The `slices` parameter specifies the number of slices to use.\n", + "value": "{\n \"source\": {\n \"index\": \"my-index-000001\"\n },\n \"dest\": {\n \"index\": \"my-new-index-000001\"\n }\n}" + }, + "ReindexRequestExample4": { + "summary": "Routing", + "description": "By default if reindex sees a document with routing then the routing is preserved unless it's changed by the script. You can set `routing` on the `dest` request to change this behavior. In this example, run `POST _reindex` to copy all documents from the `source` with the company name `cat` into the `dest` with routing set to `cat`.\n", + "value": "{\n \"source\": {\n \"index\": \"source\",\n \"query\": {\n \"match\": {\n \"company\": \"cat\"\n }\n }\n },\n \"dest\": {\n \"index\": \"dest\",\n \"routing\": \"=cat\"\n }\n}" + }, + "ReindexRequestExample5": { + "summary": "Ingest pipelines", + "description": "Run `POST _reindex` and use the ingest pipelines feature.", + "value": "{\n \"source\": {\n \"index\": \"source\"\n },\n \"dest\": {\n \"index\": \"dest\",\n \"pipeline\": \"some_ingest_pipeline\"\n }\n}" + }, + "ReindexRequestExample6": { + "summary": "Reindex with a query", + "description": "Run `POST _reindex` and add a query to the `source` to limit the documents to reindex. For example, this request copies documents into `my-new-index-000001` only if they have a `user.id` of `kimchy`.\n", + "value": "{\n \"source\": {\n \"index\": \"my-index-000001\",\n \"query\": {\n \"term\": {\n \"user.id\": \"kimchy\"\n }\n }\n },\n \"dest\": {\n \"index\": \"my-new-index-000001\"\n }\n}" + }, + "ReindexRequestExample7": { + "summary": "Reindex with max_docs", + "description": "You can limit the number of processed documents by setting `max_docs`. For example, run `POST _reindex` to copy a single document from `my-index-000001` to `my-new-index-000001`.\n", + "value": "{\n \"max_docs\": 1,\n \"source\": {\n \"index\": \"my-index-000001\"\n },\n \"dest\": {\n \"index\": \"my-new-index-000001\"\n }\n}" + }, + "ReindexRequestExample8": { + "summary": "Reindex selected fields", + "description": "You can use source filtering to reindex a subset of the fields in the original documents. For example, run `POST _reindex` the reindex only the `user.id` and `_doc` fields of each document.\n", + "value": "{\n \"source\": {\n \"index\": \"my-index-000001\",\n \"_source\": [\"user.id\", \"_doc\"]\n },\n \"dest\": {\n \"index\": \"my-new-index-000001\"\n }\n}" + }, + "ReindexRequestExample9": { + "summary": "Reindex new field names", + "description": "A reindex operation can build a copy of an index with renamed fields. If your index has documents with `text` and `flag` fields, you can change the latter field name to `tag` during the reindex.\n", + "value": "{\n \"source\": {\n \"index\": \"my-index-000001\"\n },\n \"dest\": {\n \"index\": \"my-new-index-000001\"\n },\n \"script\": {\n \"source\": \"ctx._source.tag = ctx._source.remove(\\\"flag\\\")\"\n }\n}" } } } @@ -19278,7 +21451,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_render/template": { @@ -19298,7 +21476,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] }, "post": { "tags": [ @@ -19316,7 +21499,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_render/template/{id}": { @@ -19341,7 +21529,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] }, "post": { "tags": [ @@ -19364,7 +21557,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_scripts/painless/_execute": { @@ -19384,7 +21582,12 @@ } }, "x-state": "Technical preview", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] }, "post": { "tags": [ @@ -19402,7 +21605,12 @@ } }, "x-state": "Technical preview", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_search": { @@ -19557,7 +21765,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] }, "post": { "tags": [ @@ -19710,7 +21923,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/{index}/_search": { @@ -19868,7 +22086,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] }, "post": { "tags": [ @@ -20024,7 +22247,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_application/search_application/{name}": { @@ -20067,7 +22295,12 @@ } }, "x-state": "Beta", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] }, "put": { "tags": [ @@ -20136,7 +22369,12 @@ } }, "x-state": "Beta", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] }, "delete": { "tags": [ @@ -20171,7 +22409,12 @@ } }, "x-state": "Beta", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_application/analytics/{name}": { @@ -20193,7 +22436,12 @@ }, "deprecated": true, "x-state": "Technical preview", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] }, "put": { "tags": [ @@ -20228,7 +22476,12 @@ }, "deprecated": true, "x-state": "Technical preview", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] }, "delete": { "tags": [ @@ -20264,7 +22517,12 @@ }, "deprecated": true, "x-state": "Technical preview", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_application/analytics": { @@ -20281,7 +22539,12 @@ }, "deprecated": true, "x-state": "Technical preview", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_application/search_application": { @@ -20358,7 +22621,12 @@ } }, "x-state": "Beta", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_application/search_application/{name}/_search": { @@ -20386,7 +22654,12 @@ } }, "x-state": "Beta", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] }, "post": { "tags": [ @@ -20412,7 +22685,12 @@ } }, "x-state": "Beta", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/{index}/_mvt/{field}/{zoom}/{x}/{y}": { @@ -20461,6 +22739,9 @@ { "$ref": "#/components/parameters/search_mvt-size" }, + { + "$ref": "#/components/parameters/search_mvt-track_total_hits" + }, { "$ref": "#/components/parameters/search_mvt-with_labels" } @@ -20474,7 +22755,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] }, "post": { "tags": [ @@ -20521,6 +22807,9 @@ { "$ref": "#/components/parameters/search_mvt-size" }, + { + "$ref": "#/components/parameters/search_mvt-track_total_hits" + }, { "$ref": "#/components/parameters/search_mvt-with_labels" } @@ -20534,7 +22823,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_search/template": { @@ -20599,7 +22893,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] }, "post": { "tags": [ @@ -20662,7 +22961,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/{index}/_search/template": { @@ -20730,7 +23034,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] }, "post": { "tags": [ @@ -20796,7 +23105,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_security/_authenticate": { @@ -20889,7 +23203,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_security/api_key": { @@ -20959,6 +23278,7 @@ "schema": { "type": "boolean" }, + "x-state": "Generally available", "style": "form" }, { @@ -20969,6 +23289,7 @@ "schema": { "type": "boolean" }, + "x-state": "Generally available", "style": "form" }, { @@ -20979,6 +23300,7 @@ "schema": { "type": "boolean" }, + "x-state": "Generally available", "style": "form" } ], @@ -21018,7 +23340,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] }, "put": { "tags": [ @@ -21045,7 +23372,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] }, "post": { "tags": [ @@ -21072,7 +23404,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] }, "delete": { "tags": [ @@ -21102,6 +23439,7 @@ }, "owner": { "description": "Query API keys owned by the currently authenticated user.\nThe `realm_name` or `username` parameters cannot be specified when this parameter is set to `true` as they are assumed to be the currently authenticated ones.\n\nNOTE: At least one of `ids`, `name`, `username`, and `realm_name` must be specified if `owner` is `false`.", + "default": false, "type": "boolean" }, "realm_name": { @@ -21200,7 +23538,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_security/role/{name}": { @@ -21222,7 +23565,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] }, "put": { "tags": [ @@ -21252,7 +23600,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] }, "post": { "tags": [ @@ -21282,7 +23635,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] }, "delete": { "tags": [ @@ -21342,7 +23700,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_security/privilege/_builtin": { @@ -21396,7 +23759,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_security/role": { @@ -21413,7 +23781,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_security/user/_has_privileges": { @@ -21437,7 +23810,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] }, "post": { "tags": [ @@ -21459,7 +23837,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_security/user/{user}/_has_privileges": { @@ -21488,7 +23871,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] }, "post": { "tags": [ @@ -21515,7 +23903,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_security/_query/api_key": { @@ -21550,7 +23943,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] }, "post": { "tags": [ @@ -21583,7 +23981,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_security/_query/role": { @@ -21603,7 +24006,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] }, "post": { "tags": [ @@ -21621,7 +24029,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_security/api_key/{id}": { @@ -21710,7 +24123,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_sql/close": { @@ -21766,7 +24184,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_sql/async/delete/{id}": { @@ -21803,7 +24226,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_sql/async/{id}": { @@ -21917,7 +24345,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_sql/async/status/{id}": { @@ -21984,7 +24417,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_sql": { @@ -22009,7 +24447,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] }, "post": { "tags": [ @@ -22032,7 +24475,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_sql/translate": { @@ -22052,7 +24500,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] }, "post": { "tags": [ @@ -22070,7 +24523,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_synonyms/{id}": { @@ -22150,14 +24608,23 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] }, "put": { "tags": [ "synonyms" ], "summary": "Create or update a synonym set", - "description": "Synonyms sets are limited to a maximum of 10,000 synonym rules per set.\nIf you need to manage more synonym rules, you can create multiple synonym sets.\n\nWhen an existing synonyms set is updated, the search analyzers that use the synonyms set are reloaded automatically for all indices.\nThis is equivalent to invoking the reload search analyzers API for all indices that use the synonyms set.\n\n## Required authorization\n\n* Cluster privileges: `manage_search_synonyms`\n", + "description": "Synonyms sets are limited to a maximum of 10,000 synonym rules per set.\nIf you need to manage more synonym rules, you can create multiple synonym sets.\n\nWhen an existing synonyms set is updated, the search analyzers that use the synonyms set are reloaded automatically for all indices.\nThis is equivalent to invoking the reload search analyzers API for all indices that use the synonyms set.\n\nFor practical examples of how to create or update a synonyms set, refer to the External documentation.\n\n## Required authorization\n\n* Cluster privileges: `manage_search_synonyms`\n", + "externalDocs": { + "url": "https://www.elastic.co/docs/solutions/search/full-text/create-update-synonyms-api-example", + "x-previousVersionUrl": "https://www.elastic.co/guide/en/elasticsearch/reference/8.18/put-synonyms-set.html" + }, "operationId": "synonyms-put-synonym", "parameters": [ { @@ -22225,7 +24692,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] }, "delete": { "tags": [ @@ -22260,7 +24732,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_synonyms/{set_id}/{rule_id}": { @@ -22314,7 +24791,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] }, "put": { "tags": [ @@ -22391,7 +24873,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] }, "delete": { "tags": [ @@ -22443,7 +24930,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_synonyms": { @@ -22512,7 +25004,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_tasks/{task_id}": { @@ -22599,7 +25096,12 @@ } }, "x-state": "Technical preview", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/{index}/_terms_enum": { @@ -22624,7 +25126,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] }, "post": { "tags": [ @@ -22647,7 +25154,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/{index}/_termvectors/{id}": { @@ -22712,7 +25224,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] }, "post": { "tags": [ @@ -22775,7 +25292,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/{index}/_termvectors": { @@ -22837,7 +25359,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] }, "post": { "tags": [ @@ -22897,7 +25424,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_transform/{transform_id}": { @@ -22931,7 +25463,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] }, "put": { "tags": [ @@ -23051,7 +25588,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] }, "delete": { "tags": [ @@ -23122,7 +25664,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_transform": { @@ -23153,7 +25700,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_transform/{transform_id}/_stats": { @@ -23251,7 +25803,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_transform/{transform_id}/_preview": { @@ -23279,7 +25836,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] }, "post": { "tags": [ @@ -23305,7 +25867,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_transform/_preview": { @@ -23330,7 +25897,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] }, "post": { "tags": [ @@ -23353,7 +25925,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_transform/{transform_id}/_reset": { @@ -23416,7 +25993,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_transform/{transform_id}/_schedule_now": { @@ -23469,7 +26051,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_transform/{transform_id}/_start": { @@ -23532,7 +26119,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_transform/{transform_id}/_stop": { @@ -23625,7 +26217,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/_transform/{transform_id}/_update": { @@ -23714,7 +26311,7 @@ "examples": { "UpdateTransformRequestExample1": { "description": "Run `POST _transform/simple-kibana-ecomm-pivot/_update` to update a transform that uses the pivot method.", - "value": "{\n \"source\": {\n \"index\": \"kibana_sample_data_ecommerce\",\n \"query\": {\n \"term\": {\n \"geoip.continent_name\": {\n \"value\": \"Asia\"\n }\n }\n }\n },\n \"pivot\": {\n \"group_by\": {\n \"customer_id\": {\n \"terms\": {\n \"field\": \"customer_id\",\n \"missing_bucket\": true\n }\n }\n },\n \"aggregations\": {\n \"max_price\": {\n \"max\": {\n \"field\": \"taxful_total_price\"\n }\n }\n }\n },\n \"description\": \"Maximum priced ecommerce data by customer_id in Asia\",\n \"dest\": {\n \"index\": \"kibana_sample_data_ecommerce_transform1\",\n \"pipeline\": \"add_timestamp_pipeline\"\n },\n \"frequency\": \"5m\",\n \"sync\": {\n \"time\": {\n \"field\": \"order_date\",\n \"delay\": \"60s\"\n }\n },\n \"retention_policy\": {\n \"time\": {\n \"field\": \"order_date\",\n \"max_age\": \"30d\"\n }\n }\n}" + "value": "{\n \"source\": {\n \"index\": \"kibana_sample_data_ecommerce\",\n \"query\": {\n \"term\": {\n \"geoip.continent_name\": {\n \"value\": \"Asia\"\n }\n }\n }\n },\n \"description\": \"Maximum priced ecommerce data by customer_id in Asia\",\n \"dest\": {\n \"index\": \"kibana_sample_data_ecommerce_transform_v2\",\n \"pipeline\": \"add_timestamp_pipeline\"\n },\n \"frequency\": \"15m\",\n \"sync\": {\n \"time\": {\n \"field\": \"order_date\",\n \"delay\": \"120s\"\n }\n }\n}" } } } @@ -23793,7 +26390,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/{index}/_update/{id}": { @@ -23802,7 +26404,11 @@ "document" ], "summary": "Update a document", - "description": "Update a document by running a script or passing a partial document.\n\nIf the Elasticsearch security features are enabled, you must have the `index` or `write` index privilege for the target index or index alias.\n\nThe script can update, delete, or skip modifying the document.\nThe API also supports passing a partial document, which is merged into the existing document.\nTo fully replace an existing document, use the index API.\nThis operation:\n\n* Gets the document (collocated with the shard) from the index.\n* Runs the specified script.\n* Indexes the result.\n\nThe document must still be reindexed, but using this API removes some network roundtrips and reduces chances of version conflicts between the GET and the index operation.\n\nThe `_source` field must be enabled to use this API.\nIn addition to `_source`, you can access the following variables through the `ctx` map: `_index`, `_type`, `_id`, `_version`, `_routing`, and `_now` (the current timestamp).\n\n## Required authorization\n\n* Index privileges: `write`\n", + "description": "Update a document by running a script or passing a partial document.\n\nIf the Elasticsearch security features are enabled, you must have the `index` or `write` index privilege for the target index or index alias.\n\nThe script can update, delete, or skip modifying the document.\nThe API also supports passing a partial document, which is merged into the existing document.\nTo fully replace an existing document, use the index API.\nThis operation:\n\n* Gets the document (collocated with the shard) from the index.\n* Runs the specified script.\n* Indexes the result.\n\nThe document must still be reindexed, but using this API removes some network roundtrips and reduces chances of version conflicts between the GET and the index operation.\n\nThe `_source` field must be enabled to use this API.\nIn addition to `_source`, you can access the following variables through the `ctx` map: `_index`, `_type`, `_id`, `_version`, `_routing`, and `_now` (the current timestamp).\nFor usage examples such as partial updates, upserts, and scripted updates, see the External documentation.\n\n## Required authorization\n\n* Index privileges: `write`\n", + "externalDocs": { + "url": "https://www.elastic.co/docs/reference/elasticsearch/rest-apis/update-document", + "x-previousVersionUrl": "https://www.elastic.co/guide/en/elasticsearch/reference/8.18/docs-update.html" + }, "operationId": "update", "parameters": [ { @@ -23966,6 +26572,7 @@ "properties": { "detect_noop": { "description": "If `true`, the `result` in the response is set to `noop` (no operation) when there are no changes to the document.", + "default": true, "type": "boolean" }, "doc": { @@ -23974,6 +26581,7 @@ }, "doc_as_upsert": { "description": "If `true`, use the contents of 'doc' as the value of 'upsert'.\nNOTE: Using ingest pipelines with `doc_as_upsert` is not supported.", + "default": false, "type": "boolean" }, "script": { @@ -23981,6 +26589,7 @@ }, "scripted_upsert": { "description": "If `true`, run the script whether or not the document exists.", + "default": false, "type": "boolean" }, "_source": { @@ -24073,7 +26682,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } }, "/{index}/_update_by_query": { @@ -24082,7 +26696,11 @@ "document" ], "summary": "Update documents", - "description": "Updates documents that match the specified query.\nIf no query is specified, performs an update on every document in the data stream or index without modifying the source, which is useful for picking up mapping changes.\n\nIf the Elasticsearch security features are enabled, you must have the following index privileges for the target data stream, index, or alias:\n\n* `read`\n* `index` or `write`\n\nYou can specify the query criteria in the request URI or the request body using the same syntax as the search API.\n\nWhen you submit an update by query request, Elasticsearch gets a snapshot of the data stream or index when it begins processing the request and updates matching documents using internal versioning.\nWhen the versions match, the document is updated and the version number is incremented.\nIf a document changes between the time that the snapshot is taken and the update operation is processed, it results in a version conflict and the operation fails.\nYou can opt to count version conflicts instead of halting and returning by setting `conflicts` to `proceed`.\nNote that if you opt to count version conflicts, the operation could attempt to update more documents from the source than `max_docs` until it has successfully updated `max_docs` documents or it has gone through every document in the source query.\n\nNOTE: Documents with a version equal to 0 cannot be updated using update by query because internal versioning does not support 0 as a valid version number.\n\nWhile processing an update by query request, Elasticsearch performs multiple search requests sequentially to find all of the matching documents.\nA bulk update request is performed for each batch of matching documents.\nAny query or update failures cause the update by query request to fail and the failures are shown in the response.\nAny update requests that completed successfully still stick, they are not rolled back.\n\n**Throttling update requests**\n\nTo control the rate at which update by query issues batches of update operations, you can set `requests_per_second` to any positive decimal number.\nThis pads each batch with a wait time to throttle the rate.\nSet `requests_per_second` to `-1` to turn off throttling.\n\nThrottling uses a wait time between batches so that the internal scroll requests can be given a timeout that takes the request padding into account.\nThe padding time is the difference between the batch size divided by the `requests_per_second` and the time spent writing.\nBy default the batch size is 1000, so if `requests_per_second` is set to `500`:\n\n```\ntarget_time = 1000 / 500 per second = 2 seconds\nwait_time = target_time - write_time = 2 seconds - .5 seconds = 1.5 seconds\n```\n\nSince the batch is issued as a single _bulk request, large batch sizes cause Elasticsearch to create many requests and wait before starting the next set.\nThis is \"bursty\" instead of \"smooth\".\n\n**Slicing**\n\nUpdate by query supports sliced scroll to parallelize the update process.\nThis can improve efficiency and provide a convenient way to break the request down into smaller parts.\n\nSetting `slices` to `auto` chooses a reasonable number for most data streams and indices.\nThis setting will use one slice per shard, up to a certain limit.\nIf there are multiple source data streams or indices, it will choose the number of slices based on the index or backing index with the smallest number of shards.\n\nAdding `slices` to `_update_by_query` just automates the manual process of creating sub-requests, which means it has some quirks:\n\n* You can see these requests in the tasks APIs. These sub-requests are \"child\" tasks of the task for the request with slices.\n* Fetching the status of the task for the request with `slices` only contains the status of completed slices.\n* These sub-requests are individually addressable for things like cancellation and rethrottling.\n* Rethrottling the request with `slices` will rethrottle the unfinished sub-request proportionally.\n* Canceling the request with slices will cancel each sub-request.\n* Due to the nature of slices each sub-request won't get a perfectly even portion of the documents. All documents will be addressed, but some slices may be larger than others. Expect larger slices to have a more even distribution.\n* Parameters like `requests_per_second` and `max_docs` on a request with slices are distributed proportionally to each sub-request. Combine that with the point above about distribution being uneven and you should conclude that using `max_docs` with `slices` might not result in exactly `max_docs` documents being updated.\n* Each sub-request gets a slightly different snapshot of the source data stream or index though these are all taken at approximately the same time.\n\nIf you're slicing manually or otherwise tuning automatic slicing, keep in mind that:\n\n* Query performance is most efficient when the number of slices is equal to the number of shards in the index or backing index. If that number is large (for example, 500), choose a lower number as too many slices hurts performance. Setting slices higher than the number of shards generally does not improve efficiency and adds overhead.\n* Update performance scales linearly across available resources with the number of slices.\n\nWhether query or update performance dominates the runtime depends on the documents being reindexed and cluster resources.\n\n**Update the document source**\n\nUpdate by query supports scripts to update the document source.\nAs with the update API, you can set `ctx.op` to change the operation that is performed.\n\nSet `ctx.op = \"noop\"` if your script decides that it doesn't have to make any changes.\nThe update by query operation skips updating the document and increments the `noop` counter.\n\nSet `ctx.op = \"delete\"` if your script decides that the document should be deleted.\nThe update by query operation deletes the document and increments the `deleted` counter.\n\nUpdate by query supports only `index`, `noop`, and `delete`.\nSetting `ctx.op` to anything else is an error.\nSetting any other field in `ctx` is an error.\nThis API enables you to only modify the source of matching documents; you cannot move them.\n\n## Required authorization\n\n* Index privileges: `read`,`write`\n", + "description": "Updates documents that match the specified query.\nIf no query is specified, performs an update on every document in the data stream or index without modifying the source, which is useful for picking up mapping changes.\n\nIf the Elasticsearch security features are enabled, you must have the following index privileges for the target data stream, index, or alias:\n\n* `read`\n* `index` or `write`\n\nYou can specify the query criteria in the request URI or the request body using the same syntax as the search API.\n\nWhen you submit an update by query request, Elasticsearch gets a snapshot of the data stream or index when it begins processing the request and updates matching documents using internal versioning.\nWhen the versions match, the document is updated and the version number is incremented.\nIf a document changes between the time that the snapshot is taken and the update operation is processed, it results in a version conflict and the operation fails.\nYou can opt to count version conflicts instead of halting and returning by setting `conflicts` to `proceed`.\nNote that if you opt to count version conflicts, the operation could attempt to update more documents from the source than `max_docs` until it has successfully updated `max_docs` documents or it has gone through every document in the source query.\n\nNOTE: Documents with a version equal to 0 cannot be updated using update by query because internal versioning does not support 0 as a valid version number.\n\nWhile processing an update by query request, Elasticsearch performs multiple search requests sequentially to find all of the matching documents.\nA bulk update request is performed for each batch of matching documents.\nAny query or update failures cause the update by query request to fail and the failures are shown in the response.\nAny update requests that completed successfully still stick, they are not rolled back.\n\n**Refreshing shards**\n\nSpecifying the `refresh` parameter refreshes all shards once the request completes.\nThis is different to the update API's `refresh` parameter, which causes only the shard\nthat received the request to be refreshed. Unlike the update API, it does not support\n`wait_for`.\n\n**Running update by query asynchronously**\n\nIf the request contains `wait_for_completion=false`, Elasticsearch\nperforms some preflight checks, launches the request, and returns a\n[task](https://www.elastic.co/docs/api/doc/elasticsearch/group/endpoint-tasks) you can use to cancel or get the status of the task.\nElasticsearch creates a record of this task as a document at `.tasks/task/${taskId}`.\n\n**Waiting for active shards**\n\n`wait_for_active_shards` controls how many copies of a shard must be active\nbefore proceeding with the request. See [`wait_for_active_shards`](https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-create#operation-create-wait_for_active_shards)\nfor details. `timeout` controls how long each write request waits for unavailable\nshards to become available. Both work exactly the way they work in the\n[Bulk API](https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-bulk). Update by query uses scrolled searches, so you can also\nspecify the `scroll` parameter to control how long it keeps the search context\nalive, for example `?scroll=10m`. The default is 5 minutes.\n\n**Throttling update requests**\n\nTo control the rate at which update by query issues batches of update operations, you can set `requests_per_second` to any positive decimal number.\nThis pads each batch with a wait time to throttle the rate.\nSet `requests_per_second` to `-1` to turn off throttling.\n\nThrottling uses a wait time between batches so that the internal scroll requests can be given a timeout that takes the request padding into account.\nThe padding time is the difference between the batch size divided by the `requests_per_second` and the time spent writing.\nBy default the batch size is 1000, so if `requests_per_second` is set to `500`:\n\n```\ntarget_time = 1000 / 500 per second = 2 seconds\nwait_time = target_time - write_time = 2 seconds - .5 seconds = 1.5 seconds\n```\n\nSince the batch is issued as a single _bulk request, large batch sizes cause Elasticsearch to create many requests and wait before starting the next set.\nThis is \"bursty\" instead of \"smooth\".\n\n**Slicing**\n\nUpdate by query supports sliced scroll to parallelize the update process.\nThis can improve efficiency and provide a convenient way to break the request down into smaller parts.\n\nSetting `slices` to `auto` chooses a reasonable number for most data streams and indices.\nThis setting will use one slice per shard, up to a certain limit.\nIf there are multiple source data streams or indices, it will choose the number of slices based on the index or backing index with the smallest number of shards.\n\nAdding `slices` to `_update_by_query` just automates the manual process of creating sub-requests, which means it has some quirks:\n\n* You can see these requests in the tasks APIs. These sub-requests are \"child\" tasks of the task for the request with slices.\n* Fetching the status of the task for the request with `slices` only contains the status of completed slices.\n* These sub-requests are individually addressable for things like cancellation and rethrottling.\n* Rethrottling the request with `slices` will rethrottle the unfinished sub-request proportionally.\n* Canceling the request with slices will cancel each sub-request.\n* Due to the nature of slices each sub-request won't get a perfectly even portion of the documents. All documents will be addressed, but some slices may be larger than others. Expect larger slices to have a more even distribution.\n* Parameters like `requests_per_second` and `max_docs` on a request with slices are distributed proportionally to each sub-request. Combine that with the point above about distribution being uneven and you should conclude that using `max_docs` with `slices` might not result in exactly `max_docs` documents being updated.\n* Each sub-request gets a slightly different snapshot of the source data stream or index though these are all taken at approximately the same time.\n\nIf you're slicing manually or otherwise tuning automatic slicing, keep in mind that:\n\n* Query performance is most efficient when the number of slices is equal to the number of shards in the index or backing index. If that number is large (for example, 500), choose a lower number as too many slices hurts performance. Setting slices higher than the number of shards generally does not improve efficiency and adds overhead.\n* Update performance scales linearly across available resources with the number of slices.\n\nWhether query or update performance dominates the runtime depends on the documents being reindexed and cluster resources.\nRefer to the linked documentation for examples of how to update documents using the `_update_by_query` API:\n\n## Required authorization\n\n* Index privileges: `read`,`write`\n", + "externalDocs": { + "url": "https://www.elastic.co/docs/reference/elasticsearch/rest-apis/update-by-query-api", + "x-previousVersionUrl": "https://www.elastic.co/guide/en/elasticsearch/reference/8.18/docs-update-by-query.html" + }, "operationId": "update-by-query", "parameters": [ { @@ -24537,7 +27155,12 @@ } }, "x-state": "Generally available", - "x-product-feature": "elasticsearch" + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] } } }, @@ -27113,7 +29736,12 @@ "$ref": "#/components/schemas/_types.aggregations.MultiBucketBase" }, { - "type": "object" + "type": "object", + "properties": { + "key": { + "type": "string" + } + } } ] }, @@ -30479,6 +33107,7 @@ "properties": { "boost": { "description": "Floating point number used to decrease or increase the relevance scores of the query.\nBoost values are relative to the default value of 1.0.\nA boost value between 0 and 1.0 decreases the relevance score.\nA value greater than 1.0 increases the relevance score.", + "default": 1.0, "type": "number" }, "_name": { @@ -30567,6 +33196,7 @@ }, "auto_generate_synonyms_phrase_query": { "description": "If true, match phrase queries are automatically created for multi-term synonyms.", + "default": true, "type": "boolean" }, "operator": { @@ -30635,6 +33265,7 @@ }, "tie_breaker": { "description": "Floating point number between 0 and 1.0 used to increase the relevance scores of documents matching multiple query clauses.", + "default": 0.0, "type": "number" } }, @@ -30986,6 +33617,7 @@ }, "factor": { "description": "Optional factor to multiply the field value with.", + "default": 1.0, "type": "number" }, "missing": { @@ -31099,6 +33731,7 @@ }, "explain": { "description": "If `true`, the request returns detailed information about score computation as part of a hit.", + "default": false, "type": "boolean" }, "ext": { @@ -31110,6 +33743,7 @@ }, "from": { "description": "The starting document offset, which must be non-negative.\nBy default, you cannot page through more than 10,000 hits using the `from` and `size` parameters.\nTo page through more hits, use the `search_after` parameter.", + "default": 0.0, "type": "number" }, "highlight": { @@ -31170,6 +33804,7 @@ }, "profile": { "description": "Set to `true` to return detailed timing information about the execution of individual components in a search request.\nNOTE: This is a debugging tool and adds significant overhead to search execution.", + "default": false, "type": "boolean" }, "query": { @@ -31204,6 +33839,7 @@ }, "size": { "description": "The number of hits to return, which must not be negative.\nBy default, you cannot page through more than 10,000 hits using the `from` and `size` parameters.\nTo page through more hits, use the `search_after` property.", + "default": 10.0, "type": "number" }, "slice": { @@ -31227,6 +33863,7 @@ }, "terminate_after": { "description": "The maximum number of documents to collect for each shard.\nIf a query reaches this limit, Elasticsearch terminates the query early.\nElasticsearch collects documents before sorting.\n\nIMPORTANT: Use with caution.\nElasticsearch applies this property to each shard handling the request.\nWhen possible, let Elasticsearch perform early termination automatically.\nAvoid specifying this property for requests that target data streams with backing indices across multiple data tiers.\n\nIf set to `0` (default), the query does not terminate early.", + "default": 0.0, "type": "number" }, "timeout": { @@ -31235,10 +33872,12 @@ }, "track_scores": { "description": "If `true`, calculate and return document scores, even if the scores are not used for sorting.", + "default": false, "type": "boolean" }, "version": { "description": "If `true`, the request returns the document version as part of a hit.", + "default": false, "type": "boolean" }, "seq_no_primary_term": { @@ -31306,10 +33945,12 @@ }, "size": { "description": "The maximum number of hits to return per `inner_hits`.", + "default": 3.0, "type": "number" }, "from": { "description": "Inner hit starting document offset.", + "default": 0.0, "type": "number" }, "collapse": { @@ -31355,6 +33996,7 @@ "$ref": "#/components/schemas/_types.Fields" }, "track_scores": { + "default": false, "type": "boolean" }, "version": { @@ -31458,10 +34100,12 @@ }, "boundary_chars": { "description": "A string that contains each boundary character.", + "default": ".,!? \\t\\n", "type": "string" }, "boundary_max_scan": { "description": "How far to scan for boundary characters.", + "default": 20.0, "type": "number" }, "boundary_scanner": { @@ -31469,6 +34113,7 @@ }, "boundary_scanner_locale": { "description": "Controls which locale is used to search for sentence and word boundaries.\nThis parameter takes a form of a language tag, for example: `\"en-US\"`, `\"fr-FR\"`, `\"ja-JP\"`.", + "default": "Locale.ROOT", "type": "string" }, "force_source": { @@ -31480,6 +34125,7 @@ }, "fragment_size": { "description": "The size of the highlighted fragment in characters.", + "default": 100.0, "type": "number" }, "highlight_filter": { @@ -31497,10 +34143,12 @@ }, "no_match_size": { "description": "The amount of text you want to return from the beginning of the field if there are no matching fragments to highlight.", + "default": 0.0, "type": "number" }, "number_of_fragments": { "description": "The maximum number of fragments to return.\nIf the number of fragments is set to `0`, no fragments are returned.\nInstead, the entire field contents are highlighted and returned.\nThis can be handy when you need to highlight short texts such as a title or address, but fragmentation is not required.\nIf `number_of_fragments` is `0`, `fragment_size` is ignored.", + "default": 5.0, "type": "number" }, "options": { @@ -31514,6 +34162,7 @@ }, "phrase_limit": { "description": "Controls the number of matching phrases in a document that are considered.\nPrevents the `fvh` highlighter from analyzing too many phrases and consuming too much memory.\nWhen using `matched_fields`, `phrase_limit` phrases per matched field are considered. Raising the limit increases query time and consumes more memory.\nOnly supported by the `fvh` highlighter.", + "default": 256.0, "type": "number" }, "post_tags": { @@ -31532,6 +34181,7 @@ }, "require_field_match": { "description": "By default, only fields that contains a query match are highlighted.\nSet to `false` to highlight all fields.", + "default": true, "type": "boolean" }, "tags_schema": { @@ -31912,10 +34562,12 @@ }, "query_weight": { "description": "Relative importance of the original query versus the rescore query.", + "default": 1.0, "type": "number" }, "rescore_query_weight": { "description": "Relative importance of the rescore query versus the original query.", + "default": 1.0, "type": "number" }, "score_mode": { @@ -32105,6 +34757,15 @@ "rank_window_size": { "description": "This value determines the size of the individual result sets per query.", "type": "number" + }, + "query": { + "type": "string" + }, + "fields": { + "type": "array", + "items": { + "type": "string" + } } }, "required": [ @@ -32240,6 +34901,18 @@ }, "rank_window_size": { "type": "number" + }, + "query": { + "type": "string" + }, + "fields": { + "type": "array", + "items": { + "type": "string" + } + }, + "normalizer": { + "$ref": "#/components/schemas/_types.ScoreNormalizer" } } } @@ -32484,10 +35157,12 @@ "properties": { "max_expansions": { "description": "Maximum number of variations created.", + "default": 50.0, "type": "number" }, "prefix_length": { "description": "Number of beginning characters left unchanged when creating expansions.", + "default": 0.0, "type": "number" }, "rewrite": { @@ -32495,6 +35170,7 @@ }, "transpositions": { "description": "Indicates whether edits include transpositions of two adjacent characters (for example `ab` to `ba`).", + "default": true, "type": "boolean" }, "fuzziness": { @@ -32550,6 +35226,7 @@ }, "ignore_unmapped": { "description": "Set to `true` to ignore an unmapped field and not match any documents for this query.\nSet to `false` to throw an exception if the field is not mapped.", + "default": false, "type": "boolean" } } @@ -32590,6 +35267,7 @@ }, "ignore_unmapped": { "description": "Set to `true` to ignore an unmapped field and not match any documents for this query.\nSet to `false` to throw an exception if the field is not mapped.", + "default": false, "type": "boolean" } }, @@ -32650,6 +35328,7 @@ "properties": { "ignore_unmapped": { "description": "Set to `true` to ignore an unmapped field and not match any documents for this query.\nSet to `false` to throw an exception if the field is not mapped.", + "default": false, "type": "boolean" } } @@ -32666,6 +35345,7 @@ "properties": { "ignore_unmapped": { "description": "Indicates whether to ignore an unmapped `type` and not return any documents instead of an error.", + "default": false, "type": "boolean" }, "inner_hits": { @@ -32719,6 +35399,7 @@ "properties": { "ignore_unmapped": { "description": "Indicates whether to ignore an unmapped `parent_type` and not return any documents instead of an error.\nYou can use this parameter to query multiple indices that may not contain the `parent_type`.", + "default": false, "type": "boolean" }, "inner_hits": { @@ -32732,6 +35413,7 @@ }, "score": { "description": "Indicates whether the relevance score of a matching parent document is aggregated into its child documents.", + "default": false, "type": "boolean" } }, @@ -32823,10 +35505,12 @@ }, "max_gaps": { "description": "Maximum number of positions between the matching terms.\nIntervals produced by the rules further apart than this are not considered matches.", + "default": -1.0, "type": "number" }, "ordered": { "description": "If `true`, intervals produced by the rules should appear in the order in which they are specified.", + "default": false, "type": "boolean" }, "filter": { @@ -32932,6 +35616,7 @@ }, "prefix_length": { "description": "Number of beginning characters left unchanged when creating expansions.", + "default": 0.0, "type": "number" }, "term": { @@ -32940,6 +35625,7 @@ }, "transpositions": { "description": "Indicates whether edits include transpositions of two adjacent characters (for example, `ab` to `ba`).", + "default": true, "type": "boolean" }, "use_field": { @@ -32959,10 +35645,12 @@ }, "max_gaps": { "description": "Maximum number of positions between the matching terms.\nTerms further apart than this are not considered matches.", + "default": -1.0, "type": "number" }, "ordered": { "description": "If `true`, matching terms must appear in their specified order.", + "default": false, "type": "boolean" }, "query": { @@ -33132,6 +35820,7 @@ }, "auto_generate_synonyms_phrase_query": { "description": "If `true`, match phrase queries are automatically created for multi-term synonyms.", + "default": true, "type": "boolean" }, "cutoff_frequency": { @@ -33146,14 +35835,17 @@ }, "fuzzy_transpositions": { "description": "If `true`, edits for fuzzy matching include transpositions of two adjacent characters (for example, `ab` to `ba`).", + "default": true, "type": "boolean" }, "lenient": { "description": "If `true`, format-based errors, such as providing a text query value for a numeric field, are ignored.", + "default": false, "type": "boolean" }, "max_expansions": { "description": "Maximum number of terms to which the query will expand.", + "default": 50.0, "type": "number" }, "minimum_should_match": { @@ -33164,6 +35856,7 @@ }, "prefix_length": { "description": "Number of beginning characters left unchanged for fuzzy matching.", + "default": 0.0, "type": "number" }, "query": { @@ -33227,10 +35920,12 @@ }, "fuzzy_transpositions": { "description": "If `true`, edits for fuzzy matching include transpositions of two adjacent characters (for example, `ab` to `ba`).\nCan be applied to the term subqueries constructed for all terms but the final term.", + "default": true, "type": "boolean" }, "max_expansions": { "description": "Maximum number of terms to which the query will expand.\nCan be applied to the term subqueries constructed for all terms but the final term.", + "default": 50.0, "type": "number" }, "minimum_should_match": { @@ -33241,6 +35936,7 @@ }, "prefix_length": { "description": "Number of beginning characters left unchanged for fuzzy matching.\nCan be applied to the term subqueries constructed for all terms but the final term.", + "default": 0.0, "type": "number" }, "query": { @@ -33282,6 +35978,7 @@ }, "slop": { "description": "Maximum number of positions allowed between matching tokens.", + "default": 0.0, "type": "number" }, "zero_terms_query": { @@ -33308,6 +36005,7 @@ }, "max_expansions": { "description": "Maximum number of terms to which the last provided term of the query value will expand.", + "default": 50.0, "type": "number" }, "query": { @@ -33316,6 +36014,7 @@ }, "slop": { "description": "Maximum number of positions allowed between matching tokens.", + "default": 0.0, "type": "number" }, "zero_terms_query": { @@ -33345,10 +36044,12 @@ }, "boost_terms": { "description": "Each term in the formed query could be further boosted by their tf-idf score.\nThis sets the boost factor to use when using this feature.\nDefaults to deactivated (0).", + "default": 0.0, "type": "number" }, "fail_on_unsupported_field": { "description": "Controls whether the query should fail (throw an exception) if any of the specified fields are not of the supported types (`text` or `keyword`).", + "default": true, "type": "boolean" }, "fields": { @@ -33360,6 +36061,7 @@ }, "include": { "description": "Specifies whether the input documents should also be included in the search results returned.", + "default": false, "type": "boolean" }, "like": { @@ -33382,14 +36084,17 @@ }, "max_query_terms": { "description": "The maximum number of query terms that can be selected.", + "default": 25.0, "type": "number" }, "max_word_length": { "description": "The maximum word length above which the terms are ignored.\nDefaults to unbounded (`0`).", + "default": 0.0, "type": "number" }, "min_doc_freq": { "description": "The minimum document frequency below which the terms are ignored from the input document.", + "default": 5.0, "type": "number" }, "minimum_should_match": { @@ -33397,10 +36102,12 @@ }, "min_term_freq": { "description": "The minimum term frequency below which the terms are ignored from the input document.", + "default": 2.0, "type": "number" }, "min_word_length": { "description": "The minimum word length below which the terms are ignored.", + "default": 0.0, "type": "number" }, "routing": { @@ -33563,6 +36270,7 @@ }, "auto_generate_synonyms_phrase_query": { "description": "If `true`, match phrase queries are automatically created for multi-term synonyms.", + "default": true, "type": "boolean" }, "cutoff_frequency": { @@ -33580,14 +36288,17 @@ }, "fuzzy_transpositions": { "description": "If `true`, edits for fuzzy matching include transpositions of two adjacent characters (for example, `ab` to `ba`).\nCan be applied to the term subqueries constructed for all terms but the final term.", + "default": true, "type": "boolean" }, "lenient": { "description": "If `true`, format-based errors, such as providing a text query value for a numeric field, are ignored.", + "default": false, "type": "boolean" }, "max_expansions": { "description": "Maximum number of terms to which the query will expand.", + "default": 50.0, "type": "number" }, "minimum_should_match": { @@ -33598,6 +36309,7 @@ }, "prefix_length": { "description": "Number of beginning characters left unchanged for fuzzy matching.", + "default": 0.0, "type": "number" }, "query": { @@ -33606,10 +36318,12 @@ }, "slop": { "description": "Maximum number of positions allowed between matching tokens.", + "default": 0.0, "type": "number" }, "tie_breaker": { "description": "Determines how scores for each per-term blended query and scores across groups are combined.", + "default": 0.0, "type": "number" }, "type": { @@ -33646,6 +36360,7 @@ "properties": { "ignore_unmapped": { "description": "Indicates whether to ignore an unmapped path and not return any documents instead of an error.", + "default": false, "type": "boolean" }, "inner_hits": { @@ -33681,6 +36396,7 @@ }, "ignore_unmapped": { "description": "Indicates whether to ignore an unmapped `type` and not return any documents instead of an error.", + "default": false, "type": "boolean" }, "type": { @@ -33816,6 +36532,7 @@ }, "case_insensitive": { "description": "Allows ASCII case insensitive matching of the value with the indexed field values when set to `true`.\nDefault is `false` which means the case sensitivity of matching depends on the underlying field’s mapping.", + "default": false, "x-state": "Generally available", "type": "boolean" } @@ -33836,6 +36553,7 @@ "properties": { "allow_leading_wildcard": { "description": "If `true`, the wildcard characters `*` and `?` are allowed as the first character of the query string.", + "default": true, "type": "boolean" }, "analyzer": { @@ -33844,10 +36562,12 @@ }, "analyze_wildcard": { "description": "If `true`, the query attempts to analyze wildcard terms in the query string.", + "default": false, "type": "boolean" }, "auto_generate_synonyms_phrase_query": { "description": "If `true`, match phrase queries are automatically created for multi-term synonyms.", + "default": true, "type": "boolean" }, "default_field": { @@ -33858,9 +36578,11 @@ }, "enable_position_increments": { "description": "If `true`, enable position increments in queries constructed from a `query_string` search.", + "default": true, "type": "boolean" }, "escape": { + "default": false, "type": "boolean" }, "fields": { @@ -33875,10 +36597,12 @@ }, "fuzzy_max_expansions": { "description": "Maximum number of terms to which the query expands for fuzzy matching.", + "default": 50.0, "type": "number" }, "fuzzy_prefix_length": { "description": "Number of beginning characters left unchanged for fuzzy matching.", + "default": 0.0, "type": "number" }, "fuzzy_rewrite": { @@ -33886,14 +36610,17 @@ }, "fuzzy_transpositions": { "description": "If `true`, edits for fuzzy matching include transpositions of two adjacent characters (for example, `ab` to `ba`).", + "default": true, "type": "boolean" }, "lenient": { "description": "If `true`, format-based errors, such as providing a text value for a numeric field, are ignored.", + "default": false, "type": "boolean" }, "max_determinized_states": { "description": "Maximum number of automaton states required for the query.", + "default": 10000.0, "type": "number" }, "minimum_should_match": { @@ -33901,6 +36628,7 @@ }, "phrase_slop": { "description": "Maximum number of positions allowed between matching tokens for phrases.", + "default": 0.0, "type": "number" }, "query": { @@ -34256,6 +36984,7 @@ "properties": { "case_insensitive": { "description": "Allows case insensitive matching of the regular expression value with the indexed field values when set to `true`.\nWhen `false`, case sensitivity of matching depends on the underlying field’s mapping.", + "default": false, "x-state": "Generally available", "type": "boolean" }, @@ -34265,6 +36994,7 @@ }, "max_determinized_states": { "description": "Maximum number of automaton states required for the query.", + "default": 10000.0, "type": "number" }, "rewrite": { @@ -34417,10 +37147,12 @@ }, "analyze_wildcard": { "description": "If `true`, the query attempts to analyze wildcard terms in the query string.", + "default": false, "type": "boolean" }, "auto_generate_synonyms_phrase_query": { "description": "If `true`, the parser creates a match_phrase query for each multi-position token.", + "default": true, "type": "boolean" }, "default_operator": { @@ -34438,10 +37170,12 @@ }, "fuzzy_max_expansions": { "description": "Maximum number of terms to which the query expands for fuzzy matching.", + "default": 50.0, "type": "number" }, "fuzzy_prefix_length": { "description": "Number of beginning characters left unchanged for fuzzy matching.", + "default": 0.0, "type": "number" }, "fuzzy_transpositions": { @@ -34450,6 +37184,7 @@ }, "lenient": { "description": "If `true`, format-based errors, such as providing a text value for a numeric field, are ignored.", + "default": false, "type": "boolean" }, "minimum_should_match": { @@ -34694,10 +37429,12 @@ }, "post": { "description": "The number of tokens after the include span that can’t have overlap with the exclude span.", + "default": 0.0, "type": "number" }, "pre": { "description": "The number of tokens before the include span that can’t have overlap with the exclude span.", + "default": 0.0, "type": "number" } }, @@ -34796,7 +37533,7 @@ "type": "boolean" }, "pruning_config": { - "$ref": "#/components/schemas/_types.query_dsl.TokenPruningConfig" + "$ref": "#/components/schemas/_types.TokenPruningConfig" } }, "required": [ @@ -34824,19 +37561,22 @@ } ] }, - "_types.query_dsl.TokenPruningConfig": { + "_types.TokenPruningConfig": { "type": "object", "properties": { "tokens_freq_ratio_threshold": { "description": "Tokens whose frequency is more than this threshold times the average frequency of all tokens in the specified field are considered outliers and pruned.", + "default": 5.0, "type": "number" }, "tokens_weight_threshold": { "description": "Tokens whose weight is less than this threshold are considered nonsignificant and pruned.", + "default": 0.4, "type": "number" }, "only_score_pruned_tokens": { "description": "Whether to only score pruned tokens, vs only scoring kept tokens.", + "default": false, "type": "boolean" } } @@ -34854,6 +37594,7 @@ }, "case_insensitive": { "description": "Allows ASCII case insensitive matching of the value with the indexed field values when set to `true`.\nWhen `false`, the case sensitivity of matching depends on the underlying field’s mapping.", + "default": false, "x-state": "Generally available", "type": "boolean" } @@ -34922,7 +37663,7 @@ "type": "string" }, "pruning_config": { - "$ref": "#/components/schemas/_types.query_dsl.TokenPruningConfig" + "$ref": "#/components/schemas/_types.TokenPruningConfig" } }, "required": [ @@ -34961,7 +37702,7 @@ ] }, "pruning_config": { - "$ref": "#/components/schemas/_types.query_dsl.TokenPruningConfig" + "$ref": "#/components/schemas/_types.TokenPruningConfig" } }, "required": [ @@ -35059,6 +37800,7 @@ "properties": { "buckets": { "description": "The target number of buckets.", + "default": 10.0, "type": "number" }, "field": { @@ -35423,6 +38165,7 @@ "properties": { "precision_threshold": { "description": "A unique count below which counts are expected to be close to accurate.\nThis allows to trade memory for accuracy.", + "default": 3000.0, "type": "number" }, "rehash": { @@ -35459,14 +38202,17 @@ }, "max_unique_tokens": { "description": "The maximum number of unique tokens at any position up to max_matched_tokens. Must be larger than 1.\nSmaller values use less memory and create fewer categories. Larger values will use more memory and\ncreate narrower categories. Max allowed value is 100.", + "default": 50.0, "type": "number" }, "max_matched_tokens": { "description": "The maximum number of token positions to match on before attempting to merge categories. Larger\nvalues will use more memory and create narrower categories. Max allowed value is 100.", + "default": 5.0, "type": "number" }, "similarity_threshold": { "description": "The minimum percentage of tokens that must match for text to be added to the category bucket. Must\nbe between 1 and 100. The larger the value the narrower the categories. Larger values will increase memory\nusage and create narrower categories.", + "default": 50.0, "type": "number" }, "categorization_filters": { @@ -35485,6 +38231,7 @@ }, "size": { "description": "The number of buckets to return.", + "default": 10.0, "type": "number" }, "min_doc_count": { @@ -35560,6 +38307,7 @@ }, "size": { "description": "The number of composite buckets that should be returned.", + "default": 10.0, "type": "number" }, "sources": { @@ -35935,6 +38683,7 @@ }, "max_docs_per_value": { "description": "Limits how many documents are permitted per choice of de-duplicating value.", + "default": 1.0, "type": "number" }, "script": { @@ -35942,6 +38691,7 @@ }, "shard_size": { "description": "Limits how many top-scoring documents are collected in the sample processed on each shard.", + "default": 100.0, "type": "number" }, "field": { @@ -36003,14 +38753,17 @@ }, "minimum_set_size": { "description": "The minimum size of one item set.", + "default": 1.0, "type": "number" }, "minimum_support": { "description": "The minimum support of one item set.", + "default": 0.1, "type": "number" }, "size": { "description": "The number of top item sets to return.", + "default": 10.0, "type": "number" }, "filter": { @@ -36101,10 +38854,12 @@ }, "other_bucket_key": { "description": "The key with which the other bucket is returned.", + "default": "_other_", "type": "string" }, "keyed": { "description": "By default, the named filters aggregation returns the buckets as an object.\nSet to `false` to return the buckets as an array of objects.", + "default": true, "type": "boolean" } } @@ -36138,6 +38893,7 @@ "properties": { "wrap_longitude": { "description": "Specifies whether the bounding box should be allowed to overlap the international date line.", + "default": true, "type": "boolean" } } @@ -36249,6 +39005,7 @@ }, "size": { "description": "The maximum number of geohash buckets to return.", + "default": 10000.0, "type": "number" } } @@ -36284,6 +39041,7 @@ }, "size": { "description": "The maximum length of the line represented in the aggregation.\nValid sizes are between 1 and 10000.", + "default": 10000.0, "type": "number" } }, @@ -36334,6 +39092,7 @@ }, "size": { "description": "The maximum number of buckets to return.", + "default": 10000.0, "type": "number" }, "bounds": { @@ -36359,6 +39118,7 @@ }, "precision": { "description": "Integer zoom of the key used to defined cells or buckets\nin the results. Value should be between 0-15.", + "default": 6.0, "type": "number" }, "bounds": { @@ -36366,6 +39126,7 @@ }, "size": { "description": "Maximum number of buckets to return.", + "default": 10000.0, "type": "number" }, "shard_size": { @@ -36433,6 +39194,7 @@ }, "keyed": { "description": "If `true`, returns buckets as a hash instead of an array, keyed by the bucket keys.", + "default": false, "type": "boolean" } } @@ -36524,10 +39286,12 @@ }, "is_ipv6": { "description": "Defines whether the prefix applies to IPv6 addresses.", + "default": false, "type": "boolean" }, "append_prefix_length": { "description": "Defines whether the prefix length is appended to IP address keys in the response.", + "default": false, "type": "boolean" }, "keyed": { @@ -36536,6 +39300,7 @@ }, "min_doc_count": { "description": "Minimum number of documents in a bucket for it to be included in the response.", + "default": 1.0, "type": "number" } }, @@ -36588,6 +39353,7 @@ }, "num_top_feature_importance_values": { "description": "Specifies the maximum number of feature importance values per document.", + "default": 0.0, "type": "number" } } @@ -36601,6 +39367,7 @@ }, "num_top_feature_importance_values": { "description": "Specifies the maximum number of feature importance values per document.", + "default": 0.0, "type": "number" }, "prediction_field_type": { @@ -36684,6 +39451,7 @@ "properties": { "compression": { "description": "Limits the maximum number of nodes used by the underlying TDigest algorithm to `20 * compression`, enabling control of memory usage and approximation error.", + "default": 1000.0, "type": "number" }, "execution_hint": { @@ -36966,6 +39734,7 @@ }, "shift": { "description": "By default, the window consists of the last n values excluding the current bucket.\nIncreasing `shift` by 1, moves the starting window position by 1 to the right.", + "default": 0.0, "type": "number" }, "keyed": { @@ -36989,6 +39758,7 @@ }, "shift": { "description": "By default, the window consists of the last n values excluding the current bucket.\nIncreasing `shift` by 1, moves the starting window position by 1 to the right.", + "default": 0.0, "type": "number" }, "window": { @@ -37015,10 +39785,12 @@ }, "min_doc_count": { "description": "The minimum number of documents in a bucket for it to be returned.", + "default": 1.0, "type": "number" }, "shard_min_doc_count": { "description": "The minimum number of documents in a bucket on each shard for it to be returned.", + "default": 1.0, "type": "number" }, "shard_size": { @@ -37027,10 +39799,12 @@ }, "show_term_doc_count_error": { "description": "Calculates the doc count error on per term basis.", + "default": false, "type": "boolean" }, "size": { "description": "The number of term buckets should be returned out of the overall terms list.", + "default": 10.0, "type": "number" }, "terms": { @@ -37134,6 +39908,7 @@ "properties": { "keyed": { "description": "By default, the aggregation associates a unique string key with each bucket and returns the ranges as a hash rather than an array.\nSet to `false` to disable this behavior.", + "default": true, "type": "boolean" }, "values": { @@ -37192,6 +39967,7 @@ "properties": { "keyed": { "description": "By default, the aggregation associates a unique string key with each bucket and returns the ranges as a hash rather than an array.\nSet to `false` to disable this behavior.", + "default": true, "type": "boolean" }, "percents": { @@ -37285,6 +40061,7 @@ }, "max_doc_count": { "description": "The maximum number of documents a term should appear in.", + "default": 1.0, "type": "number" }, "missing": { @@ -37292,6 +40069,7 @@ }, "precision": { "description": "The precision of the internal CuckooFilters.\nSmaller precision leads to better approximation, but higher memory usage.", + "default": 0.001, "type": "number" }, "value_type": { @@ -37351,6 +40129,7 @@ "properties": { "shard_size": { "description": "Limits how many top-scoring documents are collected in the sample processed on each shard.", + "default": 100.0, "type": "number" } } @@ -37438,6 +40217,7 @@ }, "min_doc_count": { "description": "Only return terms that are found in more than `min_doc_count` hits.", + "default": 3.0, "type": "number" }, "mutual_information": { @@ -37565,6 +40345,7 @@ }, "min_doc_count": { "description": "Only return values that are found in more than `min_doc_count` hits.", + "default": 3.0, "type": "number" }, "mutual_information": { @@ -37625,6 +40406,7 @@ "properties": { "show_distribution": { "description": "Shows the probability distribution for all characters.", + "default": false, "type": "boolean" } } @@ -37676,6 +40458,7 @@ }, "min_doc_count": { "description": "Only return values that are found in more than `min_doc_count` hits.", + "default": 1.0, "type": "number" }, "missing": { @@ -37711,6 +40494,7 @@ }, "size": { "description": "The number of buckets returned out of the overall terms list.", + "default": 10.0, "type": "number" }, "format": { @@ -37730,6 +40514,7 @@ "properties": { "size": { "description": "The maximum number of results to return.", + "default": 10000.0, "type": "number" }, "keyed": { @@ -37757,6 +40542,7 @@ }, "explain": { "description": "If `true`, returns detailed information about score computation as part of a hit.", + "default": false, "type": "boolean" }, "fields": { @@ -37768,6 +40554,7 @@ }, "from": { "description": "Starting document offset.", + "default": 0.0, "type": "number" }, "highlight": { @@ -37782,6 +40569,7 @@ }, "size": { "description": "The maximum number of top matching hits to return per bucket.", + "default": 3.0, "type": "number" }, "sort": { @@ -37795,10 +40583,12 @@ }, "track_scores": { "description": "If `true`, calculates and returns document scores, even if the scores are not used for sorting.", + "default": false, "type": "boolean" }, "version": { "description": "If `true`, returns document version as part of a hit.", + "default": false, "type": "boolean" }, "seq_no_primary_term": { @@ -37879,6 +40669,7 @@ }, "size": { "description": "The number of top documents from which to return metrics.", + "default": 1.0, "type": "number" }, "sort": { @@ -37972,6 +40763,7 @@ }, "buckets": { "description": "The target number of buckets.", + "default": 10.0, "type": "number" }, "shard_size": { @@ -38062,6 +40854,7 @@ }, "require_alias": { "description": "If `true`, the request's actions must target an index alias.", + "default": false, "type": "boolean" } } @@ -38114,6 +40907,7 @@ "properties": { "require_alias": { "description": "If `true`, the request's actions must target an index alias.", + "default": false, "type": "boolean" }, "retry_on_conflict": { @@ -38139,6 +40933,7 @@ "properties": { "detect_noop": { "description": "If true, the `result` in the response is set to 'noop' when no changes to the document occur.", + "default": true, "type": "boolean" }, "doc": { @@ -38147,6 +40942,7 @@ }, "doc_as_upsert": { "description": "Set to `true` to use the contents of `doc` as the value of `upsert`.", + "default": false, "type": "boolean" }, "script": { @@ -38154,6 +40950,7 @@ }, "scripted_upsert": { "description": "Set to `true` to run the script whether or not the document exists.", + "default": false, "type": "boolean" }, "_source": { @@ -38408,7 +41205,9 @@ "yellow", "YELLOW", "red", - "RED" + "RED", + "unknown", + "unavailable" ] }, "_types.TimeUnit": { @@ -40235,15 +43034,18 @@ "$ref": "#/components/schemas/indices._types.IndexCheckOnStartup" }, "codec": { + "default": "LZ4", "type": "string" }, "routing_partition_size": { "$ref": "#/components/schemas/_spec_utils.Stringifiedinteger" }, "load_fixed_bitset_filters_eagerly": { + "default": true, "type": "boolean" }, "hidden": { + "default": "false", "oneOf": [ { "type": "boolean" @@ -40254,6 +43056,7 @@ ] }, "auto_expand_replicas": { + "default": "false", "oneOf": [ { "type": "string" @@ -40273,24 +43076,31 @@ "$ref": "#/components/schemas/_types.Duration" }, "max_result_window": { + "default": 10000.0, "type": "number" }, "max_inner_result_window": { + "default": 100.0, "type": "number" }, "max_rescore_window": { + "default": 10000.0, "type": "number" }, "max_docvalue_fields_search": { + "default": 100.0, "type": "number" }, "max_script_fields": { + "default": 32.0, "type": "number" }, "max_ngram_diff": { + "default": 1.0, "type": "number" }, "max_shingle_diff": { + "default": 3.0, "type": "number" }, "blocks": { @@ -40306,9 +43116,11 @@ "$ref": "#/components/schemas/indices._types.SettingsHighlight" }, "max_terms_count": { + "default": 65536.0, "type": "number" }, "max_regex_length": { + "default": 1000.0, "type": "number" }, "routing": { @@ -40421,6 +43233,7 @@ "properties": { "enabled": { "description": "Indicates whether soft deletes are enabled on the index.", + "default": true, "type": "boolean" }, "retention_lease": { @@ -40661,6 +43474,7 @@ "type": "object", "properties": { "max_analyzed_offset": { + "default": 1000000.0, "type": "number" } } @@ -40770,6 +43584,7 @@ }, "origination_date": { "description": "If specified, this is the timestamp used to calculate the index age for its phase transitions. Use this setting\nif you create a new index that contains old data and want to use the original creation date to calculate the index\nage. Specified as a Unix epoch value in milliseconds.", + "default": 0.0, "type": "number" }, "parse_origination_date": { @@ -40781,10 +43596,12 @@ }, "rollover_alias": { "description": "The index alias to update when the index rolls over. Specify when using a policy that contains a rollover action.\nWhen the index rolls over, the alias is updated to reflect that the index is no longer the write index. For more\ninformation about rolling indices, see Rollover.", + "default": "", "type": "string" }, "prefer_ilm": { "description": "Preference for the system that manages a data stream backing index (preferring ILM when both ILM and DLM are\napplicable for an index).", + "default": "true", "oneOf": [ { "type": "boolean" @@ -41130,6 +43947,7 @@ }, "max_output_size": { "description": "The maximum token size to emit. Tokens larger than this size will be discarded.\nDefaults to `255`", + "default": 255.0, "type": "number" }, "separator": { @@ -41220,10 +44038,12 @@ }, "lowercase": { "description": "Should terms be lowercased or not.\nDefaults to `true`.", + "default": true, "type": "boolean" }, "pattern": { "description": "A Java regular expression.\nDefaults to `\\W+`.", + "default": "\\W+", "type": "string" }, "stopwords": { @@ -41266,6 +44086,7 @@ }, "max_token_length": { "description": "The maximum token length. If a token is seen that exceeds this length then it is split at `max_token_length` intervals.\nDefaults to `255`.", + "default": 255.0, "type": "number" }, "stopwords": { @@ -42568,12 +45389,21 @@ { "$ref": "#/components/schemas/_types.analysis.ApostropheTokenFilter" }, + { + "$ref": "#/components/schemas/_types.analysis.ArabicStemTokenFilter" + }, { "$ref": "#/components/schemas/_types.analysis.ArabicNormalizationTokenFilter" }, { "$ref": "#/components/schemas/_types.analysis.AsciiFoldingTokenFilter" }, + { + "$ref": "#/components/schemas/_types.analysis.BengaliNormalizationTokenFilter" + }, + { + "$ref": "#/components/schemas/_types.analysis.BrazilianStemTokenFilter" + }, { "$ref": "#/components/schemas/_types.analysis.CjkBigramTokenFilter" }, @@ -42589,12 +45419,18 @@ { "$ref": "#/components/schemas/_types.analysis.ConditionTokenFilter" }, + { + "$ref": "#/components/schemas/_types.analysis.CzechStemTokenFilter" + }, { "$ref": "#/components/schemas/_types.analysis.DecimalDigitTokenFilter" }, { "$ref": "#/components/schemas/_types.analysis.DelimitedPayloadTokenFilter" }, + { + "$ref": "#/components/schemas/_types.analysis.DutchStemTokenFilter" + }, { "$ref": "#/components/schemas/_types.analysis.EdgeNGramTokenFilter" }, @@ -42607,9 +45443,15 @@ { "$ref": "#/components/schemas/_types.analysis.FlattenGraphTokenFilter" }, + { + "$ref": "#/components/schemas/_types.analysis.FrenchStemTokenFilter" + }, { "$ref": "#/components/schemas/_types.analysis.GermanNormalizationTokenFilter" }, + { + "$ref": "#/components/schemas/_types.analysis.GermanStemTokenFilter" + }, { "$ref": "#/components/schemas/_types.analysis.HindiNormalizationTokenFilter" }, @@ -42667,6 +45509,9 @@ { "$ref": "#/components/schemas/_types.analysis.PersianNormalizationTokenFilter" }, + { + "$ref": "#/components/schemas/_types.analysis.PersianStemTokenFilter" + }, { "$ref": "#/components/schemas/_types.analysis.PorterStemTokenFilter" }, @@ -42679,6 +45524,9 @@ { "$ref": "#/components/schemas/_types.analysis.ReverseTokenFilter" }, + { + "$ref": "#/components/schemas/_types.analysis.RussianStemTokenFilter" + }, { "$ref": "#/components/schemas/_types.analysis.ScandinavianFoldingTokenFilter" }, @@ -42791,6 +45639,27 @@ } } }, + "_types.analysis.ArabicStemTokenFilter": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.analysis.TokenFilterBase" + }, + { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "arabic_stem" + ] + } + }, + "required": [ + "type" + ] + } + ] + }, "_types.analysis.ArabicNormalizationTokenFilter": { "allOf": [ { @@ -42836,6 +45705,48 @@ } ] }, + "_types.analysis.BengaliNormalizationTokenFilter": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.analysis.TokenFilterBase" + }, + { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "bengali_normalization" + ] + } + }, + "required": [ + "type" + ] + } + ] + }, + "_types.analysis.BrazilianStemTokenFilter": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.analysis.TokenFilterBase" + }, + { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "brazilian_stem" + ] + } + }, + "required": [ + "type" + ] + } + ] + }, "_types.analysis.CjkBigramTokenFilter": { "allOf": [ { @@ -42992,6 +45903,27 @@ } ] }, + "_types.analysis.CzechStemTokenFilter": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.analysis.TokenFilterBase" + }, + { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "czech_stem" + ] + } + }, + "required": [ + "type" + ] + } + ] + }, "_types.analysis.DecimalDigitTokenFilter": { "allOf": [ { @@ -43049,6 +45981,27 @@ "identity" ] }, + "_types.analysis.DutchStemTokenFilter": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.analysis.TokenFilterBase" + }, + { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "dutch_stem" + ] + } + }, + "required": [ + "type" + ] + } + ] + }, "_types.analysis.EdgeNGramTokenFilter": { "allOf": [ { @@ -43176,6 +46129,27 @@ } ] }, + "_types.analysis.FrenchStemTokenFilter": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.analysis.TokenFilterBase" + }, + { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "french_stem" + ] + } + }, + "required": [ + "type" + ] + } + ] + }, "_types.analysis.GermanNormalizationTokenFilter": { "allOf": [ { @@ -43197,6 +46171,27 @@ } ] }, + "_types.analysis.GermanStemTokenFilter": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.analysis.TokenFilterBase" + }, + { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "german_stem" + ] + } + }, + "required": [ + "type" + ] + } + ] + }, "_types.analysis.HindiNormalizationTokenFilter": { "allOf": [ { @@ -43782,6 +46777,9 @@ "description": "If `true`, all substrings matching the pattern parameter’s regular expression are replaced. If `false`, the filter replaces only the first matching substring in each token. Defaults to `true`.", "type": "boolean" }, + "flags": { + "type": "string" + }, "pattern": { "description": "Regular expression, written in Java’s regular expression syntax. The filter replaces token substrings matching this pattern with the substring in the `replacement` parameter.", "type": "string" @@ -43819,6 +46817,27 @@ } ] }, + "_types.analysis.PersianStemTokenFilter": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.analysis.TokenFilterBase" + }, + { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "persian_stem" + ] + } + }, + "required": [ + "type" + ] + } + ] + }, "_types.analysis.PorterStemTokenFilter": { "allOf": [ { @@ -43907,6 +46926,27 @@ } ] }, + "_types.analysis.RussianStemTokenFilter": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.analysis.TokenFilterBase" + }, + { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "russian_stem" + ] + } + }, + "required": [ + "type" + ] + } + ] + }, "_types.analysis.ScandinavianFoldingTokenFilter": { "allOf": [ { @@ -44576,10 +47616,10 @@ "alternate": { "$ref": "#/components/schemas/_types.analysis.IcuCollationAlternate" }, - "case_first": { + "caseFirst": { "$ref": "#/components/schemas/_types.analysis.IcuCollationCaseFirst" }, - "case_level": { + "caseLevel": { "type": "boolean" }, "country": { @@ -44588,7 +47628,7 @@ "decomposition": { "$ref": "#/components/schemas/_types.analysis.IcuCollationDecomposition" }, - "hiragana_quaternary_mode": { + "hiraganaQuaternaryMode": { "type": "boolean" }, "language": { @@ -44603,7 +47643,7 @@ "strength": { "$ref": "#/components/schemas/_types.analysis.IcuCollationStrength" }, - "variable_top": { + "variableTop": { "type": "string" }, "variant": { @@ -45066,6 +48106,7 @@ "type": "number" }, "token_chars": { + "default": [], "type": "array", "items": { "$ref": "#/components/schemas/_types.analysis.TokenChar" @@ -45104,6 +48145,7 @@ ] }, "buffer_size": { + "default": 256.0, "type": "number" } }, @@ -45179,6 +48221,7 @@ "type": "number" }, "token_chars": { + "default": [], "type": "array", "items": { "$ref": "#/components/schemas/_types.analysis.TokenChar" @@ -45825,6 +48868,7 @@ "properties": { "limit": { "description": "The maximum number of fields in an index. Field and object mappings, as well as field aliases count towards this limit.\nThe limit is in place to prevent mappings and searches from becoming too large. Higher values can lead to performance\ndegradations and memory issues, especially in clusters with a high load or few resources.", + "default": "1000", "oneOf": [ { "type": "number" @@ -45836,6 +48880,7 @@ }, "ignore_dynamic_beyond_limit": { "description": "This setting determines what happens when a dynamically mapped field would exceed the total fields limit. When set\nto false (the default), the index request of the document that tries to add a dynamic field to the mapping will fail\nwith the message Limit of total fields [X] has been exceeded. When set to true, the index request will not fail.\nInstead, fields that would exceed the limit are not added to the mapping, similar to dynamic: false.\nThe fields that were not added to the mapping will be added to the _ignored field.", + "default": "false", "oneOf": [ { "type": "boolean" @@ -45852,6 +48897,7 @@ "properties": { "limit": { "description": "The maximum depth for a field, which is measured as the number of inner objects. For instance, if all fields are defined\nat the root object level, then the depth is 1. If there is one object mapping, then the depth is 2, etc.", + "default": 20.0, "type": "number" } } @@ -45861,6 +48907,7 @@ "properties": { "limit": { "description": "The maximum number of distinct nested mappings in an index. The nested type should only be used in special cases, when\narrays of objects need to be queried independently of each other. To safeguard against poorly designed mappings, this\nsetting limits the number of unique nested types per index.", + "default": 50.0, "type": "number" } } @@ -45870,6 +48917,7 @@ "properties": { "limit": { "description": "The maximum number of nested JSON objects that a single document can contain across all nested types. This limit helps\nto prevent out of memory errors when a document contains too many nested objects.", + "default": 10000.0, "type": "number" } } @@ -45965,6 +49013,9 @@ "allow_mmap": { "description": "You can restrict the use of the mmapfs and the related hybridfs store type via the setting node.store.allow_mmap.\nThis is a boolean setting indicating whether or not memory-mapping is allowed. The default is to allow it. This\nsetting is useful, for example, if you are in an environment where you can not control the ability to create a lot\nof memory maps so you need disable the ability to use memory-mapping.", "type": "boolean" + }, + "stats_refresh_interval": { + "$ref": "#/components/schemas/_types.Duration" } }, "required": [ @@ -46287,6 +49338,9 @@ { "$ref": "#/components/schemas/_types.mapping.PassthroughObjectProperty" }, + { + "$ref": "#/components/schemas/_types.mapping.RankVectorProperty" + }, { "$ref": "#/components/schemas/_types.mapping.SemanticTextProperty" }, @@ -47211,6 +50265,9 @@ "default_metric": { "type": "string" }, + "ignore_malformed": { + "type": "boolean" + }, "metrics": { "type": "array", "items": { @@ -47252,6 +50309,7 @@ }, "index": { "description": "If `true`, you can search this field using the kNN search API.", + "default": true, "type": "boolean" }, "index_options": { @@ -47284,10 +50342,12 @@ }, "ef_construction": { "description": "The number of candidates to track while assembling the list of nearest neighbors for each new node.\n\nOnly applicable to `hnsw`, `int8_hnsw`, `bbq_hnsw`, and `int4_hnsw` index types.", + "default": 100.0, "type": "number" }, "m": { "description": "The number of neighbors each node will be connected to in the HNSW graph.\n\nOnly applicable to `hnsw`, `int8_hnsw`, `bbq_hnsw`, and `int4_hnsw` index types.", + "default": 16.0, "type": "number" }, "type": { @@ -47370,6 +50430,12 @@ "split_queries_on_whitespace": { "type": "boolean" }, + "time_series_dimensions": { + "type": "array", + "items": { + "type": "string" + } + }, "type": { "type": "string", "enum": [ @@ -47471,6 +50537,42 @@ } ] }, + "_types.mapping.RankVectorProperty": { + "description": "Technical preview", + "allOf": [ + { + "$ref": "#/components/schemas/_types.mapping.PropertyBase" + }, + { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "rank_vectors" + ] + }, + "element_type": { + "$ref": "#/components/schemas/_types.mapping.RankVectorElementType" + }, + "dims": { + "type": "number" + } + }, + "required": [ + "type" + ] + } + ] + }, + "_types.mapping.RankVectorElementType": { + "type": "string", + "enum": [ + "byte", + "float", + "bit" + ] + }, "_types.mapping.SemanticTextProperty": { "type": "object", "properties": { @@ -47505,18 +50607,22 @@ "properties": { "strategy": { "description": "The chunking strategy: `sentence` or `word`.", + "default": "sentence", "type": "string" }, "max_chunk_size": { "description": "The maximum size of a chunk in words.\nThis value cannot be higher than `300` or lower than `20` (for `sentence` strategy) or `10` (for `word` strategy).", + "default": 250.0, "type": "number" }, "overlap": { "description": "The number of overlapping words for chunks.\nIt is applicable only to a `word` chunking strategy.\nThis value cannot be higher than half the `max_chunk_size` value.", + "default": 100.0, "type": "number" }, "sentence_overlap": { "description": "The number of overlapping sentences for chunks.\nIt is applicable only for a `sentence` chunking strategy.\nIt can be either `1` or `0`.", + "default": 1.0, "type": "number" } }, @@ -47533,11 +50639,17 @@ { "type": "object", "properties": { + "store": { + "type": "boolean" + }, "type": { "type": "string", "enum": [ "sparse_vector" ] + }, + "index_options": { + "$ref": "#/components/schemas/_types.mapping.SparseVectorIndexOptions" } }, "required": [ @@ -47546,6 +50658,19 @@ } ] }, + "_types.mapping.SparseVectorIndexOptions": { + "type": "object", + "properties": { + "prune": { + "description": "Whether to perform pruning, omitting the non-significant tokens from the query to improve query performance.\nIf prune is true but the pruning_config is not specified, pruning will occur but default values will be used.\nDefault: false", + "x-state": "Generally available", + "type": "boolean" + }, + "pruning_config": { + "$ref": "#/components/schemas/_types.TokenPruningConfig" + } + } + }, "_types.mapping.CompletionProperty": { "allOf": [ { @@ -47844,6 +50969,9 @@ "enum": [ "geo_point" ] + }, + "time_series_metric": { + "$ref": "#/components/schemas/_types.mapping.GeoPointMetricType" } }, "required": [ @@ -47852,6 +50980,14 @@ } ] }, + "_types.mapping.GeoPointMetricType": { + "type": "string", + "enum": [ + "gauge", + "counter", + "position" + ] + }, "_types.mapping.GeoShapeProperty": { "description": "The `geo_shape` data type facilitates the indexing of and searching with arbitrary geo shapes such as rectangles\nand polygons.", "allOf": [ @@ -48034,6 +51170,7 @@ }, "time_series_dimension": { "description": "For internal use by Elastic only. Marks the field as a time series dimension. Defaults to false.", + "default": false, "x-state": "Technical preview", "type": "boolean" } @@ -48574,6 +51711,7 @@ }, "is_write_index": { "description": "If `true`, the index is the write index for the alias.", + "default": false, "type": "boolean" }, "routing": { @@ -48586,6 +51724,7 @@ }, "is_hidden": { "description": "If `true`, the alias is hidden.\nAll indices for the alias must have the same `is_hidden` value.", + "default": false, "x-state": "Generally available", "type": "boolean" } @@ -48654,6 +51793,7 @@ }, "enabled": { "description": "If defined, it turns data stream lifecycle on/off (`true`/`false`) for this data stream. A data stream lifecycle\nthat's disabled (enabled: `false`) will have no effect on the data stream.", + "default": true, "type": "boolean" } } @@ -48722,6 +51862,7 @@ "properties": { "enabled": { "description": "If defined, it turns the failure store on/off (`true`/`false`) for this data stream. A data stream failure store\nthat's disabled (enabled: `false`) will redirect no new failed indices to the failure store; however, it will\nnot remove any existing data from the failure store.", + "default": "true", "oneOf": [ { "type": "boolean" @@ -48764,6 +51905,7 @@ }, "enabled": { "description": "If defined, it turns data stream lifecycle on/off (`true`/`false`) for this data stream. A data stream lifecycle\nthat's disabled (enabled: `false`) will have no effect on the data stream.", + "default": true, "type": "boolean" } } @@ -49094,10 +52236,12 @@ }, "is_hidden": { "description": "If `true`, the alias is hidden.\nAll indices for the alias must have the same `is_hidden` value.", + "default": false, "type": "boolean" }, "is_write_index": { "description": "If `true`, the index is the write index for the alias.", + "default": false, "type": "boolean" }, "routing": { @@ -49980,13 +53124,6 @@ "scheduled" ] }, - "_types.OpType": { - "type": "string", - "enum": [ - "index", - "create" - ] - }, "_types.WriteResponseBase": { "type": "object", "properties": { @@ -50790,14 +53927,17 @@ }, "min_doc_count": { "description": "Specifies how many documents must contain a pair of terms before it is considered to be a useful connection.\nThis setting acts as a certainty threshold.", + "default": 3.0, "type": "number" }, "shard_min_doc_count": { "description": "Controls how many documents on a particular shard have to contain a pair of terms before the connection is returned for global consideration.", + "default": 2.0, "type": "number" }, "size": { "description": "Specifies the maximum number of vertex terms returned for each field.", + "default": 5.0, "type": "number" } }, @@ -50827,6 +53967,7 @@ }, "sample_size": { "description": "Each hop considers a sample of the best-matching documents on each shard.\nUsing samples improves the speed of execution and keeps exploration focused on meaningfully-connected terms.\nVery small values (less than 50) might not provide sufficient weight-of-evidence to identify significant connections between terms.\nVery large sample sizes can dilute the quality of the results and increase execution times.", + "default": 100.0, "type": "number" }, "timeout": { @@ -50902,7 +54043,14 @@ "weight" ] }, - "indices.add_block.IndicesBlockOptions": { + "_types.OpType": { + "type": "string", + "enum": [ + "index", + "create" + ] + }, + "indices._types.IndicesBlockOptions": { "type": "string", "enum": [ "metadata", @@ -50911,7 +54059,7 @@ "write" ] }, - "indices.add_block.IndicesBlockStatus": { + "indices.add_block.AddIndicesBlockStatus": { "type": "object", "properties": { "name": { @@ -51109,6 +54257,21 @@ } ] }, + "indices.delete_alias.IndicesAliasesResponseBody": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.AcknowledgedResponseBase" + }, + { + "type": "object", + "properties": { + "errors": { + "type": "boolean" + } + } + } + ] + }, "_types.DataStreamNames": { "oneOf": [ { @@ -51179,7 +54342,7 @@ "settings" ] }, - "indices.get_alias.IndexAliases": { + "indices.get_alias._types.IndexAliases": { "type": "object", "properties": { "aliases": { @@ -51401,6 +54564,7 @@ "properties": { "enabled": { "description": "If defined, it turns the failure store on/off (`true`/`false`) for this data stream. A data stream failure store\nthat's disabled (enabled: `false`) will redirect no new failed indices to the failure store; however, it will\nnot remove any existing data from the failure store.", + "default": true, "type": "boolean" }, "lifecycle": { @@ -51417,6 +54581,7 @@ }, "enabled": { "description": "If defined, it turns data stream lifecycle on/off (`true`/`false`) for this data stream. A data stream lifecycle\nthat's disabled (enabled: `false`) will have no effect on the data stream.", + "default": true, "type": "boolean" } } @@ -51540,10 +54705,12 @@ "properties": { "hidden": { "description": "If true, the data stream is hidden.", + "default": false, "type": "boolean" }, "allow_custom_routing": { "description": "If true, the data stream supports custom routing.", + "default": false, "type": "boolean" } } @@ -51707,6 +54874,23 @@ } } }, + "indices.remove_block.RemoveIndicesBlockStatus": { + "type": "object", + "properties": { + "name": { + "$ref": "#/components/schemas/_types.IndexName" + }, + "unblocked": { + "type": "boolean" + }, + "exception": { + "$ref": "#/components/schemas/_types.ErrorCause" + } + }, + "required": [ + "name" + ] + }, "indices.resolve_index.ResolveIndexItem": { "type": "object", "properties": { @@ -51911,6 +55095,7 @@ }, "is_hidden": { "description": "If `true`, the alias is hidden.", + "default": false, "type": "boolean" }, "is_write_index": { @@ -51925,6 +55110,7 @@ }, "must_exist": { "description": "If `true`, the alias must exist to perform the action.", + "default": false, "type": "boolean" } } @@ -51957,6 +55143,7 @@ }, "must_exist": { "description": "If `true`, the alias must exist to perform the action.", + "default": false, "type": "boolean" } } @@ -51972,6 +55159,7 @@ }, "must_exist": { "description": "If `true`, the alias must exist to perform the action.", + "default": false, "type": "boolean" } } @@ -52341,18 +55529,22 @@ "properties": { "max_chunk_size": { "description": "The maximum size of a chunk in words.\nThis value cannot be higher than `300` or lower than `20` (for `sentence` strategy) or `10` (for `word` strategy).", + "default": 250.0, "type": "number" }, "overlap": { "description": "The number of overlapping words for chunks.\nIt is applicable only to a `word` chunking strategy.\nThis value cannot be higher than half the `max_chunk_size` value.", + "default": 100.0, "type": "number" }, "sentence_overlap": { "description": "The number of overlapping sentences for chunks.\nIt is applicable only for a `sentence` chunking strategy.\nIt can be either `1` or `0`.", + "default": 1.0, "type": "number" }, "strategy": { "description": "The chunking strategy: `sentence` or `word`.", + "default": "sentence", "type": "string" } } @@ -52643,6 +55835,7 @@ "properties": { "max_new_tokens": { "description": "For a `completion` task, it sets the maximum number for the output tokens to be generated.", + "default": 64.0, "type": "number" }, "temperature": { @@ -52835,6 +56028,7 @@ }, "max_new_tokens": { "description": "For a `completion` task, provide a hint for the maximum number of output tokens to be generated.", + "default": 64.0, "type": "number" }, "temperature": { @@ -53105,6 +56299,182 @@ "completion" ] }, + "inference._types.CustomTaskType": { + "type": "string", + "enum": [ + "text_embedding", + "sparse_embedding", + "rerank", + "completion" + ] + }, + "inference._types.CustomServiceType": { + "type": "string", + "enum": [ + "custom" + ] + }, + "inference._types.CustomServiceSettings": { + "type": "object", + "properties": { + "headers": { + "description": "Specifies the HTTPS header parameters – such as `Authentication` or `Contet-Type` – that are required to access the custom service.\nFor example:\n```\n\"headers\":{\n \"Authorization\": \"Bearer ${api_key}\",\n \"Content-Type\": \"application/json;charset=utf-8\"\n}\n```", + "type": "object" + }, + "input_type": { + "description": "Specifies the input type translation values that are used to replace the `${input_type}` template in the request body.\nFor example:\n```\n\"input_type\": {\n \"translation\": {\n \"ingest\": \"do_ingest\",\n \"search\": \"do_search\"\n },\n \"default\": \"a_default\"\n},\n```\nIf the subsequent inference requests come from a search context, the `search` key will be used and the template will be replaced with `do_search`.\nIf it comes from the ingest context `do_ingest` is used. If it's a different context that is not specified, the default value will be used. If no default is specified an empty string is used.\n`translation` can be:\n* `classification`\n* `clustering`\n* `ingest`\n* `search`", + "type": "object" + }, + "query_parameters": { + "description": "Specifies the query parameters as a list of tuples. The arrays inside the `query_parameters` must have two items, a key and a value.\nFor example:\n```\n\"query_parameters\":[\n [\"param_key\", \"some_value\"],\n [\"param_key\", \"another_value\"],\n [\"other_key\", \"other_value\"]\n]\n```\nIf the base url is `https://www.elastic.co` it results in: `https://www.elastic.co?param_key=some_value¶m_key=another_value&other_key=other_value`.", + "type": "object" + }, + "request": { + "$ref": "#/components/schemas/inference._types.CustomRequestParams" + }, + "response": { + "$ref": "#/components/schemas/inference._types.CustomResponseParams" + }, + "secret_parameters": { + "description": "Specifies secret parameters, like `api_key` or `api_token`, that are required to access the custom service.\nFor example:\n```\n\"secret_parameters\":{\n \"api_key\":\"\"\n}\n```", + "type": "object" + }, + "url": { + "description": "The URL endpoint to use for the requests.", + "type": "string" + } + }, + "required": [ + "request", + "response", + "secret_parameters" + ] + }, + "inference._types.CustomRequestParams": { + "type": "object", + "properties": { + "content": { + "description": "The body structure of the request. It requires passing in the string-escaped result of the JSON format HTTP request body.\nFor example:\n```\n\"request\": \"{\\\"input\\\":${input}}\"\n```\n> info\n> The content string needs to be a single line except when using the Kibana console.", + "type": "string" + } + }, + "required": [ + "content" + ] + }, + "inference._types.CustomResponseParams": { + "type": "object", + "properties": { + "json_parser": { + "description": "Specifies the JSON parser that is used to parse the response from the custom service.\nDifferent task types require different json_parser parameters.\nFor example:\n```\n# text_embedding\n# For a response like this:\n\n{\n \"object\": \"list\",\n \"data\": [\n {\n \"object\": \"embedding\",\n \"index\": 0,\n \"embedding\": [\n 0.014539449,\n -0.015288644\n ]\n }\n ],\n \"model\": \"text-embedding-ada-002-v2\",\n \"usage\": {\n \"prompt_tokens\": 8,\n \"total_tokens\": 8\n }\n}\n\n# the json_parser definition should look like this:\n\n\"response\":{\n \"json_parser\":{\n \"text_embeddings\":\"$.data[*].embedding[*]\"\n }\n}\n\n# sparse_embedding\n# For a response like this:\n\n{\n \"request_id\": \"75C50B5B-E79E-4930-****-F48DBB392231\",\n \"latency\": 22,\n \"usage\": {\n \"token_count\": 11\n },\n \"result\": {\n \"sparse_embeddings\": [\n {\n \"index\": 0,\n \"embedding\": [\n {\n \"token_id\": 6,\n \"weight\": 0.101\n },\n {\n \"token_id\": 163040,\n \"weight\": 0.28417\n }\n ]\n }\n ]\n }\n}\n\n# the json_parser definition should look like this:\n\n\"response\":{\n \"json_parser\":{\n \"token_path\":\"$.result.sparse_embeddings[*].embedding[*].token_id\",\n \"weight_path\":\"$.result.sparse_embeddings[*].embedding[*].weight\"\n }\n}\n\n# rerank\n# For a response like this:\n\n{\n \"results\": [\n {\n \"index\": 3,\n \"relevance_score\": 0.999071,\n \"document\": \"abc\"\n },\n {\n \"index\": 4,\n \"relevance_score\": 0.7867867,\n \"document\": \"123\"\n },\n {\n \"index\": 0,\n \"relevance_score\": 0.32713068,\n \"document\": \"super\"\n }\n ],\n}\n\n# the json_parser definition should look like this:\n\n\"response\":{\n \"json_parser\":{\n \"reranked_index\":\"$.result.scores[*].index\", // optional\n \"relevance_score\":\"$.result.scores[*].score\",\n \"document_text\":\"xxx\" // optional\n }\n}\n\n# completion\n# For a response like this:\n\n{\n \"id\": \"chatcmpl-B9MBs8CjcvOU2jLn4n570S5qMJKcT\",\n \"object\": \"chat.completion\",\n \"created\": 1741569952,\n \"model\": \"gpt-4.1-2025-04-14\",\n \"choices\": [\n {\n \"index\": 0,\n \"message\": {\n \"role\": \"assistant\",\n \"content\": \"Hello! How can I assist you today?\",\n \"refusal\": null,\n \"annotations\": []\n },\n \"logprobs\": null,\n \"finish_reason\": \"stop\"\n }\n ]\n}\n\n# the json_parser definition should look like this:\n\n\"response\":{\n \"json_parser\":{\n \"completion_result\":\"$.choices[*].message.content\"\n }\n}", + "type": "object" + } + }, + "required": [ + "json_parser" + ] + }, + "inference._types.CustomTaskSettings": { + "type": "object", + "properties": { + "parameters": { + "description": "Specifies parameters that are required to run the custom service. The parameters depend on the model your custom service uses.\nFor example:\n```\n\"task_settings\":{\n \"parameters\":{\n \"input_type\":\"query\",\n \"return_token\":true\n }\n}\n```", + "type": "object" + } + } + }, + "inference._types.InferenceEndpointInfoCustom": { + "allOf": [ + { + "$ref": "#/components/schemas/inference._types.InferenceEndpoint" + }, + { + "type": "object", + "properties": { + "inference_id": { + "description": "The inference Id", + "type": "string" + }, + "task_type": { + "$ref": "#/components/schemas/inference._types.TaskTypeCustom" + } + }, + "required": [ + "inference_id", + "task_type" + ] + } + ] + }, + "inference._types.TaskTypeCustom": { + "type": "string", + "enum": [ + "text_embedding", + "sparse_embedding", + "rerank", + "completion" + ] + }, + "inference._types.TaskTypeDeepSeek": { + "type": "string", + "enum": [ + "completion", + "chat_completion" + ] + }, + "inference._types.DeepSeekServiceType": { + "type": "string", + "enum": [ + "deepseek" + ] + }, + "inference._types.DeepSeekServiceSettings": { + "type": "object", + "properties": { + "api_key": { + "externalDocs": { + "url": "https://api-docs.deepseek.com/" + }, + "description": "A valid API key for your DeepSeek account.\nYou can find or create your DeepSeek API keys on the DeepSeek API key page.\n\nIMPORTANT: You need to provide the API key only once, during the inference model creation.\nThe get inference endpoint API does not retrieve your API key.\nAfter creating the inference model, you cannot change the associated API key.\nIf you want to use a different API key, delete the inference model and recreate it with the same name and the updated API key.", + "type": "string" + }, + "model_id": { + "description": "For a `completion` or `chat_completion` task, the name of the model to use for the inference task.\n\nFor the available `completion` and `chat_completion` models, refer to the [DeepSeek Models & Pricing docs](https://api-docs.deepseek.com/quick_start/pricing).", + "type": "string" + }, + "url": { + "description": "The URL endpoint to use for the requests. Defaults to `https://api.deepseek.com/chat/completions`.", + "type": "string" + } + }, + "required": [ + "api_key", + "model_id" + ] + }, + "inference._types.InferenceEndpointInfoDeepSeek": { + "allOf": [ + { + "$ref": "#/components/schemas/inference._types.InferenceEndpoint" + }, + { + "type": "object", + "properties": { + "inference_id": { + "description": "The inference Id", + "type": "string" + }, + "task_type": { + "$ref": "#/components/schemas/inference._types.TaskTypeDeepSeek" + } + }, + "required": [ + "inference_id", + "task_type" + ] + } + ] + }, "inference._types.ElasticsearchTaskType": { "type": "string", "enum": [ @@ -53155,6 +56525,7 @@ "properties": { "enabled": { "description": "Turn on `adaptive_allocations`.", + "default": false, "type": "boolean" }, "max_number_of_allocations": { @@ -53172,6 +56543,7 @@ "properties": { "return_documents": { "description": "For a `rerank` task, return the document instead of only the index.", + "default": true, "type": "boolean" } } @@ -53738,6 +57110,7 @@ }, "url": { "description": "The URL endpoint to use for the requests.\nIt can be changed for testing purposes.", + "default": "https://api.openai.com/v1/embeddings.", "type": "string" } }, @@ -53840,6 +57213,7 @@ }, "return_documents": { "description": "Whether to return the source documents in the response.\nOnly for the `rerank` task type.", + "default": false, "type": "boolean" }, "top_k": { @@ -53848,6 +57222,7 @@ }, "truncation": { "description": "Whether to truncate the input texts to fit within the context length.", + "default": true, "type": "boolean" } } @@ -54059,7 +57434,7 @@ "$ref": "#/components/schemas/_types.VersionString" }, "number": { - "description": "The Elasticsearch version number.", + "description": "The Elasticsearch version number.\n\n::: IMPORTANT: For Serverless deployments, this static value is always `8.11.0` and is used solely for backward compatibility with legacy clients.\n Serverless environments are versionless and automatically upgraded, so this value can be safely ignored.", "type": "string" } }, @@ -54101,6 +57476,7 @@ }, "deprecated": { "description": "Marks this ingest pipeline as deprecated.\nWhen a deprecated ingest pipeline is referenced as the default or final pipeline when creating or updating a non-deprecated index template, Elasticsearch will emit a deprecation warning.", + "default": false, "type": "boolean" }, "_meta": { @@ -54277,6 +57653,7 @@ }, "allow_duplicates": { "description": "If `false`, the processor does not append values already present in the field.", + "default": true, "type": "boolean" } }, @@ -54327,10 +57704,12 @@ }, "ignore_missing": { "description": "If `true` and field does not exist, the processor quietly exits without modifying the document.", + "default": false, "type": "boolean" }, "indexed_chars": { "description": "The number of chars being used for extraction to prevent huge fields.\nUse `-1` for no limit.", + "default": 100000.0, "type": "number" }, "indexed_chars_field": { @@ -54348,6 +57727,7 @@ }, "remove_binary": { "description": "If true, the binary field will be removed from the document", + "default": false, "type": "boolean" }, "resource_name": { @@ -54374,6 +57754,7 @@ }, "ignore_missing": { "description": "If `true` and `field` does not exist or is `null`, the processor quietly exits without modifying the document.", + "default": false, "type": "boolean" }, "target_field": { @@ -54403,6 +57784,7 @@ }, "ignore_missing": { "description": "If `true` and `field` does not exist, the processor quietly exits without modifying the document.", + "default": false, "type": "boolean" }, "shape_type": { @@ -54464,10 +57846,12 @@ }, "seed": { "description": "Seed for the community ID hash. Must be between 0 and 65535 (inclusive). The\nseed can prevent hash collisions between network domains, such as a staging\nand production network that use the same addressing scheme.", + "default": 0.0, "type": "number" }, "ignore_missing": { "description": "If true and any required fields are missing, the processor quietly exits\nwithout modifying the document.", + "default": true, "type": "boolean" } } @@ -54487,6 +57871,7 @@ }, "ignore_missing": { "description": "If `true` and `field` does not exist or is `null`, the processor quietly exits without modifying the document.", + "default": false, "type": "boolean" }, "target_field": { @@ -54537,10 +57922,12 @@ }, "quote": { "description": "Quote used in CSV, has to be single character string.", + "default": "\"", "type": "string" }, "separator": { "description": "Separator used in CSV, has to be single character string.", + "default": ",", "type": "string" }, "target_fields": { @@ -54578,6 +57965,7 @@ }, "locale": { "description": "The locale to use when parsing the date, relevant when parsing month names or week days.\nSupports template snippets.", + "default": "ENGLISH", "type": "string" }, "target_field": { @@ -54585,10 +57973,12 @@ }, "timezone": { "description": "The timezone to use when parsing the date.\nSupports template snippets.", + "default": "UTC", "type": "string" }, "output_format": { "description": "The format to use when writing the date to target_field. Must be a valid\njava time pattern.", + "default": "yyyy-MM-dd'T'HH:mm:ss.SSSXXX", "type": "string" } }, @@ -54623,6 +58013,7 @@ }, "index_name_format": { "description": "The format to be used when printing the parsed date into the index name.\nA valid java time pattern is expected here.\nSupports template snippets.", + "default": "yyyy-MM-dd", "type": "string" }, "index_name_prefix": { @@ -54631,10 +58022,12 @@ }, "locale": { "description": "The locale to use when parsing the date from the document being preprocessed, relevant when parsing month names or week days.", + "default": "ENGLISH", "type": "string" }, "timezone": { "description": "The timezone to use when parsing the date and when date math index supports resolves expressions into concrete index names.", + "default": "UTC", "type": "string" } }, @@ -54655,6 +58048,7 @@ "properties": { "append_separator": { "description": "The character(s) that separate the appended fields.", + "default": "\"\"", "type": "string" }, "field": { @@ -54662,6 +58056,7 @@ }, "ignore_missing": { "description": "If `true` and `field` does not exist or is `null`, the processor quietly exits without modifying the document.", + "default": false, "type": "boolean" }, "pattern": { @@ -54689,6 +58084,7 @@ }, "override": { "description": "Controls the behavior when there is already an existing nested object that conflicts with the expanded field.\nWhen `false`, the processor will merge conflicts by combining the old and the new values into an array.\nWhen `true`, the value from the expanded field will overwrite the existing value.", + "default": false, "type": "boolean" }, "path": { @@ -54725,14 +58121,17 @@ }, "ignore_missing": { "description": "If `true` and `field` does not exist, the processor quietly exits without modifying the document.", + "default": false, "type": "boolean" }, "max_matches": { "description": "The maximum number of matched documents to include under the configured target field.\nThe `target_field` will be turned into a json array if `max_matches` is higher than 1, otherwise `target_field` will become a json object.\nIn order to avoid documents getting too large, the maximum allowed value is 128.", + "default": 1.0, "type": "number" }, "override": { "description": "If processor will update fields with pre-existing non-null-valued field.\nWhen set to `false`, such fields will not be touched.", + "default": true, "type": "boolean" }, "policy_name": { @@ -54805,6 +58204,7 @@ }, "ignore_missing": { "description": "If true, the processor ignores any missing fields. If all fields are\nmissing, the processor silently exits without modifying the document.", + "default": false, "type": "boolean" } }, @@ -54837,6 +58237,7 @@ }, "ignore_missing": { "description": "If `true`, the processor silently exits without changing the document if the `field` is `null` or missing.", + "default": false, "type": "boolean" }, "processor": { @@ -54860,6 +58261,7 @@ "properties": { "database_file": { "description": "The database filename referring to a database the module ships with (GeoLite2-City.mmdb, GeoLite2-Country.mmdb, or GeoLite2-ASN.mmdb) or a custom database in the ingest-geoip config directory.", + "default": "GeoLite2-City.mmdb", "type": "string" }, "field": { @@ -54867,10 +58269,12 @@ }, "first_only": { "description": "If `true`, only the first found IP location data will be returned, even if the field contains an array.", + "default": true, "type": "boolean" }, "ignore_missing": { "description": "If `true` and `field` does not exist, the processor quietly exits without modifying the document.", + "default": false, "type": "boolean" }, "properties": { @@ -54926,6 +58330,7 @@ }, "ignore_missing": { "description": "If `true` and `field` does not exist, the processor quietly exits without modifying the document.", + "default": false, "type": "boolean" }, "target_format": { @@ -54964,6 +58369,7 @@ "properties": { "database_file": { "description": "The database filename referring to a database the module ships with (GeoLite2-City.mmdb, GeoLite2-Country.mmdb, or GeoLite2-ASN.mmdb) or a custom database in the ingest-geoip config directory.", + "default": "GeoLite2-City.mmdb", "type": "string" }, "field": { @@ -54971,10 +58377,12 @@ }, "first_only": { "description": "If `true`, only the first found geoip data will be returned, even if the field contains an array.", + "default": true, "type": "boolean" }, "ignore_missing": { "description": "If `true` and `field` does not exist, the processor quietly exits without modifying the document.", + "default": false, "type": "boolean" }, "properties": { @@ -55008,6 +58416,7 @@ "properties": { "ecs_compatibility": { "description": "Must be disabled or v1. If v1, the processor uses patterns with Elastic\nCommon Schema (ECS) field names.", + "default": "disabled", "type": "string" }, "field": { @@ -55015,6 +58424,7 @@ }, "ignore_missing": { "description": "If `true` and `field` does not exist or is `null`, the processor quietly exits without modifying the document.", + "default": false, "type": "boolean" }, "pattern_definitions": { @@ -55033,6 +58443,7 @@ }, "trace_match": { "description": "When `true`, `_ingest._grok_match_index` will be inserted into your matched document’s metadata with the index into the pattern found in `patterns` that matched.", + "default": false, "type": "boolean" } }, @@ -55059,6 +58470,7 @@ }, "ignore_missing": { "description": "If `true` and `field` does not exist or is `null`, the processor quietly exits without modifying the document.", + "default": false, "type": "boolean" }, "pattern": { @@ -55094,6 +58506,7 @@ }, "ignore_missing": { "description": "If `true` and `field` does not exist or is `null`, the processor quietly exits without modifying the document,", + "default": false, "type": "boolean" }, "target_field": { @@ -55176,6 +58589,7 @@ }, "num_top_feature_importance_values": { "description": "Specifies the maximum number of feature importance values per document.", + "default": 0.0, "type": "number" } } @@ -55185,10 +58599,12 @@ "properties": { "num_top_classes": { "description": "Specifies the number of top class predictions to return.", + "default": 0.0, "type": "number" }, "num_top_feature_importance_values": { "description": "Specifies the maximum number of feature importance values per document.", + "default": 0.0, "type": "number" }, "results_field": { @@ -55254,6 +58670,7 @@ "properties": { "add_to_root": { "description": "Flag that forces the parsed JSON to be added at the top level of the document.\n`target_field` must not be set when this option is chosen.", + "default": false, "type": "boolean" }, "add_to_root_conflict_strategy": { @@ -55261,6 +58678,7 @@ }, "allow_duplicate_keys": { "description": "When set to `true`, the JSON parser will not fail if the JSON contains duplicate keys.\nInstead, the last encountered value for any duplicate key wins.", + "default": false, "type": "boolean" }, "field": { @@ -55307,6 +58725,7 @@ }, "ignore_missing": { "description": "If `true` and `field` does not exist or is `null`, the processor quietly exits without modifying the document.", + "default": false, "type": "boolean" }, "include_keys": { @@ -55318,10 +58737,12 @@ }, "prefix": { "description": "Prefix to be added to extracted keys.", + "default": "null", "type": "string" }, "strip_brackets": { "description": "If `true`. strip brackets `()`, `<>`, `[]` as well as quotes `'` and `\"` from extracted values.", + "default": false, "type": "boolean" }, "target_field": { @@ -55361,6 +58782,7 @@ }, "ignore_missing": { "description": "If `true` and `field` does not exist or is `null`, the processor quietly exits without modifying the document.", + "default": false, "type": "boolean" }, "target_field": { @@ -55402,6 +58824,7 @@ }, "ignore_missing": { "description": "If true and any required fields are missing, the processor quietly exits\nwithout modifying the document.", + "default": true, "type": "boolean" } } @@ -55421,6 +58844,7 @@ }, "ignore_missing_pipeline": { "description": "Whether to ignore missing pipelines instead of failing.", + "default": false, "type": "boolean" } }, @@ -55456,22 +58880,27 @@ }, "prefix": { "description": "Start a redacted section with this token", + "default": "<", "type": "string" }, "suffix": { "description": "End a redacted section with this token", + "default": ">", "type": "string" }, "ignore_missing": { "description": "If `true` and `field` does not exist or is `null`, the processor quietly exits without modifying the document.", + "default": false, "type": "boolean" }, "skip_if_unlicensed": { "description": "If `true` and the current license does not support running redact processors, then the processor quietly exits without modifying the document", + "default": false, "type": "boolean" }, "trace_redact": { "description": "If `true` then ingest metadata `_ingest._redact._is_redacted` is set to `true` if the document has been redacted", + "default": false, "x-state": "Generally available", "type": "boolean" } @@ -55499,6 +58928,7 @@ }, "ignore_missing": { "description": "If true and any required fields are missing, the processor quietly exits\nwithout modifying the document.", + "default": true, "type": "boolean" } }, @@ -55524,6 +58954,7 @@ }, "ignore_missing": { "description": "If `true` and `field` does not exist or is `null`, the processor quietly exits without modifying the document.", + "default": false, "type": "boolean" } }, @@ -55546,6 +58977,7 @@ }, "ignore_missing": { "description": "If `true` and `field` does not exist, the processor quietly exits without modifying the document.", + "default": false, "type": "boolean" }, "target_field": { @@ -55647,6 +59079,7 @@ }, "ignore_empty_value": { "description": "If `true` and `value` is a template snippet that evaluates to `null` or the empty string, the processor quietly exits without modifying the document.", + "default": false, "type": "boolean" }, "media_type": { @@ -55655,6 +59088,7 @@ }, "override": { "description": "If `true` processor will update fields with pre-existing non-null-valued field.\nWhen set to `false`, such fields will not be touched.", + "default": true, "type": "boolean" }, "value": { @@ -55730,10 +59164,12 @@ }, "ignore_missing": { "description": "If `true` and `field` does not exist, the processor quietly exits without modifying the document.", + "default": false, "type": "boolean" }, "preserve_trailing": { "description": "Preserves empty trailing fields, if any.", + "default": false, "type": "boolean" }, "separator": { @@ -55774,6 +59210,7 @@ }, "ignore_missing": { "description": "If `true` and `field` does not exist, the processor quietly exits without modifying the document.", + "default": false, "type": "boolean" }, "target_field": { @@ -55799,6 +59236,7 @@ }, "ignore_missing": { "description": "If `true` and `field` does not exist or is `null`, the processor quietly exits without modifying the document.", + "default": false, "type": "boolean" }, "target_field": { @@ -55824,6 +59262,7 @@ }, "ignore_missing": { "description": "If `true` and `field` does not exist or is `null`, the processor quietly exits without modifying the document.", + "default": false, "type": "boolean" }, "target_field": { @@ -55849,14 +59288,17 @@ }, "ignore_missing": { "description": "If `true` and `field` does not exist, the processor quietly exits without modifying the document.", + "default": false, "type": "boolean" }, "keep_original": { "description": "If `true`, the processor copies the unparsed URI to `.original`.", + "default": true, "type": "boolean" }, "remove_if_successful": { "description": "If `true`, the processor removes the `field` after parsing the URI string.\nIf parsing fails, the processor does not remove the `field`.", + "default": false, "type": "boolean" }, "target_field": { @@ -55882,6 +59324,7 @@ }, "ignore_missing": { "description": "If `true` and `field` does not exist, the processor quietly exits without modifying the document.", + "default": false, "type": "boolean" }, "regex_file": { @@ -55893,6 +59336,18 @@ }, "properties": { "description": "Controls what properties are added to `target_field`.", + "default": [ + "name", + "major", + "minor", + "patch", + "build", + "os", + "os_name", + "os_major", + "os_minor", + "device" + ], "type": "array", "items": { "$ref": "#/components/schemas/ingest._types.UserAgentProperty" @@ -55900,6 +59355,7 @@ }, "extract_device_type": { "description": "Extracts device type from the user agent string on a best-effort basis.", + "default": false, "x-state": "Generally available", "type": "boolean" } @@ -56432,6 +59888,7 @@ }, "use_null": { "description": "Defines whether a new series is used as the null series when there is no value for the by or partition fields.", + "default": false, "type": "boolean" } } @@ -56441,6 +59898,9 @@ "properties": { "actions": { "description": "The set of actions to be triggered when the rule applies. If more than one action is specified the effects of all actions are combined.", + "default": [ + "skip_result" + ], "type": "array", "items": { "$ref": "#/components/schemas/ml._types.RuleAction" @@ -57037,10 +60497,12 @@ }, "skip_result": { "description": "When true the model will not create results for this calendar period.", + "default": true, "type": "boolean" }, "skip_model_update": { "description": "When true the model will not be updated for this calendar period.", + "default": true, "type": "boolean" }, "force_time_shift": { @@ -57059,10 +60521,12 @@ "properties": { "from": { "description": "Skips the specified number of items.", + "default": 0.0, "type": "number" }, "size": { "description": "Specifies the maximum number of items to obtain.", + "default": 10000.0, "type": "number" } } @@ -57169,6 +60633,7 @@ }, "num_top_classes": { "description": "Defines the number of categories for which the predicted probabilities are reported. It must be non-negative or -1. If it is -1 or greater than the total number of categories, probabilities are reported for all categories; if you have a large number of categories, there could be a significant effect on the size of your destination index. NOTE: To use the AUC ROC evaluation method, `num_top_classes` must be set to -1 or a value greater than or equal to the total number of categories.", + "default": 2.0, "type": "number" } } @@ -57192,6 +60657,7 @@ }, "early_stopping_enabled": { "description": "Advanced configuration option. Specifies whether the training process should finish if it is not finding any better performing models. If disabled, the training process can take significantly longer and the chance of finding a better performing model is unremarkable.", + "default": true, "type": "boolean" }, "eta": { @@ -57231,6 +60697,7 @@ }, "num_top_feature_importance_values": { "description": "Advanced configuration option. Specifies the maximum number of feature importance values per document to return. By default, no feature importance calculation occurs.", + "default": 0.0, "type": "number" }, "prediction_field_name": { @@ -57409,14 +60876,17 @@ "properties": { "compute_feature_influence": { "description": "Specifies whether the feature influence calculation is enabled.", + "default": true, "type": "boolean" }, "feature_influence_threshold": { "description": "The minimum outlier score that a document needs to have in order to calculate its feature influence score. Value range: 0-1.", + "default": 0.1, "type": "number" }, "method": { "description": "The method that outlier detection uses. Available methods are `lof`, `ldof`, `distance_kth_nn`, `distance_knn`, and `ensemble`. The default value is ensemble, which means that outlier detection uses an ensemble of different methods and normalises and combines their individual outlier scores to obtain the overall outlier score.", + "default": "ensemble", "type": "string" }, "n_neighbors": { @@ -57429,6 +60899,7 @@ }, "standardization_enabled": { "description": "If true, the following operation is performed on the columns before computing outlier scores: `(x_i - mean(x_i)) / sd(x_i)`.", + "default": true, "type": "boolean" } } @@ -57443,6 +60914,7 @@ "properties": { "loss_function": { "description": "The loss function used during regression. Available options are `mse` (mean squared error), `msle` (mean squared logarithmic error), `huber` (Pseudo-Huber loss).", + "default": "mse", "type": "string" }, "loss_function_parameter": { @@ -57743,10 +61215,12 @@ "properties": { "compute_feature_influence": { "description": "Specifies whether the feature influence calculation is enabled.", + "default": true, "type": "boolean" }, "feature_influence_threshold": { "description": "The minimum outlier score that a document needs to have in order to calculate its feature influence score.\nValue range: 0-1", + "default": 0.1, "type": "number" }, "method": { @@ -57763,6 +61237,7 @@ }, "standardization_enabled": { "description": "If `true`, the following operation is performed on the columns before computing outlier scores: (x_i - mean(x_i)) / sd(x_i).", + "default": true, "type": "boolean" } } @@ -58110,10 +61585,12 @@ }, "ignore_unavailable": { "description": "If true, missing or closed indices are not included in the response.", + "default": false, "type": "boolean" }, "ignore_throttled": { "description": "If true, concrete, expanded or aliased indices are ignored when frozen.", + "default": true, "type": "boolean" } } @@ -58464,6 +61941,7 @@ }, "daily_model_snapshot_retention_after_days": { "description": "Advanced configuration option, which affects the automatic removal of old model snapshots for this job.\nIt specifies a period of time (in days) after which only the first snapshot per day is retained.\nThis period is relative to the timestamp of the most recent snapshot for this job.\nValid values range from 0 to `model_snapshot_retention_days`.", + "default": 1.0, "type": "number" }, "data_description": { @@ -58536,6 +62014,7 @@ "properties": { "categorization_examples_limit": { "description": "The maximum number of examples stored per category in memory and in the results data store. If you increase this value, more examples are available, however it requires that you have more storage available. If you set this value to 0, no examples are stored. NOTE: The `categorization_examples_limit` applies only to analysis that uses categorization.", + "default": 4.0, "type": "number" }, "model_memory_limit": { @@ -58581,6 +62060,7 @@ }, "time_format": { "description": "The time format, which can be `epoch`, `epoch_ms`, or a custom pattern. The value `epoch` refers to UNIX or Epoch time (the number of seconds since 1 Jan 1970). The value `epoch_ms` indicates that time is measured in milliseconds since the epoch. The `epoch` and `epoch_ms` time formats accept either integer or real values. Custom patterns must conform to the Java DateTimeFormatter class. When you use date-time formatting patterns, it is recommended that you provide the full date, time and time zone. For example: `yyyy-MM-dd'T'HH:mm:ssX`. If the pattern that you specify is not sufficient to produce a complete timestamp, job creation fails.", + "default": "epoch", "type": "string" }, "field_delimiter": { @@ -58593,11 +62073,13 @@ "properties": { "annotations_enabled": { "description": "If true, enables calculation and storage of the model change annotations for each entity that is being analyzed.", + "default": true, "x-state": "Generally available", "type": "boolean" }, "enabled": { "description": "If true, enables calculation and storage of the model bounds for each entity that is being analyzed.", + "default": false, "type": "boolean" }, "terms": { @@ -58880,14 +62362,17 @@ "properties": { "do_lower_case": { "description": "Should the tokenizer lower case the text", + "default": false, "type": "boolean" }, "max_sequence_length": { "description": "Maximum input sequence length for the model", + "default": 512.0, "type": "number" }, "span": { "description": "Tokenization spanning options. Special value of -1 indicates no spanning takes place", + "default": -1.0, "type": "number" }, "truncate": { @@ -58895,6 +62380,7 @@ }, "with_special_tokens": { "description": "Is tokenization completed with special tokens", + "default": true, "type": "boolean" } } @@ -58918,6 +62404,7 @@ "properties": { "add_prefix_space": { "description": "Should the tokenizer prefix input with a space character", + "default": false, "type": "boolean" } } @@ -58954,6 +62441,7 @@ }, "hypothesis_template": { "description": "Hypothesis template used when tokenizing labels for prediction", + "default": "\"This example is {}.\"", "type": "string" }, "classification_labels": { @@ -58969,6 +62457,7 @@ }, "multi_label": { "description": "Indicates if more than one true label exists.", + "default": false, "type": "boolean" }, "labels": { @@ -60134,6 +63623,7 @@ }, "scroll_size": { "description": "The size parameter that is used in Elasticsearch searches when the datafeed does not use aggregations. The maximum value is the value of `index.max_result_window`, which is 10,000 by default.", + "default": 1000.0, "type": "number" } } @@ -60143,6 +63633,7 @@ "properties": { "allow_lazy_open": { "description": "Advanced configuration option. Specifies whether this job can open when there is insufficient machine learning node capacity for it to be immediately assigned to a node.", + "default": false, "type": "boolean" }, "analysis_config": { @@ -60159,6 +63650,7 @@ }, "daily_model_snapshot_retention_after_days": { "description": "Advanced configuration option, which affects the automatic removal of old model snapshots for this job.\nIt specifies a period of time (in days) after which only the first snapshot per day is retained.\nThis period is relative to the timestamp of the most recent snapshot for this job.", + "default": 1.0, "type": "number" }, "data_description": { @@ -60190,6 +63682,7 @@ }, "model_snapshot_retention_days": { "description": "Advanced configuration option, which affects the automatic removal of old model snapshots for this job.\nIt specifies the maximum period of time (in days) that snapshots are retained.\nThis period is relative to the timestamp of the most recent snapshot for this job.\nThe default value is `10`, which means snapshots ten days older than the newest snapshot are deleted.", + "default": 10.0, "type": "number" }, "renormalization_window_days": { @@ -60320,6 +63813,7 @@ }, "use_null": { "description": "Defines whether a new series is used as the null series when there is no value for the by or partition fields.", + "default": false, "type": "boolean" } }, @@ -60933,6 +64427,7 @@ "properties": { "explain": { "description": "If `true`, returns detailed information about score calculation as part of each hit.", + "default": false, "type": "boolean" }, "id": { @@ -60947,6 +64442,7 @@ }, "profile": { "description": "If `true`, the query execution is profiled.", + "default": false, "type": "boolean" }, "source": { @@ -60972,6 +64468,7 @@ }, "field_statistics": { "description": "If `true`, the response includes the document count, sum of document frequencies, and sum of total term frequencies.", + "default": true, "type": "boolean" }, "filter": { @@ -60979,14 +64476,17 @@ }, "offsets": { "description": "If `true`, the response includes term offsets.", + "default": true, "type": "boolean" }, "payloads": { "description": "If `true`, the response includes term payloads.", + "default": true, "type": "boolean" }, "positions": { "description": "If `true`, the response includes term positions.", + "default": true, "type": "boolean" }, "routing": { @@ -60994,6 +64494,7 @@ }, "term_statistics": { "description": "If true, the response includes term frequency and document frequency.", + "default": false, "type": "boolean" }, "version": { @@ -61013,6 +64514,7 @@ }, "max_num_terms": { "description": "The maximum number of terms that must be returned per field.", + "default": 25.0, "type": "number" }, "max_term_freq": { @@ -61021,18 +64523,22 @@ }, "max_word_length": { "description": "The maximum word length above which words will be ignored.\nDefaults to unbounded.", + "default": 0.0, "type": "number" }, "min_doc_freq": { "description": "Ignore terms which do not occur in at least this many docs.", + "default": 1.0, "type": "number" }, "min_term_freq": { "description": "Ignore words with less than this frequency in the source doc.", + "default": 1.0, "type": "number" }, "min_word_length": { "description": "The minimum word length below which words will be ignored.", + "default": 0.0, "type": "number" } } @@ -61416,6 +64922,7 @@ "properties": { "ignore_unlabeled": { "description": "Controls how unlabeled documents in the search results are counted. If set to true, unlabeled documents are ignored and neither count as relevant or irrelevant. Set to false (the default), they are treated as irrelevant.", + "default": false, "type": "boolean" } } @@ -61432,6 +64939,7 @@ "properties": { "relevant_rating_threshold": { "description": "Sets the rating threshold above which documents are considered to be \"relevant\".", + "default": 1.0, "type": "number" } } @@ -61443,6 +64951,7 @@ "properties": { "k": { "description": "Sets the maximum number of documents retrieved per query. This value will act in place of the usual size parameter in the query.", + "default": 10.0, "type": "number" } } @@ -61480,6 +64989,7 @@ "properties": { "normalize": { "description": "If set to true, this metric will calculate the Normalized DCG.", + "default": false, "type": "boolean" } } @@ -61639,6 +65149,7 @@ }, "size": { "description": "The number of documents to index per batch.\nUse it when you are indexing from remote to ensure that the batches fit within the on-heap buffer, which defaults to a maximum size of 100 MB.", + "default": 1000.0, "type": "number" }, "slice": { @@ -62303,6 +65814,7 @@ }, "allow_restricted_indices": { "description": "This needs to be set to true if the patterns in the names field should cover system indices.", + "default": false, "type": "boolean" } }, @@ -62648,10 +66160,12 @@ }, "other_bucket_key": { "description": "The key with which the other bucket is returned.", + "default": "_other_", "type": "string" }, "keyed": { "description": "By default, the named filters aggregation returns the buckets as an object.\nSet to `false` to return the buckets as an array of objects.", + "default": true, "type": "boolean" } } @@ -63170,14 +66684,17 @@ "properties": { "align_checkpoints": { "description": "Specifies whether the transform checkpoint ranges should be optimized for performance. Such optimization can align\ncheckpoint ranges with the date histogram interval when date histogram is specified as a group source in the\ntransform config. As a result, less document updates in the destination index will be performed thus improving\noverall performance.", + "default": true, "type": "boolean" }, "dates_as_epoch_millis": { "description": "Defines if dates in the ouput should be written as ISO formatted string or as millis since epoch. epoch_millis was\nthe default for transforms created before version 7.11. For compatible output set this value to `true`.", + "default": false, "type": "boolean" }, "deduce_mappings": { "description": "Specifies whether the transform should deduce the destination index mappings from the transform configuration.", + "default": true, "type": "boolean" }, "docs_per_second": { @@ -63186,10 +66703,12 @@ }, "max_page_search_size": { "description": "Defines the initial page size to use for the composite aggregation for each checkpoint. If circuit breaker\nexceptions occur, the page size is dynamically adjusted to a lower value. The minimum value is `10` and the\nmaximum is `65,536`.", + "default": 500.0, "type": "number" }, "unattended": { "description": "If `true`, the transform runs in unattended mode. In unattended mode, the transform retries indefinitely in case\nof an error which means the transform never fails. Setting the number of retries other than infinite fails in\nvalidation.", + "default": false, "x-state": "Generally available", "type": "boolean" } @@ -63861,6 +67380,12 @@ "application/json": { "schema": { "$ref": "#/components/schemas/_types.WriteResponseBase" + }, + "examples": { + "CreateResponseExample1": { + "description": "A successful response from `PUT my-index-000001/_create/1` which indexes a document.", + "value": "{\n \"_index\": \"my-index-000001\",\n \"_id\": \"1\",\n \"_version\": 1,\n \"result\": \"created\",\n \"_shards\": {\n \"total\": 1,\n \"successful\": 1,\n \"failed\": 0\n },\n \"_seq_no\": 0,\n \"_primary_term\": 1\n}" + } } } } @@ -64078,7 +67603,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/_types.AcknowledgedResponseBase" + "$ref": "#/components/schemas/indices.delete_alias.IndicesAliasesResponseBody" } } } @@ -64096,7 +67621,7 @@ "schema": { "type": "object", "additionalProperties": { - "$ref": "#/components/schemas/indices.get_alias.IndexAliases" + "$ref": "#/components/schemas/indices.get_alias._types.IndexAliases" } } } @@ -65245,6 +68770,23 @@ "count", "api_keys" ] + }, + "examples": { + "QueryApiKeysResponseExample1": { + "summary": "Query API keys by ID", + "description": "A successful response from `GET /_security/_query/api_key?with_limited_by=true`. The `limited_by` details are the owner user's permissions associated with the API key. It is a point-in-time snapshot captured at creation and subsequent updates. An API key's effective permissions are an intersection of its assigned privileges and the owner user's permissions.\n", + "value": "{\n \"api_keys\": [\n {\n \"id\": \"VuaCfGcBCdbkQm-e5aOx\",\n \"name\": \"application-key-1\",\n \"creation\": 1548550550158,\n \"expiration\": 1548551550158,\n \"invalidated\": false,\n \"username\": \"myuser\",\n \"realm\": \"native1\",\n \"realm_type\": \"native\",\n \"metadata\": {\n \"application\": \"my-application\"\n },\n \"role_descriptors\": { },\n \"limited_by\": [ \n {\n \"role-power-user\": {\n \"cluster\": [\n \"monitor\"\n ],\n \"indices\": [\n {\n \"names\": [\n \"*\"\n ],\n \"privileges\": [\n \"read\"\n ],\n \"allow_restricted_indices\": false\n }\n ],\n \"applications\": [ ],\n \"run_as\": [ ],\n \"metadata\": { },\n \"transient_metadata\": {\n \"enabled\": true\n }\n }\n }\n ]\n }\n ]\n}" + }, + "QueryApiKeysResponseExample2": { + "summary": "Query API keys with pagination", + "description": "An abbreviated response from `GET /_security/_query/api_key` that contains a list of matched API keys along with their sort values. The first sort value is creation time, which is displayed in `date_time` format. The second sort value is the API key name.\n", + "value": "{\n \"total\": 100,\n \"count\": 10,\n \"api_keys\": [\n {\n \"id\": \"CLXgVnsBOGkf8IyjcXU7\",\n \"name\": \"app1-key-79\",\n \"creation\": 1629250154811,\n \"invalidated\": false,\n \"username\": \"org-admin-user\",\n \"realm\": \"native1\",\n \"metadata\": {\n \"environment\": \"production\"\n },\n \"role_descriptors\": { },\n \"_sort\": [\n \"2021-08-18T01:29:14.811Z\", \n \"app1-key-79\" \n ]\n },\n {\n \"id\": \"BrXgVnsBOGkf8IyjbXVB\",\n \"name\": \"app1-key-78\",\n \"creation\": 1629250153794,\n \"invalidated\": false,\n \"username\": \"org-admin-user\",\n \"realm\": \"native1\",\n \"metadata\": {\n \"environment\": \"production\"\n },\n \"role_descriptors\": { },\n \"_sort\": [\n \"2021-08-18T01:29:13.794Z\",\n \"app1-key-78\"\n ]\n }\n ]\n}" + }, + "QueryApiKeysResponseExample3": { + "summary": "Query all API keys", + "description": "A successful response from `GET /_security/_query/api_key`. It includes the role descriptors that are assigned to each API key when it was created or last updated. Note that an API key's effective permissions are an intersection of its assigned privileges and the point-in-time snapshot of the owner user's permissions. An empty role descriptors object means the API key inherits the owner user's permissions.\n", + "value": "{\n \"total\": 3,\n \"count\": 3,\n \"api_keys\": [ \n {\n \"id\": \"nkvrGXsB8w290t56q3Rg\",\n \"name\": \"my-api-key-1\",\n \"creation\": 1628227480421,\n \"expiration\": 1629091480421,\n \"invalidated\": false,\n \"username\": \"elastic\",\n \"realm\": \"reserved\",\n \"realm_type\": \"reserved\",\n \"metadata\": {\n \"letter\": \"a\"\n },\n \"role_descriptors\": { \n \"role-a\": {\n \"cluster\": [\n \"monitor\"\n ],\n \"indices\": [\n {\n \"names\": [\n \"index-a\"\n ],\n \"privileges\": [\n \"read\"\n ],\n \"allow_restricted_indices\": false\n }\n ],\n \"applications\": [ ],\n \"run_as\": [ ],\n \"metadata\": { },\n \"transient_metadata\": {\n \"enabled\": true\n }\n }\n }\n },\n {\n \"id\": \"oEvrGXsB8w290t5683TI\",\n \"name\": \"my-api-key-2\",\n \"creation\": 1628227498953,\n \"expiration\": 1628313898953,\n \"invalidated\": false,\n \"username\": \"elastic\",\n \"realm\": \"reserved\",\n \"metadata\": {\n \"letter\": \"b\"\n },\n \"role_descriptors\": { } \n }\n ]\n}" + } } } } @@ -66705,6 +70247,26 @@ }, "style": "form" }, + "cluster.get_component_template-settings_filter": { + "in": "query", + "name": "settings_filter", + "description": "Filter out results, for example to filter out sensitive information. Supports wildcards or full settings keys", + "deprecated": false, + "schema": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "array", + "items": { + "type": "string" + } + } + ] + }, + "style": "form" + }, "cluster.get_component_template-include_defaults": { "in": "query", "name": "include_defaults", @@ -66713,6 +70275,7 @@ "schema": { "type": "boolean" }, + "x-state": "Generally available", "style": "form" }, "cluster.get_component_template-local": { @@ -66756,6 +70319,16 @@ }, "style": "form" }, + "cluster.put_component_template-cause": { + "in": "query", + "name": "cause", + "description": "User defined reason for create the component template.", + "deprecated": false, + "schema": { + "type": "string" + }, + "style": "form" + }, "cluster.put_component_template-master_timeout": { "in": "query", "name": "master_timeout", @@ -66950,26 +70523,6 @@ }, "style": "simple" }, - "create-if_primary_term": { - "in": "query", - "name": "if_primary_term", - "description": "Only perform the operation if the document has this primary term.", - "deprecated": false, - "schema": { - "type": "number" - }, - "style": "form" - }, - "create-if_seq_no": { - "in": "query", - "name": "if_seq_no", - "description": "Only perform the operation if the document has this sequence number.", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.SequenceNumber" - }, - "style": "form" - }, "create-include_source_on_error": { "in": "query", "name": "include_source_on_error", @@ -66980,16 +70533,6 @@ }, "style": "form" }, - "create-op_type": { - "in": "query", - "name": "op_type", - "description": "Set to `create` to only index the document if it does not already exist (put if absent).\nIf a document with the specified `_id` already exists, the indexing operation will fail.\nThe behavior is the same as using the `/_create` endpoint.\nIf a document ID is specified, this paramater defaults to `index`.\nOtherwise, it defaults to `create`.\nIf the request targets a data stream, an `op_type` of `create` is required.", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.OpType" - }, - "style": "form" - }, "create-pipeline": { "in": "query", "name": "pipeline", @@ -67115,6 +70658,7 @@ "eql.search-allow_no_indices": { "in": "query", "name": "allow_no_indices", + "description": "Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)", "deprecated": false, "schema": { "type": "boolean" @@ -67144,12 +70688,23 @@ "eql.search-expand_wildcards": { "in": "query", "name": "expand_wildcards", + "description": "Whether to expand wildcard expression to concrete indices that are open, closed or both.", "deprecated": false, "schema": { "$ref": "#/components/schemas/_types.ExpandWildcards" }, "style": "form" }, + "eql.search-ccs_minimize_roundtrips": { + "in": "query", + "name": "ccs_minimize_roundtrips", + "description": "Indicates whether network round-trips should be minimized as part of cross-cluster search requests execution", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" + }, "eql.search-ignore_unavailable": { "in": "query", "name": "ignore_unavailable", @@ -67401,6 +70956,7 @@ "schema": { "type": "string" }, + "x-state": "Generally available", "style": "form" }, "field_caps-types": { @@ -67414,6 +70970,7 @@ "type": "string" } }, + "x-state": "Generally available", "style": "form" }, "field_caps-include_empty_fields": { @@ -67424,6 +70981,7 @@ "schema": { "type": "boolean" }, + "x-state": "Generally available", "style": "form" }, "graph.explore-index": { @@ -67599,6 +71157,16 @@ }, "style": "form" }, + "index-require_data_stream": { + "in": "query", + "name": "require_data_stream", + "description": "If `true`, the request's actions must target a data stream (existing or to be created).", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" + }, "indices.analyze-index": { "in": "path", "name": "index", @@ -67815,6 +71383,7 @@ "schema": { "type": "boolean" }, + "x-state": "Generally available", "style": "form" }, "indices.get_data_stream-master_timeout": { @@ -67886,6 +71455,7 @@ "schema": { "type": "boolean" }, + "x-state": "Generally available", "style": "form" }, "indices.get_mapping-index": { @@ -68448,6 +72018,7 @@ "schema": { "type": "boolean" }, + "x-state": "Generally available", "style": "form" }, "indices.validate_query-index": { @@ -68699,6 +72270,16 @@ }, "style": "simple" }, + "inference.put-timeout": { + "in": "query", + "name": "timeout", + "description": "Specifies the amount of time to wait for the inference endpoint to be created.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Duration" + }, + "style": "form" + }, "ingest.get_pipeline-id": { "in": "path", "name": "id", @@ -69454,6 +73035,16 @@ }, "style": "form" }, + "msearch-index_": { + "in": "query", + "name": "index", + "description": "Comma-separated list of data streams, indices, and index aliases to use as default", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Indices" + }, + "style": "form" + }, "msearch-max_concurrent_searches": { "in": "query", "name": "max_concurrent_searches", @@ -70361,6 +73952,7 @@ "schema": { "type": "boolean" }, + "x-state": "Generally available", "style": "form" }, "search_mvt-index": { @@ -70478,6 +74070,16 @@ }, "style": "form" }, + "search_mvt-track_total_hits": { + "in": "query", + "name": "track_total_hits", + "description": "The number of hits matching the query to count accurately.\nIf `true`, the exact number of hits is returned at the cost of some performance.\nIf `false`, the response does not include the total number of hits matching the query.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_global.search._types.TrackHits" + }, + "style": "form" + }, "search_mvt-with_labels": { "in": "query", "name": "with_labels", @@ -70617,6 +74219,7 @@ "schema": { "type": "boolean" }, + "x-state": "Generally available", "style": "form" }, "search_template-typed_keys": { @@ -70690,6 +74293,7 @@ "schema": { "type": "boolean" }, + "x-state": "Generally available", "style": "form" }, "security.query_api_keys-with_profile_uid": { @@ -70700,6 +74304,7 @@ "schema": { "type": "boolean" }, + "x-state": "Generally available", "style": "form" }, "security.query_api_keys-typed_keys": { @@ -70710,6 +74315,7 @@ "schema": { "type": "boolean" }, + "x-state": "Generally available", "style": "form" }, "sql.query-format": { @@ -70956,6 +74562,7 @@ }, "explain": { "description": "If true, returns detailed information about score computation as part of a hit.", + "default": false, "type": "boolean" }, "ext": { @@ -70967,6 +74574,7 @@ }, "from": { "description": "Starting document offset. By default, you cannot page through more than 10,000\nhits using the from and size parameters. To page through more hits, use the\nsearch_after parameter.", + "default": 0.0, "type": "number" }, "highlight": { @@ -71047,6 +74655,7 @@ }, "size": { "description": "The number of hits to return. By default, you cannot page through more\nthan 10,000 hits using the from and size parameters. To page through more\nhits, use the search_after parameter.", + "default": 10.0, "type": "number" }, "slice": { @@ -71070,6 +74679,7 @@ }, "terminate_after": { "description": "Maximum number of documents to collect for each shard. If a query reaches this\nlimit, Elasticsearch terminates the query early. Elasticsearch collects documents\nbefore sorting. Defaults to 0, which does not terminate query execution early.", + "default": 0.0, "type": "number" }, "timeout": { @@ -71078,10 +74688,12 @@ }, "track_scores": { "description": "If true, calculate and return document scores, even if the scores are not used for sorting.", + "default": false, "type": "boolean" }, "version": { "description": "If true, returns document version as part of a hit.", + "default": false, "type": "boolean" }, "seq_no_primary_term": { @@ -71342,10 +74954,12 @@ }, "allow_partial_search_results": { "description": "Allow query execution also in case of shard failures.\nIf true, the query will keep running and will return results based on the available shards.\nFor sequences, the behavior can be further refined using allow_partial_sequence_results", + "default": true, "type": "boolean" }, "allow_partial_sequence_results": { "description": "This flag applies only to sequences and has effect only if allow_partial_search_results=true.\nIf true, the sequence query will return results based on the available shards, ignoring the others.\nIf false, the sequence query will return successfully, but will always have empty results.", + "default": false, "type": "boolean" }, "size": { @@ -71373,6 +74987,7 @@ }, "max_samples_per_key": { "description": "By default, the response of a sample query contains up to `10` samples, with one sample per unique set of join keys. Use the `size`\nparameter to get a smaller or larger set of samples. To retrieve more than one sample per set of join keys, use the\n`max_samples_per_key` parameter. Pipes are not supported for sample queries.", + "default": 1.0, "type": "number" } }, @@ -71523,6 +75138,7 @@ }, "explain": { "description": "If `true`, the response includes token attributes and additional details.", + "default": false, "type": "boolean" }, "field": { @@ -71723,6 +75339,7 @@ }, "numeric_detection": { "description": "Automatically map strings into numeric data types for all fields.", + "default": false, "type": "boolean" }, "properties": { @@ -71772,8 +75389,8 @@ }, "indicesPutSettingsRequestExample3": { "summary": "Update index analysis", - "description": "To add an analyzer, you must close the index, define the analyzer, then reopen the index.", - "value": "{\n \"analysis\" : {\n \"analyzer\":{\n \"content\":{\n \"type\":\"custom\",\n \"tokenizer\":\"whitespace\"\n }\n }\n }\n}\n\nPOST /my-index-000001/_open" + "description": "To add an analyzer, you must close the index (`POST /my-index-000001/_close`), define the analyzer, then reopen the index (`POST /my-index-000001/_open`).", + "value": "{\n \"analysis\": {\n \"analyzer\": {\n \"content\": {\n \"type\": \"custom\",\n \"tokenizer\": \"whitespace\"\n }\n }\n }\n}" } } } @@ -71913,6 +75530,10 @@ } ] }, + "input_type": { + "description": "Specifies the input data type for the text embedding model. The `input_type` parameter only applies to Inference Endpoints with the `text_embedding` task type. Possible values include:\n* `SEARCH`\n* `INGEST`\n* `CLASSIFICATION`\n* `CLUSTERING`\nNot all services support all values. Unsupported values will trigger a validation exception.\nAccepted values depend on the configured inference service, refer to the relevant service-specific documentation for more info.\n\n> info\n> The `input_type` parameter specified on the root level of the request body will take precedence over the `input_type` parameter specified in `task_settings`.", + "type": "string" + }, "task_settings": { "$ref": "#/components/schemas/inference._types.TaskSettings" } @@ -72038,6 +75659,7 @@ "properties": { "allow_no_match": { "description": "Refer to the description for the `allow_no_match` query parameter.", + "default": true, "type": "boolean" }, "bucket_span": { @@ -72048,6 +75670,7 @@ }, "exclude_interim": { "description": "Refer to the description for the `exclude_interim` query parameter.", + "default": false, "type": "boolean" }, "overall_score": { @@ -72066,6 +75689,7 @@ }, "top_n": { "description": "Refer to the description for the `top_n` query parameter.", + "default": 1.0, "type": "number" } } @@ -72374,6 +75998,7 @@ }, "explain": { "description": "If `true`, the request returns detailed information about score computation as part of a hit.", + "default": false, "type": "boolean" }, "ext": { @@ -72385,6 +76010,7 @@ }, "from": { "description": "The starting document offset, which must be non-negative.\nBy default, you cannot page through more than 10,000 hits using the `from` and `size` parameters.\nTo page through more hits, use the `search_after` parameter.", + "default": 0.0, "type": "number" }, "highlight": { @@ -72445,6 +76071,7 @@ }, "profile": { "description": "Set to `true` to return detailed timing information about the execution of individual components in a search request.\nNOTE: This is a debugging tool and adds significant overhead to search execution.", + "default": false, "type": "boolean" }, "query": { @@ -72479,6 +76106,7 @@ }, "size": { "description": "The number of hits to return, which must not be negative.\nBy default, you cannot page through more than 10,000 hits using the `from` and `size` parameters.\nTo page through more hits, use the `search_after` property.", + "default": 10.0, "type": "number" }, "slice": { @@ -72502,6 +76130,7 @@ }, "terminate_after": { "description": "The maximum number of documents to collect for each shard.\nIf a query reaches this limit, Elasticsearch terminates the query early.\nElasticsearch collects documents before sorting.\n\nIMPORTANT: Use with caution.\nElasticsearch applies this property to each shard handling the request.\nWhen possible, let Elasticsearch perform early termination automatically.\nAvoid specifying this property for requests that target data streams with backing indices across multiple data tiers.\n\nIf set to `0` (default), the query does not terminate early.", + "default": 0.0, "type": "number" }, "timeout": { @@ -72510,10 +76139,12 @@ }, "track_scores": { "description": "If `true`, calculate and return document scores, even if the scores are not used for sorting.", + "default": false, "type": "boolean" }, "version": { "description": "If `true`, the request returns the document version as part of a hit.", + "default": false, "type": "boolean" }, "seq_no_primary_term": { @@ -72600,14 +76231,17 @@ }, "buffer": { "description": "The size, in pixels, of a clipping buffer outside the tile. This allows renderers\nto avoid outline artifacts from geometries that extend past the extent of the tile.", + "default": 5.0, "type": "number" }, "exact_bounds": { "description": "If `false`, the meta layer's feature is the bounding box of the tile.\nIf `true`, the meta layer's feature is a bounding box resulting from a\n`geo_bounds` aggregation. The aggregation runs on values that intersect\nthe `//` tile with `wrap_longitude` set to `false`. The resulting\nbounding box may be larger than the vector tile.", + "default": false, "type": "boolean" }, "extent": { "description": "The size, in pixels, of a side of the tile. Vector tiles are square with equal sides.", + "default": 4096.0, "type": "number" }, "fields": { @@ -72618,6 +76252,7 @@ }, "grid_precision": { "description": "Additional zoom levels available through the aggs layer. For example, if `` is `7`\nand `grid_precision` is `8`, you can zoom in up to level 15. Accepts 0-8. If 0, results\ndon't include the aggs layer.", + "default": 8.0, "type": "number" }, "grid_type": { @@ -72631,6 +76266,7 @@ }, "size": { "description": "The maximum number of features to return in the hits layer. Accepts 0-10000.\nIf 0, results don't include the hits layer.", + "default": 10000.0, "type": "number" }, "sort": { @@ -72662,6 +76298,7 @@ "properties": { "explain": { "description": "If `true`, returns detailed information about score calculation as part of each hit.\nIf you specify both this and the `explain` query parameter, the API uses only the query parameter.", + "default": false, "type": "boolean" }, "id": { @@ -72676,6 +76313,7 @@ }, "profile": { "description": "If `true`, the query execution is profiled.", + "default": false, "type": "boolean" }, "source": { @@ -72859,6 +76497,7 @@ }, "from": { "description": "The starting document offset.\nIt must not be negative.\nBy default, you cannot page through more than 10,000 hits using the `from` and `size` parameters.\nTo page through more hits, use the `search_after` parameter.", + "default": 0.0, "type": "number" }, "sort": { @@ -72866,6 +76505,7 @@ }, "size": { "description": "The number of hits to return.\nIt must not be negative.\nThe `size` parameter can be set to `0`, in which case no API key matches are returned, only the aggregation results.\nBy default, you cannot page through more than 10,000 hits using the `from` and `size` parameters.\nTo page through more hits, use the `search_after` parameter.", + "default": 10.0, "type": "number" }, "search_after": { @@ -72878,6 +76518,16 @@ "summary": "Query API keys by ID", "description": "Run `GET /_security/_query/api_key?with_limited_by=true` to retrieve an API key by ID.", "value": "{\n \"query\": {\n \"ids\": {\n \"values\": [\n \"VuaCfGcBCdbkQm-e5aOx\"\n ]\n }\n }\n}" + }, + "QueryApiKeysRequestExample2": { + "summary": "Query API keys with pagination", + "description": "Run `GET /_security/_query/api_key`. Use a `bool` query to issue complex logical conditions and use `from`, `size`, and `sort` to help paginate the result. For example, the API key name must begin with `app1-key-` and must not be `app1-key-01`. It must be owned by a username with the wildcard pattern `org-*-user` and the `environment` metadata field must have a `production` value. The offset to begin the search result is the twentieth (zero-based index) API key. The page size of the response is 10 API keys. The result is first sorted by creation date in descending order, then by name in ascending order.\n", + "value": "{\n \"query\": {\n \"bool\": {\n \"must\": [\n {\n \"prefix\": {\n \"name\": \"app1-key-\" \n }\n },\n {\n \"term\": {\n \"invalidated\": \"false\" \n }\n }\n ],\n \"must_not\": [\n {\n \"term\": {\n \"name\": \"app1-key-01\" \n }\n }\n ],\n \"filter\": [\n {\n \"wildcard\": {\n \"username\": \"org-*-user\" \n }\n },\n {\n \"term\": {\n \"metadata.environment\": \"production\" \n }\n }\n ]\n }\n },\n \"from\": 20, \n \"size\": 10, \n \"sort\": [ \n { \"creation\": { \"order\": \"desc\", \"format\": \"date_time\" } },\n \"name\"\n ]\n}" + }, + "QueryApiKeysRequestExample3": { + "summary": "Query API keys by name", + "description": "Run `GET /_security/_query/api_key` to retrieve the API key by name.", + "value": "{\n \"query\": {\n \"term\": {\n \"name\": {\n \"value\": \"application-key-1\"\n }\n }\n }\n}" } } } @@ -72894,6 +76544,7 @@ }, "from": { "description": "The starting document offset.\nIt must not be negative.\nBy default, you cannot page through more than 10,000 hits using the `from` and `size` parameters.\nTo page through more hits, use the `search_after` parameter.", + "default": 0.0, "type": "number" }, "sort": { @@ -72901,6 +76552,7 @@ }, "size": { "description": "The number of hits to return.\nIt must not be negative.\nBy default, you cannot page through more than 10,000 hits using the `from` and `size` parameters.\nTo page through more hits, use the `search_after` parameter.", + "default": 10.0, "type": "number" }, "search_after": { @@ -72931,6 +76583,7 @@ "properties": { "allow_partial_search_results": { "description": "If `true`, the response has partial results when there are shard request timeouts or shard failures.\nIf `false`, the API returns an error with no partial results.", + "default": false, "type": "boolean" }, "catalog": { @@ -72942,6 +76595,7 @@ "url": "https://www.elastic.co/docs/explore-analyze/query-filter/languages/sql-rest-columnar" }, "description": "If `true`, the results are in a columnar fashion: one row represents all the values of a certain column from the current page of results.\nThe API supports this parameter only for CBOR, JSON, SMILE, and YAML responses.", + "default": false, "type": "boolean" }, "cursor": { @@ -72950,10 +76604,12 @@ }, "fetch_size": { "description": "The maximum number of rows (or entries) to return in one response.", + "default": 1000.0, "type": "number" }, "field_multi_value_leniency": { "description": "If `false`, the API returns an exception when encountering multiple values for a field.\nIf `true`, the API is lenient and returns the first value from the array with no guarantee of consistent results.", + "default": false, "type": "boolean" }, "filter": { @@ -72961,6 +76617,7 @@ }, "index_using_frozen": { "description": "If `true`, the search can run on frozen indices.", + "default": false, "type": "boolean" }, "keep_alive": { @@ -72968,6 +76625,7 @@ }, "keep_on_completion": { "description": "If `true`, Elasticsearch stores synchronous searches if you also specify the `wait_for_completion_timeout` parameter.\nIf `false`, Elasticsearch only stores async searches that don't finish before the `wait_for_completion_timeout`.", + "default": false, "type": "boolean" }, "page_timeout": { @@ -73019,6 +76677,7 @@ "properties": { "fetch_size": { "description": "The maximum number of rows (or entries) to return in one response.", + "default": 1000.0, "type": "number" }, "filter": { @@ -73058,6 +76717,7 @@ }, "size": { "description": "The number of matching terms to return.", + "default": 10.0, "type": "number" }, "timeout": { @@ -73065,6 +76725,7 @@ }, "case_insensitive": { "description": "When `true`, the provided search string is matched against index terms without case sensitivity.", + "default": false, "type": "boolean" }, "index_filter": { @@ -73117,22 +76778,27 @@ }, "field_statistics": { "description": "If `true`, the response includes:\n\n* The document count (how many documents contain this field).\n* The sum of document frequencies (the sum of document frequencies for all terms in this field).\n* The sum of total term frequencies (the sum of total term frequencies of each term in this field).", + "default": true, "type": "boolean" }, "offsets": { "description": "If `true`, the response includes term offsets.", + "default": true, "type": "boolean" }, "payloads": { "description": "If `true`, the response includes term payloads.", + "default": true, "type": "boolean" }, "positions": { "description": "If `true`, the response includes term positions.", + "default": true, "type": "boolean" }, "term_statistics": { "description": "If `true`, the response includes:\n\n* The total term frequency (how often a term occurs in all documents).\n* The document frequency (the number of documents containing the current term).\n\nBy default these values are not returned since term statistics can have a serious performance impact.", + "default": false, "type": "boolean" }, "routing": { diff --git a/output/schema/schema-serverless.json b/output/schema/schema-serverless.json index 59601f3c9b..d0d5d09887 100644 --- a/output/schema/schema-serverless.json +++ b/output/schema/schema-serverless.json @@ -23301,8 +23301,8 @@ "value": { "kind": "instance_of", "type": { - "name": "AcknowledgedResponseBase", - "namespace": "_types" + "name": "IndicesAliasesResponseBody", + "namespace": "indices.delete_alias" } } }, @@ -124719,6 +124719,33 @@ ], "specLocation": "_types/Base.ts#L138-L140" }, + { + "inherits": { + "type": { + "name": "AcknowledgedResponseBase", + "namespace": "_types" + } + }, + "kind": "interface", + "name": { + "name": "IndicesAliasesResponseBody", + "namespace": "indices.delete_alias" + }, + "properties": [ + { + "name": "errors", + "required": false, + "type": { + "kind": "instance_of", + "type": { + "name": "boolean", + "namespace": "_builtins" + } + } + } + ], + "specLocation": "indices/delete_alias/IndicesDeleteAliasResponse.ts#L26-L28" + }, { "kind": "interface", "name": { diff --git a/output/schema/schema.json b/output/schema/schema.json index e3f3bac22f..eb1b95cf81 100644 --- a/output/schema/schema.json +++ b/output/schema/schema.json @@ -5222,7 +5222,9 @@ "name": "Response", "namespace": "esql.get_query" }, - "responseMediaType": [], + "responseMediaType": [ + "application/json" + ], "urls": [ { "methods": [ @@ -7458,6 +7460,11 @@ "docId": "index-templates-exist", "docUrl": "https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-exists-index-template", "name": "indices.exists_index_template", + "privileges": { + "cluster": [ + "manage_index_templates" + ] + }, "request": { "name": "Request", "namespace": "indices.exists_index_template" @@ -8995,17 +9002,33 @@ }, { "availability": { - "stack": { + "serverless": { "stability": "stable", "visibility": "public" + }, + "stack": { + "since": "9.1.0", + "stability": "stable" } }, - "description": "Removes a block from an index.", - "docUrl": "https://www.elastic.co/guide/en/elasticsearch/reference/master/index-modules-blocks.html", + "description": "Remove an index block.\n\nRemove an index block from an index.\nIndex blocks limit the operations allowed on an index by blocking specific operation types.", + "docId": "index-block-remove", + "docUrl": "https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-remove-block", "name": "indices.remove_block", - "request": null, + "privileges": { + "index": [ + "manage" + ] + }, + "request": { + "name": "Request", + "namespace": "indices.remove_block" + }, "requestBodyRequired": false, - "response": null, + "response": { + "name": "Response", + "namespace": "indices.remove_block" + }, "responseMediaType": [ "application/json" ], @@ -9811,7 +9834,7 @@ "visibility": "public" } }, - "description": "Create an inference endpoint.\n\nIMPORTANT: The inference APIs enable you to use certain services, such as built-in machine learning models (ELSER, E5), models uploaded through Eland, Cohere, OpenAI, Mistral, Azure OpenAI, Google AI Studio, Google Vertex AI, Anthropic, Watsonx.ai, or Hugging Face.\nFor built-in models and models uploaded through Eland, the inference APIs offer an alternative way to use and manage trained models.\nHowever, if you do not plan to use the inference APIs to use these models or if you want to use non-NLP models, use the machine learning trained model APIs.\n\nThe following integrations are available through the inference API. You can find the available task types next to the integration name:\n* AlibabaCloud AI Search (`completion`, `rerank`, `sparse_embedding`, `text_embedding`)\n* Amazon Bedrock (`completion`, `text_embedding`)\n* Anthropic (`completion`)\n* Azure AI Studio (`completion`, `text_embedding`)\n* Azure OpenAI (`completion`, `text_embedding`)\n* Cohere (`completion`, `rerank`, `text_embedding`)\n* Elasticsearch (`rerank`, `sparse_embedding`, `text_embedding` - this service is for built-in models and models uploaded through Eland)\n* ELSER (`sparse_embedding`)\n* Google AI Studio (`completion`, `text_embedding`)\n* Google Vertex AI (`rerank`, `text_embedding`)\n* Hugging Face (`chat_completion`, `completion`, `rerank`, `text_embedding`)\n* Mistral (`chat_completion`, `completion`, `text_embedding`)\n* OpenAI (`chat_completion`, `completion`, `text_embedding`)\n* VoyageAI (`text_embedding`, `rerank`)\n* Watsonx inference integration (`text_embedding`)\n* JinaAI (`text_embedding`, `rerank`)", + "description": "Create an inference endpoint.\n\nIMPORTANT: The inference APIs enable you to use certain services, such as built-in machine learning models (ELSER, E5), models uploaded through Eland, Cohere, OpenAI, Mistral, Azure OpenAI, Google AI Studio, Google Vertex AI, Anthropic, Watsonx.ai, or Hugging Face.\nFor built-in models and models uploaded through Eland, the inference APIs offer an alternative way to use and manage trained models.\nHowever, if you do not plan to use the inference APIs to use these models or if you want to use non-NLP models, use the machine learning trained model APIs.\n\nThe following integrations are available through the inference API. You can find the available task types next to the integration name:\n* AlibabaCloud AI Search (`completion`, `rerank`, `sparse_embedding`, `text_embedding`)\n* Amazon Bedrock (`completion`, `text_embedding`)\n* Amazon SageMaker (`chat_completion`, `completion`, `rerank`, `sparse_embedding`, `text_embedding`)\n* Anthropic (`completion`)\n* Azure AI Studio (`completion`, `text_embedding`)\n* Azure OpenAI (`completion`, `text_embedding`)\n* Cohere (`completion`, `rerank`, `text_embedding`)\n* DeepSeek (`completion`, `chat_completion`)\n* Elasticsearch (`rerank`, `sparse_embedding`, `text_embedding` - this service is for built-in models and models uploaded through Eland)\n* ELSER (`sparse_embedding`)\n* Google AI Studio (`completion`, `text_embedding`)\n* Google Vertex AI (`rerank`, `text_embedding`)\n* Hugging Face (`chat_completion`, `completion`, `rerank`, `text_embedding`)\n* Mistral (`chat_completion`, `completion`, `text_embedding`)\n* OpenAI (`chat_completion`, `completion`, `text_embedding`)\n* VoyageAI (`text_embedding`, `rerank`)\n* Watsonx inference integration (`text_embedding`)\n* JinaAI (`text_embedding`, `rerank`)", "docId": "inference-api-put", "docUrl": "https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-inference-put", "extPreviousVersionDocUrl": "https://www.elastic.co/guide/en/elasticsearch/reference/8.18/put-inference-api.html", @@ -9943,6 +9966,52 @@ } ] }, + { + "availability": { + "serverless": { + "stability": "stable", + "visibility": "public" + }, + "stack": { + "since": "9.1.0", + "stability": "stable", + "visibility": "public" + } + }, + "description": "Create an Amazon SageMaker inference endpoint.\n\nCreate an inference endpoint to perform an inference task with the `amazon_sagemaker` service.", + "docId": "inference-api-put-amazonsagemaker", + "docUrl": "https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-inference-put-amazonsagemaker", + "extPreviousVersionDocUrl": "https://www.elastic.co/guide/en/elasticsearch/reference/8.18/infer-service-amazon-sagemaker.html", + "name": "inference.put_amazonsagemaker", + "privileges": { + "cluster": [ + "manage_inference" + ] + }, + "request": { + "name": "Request", + "namespace": "inference.put_amazonsagemaker" + }, + "requestBodyRequired": false, + "requestMediaType": [ + "application/json" + ], + "response": { + "name": "Response", + "namespace": "inference.put_amazonsagemaker" + }, + "responseMediaType": [ + "application/json" + ], + "urls": [ + { + "methods": [ + "PUT" + ], + "path": "/_inference/{task_type}/{amazonsagemaker_inference_id}" + } + ] + }, { "availability": { "serverless": { @@ -10127,6 +10196,98 @@ } ] }, + { + "availability": { + "serverless": { + "stability": "stable", + "visibility": "public" + }, + "stack": { + "since": "8.13.0", + "stability": "stable", + "visibility": "public" + } + }, + "description": "Create a custom inference endpoint.\n\nThe custom service gives more control over how to interact with external inference services that aren't explicitly supported through dedicated integrations.\nThe custom service gives you the ability to define the headers, url, query parameters, request body, and secrets.\nThe custom service supports the template replacement functionality, which enables you to define a template that can be replaced with the value associated with that key.\nTemplates are portions of a string that start with `${` and end with `}`.\nThe parameters `secret_parameters` and `task_settings` are checked for keys for template replacement. Template replacement is supported in the `request`, `headers`, `url`, and `query_parameters`.\nIf the definition (key) is not found for a template, an error message is returned.\nIn case of an endpoint definition like the following:\n```\nPUT _inference/text_embedding/test-text-embedding\n{\n \"service\": \"custom\",\n \"service_settings\": {\n \"secret_parameters\": {\n \"api_key\": \"\"\n },\n \"url\": \"...endpoints.huggingface.cloud/v1/embeddings\",\n \"headers\": {\n \"Authorization\": \"Bearer ${api_key}\",\n \"Content-Type\": \"application/json\"\n },\n \"request\": \"{\\\"input\\\": ${input}}\",\n \"response\": {\n \"json_parser\": {\n \"text_embeddings\":\"$.data[*].embedding[*]\"\n }\n }\n }\n}\n```\nTo replace `${api_key}` the `secret_parameters` and `task_settings` are checked for a key named `api_key`.\n\n> info\n> Templates should not be surrounded by quotes.\n\nPre-defined templates:\n* `${input}` refers to the array of input strings that comes from the `input` field of the subsequent inference requests.\n* `${input_type}` refers to the input type translation values.\n* `${query}` refers to the query field used specifically for reranking tasks.\n* `${top_n}` refers to the `top_n` field available when performing rerank requests.\n* `${return_documents}` refers to the `return_documents` field available when performing rerank requests.", + "docId": "inference-api-put-custom", + "docUrl": "https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-inference-put-custom", + "extPreviousVersionDocUrl": "https://www.elastic.co/guide/en/elasticsearch/reference/8.19/infer-service-custom.html", + "name": "inference.put_custom", + "privileges": { + "cluster": [ + "manage_inference" + ] + }, + "request": { + "name": "Request", + "namespace": "inference.put_custom" + }, + "requestBodyRequired": false, + "requestMediaType": [ + "application/json" + ], + "response": { + "name": "Response", + "namespace": "inference.put_custom" + }, + "responseMediaType": [ + "application/json" + ], + "urls": [ + { + "methods": [ + "PUT" + ], + "path": "/_inference/{task_type}/{custom_inference_id}" + } + ] + }, + { + "availability": { + "serverless": { + "stability": "stable", + "visibility": "public" + }, + "stack": { + "since": "9.1.0", + "stability": "stable", + "visibility": "public" + } + }, + "description": "Create a DeepSeek inference endpoint.\n\nCreate an inference endpoint to perform an inference task with the `deepseek` service.", + "docId": "inference-api-put-deepseek", + "docUrl": "https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-inference-put-deepseek", + "extPreviousVersionDocUrl": "https://www.elastic.co/guide/en/elasticsearch/reference/8.18/infer-service-deepseek.html", + "name": "inference.put_deepseek", + "privileges": { + "cluster": [ + "manage_inference" + ] + }, + "request": { + "name": "Request", + "namespace": "inference.put_deepseek" + }, + "requestBodyRequired": false, + "requestMediaType": [ + "application/json" + ], + "response": { + "name": "Response", + "namespace": "inference.put_deepseek" + }, + "responseMediaType": [ + "application/json" + ], + "urls": [ + { + "methods": [ + "PUT" + ], + "path": "/_inference/{task_type}/{deepseek_inference_id}" + } + ] + }, { "availability": { "serverless": { @@ -10601,7 +10762,7 @@ "visibility": "public" } }, - "description": "Perform rereanking inference on the service", + "description": "Perform reranking inference on the service", "docId": "inference-api-post", "docUrl": "https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-inference-inference", "extPreviousVersionDocUrl": "https://www.elastic.co/guide/en/elasticsearch/reference/8.18/post-inference-api.html", @@ -10817,7 +10978,7 @@ "stability": "stable" } }, - "description": "Get cluster info.\nGet basic build, version, and cluster information.", + "description": "Get cluster info.\nGet basic build, version, and cluster information.\n::: In Serverless, this API is retained for backward compatibility only. Some response fields, such as the version number, should be ignored.", "docId": "api-root", "docTag": "info", "docUrl": "https://www.elastic.co/docs/api/doc/elasticsearch/group/endpoint-info", @@ -16995,9 +17156,11 @@ "description": "", "version": "8.11.0" }, - "description": "Search rolled-up data.\nThe rollup search endpoint is needed because, internally, rolled-up documents utilize a different document structure than the original data.\nIt rewrites standard Query DSL into a format that matches the rollup documents then takes the response and rewrites it back to what a client would expect given the original query.\n\nThe request body supports a subset of features from the regular search API.\nThe following functionality is not available:\n\n`size`: Because rollups work on pre-aggregated data, no search hits can be returned and so size must be set to zero or omitted entirely.\n`highlighter`, `suggestors`, `post_filter`, `profile`, `explain`: These are similarly disallowed.\n\n**Searching both historical rollup and non-rollup data**\n\nThe rollup search API has the capability to search across both \"live\" non-rollup data and the aggregated rollup data.\nThis is done by simply adding the live indices to the URI. For example:\n\n```\nGET sensor-1,sensor_rollup/_rollup_search\n{\n \"size\": 0,\n \"aggregations\": {\n \"max_temperature\": {\n \"max\": {\n \"field\": \"temperature\"\n }\n }\n }\n}\n```\n\nThe rollup search endpoint does two things when the search runs:\n\n* The original request is sent to the non-rollup index unaltered.\n* A rewritten version of the original request is sent to the rollup index.\n\nWhen the two responses are received, the endpoint rewrites the rollup response and merges the two together.\nDuring the merging process, if there is any overlap in buckets between the two responses, the buckets from the non-rollup index are used.", + "description": "Search rolled-up data.\nThe rollup search endpoint is needed because, internally, rolled-up documents utilize a different document structure than the original data.\nIt rewrites standard Query DSL into a format that matches the rollup documents then takes the response and rewrites it back to what a client would expect given the original query.\n\nThe request body supports a subset of features from the regular search API.\nThe following functionality is not available:\n\n`size`: Because rollups work on pre-aggregated data, no search hits can be returned and so size must be set to zero or omitted entirely.\n`highlighter`, `suggestors`, `post_filter`, `profile`, `explain`: These are similarly disallowed.\n\nFor more detailed examples of using the rollup search API, including querying rolled-up data only or combining rolled-up and live data, refer to the External documentation.", "docId": "rollup-search", "docUrl": "https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-rollup-rollup-search", + "extDocId": "rollup-examples", + "extDocUrl": "https://www.elastic.co/docs/manage-data/lifecycle/rollup/getting-started-api#historical-only-search-example", "extPreviousVersionDocUrl": "https://www.elastic.co/guide/en/elasticsearch/reference/8.18/rollup-search.html", "name": "rollup.rollup_search", "request": { @@ -22550,9 +22713,11 @@ "stability": "stable" } }, - "description": "Create or update a synonym set.\nSynonyms sets are limited to a maximum of 10,000 synonym rules per set.\nIf you need to manage more synonym rules, you can create multiple synonym sets.\n\nWhen an existing synonyms set is updated, the search analyzers that use the synonyms set are reloaded automatically for all indices.\nThis is equivalent to invoking the reload search analyzers API for all indices that use the synonyms set.", + "description": "Create or update a synonym set.\nSynonyms sets are limited to a maximum of 10,000 synonym rules per set.\nIf you need to manage more synonym rules, you can create multiple synonym sets.\n\nWhen an existing synonyms set is updated, the search analyzers that use the synonyms set are reloaded automatically for all indices.\nThis is equivalent to invoking the reload search analyzers API for all indices that use the synonyms set.\n\nFor practical examples of how to create or update a synonyms set, refer to the External documentation.", "docId": "synonym-set-create", "docUrl": "https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-synonyms-put-synonym", + "extDocId": "synonym-api-examples", + "extDocUrl": "https://www.elastic.co/docs/solutions/search/full-text/create-update-synonyms-api-example", "extPreviousVersionDocUrl": "https://www.elastic.co/guide/en/elasticsearch/reference/8.18/put-synonyms-set.html", "name": "synonyms.put_synonym", "privileges": { @@ -23577,10 +23742,12 @@ "stability": "stable" } }, - "description": "Update a document.\n\nUpdate a document by running a script or passing a partial document.\n\nIf the Elasticsearch security features are enabled, you must have the `index` or `write` index privilege for the target index or index alias.\n\nThe script can update, delete, or skip modifying the document.\nThe API also supports passing a partial document, which is merged into the existing document.\nTo fully replace an existing document, use the index API.\nThis operation:\n\n* Gets the document (collocated with the shard) from the index.\n* Runs the specified script.\n* Indexes the result.\n\nThe document must still be reindexed, but using this API removes some network roundtrips and reduces chances of version conflicts between the GET and the index operation.\n\nThe `_source` field must be enabled to use this API.\nIn addition to `_source`, you can access the following variables through the `ctx` map: `_index`, `_type`, `_id`, `_version`, `_routing`, and `_now` (the current timestamp).", + "description": "Update a document.\n\nUpdate a document by running a script or passing a partial document.\n\nIf the Elasticsearch security features are enabled, you must have the `index` or `write` index privilege for the target index or index alias.\n\nThe script can update, delete, or skip modifying the document.\nThe API also supports passing a partial document, which is merged into the existing document.\nTo fully replace an existing document, use the index API.\nThis operation:\n\n* Gets the document (collocated with the shard) from the index.\n* Runs the specified script.\n* Indexes the result.\n\nThe document must still be reindexed, but using this API removes some network roundtrips and reduces chances of version conflicts between the GET and the index operation.\n\nThe `_source` field must be enabled to use this API.\nIn addition to `_source`, you can access the following variables through the `ctx` map: `_index`, `_type`, `_id`, `_version`, `_routing`, and `_now` (the current timestamp).\nFor usage examples such as partial updates, upserts, and scripted updates, see the External documentation.", "docId": "docs-update", "docTag": "document", "docUrl": "https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-update", + "extDocId": "update-document", + "extDocUrl": "https://www.elastic.co/docs/reference/elasticsearch/rest-apis/update-document", "extPreviousVersionDocUrl": "https://www.elastic.co/guide/en/elasticsearch/reference/8.18/docs-update.html", "name": "update", "privileges": { @@ -23623,10 +23790,12 @@ "stability": "stable" } }, - "description": "Update documents.\nUpdates documents that match the specified query.\nIf no query is specified, performs an update on every document in the data stream or index without modifying the source, which is useful for picking up mapping changes.\n\nIf the Elasticsearch security features are enabled, you must have the following index privileges for the target data stream, index, or alias:\n\n* `read`\n* `index` or `write`\n\nYou can specify the query criteria in the request URI or the request body using the same syntax as the search API.\n\nWhen you submit an update by query request, Elasticsearch gets a snapshot of the data stream or index when it begins processing the request and updates matching documents using internal versioning.\nWhen the versions match, the document is updated and the version number is incremented.\nIf a document changes between the time that the snapshot is taken and the update operation is processed, it results in a version conflict and the operation fails.\nYou can opt to count version conflicts instead of halting and returning by setting `conflicts` to `proceed`.\nNote that if you opt to count version conflicts, the operation could attempt to update more documents from the source than `max_docs` until it has successfully updated `max_docs` documents or it has gone through every document in the source query.\n\nNOTE: Documents with a version equal to 0 cannot be updated using update by query because internal versioning does not support 0 as a valid version number.\n\nWhile processing an update by query request, Elasticsearch performs multiple search requests sequentially to find all of the matching documents.\nA bulk update request is performed for each batch of matching documents.\nAny query or update failures cause the update by query request to fail and the failures are shown in the response.\nAny update requests that completed successfully still stick, they are not rolled back.\n\n**Throttling update requests**\n\nTo control the rate at which update by query issues batches of update operations, you can set `requests_per_second` to any positive decimal number.\nThis pads each batch with a wait time to throttle the rate.\nSet `requests_per_second` to `-1` to turn off throttling.\n\nThrottling uses a wait time between batches so that the internal scroll requests can be given a timeout that takes the request padding into account.\nThe padding time is the difference between the batch size divided by the `requests_per_second` and the time spent writing.\nBy default the batch size is 1000, so if `requests_per_second` is set to `500`:\n\n```\ntarget_time = 1000 / 500 per second = 2 seconds\nwait_time = target_time - write_time = 2 seconds - .5 seconds = 1.5 seconds\n```\n\nSince the batch is issued as a single _bulk request, large batch sizes cause Elasticsearch to create many requests and wait before starting the next set.\nThis is \"bursty\" instead of \"smooth\".\n\n**Slicing**\n\nUpdate by query supports sliced scroll to parallelize the update process.\nThis can improve efficiency and provide a convenient way to break the request down into smaller parts.\n\nSetting `slices` to `auto` chooses a reasonable number for most data streams and indices.\nThis setting will use one slice per shard, up to a certain limit.\nIf there are multiple source data streams or indices, it will choose the number of slices based on the index or backing index with the smallest number of shards.\n\nAdding `slices` to `_update_by_query` just automates the manual process of creating sub-requests, which means it has some quirks:\n\n* You can see these requests in the tasks APIs. These sub-requests are \"child\" tasks of the task for the request with slices.\n* Fetching the status of the task for the request with `slices` only contains the status of completed slices.\n* These sub-requests are individually addressable for things like cancellation and rethrottling.\n* Rethrottling the request with `slices` will rethrottle the unfinished sub-request proportionally.\n* Canceling the request with slices will cancel each sub-request.\n* Due to the nature of slices each sub-request won't get a perfectly even portion of the documents. All documents will be addressed, but some slices may be larger than others. Expect larger slices to have a more even distribution.\n* Parameters like `requests_per_second` and `max_docs` on a request with slices are distributed proportionally to each sub-request. Combine that with the point above about distribution being uneven and you should conclude that using `max_docs` with `slices` might not result in exactly `max_docs` documents being updated.\n* Each sub-request gets a slightly different snapshot of the source data stream or index though these are all taken at approximately the same time.\n\nIf you're slicing manually or otherwise tuning automatic slicing, keep in mind that:\n\n* Query performance is most efficient when the number of slices is equal to the number of shards in the index or backing index. If that number is large (for example, 500), choose a lower number as too many slices hurts performance. Setting slices higher than the number of shards generally does not improve efficiency and adds overhead.\n* Update performance scales linearly across available resources with the number of slices.\n\nWhether query or update performance dominates the runtime depends on the documents being reindexed and cluster resources.\n\n**Update the document source**\n\nUpdate by query supports scripts to update the document source.\nAs with the update API, you can set `ctx.op` to change the operation that is performed.\n\nSet `ctx.op = \"noop\"` if your script decides that it doesn't have to make any changes.\nThe update by query operation skips updating the document and increments the `noop` counter.\n\nSet `ctx.op = \"delete\"` if your script decides that the document should be deleted.\nThe update by query operation deletes the document and increments the `deleted` counter.\n\nUpdate by query supports only `index`, `noop`, and `delete`.\nSetting `ctx.op` to anything else is an error.\nSetting any other field in `ctx` is an error.\nThis API enables you to only modify the source of matching documents; you cannot move them.", + "description": "Update documents.\nUpdates documents that match the specified query.\nIf no query is specified, performs an update on every document in the data stream or index without modifying the source, which is useful for picking up mapping changes.\n\nIf the Elasticsearch security features are enabled, you must have the following index privileges for the target data stream, index, or alias:\n\n* `read`\n* `index` or `write`\n\nYou can specify the query criteria in the request URI or the request body using the same syntax as the search API.\n\nWhen you submit an update by query request, Elasticsearch gets a snapshot of the data stream or index when it begins processing the request and updates matching documents using internal versioning.\nWhen the versions match, the document is updated and the version number is incremented.\nIf a document changes between the time that the snapshot is taken and the update operation is processed, it results in a version conflict and the operation fails.\nYou can opt to count version conflicts instead of halting and returning by setting `conflicts` to `proceed`.\nNote that if you opt to count version conflicts, the operation could attempt to update more documents from the source than `max_docs` until it has successfully updated `max_docs` documents or it has gone through every document in the source query.\n\nNOTE: Documents with a version equal to 0 cannot be updated using update by query because internal versioning does not support 0 as a valid version number.\n\nWhile processing an update by query request, Elasticsearch performs multiple search requests sequentially to find all of the matching documents.\nA bulk update request is performed for each batch of matching documents.\nAny query or update failures cause the update by query request to fail and the failures are shown in the response.\nAny update requests that completed successfully still stick, they are not rolled back.\n\n**Refreshing shards**\n\nSpecifying the `refresh` parameter refreshes all shards once the request completes.\nThis is different to the update API's `refresh` parameter, which causes only the shard\nthat received the request to be refreshed. Unlike the update API, it does not support\n`wait_for`.\n\n**Running update by query asynchronously**\n\nIf the request contains `wait_for_completion=false`, Elasticsearch\nperforms some preflight checks, launches the request, and returns a\n[task](https://www.elastic.co/docs/api/doc/elasticsearch/group/endpoint-tasks) you can use to cancel or get the status of the task.\nElasticsearch creates a record of this task as a document at `.tasks/task/${taskId}`.\n\n**Waiting for active shards**\n\n`wait_for_active_shards` controls how many copies of a shard must be active\nbefore proceeding with the request. See [`wait_for_active_shards`](https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-create#operation-create-wait_for_active_shards)\nfor details. `timeout` controls how long each write request waits for unavailable\nshards to become available. Both work exactly the way they work in the\n[Bulk API](https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-bulk). Update by query uses scrolled searches, so you can also\nspecify the `scroll` parameter to control how long it keeps the search context\nalive, for example `?scroll=10m`. The default is 5 minutes.\n\n**Throttling update requests**\n\nTo control the rate at which update by query issues batches of update operations, you can set `requests_per_second` to any positive decimal number.\nThis pads each batch with a wait time to throttle the rate.\nSet `requests_per_second` to `-1` to turn off throttling.\n\nThrottling uses a wait time between batches so that the internal scroll requests can be given a timeout that takes the request padding into account.\nThe padding time is the difference between the batch size divided by the `requests_per_second` and the time spent writing.\nBy default the batch size is 1000, so if `requests_per_second` is set to `500`:\n\n```\ntarget_time = 1000 / 500 per second = 2 seconds\nwait_time = target_time - write_time = 2 seconds - .5 seconds = 1.5 seconds\n```\n\nSince the batch is issued as a single _bulk request, large batch sizes cause Elasticsearch to create many requests and wait before starting the next set.\nThis is \"bursty\" instead of \"smooth\".\n\n**Slicing**\n\nUpdate by query supports sliced scroll to parallelize the update process.\nThis can improve efficiency and provide a convenient way to break the request down into smaller parts.\n\nSetting `slices` to `auto` chooses a reasonable number for most data streams and indices.\nThis setting will use one slice per shard, up to a certain limit.\nIf there are multiple source data streams or indices, it will choose the number of slices based on the index or backing index with the smallest number of shards.\n\nAdding `slices` to `_update_by_query` just automates the manual process of creating sub-requests, which means it has some quirks:\n\n* You can see these requests in the tasks APIs. These sub-requests are \"child\" tasks of the task for the request with slices.\n* Fetching the status of the task for the request with `slices` only contains the status of completed slices.\n* These sub-requests are individually addressable for things like cancellation and rethrottling.\n* Rethrottling the request with `slices` will rethrottle the unfinished sub-request proportionally.\n* Canceling the request with slices will cancel each sub-request.\n* Due to the nature of slices each sub-request won't get a perfectly even portion of the documents. All documents will be addressed, but some slices may be larger than others. Expect larger slices to have a more even distribution.\n* Parameters like `requests_per_second` and `max_docs` on a request with slices are distributed proportionally to each sub-request. Combine that with the point above about distribution being uneven and you should conclude that using `max_docs` with `slices` might not result in exactly `max_docs` documents being updated.\n* Each sub-request gets a slightly different snapshot of the source data stream or index though these are all taken at approximately the same time.\n\nIf you're slicing manually or otherwise tuning automatic slicing, keep in mind that:\n\n* Query performance is most efficient when the number of slices is equal to the number of shards in the index or backing index. If that number is large (for example, 500), choose a lower number as too many slices hurts performance. Setting slices higher than the number of shards generally does not improve efficiency and adds overhead.\n* Update performance scales linearly across available resources with the number of slices.\n\nWhether query or update performance dominates the runtime depends on the documents being reindexed and cluster resources.\nRefer to the linked documentation for examples of how to update documents using the `_update_by_query` API:", "docId": "docs-update-by-query", "docTag": "document", "docUrl": "https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-update-by-query", + "extDocId": "update-by-query", + "extDocUrl": "https://www.elastic.co/docs/reference/elasticsearch/rest-apis/update-by-query-api", "extPreviousVersionDocUrl": "https://www.elastic.co/guide/en/elasticsearch/reference/8.18/docs-update-by-query.html", "name": "update_by_query", "privileges": { @@ -26080,271 +26249,237 @@ }, { "description": "The name of the data stream or index to target.\nIf the target doesn't exist and matches the name or wildcard (`*`) pattern of an index template with a `data_stream` definition, this request creates the data stream.\nIf the target doesn't exist and doesn’t match a data stream template, this request creates the index.", - "name": "index", - "required": true, - "type": { - "kind": "instance_of", - "type": { - "name": "IndexName", - "namespace": "_types" - } - } - } - ], - "query": [ - { - "description": "Only perform the operation if the document has this primary term.", - "extDocId": "optimistic-concurrency", - "extDocUrl": "https://www.elastic.co/docs/reference/elasticsearch/rest-apis/optimistic-concurrency-control", - "name": "if_primary_term", - "required": false, - "type": { - "kind": "instance_of", - "type": { - "name": "long", - "namespace": "_types" - } - } - }, - { - "description": "Only perform the operation if the document has this sequence number.", - "extDocId": "optimistic-concurrency", - "extDocUrl": "https://www.elastic.co/docs/reference/elasticsearch/rest-apis/optimistic-concurrency-control", - "name": "if_seq_no", - "required": false, - "type": { - "kind": "instance_of", - "type": { - "name": "SequenceNumber", - "namespace": "_types" - } - } - }, - { - "description": "True or false if to include the document source in the error message in case of parsing errors.", - "name": "include_source_on_error", - "required": false, - "serverDefault": true, - "type": { - "kind": "instance_of", - "type": { - "name": "boolean", - "namespace": "_builtins" - } - } - }, - { - "description": "Set to `create` to only index the document if it does not already exist (put if absent).\nIf a document with the specified `_id` already exists, the indexing operation will fail.\nThe behavior is the same as using the `/_create` endpoint.\nIf a document ID is specified, this paramater defaults to `index`.\nOtherwise, it defaults to `create`.\nIf the request targets a data stream, an `op_type` of `create` is required.", - "name": "op_type", - "required": false, - "type": { - "kind": "instance_of", - "type": { - "name": "OpType", - "namespace": "_types" - } - } - }, - { - "description": "The ID of the pipeline to use to preprocess incoming documents.\nIf the index has a default ingest pipeline specified, setting the value to `_none` turns off the default ingest pipeline for this request.\nIf a final pipeline is configured, it will always run regardless of the value of this parameter.", - "name": "pipeline", - "required": false, - "type": { - "kind": "instance_of", - "type": { - "name": "string", - "namespace": "_builtins" - } - } - }, - { - "description": "If `true`, Elasticsearch refreshes the affected shards to make this operation visible to search.\nIf `wait_for`, it waits for a refresh to make this operation visible to search.\nIf `false`, it does nothing with refreshes.", - "name": "refresh", - "required": false, - "serverDefault": "false", - "type": { - "kind": "instance_of", - "type": { - "name": "Refresh", - "namespace": "_types" - } - } - }, - { - "description": "If `true`, the destination must be an index alias.", - "name": "require_alias", - "required": false, - "serverDefault": false, - "type": { - "kind": "instance_of", - "type": { - "name": "boolean", - "namespace": "_builtins" - } - } - }, - { - "description": "If `true`, the request's actions must target a data stream (existing or to be created).", - "name": "require_data_stream", - "required": false, - "serverDefault": false, - "type": { - "kind": "instance_of", - "type": { - "name": "boolean", - "namespace": "_builtins" - } - } - }, - { - "description": "A custom value that is used to route operations to a specific shard.", - "name": "routing", - "required": false, - "type": { - "kind": "instance_of", - "type": { - "name": "Routing", - "namespace": "_types" - } - } - }, - { - "description": "The period the request waits for the following operations: automatic index creation, dynamic mapping updates, waiting for active shards.\nElasticsearch waits for at least the specified timeout period before failing.\nThe actual wait time could be longer, particularly when multiple waits occur.\n\nThis parameter is useful for situations where the primary shard assigned to perform the operation might not be available when the operation runs.\nSome reasons for this might be that the primary shard is currently recovering from a gateway or undergoing relocation.\nBy default, the operation will wait on the primary shard to become available for at least 1 minute before failing and responding with an error.\nThe actual wait time could be longer, particularly when multiple waits occur.", - "name": "timeout", - "required": false, - "serverDefault": "1m", - "type": { - "kind": "instance_of", - "type": { - "name": "Duration", - "namespace": "_types" - } - } - }, - { - "description": "The explicit version number for concurrency control.\nIt must be a non-negative long number.", - "name": "version", - "required": false, - "type": { - "kind": "instance_of", - "type": { - "name": "VersionNumber", - "namespace": "_types" - } - } - }, - { - "description": "The version type.", - "name": "version_type", - "required": false, - "type": { - "kind": "instance_of", - "type": { - "name": "VersionType", - "namespace": "_types" - } - } - }, - { - "description": "The number of shard copies that must be active before proceeding with the operation.\nYou can set it to `all` or any positive integer up to the total number of shards in the index (`number_of_replicas+1`).\nThe default value of `1` means it waits for each primary shard to be active.", - "name": "wait_for_active_shards", - "required": false, - "serverDefault": "1", - "type": { - "kind": "instance_of", - "type": { - "name": "WaitForActiveShards", - "namespace": "_types" - } - } - } - ], - "specLocation": "_global/create/CreateRequest.ts#L35-L221" - }, - { - "kind": "response", - "body": { - "kind": "value", - "codegenName": "result", - "value": { - "kind": "instance_of", - "type": { - "name": "WriteResponseBase", - "namespace": "_types" - } - } - }, - "name": { - "name": "Response", - "namespace": "_global.create" - }, - "specLocation": "_global/create/CreateResponse.ts#L22-L25" - }, - { - "kind": "request", - "attachedBehaviors": [ - "CommonQueryParameters" - ], - "body": { - "kind": "no_body" - }, - "description": "Delete a document.\n\nRemove a JSON document from the specified index.\n\nNOTE: You cannot send deletion requests directly to a data stream.\nTo delete a document in a data stream, you must target the backing index containing the document.\n\n**Optimistic concurrency control**\n\nDelete operations can be made conditional and only be performed if the last modification to the document was assigned the sequence number and primary term specified by the `if_seq_no` and `if_primary_term` parameters.\nIf a mismatch is detected, the operation will result in a `VersionConflictException` and a status code of `409`.\n\n**Versioning**\n\nEach document indexed is versioned.\nWhen deleting a document, the version can be specified to make sure the relevant document you are trying to delete is actually being deleted and it has not changed in the meantime.\nEvery write operation run on a document, deletes included, causes its version to be incremented.\nThe version number of a deleted document remains available for a short time after deletion to allow for control of concurrent operations.\nThe length of time for which a deleted document's version remains available is determined by the `index.gc_deletes` index setting.\n\n**Routing**\n\nIf routing is used during indexing, the routing value also needs to be specified to delete a document.\n\nIf the `_routing` mapping is set to `required` and no routing value is specified, the delete API throws a `RoutingMissingException` and rejects the request.\n\nFor example:\n\n```\nDELETE /my-index-000001/_doc/1?routing=shard-1\n```\n\nThis request deletes the document with ID 1, but it is routed based on the user.\nThe document is not deleted if the correct routing is not specified.\n\n**Distributed**\n\nThe delete operation gets hashed into a specific shard ID.\nIt then gets redirected into the primary shard within that ID group and replicated (if needed) to shard replicas within that ID group.", - "examples": { - "DeleteRequestExample1": { - "alternatives": [ - { - "code": "resp = client.delete(\n index=\"my-index-000001\",\n id=\"1\",\n)", - "language": "Python" - }, - { - "code": "const response = await client.delete({\n index: \"my-index-000001\",\n id: 1,\n});", - "language": "JavaScript" - }, - { - "code": "response = client.delete(\n index: \"my-index-000001\",\n id: \"1\"\n)", - "language": "Ruby" - }, - { - "code": "$resp = $client->delete([\n \"index\" => \"my-index-000001\",\n \"id\" => \"1\",\n]);", - "language": "PHP" - }, - { - "code": "curl -X DELETE -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/my-index-000001/_doc/1\"", - "language": "curl" - }, - { - "code": "client.delete(d -> d\n .id(\"1\")\n .index(\"my-index-000001\")\n);\n", - "language": "Java" - } - ], - "method_request": "DELETE /my-index-000001/_doc/1" - } - }, - "inherits": { - "type": { - "name": "RequestBase", - "namespace": "_types" - } - }, - "name": { - "name": "Request", - "namespace": "_global.delete" - }, - "path": [ - { - "description": "A unique identifier for the document.", - "name": "id", - "required": true, - "type": { - "kind": "instance_of", - "type": { - "name": "Id", - "namespace": "_types" - } - } - }, - { - "description": "The name of the target index.", + "name": "index", + "required": true, + "type": { + "kind": "instance_of", + "type": { + "name": "IndexName", + "namespace": "_types" + } + } + } + ], + "query": [ + { + "description": "True or false if to include the document source in the error message in case of parsing errors.", + "name": "include_source_on_error", + "required": false, + "serverDefault": true, + "type": { + "kind": "instance_of", + "type": { + "name": "boolean", + "namespace": "_builtins" + } + } + }, + { + "description": "The ID of the pipeline to use to preprocess incoming documents.\nIf the index has a default ingest pipeline specified, setting the value to `_none` turns off the default ingest pipeline for this request.\nIf a final pipeline is configured, it will always run regardless of the value of this parameter.", + "name": "pipeline", + "required": false, + "type": { + "kind": "instance_of", + "type": { + "name": "string", + "namespace": "_builtins" + } + } + }, + { + "description": "If `true`, Elasticsearch refreshes the affected shards to make this operation visible to search.\nIf `wait_for`, it waits for a refresh to make this operation visible to search.\nIf `false`, it does nothing with refreshes.", + "name": "refresh", + "required": false, + "serverDefault": "false", + "type": { + "kind": "instance_of", + "type": { + "name": "Refresh", + "namespace": "_types" + } + } + }, + { + "description": "If `true`, the destination must be an index alias.", + "name": "require_alias", + "required": false, + "serverDefault": false, + "type": { + "kind": "instance_of", + "type": { + "name": "boolean", + "namespace": "_builtins" + } + } + }, + { + "description": "If `true`, the request's actions must target a data stream (existing or to be created).", + "name": "require_data_stream", + "required": false, + "serverDefault": false, + "type": { + "kind": "instance_of", + "type": { + "name": "boolean", + "namespace": "_builtins" + } + } + }, + { + "description": "A custom value that is used to route operations to a specific shard.", + "name": "routing", + "required": false, + "type": { + "kind": "instance_of", + "type": { + "name": "Routing", + "namespace": "_types" + } + } + }, + { + "description": "The period the request waits for the following operations: automatic index creation, dynamic mapping updates, waiting for active shards.\nElasticsearch waits for at least the specified timeout period before failing.\nThe actual wait time could be longer, particularly when multiple waits occur.\n\nThis parameter is useful for situations where the primary shard assigned to perform the operation might not be available when the operation runs.\nSome reasons for this might be that the primary shard is currently recovering from a gateway or undergoing relocation.\nBy default, the operation will wait on the primary shard to become available for at least 1 minute before failing and responding with an error.\nThe actual wait time could be longer, particularly when multiple waits occur.", + "name": "timeout", + "required": false, + "serverDefault": "1m", + "type": { + "kind": "instance_of", + "type": { + "name": "Duration", + "namespace": "_types" + } + } + }, + { + "description": "The explicit version number for concurrency control.\nIt must be a non-negative long number.", + "name": "version", + "required": false, + "type": { + "kind": "instance_of", + "type": { + "name": "VersionNumber", + "namespace": "_types" + } + } + }, + { + "description": "The version type.", + "name": "version_type", + "required": false, + "type": { + "kind": "instance_of", + "type": { + "name": "VersionType", + "namespace": "_types" + } + } + }, + { + "description": "The number of shard copies that must be active before proceeding with the operation.\nYou can set it to `all` or any positive integer up to the total number of shards in the index (`number_of_replicas+1`).\nThe default value of `1` means it waits for each primary shard to be active.", + "name": "wait_for_active_shards", + "required": false, + "serverDefault": "1", + "type": { + "kind": "instance_of", + "type": { + "name": "WaitForActiveShards", + "namespace": "_types" + } + } + } + ], + "specLocation": "_global/create/CreateRequest.ts#L32-L199" + }, + { + "kind": "response", + "body": { + "kind": "value", + "codegenName": "result", + "value": { + "kind": "instance_of", + "type": { + "name": "WriteResponseBase", + "namespace": "_types" + } + } + }, + "examples": { + "CreateResponseExample1": { + "description": "A successful response from `PUT my-index-000001/_create/1` which indexes a document.", + "value": "{\n \"_index\": \"my-index-000001\",\n \"_id\": \"1\",\n \"_version\": 1,\n \"result\": \"created\",\n \"_shards\": {\n \"total\": 1,\n \"successful\": 1,\n \"failed\": 0\n },\n \"_seq_no\": 0,\n \"_primary_term\": 1\n}" + } + }, + "name": { + "name": "Response", + "namespace": "_global.create" + }, + "specLocation": "_global/create/CreateResponse.ts#L22-L25" + }, + { + "kind": "request", + "attachedBehaviors": [ + "CommonQueryParameters" + ], + "body": { + "kind": "no_body" + }, + "description": "Delete a document.\n\nRemove a JSON document from the specified index.\n\nNOTE: You cannot send deletion requests directly to a data stream.\nTo delete a document in a data stream, you must target the backing index containing the document.\n\n**Optimistic concurrency control**\n\nDelete operations can be made conditional and only be performed if the last modification to the document was assigned the sequence number and primary term specified by the `if_seq_no` and `if_primary_term` parameters.\nIf a mismatch is detected, the operation will result in a `VersionConflictException` and a status code of `409`.\n\n**Versioning**\n\nEach document indexed is versioned.\nWhen deleting a document, the version can be specified to make sure the relevant document you are trying to delete is actually being deleted and it has not changed in the meantime.\nEvery write operation run on a document, deletes included, causes its version to be incremented.\nThe version number of a deleted document remains available for a short time after deletion to allow for control of concurrent operations.\nThe length of time for which a deleted document's version remains available is determined by the `index.gc_deletes` index setting.\n\n**Routing**\n\nIf routing is used during indexing, the routing value also needs to be specified to delete a document.\n\nIf the `_routing` mapping is set to `required` and no routing value is specified, the delete API throws a `RoutingMissingException` and rejects the request.\n\nFor example:\n\n```\nDELETE /my-index-000001/_doc/1?routing=shard-1\n```\n\nThis request deletes the document with ID 1, but it is routed based on the user.\nThe document is not deleted if the correct routing is not specified.\n\n**Distributed**\n\nThe delete operation gets hashed into a specific shard ID.\nIt then gets redirected into the primary shard within that ID group and replicated (if needed) to shard replicas within that ID group.", + "examples": { + "DeleteRequestExample1": { + "alternatives": [ + { + "code": "resp = client.delete(\n index=\"my-index-000001\",\n id=\"1\",\n)", + "language": "Python" + }, + { + "code": "const response = await client.delete({\n index: \"my-index-000001\",\n id: 1,\n});", + "language": "JavaScript" + }, + { + "code": "response = client.delete(\n index: \"my-index-000001\",\n id: \"1\"\n)", + "language": "Ruby" + }, + { + "code": "$resp = $client->delete([\n \"index\" => \"my-index-000001\",\n \"id\" => \"1\",\n]);", + "language": "PHP" + }, + { + "code": "curl -X DELETE -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/my-index-000001/_doc/1\"", + "language": "curl" + }, + { + "code": "client.delete(d -> d\n .id(\"1\")\n .index(\"my-index-000001\")\n);\n", + "language": "Java" + } + ], + "method_request": "DELETE /my-index-000001/_doc/1" + } + }, + "inherits": { + "type": { + "name": "RequestBase", + "namespace": "_types" + } + }, + "name": { + "name": "Request", + "namespace": "_global.delete" + }, + "path": [ + { + "description": "A unique identifier for the document.", + "name": "id", + "required": true, + "type": { + "kind": "instance_of", + "type": { + "name": "Id", + "namespace": "_types" + } + } + }, + { + "description": "The name of the target index.", "name": "index", "required": true, "type": { @@ -29972,18 +30107,6 @@ } } }, - { - "description": "A comma-separated list of stored fields to return as part of a hit.", - "name": "stored_fields", - "required": false, - "type": { - "kind": "instance_of", - "type": { - "name": "Fields", - "namespace": "_types" - } - } - }, { "description": "The version number for concurrency control.\nIt must match the current version of the document for the request to succeed.", "name": "version", @@ -30009,7 +30132,7 @@ } } ], - "specLocation": "_global/get_source/SourceRequest.ts#L31-L116" + "specLocation": "_global/get_source/SourceRequest.ts#L31-L112" }, { "kind": "response", @@ -30094,7 +30217,7 @@ } } ], - "specLocation": "_global/health_report/types.ts#L44-L49" + "specLocation": "_global/health_report/types.ts#L45-L50" }, { "kind": "interface", @@ -30140,7 +30263,7 @@ } } ], - "specLocation": "_global/health_report/types.ts#L153-L157" + "specLocation": "_global/health_report/types.ts#L154-L158" }, { "kind": "interface", @@ -30168,7 +30291,7 @@ } } ], - "specLocation": "_global/health_report/types.ts#L148-L152" + "specLocation": "_global/health_report/types.ts#L149-L153" }, { "kind": "interface", @@ -30233,7 +30356,7 @@ } } ], - "specLocation": "_global/health_report/types.ts#L51-L57" + "specLocation": "_global/health_report/types.ts#L52-L58" }, { "kind": "interface", @@ -30310,7 +30433,7 @@ } } ], - "specLocation": "_global/health_report/types.ts#L59-L65" + "specLocation": "_global/health_report/types.ts#L60-L66" }, { "kind": "interface", @@ -30338,7 +30461,7 @@ } } ], - "specLocation": "_global/health_report/types.ts#L124-L128" + "specLocation": "_global/health_report/types.ts#L125-L129" }, { "kind": "interface", @@ -30403,7 +30526,7 @@ } } ], - "specLocation": "_global/health_report/types.ts#L129-L135" + "specLocation": "_global/health_report/types.ts#L130-L136" }, { "kind": "interface", @@ -30431,7 +30554,7 @@ } } ], - "specLocation": "_global/health_report/types.ts#L207-L211" + "specLocation": "_global/health_report/types.ts#L208-L212" }, { "kind": "interface", @@ -30463,7 +30586,7 @@ } } ], - "specLocation": "_global/health_report/types.ts#L213-L216" + "specLocation": "_global/health_report/types.ts#L214-L217" }, { "kind": "interface", @@ -30491,7 +30614,7 @@ } } ], - "specLocation": "_global/health_report/types.ts#L164-L168" + "specLocation": "_global/health_report/types.ts#L165-L169" }, { "kind": "interface", @@ -30534,7 +30657,7 @@ } } ], - "specLocation": "_global/health_report/types.ts#L169-L173" + "specLocation": "_global/health_report/types.ts#L170-L174" }, { "kind": "interface", @@ -30591,7 +30714,7 @@ } } ], - "specLocation": "_global/health_report/types.ts#L67-L72" + "specLocation": "_global/health_report/types.ts#L68-L73" }, { "kind": "enum", @@ -30613,7 +30736,7 @@ "name": "ImpactArea", "namespace": "_global.health_report" }, - "specLocation": "_global/health_report/types.ts#L74-L79" + "specLocation": "_global/health_report/types.ts#L75-L80" }, { "kind": "enum", @@ -30629,13 +30752,16 @@ }, { "name": "unknown" + }, + { + "name": "unavailable" } ], "name": { "name": "IndicatorHealthStatus", "namespace": "_global.health_report" }, - "specLocation": "_global/health_report/types.ts#L25-L30" + "specLocation": "_global/health_report/types.ts#L25-L31" }, { "kind": "interface", @@ -30691,7 +30817,7 @@ } } ], - "specLocation": "_global/health_report/types.ts#L92-L95" + "specLocation": "_global/health_report/types.ts#L93-L96" }, { "kind": "interface", @@ -30800,7 +30926,7 @@ } } ], - "specLocation": "_global/health_report/types.ts#L32-L42" + "specLocation": "_global/health_report/types.ts#L33-L43" }, { "kind": "interface", @@ -30828,7 +30954,7 @@ } } ], - "specLocation": "_global/health_report/types.ts#L81-L85" + "specLocation": "_global/health_report/types.ts#L82-L86" }, { "kind": "interface", @@ -30871,7 +30997,7 @@ } } ], - "specLocation": "_global/health_report/types.ts#L100-L104" + "specLocation": "_global/health_report/types.ts#L101-L105" }, { "kind": "interface", @@ -30931,7 +31057,7 @@ } } ], - "specLocation": "_global/health_report/types.ts#L86-L91" + "specLocation": "_global/health_report/types.ts#L87-L92" }, { "kind": "interface", @@ -30963,7 +31089,7 @@ } } ], - "specLocation": "_global/health_report/types.ts#L96-L99" + "specLocation": "_global/health_report/types.ts#L97-L100" }, { "kind": "interface", @@ -30991,7 +31117,7 @@ } } ], - "specLocation": "_global/health_report/types.ts#L137-L141" + "specLocation": "_global/health_report/types.ts#L138-L142" }, { "kind": "interface", @@ -31037,7 +31163,7 @@ } } ], - "specLocation": "_global/health_report/types.ts#L142-L146" + "specLocation": "_global/health_report/types.ts#L143-L147" }, { "kind": "request", @@ -31232,7 +31358,7 @@ } } ], - "specLocation": "_global/health_report/types.ts#L106-L110" + "specLocation": "_global/health_report/types.ts#L107-L111" }, { "kind": "interface", @@ -31352,7 +31478,7 @@ } } ], - "specLocation": "_global/health_report/types.ts#L111-L122" + "specLocation": "_global/health_report/types.ts#L112-L123" }, { "kind": "interface", @@ -31380,7 +31506,7 @@ } } ], - "specLocation": "_global/health_report/types.ts#L191-L195" + "specLocation": "_global/health_report/types.ts#L192-L196" }, { "kind": "interface", @@ -31412,7 +31538,7 @@ } } ], - "specLocation": "_global/health_report/types.ts#L197-L200" + "specLocation": "_global/health_report/types.ts#L198-L201" }, { "kind": "interface", @@ -31444,7 +31570,7 @@ } } ], - "specLocation": "_global/health_report/types.ts#L202-L205" + "specLocation": "_global/health_report/types.ts#L203-L206" }, { "kind": "interface", @@ -31472,7 +31598,7 @@ } } ], - "specLocation": "_global/health_report/types.ts#L175-L179" + "specLocation": "_global/health_report/types.ts#L176-L180" }, { "kind": "interface", @@ -31515,7 +31641,7 @@ } } ], - "specLocation": "_global/health_report/types.ts#L180-L184" + "specLocation": "_global/health_report/types.ts#L181-L185" }, { "kind": "interface", @@ -31558,7 +31684,7 @@ } } ], - "specLocation": "_global/health_report/types.ts#L186-L189" + "specLocation": "_global/health_report/types.ts#L187-L190" }, { "kind": "interface", @@ -31601,7 +31727,7 @@ } } ], - "specLocation": "_global/health_report/types.ts#L158-L162" + "specLocation": "_global/health_report/types.ts#L159-L163" }, { "kind": "request", @@ -31881,9 +32007,22 @@ "namespace": "_builtins" } } + }, + { + "description": "If `true`, the request's actions must target a data stream (existing or to be created).", + "name": "require_data_stream", + "required": false, + "serverDefault": false, + "type": { + "kind": "instance_of", + "type": { + "name": "boolean", + "namespace": "_builtins" + } + } } ], - "specLocation": "_global/index/IndexRequest.ts#L35-L268" + "specLocation": "_global/index/IndexRequest.ts#L35-L273" }, { "kind": "response", @@ -31924,7 +32063,7 @@ "body": { "kind": "no_body" }, - "description": "Get cluster info.\nGet basic build, version, and cluster information.", + "description": "Get cluster info.\nGet basic build, version, and cluster information.\n::: In Serverless, this API is retained for backward compatibility only. Some response fields, such as the version number, should be ignored.", "examples": { "RootNodeInfoRequestExample1": { "alternatives": [ @@ -31968,7 +32107,7 @@ }, "path": [], "query": [], - "specLocation": "_global/info/RootNodeInfoRequest.ts#L22-L39" + "specLocation": "_global/info/RootNodeInfoRequest.ts#L22-L40" }, { "kind": "response", @@ -32037,8 +32176,14 @@ }, "examples": { "RootNodeInfoResponseExample1": { - "description": "A successful response from `GET /`s.", - "value": "{\n \"name\": \"instance-0000000000\",\n \"cluster_name\": \"my_test_cluster\",\n \"cluster_uuid\": \"5QaxoN0pRZuOmWSxstBBwQ\",\n \"version\": {\n \"build_date\": \"2024-02-01T13:07:13.727175297Z\",\n \"minimum_wire_compatibility_version\": \"7.17.0\",\n \"build_hash\": \"6185ba65d27469afabc9bc951cded6c17c21e3f3\",\n \"number\": \"8.12.1\",\n \"lucene_version\": \"9.9.2\",\n \"minimum_index_compatibility_version\": \"7.0.0\",\n \"build_flavor\": \"default\",\n \"build_snapshot\": false,\n \"build_type\": \"docker\"\n },\n \"tagline\": \"You Know, for Search\"\n}" + "description": "A successful response from `GET /`.", + "summary": "Stack response", + "value": "{\n \"name\": \"instance-0000000000\",\n \"cluster_name\": \"my_test_cluster\",\n \"cluster_uuid\": \"zk-HjQtYQGyL3NFSSu7InA\",\n \"version\": {\n \"number\": \"9.1.0\",\n \"build_flavor\": \"default\",\n \"build_type\": \"docker\",\n \"build_hash\": 0,\n \"build_date\": \"2025-07-09T22:10:13.578Z\",\n \"build_snapshot\": false,\n \"lucene_version\": \"10.2.2\",\n \"minimum_wire_compatibility_version\": \"8.19.0\",\n \"minimum_index_compatibility_version\": \"8.0.0\"\n },\n \"tagline\": \"You Know, for Search\"\n}" + }, + "RootNodeInfoResponseExample2": { + "description": "A successful response from `GET /` on Serverless. This API is retained for backward compatibility only. Some fields, such as the version number, return static values and should be ignored.", + "summary": "Serverless response", + "value": "{\n \"name\": \"serverless\",\n \"cluster_name\": \"my_test_serverless_cluster\",\n \"cluster_uuid\": \"8xx0pi24Squnf4PFDOAtwg\",\n \"version\": {\n \"number\": \"8.11.0\",\n \"build_flavor\": \"serverless\",\n \"build_type\": \"docker\",\n \"build_hash\": 0,\n \"build_date\": \"2023-10-31T00:00:00.000Z\",\n \"build_snapshot\": false,\n \"lucene_version\": \"9.7.0\",\n \"minimum_wire_compatibility_version\": \"8.11.0\",\n \"minimum_index_compatibility_version\": \"8.11.0\"\n },\n \"tagline\": \"You Know, for Search\"\n}" } }, "name": { @@ -32963,6 +33108,18 @@ } } }, + { + "description": "Comma-separated list of data streams, indices, and index aliases to use as default", + "name": "index", + "required": false, + "type": { + "kind": "instance_of", + "type": { + "name": "Indices", + "namespace": "_types" + } + } + }, { "description": "Maximum number of concurrent searches the multi search API can execute.\nDefaults to `max(1, (# of data nodes * min(search thread pool size, 10)))`.", "name": "max_concurrent_searches", @@ -33050,7 +33207,7 @@ } } ], - "specLocation": "_global/msearch/MultiSearchRequest.ts#L25-L136" + "specLocation": "_global/msearch/MultiSearchRequest.ts#L25-L140" }, { "kind": "type_alias", @@ -35595,6 +35752,342 @@ "method_request": "POST _reindex", "summary": "Reindex multiple sources", "value": "{\n \"source\": {\n \"index\": [\"my-index-000001\", \"my-index-000002\"]\n },\n \"dest\": {\n \"index\": \"my-new-index-000002\"\n }\n}" + }, + "ReindexRequestExample10": { + "alternatives": [ + { + "code": "resp = client.reindex(\n source={\n \"index\": \"metricbeat-*\"\n },\n dest={\n \"index\": \"metricbeat\"\n },\n script={\n \"lang\": \"painless\",\n \"source\": \"ctx._index = 'metricbeat-' + (ctx._index.substring('metricbeat-'.length(), ctx._index.length())) + '-1'\"\n },\n)", + "language": "Python" + }, + { + "code": "const response = await client.reindex({\n source: {\n index: \"metricbeat-*\",\n },\n dest: {\n index: \"metricbeat\",\n },\n script: {\n lang: \"painless\",\n source:\n \"ctx._index = 'metricbeat-' + (ctx._index.substring('metricbeat-'.length(), ctx._index.length())) + '-1'\",\n },\n});", + "language": "JavaScript" + }, + { + "code": "response = client.reindex(\n body: {\n \"source\": {\n \"index\": \"metricbeat-*\"\n },\n \"dest\": {\n \"index\": \"metricbeat\"\n },\n \"script\": {\n \"lang\": \"painless\",\n \"source\": \"ctx._index = 'metricbeat-' + (ctx._index.substring('metricbeat-'.length(), ctx._index.length())) + '-1'\"\n }\n }\n)", + "language": "Ruby" + }, + { + "code": "$resp = $client->reindex([\n \"body\" => [\n \"source\" => [\n \"index\" => \"metricbeat-*\",\n ],\n \"dest\" => [\n \"index\" => \"metricbeat\",\n ],\n \"script\" => [\n \"lang\" => \"painless\",\n \"source\" => \"ctx._index = 'metricbeat-' + (ctx._index.substring('metricbeat-'.length(), ctx._index.length())) + '-1'\",\n ],\n ],\n]);", + "language": "PHP" + }, + { + "code": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"source\":{\"index\":\"metricbeat-*\"},\"dest\":{\"index\":\"metricbeat\"},\"script\":{\"lang\":\"painless\",\"source\":\"ctx._index = '\"'\"'metricbeat-'\"'\"' + (ctx._index.substring('\"'\"'metricbeat-'\"'\"'.length(), ctx._index.length())) + '\"'\"'-1'\"'\"'\"}}' \"$ELASTICSEARCH_URL/_reindex\"", + "language": "curl" + } + ], + "description": "You can use Painless to reindex daily indices to apply a new template to the existing documents. The script extracts the date from the index name and creates a new index with `-1` appended. For example, all data from `metricbeat-2016.05.31` will be reindexed into `metricbeat-2016.05.31-1`.\n", + "method_request": "POST _reindex", + "summary": "Reindex with Painless", + "value": "{\n \"source\": {\n \"index\": \"metricbeat-*\"\n },\n \"dest\": {\n \"index\": \"metricbeat\"\n },\n \"script\": {\n \"lang\": \"painless\",\n \"source\": \"ctx._index = 'metricbeat-' + (ctx._index.substring('metricbeat-'.length(), ctx._index.length())) + '-1'\"\n }\n}" + }, + "ReindexRequestExample11": { + "alternatives": [ + { + "code": "resp = client.reindex(\n max_docs=10,\n source={\n \"index\": \"my-index-000001\",\n \"query\": {\n \"function_score\": {\n \"random_score\": {},\n \"min_score\": 0.9\n }\n }\n },\n dest={\n \"index\": \"my-new-index-000001\"\n },\n)", + "language": "Python" + }, + { + "code": "const response = await client.reindex({\n max_docs: 10,\n source: {\n index: \"my-index-000001\",\n query: {\n function_score: {\n random_score: {},\n min_score: 0.9,\n },\n },\n },\n dest: {\n index: \"my-new-index-000001\",\n },\n});", + "language": "JavaScript" + }, + { + "code": "response = client.reindex(\n body: {\n \"max_docs\": 10,\n \"source\": {\n \"index\": \"my-index-000001\",\n \"query\": {\n \"function_score\": {\n \"random_score\": {},\n \"min_score\": 0.9\n }\n }\n },\n \"dest\": {\n \"index\": \"my-new-index-000001\"\n }\n }\n)", + "language": "Ruby" + }, + { + "code": "$resp = $client->reindex([\n \"body\" => [\n \"max_docs\" => 10,\n \"source\" => [\n \"index\" => \"my-index-000001\",\n \"query\" => [\n \"function_score\" => [\n \"random_score\" => new ArrayObject([]),\n \"min_score\" => 0.9,\n ],\n ],\n ],\n \"dest\" => [\n \"index\" => \"my-new-index-000001\",\n ],\n ],\n]);", + "language": "PHP" + }, + { + "code": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"max_docs\":10,\"source\":{\"index\":\"my-index-000001\",\"query\":{\"function_score\":{\"random_score\":{},\"min_score\":0.9}}},\"dest\":{\"index\":\"my-new-index-000001\"}}' \"$ELASTICSEARCH_URL/_reindex\"", + "language": "curl" + } + ], + "description": "Run `POST _reindex` to extract a random subset of the source for testing. You might need to adjust the `min_score` value depending on the relative amount of data extracted from source.\n", + "method_request": "POST _reindex", + "summary": "Reindex a random subset", + "value": "{\n \"max_docs\": 10,\n \"source\": {\n \"index\": \"my-index-000001\",\n \"query\": {\n \"function_score\" : {\n \"random_score\" : {},\n \"min_score\" : 0.9\n }\n }\n },\n \"dest\": {\n \"index\": \"my-new-index-000001\"\n }\n}" + }, + "ReindexRequestExample12": { + "alternatives": [ + { + "code": "resp = client.reindex(\n source={\n \"index\": \"my-index-000001\"\n },\n dest={\n \"index\": \"my-new-index-000001\",\n \"version_type\": \"external\"\n },\n script={\n \"source\": \"if (ctx._source.foo == 'bar') {ctx._version++; ctx._source.remove('foo')}\",\n \"lang\": \"painless\"\n },\n)", + "language": "Python" + }, + { + "code": "const response = await client.reindex({\n source: {\n index: \"my-index-000001\",\n },\n dest: {\n index: \"my-new-index-000001\",\n version_type: \"external\",\n },\n script: {\n source:\n \"if (ctx._source.foo == 'bar') {ctx._version++; ctx._source.remove('foo')}\",\n lang: \"painless\",\n },\n});", + "language": "JavaScript" + }, + { + "code": "response = client.reindex(\n body: {\n \"source\": {\n \"index\": \"my-index-000001\"\n },\n \"dest\": {\n \"index\": \"my-new-index-000001\",\n \"version_type\": \"external\"\n },\n \"script\": {\n \"source\": \"if (ctx._source.foo == 'bar') {ctx._version++; ctx._source.remove('foo')}\",\n \"lang\": \"painless\"\n }\n }\n)", + "language": "Ruby" + }, + { + "code": "$resp = $client->reindex([\n \"body\" => [\n \"source\" => [\n \"index\" => \"my-index-000001\",\n ],\n \"dest\" => [\n \"index\" => \"my-new-index-000001\",\n \"version_type\" => \"external\",\n ],\n \"script\" => [\n \"source\" => \"if (ctx._source.foo == 'bar') {ctx._version++; ctx._source.remove('foo')}\",\n \"lang\" => \"painless\",\n ],\n ],\n]);", + "language": "PHP" + }, + { + "code": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"source\":{\"index\":\"my-index-000001\"},\"dest\":{\"index\":\"my-new-index-000001\",\"version_type\":\"external\"},\"script\":{\"source\":\"if (ctx._source.foo == '\"'\"'bar'\"'\"') {ctx._version++; ctx._source.remove('\"'\"'foo'\"'\"')}\",\"lang\":\"painless\"}}' \"$ELASTICSEARCH_URL/_reindex\"", + "language": "curl" + } + ], + "description": "Run `POST _reindex` to modify documents during reindexing. This example bumps the version of the source document.\n", + "method_request": "POST _reindex", + "summary": "Reindex modified documents", + "value": "{\n \"source\": {\n \"index\": \"my-index-000001\"\n },\n \"dest\": {\n \"index\": \"my-new-index-000001\",\n \"version_type\": \"external\"\n },\n \"script\": {\n \"source\": \"if (ctx._source.foo == 'bar') {ctx._version++; ctx._source.remove('foo')}\",\n \"lang\": \"painless\"\n }\n}" + }, + "ReindexRequestExample13": { + "alternatives": [ + { + "code": "resp = client.reindex(\n source={\n \"remote\": {\n \"host\": \"http://otherhost:9200\",\n \"username\": \"user\",\n \"password\": \"pass\"\n },\n \"index\": \"my-index-000001\",\n \"query\": {\n \"match\": {\n \"test\": \"data\"\n }\n }\n },\n dest={\n \"index\": \"my-new-index-000001\"\n },\n)", + "language": "Python" + }, + { + "code": "const response = await client.reindex({\n source: {\n remote: {\n host: \"http://otherhost:9200\",\n username: \"user\",\n password: \"pass\",\n },\n index: \"my-index-000001\",\n query: {\n match: {\n test: \"data\",\n },\n },\n },\n dest: {\n index: \"my-new-index-000001\",\n },\n});", + "language": "JavaScript" + }, + { + "code": "response = client.reindex(\n body: {\n \"source\": {\n \"remote\": {\n \"host\": \"http://otherhost:9200\",\n \"username\": \"user\",\n \"password\": \"pass\"\n },\n \"index\": \"my-index-000001\",\n \"query\": {\n \"match\": {\n \"test\": \"data\"\n }\n }\n },\n \"dest\": {\n \"index\": \"my-new-index-000001\"\n }\n }\n)", + "language": "Ruby" + }, + { + "code": "$resp = $client->reindex([\n \"body\" => [\n \"source\" => [\n \"remote\" => [\n \"host\" => \"http://otherhost:9200\",\n \"username\" => \"user\",\n \"password\" => \"pass\",\n ],\n \"index\" => \"my-index-000001\",\n \"query\" => [\n \"match\" => [\n \"test\" => \"data\",\n ],\n ],\n ],\n \"dest\" => [\n \"index\" => \"my-new-index-000001\",\n ],\n ],\n]);", + "language": "PHP" + }, + { + "code": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"source\":{\"remote\":{\"host\":\"http://otherhost:9200\",\"username\":\"user\",\"password\":\"pass\"},\"index\":\"my-index-000001\",\"query\":{\"match\":{\"test\":\"data\"}}},\"dest\":{\"index\":\"my-new-index-000001\"}}' \"$ELASTICSEARCH_URL/_reindex\"", + "language": "curl" + } + ], + "description": "When using Elastic Cloud, you can run `POST _reindex` and authenticate against a remote cluster with an API key.\n", + "method_request": "POST _reindex", + "summary": "Reindex from remote on Elastic Cloud", + "value": "{\n \"source\": {\n \"remote\": {\n \"host\": \"http://otherhost:9200\",\n \"username\": \"user\",\n \"password\": \"pass\"\n },\n \"index\": \"my-index-000001\",\n \"query\": {\n \"match\": {\n \"test\": \"data\"\n }\n }\n },\n \"dest\": {\n \"index\": \"my-new-index-000001\"\n }\n}" + }, + "ReindexRequestExample2": { + "alternatives": [ + { + "code": "resp = client.reindex(\n source={\n \"index\": \"my-index-000001\",\n \"slice\": {\n \"id\": 0,\n \"max\": 2\n }\n },\n dest={\n \"index\": \"my-new-index-000001\"\n },\n)", + "language": "Python" + }, + { + "code": "const response = await client.reindex({\n source: {\n index: \"my-index-000001\",\n slice: {\n id: 0,\n max: 2,\n },\n },\n dest: {\n index: \"my-new-index-000001\",\n },\n});", + "language": "JavaScript" + }, + { + "code": "response = client.reindex(\n body: {\n \"source\": {\n \"index\": \"my-index-000001\",\n \"slice\": {\n \"id\": 0,\n \"max\": 2\n }\n },\n \"dest\": {\n \"index\": \"my-new-index-000001\"\n }\n }\n)", + "language": "Ruby" + }, + { + "code": "$resp = $client->reindex([\n \"body\" => [\n \"source\" => [\n \"index\" => \"my-index-000001\",\n \"slice\" => [\n \"id\" => 0,\n \"max\" => 2,\n ],\n ],\n \"dest\" => [\n \"index\" => \"my-new-index-000001\",\n ],\n ],\n]);", + "language": "PHP" + }, + { + "code": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"source\":{\"index\":\"my-index-000001\",\"slice\":{\"id\":0,\"max\":2}},\"dest\":{\"index\":\"my-new-index-000001\"}}' \"$ELASTICSEARCH_URL/_reindex\"", + "language": "curl" + } + ], + "description": "Run `POST _reindex` to slice a reindex request manually. Provide a slice ID and total number of slices to each request.\n", + "method_request": "POST _reindex", + "summary": "Manual slicing", + "value": "{\n \"source\": {\n \"index\": \"my-index-000001\",\n \"slice\": {\n \"id\": 0,\n \"max\": 2\n }\n },\n \"dest\": {\n \"index\": \"my-new-index-000001\"\n }\n}" + }, + "ReindexRequestExample3": { + "alternatives": [ + { + "code": "resp = client.reindex(\n slices=\"5\",\n refresh=True,\n source={\n \"index\": \"my-index-000001\"\n },\n dest={\n \"index\": \"my-new-index-000001\"\n },\n)", + "language": "Python" + }, + { + "code": "const response = await client.reindex({\n slices: 5,\n refresh: \"true\",\n source: {\n index: \"my-index-000001\",\n },\n dest: {\n index: \"my-new-index-000001\",\n },\n});", + "language": "JavaScript" + }, + { + "code": "response = client.reindex(\n slices: \"5\",\n refresh: \"true\",\n body: {\n \"source\": {\n \"index\": \"my-index-000001\"\n },\n \"dest\": {\n \"index\": \"my-new-index-000001\"\n }\n }\n)", + "language": "Ruby" + }, + { + "code": "$resp = $client->reindex([\n \"slices\" => \"5\",\n \"refresh\" => \"true\",\n \"body\" => [\n \"source\" => [\n \"index\" => \"my-index-000001\",\n ],\n \"dest\" => [\n \"index\" => \"my-new-index-000001\",\n ],\n ],\n]);", + "language": "PHP" + }, + { + "code": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"source\":{\"index\":\"my-index-000001\"},\"dest\":{\"index\":\"my-new-index-000001\"}}' \"$ELASTICSEARCH_URL/_reindex?slices=5&refresh\"", + "language": "curl" + } + ], + "description": "Run `POST _reindex?slices=5&refresh` to automatically parallelize using sliced scroll to slice on `_id`. The `slices` parameter specifies the number of slices to use.\n", + "method_request": "POST _reindex?slices=5&refresh", + "summary": "Automatic slicing", + "value": "{\n \"source\": {\n \"index\": \"my-index-000001\"\n },\n \"dest\": {\n \"index\": \"my-new-index-000001\"\n }\n}" + }, + "ReindexRequestExample4": { + "alternatives": [ + { + "code": "resp = client.reindex(\n source={\n \"index\": \"source\",\n \"query\": {\n \"match\": {\n \"company\": \"cat\"\n }\n }\n },\n dest={\n \"index\": \"dest\",\n \"routing\": \"=cat\"\n },\n)", + "language": "Python" + }, + { + "code": "const response = await client.reindex({\n source: {\n index: \"source\",\n query: {\n match: {\n company: \"cat\",\n },\n },\n },\n dest: {\n index: \"dest\",\n routing: \"=cat\",\n },\n});", + "language": "JavaScript" + }, + { + "code": "response = client.reindex(\n body: {\n \"source\": {\n \"index\": \"source\",\n \"query\": {\n \"match\": {\n \"company\": \"cat\"\n }\n }\n },\n \"dest\": {\n \"index\": \"dest\",\n \"routing\": \"=cat\"\n }\n }\n)", + "language": "Ruby" + }, + { + "code": "$resp = $client->reindex([\n \"body\" => [\n \"source\" => [\n \"index\" => \"source\",\n \"query\" => [\n \"match\" => [\n \"company\" => \"cat\",\n ],\n ],\n ],\n \"dest\" => [\n \"index\" => \"dest\",\n \"routing\" => \"=cat\",\n ],\n ],\n]);", + "language": "PHP" + }, + { + "code": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"source\":{\"index\":\"source\",\"query\":{\"match\":{\"company\":\"cat\"}}},\"dest\":{\"index\":\"dest\",\"routing\":\"=cat\"}}' \"$ELASTICSEARCH_URL/_reindex\"", + "language": "curl" + } + ], + "description": "By default if reindex sees a document with routing then the routing is preserved unless it's changed by the script. You can set `routing` on the `dest` request to change this behavior. In this example, run `POST _reindex` to copy all documents from the `source` with the company name `cat` into the `dest` with routing set to `cat`.\n", + "method_request": "POST _reindex", + "summary": "Routing", + "value": "{\n \"source\": {\n \"index\": \"source\",\n \"query\": {\n \"match\": {\n \"company\": \"cat\"\n }\n }\n },\n \"dest\": {\n \"index\": \"dest\",\n \"routing\": \"=cat\"\n }\n}" + }, + "ReindexRequestExample5": { + "alternatives": [ + { + "code": "resp = client.reindex(\n source={\n \"index\": \"source\"\n },\n dest={\n \"index\": \"dest\",\n \"pipeline\": \"some_ingest_pipeline\"\n },\n)", + "language": "Python" + }, + { + "code": "const response = await client.reindex({\n source: {\n index: \"source\",\n },\n dest: {\n index: \"dest\",\n pipeline: \"some_ingest_pipeline\",\n },\n});", + "language": "JavaScript" + }, + { + "code": "response = client.reindex(\n body: {\n \"source\": {\n \"index\": \"source\"\n },\n \"dest\": {\n \"index\": \"dest\",\n \"pipeline\": \"some_ingest_pipeline\"\n }\n }\n)", + "language": "Ruby" + }, + { + "code": "$resp = $client->reindex([\n \"body\" => [\n \"source\" => [\n \"index\" => \"source\",\n ],\n \"dest\" => [\n \"index\" => \"dest\",\n \"pipeline\" => \"some_ingest_pipeline\",\n ],\n ],\n]);", + "language": "PHP" + }, + { + "code": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"source\":{\"index\":\"source\"},\"dest\":{\"index\":\"dest\",\"pipeline\":\"some_ingest_pipeline\"}}' \"$ELASTICSEARCH_URL/_reindex\"", + "language": "curl" + } + ], + "description": "Run `POST _reindex` and use the ingest pipelines feature.", + "method_request": "POST _reindex", + "summary": "Ingest pipelines", + "value": "{\n \"source\": {\n \"index\": \"source\"\n },\n \"dest\": {\n \"index\": \"dest\",\n \"pipeline\": \"some_ingest_pipeline\"\n }\n}" + }, + "ReindexRequestExample6": { + "alternatives": [ + { + "code": "resp = client.reindex(\n source={\n \"index\": \"my-index-000001\",\n \"query\": {\n \"term\": {\n \"user.id\": \"kimchy\"\n }\n }\n },\n dest={\n \"index\": \"my-new-index-000001\"\n },\n)", + "language": "Python" + }, + { + "code": "const response = await client.reindex({\n source: {\n index: \"my-index-000001\",\n query: {\n term: {\n \"user.id\": \"kimchy\",\n },\n },\n },\n dest: {\n index: \"my-new-index-000001\",\n },\n});", + "language": "JavaScript" + }, + { + "code": "response = client.reindex(\n body: {\n \"source\": {\n \"index\": \"my-index-000001\",\n \"query\": {\n \"term\": {\n \"user.id\": \"kimchy\"\n }\n }\n },\n \"dest\": {\n \"index\": \"my-new-index-000001\"\n }\n }\n)", + "language": "Ruby" + }, + { + "code": "$resp = $client->reindex([\n \"body\" => [\n \"source\" => [\n \"index\" => \"my-index-000001\",\n \"query\" => [\n \"term\" => [\n \"user.id\" => \"kimchy\",\n ],\n ],\n ],\n \"dest\" => [\n \"index\" => \"my-new-index-000001\",\n ],\n ],\n]);", + "language": "PHP" + }, + { + "code": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"source\":{\"index\":\"my-index-000001\",\"query\":{\"term\":{\"user.id\":\"kimchy\"}}},\"dest\":{\"index\":\"my-new-index-000001\"}}' \"$ELASTICSEARCH_URL/_reindex\"", + "language": "curl" + } + ], + "description": "Run `POST _reindex` and add a query to the `source` to limit the documents to reindex. For example, this request copies documents into `my-new-index-000001` only if they have a `user.id` of `kimchy`.\n", + "method_request": "POST _reindex", + "summary": "Reindex with a query", + "value": "{\n \"source\": {\n \"index\": \"my-index-000001\",\n \"query\": {\n \"term\": {\n \"user.id\": \"kimchy\"\n }\n }\n },\n \"dest\": {\n \"index\": \"my-new-index-000001\"\n }\n}" + }, + "ReindexRequestExample7": { + "alternatives": [ + { + "code": "resp = client.reindex(\n max_docs=1,\n source={\n \"index\": \"my-index-000001\"\n },\n dest={\n \"index\": \"my-new-index-000001\"\n },\n)", + "language": "Python" + }, + { + "code": "const response = await client.reindex({\n max_docs: 1,\n source: {\n index: \"my-index-000001\",\n },\n dest: {\n index: \"my-new-index-000001\",\n },\n});", + "language": "JavaScript" + }, + { + "code": "response = client.reindex(\n body: {\n \"max_docs\": 1,\n \"source\": {\n \"index\": \"my-index-000001\"\n },\n \"dest\": {\n \"index\": \"my-new-index-000001\"\n }\n }\n)", + "language": "Ruby" + }, + { + "code": "$resp = $client->reindex([\n \"body\" => [\n \"max_docs\" => 1,\n \"source\" => [\n \"index\" => \"my-index-000001\",\n ],\n \"dest\" => [\n \"index\" => \"my-new-index-000001\",\n ],\n ],\n]);", + "language": "PHP" + }, + { + "code": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"max_docs\":1,\"source\":{\"index\":\"my-index-000001\"},\"dest\":{\"index\":\"my-new-index-000001\"}}' \"$ELASTICSEARCH_URL/_reindex\"", + "language": "curl" + } + ], + "description": "You can limit the number of processed documents by setting `max_docs`. For example, run `POST _reindex` to copy a single document from `my-index-000001` to `my-new-index-000001`.\n", + "method_request": "POST _reindex", + "summary": "Reindex with max_docs", + "value": "{\n \"max_docs\": 1,\n \"source\": {\n \"index\": \"my-index-000001\"\n },\n \"dest\": {\n \"index\": \"my-new-index-000001\"\n }\n}" + }, + "ReindexRequestExample8": { + "alternatives": [ + { + "code": "resp = client.reindex(\n source={\n \"index\": \"my-index-000001\",\n \"_source\": [\n \"user.id\",\n \"_doc\"\n ]\n },\n dest={\n \"index\": \"my-new-index-000001\"\n },\n)", + "language": "Python" + }, + { + "code": "const response = await client.reindex({\n source: {\n index: \"my-index-000001\",\n _source: [\"user.id\", \"_doc\"],\n },\n dest: {\n index: \"my-new-index-000001\",\n },\n});", + "language": "JavaScript" + }, + { + "code": "response = client.reindex(\n body: {\n \"source\": {\n \"index\": \"my-index-000001\",\n \"_source\": [\n \"user.id\",\n \"_doc\"\n ]\n },\n \"dest\": {\n \"index\": \"my-new-index-000001\"\n }\n }\n)", + "language": "Ruby" + }, + { + "code": "$resp = $client->reindex([\n \"body\" => [\n \"source\" => [\n \"index\" => \"my-index-000001\",\n \"_source\" => array(\n \"user.id\",\n \"_doc\",\n ),\n ],\n \"dest\" => [\n \"index\" => \"my-new-index-000001\",\n ],\n ],\n]);", + "language": "PHP" + }, + { + "code": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"source\":{\"index\":\"my-index-000001\",\"_source\":[\"user.id\",\"_doc\"]},\"dest\":{\"index\":\"my-new-index-000001\"}}' \"$ELASTICSEARCH_URL/_reindex\"", + "language": "curl" + } + ], + "description": "You can use source filtering to reindex a subset of the fields in the original documents. For example, run `POST _reindex` the reindex only the `user.id` and `_doc` fields of each document.\n", + "method_request": "POST _reindex", + "summary": "Reindex selected fields", + "value": "{\n \"source\": {\n \"index\": \"my-index-000001\",\n \"_source\": [\"user.id\", \"_doc\"]\n },\n \"dest\": {\n \"index\": \"my-new-index-000001\"\n }\n}" + }, + "ReindexRequestExample9": { + "alternatives": [ + { + "code": "resp = client.reindex(\n source={\n \"index\": \"my-index-000001\"\n },\n dest={\n \"index\": \"my-new-index-000001\"\n },\n script={\n \"source\": \"ctx._source.tag = ctx._source.remove(\\\"flag\\\")\"\n },\n)", + "language": "Python" + }, + { + "code": "const response = await client.reindex({\n source: {\n index: \"my-index-000001\",\n },\n dest: {\n index: \"my-new-index-000001\",\n },\n script: {\n source: 'ctx._source.tag = ctx._source.remove(\"flag\")',\n },\n});", + "language": "JavaScript" + }, + { + "code": "response = client.reindex(\n body: {\n \"source\": {\n \"index\": \"my-index-000001\"\n },\n \"dest\": {\n \"index\": \"my-new-index-000001\"\n },\n \"script\": {\n \"source\": \"ctx._source.tag = ctx._source.remove(\\\"flag\\\")\"\n }\n }\n)", + "language": "Ruby" + }, + { + "code": "$resp = $client->reindex([\n \"body\" => [\n \"source\" => [\n \"index\" => \"my-index-000001\",\n ],\n \"dest\" => [\n \"index\" => \"my-new-index-000001\",\n ],\n \"script\" => [\n \"source\" => \"ctx._source.tag = ctx._source.remove(\\\"flag\\\")\",\n ],\n ],\n]);", + "language": "PHP" + }, + { + "code": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"source\":{\"index\":\"my-index-000001\"},\"dest\":{\"index\":\"my-new-index-000001\"},\"script\":{\"source\":\"ctx._source.tag = ctx._source.remove(\\\"flag\\\")\"}}' \"$ELASTICSEARCH_URL/_reindex\"", + "language": "curl" + } + ], + "description": "A reindex operation can build a copy of an index with renamed fields. If your index has documents with `text` and `flag` fields, you can change the latter field name to `tag` during the reindex.\n", + "method_request": "POST _reindex", + "summary": "Reindex new field names", + "value": "{\n \"source\": {\n \"index\": \"my-index-000001\"\n },\n \"dest\": {\n \"index\": \"my-new-index-000001\"\n },\n \"script\": {\n \"source\": \"ctx._source.tag = ctx._source.remove(\\\"flag\\\")\"\n }\n}" } }, "inherits": { @@ -35662,6 +36155,18 @@ } } }, + { + "description": "The maximum number of documents to reindex.\nBy default, all documents are reindexed.\nIf it is a value less then or equal to `scroll_size`, a scroll will not be used to retrieve the results for the operation.\n\nIf `conflicts` is set to `proceed`, the reindex operation could attempt to reindex more documents from the source than `max_docs` until it has successfully indexed `max_docs` documents into the target or it has gone through every document in the source query.", + "name": "max_docs", + "required": false, + "type": { + "kind": "instance_of", + "type": { + "name": "integer", + "namespace": "_types" + } + } + }, { "description": "The period each indexing waits for automatic index creation, dynamic mapping updates, and waiting for active shards.\nBy default, Elasticsearch waits for at least one minute before failing.\nThe actual wait time could be longer, particularly when multiple waits occur.", "name": "timeout", @@ -35715,7 +36220,7 @@ } } ], - "specLocation": "_global/reindex/ReindexRequest.ts#L27-L170" + "specLocation": "_global/reindex/ReindexRequest.ts#L27-L178" }, { "kind": "response", @@ -45295,6 +45800,19 @@ } } }, + { + "description": "The number of hits matching the query to count accurately.\nIf `true`, the exact number of hits is returned at the cost of some performance.\nIf `false`, the response does not include the total number of hits matching the query.", + "name": "track_total_hits", + "required": false, + "serverDefault": "10000", + "type": { + "kind": "instance_of", + "type": { + "name": "TrackHits", + "namespace": "_global.search._types" + } + } + }, { "description": "If `true`, the hits and aggs layers will contain additional point features representing\nsuggested label positions for the original features.\n\n* `Point` and `MultiPoint` features will have one of the points selected.\n* `Polygon` and `MultiPolygon` features will have a single point generated, either the centroid, if it is within the polygon, or another point within the polygon selected from the sorted triangle-tree.\n* `LineString` features will likewise provide a roughly central point selected from the triangle-tree.\n* The aggregation results will provide one central point for each aggregation bucket.\n\nAll attributes from the original features will also be copied to the new label features.\nIn addition, the new features will be distinguishable using the tag `_mvt_label_position`.", "name": "with_labels", @@ -45308,7 +45826,7 @@ } } ], - "specLocation": "_global/search_mvt/SearchMvtRequest.ts#L33-L327" + "specLocation": "_global/search_mvt/SearchMvtRequest.ts#L33-L334" }, { "kind": "response", @@ -47595,7 +48113,7 @@ } ] }, - "description": "Update a document.\n\nUpdate a document by running a script or passing a partial document.\n\nIf the Elasticsearch security features are enabled, you must have the `index` or `write` index privilege for the target index or index alias.\n\nThe script can update, delete, or skip modifying the document.\nThe API also supports passing a partial document, which is merged into the existing document.\nTo fully replace an existing document, use the index API.\nThis operation:\n\n* Gets the document (collocated with the shard) from the index.\n* Runs the specified script.\n* Indexes the result.\n\nThe document must still be reindexed, but using this API removes some network roundtrips and reduces chances of version conflicts between the GET and the index operation.\n\nThe `_source` field must be enabled to use this API.\nIn addition to `_source`, you can access the following variables through the `ctx` map: `_index`, `_type`, `_id`, `_version`, `_routing`, and `_now` (the current timestamp).", + "description": "Update a document.\n\nUpdate a document by running a script or passing a partial document.\n\nIf the Elasticsearch security features are enabled, you must have the `index` or `write` index privilege for the target index or index alias.\n\nThe script can update, delete, or skip modifying the document.\nThe API also supports passing a partial document, which is merged into the existing document.\nTo fully replace an existing document, use the index API.\nThis operation:\n\n* Gets the document (collocated with the shard) from the index.\n* Runs the specified script.\n* Indexes the result.\n\nThe document must still be reindexed, but using this API removes some network roundtrips and reduces chances of version conflicts between the GET and the index operation.\n\nThe `_source` field must be enabled to use this API.\nIn addition to `_source`, you can access the following variables through the `ctx` map: `_index`, `_type`, `_id`, `_version`, `_routing`, and `_now` (the current timestamp).\nFor usage examples such as partial updates, upserts, and scripted updates, see the External documentation.", "examples": { "UpdateRequestExample1": { "alternatives": [ @@ -48166,7 +48684,7 @@ } } ], - "specLocation": "_global/update/UpdateRequest.ts#L38-L194" + "specLocation": "_global/update/UpdateRequest.ts#L38-L196" }, { "kind": "response", @@ -48322,7 +48840,7 @@ } ] }, - "description": "Update documents.\nUpdates documents that match the specified query.\nIf no query is specified, performs an update on every document in the data stream or index without modifying the source, which is useful for picking up mapping changes.\n\nIf the Elasticsearch security features are enabled, you must have the following index privileges for the target data stream, index, or alias:\n\n* `read`\n* `index` or `write`\n\nYou can specify the query criteria in the request URI or the request body using the same syntax as the search API.\n\nWhen you submit an update by query request, Elasticsearch gets a snapshot of the data stream or index when it begins processing the request and updates matching documents using internal versioning.\nWhen the versions match, the document is updated and the version number is incremented.\nIf a document changes between the time that the snapshot is taken and the update operation is processed, it results in a version conflict and the operation fails.\nYou can opt to count version conflicts instead of halting and returning by setting `conflicts` to `proceed`.\nNote that if you opt to count version conflicts, the operation could attempt to update more documents from the source than `max_docs` until it has successfully updated `max_docs` documents or it has gone through every document in the source query.\n\nNOTE: Documents with a version equal to 0 cannot be updated using update by query because internal versioning does not support 0 as a valid version number.\n\nWhile processing an update by query request, Elasticsearch performs multiple search requests sequentially to find all of the matching documents.\nA bulk update request is performed for each batch of matching documents.\nAny query or update failures cause the update by query request to fail and the failures are shown in the response.\nAny update requests that completed successfully still stick, they are not rolled back.\n\n**Throttling update requests**\n\nTo control the rate at which update by query issues batches of update operations, you can set `requests_per_second` to any positive decimal number.\nThis pads each batch with a wait time to throttle the rate.\nSet `requests_per_second` to `-1` to turn off throttling.\n\nThrottling uses a wait time between batches so that the internal scroll requests can be given a timeout that takes the request padding into account.\nThe padding time is the difference between the batch size divided by the `requests_per_second` and the time spent writing.\nBy default the batch size is 1000, so if `requests_per_second` is set to `500`:\n\n```\ntarget_time = 1000 / 500 per second = 2 seconds\nwait_time = target_time - write_time = 2 seconds - .5 seconds = 1.5 seconds\n```\n\nSince the batch is issued as a single _bulk request, large batch sizes cause Elasticsearch to create many requests and wait before starting the next set.\nThis is \"bursty\" instead of \"smooth\".\n\n**Slicing**\n\nUpdate by query supports sliced scroll to parallelize the update process.\nThis can improve efficiency and provide a convenient way to break the request down into smaller parts.\n\nSetting `slices` to `auto` chooses a reasonable number for most data streams and indices.\nThis setting will use one slice per shard, up to a certain limit.\nIf there are multiple source data streams or indices, it will choose the number of slices based on the index or backing index with the smallest number of shards.\n\nAdding `slices` to `_update_by_query` just automates the manual process of creating sub-requests, which means it has some quirks:\n\n* You can see these requests in the tasks APIs. These sub-requests are \"child\" tasks of the task for the request with slices.\n* Fetching the status of the task for the request with `slices` only contains the status of completed slices.\n* These sub-requests are individually addressable for things like cancellation and rethrottling.\n* Rethrottling the request with `slices` will rethrottle the unfinished sub-request proportionally.\n* Canceling the request with slices will cancel each sub-request.\n* Due to the nature of slices each sub-request won't get a perfectly even portion of the documents. All documents will be addressed, but some slices may be larger than others. Expect larger slices to have a more even distribution.\n* Parameters like `requests_per_second` and `max_docs` on a request with slices are distributed proportionally to each sub-request. Combine that with the point above about distribution being uneven and you should conclude that using `max_docs` with `slices` might not result in exactly `max_docs` documents being updated.\n* Each sub-request gets a slightly different snapshot of the source data stream or index though these are all taken at approximately the same time.\n\nIf you're slicing manually or otherwise tuning automatic slicing, keep in mind that:\n\n* Query performance is most efficient when the number of slices is equal to the number of shards in the index or backing index. If that number is large (for example, 500), choose a lower number as too many slices hurts performance. Setting slices higher than the number of shards generally does not improve efficiency and adds overhead.\n* Update performance scales linearly across available resources with the number of slices.\n\nWhether query or update performance dominates the runtime depends on the documents being reindexed and cluster resources.\n\n**Update the document source**\n\nUpdate by query supports scripts to update the document source.\nAs with the update API, you can set `ctx.op` to change the operation that is performed.\n\nSet `ctx.op = \"noop\"` if your script decides that it doesn't have to make any changes.\nThe update by query operation skips updating the document and increments the `noop` counter.\n\nSet `ctx.op = \"delete\"` if your script decides that the document should be deleted.\nThe update by query operation deletes the document and increments the `deleted` counter.\n\nUpdate by query supports only `index`, `noop`, and `delete`.\nSetting `ctx.op` to anything else is an error.\nSetting any other field in `ctx` is an error.\nThis API enables you to only modify the source of matching documents; you cannot move them.", + "description": "Update documents.\nUpdates documents that match the specified query.\nIf no query is specified, performs an update on every document in the data stream or index without modifying the source, which is useful for picking up mapping changes.\n\nIf the Elasticsearch security features are enabled, you must have the following index privileges for the target data stream, index, or alias:\n\n* `read`\n* `index` or `write`\n\nYou can specify the query criteria in the request URI or the request body using the same syntax as the search API.\n\nWhen you submit an update by query request, Elasticsearch gets a snapshot of the data stream or index when it begins processing the request and updates matching documents using internal versioning.\nWhen the versions match, the document is updated and the version number is incremented.\nIf a document changes between the time that the snapshot is taken and the update operation is processed, it results in a version conflict and the operation fails.\nYou can opt to count version conflicts instead of halting and returning by setting `conflicts` to `proceed`.\nNote that if you opt to count version conflicts, the operation could attempt to update more documents from the source than `max_docs` until it has successfully updated `max_docs` documents or it has gone through every document in the source query.\n\nNOTE: Documents with a version equal to 0 cannot be updated using update by query because internal versioning does not support 0 as a valid version number.\n\nWhile processing an update by query request, Elasticsearch performs multiple search requests sequentially to find all of the matching documents.\nA bulk update request is performed for each batch of matching documents.\nAny query or update failures cause the update by query request to fail and the failures are shown in the response.\nAny update requests that completed successfully still stick, they are not rolled back.\n\n**Refreshing shards**\n\nSpecifying the `refresh` parameter refreshes all shards once the request completes.\nThis is different to the update API's `refresh` parameter, which causes only the shard\nthat received the request to be refreshed. Unlike the update API, it does not support\n`wait_for`.\n\n**Running update by query asynchronously**\n\nIf the request contains `wait_for_completion=false`, Elasticsearch\nperforms some preflight checks, launches the request, and returns a\n[task](https://www.elastic.co/docs/api/doc/elasticsearch/group/endpoint-tasks) you can use to cancel or get the status of the task.\nElasticsearch creates a record of this task as a document at `.tasks/task/${taskId}`.\n\n**Waiting for active shards**\n\n`wait_for_active_shards` controls how many copies of a shard must be active\nbefore proceeding with the request. See [`wait_for_active_shards`](https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-create#operation-create-wait_for_active_shards)\nfor details. `timeout` controls how long each write request waits for unavailable\nshards to become available. Both work exactly the way they work in the\n[Bulk API](https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-bulk). Update by query uses scrolled searches, so you can also\nspecify the `scroll` parameter to control how long it keeps the search context\nalive, for example `?scroll=10m`. The default is 5 minutes.\n\n**Throttling update requests**\n\nTo control the rate at which update by query issues batches of update operations, you can set `requests_per_second` to any positive decimal number.\nThis pads each batch with a wait time to throttle the rate.\nSet `requests_per_second` to `-1` to turn off throttling.\n\nThrottling uses a wait time between batches so that the internal scroll requests can be given a timeout that takes the request padding into account.\nThe padding time is the difference between the batch size divided by the `requests_per_second` and the time spent writing.\nBy default the batch size is 1000, so if `requests_per_second` is set to `500`:\n\n```\ntarget_time = 1000 / 500 per second = 2 seconds\nwait_time = target_time - write_time = 2 seconds - .5 seconds = 1.5 seconds\n```\n\nSince the batch is issued as a single _bulk request, large batch sizes cause Elasticsearch to create many requests and wait before starting the next set.\nThis is \"bursty\" instead of \"smooth\".\n\n**Slicing**\n\nUpdate by query supports sliced scroll to parallelize the update process.\nThis can improve efficiency and provide a convenient way to break the request down into smaller parts.\n\nSetting `slices` to `auto` chooses a reasonable number for most data streams and indices.\nThis setting will use one slice per shard, up to a certain limit.\nIf there are multiple source data streams or indices, it will choose the number of slices based on the index or backing index with the smallest number of shards.\n\nAdding `slices` to `_update_by_query` just automates the manual process of creating sub-requests, which means it has some quirks:\n\n* You can see these requests in the tasks APIs. These sub-requests are \"child\" tasks of the task for the request with slices.\n* Fetching the status of the task for the request with `slices` only contains the status of completed slices.\n* These sub-requests are individually addressable for things like cancellation and rethrottling.\n* Rethrottling the request with `slices` will rethrottle the unfinished sub-request proportionally.\n* Canceling the request with slices will cancel each sub-request.\n* Due to the nature of slices each sub-request won't get a perfectly even portion of the documents. All documents will be addressed, but some slices may be larger than others. Expect larger slices to have a more even distribution.\n* Parameters like `requests_per_second` and `max_docs` on a request with slices are distributed proportionally to each sub-request. Combine that with the point above about distribution being uneven and you should conclude that using `max_docs` with `slices` might not result in exactly `max_docs` documents being updated.\n* Each sub-request gets a slightly different snapshot of the source data stream or index though these are all taken at approximately the same time.\n\nIf you're slicing manually or otherwise tuning automatic slicing, keep in mind that:\n\n* Query performance is most efficient when the number of slices is equal to the number of shards in the index or backing index. If that number is large (for example, 500), choose a lower number as too many slices hurts performance. Setting slices higher than the number of shards generally does not improve efficiency and adds overhead.\n* Update performance scales linearly across available resources with the number of slices.\n\nWhether query or update performance dominates the runtime depends on the documents being reindexed and cluster resources.\nRefer to the linked documentation for examples of how to update documents using the `_update_by_query` API:", "examples": { "UpdateByQueryRequestExample1": { "alternatives": [ @@ -48873,7 +49391,7 @@ } } ], - "specLocation": "_global/update_by_query/UpdateByQueryRequest.ts#L37-L339" + "specLocation": "_global/update_by_query/UpdateByQueryRequest.ts#L37-L349" }, { "kind": "response", @@ -49905,7 +50423,7 @@ "name": "ClusterInfoTarget", "namespace": "_types" }, - "specLocation": "_types/common.ts#L378-L384" + "specLocation": "_types/common.ts#L380-L386" }, { "kind": "type_alias", @@ -49913,7 +50431,7 @@ "name": "ClusterInfoTargets", "namespace": "_types" }, - "specLocation": "_types/common.ts#L386-L386", + "specLocation": "_types/common.ts#L388-L388", "type": { "kind": "union_of", "items": [ @@ -50462,9 +50980,33 @@ "namespace": "_types" } } + }, + { + "description": "Returns the total size in bytes of all documents in this stats.\nThis value may be more reliable than store_stats.size_in_bytes in estimating the index size.", + "name": "total_size_in_bytes", + "required": true, + "type": { + "kind": "instance_of", + "type": { + "name": "long", + "namespace": "_types" + } + } + }, + { + "description": "Human readable total_size_in_bytes", + "name": "total_size", + "required": false, + "type": { + "kind": "instance_of", + "type": { + "name": "ByteSize", + "namespace": "_types" + } + } } ], - "specLocation": "_types/Stats.ts#L100-L112" + "specLocation": "_types/Stats.ts#L100-L121" }, { "kind": "type_alias", @@ -50638,7 +51180,7 @@ } }, { - "description": "The Elasticsearch version number.", + "description": "The Elasticsearch version number.\n\n::: IMPORTANT: For Serverless deployments, this static value is always `8.11.0` and is used solely for backward compatibility with legacy clients.\n Serverless environments are versionless and automatically upgraded, so this value can be safely ignored.", "name": "number", "required": true, "type": { @@ -50650,7 +51192,7 @@ } } ], - "specLocation": "_types/Base.ts#L76-L115" + "specLocation": "_types/Base.ts#L76-L118" }, { "kind": "interface", @@ -50705,7 +51247,7 @@ } } ], - "specLocation": "_types/Base.ts#L117-L125" + "specLocation": "_types/Base.ts#L120-L128" }, { "kind": "interface", @@ -50894,7 +51436,7 @@ } } ], - "specLocation": "_types/Base.ts#L127-L136" + "specLocation": "_types/Base.ts#L130-L139" }, { "kind": "enum", @@ -51002,7 +51544,7 @@ } } ], - "specLocation": "_types/Stats.ts#L121-L124" + "specLocation": "_types/Stats.ts#L143-L146" }, { "kind": "interface", @@ -51263,9 +51805,20 @@ } } } + }, + { + "name": "global_ordinals", + "required": true, + "type": { + "kind": "instance_of", + "type": { + "name": "GlobalOrdinalsStats", + "namespace": "_types" + } + } } ], - "specLocation": "_types/Stats.ts#L114-L119" + "specLocation": "_types/Stats.ts#L123-L129" }, { "kind": "type_alias", @@ -51358,7 +51911,7 @@ } } ], - "specLocation": "_types/Stats.ts#L126-L131" + "specLocation": "_types/Stats.ts#L148-L153" }, { "kind": "type_alias", @@ -51967,7 +52520,104 @@ } } ], - "specLocation": "_types/Stats.ts#L133-L144" + "specLocation": "_types/Stats.ts#L155-L166" + }, + { + "kind": "interface", + "name": { + "name": "GlobalOrdinalFieldStats", + "namespace": "_types" + }, + "properties": [ + { + "name": "build_time_in_millis", + "required": true, + "type": { + "kind": "instance_of", + "type": { + "name": "UnitMillis", + "namespace": "_types" + } + } + }, + { + "name": "build_time", + "required": false, + "type": { + "kind": "instance_of", + "type": { + "name": "string", + "namespace": "_builtins" + } + } + }, + { + "name": "shard_max_value_count", + "required": true, + "type": { + "kind": "instance_of", + "type": { + "name": "long", + "namespace": "_types" + } + } + } + ], + "specLocation": "_types/Stats.ts#L137-L141" + }, + { + "kind": "interface", + "name": { + "name": "GlobalOrdinalsStats", + "namespace": "_types" + }, + "properties": [ + { + "name": "build_time_in_millis", + "required": true, + "type": { + "kind": "instance_of", + "type": { + "name": "UnitMillis", + "namespace": "_types" + } + } + }, + { + "name": "build_time", + "required": false, + "type": { + "kind": "instance_of", + "type": { + "name": "string", + "namespace": "_builtins" + } + } + }, + { + "name": "fields", + "required": false, + "type": { + "kind": "dictionary_of", + "key": { + "kind": "instance_of", + "type": { + "name": "Name", + "namespace": "_types" + } + }, + "singleKey": false, + "value": { + "kind": "instance_of", + "type": { + "name": "GlobalOrdinalFieldStats", + "namespace": "_types" + } + } + } + } + ], + "specLocation": "_types/Stats.ts#L131-L135" }, { "kind": "type_alias", @@ -52007,13 +52657,19 @@ ], "description": "One or more primary shards are unassigned, so some data is unavailable. This can occur briefly during cluster startup as primary shards are assigned.", "name": "red" + }, + { + "name": "unknown" + }, + { + "name": "unavailable" } ], "name": { "name": "HealthStatus", "namespace": "_types" }, - "specLocation": "_types/common.ts#L216-L236" + "specLocation": "_types/common.ts#L216-L238" }, { "kind": "type_alias", @@ -52444,7 +53100,7 @@ } } ], - "specLocation": "_types/Stats.ts#L146-L164" + "specLocation": "_types/Stats.ts#L168-L186" }, { "kind": "type_alias", @@ -52535,7 +53191,7 @@ } } ], - "specLocation": "_types/common.ts#L332-L359" + "specLocation": "_types/common.ts#L334-L361" }, { "kind": "interface", @@ -52562,7 +53218,7 @@ } } ], - "specLocation": "_types/Base.ts#L138-L140" + "specLocation": "_types/Base.ts#L141-L143" }, { "kind": "interface", @@ -52678,7 +53334,7 @@ } } ], - "specLocation": "_types/common.ts#L317-L330" + "specLocation": "_types/common.ts#L319-L332" }, { "kind": "interface", @@ -52721,7 +53377,7 @@ } } ], - "specLocation": "_types/Retriever.ts#L82-L86" + "specLocation": "_types/Retriever.ts#L85-L89" }, { "kind": "type_alias", @@ -52977,7 +53633,7 @@ } } ], - "specLocation": "_types/Retriever.ts#L112-L130" + "specLocation": "_types/Retriever.ts#L115-L133" }, { "kind": "interface", @@ -53183,7 +53839,7 @@ "name": "Level", "namespace": "_types" }, - "specLocation": "_types/common.ts#L246-L250" + "specLocation": "_types/common.ts#L248-L252" }, { "kind": "enum", @@ -53242,9 +53898,45 @@ "namespace": "_types" } } + }, + { + "name": "query", + "required": false, + "type": { + "kind": "instance_of", + "type": { + "name": "string", + "namespace": "_builtins" + } + } + }, + { + "name": "fields", + "required": false, + "type": { + "kind": "array_of", + "value": { + "kind": "instance_of", + "type": { + "name": "string", + "namespace": "_builtins" + } + } + } + }, + { + "name": "normalizer", + "required": false, + "type": { + "kind": "instance_of", + "type": { + "name": "ScoreNormalizer", + "namespace": "_types" + } + } } ], - "specLocation": "_types/Retriever.ts#L68-L72" + "specLocation": "_types/Retriever.ts#L68-L75" }, { "kind": "type_alias", @@ -53472,7 +54164,7 @@ } } ], - "specLocation": "_types/Stats.ts#L166-L183" + "specLocation": "_types/Stats.ts#L188-L205" }, { "kind": "type_alias", @@ -54158,7 +54850,7 @@ "name": "OpType", "namespace": "_types" }, - "specLocation": "_types/common.ts#L252-L261" + "specLocation": "_types/common.ts#L254-L263" }, { "kind": "type_alias", @@ -54267,7 +54959,7 @@ } } ], - "specLocation": "_types/Retriever.ts#L74-L80" + "specLocation": "_types/Retriever.ts#L77-L83" }, { "kind": "type_alias", @@ -54394,7 +55086,7 @@ } } ], - "specLocation": "_types/Stats.ts#L185-L195" + "specLocation": "_types/Stats.ts#L207-L217" }, { "kind": "type_alias", @@ -54515,7 +55207,7 @@ } } ], - "specLocation": "_types/Stats.ts#L197-L231" + "specLocation": "_types/Stats.ts#L219-L253" }, { "kind": "type_alias", @@ -54610,9 +55302,34 @@ "namespace": "_types" } } + }, + { + "name": "query", + "required": false, + "type": { + "kind": "instance_of", + "type": { + "name": "string", + "namespace": "_builtins" + } + } + }, + { + "name": "fields", + "required": false, + "type": { + "kind": "array_of", + "value": { + "kind": "instance_of", + "type": { + "name": "string", + "namespace": "_builtins" + } + } + } } ], - "specLocation": "_types/Retriever.ts#L132-L139" + "specLocation": "_types/Retriever.ts#L135-L144" }, { "kind": "interface", @@ -54709,7 +55426,7 @@ } } ], - "specLocation": "_types/Stats.ts#L233-L238" + "specLocation": "_types/Stats.ts#L255-L260" }, { "kind": "enum", @@ -54729,7 +55446,7 @@ "name": "Refresh", "namespace": "_types" }, - "specLocation": "_types/common.ts#L263-L270" + "specLocation": "_types/common.ts#L265-L272" }, { "kind": "interface", @@ -54823,7 +55540,7 @@ } } ], - "specLocation": "_types/Stats.ts#L240-L247" + "specLocation": "_types/Stats.ts#L262-L269" }, { "kind": "type_alias", @@ -54944,7 +55661,7 @@ } } ], - "specLocation": "_types/Stats.ts#L249-L255" + "specLocation": "_types/Stats.ts#L271-L277" }, { "kind": "interface", @@ -55380,7 +56097,7 @@ } } ], - "specLocation": "_types/Retriever.ts#L154-L163" + "specLocation": "_types/Retriever.ts#L159-L168" }, { "kind": "type_alias", @@ -55455,7 +56172,7 @@ "name": "ScoreNormalizer", "namespace": "_types" }, - "specLocation": "_types/Retriever.ts#L88-L92" + "specLocation": "_types/Retriever.ts#L91-L95" }, { "kind": "interface", @@ -56078,6 +56795,17 @@ } } }, + { + "name": "recent_search_load", + "required": false, + "type": { + "kind": "instance_of", + "type": { + "name": "double", + "namespace": "_types" + } + } + }, { "name": "groups", "required": false, @@ -56101,7 +56829,7 @@ } } ], - "specLocation": "_types/Stats.ts#L257-L276" + "specLocation": "_types/Stats.ts#L279-L299" }, { "kind": "interface", @@ -56151,7 +56879,7 @@ "name": "SearchType", "namespace": "_types" }, - "specLocation": "_types/common.ts#L272-L277" + "specLocation": "_types/common.ts#L274-L279" }, { "kind": "interface", @@ -56255,17 +56983,6 @@ } } }, - { - "name": "index_writer_max_memory_in_bytes", - "required": false, - "type": { - "kind": "instance_of", - "type": { - "name": "long", - "namespace": "_types" - } - } - }, { "description": "Total amount, in bytes, of memory used by all index writers across all shards assigned to selected nodes.", "name": "index_writer_memory_in_bytes", @@ -56363,24 +57080,25 @@ } }, { - "name": "stored_memory", - "required": false, + "description": "Total amount, in bytes, of memory used for stored fields across all shards assigned to selected nodes.", + "name": "stored_fields_memory_in_bytes", + "required": true, "type": { "kind": "instance_of", "type": { - "name": "ByteSize", + "name": "long", "namespace": "_types" } } }, { - "description": "Total amount, in bytes, of memory used for stored fields across all shards assigned to selected nodes.", - "name": "stored_fields_memory_in_bytes", - "required": true, + "description": "Total amount of memory used for stored fields across all shards assigned to selected nodes.", + "name": "stored_fields_memory", + "required": false, "type": { "kind": "instance_of", "type": { - "name": "long", + "name": "ByteSize", "namespace": "_types" } } @@ -56411,7 +57129,7 @@ }, { "description": "Total amount of memory used for term vectors across all shards assigned to selected nodes.", - "name": "term_vectory_memory", + "name": "term_vectors_memory", "required": false, "type": { "kind": "instance_of", @@ -56458,7 +57176,7 @@ } } ], - "specLocation": "_types/Stats.ts#L278-L371" + "specLocation": "_types/Stats.ts#L301-L396" }, { "kind": "type_alias", @@ -56645,7 +57363,7 @@ } } ], - "specLocation": "_types/Base.ts#L142-L145" + "specLocation": "_types/Base.ts#L145-L148" }, { "kind": "interface", @@ -56701,7 +57419,7 @@ "name": "Slices", "namespace": "_types" }, - "specLocation": "_types/common.ts#L361-L366", + "specLocation": "_types/common.ts#L363-L368", "type": { "kind": "union_of", "items": [ @@ -56734,7 +57452,7 @@ "name": "SlicesCalculation", "namespace": "_types" }, - "specLocation": "_types/common.ts#L368-L376" + "specLocation": "_types/common.ts#L370-L378" }, { "kind": "type_alias", @@ -56978,7 +57696,7 @@ } } ], - "specLocation": "_types/Retriever.ts#L94-L97" + "specLocation": "_types/Retriever.ts#L97-L100" }, { "kind": "interface", @@ -57054,7 +57772,7 @@ } } ], - "specLocation": "_types/Retriever.ts#L99-L110" + "specLocation": "_types/Retriever.ts#L102-L113" }, { "kind": "interface", @@ -57136,7 +57854,7 @@ } } ], - "specLocation": "_types/Stats.ts#L373-L400" + "specLocation": "_types/Stats.ts#L398-L425" }, { "kind": "interface", @@ -57229,7 +57947,7 @@ "name": "SuggestMode", "namespace": "_types" }, - "specLocation": "_types/common.ts#L279-L292" + "specLocation": "_types/common.ts#L281-L294" }, { "kind": "type_alias", @@ -57422,7 +58140,7 @@ } } ], - "specLocation": "_types/Retriever.ts#L141-L152" + "specLocation": "_types/Retriever.ts#L146-L157" }, { "kind": "enum", @@ -57447,7 +58165,7 @@ "name": "ThreadType", "namespace": "_types" }, - "specLocation": "_types/common.ts#L294-L300" + "specLocation": "_types/common.ts#L296-L302" }, { "kind": "type_alias", @@ -57518,6 +58236,55 @@ } } }, + { + "kind": "interface", + "name": { + "name": "TokenPruningConfig", + "namespace": "_types" + }, + "properties": [ + { + "description": "Tokens whose frequency is more than this threshold times the average frequency of all tokens in the specified field are considered outliers and pruned.", + "name": "tokens_freq_ratio_threshold", + "required": false, + "serverDefault": 5, + "type": { + "kind": "instance_of", + "type": { + "name": "integer", + "namespace": "_types" + } + } + }, + { + "description": "Tokens whose weight is less than this threshold are considered nonsignificant and pruned.", + "name": "tokens_weight_threshold", + "required": false, + "serverDefault": 0.4, + "type": { + "kind": "instance_of", + "type": { + "name": "float", + "namespace": "_types" + } + } + }, + { + "description": "Whether to only score pruned tokens, vs only scoring kept tokens.", + "name": "only_score_pruned_tokens", + "required": false, + "serverDefault": false, + "type": { + "kind": "instance_of", + "type": { + "name": "boolean", + "namespace": "_builtins" + } + } + } + ], + "specLocation": "_types/TokenPruningConfig.ts#L22-L35" + }, { "kind": "interface", "name": { @@ -57716,7 +58483,7 @@ } } ], - "specLocation": "_types/Stats.ts#L402-L410" + "specLocation": "_types/Stats.ts#L427-L435" }, { "kind": "type_alias", @@ -57897,7 +58664,7 @@ "name": "WaitForActiveShardOptions", "namespace": "_types" }, - "specLocation": "_types/common.ts#L302-L306" + "specLocation": "_types/common.ts#L304-L308" }, { "kind": "type_alias", @@ -57956,7 +58723,7 @@ "name": "WaitForEvents", "namespace": "_types" }, - "specLocation": "_types/common.ts#L308-L315" + "specLocation": "_types/common.ts#L310-L317" }, { "kind": "interface", @@ -58019,7 +58786,7 @@ } } ], - "specLocation": "_types/Stats.ts#L412-L417" + "specLocation": "_types/Stats.ts#L437-L442" }, { "kind": "interface", @@ -58291,7 +59058,7 @@ "namespace": "_types.aggregations" }, "properties": [], - "specLocation": "_types/aggregations/Aggregate.ts#L647-L652", + "specLocation": "_types/aggregations/Aggregate.ts#L649-L654", "variantName": "adjacency_matrix" }, { @@ -58373,7 +59140,7 @@ } } ], - "specLocation": "_types/aggregations/Aggregate.ts#L654-L656" + "specLocation": "_types/aggregations/Aggregate.ts#L656-L658" }, { "kind": "type_alias", @@ -60657,7 +61424,7 @@ } } ], - "specLocation": "_types/aggregations/Aggregate.ts#L806-L825", + "specLocation": "_types/aggregations/Aggregate.ts#L808-L827", "variantName": "boxplot" }, { @@ -61602,7 +62369,7 @@ "namespace": "_types.aggregations" }, "properties": [], - "specLocation": "_types/aggregations/Aggregate.ts#L888-L892", + "specLocation": "_types/aggregations/Aggregate.ts#L890-L894", "variantName": "children" }, { @@ -61667,7 +62434,7 @@ } } ], - "specLocation": "_types/aggregations/Aggregate.ts#L698-L703", + "specLocation": "_types/aggregations/Aggregate.ts#L700-L705", "variantName": "composite" }, { @@ -61929,7 +62696,7 @@ } } ], - "specLocation": "_types/aggregations/Aggregate.ts#L705-L707" + "specLocation": "_types/aggregations/Aggregate.ts#L707-L709" }, { "kind": "interface", @@ -62121,7 +62888,7 @@ } } ], - "specLocation": "_types/aggregations/Aggregate.ts#L856-L864", + "specLocation": "_types/aggregations/Aggregate.ts#L858-L866", "variantName": "simple_long_value" }, { @@ -63460,8 +64227,20 @@ "name": "FiltersBucket", "namespace": "_types.aggregations" }, - "properties": [], - "specLocation": "_types/aggregations/Aggregate.ts#L645-L645" + "properties": [ + { + "name": "key", + "required": false, + "type": { + "kind": "instance_of", + "type": { + "name": "string", + "namespace": "_builtins" + } + } + } + ], + "specLocation": "_types/aggregations/Aggregate.ts#L645-L647" }, { "kind": "interface", @@ -63539,7 +64318,7 @@ "namespace": "_types.aggregations" }, "properties": [], - "specLocation": "_types/aggregations/Aggregate.ts#L722-L723", + "specLocation": "_types/aggregations/Aggregate.ts#L724-L725", "variantName": "frequent_item_sets" }, { @@ -63673,7 +64452,7 @@ } } ], - "specLocation": "_types/aggregations/Aggregate.ts#L725-L728" + "specLocation": "_types/aggregations/Aggregate.ts#L727-L730" }, { "kind": "interface", @@ -64217,7 +64996,7 @@ } } ], - "specLocation": "_types/aggregations/Aggregate.ts#L902-L912", + "specLocation": "_types/aggregations/Aggregate.ts#L904-L914", "variantName": "geo_line" }, { @@ -65183,7 +65962,7 @@ } } ], - "specLocation": "_types/aggregations/Aggregate.ts#L755-L770", + "specLocation": "_types/aggregations/Aggregate.ts#L757-L772", "variantName": "inference" }, { @@ -65256,7 +66035,7 @@ } } ], - "specLocation": "_types/aggregations/Aggregate.ts#L784-L787" + "specLocation": "_types/aggregations/Aggregate.ts#L786-L789" }, { "kind": "interface", @@ -65339,7 +66118,7 @@ } } ], - "specLocation": "_types/aggregations/Aggregate.ts#L778-L782" + "specLocation": "_types/aggregations/Aggregate.ts#L780-L784" }, { "kind": "interface", @@ -65382,7 +66161,7 @@ } } ], - "specLocation": "_types/aggregations/Aggregate.ts#L772-L776" + "specLocation": "_types/aggregations/Aggregate.ts#L774-L778" }, { "kind": "interface", @@ -65408,7 +66187,7 @@ "namespace": "_types.aggregations" }, "properties": [], - "specLocation": "_types/aggregations/Aggregate.ts#L709-L713", + "specLocation": "_types/aggregations/Aggregate.ts#L711-L715", "variantName": "ip_prefix" }, { @@ -65563,7 +66342,7 @@ } } ], - "specLocation": "_types/aggregations/Aggregate.ts#L715-L720" + "specLocation": "_types/aggregations/Aggregate.ts#L717-L722" }, { "kind": "interface", @@ -66063,7 +66842,7 @@ } } ], - "specLocation": "_types/aggregations/Aggregate.ts#L866-L873", + "specLocation": "_types/aggregations/Aggregate.ts#L868-L875", "variantName": "matrix_stats" }, { @@ -66213,7 +66992,7 @@ } } ], - "specLocation": "_types/aggregations/Aggregate.ts#L875-L884" + "specLocation": "_types/aggregations/Aggregate.ts#L877-L886" }, { "kind": "interface", @@ -67275,7 +68054,7 @@ "namespace": "_types.aggregations" }, "properties": [], - "specLocation": "_types/aggregations/Aggregate.ts#L894-L898", + "specLocation": "_types/aggregations/Aggregate.ts#L896-L900", "variantName": "parent" }, { @@ -68009,7 +68788,7 @@ } } ], - "specLocation": "_types/aggregations/Aggregate.ts#L847-L854", + "specLocation": "_types/aggregations/Aggregate.ts#L849-L856", "variantName": "rate" }, { @@ -68236,7 +69015,7 @@ } } ], - "specLocation": "_types/aggregations/Aggregate.ts#L739-L745", + "specLocation": "_types/aggregations/Aggregate.ts#L741-L747", "variantName": "scripted_metric" }, { @@ -68374,7 +69153,7 @@ "namespace": "_types.aggregations" }, "properties": [], - "specLocation": "_types/aggregations/Aggregate.ts#L668-L670", + "specLocation": "_types/aggregations/Aggregate.ts#L670-L672", "variantName": "siglterms" }, { @@ -68416,7 +69195,7 @@ } } ], - "specLocation": "_types/aggregations/Aggregate.ts#L677-L680" + "specLocation": "_types/aggregations/Aggregate.ts#L679-L682" }, { "kind": "interface", @@ -68440,7 +69219,7 @@ "namespace": "_types.aggregations" }, "properties": [], - "specLocation": "_types/aggregations/Aggregate.ts#L682-L684", + "specLocation": "_types/aggregations/Aggregate.ts#L684-L686", "variantName": "sigsterms" }, { @@ -68471,7 +69250,7 @@ } } ], - "specLocation": "_types/aggregations/Aggregate.ts#L686-L688" + "specLocation": "_types/aggregations/Aggregate.ts#L688-L690" }, { "kind": "interface", @@ -68526,7 +69305,7 @@ } } ], - "specLocation": "_types/aggregations/Aggregate.ts#L658-L666" + "specLocation": "_types/aggregations/Aggregate.ts#L660-L668" }, { "kind": "interface", @@ -68766,7 +69545,7 @@ } } ], - "specLocation": "_types/aggregations/Aggregate.ts#L672-L675" + "specLocation": "_types/aggregations/Aggregate.ts#L674-L677" }, { "kind": "interface", @@ -69819,7 +70598,7 @@ } } ], - "specLocation": "_types/aggregations/Aggregate.ts#L793-L804", + "specLocation": "_types/aggregations/Aggregate.ts#L795-L806", "variantName": "string_stats" }, { @@ -70091,7 +70870,7 @@ } } ], - "specLocation": "_types/aggregations/Aggregate.ts#L838-L845", + "specLocation": "_types/aggregations/Aggregate.ts#L840-L847", "variantName": "t_test" }, { @@ -70689,7 +71468,7 @@ "namespace": "_types.aggregations" }, "properties": [], - "specLocation": "_types/aggregations/Aggregate.ts#L730-L731", + "specLocation": "_types/aggregations/Aggregate.ts#L732-L733", "variantName": "time_series" }, { @@ -70774,7 +71553,7 @@ } } ], - "specLocation": "_types/aggregations/Aggregate.ts#L733-L735" + "specLocation": "_types/aggregations/Aggregate.ts#L735-L737" }, { "kind": "interface", @@ -70808,7 +71587,7 @@ } } ], - "specLocation": "_types/aggregations/Aggregate.ts#L747-L753", + "specLocation": "_types/aggregations/Aggregate.ts#L749-L755", "variantName": "top_hits" }, { @@ -71073,7 +71852,7 @@ } } ], - "specLocation": "_types/aggregations/Aggregate.ts#L832-L836" + "specLocation": "_types/aggregations/Aggregate.ts#L834-L838" }, { "kind": "interface", @@ -71103,7 +71882,7 @@ } } ], - "specLocation": "_types/aggregations/Aggregate.ts#L827-L830", + "specLocation": "_types/aggregations/Aggregate.ts#L829-L832", "variantName": "top_metrics" }, { @@ -71266,7 +72045,7 @@ "namespace": "_types.aggregations" }, "properties": [], - "specLocation": "_types/aggregations/Aggregate.ts#L690-L696", + "specLocation": "_types/aggregations/Aggregate.ts#L692-L698", "variantName": "umsigterms" }, { @@ -72062,7 +72841,7 @@ } } ], - "specLocation": "_types/analysis/token_filters.ts#L450-L452" + "specLocation": "_types/analysis/token_filters.ts#L451-L453" }, { "kind": "interface", @@ -72140,7 +72919,31 @@ } } ], - "specLocation": "_types/analysis/token_filters.ts#L454-L456" + "specLocation": "_types/analysis/token_filters.ts#L455-L457" + }, + { + "kind": "interface", + "inherits": { + "type": { + "name": "TokenFilterBase", + "namespace": "_types.analysis" + } + }, + "name": { + "name": "ArabicStemTokenFilter", + "namespace": "_types.analysis" + }, + "properties": [ + { + "name": "type", + "required": true, + "type": { + "kind": "literal_value", + "value": "arabic_stem" + } + } + ], + "specLocation": "_types/analysis/token_filters.ts#L547-L549" }, { "kind": "interface", @@ -72349,6 +73152,30 @@ ], "specLocation": "_types/analysis/analyzers.ts#L93-L98" }, + { + "kind": "interface", + "inherits": { + "type": { + "name": "TokenFilterBase", + "namespace": "_types.analysis" + } + }, + "name": { + "name": "BengaliNormalizationTokenFilter", + "namespace": "_types.analysis" + }, + "properties": [ + { + "name": "type", + "required": true, + "type": { + "kind": "literal_value", + "value": "bengali_normalization" + } + } + ], + "specLocation": "_types/analysis/token_filters.ts#L490-L492" + }, { "kind": "interface", "name": { @@ -72389,6 +73216,30 @@ ], "specLocation": "_types/analysis/analyzers.ts#L100-L104" }, + { + "kind": "interface", + "inherits": { + "type": { + "name": "TokenFilterBase", + "namespace": "_types.analysis" + } + }, + "name": { + "name": "BrazilianStemTokenFilter", + "namespace": "_types.analysis" + }, + "properties": [ + { + "name": "type", + "required": true, + "type": { + "kind": "literal_value", + "value": "brazilian_stem" + } + } + ], + "specLocation": "_types/analysis/token_filters.ts#L494-L496" + }, { "kind": "interface", "name": { @@ -72753,7 +73604,7 @@ "name": "CjkBigramIgnoredScript", "namespace": "_types.analysis" }, - "specLocation": "_types/analysis/token_filters.ts#L458-L463" + "specLocation": "_types/analysis/token_filters.ts#L459-L464" }, { "kind": "interface", @@ -72804,7 +73655,7 @@ } } ], - "specLocation": "_types/analysis/token_filters.ts#L465-L471" + "specLocation": "_types/analysis/token_filters.ts#L466-L472" }, { "kind": "interface", @@ -72828,7 +73679,7 @@ } } ], - "specLocation": "_types/analysis/token_filters.ts#L473-L475" + "specLocation": "_types/analysis/token_filters.ts#L474-L476" }, { "kind": "interface", @@ -72852,7 +73703,7 @@ } } ], - "specLocation": "_types/analysis/token_filters.ts#L477-L479" + "specLocation": "_types/analysis/token_filters.ts#L478-L480" }, { "kind": "interface", @@ -73309,6 +74160,30 @@ ], "specLocation": "_types/analysis/analyzers.ts#L132-L137" }, + { + "kind": "interface", + "inherits": { + "type": { + "name": "TokenFilterBase", + "namespace": "_types.analysis" + } + }, + "name": { + "name": "CzechStemTokenFilter", + "namespace": "_types.analysis" + }, + "properties": [ + { + "name": "type", + "required": true, + "type": { + "kind": "literal_value", + "value": "czech_stem" + } + } + ], + "specLocation": "_types/analysis/token_filters.ts#L551-L553" + }, { "kind": "interface", "name": { @@ -73371,7 +74246,7 @@ } } ], - "specLocation": "_types/analysis/token_filters.ts#L481-L483" + "specLocation": "_types/analysis/token_filters.ts#L482-L484" }, { "kind": "enum", @@ -73518,6 +74393,30 @@ ], "specLocation": "_types/analysis/analyzers.ts#L145-L150" }, + { + "kind": "interface", + "inherits": { + "type": { + "name": "TokenFilterBase", + "namespace": "_types.analysis" + } + }, + "name": { + "name": "DutchStemTokenFilter", + "namespace": "_types.analysis" + }, + "properties": [ + { + "name": "type", + "required": true, + "type": { + "kind": "literal_value", + "value": "dutch_stem" + } + } + ], + "specLocation": "_types/analysis/token_filters.ts#L559-L561" + }, { "kind": "enum", "members": [ @@ -73670,6 +74569,7 @@ } }, { + "esQuirk": "A comma-separated string is also accepted but the enum array is enough", "name": "token_chars", "required": false, "serverDefault": [], @@ -73685,7 +74585,7 @@ } } ], - "specLocation": "_types/analysis/tokenizers.ts#L48-L57" + "specLocation": "_types/analysis/tokenizers.ts#L48-L58" }, { "kind": "interface", @@ -74060,7 +74960,7 @@ } } ], - "specLocation": "_types/analysis/token_filters.ts#L485-L487" + "specLocation": "_types/analysis/token_filters.ts#L486-L488" }, { "kind": "interface", @@ -74116,6 +75016,30 @@ ], "specLocation": "_types/analysis/analyzers.ts#L172-L177" }, + { + "kind": "interface", + "inherits": { + "type": { + "name": "TokenFilterBase", + "namespace": "_types.analysis" + } + }, + "name": { + "name": "FrenchStemTokenFilter", + "namespace": "_types.analysis" + }, + "properties": [ + { + "name": "type", + "required": true, + "type": { + "kind": "literal_value", + "value": "french_stem" + } + } + ], + "specLocation": "_types/analysis/token_filters.ts#L555-L557" + }, { "kind": "interface", "name": { @@ -74246,7 +75170,31 @@ } } ], - "specLocation": "_types/analysis/token_filters.ts#L489-L491" + "specLocation": "_types/analysis/token_filters.ts#L498-L500" + }, + { + "kind": "interface", + "inherits": { + "type": { + "name": "TokenFilterBase", + "namespace": "_types.analysis" + } + }, + "name": { + "name": "GermanStemTokenFilter", + "namespace": "_types.analysis" + }, + "properties": [ + { + "name": "type", + "required": true, + "type": { + "kind": "literal_value", + "value": "german_stem" + } + } + ], + "specLocation": "_types/analysis/token_filters.ts#L563-L565" }, { "kind": "interface", @@ -74364,7 +75312,7 @@ } } ], - "specLocation": "_types/analysis/token_filters.ts#L493-L495" + "specLocation": "_types/analysis/token_filters.ts#L502-L504" }, { "kind": "interface", @@ -74740,7 +75688,7 @@ } }, { - "name": "case_first", + "name": "caseFirst", "required": false, "type": { "kind": "instance_of", @@ -74751,7 +75699,7 @@ } }, { - "name": "case_level", + "name": "caseLevel", "required": false, "type": { "kind": "instance_of", @@ -74784,7 +75732,7 @@ } }, { - "name": "hiragana_quaternary_mode", + "name": "hiraganaQuaternaryMode", "required": false, "type": { "kind": "instance_of", @@ -74839,7 +75787,7 @@ } }, { - "name": "variable_top", + "name": "variableTop", "required": false, "type": { "kind": "instance_of", @@ -75144,7 +76092,7 @@ } } ], - "specLocation": "_types/analysis/token_filters.ts#L497-L499" + "specLocation": "_types/analysis/token_filters.ts#L506-L508" }, { "kind": "interface", @@ -75639,7 +76587,7 @@ } } ], - "specLocation": "_types/analysis/token_filters.ts#L501-L503" + "specLocation": "_types/analysis/token_filters.ts#L510-L512" }, { "kind": "interface", @@ -75675,7 +76623,7 @@ } } ], - "specLocation": "_types/analysis/tokenizers.ts#L68-L74" + "specLocation": "_types/analysis/tokenizers.ts#L69-L75" }, { "kind": "interface", @@ -76118,7 +77066,7 @@ } } ], - "specLocation": "_types/analysis/tokenizers.ts#L76-L78" + "specLocation": "_types/analysis/tokenizers.ts#L77-L79" }, { "kind": "interface", @@ -76326,7 +77274,7 @@ } } ], - "specLocation": "_types/analysis/tokenizers.ts#L80-L82" + "specLocation": "_types/analysis/tokenizers.ts#L81-L83" }, { "kind": "interface", @@ -76447,7 +77395,7 @@ } } ], - "specLocation": "_types/analysis/token_filters.ts#L505-L516" + "specLocation": "_types/analysis/token_filters.ts#L514-L525" }, { "kind": "interface", @@ -76633,6 +77581,7 @@ } }, { + "esQuirk": "A comma-separated string is also accepted but the enum array is enough", "name": "token_chars", "required": false, "serverDefault": [], @@ -76648,7 +77597,7 @@ } } ], - "specLocation": "_types/analysis/tokenizers.ts#L84-L93" + "specLocation": "_types/analysis/tokenizers.ts#L85-L95" }, { "kind": "interface", @@ -77040,7 +77989,7 @@ } } ], - "specLocation": "_types/analysis/tokenizers.ts#L95-L102" + "specLocation": "_types/analysis/tokenizers.ts#L97-L104" }, { "kind": "interface", @@ -77288,6 +78237,17 @@ } } }, + { + "name": "flags", + "required": false, + "type": { + "kind": "instance_of", + "type": { + "name": "string", + "namespace": "_builtins" + } + } + }, { "description": "Regular expression, written in Java’s regular expression syntax. The filter replaces token substrings matching this pattern with the substring in the `replacement` parameter.", "name": "pattern", @@ -77313,7 +78273,7 @@ } } ], - "specLocation": "_types/analysis/token_filters.ts#L382-L390" + "specLocation": "_types/analysis/token_filters.ts#L382-L391" }, { "kind": "interface", @@ -77370,7 +78330,7 @@ } } ], - "specLocation": "_types/analysis/tokenizers.ts#L104-L109" + "specLocation": "_types/analysis/tokenizers.ts#L106-L111" }, { "kind": "interface", @@ -77434,7 +78394,31 @@ } } ], - "specLocation": "_types/analysis/token_filters.ts#L518-L520" + "specLocation": "_types/analysis/token_filters.ts#L527-L529" + }, + { + "kind": "interface", + "inherits": { + "type": { + "name": "TokenFilterBase", + "namespace": "_types.analysis" + } + }, + "name": { + "name": "PersianStemTokenFilter", + "namespace": "_types.analysis" + }, + "properties": [ + { + "name": "type", + "required": true, + "type": { + "kind": "literal_value", + "value": "persian_stem" + } + } + ], + "specLocation": "_types/analysis/token_filters.ts#L571-L573" }, { "kind": "enum", @@ -77690,7 +78674,7 @@ } } ], - "specLocation": "_types/analysis/token_filters.ts#L392-L394" + "specLocation": "_types/analysis/token_filters.ts#L393-L395" }, { "kind": "interface", @@ -77780,7 +78764,7 @@ } } ], - "specLocation": "_types/analysis/token_filters.ts#L396-L400" + "specLocation": "_types/analysis/token_filters.ts#L397-L401" }, { "kind": "interface", @@ -77804,7 +78788,7 @@ } } ], - "specLocation": "_types/analysis/token_filters.ts#L402-L404" + "specLocation": "_types/analysis/token_filters.ts#L403-L405" }, { "kind": "interface", @@ -77828,7 +78812,7 @@ } } ], - "specLocation": "_types/analysis/token_filters.ts#L406-L408" + "specLocation": "_types/analysis/token_filters.ts#L407-L409" }, { "kind": "interface", @@ -77938,6 +78922,30 @@ ], "specLocation": "_types/analysis/analyzers.ts#L275-L280" }, + { + "kind": "interface", + "inherits": { + "type": { + "name": "TokenFilterBase", + "namespace": "_types.analysis" + } + }, + "name": { + "name": "RussianStemTokenFilter", + "namespace": "_types.analysis" + }, + "properties": [ + { + "name": "type", + "required": true, + "type": { + "kind": "literal_value", + "value": "russian_stem" + } + } + ], + "specLocation": "_types/analysis/token_filters.ts#L567-L569" + }, { "kind": "interface", "inherits": { @@ -77960,7 +78968,7 @@ } } ], - "specLocation": "_types/analysis/token_filters.ts#L522-L524" + "specLocation": "_types/analysis/token_filters.ts#L531-L533" }, { "kind": "interface", @@ -77984,7 +78992,7 @@ } } ], - "specLocation": "_types/analysis/token_filters.ts#L526-L528" + "specLocation": "_types/analysis/token_filters.ts#L535-L537" }, { "kind": "interface", @@ -78062,7 +79070,7 @@ } } ], - "specLocation": "_types/analysis/token_filters.ts#L530-L532" + "specLocation": "_types/analysis/token_filters.ts#L539-L541" }, { "kind": "interface", @@ -78244,7 +79252,7 @@ } } ], - "specLocation": "_types/analysis/tokenizers.ts#L116-L119" + "specLocation": "_types/analysis/tokenizers.ts#L118-L121" }, { "kind": "interface", @@ -78279,7 +79287,7 @@ } } ], - "specLocation": "_types/analysis/tokenizers.ts#L111-L114" + "specLocation": "_types/analysis/tokenizers.ts#L113-L116" }, { "kind": "interface", @@ -78461,7 +79469,7 @@ } } ], - "specLocation": "_types/analysis/token_filters.ts#L410-L414" + "specLocation": "_types/analysis/token_filters.ts#L411-L415" }, { "kind": "interface", @@ -78539,7 +79547,7 @@ } } ], - "specLocation": "_types/analysis/token_filters.ts#L534-L536" + "specLocation": "_types/analysis/token_filters.ts#L543-L545" }, { "kind": "interface", @@ -78684,7 +79692,7 @@ } } ], - "specLocation": "_types/analysis/tokenizers.ts#L121-L124" + "specLocation": "_types/analysis/tokenizers.ts#L123-L126" }, { "kind": "interface", @@ -78735,7 +79743,7 @@ } } ], - "specLocation": "_types/analysis/token_filters.ts#L416-L422" + "specLocation": "_types/analysis/token_filters.ts#L417-L423" }, { "kind": "interface", @@ -78773,7 +79781,7 @@ } } ], - "specLocation": "_types/analysis/token_filters.ts#L424-L428" + "specLocation": "_types/analysis/token_filters.ts#L425-L429" }, { "kind": "interface", @@ -79356,7 +80364,7 @@ } } ], - "specLocation": "_types/analysis/tokenizers.ts#L126-L128" + "specLocation": "_types/analysis/tokenizers.ts#L128-L130" }, { "kind": "enum", @@ -79384,7 +80392,7 @@ "name": "TokenChar", "namespace": "_types.analysis" }, - "specLocation": "_types/analysis/tokenizers.ts#L59-L66" + "specLocation": "_types/analysis/tokenizers.ts#L60-L67" }, { "kind": "type_alias", @@ -79398,7 +80406,7 @@ "name": "TokenFilter", "namespace": "_types.analysis" }, - "specLocation": "_types/analysis/token_filters.ts#L538-L543", + "specLocation": "_types/analysis/token_filters.ts#L575-L580", "type": { "kind": "union_of", "items": [ @@ -79446,7 +80454,7 @@ "name": "TokenFilterDefinition", "namespace": "_types.analysis" }, - "specLocation": "_types/analysis/token_filters.ts#L545-L614", + "specLocation": "_types/analysis/token_filters.ts#L582-L660", "type": { "kind": "union_of", "items": [ @@ -79457,6 +80465,13 @@ "namespace": "_types.analysis" } }, + { + "kind": "instance_of", + "type": { + "name": "ArabicStemTokenFilter", + "namespace": "_types.analysis" + } + }, { "kind": "instance_of", "type": { @@ -79471,6 +80486,20 @@ "namespace": "_types.analysis" } }, + { + "kind": "instance_of", + "type": { + "name": "BengaliNormalizationTokenFilter", + "namespace": "_types.analysis" + } + }, + { + "kind": "instance_of", + "type": { + "name": "BrazilianStemTokenFilter", + "namespace": "_types.analysis" + } + }, { "kind": "instance_of", "type": { @@ -79506,6 +80535,13 @@ "namespace": "_types.analysis" } }, + { + "kind": "instance_of", + "type": { + "name": "CzechStemTokenFilter", + "namespace": "_types.analysis" + } + }, { "kind": "instance_of", "type": { @@ -79520,6 +80556,13 @@ "namespace": "_types.analysis" } }, + { + "kind": "instance_of", + "type": { + "name": "DutchStemTokenFilter", + "namespace": "_types.analysis" + } + }, { "kind": "instance_of", "type": { @@ -79548,6 +80591,13 @@ "namespace": "_types.analysis" } }, + { + "kind": "instance_of", + "type": { + "name": "FrenchStemTokenFilter", + "namespace": "_types.analysis" + } + }, { "kind": "instance_of", "type": { @@ -79555,6 +80605,13 @@ "namespace": "_types.analysis" } }, + { + "kind": "instance_of", + "type": { + "name": "GermanStemTokenFilter", + "namespace": "_types.analysis" + } + }, { "kind": "instance_of", "type": { @@ -79688,6 +80745,13 @@ "namespace": "_types.analysis" } }, + { + "kind": "instance_of", + "type": { + "name": "PersianStemTokenFilter", + "namespace": "_types.analysis" + } + }, { "kind": "instance_of", "type": { @@ -79716,6 +80780,13 @@ "namespace": "_types.analysis" } }, + { + "kind": "instance_of", + "type": { + "name": "RussianStemTokenFilter", + "namespace": "_types.analysis" + } + }, { "kind": "instance_of", "type": { @@ -79925,7 +80996,7 @@ "name": "Tokenizer", "namespace": "_types.analysis" }, - "specLocation": "_types/analysis/tokenizers.ts#L140-L145", + "specLocation": "_types/analysis/tokenizers.ts#L142-L147", "type": { "kind": "union_of", "items": [ @@ -79973,7 +81044,7 @@ "name": "TokenizerDefinition", "namespace": "_types.analysis" }, - "specLocation": "_types/analysis/tokenizers.ts#L147-L170", + "specLocation": "_types/analysis/tokenizers.ts#L149-L172", "type": { "kind": "union_of", "items": [ @@ -80133,7 +81204,7 @@ } } ], - "specLocation": "_types/analysis/token_filters.ts#L430-L432" + "specLocation": "_types/analysis/token_filters.ts#L431-L433" }, { "kind": "interface", @@ -80169,7 +81240,7 @@ } } ], - "specLocation": "_types/analysis/token_filters.ts#L434-L438" + "specLocation": "_types/analysis/token_filters.ts#L435-L439" }, { "kind": "interface", @@ -80258,7 +81329,7 @@ } } ], - "specLocation": "_types/analysis/tokenizers.ts#L130-L133" + "specLocation": "_types/analysis/tokenizers.ts#L132-L135" }, { "kind": "interface", @@ -80294,7 +81365,7 @@ } } ], - "specLocation": "_types/analysis/token_filters.ts#L440-L444" + "specLocation": "_types/analysis/token_filters.ts#L441-L445" }, { "kind": "interface", @@ -80318,7 +81389,7 @@ } } ], - "specLocation": "_types/analysis/token_filters.ts#L446-L448" + "specLocation": "_types/analysis/token_filters.ts#L447-L449" }, { "kind": "interface", @@ -80386,7 +81457,7 @@ } } ], - "specLocation": "_types/analysis/tokenizers.ts#L135-L138" + "specLocation": "_types/analysis/tokenizers.ts#L137-L140" }, { "kind": "interface", @@ -80679,6 +81750,17 @@ } } }, + { + "name": "ignore_malformed", + "required": false, + "type": { + "kind": "instance_of", + "type": { + "name": "boolean", + "namespace": "_builtins" + } + } + }, { "name": "metrics", "required": true, @@ -80705,7 +81787,7 @@ } } ], - "specLocation": "_types/mapping/complex.ts#L59-L64" + "specLocation": "_types/mapping/complex.ts#L60-L66" }, { "kind": "interface", @@ -80849,7 +81931,7 @@ } } ], - "specLocation": "_types/mapping/core.ts#L55-L57" + "specLocation": "_types/mapping/core.ts#L56-L58" }, { "kind": "interface", @@ -80970,7 +82052,7 @@ } } ], - "specLocation": "_types/mapping/core.ts#L59-L74" + "specLocation": "_types/mapping/core.ts#L60-L75" }, { "kind": "interface", @@ -81005,7 +82087,7 @@ } } ], - "specLocation": "_types/mapping/core.ts#L186-L189" + "specLocation": "_types/mapping/core.ts#L187-L190" }, { "kind": "interface", @@ -81270,7 +82352,7 @@ } } ], - "specLocation": "_types/mapping/core.ts#L46-L49" + "specLocation": "_types/mapping/core.ts#L47-L50" }, { "kind": "interface", @@ -81438,7 +82520,7 @@ } } ], - "specLocation": "_types/mapping/core.ts#L90-L100" + "specLocation": "_types/mapping/core.ts#L91-L101" }, { "kind": "interface", @@ -81572,7 +82654,7 @@ } } ], - "specLocation": "_types/mapping/core.ts#L76-L88" + "specLocation": "_types/mapping/core.ts#L77-L89" }, { "kind": "interface", @@ -81904,7 +82986,7 @@ } } ], - "specLocation": "_types/mapping/core.ts#L51-L53" + "specLocation": "_types/mapping/core.ts#L52-L54" }, { "kind": "interface", @@ -81939,7 +83021,7 @@ } } ], - "specLocation": "_types/mapping/core.ts#L166-L169" + "specLocation": "_types/mapping/core.ts#L167-L170" }, { "kind": "interface", @@ -82264,7 +83346,7 @@ } } ], - "specLocation": "_types/mapping/core.ts#L335-L366" + "specLocation": "_types/mapping/core.ts#L353-L384" }, { "kind": "interface", @@ -82726,7 +83808,7 @@ "name": "FieldType", "namespace": "_types.mapping" }, - "specLocation": "_types/mapping/Property.ts#L191-L240" + "specLocation": "_types/mapping/Property.ts#L193-L242" }, { "kind": "interface", @@ -82840,6 +83922,20 @@ } } }, + { + "name": "time_series_dimensions", + "required": false, + "type": { + "kind": "array_of", + "value": { + "kind": "instance_of", + "type": { + "name": "string", + "namespace": "_builtins" + } + } + } + }, { "name": "type", "required": true, @@ -82849,7 +83945,7 @@ } } ], - "specLocation": "_types/mapping/complex.ts#L26-L37" + "specLocation": "_types/mapping/complex.ts#L26-L38" }, { "kind": "interface", @@ -82884,7 +83980,7 @@ } } ], - "specLocation": "_types/mapping/core.ts#L156-L159" + "specLocation": "_types/mapping/core.ts#L157-L160" }, { "kind": "interface", @@ -82934,7 +84030,26 @@ "name": "GeoOrientation", "namespace": "_types.mapping" }, - "specLocation": "_types/mapping/geo.ts#L34-L39" + "specLocation": "_types/mapping/geo.ts#L41-L46" + }, + { + "kind": "enum", + "members": [ + { + "name": "gauge" + }, + { + "name": "counter" + }, + { + "name": "position" + } + ], + "name": { + "name": "GeoPointMetricType", + "namespace": "_types.mapping" + }, + "specLocation": "_types/mapping/geo.ts#L35-L39" }, { "kind": "interface", @@ -83022,9 +84137,20 @@ "kind": "literal_value", "value": "geo_point" } + }, + { + "name": "time_series_metric", + "required": false, + "type": { + "kind": "instance_of", + "type": { + "name": "GeoPointMetricType", + "namespace": "_types.mapping" + } + } } ], - "specLocation": "_types/mapping/geo.ts#L24-L32" + "specLocation": "_types/mapping/geo.ts#L24-L33" }, { "kind": "interface", @@ -83117,7 +84243,7 @@ } } ], - "specLocation": "_types/mapping/geo.ts#L41-L55" + "specLocation": "_types/mapping/geo.ts#L48-L62" }, { "kind": "enum", @@ -83133,7 +84259,7 @@ "name": "GeoStrategy", "namespace": "_types.mapping" }, - "specLocation": "_types/mapping/geo.ts#L57-L60" + "specLocation": "_types/mapping/geo.ts#L64-L67" }, { "kind": "interface", @@ -83168,7 +84294,7 @@ } } ], - "specLocation": "_types/mapping/core.ts#L161-L164" + "specLocation": "_types/mapping/core.ts#L162-L165" }, { "kind": "interface", @@ -83448,7 +84574,7 @@ "name": "IndexOptions", "namespace": "_types.mapping" }, - "specLocation": "_types/mapping/core.ts#L291-L296" + "specLocation": "_types/mapping/core.ts#L309-L314" }, { "kind": "interface", @@ -83483,7 +84609,7 @@ } } ], - "specLocation": "_types/mapping/core.ts#L171-L174" + "specLocation": "_types/mapping/core.ts#L172-L175" }, { "kind": "interface", @@ -83713,7 +84839,7 @@ } } ], - "specLocation": "_types/mapping/core.ts#L102-L106" + "specLocation": "_types/mapping/core.ts#L103-L107" }, { "kind": "interface", @@ -83890,7 +85016,7 @@ } } ], - "specLocation": "_types/mapping/core.ts#L108-L127" + "specLocation": "_types/mapping/core.ts#L109-L128" }, { "kind": "interface", @@ -83925,7 +85051,7 @@ } } ], - "specLocation": "_types/mapping/core.ts#L176-L179" + "specLocation": "_types/mapping/core.ts#L177-L180" }, { "kind": "interface", @@ -84030,7 +85156,7 @@ } } ], - "specLocation": "_types/mapping/core.ts#L264-L289" + "specLocation": "_types/mapping/core.ts#L282-L307" }, { "kind": "enum", @@ -84127,7 +85253,7 @@ } } ], - "specLocation": "_types/mapping/complex.ts#L39-L44" + "specLocation": "_types/mapping/complex.ts#L40-L45" }, { "kind": "interface", @@ -84250,7 +85376,7 @@ } } ], - "specLocation": "_types/mapping/core.ts#L129-L149" + "specLocation": "_types/mapping/core.ts#L130-L150" }, { "kind": "interface", @@ -84296,7 +85422,7 @@ } } ], - "specLocation": "_types/mapping/complex.ts#L46-L50" + "specLocation": "_types/mapping/complex.ts#L47-L51" }, { "kind": "enum", @@ -84312,7 +85438,7 @@ "name": "OnScriptError", "namespace": "_types.mapping" }, - "specLocation": "_types/mapping/core.ts#L151-L154" + "specLocation": "_types/mapping/core.ts#L152-L155" }, { "kind": "interface", @@ -84369,7 +85495,7 @@ } } ], - "specLocation": "_types/mapping/complex.ts#L52-L57" + "specLocation": "_types/mapping/complex.ts#L53-L58" }, { "kind": "interface", @@ -84393,7 +85519,7 @@ } } ], - "specLocation": "_types/mapping/core.ts#L202-L204" + "specLocation": "_types/mapping/core.ts#L203-L205" }, { "kind": "interface", @@ -84450,7 +85576,7 @@ } } ], - "specLocation": "_types/mapping/geo.ts#L67-L72" + "specLocation": "_types/mapping/geo.ts#L74-L79" }, { "kind": "type_alias", @@ -84458,7 +85584,7 @@ "name": "Property", "namespace": "_types.mapping" }, - "specLocation": "_types/mapping/Property.ts#L119-L189", + "specLocation": "_types/mapping/Property.ts#L120-L191", "type": { "kind": "union_of", "items": [ @@ -84609,6 +85735,13 @@ "namespace": "_types.mapping" } }, + { + "kind": "instance_of", + "type": { + "name": "RankVectorProperty", + "namespace": "_types.mapping" + } + }, { "kind": "instance_of", "type": { @@ -84938,7 +86071,7 @@ } } ], - "specLocation": "_types/mapping/Property.ts#L86-L97" + "specLocation": "_types/mapping/Property.ts#L87-L98" }, { "kind": "interface", @@ -85022,7 +86155,7 @@ } } ], - "specLocation": "_types/mapping/core.ts#L206-L209" + "specLocation": "_types/mapping/core.ts#L207-L210" }, { "kind": "interface", @@ -85057,7 +86190,73 @@ } } ], - "specLocation": "_types/mapping/core.ts#L211-L214" + "specLocation": "_types/mapping/core.ts#L212-L215" + }, + { + "kind": "enum", + "members": [ + { + "name": "byte" + }, + { + "name": "float" + }, + { + "name": "bit" + } + ], + "name": { + "name": "RankVectorElementType", + "namespace": "_types.mapping" + }, + "specLocation": "_types/mapping/core.ts#L386-L390" + }, + { + "kind": "interface", + "description": "Technical preview", + "inherits": { + "type": { + "name": "PropertyBase", + "namespace": "_types.mapping" + } + }, + "name": { + "name": "RankVectorProperty", + "namespace": "_types.mapping" + }, + "properties": [ + { + "name": "type", + "required": true, + "type": { + "kind": "literal_value", + "value": "rank_vectors" + } + }, + { + "name": "element_type", + "required": false, + "type": { + "kind": "instance_of", + "type": { + "name": "RankVectorElementType", + "namespace": "_types.mapping" + } + } + }, + { + "name": "dims", + "required": false, + "type": { + "kind": "instance_of", + "type": { + "name": "integer", + "namespace": "_types" + } + } + } + ], + "specLocation": "_types/mapping/core.ts#L217-L224" }, { "kind": "interface", @@ -85345,7 +86544,7 @@ } } ], - "specLocation": "_types/mapping/core.ts#L196-L200" + "specLocation": "_types/mapping/core.ts#L197-L201" }, { "kind": "interface", @@ -85480,7 +86679,7 @@ } } ], - "specLocation": "_types/mapping/core.ts#L245-L256" + "specLocation": "_types/mapping/core.ts#L263-L274" }, { "kind": "interface", @@ -85557,7 +86756,7 @@ } } ], - "specLocation": "_types/mapping/core.ts#L220-L243" + "specLocation": "_types/mapping/core.ts#L238-L261" }, { "kind": "interface", @@ -85628,7 +86827,7 @@ } } ], - "specLocation": "_types/mapping/geo.ts#L74-L86" + "specLocation": "_types/mapping/geo.ts#L81-L93" }, { "kind": "interface", @@ -85663,7 +86862,7 @@ } } ], - "specLocation": "_types/mapping/core.ts#L181-L184" + "specLocation": "_types/mapping/core.ts#L182-L185" }, { "kind": "interface", @@ -85788,6 +86987,54 @@ }, "specLocation": "_types/mapping/meta-fields.ts#L67-L75" }, + { + "kind": "interface", + "name": { + "name": "SparseVectorIndexOptions", + "namespace": "_types.mapping" + }, + "properties": [ + { + "availability": { + "serverless": {}, + "stack": { + "since": "8.19.0" + } + }, + "containerProperty": true, + "description": "Whether to perform pruning, omitting the non-significant tokens from the query to improve query performance.\nIf prune is true but the pruning_config is not specified, pruning will occur but default values will be used.\nDefault: false", + "name": "prune", + "required": false, + "type": { + "kind": "instance_of", + "type": { + "name": "boolean", + "namespace": "_builtins" + } + } + }, + { + "availability": { + "serverless": {}, + "stack": { + "since": "8.19.0" + } + }, + "containerProperty": true, + "description": "Optional pruning configuration.\nIf enabled, this will omit non-significant tokens from the query in order to improve query performance.\nThis is only used if prune is set to true.\nIf prune is set to true but pruning_config is not specified, default values will be used.", + "name": "pruning_config", + "required": false, + "type": { + "kind": "instance_of", + "type": { + "name": "TokenPruningConfig", + "namespace": "_types" + } + } + } + ], + "specLocation": "_types/mapping/SparseVectorIndexOptions.ts#L22-L42" + }, { "kind": "interface", "inherits": { @@ -85801,6 +87048,17 @@ "namespace": "_types.mapping" }, "properties": [ + { + "name": "store", + "required": false, + "type": { + "kind": "instance_of", + "type": { + "name": "boolean", + "namespace": "_builtins" + } + } + }, { "name": "type", "required": true, @@ -85808,9 +87066,27 @@ "kind": "literal_value", "value": "sparse_vector" } + }, + { + "availability": { + "serverless": {}, + "stack": { + "since": "8.19.0" + } + }, + "description": "Additional index options for the sparse vector field that controls the\ntoken pruning behavior of the sparse vector field.", + "name": "index_options", + "required": false, + "type": { + "kind": "instance_of", + "type": { + "name": "SparseVectorIndexOptions", + "namespace": "_types.mapping" + } + } } ], - "specLocation": "_types/mapping/core.ts#L216-L218" + "specLocation": "_types/mapping/core.ts#L226-L236" }, { "kind": "enum", @@ -85925,7 +87201,7 @@ "name": "SyntheticSourceKeepEnum", "namespace": "_types.mapping" }, - "specLocation": "_types/mapping/Property.ts#L99-L117" + "specLocation": "_types/mapping/Property.ts#L100-L118" }, { "kind": "enum", @@ -85988,7 +87264,7 @@ } } ], - "specLocation": "_types/mapping/core.ts#L298-L301" + "specLocation": "_types/mapping/core.ts#L316-L319" }, { "kind": "interface", @@ -86201,7 +87477,7 @@ } } ], - "specLocation": "_types/mapping/core.ts#L303-L320" + "specLocation": "_types/mapping/core.ts#L321-L338" }, { "kind": "enum", @@ -86584,7 +87860,7 @@ } } ], - "specLocation": "_types/mapping/core.ts#L191-L194" + "specLocation": "_types/mapping/core.ts#L192-L195" }, { "kind": "interface", @@ -86608,7 +87884,7 @@ } } ], - "specLocation": "_types/mapping/core.ts#L322-L324" + "specLocation": "_types/mapping/core.ts#L340-L342" }, { "kind": "interface", @@ -86649,7 +87925,7 @@ } } ], - "specLocation": "_types/mapping/core.ts#L326-L333" + "specLocation": "_types/mapping/core.ts#L344-L351" }, { "kind": "interface", @@ -94823,7 +96099,7 @@ "kind": "instance_of", "type": { "name": "TokenPruningConfig", - "namespace": "_types.query_dsl" + "namespace": "_types" } } } @@ -95174,7 +96450,7 @@ "kind": "instance_of", "type": { "name": "TokenPruningConfig", - "namespace": "_types.query_dsl" + "namespace": "_types" } } } @@ -95215,55 +96491,6 @@ }, "specLocation": "_types/query_dsl/fulltext.ts#L610-L636" }, - { - "kind": "interface", - "name": { - "name": "TokenPruningConfig", - "namespace": "_types.query_dsl" - }, - "properties": [ - { - "description": "Tokens whose frequency is more than this threshold times the average frequency of all tokens in the specified field are considered outliers and pruned.", - "name": "tokens_freq_ratio_threshold", - "required": false, - "serverDefault": 5, - "type": { - "kind": "instance_of", - "type": { - "name": "integer", - "namespace": "_types" - } - } - }, - { - "description": "Tokens whose weight is less than this threshold are considered nonsignificant and pruned.", - "name": "tokens_weight_threshold", - "required": false, - "serverDefault": 0.4, - "type": { - "kind": "instance_of", - "type": { - "name": "float", - "namespace": "_types" - } - } - }, - { - "description": "Whether to only score pruned tokens, vs only scoring kept tokens.", - "name": "only_score_pruned_tokens", - "required": false, - "serverDefault": false, - "type": { - "kind": "instance_of", - "type": { - "name": "boolean", - "namespace": "_builtins" - } - } - } - ], - "specLocation": "_types/query_dsl/TokenPruningConfig.ts#L22-L35" - }, { "kind": "interface", "inherits": { @@ -95457,7 +96684,7 @@ "kind": "instance_of", "type": { "name": "TokenPruningConfig", - "namespace": "_types.query_dsl" + "namespace": "_types" } } } @@ -98870,7 +100097,7 @@ "name": "CatDatafeedColumns", "namespace": "cat._types" }, - "specLocation": "cat/_types/CatBase.ts#L1015-L1015", + "specLocation": "cat/_types/CatBase.ts#L1284-L1284", "type": { "kind": "union_of", "items": [ @@ -99028,7 +100255,7 @@ "name": "CatDfaColumns", "namespace": "cat._types" }, - "specLocation": "cat/_types/CatBase.ts#L1014-L1014", + "specLocation": "cat/_types/CatBase.ts#L1283-L1283", "type": { "kind": "union_of", "items": [ @@ -99766,7 +100993,7 @@ "name": "CatNodeColumns", "namespace": "cat._types" }, - "specLocation": "cat/_types/CatBase.ts#L1016-L1016", + "specLocation": "cat/_types/CatBase.ts#L1285-L1285", "type": { "kind": "union_of", "items": [ @@ -99790,6 +101017,230 @@ ] } }, + { + "kind": "enum", + "isOpen": true, + "members": [ + { + "aliases": [ + "i", + "idx" + ], + "description": "The name of the index.", + "name": "index" + }, + { + "aliases": [ + "s", + "sh" + ], + "description": "The name of the shard.", + "name": "shard" + }, + { + "aliases": [ + "t", + "ti", + "primaryOrReplica" + ], + "description": "The recovery time elasped.", + "name": "time" + }, + { + "description": "The type of recovery, from a peer or a snapshot.", + "name": "type" + }, + { + "aliases": [ + "st" + ], + "description": "The stage of the recovery. Returned values are: `INIT`, `INDEX`: recovery of lucene files, either reusing local ones are copying new ones, `VERIFY_INDEX`: potentially running check index, `TRANSLOG`: starting up the engine, replaying the translog, `FINALIZE`: performing final task after all translog ops have been done, `DONE`", + "name": "stage" + }, + { + "aliases": [ + "shost" + ], + "description": "The host address the index is moving from.", + "name": "source_host" + }, + { + "aliases": [ + "snode" + ], + "description": "The node name the index is moving from.", + "name": "source_node" + }, + { + "aliases": [ + "thost" + ], + "description": "The host address the index is moving to.", + "name": "target_host" + }, + { + "aliases": [ + "tnode" + ], + "description": "The node name the index is moving to.", + "name": "target_node" + }, + { + "aliases": [ + "tnode" + ], + "description": "The name of the repository being used. if not relevant 'n/a'.", + "name": "repository" + }, + { + "aliases": [ + "snap" + ], + "description": "The name of the snapshot being used. if not relevant 'n/a'.", + "name": "snapshot" + }, + { + "aliases": [ + "f" + ], + "description": "The total number of files to recover.", + "name": "files" + }, + { + "aliases": [ + "fr" + ], + "description": "The number of files currently recovered.", + "name": "files_recovered" + }, + { + "aliases": [ + "fp" + ], + "description": "The percentage of files currently recovered.", + "name": "files_percent" + }, + { + "aliases": [ + "tf" + ], + "description": "The total number of files.", + "name": "files_total" + }, + { + "aliases": [ + "b" + ], + "description": "The total number of bytes to recover.", + "name": "bytes" + }, + { + "aliases": [ + "br" + ], + "description": "Total number of bytes currently recovered.", + "name": "bytes_recovered" + }, + { + "aliases": [ + "bp" + ], + "description": "The percentage of bytes currently recovered.", + "name": "bytes_percent" + }, + { + "aliases": [ + "tb" + ], + "description": "The total number of bytes.", + "name": "bytes_total" + }, + { + "aliases": [ + "to" + ], + "description": "The total number of translog ops to recover.", + "name": "translog_ops" + }, + { + "aliases": [ + "tor" + ], + "description": "The total number of translog ops currently recovered.", + "name": "translog_ops_recovered" + }, + { + "aliases": [ + "top" + ], + "description": "The percentage of translog ops currently recovered.", + "name": "translog_ops_percent" + }, + { + "aliases": [ + "start" + ], + "description": "The start time of the recovery operation.", + "name": "start_time" + }, + { + "aliases": [ + "start_millis" + ], + "description": "The start time of the recovery operation in eopch milliseconds.", + "name": "start_time_millis" + }, + { + "aliases": [ + "stop" + ], + "description": "The end time of the recovery operation. If ongoing '1970-01-01T00:00:00.000Z'", + "name": "stop_time" + }, + { + "aliases": [ + "stop_millis" + ], + "description": "The end time of the recovery operation in eopch milliseconds. If ongoing '0'", + "name": "stop_time_millis" + } + ], + "name": { + "name": "CatRecoveryColumn", + "namespace": "cat._types" + }, + "specLocation": "cat/_types/CatBase.ts#L1014-L1145" + }, + { + "kind": "type_alias", + "name": { + "name": "CatRecoveryColumns", + "namespace": "cat._types" + }, + "specLocation": "cat/_types/CatBase.ts#L1286-L1286", + "type": { + "kind": "union_of", + "items": [ + { + "kind": "instance_of", + "type": { + "name": "CatRecoveryColumn", + "namespace": "cat._types" + } + }, + { + "kind": "array_of", + "value": { + "kind": "instance_of", + "type": { + "name": "CatRecoveryColumn", + "namespace": "cat._types" + } + } + } + ] + } + }, { "kind": "interface", "attachedBehaviors": [ @@ -99817,6 +101268,1010 @@ "properties": [], "specLocation": "cat/_types/CatBase.ts#L28-L30" }, + { + "kind": "enum", + "isOpen": true, + "members": [ + { + "aliases": [ + "i", + "idx" + ], + "description": "The name of the index.", + "name": "index" + }, + { + "aliases": [ + "s", + "sh" + ], + "description": "The name of the shard.", + "name": "shard" + }, + { + "aliases": [ + "p", + "pr", + "primaryOrReplica" + ], + "description": "The shard type. Returned values are 'primary' or 'replica'.", + "name": "prirep" + }, + { + "description": "IP address of the segment’s shard, such as '127.0.1.1'.", + "name": "ip" + }, + { + "description": "The name of the segment, such as '_0'. The segment name is derived from the segment generation and used internally to create file names in the directory of the shard.", + "name": "segment" + }, + { + "description": "Generation number, such as '0'. Elasticsearch increments this generation number for each segment written. Elasticsearch then uses this number to derive the segment name.", + "name": "generation" + }, + { + "description": "The number of documents as reported by Lucene. This excludes deleted documents and counts any [nested documents](https://www.elastic.co/docs/reference/elasticsearch/mapping-reference/nested) separately from their parents. It also excludes documents which were indexed recently and do not yet belong to a segment.", + "name": "docs.count" + }, + { + "description": "The number of deleted documents as reported by Lucene, which may be higher or lower than the number of delete operations you have performed. This number excludes deletes that were performed recently and do not yet belong to a segment. Deleted documents are cleaned up by the [automatic merge process](https://www.elastic.co/docs/reference/elasticsearch/index-settings/merge) if it makes sense to do so. Also, Elasticsearch creates extra deleted documents to internally track the recent history of operations on a shard.", + "name": "docs.deleted" + }, + { + "description": "The disk space used by the segment, such as '50kb'.", + "name": "size" + }, + { + "description": "The bytes of segment data stored in memory for efficient search, such as '1264'. A value of '-1' indicates Elasticsearch was unable to compute this number.", + "name": "size.memory" + }, + { + "description": "If 'true', the segments is synced to disk. Segments that are synced can survive a hard reboot. If 'false', the data from uncommitted segments is also stored in the transaction log so that Elasticsearch is able to replay changes on the next start.", + "name": "committed" + }, + { + "description": "If 'true', the segment is searchable. If 'false', the segment has most likely been written to disk but needs a [refresh](https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-refresh) to be searchable.", + "name": "searchable" + }, + { + "description": "The version of Lucene used to write the segment.", + "name": "version" + }, + { + "description": "If 'true', the segment is stored in a compound file. This means Lucene merged all files from the segment in a single file to save file descriptors.", + "name": "compound" + }, + { + "description": "The ID of the node, such as 'k0zy'.", + "name": "id" + } + ], + "name": { + "name": "CatSegmentsColumn", + "namespace": "cat._types" + }, + "specLocation": "cat/_types/CatBase.ts#L1147-L1212" + }, + { + "kind": "type_alias", + "name": { + "name": "CatSegmentsColumns", + "namespace": "cat._types" + }, + "specLocation": "cat/_types/CatBase.ts#L1287-L1287", + "type": { + "kind": "union_of", + "items": [ + { + "kind": "instance_of", + "type": { + "name": "CatSegmentsColumn", + "namespace": "cat._types" + } + }, + { + "kind": "array_of", + "value": { + "kind": "instance_of", + "type": { + "name": "CatSegmentsColumn", + "namespace": "cat._types" + } + } + } + ] + } + }, + { + "kind": "enum", + "isOpen": true, + "members": [ + { + "aliases": [ + "cs", + "completionSize" + ], + "description": "Size of completion. For example: `0b`.", + "name": "completion.size" + }, + { + "description": "Disk space used by the shard’s dataset, which may or may not be the size on\ndisk, but includes space used by the shard on object storage. Reported as a size value for example: `5kb`.", + "name": "dataset.size" + }, + { + "aliases": [ + "dvc", + "denseVectorCount" + ], + "description": "Number of indexed dense vectors.", + "name": "dense_vector.value_count" + }, + { + "aliases": [ + "d", + "dc" + ], + "description": "Number of documents in shard, for example: `25`.", + "name": "docs" + }, + { + "aliases": [ + "fe", + "fielddataEvictions" + ], + "description": "Fielddata cache evictions, for example: `0`.", + "name": "fielddata.evictions" + }, + { + "aliases": [ + "fm", + "fielddataMemory" + ], + "description": "Used fielddata cache memory, for example: `0b`.", + "name": "fielddata.memory_size" + }, + { + "aliases": [ + "ft", + "flushTotal" + ], + "description": "Number of flushes, for example: `1`.", + "name": "flush.total" + }, + { + "aliases": [ + "ftt", + "flushTotalTime" + ], + "description": "Time spent in flush, for example: `1`.", + "name": "flush.total_time" + }, + { + "aliases": [ + "gc", + "getCurrent" + ], + "description": "Number of current get operations, for example: `0`.", + "name": "get.current" + }, + { + "aliases": [ + "geti", + "getExistsTime" + ], + "description": "Time spent in successful gets, for example: `14ms`.", + "name": "get.exists_time" + }, + { + "aliases": [ + "geto", + "getExistsTotal" + ], + "description": "Number of successful get operations, for example: `2`.", + "name": "get.exists_total" + }, + { + "aliases": [ + "gmti", + "getMissingTime" + ], + "description": "Time spent in failed gets, for example: `0s`.", + "name": "get.missing_time" + }, + { + "aliases": [ + "gmto", + "getMissingTotal" + ], + "description": "Number of failed get operations, for example: `1`.", + "name": "get.missing_total" + }, + { + "aliases": [ + "gti", + "getTime" + ], + "description": "Time spent in get, for example: `14ms`.", + "name": "get.time" + }, + { + "aliases": [ + "gto", + "getTotal" + ], + "description": "Number of get operations, for example: `2`.", + "name": "get.total" + }, + { + "description": "ID of the node, for example: `k0zy`.", + "name": "id" + }, + { + "aliases": [ + "i", + "idx" + ], + "description": "Name of the index.", + "name": "index" + }, + { + "aliases": [ + "idc", + "indexingDeleteCurrent" + ], + "description": "Number of current deletion operations, for example: `0`.", + "name": "indexing.delete_current" + }, + { + "aliases": [ + "idti", + "indexingDeleteTime" + ], + "description": "Time spent in deletions, for example: `2ms`.", + "name": "indexing.delete_time" + }, + { + "aliases": [ + "idto", + "indexingDeleteTotal" + ], + "description": "Number of deletion operations, for example: `2`.", + "name": "indexing.delete_total" + }, + { + "aliases": [ + "iic", + "indexingIndexCurrent" + ], + "description": "Number of current indexing operations, for example: `0`.", + "name": "indexing.index_current" + }, + { + "aliases": [ + "iifvc", + "indexingIndexFailedDueToVersionConflict" + ], + "description": "Number of failed indexing operations due to version conflict, for example: `0`.", + "name": "indexing.index_failed_due_to_version_conflict" + }, + { + "aliases": [ + "iif", + "indexingIndexFailed" + ], + "description": "Number of failed indexing operations, for example: `0`.", + "name": "indexing.index_failed" + }, + { + "aliases": [ + "iiti", + "indexingIndexTime" + ], + "description": "Time spent in indexing, such as for example: `134ms`.", + "name": "indexing.index_time" + }, + { + "aliases": [ + "iito", + "indexingIndexTotal" + ], + "description": "Number of indexing operations, for example: `1`.", + "name": "indexing.index_total" + }, + { + "description": "IP address of the node, for example: `127.0.1.1`.", + "name": "ip" + }, + { + "aliases": [ + "mc", + "mergesCurrent" + ], + "description": "Number of current merge operations, for example: `0`.", + "name": "merges.current" + }, + { + "aliases": [ + "mcd", + "mergesCurrentDocs" + ], + "description": "Number of current merging documents, for example: `0`.", + "name": "merges.current_docs" + }, + { + "aliases": [ + "mcs", + "mergesCurrentSize" + ], + "description": "Size of current merges, for example: `0b`.", + "name": "merges.current_size" + }, + { + "aliases": [ + "mt", + "mergesTotal" + ], + "description": "Number of completed merge operations, for example: `0`.", + "name": "merges.total" + }, + { + "aliases": [ + "mtd", + "mergesTotalDocs" + ], + "description": "Number of merged documents, for example: `0`.", + "name": "merges.total_docs" + }, + { + "aliases": [ + "mts", + "mergesTotalSize" + ], + "description": "Size of current merges, for example: `0b`.", + "name": "merges.total_size" + }, + { + "aliases": [ + "mtt", + "mergesTotalTime" + ], + "description": "Time spent merging documents, for example: `0s`.", + "name": "merges.total_time" + }, + { + "aliases": [ + "n" + ], + "description": "Node name, for example: `I8hydUG`.", + "name": "node" + }, + { + "aliases": [ + "p", + "pr", + "primaryOrReplica" + ], + "description": "Shard type. Returned values are `primary` or `replica`.", + "name": "prirep" + }, + { + "aliases": [ + "qce", + "queryCacheEvictions" + ], + "description": "Query cache evictions, for example: `0`.", + "name": "query_cache.evictions" + }, + { + "aliases": [ + "qcm", + "queryCacheMemory" + ], + "description": "Used query cache memory, for example: `0b`.", + "name": "query_cache.memory_size" + }, + { + "aliases": [ + "rs" + ], + "description": "Type of recovery source.", + "name": "recoverysource.type" + }, + { + "aliases": [ + "rti", + "refreshTime" + ], + "description": "Time spent in refreshes, for example: `91ms`.", + "name": "refresh.time" + }, + { + "aliases": [ + "rto", + "refreshTotal" + ], + "description": "Number of refreshes, for example: `16`.", + "name": "refresh.total" + }, + { + "aliases": [ + "sfc", + "searchFetchCurrent" + ], + "description": "Current fetch phase operations, for example: `0`.", + "name": "search.fetch_current" + }, + { + "aliases": [ + "sfti", + "searchFetchTime" + ], + "description": "Time spent in fetch phase, for example: `37ms`.", + "name": "search.fetch_time" + }, + { + "aliases": [ + "sfto", + "searchFetchTotal" + ], + "description": "Number of fetch operations, for example: `7`.", + "name": "search.fetch_total" + }, + { + "aliases": [ + "so", + "searchOpenContexts" + ], + "description": "Open search contexts, for example: `0`.", + "name": "search.open_contexts" + }, + { + "aliases": [ + "sqc", + "searchQueryCurrent" + ], + "description": "Current query phase operations, for example: `0`.", + "name": "search.query_current" + }, + { + "aliases": [ + "sqti", + "searchQueryTime" + ], + "description": "Time spent in query phase, for example: `43ms`.", + "name": "search.query_time" + }, + { + "aliases": [ + "sqto", + "searchQueryTotal" + ], + "description": "Number of query operations, for example: `9`.", + "name": "search.query_total" + }, + { + "aliases": [ + "scc", + "searchScrollCurrent" + ], + "description": "Open scroll contexts, for example: `2`.", + "name": "search.scroll_current" + }, + { + "aliases": [ + "scti", + "searchScrollTime" + ], + "description": "Time scroll contexts held open, for example: `2m`.", + "name": "search.scroll_time" + }, + { + "aliases": [ + "scto", + "searchScrollTotal" + ], + "description": "Completed scroll contexts, for example: `1`.", + "name": "search.scroll_total" + }, + { + "aliases": [ + "sc", + "segmentsCount" + ], + "description": "Number of segments, for example: `4`.", + "name": "segments.count" + }, + { + "aliases": [ + "sfbm", + "fixedBitsetMemory" + ], + "description": "Memory used by fixed bit sets for nested object field types and type filters for types referred in join fields, for example: `1.0kb`.", + "name": "segments.fixed_bitset_memory" + }, + { + "aliases": [ + "siwm", + "segmentsIndexWriterMemory" + ], + "description": "Memory used by index writer, for example: `18mb`.", + "name": "segments.index_writer_memory" + }, + { + "aliases": [ + "sm", + "segmentsMemory" + ], + "description": "Memory used by segments, for example: `1.4kb`.", + "name": "segments.memory" + }, + { + "aliases": [ + "svmm", + "segmentsVersionMapMemory" + ], + "description": "Memory used by version map, for example: `1.0kb`.", + "name": "segments.version_map_memory" + }, + { + "aliases": [ + "sqg", + "globalCheckpoint" + ], + "description": "Global checkpoint.", + "name": "seq_no.global_checkpoint" + }, + { + "aliases": [ + "sql", + "localCheckpoint" + ], + "description": "Local checkpoint.", + "name": "seq_no.local_checkpoint" + }, + { + "aliases": [ + "sqm", + "maxSeqNo" + ], + "description": "Maximum sequence number.", + "name": "seq_no.max" + }, + { + "aliases": [ + "s", + "sh" + ], + "description": "Name of the shard.", + "name": "shard" + }, + { + "aliases": [ + "svc", + "sparseVectorCount" + ], + "description": "Number of indexed [sparse vectors](https://www.elastic.co/docs/reference/elasticsearch/mapping-reference/sparse-vector).", + "name": "dsparse_vector.value_count" + }, + { + "aliases": [ + "st" + ], + "description": "State of the shard. Returned values are:\n* `INITIALIZING`: The shard is recovering from a peer shard or gateway.\n* `RELOCATING`: The shard is relocating.\n* `STARTED`: The shard has started.\n* `UNASSIGNED`: The shard is not assigned to any node.", + "name": "state" + }, + { + "aliases": [ + "sto" + ], + "description": "Disk space used by the shard, for example: `5kb`.", + "name": "store" + }, + { + "aliases": [ + "suc", + "suggestCurrent" + ], + "description": "Number of current suggest operations, for example: `0`.", + "name": "suggest.current" + }, + { + "aliases": [ + "suti", + "suggestTime" + ], + "description": "Time spent in suggest, for example: `0`.", + "name": "suggest.time" + }, + { + "aliases": [ + "suto", + "suggestTotal" + ], + "description": "Number of suggest operations, for example: `0`.", + "name": "suggest.total" + }, + { + "description": "Sync ID of the shard.", + "name": "sync_id" + }, + { + "aliases": [ + "ua" + ], + "description": "Time at which the shard became unassigned in [Coordinated Universal Time (UTC)](https://en.wikipedia.org/wiki/List_of_UTC_offsets).", + "name": "unassigned.at" + }, + { + "aliases": [ + "ud" + ], + "description": "Details about why the shard became unassigned. This does not explain why the shard is currently unassigned. To understand why a shard\nis not assigned, use the [Cluster allocation explain](https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-cluster-allocation-explain) API.", + "name": "unassigned.details" + }, + { + "aliases": [ + "uf" + ], + "description": "Time at which the shard was requested to be unassigned in [Coordinated Universal Time (UTC)](https://en.wikipedia.org/wiki/List_of_UTC_offsets).", + "name": "unassigned.for" + }, + { + "aliases": [ + "ur" + ], + "description": "Indicates the reason for the last change to the state of this unassigned shard. This does not explain why the shard is currently unassigned.\nTo understand why a shard is not assigned, use the [Cluster allocation explain](https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-cluster-allocation-explain) API. Returned values include:\n\n* `ALLOCATION_FAILED`: Unassigned as a result of a failed allocation of the shard.\n* `CLUSTER_RECOVERED`: Unassigned as a result of a full cluster recovery.\n* `DANGLING_INDEX_IMPORTED`: Unassigned as a result of importing a dangling index.\n* `EXISTING_INDEX_RESTORED`: Unassigned as a result of restoring into a closed index.\n* `FORCED_EMPTY_PRIMARY`: The shard’s allocation was last modified by forcing an empty primary using the Cluster reroute API.\n* `INDEX_CLOSED`: Unassigned because the index was closed.\n* `INDEX_CREATED`: Unassigned as a result of an API creation of an index.\n* `INDEX_REOPENED`: Unassigned as a result of opening a closed index.\n* `MANUAL_ALLOCATION`: The shard’s allocation was last modified by the Cluster reroute API.\n* `NEW_INDEX_RESTORED`: Unassigned as a result of restoring into a new index.\n* `NODE_LEFT`: Unassigned as a result of the node hosting it leaving the cluster.\n* `NODE_RESTARTING`: Similar to `NODE_LEFT`, except that the node was registered as restarting using the Node shutdown API.\n* `PRIMARY_FAILED`: The shard was initializing as a replica, but the primary shard failed before the initialization completed.\n* `REALLOCATED_REPLICA`: A better replica location is identified and causes the existing replica allocation to be cancelled.\n* `REINITIALIZED`: When a shard moves from started back to initializing.\n* `REPLICA_ADDED`: Unassigned as a result of explicit addition of a replica.\n* `REROUTE_CANCELLED`: Unassigned as a result of explicit cancel reroute command.", + "name": "unassigned.reason" + } + ], + "name": { + "name": "CatShardColumn", + "namespace": "cat._types" + }, + "specLocation": "cat/_types/CatBase.ts#L1576-L1949" + }, + { + "kind": "type_alias", + "name": { + "name": "CatShardColumns", + "namespace": "cat._types" + }, + "specLocation": "cat/_types/CatBase.ts#L1950-L1950", + "type": { + "kind": "union_of", + "items": [ + { + "kind": "instance_of", + "type": { + "name": "CatShardColumn", + "namespace": "cat._types" + } + }, + { + "kind": "array_of", + "value": { + "kind": "instance_of", + "type": { + "name": "CatShardColumn", + "namespace": "cat._types" + } + } + } + ] + } + }, + { + "kind": "enum", + "isOpen": true, + "members": [ + { + "aliases": [ + "snapshot" + ], + "description": "The ID of the snapshot, such as 'snap1'.", + "name": "id" + }, + { + "aliases": [ + "re", + "repo" + ], + "description": "The name of the repository, such as 'repo1'.", + "name": "repository" + }, + { + "aliases": [ + "s" + ], + "description": "State of the snapshot process. Returned values are: 'FAILED': The snapshot process failed. 'INCOMPATIBLE': The snapshot process is incompatible with the current cluster version. 'IN_PROGRESS': The snapshot process started but has not completed. 'PARTIAL': The snapshot process completed with a partial success. 'SUCCESS': The snapshot process completed with a full success.", + "name": "status" + }, + { + "aliases": [ + "ste", + "startEpoch" + ], + "description": "The [unix epoch time](https://en.wikipedia.org/wiki/Unix_time) at which the snapshot process started.", + "name": "start_epoch" + }, + { + "aliases": [ + "sti", + "startTime" + ], + "description": "'HH:MM:SS' time at which the snapshot process started.", + "name": "start_time" + }, + { + "aliases": [ + "ete", + "endEpoch" + ], + "description": "The [unix epoch time](https://en.wikipedia.org/wiki/Unix_time) at which the snapshot process ended.", + "name": "end_epoch" + }, + { + "aliases": [ + "eti", + "endTime" + ], + "description": "'HH:MM:SS' time at which the snapshot process ended.", + "name": "end_time" + }, + { + "aliases": [ + "dur" + ], + "description": "The time it took the snapshot process to complete in [time units](https://www.elastic.co/docs/reference/elasticsearch/rest-apis/api-conventions#time-units).", + "name": "duration" + }, + { + "aliases": [ + "i" + ], + "description": "The number of indices in the snapshot.", + "name": "indices" + }, + { + "aliases": [ + "ss" + ], + "description": "The number of successful shards in the snapshot.", + "name": "successful_shards" + }, + { + "aliases": [ + "fs" + ], + "description": "The number of failed shards in the snapshot.", + "name": "failed_shards" + }, + { + "aliases": [ + "ts" + ], + "description": "The total number of shards in the snapshot.", + "name": "total_shards" + }, + { + "aliases": [ + "r" + ], + "description": "The reason for any snapshot failures.", + "name": "reason" + } + ], + "name": { + "name": "CatSnapshotsColumn", + "namespace": "cat._types" + }, + "specLocation": "cat/_types/CatBase.ts#L1214-L1281" + }, + { + "kind": "type_alias", + "name": { + "name": "CatSnapshotsColumns", + "namespace": "cat._types" + }, + "specLocation": "cat/_types/CatBase.ts#L1288-L1288", + "type": { + "kind": "union_of", + "items": [ + { + "kind": "instance_of", + "type": { + "name": "CatSnapshotsColumn", + "namespace": "cat._types" + } + }, + { + "kind": "array_of", + "value": { + "kind": "instance_of", + "type": { + "name": "CatSnapshotsColumn", + "namespace": "cat._types" + } + } + } + ] + } + }, + { + "kind": "enum", + "isOpen": true, + "members": [ + { + "aliases": [ + "a" + ], + "description": "Number of active threads in the current thread pool.", + "name": "active" + }, + { + "aliases": [ + "c" + ], + "description": "Number of tasks completed by the thread pool executor.", + "name": "completed" + }, + { + "aliases": [ + "cr" + ], + "description": "Configured core number of active threads allowed in the current thread pool.", + "name": "core" + }, + { + "aliases": [ + "eid" + ], + "description": "Ephemeral node ID.", + "name": "ephemeral_id" + }, + { + "aliases": [ + "h" + ], + "description": "Hostname for the current node.", + "name": "host" + }, + { + "aliases": [ + "i" + ], + "description": "IP address for the current node.", + "name": "ip" + }, + { + "aliases": [ + "k" + ], + "description": "Configured keep alive time for threads.", + "name": "keep_alive" + }, + { + "aliases": [ + "l" + ], + "description": "Highest number of active threads in the current thread pool.", + "name": "largest" + }, + { + "aliases": [ + "mx" + ], + "description": "Configured maximum number of active threads allowed in the current thread pool.", + "name": "max" + }, + { + "description": "Name of the thread pool, such as `analyze` or `generic`.", + "name": "name" + }, + { + "aliases": [ + "id" + ], + "description": "ID of the node, such as `k0zy`.", + "name": "node_id" + }, + { + "description": "Node name, such as `I8hydUG`.", + "name": "node_name" + }, + { + "aliases": [ + "p" + ], + "description": "Process ID of the running node.", + "name": "pid" + }, + { + "aliases": [ + "psz" + ], + "description": "Number of threads in the current thread pool.", + "name": "pool_size" + }, + { + "aliases": [ + "po" + ], + "description": "Bound transport port for the current node.", + "name": "port" + }, + { + "aliases": [ + "q" + ], + "description": "Number of tasks in the queue for the current thread pool.", + "name": "queue" + }, + { + "aliases": [ + "qs" + ], + "description": "Maximum number of tasks permitted in the queue for the current thread pool.", + "name": "queue_size" + }, + { + "aliases": [ + "r" + ], + "description": "Number of tasks rejected by the thread pool executor.", + "name": "rejected" + }, + { + "aliases": [ + "sz" + ], + "description": "Configured fixed number of active threads allowed in the current thread pool.", + "name": "size" + }, + { + "aliases": [ + "t" + ], + "description": "Type of thread pool. Returned values are `fixed`, `fixed_auto_queue_size`, `direct`, or `scaling`.", + "name": "type" + } + ], + "name": { + "name": "CatThreadPoolColumn", + "namespace": "cat._types" + }, + "specLocation": "cat/_types/CatBase.ts#L1952-L2052" + }, + { + "kind": "type_alias", + "name": { + "name": "CatThreadPoolColumns", + "namespace": "cat._types" + }, + "specLocation": "cat/_types/CatBase.ts#L2053-L2053", + "type": { + "kind": "union_of", + "items": [ + { + "kind": "instance_of", + "type": { + "name": "CatThreadPoolColumn", + "namespace": "cat._types" + } + }, + { + "kind": "array_of", + "value": { + "kind": "instance_of", + "type": { + "name": "CatThreadPoolColumn", + "namespace": "cat._types" + } + } + } + ] + } + }, { "kind": "enum", "members": [ @@ -99930,7 +102385,7 @@ "name": "CatTrainedModelsColumn", "namespace": "cat._types" }, - "specLocation": "cat/_types/CatBase.ts#L1018-L1092" + "specLocation": "cat/_types/CatBase.ts#L1290-L1364" }, { "kind": "type_alias", @@ -99938,7 +102393,7 @@ "name": "CatTrainedModelsColumns", "namespace": "cat._types" }, - "specLocation": "cat/_types/CatBase.ts#L1093-L1095", + "specLocation": "cat/_types/CatBase.ts#L1365-L1367", "type": { "kind": "union_of", "items": [ @@ -100204,7 +102659,7 @@ "name": "CatTransformColumn", "namespace": "cat._types" }, - "specLocation": "cat/_types/CatBase.ts#L1097-L1301" + "specLocation": "cat/_types/CatBase.ts#L1369-L1573" }, { "kind": "type_alias", @@ -100212,7 +102667,7 @@ "name": "CatTransformColumns", "namespace": "cat._types" }, - "specLocation": "cat/_types/CatBase.ts#L1302-L1302", + "specLocation": "cat/_types/CatBase.ts#L1574-L1574", "type": { "kind": "union_of", "items": [ @@ -109915,19 +112370,20 @@ } }, { - "description": "List of columns to appear in the response. Supports simple wildcards.", + "description": "A comma-separated list of columns names to display.\nIt supports simple wildcards.", "name": "h", "required": false, + "serverDefault": "ip,hp,rp,r,m,n,cpu,l", "type": { "kind": "instance_of", "type": { - "name": "Names", - "namespace": "_types" + "name": "CatRecoveryColumns", + "namespace": "cat._types" } } }, { - "description": "List of columns that determine how the table should be sorted.\nSorting defaults to ascending and can be changed by setting `:asc`\nor `:desc` as a suffix to the column name.", + "description": "A comma-separated list of column names or aliases that determines the sort order.\nSorting defaults to ascending and can be changed by setting `:asc`\nor `:desc` as a suffix to the column name.", "name": "s", "required": false, "type": { @@ -109939,7 +112395,7 @@ } }, { - "description": "Unit used to display time values.", + "description": "The unit used to display time values.", "name": "time", "required": false, "type": { @@ -109951,7 +112407,7 @@ } } ], - "specLocation": "cat/recovery/CatRecoveryRequest.ts#L24-L90" + "specLocation": "cat/recovery/CatRecoveryRequest.ts#L24-L92" }, { "kind": "response", @@ -110245,19 +112701,20 @@ } }, { - "description": "List of columns to appear in the response. Supports simple wildcards.", + "description": "A comma-separated list of columns names to display.\nIt supports simple wildcards.", "name": "h", "required": false, + "serverDefault": "ip,hp,rp,r,m,n,cpu,l", "type": { "kind": "instance_of", "type": { - "name": "Names", - "namespace": "_types" + "name": "CatSegmentsColumns", + "namespace": "cat._types" } } }, { - "description": "List of columns that determine how the table should be sorted.\nSorting defaults to ascending and can be changed by setting `:asc`\nor `:desc` as a suffix to the column name.", + "description": "A comma-separated list of column names or aliases that determines the sort order.\nSorting defaults to ascending and can be changed by setting `:asc`\nor `:desc` as a suffix to the column name.", "name": "s", "required": false, "type": { @@ -110295,7 +112752,7 @@ } } ], - "specLocation": "cat/segments/CatSegmentsRequest.ts#L24-L85" + "specLocation": "cat/segments/CatSegmentsRequest.ts#L24-L87" }, { "kind": "response", @@ -110650,13 +113107,13 @@ "type": { "kind": "instance_of", "type": { - "name": "Names", - "namespace": "_types" + "name": "CatShardColumns", + "namespace": "cat._types" } } }, { - "description": "List of columns that determine how the table should be sorted.\nSorting defaults to ascending and can be changed by setting `:asc`\nor `:desc` as a suffix to the column name.", + "description": "A comma-separated list of column names or aliases that determines the sort order.\nSorting defaults to ascending and can be changed by setting `:asc`\nor `:desc` as a suffix to the column name.", "name": "s", "required": false, "type": { @@ -110668,7 +113125,7 @@ } }, { - "description": "Period to wait for a connection to the master node.", + "description": "The period to wait for a connection to the master node.", "name": "master_timeout", "required": false, "serverDefault": "30s", @@ -110681,7 +113138,7 @@ } }, { - "description": "Unit used to display time values.", + "description": "The unit used to display time values.", "name": "time", "required": false, "type": { @@ -112105,14 +114562,15 @@ } }, { - "description": "List of columns to appear in the response. Supports simple wildcards.", + "description": "A comma-separated list of columns names to display.\nIt supports simple wildcards.", "name": "h", "required": false, + "serverDefault": "ip,hp,rp,r,m,n,cpu,l", "type": { "kind": "instance_of", "type": { - "name": "Names", - "namespace": "_types" + "name": "CatSnapshotsColumns", + "namespace": "cat._types" } } }, @@ -112154,7 +114612,7 @@ } } ], - "specLocation": "cat/snapshots/CatSnapshotsRequest.ts#L24-L82" + "specLocation": "cat/snapshots/CatSnapshotsRequest.ts#L24-L84" }, { "kind": "response", @@ -113195,13 +115653,13 @@ "type": { "kind": "instance_of", "type": { - "name": "Names", - "namespace": "_types" + "name": "CatThreadPoolColumns", + "namespace": "cat._types" } } }, { - "description": "List of columns that determine how the table should be sorted.\nSorting defaults to ascending and can be changed by setting `:asc`\nor `:desc` as a suffix to the column name.", + "description": "A comma-separated list of column names or aliases that determines the sort order.\nSorting defaults to ascending and can be changed by setting `:asc`\nor `:desc` as a suffix to the column name.", "name": "s", "required": false, "type": { @@ -113238,7 +115696,7 @@ } }, { - "description": "Period to wait for a connection to the master node.", + "description": "The period to wait for a connection to the master node.", "name": "master_timeout", "required": false, "serverDefault": "30s", @@ -119252,6 +121710,33 @@ } } }, + { + "description": "Filter out results, for example to filter out sensitive information. Supports wildcards or full settings keys", + "name": "settings_filter", + "required": false, + "type": { + "kind": "union_of", + "items": [ + { + "kind": "instance_of", + "type": { + "name": "string", + "namespace": "_builtins" + } + }, + { + "kind": "array_of", + "value": { + "kind": "instance_of", + "type": { + "name": "string", + "namespace": "_builtins" + } + } + } + ] + } + }, { "availability": { "serverless": { @@ -119301,7 +121786,7 @@ } } ], - "specLocation": "cluster/get_component_template/ClusterGetComponentTemplateRequest.ts#L24-L77" + "specLocation": "cluster/get_component_template/ClusterGetComponentTemplateRequest.ts#L24-L81" }, { "kind": "response", @@ -120841,6 +123326,19 @@ } } }, + { + "description": "User defined reason for create the component template.", + "name": "cause", + "required": false, + "serverDefault": "api", + "type": { + "kind": "instance_of", + "type": { + "name": "string", + "namespace": "_builtins" + } + } + }, { "description": "Period to wait for a connection to the master node.\nIf no response is received before the timeout expires, the request fails and returns an error.", "name": "master_timeout", @@ -120855,7 +123353,7 @@ } } ], - "specLocation": "cluster/put_component_template/ClusterPutComponentTemplateRequest.ts#L25-L105" + "specLocation": "cluster/put_component_template/ClusterPutComponentTemplateRequest.ts#L25-L110" }, { "kind": "response", @@ -122319,7 +124817,7 @@ } } ], - "specLocation": "cluster/stats/types.ts#L591-L606" + "specLocation": "cluster/stats/types.ts#L769-L784" }, { "kind": "interface", @@ -122365,7 +124863,7 @@ } } ], - "specLocation": "cluster/stats/types.ts#L677-L684" + "specLocation": "cluster/stats/types.ts#L855-L862" }, { "kind": "interface", @@ -122563,7 +125061,7 @@ } } ], - "specLocation": "cluster/stats/types.ts#L641-L666" + "specLocation": "cluster/stats/types.ts#L819-L844" }, { "kind": "interface", @@ -122636,7 +125134,7 @@ } } ], - "specLocation": "cluster/stats/types.ts#L668-L675" + "specLocation": "cluster/stats/types.ts#L846-L853" }, { "kind": "interface", @@ -122764,9 +125262,32 @@ } } } + }, + { + "description": "Contains statistics about synonyms types used in selected nodes.", + "name": "synonyms", + "required": true, + "type": { + "kind": "dictionary_of", + "key": { + "kind": "instance_of", + "type": { + "name": "Name", + "namespace": "_types" + } + }, + "singleKey": false, + "value": { + "kind": "instance_of", + "type": { + "name": "SynonymsStats", + "namespace": "cluster.stats" + } + } + } } ], - "specLocation": "cluster/stats/types.ts#L228-L261" + "specLocation": "cluster/stats/types.ts#L315-L352" }, { "kind": "interface", @@ -122775,10 +125296,43 @@ "namespace": "cluster.stats" }, "properties": [ + { + "name": "path", + "required": false, + "type": { + "kind": "instance_of", + "type": { + "name": "string", + "namespace": "_builtins" + } + } + }, + { + "name": "mount", + "required": false, + "type": { + "kind": "instance_of", + "type": { + "name": "string", + "namespace": "_builtins" + } + } + }, + { + "name": "type", + "required": false, + "type": { + "kind": "instance_of", + "type": { + "name": "string", + "namespace": "_builtins" + } + } + }, { "description": "Total number of bytes available to JVM in file stores across all selected nodes.\nDepending on operating system or process-level restrictions, this number may be less than `nodes.fs.free_in_byes`.\nThis is the actual amount of free disk space the selected Elasticsearch nodes can use.", "name": "available_in_bytes", - "required": true, + "required": false, "type": { "kind": "instance_of", "type": { @@ -122788,9 +125342,21 @@ } }, { - "description": "Total number of unallocated bytes in file stores across all selected nodes.", + "description": "Total number of bytes available to JVM in file stores across all selected nodes.\nDepending on operating system or process-level restrictions, this number may be less than `nodes.fs.free_in_byes`.\nThis is the actual amount of free disk space the selected Elasticsearch nodes can use.", + "name": "available", + "required": false, + "type": { + "kind": "instance_of", + "type": { + "name": "ByteSize", + "namespace": "_types" + } + } + }, + { + "description": "Total number, in bytes, of unallocated bytes in file stores across all selected nodes.", "name": "free_in_bytes", - "required": true, + "required": false, "type": { "kind": "instance_of", "type": { @@ -122799,10 +125365,122 @@ } } }, + { + "description": "Total number of unallocated bytes in file stores across all selected nodes.", + "name": "free", + "required": false, + "type": { + "kind": "instance_of", + "type": { + "name": "ByteSize", + "namespace": "_types" + } + } + }, { "description": "Total size, in bytes, of all file stores across all selected nodes.", "name": "total_in_bytes", - "required": true, + "required": false, + "type": { + "kind": "instance_of", + "type": { + "name": "long", + "namespace": "_types" + } + } + }, + { + "description": "Total size of all file stores across all selected nodes.", + "name": "total", + "required": false, + "type": { + "kind": "instance_of", + "type": { + "name": "ByteSize", + "namespace": "_types" + } + } + }, + { + "name": "low_watermark_free_space", + "required": false, + "type": { + "kind": "instance_of", + "type": { + "name": "ByteSize", + "namespace": "_types" + } + } + }, + { + "name": "low_watermark_free_space_in_bytes", + "required": false, + "type": { + "kind": "instance_of", + "type": { + "name": "long", + "namespace": "_types" + } + } + }, + { + "name": "high_watermark_free_space", + "required": false, + "type": { + "kind": "instance_of", + "type": { + "name": "ByteSize", + "namespace": "_types" + } + } + }, + { + "name": "high_watermark_free_space_in_bytes", + "required": false, + "type": { + "kind": "instance_of", + "type": { + "name": "long", + "namespace": "_types" + } + } + }, + { + "name": "flood_stage_free_space", + "required": false, + "type": { + "kind": "instance_of", + "type": { + "name": "ByteSize", + "namespace": "_types" + } + } + }, + { + "name": "flood_stage_free_space_in_bytes", + "required": false, + "type": { + "kind": "instance_of", + "type": { + "name": "long", + "namespace": "_types" + } + } + }, + { + "name": "frozen_flood_stage_free_space", + "required": false, + "type": { + "kind": "instance_of", + "type": { + "name": "ByteSize", + "namespace": "_types" + } + } + }, + { + "name": "frozen_flood_stage_free_space_in_bytes", + "required": false, "type": { "kind": "instance_of", "type": { @@ -122812,7 +125490,7 @@ } } ], - "specLocation": "cluster/stats/types.ts#L34-L49" + "specLocation": "cluster/stats/types.ts#L35-L75" }, { "kind": "interface", @@ -122824,7 +125502,7 @@ { "description": "Contains statistics about analyzers and analyzer components used in selected nodes.", "name": "analysis", - "required": true, + "required": false, "type": { "kind": "instance_of", "type": { @@ -122895,6 +125573,18 @@ } } }, + { + "description": "Holds a snapshot of the search usage statistics.\nUsed to hold the stats for a single node that's part of a ClusterStatsNodeResponse, as well as to\naccumulate stats for the entire cluster and return them as part of the ClusterStatsResponse.", + "name": "search", + "required": true, + "type": { + "kind": "instance_of", + "type": { + "name": "SearchUsageStats", + "namespace": "cluster.stats" + } + } + }, { "description": "Contains statistics about segments in selected nodes.", "name": "segments", @@ -122934,7 +125624,7 @@ { "description": "Contains statistics about field mappings in selected nodes.", "name": "mappings", - "required": true, + "required": false, "type": { "kind": "instance_of", "type": { @@ -122959,9 +125649,33 @@ } } } + }, + { + "description": "Contains statistics about indexed dense vector", + "name": "dense_vector", + "required": true, + "type": { + "kind": "instance_of", + "type": { + "name": "DenseVectorStats", + "namespace": "cluster.stats" + } + } + }, + { + "description": "Contains statistics about indexed sparse vector", + "name": "sparse_vector", + "required": true, + "type": { + "kind": "instance_of", + "type": { + "name": "SparseVectorStats", + "namespace": "cluster.stats" + } + } } ], - "specLocation": "cluster/stats/types.ts#L74-L107" + "specLocation": "cluster/stats/types.ts#L100-L147" }, { "kind": "interface", @@ -123020,7 +125734,7 @@ } } ], - "specLocation": "cluster/stats/types.ts#L60-L72" + "specLocation": "cluster/stats/types.ts#L86-L98" }, { "kind": "interface", @@ -123066,7 +125780,7 @@ } } ], - "specLocation": "cluster/stats/types.ts#L51-L58" + "specLocation": "cluster/stats/types.ts#L77-L84" }, { "kind": "interface", @@ -123109,7 +125823,7 @@ } } ], - "specLocation": "cluster/stats/types.ts#L270-L273" + "specLocation": "cluster/stats/types.ts#L367-L370" }, { "kind": "interface", @@ -123139,6 +125853,18 @@ } } }, + { + "description": "Uptime duration since JVM last started.", + "name": "max_uptime", + "required": false, + "type": { + "kind": "instance_of", + "type": { + "name": "Duration", + "namespace": "_types" + } + } + }, { "description": "Contains statistics about memory used by selected nodes.", "name": "mem", @@ -123179,7 +125905,7 @@ } } ], - "specLocation": "cluster/stats/types.ts#L275-L292" + "specLocation": "cluster/stats/types.ts#L372-L393" }, { "kind": "interface", @@ -123200,6 +125926,18 @@ } } }, + { + "description": "Maximum amount of memory available for use by the heap across all selected nodes.", + "name": "heap_max", + "required": false, + "type": { + "kind": "instance_of", + "type": { + "name": "ByteSize", + "namespace": "_types" + } + } + }, { "description": "Memory, in bytes, currently in use by the heap across all selected nodes.", "name": "heap_used_in_bytes", @@ -123211,9 +125949,21 @@ "namespace": "_types" } } + }, + { + "description": "Memory currently in use by the heap across all selected nodes.", + "name": "heap_used", + "required": false, + "type": { + "kind": "instance_of", + "type": { + "name": "ByteSize", + "namespace": "_types" + } + } } ], - "specLocation": "cluster/stats/types.ts#L294-L303" + "specLocation": "cluster/stats/types.ts#L395-L412" }, { "kind": "interface", @@ -123307,7 +126057,7 @@ } } ], - "specLocation": "cluster/stats/types.ts#L305-L335" + "specLocation": "cluster/stats/types.ts#L414-L444" }, { "kind": "interface", @@ -123363,7 +126113,7 @@ } } ], - "specLocation": "cluster/stats/types.ts#L337-L346" + "specLocation": "cluster/stats/types.ts#L446-L455" }, { "kind": "interface", @@ -123373,7 +126123,7 @@ }, "properties": [ { - "name": "coordinating_only", + "name": "total", "required": true, "type": { "kind": "instance_of", @@ -123383,9 +126133,20 @@ } } }, + { + "name": "coordinating_only", + "required": false, + "type": { + "kind": "instance_of", + "type": { + "name": "integer", + "namespace": "_types" + } + } + }, { "name": "data", - "required": true, + "required": false, "type": { "kind": "instance_of", "type": { @@ -123396,7 +126157,7 @@ }, { "name": "data_cold", - "required": true, + "required": false, "type": { "kind": "instance_of", "type": { @@ -123407,7 +126168,7 @@ }, { "name": "data_content", - "required": true, + "required": false, "type": { "kind": "instance_of", "type": { @@ -123435,7 +126196,7 @@ }, { "name": "data_hot", - "required": true, + "required": false, "type": { "kind": "instance_of", "type": { @@ -123446,7 +126207,18 @@ }, { "name": "data_warm", - "required": true, + "required": false, + "type": { + "kind": "instance_of", + "type": { + "name": "integer", + "namespace": "_types" + } + } + }, + { + "name": "index", + "required": false, "type": { "kind": "instance_of", "type": { @@ -123457,7 +126229,7 @@ }, { "name": "ingest", - "required": true, + "required": false, "type": { "kind": "instance_of", "type": { @@ -123468,7 +126240,7 @@ }, { "name": "master", - "required": true, + "required": false, "type": { "kind": "instance_of", "type": { @@ -123479,7 +126251,7 @@ }, { "name": "ml", - "required": true, + "required": false, "type": { "kind": "instance_of", "type": { @@ -123490,7 +126262,7 @@ }, { "name": "remote_cluster_client", - "required": true, + "required": false, "type": { "kind": "instance_of", "type": { @@ -123500,8 +126272,8 @@ } }, { - "name": "total", - "required": true, + "name": "search", + "required": false, "type": { "kind": "instance_of", "type": { @@ -123512,7 +126284,7 @@ }, { "name": "transform", - "required": true, + "required": false, "type": { "kind": "instance_of", "type": { @@ -123523,7 +126295,7 @@ }, { "name": "voting_only", - "required": true, + "required": false, "type": { "kind": "instance_of", "type": { @@ -123533,7 +126305,7 @@ } } ], - "specLocation": "cluster/stats/types.ts#L348-L367" + "specLocation": "cluster/stats/types.ts#L457-L478" }, { "kind": "interface", @@ -123713,7 +126485,7 @@ } } ], - "specLocation": "cluster/stats/types.ts#L369-L402" + "specLocation": "cluster/stats/types.ts#L480-L513" }, { "kind": "interface", @@ -123804,7 +126576,7 @@ } } ], - "specLocation": "cluster/stats/types.ts#L415-L442" + "specLocation": "cluster/stats/types.ts#L526-L553" }, { "kind": "interface", @@ -123838,7 +126610,7 @@ } } ], - "specLocation": "cluster/stats/types.ts#L404-L413" + "specLocation": "cluster/stats/types.ts#L515-L524" }, { "kind": "interface", @@ -123872,7 +126644,7 @@ } } ], - "specLocation": "cluster/stats/types.ts#L444-L453" + "specLocation": "cluster/stats/types.ts#L555-L564" }, { "kind": "interface", @@ -123906,7 +126678,7 @@ } } ], - "specLocation": "cluster/stats/types.ts#L455-L464" + "specLocation": "cluster/stats/types.ts#L566-L575" }, { "kind": "interface", @@ -123940,7 +126712,7 @@ } } ], - "specLocation": "cluster/stats/types.ts#L466-L475" + "specLocation": "cluster/stats/types.ts#L577-L586" }, { "kind": "interface", @@ -123962,7 +126734,7 @@ } } ], - "specLocation": "cluster/stats/types.ts#L477-L483" + "specLocation": "cluster/stats/types.ts#L588-L594" }, { "kind": "interface", @@ -124008,7 +126780,7 @@ } } ], - "specLocation": "cluster/stats/types.ts#L485-L501" + "specLocation": "cluster/stats/types.ts#L596-L612" }, { "kind": "interface", @@ -124082,7 +126854,7 @@ } } ], - "specLocation": "cluster/stats/types.ts#L503-L509" + "specLocation": "cluster/stats/types.ts#L614-L620" }, { "kind": "interface", @@ -124128,67 +126900,83 @@ } } ], - "specLocation": "cluster/stats/types.ts#L511-L524" + "specLocation": "cluster/stats/types.ts#L622-L635" }, { "kind": "interface", "name": { - "name": "FieldTypes", + "name": "ClusterSnapshotStats", "namespace": "cluster.stats" }, "properties": [ { - "description": "The name for the field type in selected nodes.", - "name": "name", + "name": "current_counts", "required": true, "type": { "kind": "instance_of", "type": { - "name": "Name", - "namespace": "_types" + "name": "SnapshotCurrentCounts", + "namespace": "cluster.stats" } } }, { - "description": "The number of occurrences of the field type in selected nodes.", - "name": "count", + "name": "repositories", "required": true, "type": { - "kind": "instance_of", - "type": { - "name": "integer", - "namespace": "_types" + "kind": "dictionary_of", + "key": { + "kind": "instance_of", + "type": { + "name": "Name", + "namespace": "_types" + } + }, + "singleKey": false, + "value": { + "kind": "instance_of", + "type": { + "name": "PerRepositoryStats", + "namespace": "cluster.stats" + } } } - }, + } + ], + "specLocation": "cluster/stats/types.ts#L637-L640" + }, + { + "kind": "interface", + "name": { + "name": "DenseVectorOffHeapStats", + "namespace": "cluster.stats" + }, + "properties": [ { - "description": "The number of indices containing the field type in selected nodes.", - "name": "index_count", + "name": "total_size_bytes", "required": true, "type": { "kind": "instance_of", "type": { - "name": "integer", + "name": "long", "namespace": "_types" } } }, { - "description": "For dense_vector field types, number of indexed vector types in selected nodes.", - "name": "indexed_vector_count", + "name": "total_size", "required": false, "type": { "kind": "instance_of", "type": { - "name": "long", + "name": "ByteSize", "namespace": "_types" } } }, { - "description": "For dense_vector field types, the maximum dimension of all indexed vector types in selected nodes.", - "name": "indexed_vector_dim_max", - "required": false, + "name": "total_veb_size_bytes", + "required": true, "type": { "kind": "instance_of", "type": { @@ -124198,102 +126986,73 @@ } }, { - "description": "For dense_vector field types, the minimum dimension of all indexed vector types in selected nodes.", - "name": "indexed_vector_dim_min", + "name": "total_veb_size", "required": false, "type": { "kind": "instance_of", "type": { - "name": "long", + "name": "ByteSize", "namespace": "_types" } } }, { - "availability": { - "serverless": {}, - "stack": { - "since": "7.13.0" - } - }, - "description": "The number of fields that declare a script.", - "name": "script_count", - "required": false, + "name": "total_vec_size_bytes", + "required": true, "type": { "kind": "instance_of", "type": { - "name": "integer", + "name": "long", "namespace": "_types" } } - } - ], - "specLocation": "cluster/stats/types.ts#L136-L167" - }, - { - "kind": "interface", - "name": { - "name": "FieldTypesMappings", - "namespace": "cluster.stats" - }, - "properties": [ + }, { - "description": "Contains statistics about field data types used in selected nodes.", - "name": "field_types", - "required": true, + "name": "total_vec_size", + "required": false, "type": { - "kind": "array_of", - "value": { - "kind": "instance_of", - "type": { - "name": "FieldTypes", - "namespace": "cluster.stats" - } + "kind": "instance_of", + "type": { + "name": "ByteSize", + "namespace": "_types" } } }, { - "description": "Contains statistics about runtime field data types used in selected nodes.", - "name": "runtime_field_types", - "required": false, + "name": "total_veq_size_bytes", + "required": true, "type": { - "kind": "array_of", - "value": { - "kind": "instance_of", - "type": { - "name": "RuntimeFieldTypes", - "namespace": "cluster.stats" - } + "kind": "instance_of", + "type": { + "name": "long", + "namespace": "_types" } } }, { - "description": "Total number of fields in all non-system indices.", - "name": "total_field_count", + "name": "total_veq_size", "required": false, "type": { "kind": "instance_of", "type": { - "name": "integer", + "name": "ByteSize", "namespace": "_types" } } }, { - "description": "Total number of fields in all non-system indices, accounting for mapping deduplication.", - "name": "total_deduplicated_field_count", - "required": false, + "name": "total_vex_size_bytes", + "required": true, "type": { "kind": "instance_of", "type": { - "name": "integer", + "name": "long", "namespace": "_types" } } }, { - "description": "Total size of all mappings after deduplication and compression.", - "name": "total_deduplicated_mapping_size", + "name": "total_vex_size", "required": false, "type": { "kind": "instance_of", @@ -124304,138 +127063,283 @@ } }, { - "description": "Total size of all mappings, in bytes, after deduplication and compression.", - "name": "total_deduplicated_mapping_size_in_bytes", + "name": "fielddata", "required": false, "type": { - "kind": "instance_of", - "type": { - "name": "long", - "namespace": "_types" + "kind": "dictionary_of", + "key": { + "kind": "instance_of", + "type": { + "name": "string", + "namespace": "_builtins" + } + }, + "singleKey": false, + "value": { + "kind": "dictionary_of", + "key": { + "kind": "instance_of", + "type": { + "name": "string", + "namespace": "_builtins" + } + }, + "singleKey": false, + "value": { + "kind": "instance_of", + "type": { + "name": "long", + "namespace": "_types" + } + } } } } ], - "specLocation": "cluster/stats/types.ts#L109-L134" + "specLocation": "cluster/stats/types.ts#L166-L178" }, { "kind": "interface", "name": { - "name": "IndexingPressure", + "name": "DenseVectorStats", "namespace": "cluster.stats" }, "properties": [ { - "name": "memory", + "name": "value_count", "required": true, "type": { "kind": "instance_of", "type": { - "name": "IndexingPressureMemory", + "name": "long", + "namespace": "_types" + } + } + }, + { + "name": "off_heap", + "required": false, + "type": { + "kind": "instance_of", + "type": { + "name": "DenseVectorOffHeapStats", "namespace": "cluster.stats" } } } ], - "specLocation": "cluster/stats/types.ts#L570-L572" + "specLocation": "cluster/stats/types.ts#L157-L160" }, { "kind": "interface", "name": { - "name": "IndexingPressureMemory", + "name": "FieldTypes", "namespace": "cluster.stats" }, "properties": [ { - "name": "current", + "description": "The name for the field type in selected nodes.", + "name": "name", "required": true, "type": { "kind": "instance_of", "type": { - "name": "IndexingPressureMemorySummary", - "namespace": "cluster.stats" + "name": "Name", + "namespace": "_types" } } }, { - "name": "limit_in_bytes", + "description": "The number of occurrences of the field type in selected nodes.", + "name": "count", "required": true, "type": { "kind": "instance_of", "type": { - "name": "long", + "name": "integer", "namespace": "_types" } } }, { - "name": "total", + "description": "The number of indices containing the field type in selected nodes.", + "name": "index_count", "required": true, "type": { "kind": "instance_of", "type": { - "name": "IndexingPressureMemorySummary", - "namespace": "cluster.stats" + "name": "integer", + "namespace": "_types" } } - } - ], - "specLocation": "cluster/stats/types.ts#L574-L578" - }, - { - "kind": "interface", - "name": { - "name": "IndexingPressureMemorySummary", - "namespace": "cluster.stats" - }, - "properties": [ + }, { - "name": "all_in_bytes", - "required": true, + "description": "For dense_vector field types, number of indexed vector types in selected nodes.", + "name": "indexed_vector_count", + "required": false, "type": { "kind": "instance_of", "type": { - "name": "long", + "name": "integer", "namespace": "_types" } } }, { - "name": "combined_coordinating_and_primary_in_bytes", - "required": true, + "description": "For dense_vector field types, the maximum dimension of all indexed vector types in selected nodes.", + "name": "indexed_vector_dim_max", + "required": false, "type": { "kind": "instance_of", "type": { - "name": "long", + "name": "integer", "namespace": "_types" } } }, { - "name": "coordinating_in_bytes", - "required": true, + "description": "For dense_vector field types, the minimum dimension of all indexed vector types in selected nodes.", + "name": "indexed_vector_dim_min", + "required": false, "type": { "kind": "instance_of", "type": { - "name": "long", + "name": "integer", "namespace": "_types" } } }, { - "name": "coordinating_rejections", + "availability": { + "serverless": {}, + "stack": { + "since": "7.13.0" + } + }, + "description": "The number of fields that declare a script.", + "name": "script_count", "required": false, "type": { "kind": "instance_of", "type": { - "name": "long", + "name": "integer", "namespace": "_types" } } }, { - "name": "primary_in_bytes", + "description": "For dense_vector field types, count of mappings by index type", + "name": "vector_index_type_count", + "required": false, + "type": { + "kind": "dictionary_of", + "key": { + "kind": "instance_of", + "type": { + "name": "Name", + "namespace": "_types" + } + }, + "singleKey": false, + "value": { + "kind": "instance_of", + "type": { + "name": "integer", + "namespace": "_types" + } + } + } + }, + { + "description": "For dense_vector field types, count of mappings by similarity", + "name": "vector_similarity_type_count", + "required": false, + "type": { + "kind": "dictionary_of", + "key": { + "kind": "instance_of", + "type": { + "name": "Name", + "namespace": "_types" + } + }, + "singleKey": false, + "value": { + "kind": "instance_of", + "type": { + "name": "integer", + "namespace": "_types" + } + } + } + }, + { + "description": "For dense_vector field types, count of mappings by element type", + "name": "vector_element_type_count", + "required": false, + "type": { + "kind": "dictionary_of", + "key": { + "kind": "instance_of", + "type": { + "name": "Name", + "namespace": "_types" + } + }, + "singleKey": false, + "value": { + "kind": "instance_of", + "type": { + "name": "integer", + "namespace": "_types" + } + } + } + } + ], + "specLocation": "cluster/stats/types.ts#L211-L254" + }, + { + "kind": "interface", + "name": { + "name": "FieldTypesMappings", + "namespace": "cluster.stats" + }, + "properties": [ + { + "description": "Contains statistics about field data types used in selected nodes.", + "name": "field_types", + "required": true, + "type": { + "kind": "array_of", + "value": { + "kind": "instance_of", + "type": { + "name": "FieldTypes", + "namespace": "cluster.stats" + } + } + } + }, + { + "description": "Contains statistics about runtime field data types used in selected nodes.", + "name": "runtime_field_types", "required": true, + "type": { + "kind": "array_of", + "value": { + "kind": "instance_of", + "type": { + "name": "RuntimeFieldTypes", + "namespace": "cluster.stats" + } + } + } + }, + { + "description": "Total number of fields in all non-system indices.", + "name": "total_field_count", + "required": false, "type": { "kind": "instance_of", "type": { @@ -124445,7 +127349,8 @@ } }, { - "name": "primary_rejections", + "description": "Total number of fields in all non-system indices, accounting for mapping deduplication.", + "name": "total_deduplicated_field_count", "required": false, "type": { "kind": "instance_of", @@ -124456,18 +127361,20 @@ } }, { - "name": "replica_in_bytes", - "required": true, + "description": "Total size of all mappings after deduplication and compression.", + "name": "total_deduplicated_mapping_size", + "required": false, "type": { "kind": "instance_of", "type": { - "name": "long", + "name": "ByteSize", "namespace": "_types" } } }, { - "name": "replica_rejections", + "description": "Total size of all mappings, in bytes, after deduplication and compression.", + "name": "total_deduplicated_mapping_size_in_bytes", "required": false, "type": { "kind": "instance_of", @@ -124476,9 +127383,53 @@ "namespace": "_types" } } + }, + { + "description": "Source mode usage count.", + "name": "source_modes", + "required": true, + "type": { + "kind": "dictionary_of", + "key": { + "kind": "instance_of", + "type": { + "name": "Name", + "namespace": "_types" + } + }, + "singleKey": false, + "value": { + "kind": "instance_of", + "type": { + "name": "integer", + "namespace": "_types" + } + } + } } ], - "specLocation": "cluster/stats/types.ts#L580-L589" + "specLocation": "cluster/stats/types.ts#L180-L209" + }, + { + "kind": "interface", + "name": { + "name": "IndexingPressure", + "namespace": "cluster.stats" + }, + "properties": [ + { + "name": "memory", + "required": true, + "type": { + "kind": "instance_of", + "type": { + "name": "IndexingPressureMemory", + "namespace": "nodes._types" + } + } + } + ], + "specLocation": "cluster/stats/types.ts#L765-L767" }, { "kind": "interface", @@ -124520,6 +127471,17 @@ } } }, + { + "name": "total_primary_size", + "required": false, + "type": { + "kind": "instance_of", + "type": { + "name": "ByteSize", + "namespace": "_types" + } + } + }, { "name": "version", "required": true, @@ -124532,7 +127494,7 @@ } } ], - "specLocation": "cluster/stats/types.ts#L263-L268" + "specLocation": "cluster/stats/types.ts#L359-L365" }, { "kind": "interface", @@ -124578,7 +127540,7 @@ } } ], - "specLocation": "cluster/stats/types.ts#L526-L539" + "specLocation": "cluster/stats/types.ts#L700-L713" }, { "kind": "interface", @@ -124605,6 +127567,24 @@ } } }, + { + "availability": { + "serverless": {}, + "stack": { + "since": "7.16.0" + } + }, + "description": "Total amount of memory across all selected nodes, but using the value specified using the `es.total_memory_bytes` system property instead of measured total memory for those nodes where that system property was set.", + "name": "adjusted_total", + "required": false, + "type": { + "kind": "instance_of", + "type": { + "name": "ByteSize", + "namespace": "_types" + } + } + }, { "description": "Amount, in bytes, of free physical memory across all selected nodes.", "name": "free_in_bytes", @@ -124617,6 +127597,18 @@ } } }, + { + "description": "Amount of free physical memory across all selected nodes.", + "name": "free", + "required": false, + "type": { + "kind": "instance_of", + "type": { + "name": "ByteSize", + "namespace": "_types" + } + } + }, { "description": "Percentage of free physical memory across all selected nodes.", "name": "free_percent", @@ -124641,6 +127633,18 @@ } } }, + { + "description": "Total amount of physical memory across all selected nodes.", + "name": "total", + "required": false, + "type": { + "kind": "instance_of", + "type": { + "name": "ByteSize", + "namespace": "_types" + } + } + }, { "description": "Amount, in bytes, of physical memory in use across all selected nodes.", "name": "used_in_bytes", @@ -124653,6 +127657,18 @@ } } }, + { + "description": "Amount of physical memory in use across all selected nodes.", + "name": "used", + "required": false, + "type": { + "kind": "instance_of", + "type": { + "name": "ByteSize", + "namespace": "_types" + } + } + }, { "description": "Percentage of physical memory in use across all selected nodes.", "name": "used_percent", @@ -124666,7 +127682,61 @@ } } ], - "specLocation": "cluster/stats/types.ts#L541-L568" + "specLocation": "cluster/stats/types.ts#L715-L763" + }, + { + "kind": "interface", + "name": { + "name": "PerRepositoryStats", + "namespace": "cluster.stats" + }, + "properties": [ + { + "name": "type", + "required": true, + "type": { + "kind": "instance_of", + "type": { + "name": "string", + "namespace": "_builtins" + } + } + }, + { + "name": "oldest_start_time_millis", + "required": true, + "type": { + "kind": "instance_of", + "type": { + "name": "UnitMillis", + "namespace": "_types" + } + } + }, + { + "name": "oldest_start_time", + "required": false, + "type": { + "kind": "instance_of", + "type": { + "name": "DateFormat", + "namespace": "_types" + } + } + }, + { + "name": "current_counts", + "required": true, + "type": { + "kind": "instance_of", + "type": { + "name": "RepositoryStatsCurrentCounts", + "namespace": "cluster.stats" + } + } + } + ], + "specLocation": "cluster/stats/types.ts#L665-L670" }, { "kind": "interface", @@ -124713,7 +127783,7 @@ }, { "description": "Transport compression setting used for this remote cluster.", - "name": "transport_compress", + "name": "transport.compress", "required": true, "type": { "kind": "instance_of", @@ -124859,7 +127929,159 @@ } } ], - "specLocation": "cluster/stats/types.ts#L608-L639" + "specLocation": "cluster/stats/types.ts#L786-L817" + }, + { + "kind": "interface", + "name": { + "name": "RepositoryStatsCurrentCounts", + "namespace": "cluster.stats" + }, + "properties": [ + { + "name": "snapshots", + "required": true, + "type": { + "kind": "instance_of", + "type": { + "name": "integer", + "namespace": "_types" + } + } + }, + { + "name": "clones", + "required": true, + "type": { + "kind": "instance_of", + "type": { + "name": "integer", + "namespace": "_types" + } + } + }, + { + "name": "finalizations", + "required": true, + "type": { + "kind": "instance_of", + "type": { + "name": "integer", + "namespace": "_types" + } + } + }, + { + "name": "deletions", + "required": true, + "type": { + "kind": "instance_of", + "type": { + "name": "integer", + "namespace": "_types" + } + } + }, + { + "name": "snapshot_deletions", + "required": true, + "type": { + "kind": "instance_of", + "type": { + "name": "integer", + "namespace": "_types" + } + } + }, + { + "name": "active_deletions", + "required": true, + "type": { + "kind": "instance_of", + "type": { + "name": "integer", + "namespace": "_types" + } + } + }, + { + "name": "shards", + "required": true, + "type": { + "kind": "instance_of", + "type": { + "name": "RepositoryStatsShards", + "namespace": "cluster.stats" + } + } + } + ], + "specLocation": "cluster/stats/types.ts#L672-L680" + }, + { + "kind": "interface", + "name": { + "name": "RepositoryStatsShards", + "namespace": "cluster.stats" + }, + "properties": [ + { + "name": "total", + "required": true, + "type": { + "kind": "instance_of", + "type": { + "name": "integer", + "namespace": "_types" + } + } + }, + { + "name": "complete", + "required": true, + "type": { + "kind": "instance_of", + "type": { + "name": "integer", + "namespace": "_types" + } + } + }, + { + "name": "incomplete", + "required": true, + "type": { + "kind": "instance_of", + "type": { + "name": "integer", + "namespace": "_types" + } + } + }, + { + "name": "states", + "required": true, + "type": { + "kind": "dictionary_of", + "key": { + "kind": "instance_of", + "type": { + "name": "ShardState", + "namespace": "cluster.stats" + } + }, + "singleKey": false, + "value": { + "kind": "instance_of", + "type": { + "name": "integer", + "namespace": "_types" + } + } + } + } + ], + "specLocation": "cluster/stats/types.ts#L682-L687" }, { "kind": "request", @@ -124971,7 +128193,7 @@ "name": "Response", "namespace": "cluster.stats" }, - "specLocation": "cluster/stats/ClusterStatsResponse.ts#L57-L60" + "specLocation": "cluster/stats/ClusterStatsResponse.ts#L71-L74" }, { "kind": "interface", @@ -125152,7 +128374,241 @@ } } ], - "specLocation": "cluster/stats/types.ts#L169-L226" + "specLocation": "cluster/stats/types.ts#L256-L313" + }, + { + "kind": "interface", + "name": { + "name": "SearchUsageStats", + "namespace": "cluster.stats" + }, + "properties": [ + { + "name": "total", + "required": true, + "type": { + "kind": "instance_of", + "type": { + "name": "long", + "namespace": "_types" + } + } + }, + { + "name": "queries", + "required": true, + "type": { + "kind": "dictionary_of", + "key": { + "kind": "instance_of", + "type": { + "name": "Name", + "namespace": "_types" + } + }, + "singleKey": false, + "value": { + "kind": "instance_of", + "type": { + "name": "long", + "namespace": "_types" + } + } + } + }, + { + "name": "rescorers", + "required": true, + "type": { + "kind": "dictionary_of", + "key": { + "kind": "instance_of", + "type": { + "name": "Name", + "namespace": "_types" + } + }, + "singleKey": false, + "value": { + "kind": "instance_of", + "type": { + "name": "long", + "namespace": "_types" + } + } + } + }, + { + "name": "sections", + "required": true, + "type": { + "kind": "dictionary_of", + "key": { + "kind": "instance_of", + "type": { + "name": "Name", + "namespace": "_types" + } + }, + "singleKey": false, + "value": { + "kind": "instance_of", + "type": { + "name": "long", + "namespace": "_types" + } + } + } + }, + { + "name": "retrievers", + "required": true, + "type": { + "kind": "dictionary_of", + "key": { + "kind": "instance_of", + "type": { + "name": "Name", + "namespace": "_types" + } + }, + "singleKey": false, + "value": { + "kind": "instance_of", + "type": { + "name": "long", + "namespace": "_types" + } + } + } + } + ], + "specLocation": "cluster/stats/types.ts#L149-L155" + }, + { + "kind": "enum", + "members": [ + { + "name": "INIT" + }, + { + "name": "SUCCESS" + }, + { + "name": "FAILED" + }, + { + "name": "ABORTED" + }, + { + "name": "MISSING" + }, + { + "name": "WAITING" + }, + { + "name": "QUEUED" + }, + { + "name": "PAUSED_FOR_NODE_REMOVAL" + } + ], + "name": { + "name": "ShardState", + "namespace": "cluster.stats" + }, + "specLocation": "cluster/stats/types.ts#L689-L698" + }, + { + "kind": "interface", + "name": { + "name": "SnapshotCurrentCounts", + "namespace": "cluster.stats" + }, + "properties": [ + { + "description": "Snapshots currently in progress", + "name": "snapshots", + "required": true, + "type": { + "kind": "instance_of", + "type": { + "name": "integer", + "namespace": "_types" + } + } + }, + { + "description": "Incomplete shard snapshots", + "name": "shard_snapshots", + "required": true, + "type": { + "kind": "instance_of", + "type": { + "name": "integer", + "namespace": "_types" + } + } + }, + { + "description": "Snapshots deletions in progress", + "name": "snapshot_deletions", + "required": true, + "type": { + "kind": "instance_of", + "type": { + "name": "integer", + "namespace": "_types" + } + } + }, + { + "description": "Sum of snapshots and snapshot_deletions", + "name": "concurrent_operations", + "required": true, + "type": { + "kind": "instance_of", + "type": { + "name": "integer", + "namespace": "_types" + } + } + }, + { + "description": "Cleanups in progress, not counted in concurrent_operations as they are not concurrent", + "name": "cleanups", + "required": true, + "type": { + "kind": "instance_of", + "type": { + "name": "integer", + "namespace": "_types" + } + } + } + ], + "specLocation": "cluster/stats/types.ts#L642-L663" + }, + { + "kind": "interface", + "name": { + "name": "SparseVectorStats", + "namespace": "cluster.stats" + }, + "properties": [ + { + "name": "value_count", + "required": true, + "type": { + "kind": "instance_of", + "type": { + "name": "long", + "namespace": "_types" + } + } + } + ], + "specLocation": "cluster/stats/types.ts#L162-L164" }, { "kind": "interface", @@ -125217,10 +128673,56 @@ } } }, + { + "description": "Contains stats on repository feature usage exposed in cluster stats for telemetry.", + "name": "repositories", + "required": true, + "type": { + "kind": "dictionary_of", + "key": { + "kind": "instance_of", + "type": { + "name": "Name", + "namespace": "_types" + } + }, + "singleKey": false, + "value": { + "kind": "dictionary_of", + "key": { + "kind": "instance_of", + "type": { + "name": "Name", + "namespace": "_types" + } + }, + "singleKey": false, + "value": { + "kind": "instance_of", + "type": { + "name": "long", + "namespace": "_types" + } + } + } + } + }, + { + "description": "Contains stats cluster snapshots.", + "name": "snapshots", + "required": true, + "type": { + "kind": "instance_of", + "type": { + "name": "ClusterSnapshotStats", + "namespace": "cluster.stats" + } + } + }, { "description": "Health status of the cluster, based on the state of its primary and replica shards.", "name": "status", - "required": true, + "required": false, "type": { "kind": "instance_of", "type": { @@ -125254,7 +128756,39 @@ } } ], - "specLocation": "cluster/stats/ClusterStatsResponse.ts#L25-L55" + "specLocation": "cluster/stats/ClusterStatsResponse.ts#L31-L69" + }, + { + "kind": "interface", + "name": { + "name": "SynonymsStats", + "namespace": "cluster.stats" + }, + "properties": [ + { + "name": "count", + "required": true, + "type": { + "kind": "instance_of", + "type": { + "name": "integer", + "namespace": "_types" + } + } + }, + { + "name": "index_count", + "required": true, + "type": { + "kind": "instance_of", + "type": { + "name": "integer", + "namespace": "_types" + } + } + } + ], + "specLocation": "cluster/stats/types.ts#L354-L357" }, { "kind": "interface", @@ -133464,6 +136998,7 @@ ], "query": [ { + "description": "Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)", "name": "allow_no_indices", "required": false, "serverDefault": true, @@ -133502,6 +137037,7 @@ } }, { + "description": "Whether to expand wildcard expression to concrete indices that are open, closed or both.", "name": "expand_wildcards", "required": false, "serverDefault": "open", @@ -133513,6 +137049,19 @@ } } }, + { + "description": "Indicates whether network round-trips should be minimized as part of cross-cluster search requests execution", + "name": "ccs_minimize_roundtrips", + "required": false, + "serverDefault": true, + "type": { + "kind": "instance_of", + "type": { + "name": "boolean", + "namespace": "_builtins" + } + } + }, { "description": "If true, missing or closed indices are not included in the response.", "name": "ignore_unavailable", @@ -133565,7 +137114,7 @@ } } ], - "specLocation": "eql/search/EqlSearchRequest.ts#L28-L161" + "specLocation": "eql/search/EqlSearchRequest.ts#L28-L166" }, { "kind": "response", @@ -133640,6 +137189,7 @@ }, "properties": [ { + "description": "The ID of the async query, to be used in subsequent requests to check the status or retrieve results.\n\nAlso available in the `X-Elasticsearch-Async-Id` HTTP header.", "name": "id", "required": false, "type": { @@ -133651,6 +137201,7 @@ } }, { + "description": "Indicates whether the async query is still running or has completed.\n\nAlso available in the `X-Elasticsearch-Async-Is-Running` HTTP header.", "name": "is_running", "required": true, "type": { @@ -133662,7 +137213,7 @@ } } ], - "specLocation": "esql/_types/EsqlResult.ts#L45-L48" + "specLocation": "esql/_types/EsqlResult.ts#L45-L58" }, { "kind": "interface", @@ -133739,7 +137290,7 @@ } } ], - "specLocation": "esql/_types/EsqlResult.ts#L65-L71" + "specLocation": "esql/_types/EsqlResult.ts#L75-L81" }, { "kind": "interface", @@ -133837,7 +137388,7 @@ } } ], - "specLocation": "esql/_types/EsqlResult.ts#L55-L63" + "specLocation": "esql/_types/EsqlResult.ts#L65-L73" }, { "kind": "enum", @@ -133862,7 +137413,7 @@ "name": "EsqlClusterStatus", "namespace": "esql._types" }, - "specLocation": "esql/_types/EsqlResult.ts#L73-L79" + "specLocation": "esql/_types/EsqlResult.ts#L83-L89" }, { "kind": "interface", @@ -133894,7 +137445,7 @@ } } ], - "specLocation": "esql/_types/EsqlResult.ts#L50-L53" + "specLocation": "esql/_types/EsqlResult.ts#L60-L63" }, { "kind": "enum", @@ -134100,7 +137651,7 @@ } } ], - "specLocation": "esql/_types/EsqlResult.ts#L88-L93" + "specLocation": "esql/_types/EsqlResult.ts#L98-L103" }, { "kind": "interface", @@ -134154,7 +137705,7 @@ } } ], - "specLocation": "esql/_types/EsqlResult.ts#L81-L86" + "specLocation": "esql/_types/EsqlResult.ts#L91-L96" }, { "kind": "interface", @@ -134597,7 +138148,7 @@ } }, { - "description": "A short version of the Accept header, for example `json` or `yaml`.", + "description": "A short version of the Accept header, e.g. json, yaml.\n\n`csv`, `tsv`, and `txt` formats will return results in a tabular format, excluding other metadata fields from the response.\n\nFor async requests, nothing will be returned if the async query doesn't finish within the timeout.\nThe query ID and running status are available in the `X-Elasticsearch-Async-Id` and `X-Elasticsearch-Async-Is-Running` HTTP headers of the response, respectively.", "name": "format", "required": false, "type": { @@ -134609,7 +138160,7 @@ } } ], - "specLocation": "esql/async_query/AsyncQueryRequest.ts#L28-L133" + "specLocation": "esql/async_query/AsyncQueryRequest.ts#L28-L138" }, { "kind": "response", @@ -135372,7 +138923,7 @@ "path": [], "query": [ { - "description": "A short version of the Accept header, e.g. json, yaml.", + "description": "A short version of the Accept header, e.g. json, yaml.\n\n`csv`, `tsv`, and `txt` formats will return results in a tabular format, excluding other metadata fields from the response.", "name": "format", "required": false, "type": { @@ -135422,7 +138973,7 @@ } } ], - "specLocation": "esql/query/QueryRequest.ts#L27-L113" + "specLocation": "esql/query/QueryRequest.ts#L27-L115" }, { "kind": "response", @@ -140832,7 +144383,7 @@ } } ], - "specLocation": "indices/_types/IndexSettings.ts#L423-L425" + "specLocation": "indices/_types/IndexSettings.ts#L434-L436" }, { "kind": "interface", @@ -141850,7 +145401,7 @@ "name": "IndexCheckOnStartup", "namespace": "indices._types" }, - "specLocation": "indices/_types/IndexSettings.ts#L272-L279" + "specLocation": "indices/_types/IndexSettings.ts#L283-L290" }, { "kind": "enum", @@ -143263,7 +146814,7 @@ } } ], - "specLocation": "indices/_types/IndexSettings.ts#L335-L341" + "specLocation": "indices/_types/IndexSettings.ts#L346-L352" }, { "kind": "interface", @@ -143381,7 +146932,7 @@ } } ], - "specLocation": "indices/_types/IndexSettings.ts#L286-L325" + "specLocation": "indices/_types/IndexSettings.ts#L297-L336" }, { "kind": "interface", @@ -143403,7 +146954,7 @@ } } ], - "specLocation": "indices/_types/IndexSettings.ts#L327-L333" + "specLocation": "indices/_types/IndexSettings.ts#L338-L344" }, { "kind": "interface", @@ -143435,7 +146986,7 @@ } } ], - "specLocation": "indices/_types/IndexSettings.ts#L343-L346" + "specLocation": "indices/_types/IndexSettings.ts#L354-L357" }, { "kind": "interface", @@ -143856,7 +147407,7 @@ } } ], - "specLocation": "indices/_types/IndexSettings.ts#L281-L284" + "specLocation": "indices/_types/IndexSettings.ts#L292-L295" }, { "kind": "interface", @@ -143877,7 +147428,7 @@ } } ], - "specLocation": "indices/_types/IndexSettings.ts#L577-L579" + "specLocation": "indices/_types/IndexSettings.ts#L590-L592" }, { "kind": "interface", @@ -143899,7 +147450,7 @@ } } ], - "specLocation": "indices/_types/IndexSettings.ts#L581-L588" + "specLocation": "indices/_types/IndexSettings.ts#L594-L601" }, { "kind": "interface", @@ -143953,7 +147504,7 @@ } } ], - "specLocation": "indices/_types/IndexSettings.ts#L590-L595" + "specLocation": "indices/_types/IndexSettings.ts#L603-L608" }, { "kind": "interface", @@ -143977,7 +147528,33 @@ } } ], - "specLocation": "indices/_types/IndexSettings.ts#L597-L604" + "specLocation": "indices/_types/IndexSettings.ts#L610-L617" + }, + { + "kind": "enum", + "members": [ + { + "description": "Disable metadata changes, such as closing the index.", + "name": "metadata" + }, + { + "description": "Disable read operations.", + "name": "read" + }, + { + "description": "Disable write operations and metadata changes.", + "name": "read_only" + }, + { + "description": "Disable write operations. However, metadata changes are still allowed.", + "name": "write" + } + ], + "name": { + "name": "IndicesBlockOptions", + "namespace": "indices._types" + }, + "specLocation": "indices/_types/IndexSettings.ts#L272-L281" }, { "kind": "enum", @@ -144123,7 +147700,7 @@ } } ], - "specLocation": "indices/_types/IndexSettings.ts#L427-L441" + "specLocation": "indices/_types/IndexSettings.ts#L438-L452" }, { "kind": "interface", @@ -144146,7 +147723,7 @@ } } ], - "specLocation": "indices/_types/IndexSettings.ts#L462-L469" + "specLocation": "indices/_types/IndexSettings.ts#L473-L480" }, { "kind": "interface", @@ -144168,7 +147745,7 @@ } } ], - "specLocation": "indices/_types/IndexSettings.ts#L499-L505" + "specLocation": "indices/_types/IndexSettings.ts#L510-L516" }, { "kind": "interface", @@ -144190,7 +147767,7 @@ } } ], - "specLocation": "indices/_types/IndexSettings.ts#L490-L497" + "specLocation": "indices/_types/IndexSettings.ts#L501-L508" }, { "kind": "interface", @@ -144213,7 +147790,7 @@ } } ], - "specLocation": "indices/_types/IndexSettings.ts#L471-L479" + "specLocation": "indices/_types/IndexSettings.ts#L482-L490" }, { "kind": "interface", @@ -144236,7 +147813,7 @@ } } ], - "specLocation": "indices/_types/IndexSettings.ts#L481-L488" + "specLocation": "indices/_types/IndexSettings.ts#L492-L499" }, { "kind": "interface", @@ -144257,7 +147834,7 @@ } } ], - "specLocation": "indices/_types/IndexSettings.ts#L507-L509" + "specLocation": "indices/_types/IndexSettings.ts#L518-L520" }, { "kind": "interface", @@ -144317,7 +147894,7 @@ } } ], - "specLocation": "indices/_types/IndexSettings.ts#L443-L460" + "specLocation": "indices/_types/IndexSettings.ts#L454-L471" }, { "kind": "interface", @@ -144338,7 +147915,7 @@ } } ], - "specLocation": "indices/_types/IndexSettings.ts#L348-L350" + "specLocation": "indices/_types/IndexSettings.ts#L359-L361" }, { "kind": "interface", @@ -144388,7 +147965,7 @@ } } ], - "specLocation": "indices/_types/IndexSettings.ts#L352-L355" + "specLocation": "indices/_types/IndexSettings.ts#L363-L366" }, { "kind": "interface", @@ -144446,7 +148023,7 @@ } } ], - "specLocation": "indices/_types/IndexSettings.ts#L419-L421" + "specLocation": "indices/_types/IndexSettings.ts#L430-L432" }, { "kind": "interface", @@ -145092,7 +148669,7 @@ } } ], - "specLocation": "indices/_types/IndexSettings.ts#L517-L522" + "specLocation": "indices/_types/IndexSettings.ts#L528-L533" }, { "kind": "interface", @@ -145146,7 +148723,7 @@ } } ], - "specLocation": "indices/_types/IndexSettings.ts#L529-L534" + "specLocation": "indices/_types/IndexSettings.ts#L540-L545" }, { "kind": "interface", @@ -145178,7 +148755,7 @@ } } ], - "specLocation": "indices/_types/IndexSettings.ts#L524-L527" + "specLocation": "indices/_types/IndexSettings.ts#L535-L538" }, { "kind": "interface", @@ -145232,7 +148809,7 @@ "name": "SourceMode", "namespace": "indices._types" }, - "specLocation": "indices/_types/IndexSettings.ts#L511-L515" + "specLocation": "indices/_types/IndexSettings.ts#L522-L526" }, { "kind": "interface", @@ -145263,9 +148840,21 @@ "namespace": "_builtins" } } + }, + { + "description": "How often store statistics are refreshed", + "name": "stats_refresh_interval", + "required": false, + "type": { + "kind": "instance_of", + "type": { + "name": "Duration", + "namespace": "_types" + } + } } ], - "specLocation": "indices/_types/IndexSettings.ts#L536-L545" + "specLocation": "indices/_types/IndexSettings.ts#L547-L558" }, { "kind": "enum", @@ -145292,7 +148881,7 @@ "name": "StorageType", "namespace": "indices._types" }, - "specLocation": "indices/_types/IndexSettings.ts#L547-L575" + "specLocation": "indices/_types/IndexSettings.ts#L560-L588" }, { "kind": "interface", @@ -145449,7 +149038,7 @@ } } ], - "specLocation": "indices/_types/IndexSettings.ts#L357-L379" + "specLocation": "indices/_types/IndexSettings.ts#L368-L390" }, { "kind": "enum", @@ -145473,7 +149062,7 @@ "name": "TranslogDurability", "namespace": "indices._types" }, - "specLocation": "indices/_types/IndexSettings.ts#L381-L396" + "specLocation": "indices/_types/IndexSettings.ts#L392-L407" }, { "kind": "interface", @@ -145509,38 +149098,12 @@ } } ], - "specLocation": "indices/_types/IndexSettings.ts#L398-L417" - }, - { - "kind": "enum", - "members": [ - { - "description": "Disable metadata changes, such as closing the index.", - "name": "metadata" - }, - { - "description": "Disable read operations.", - "name": "read" - }, - { - "description": "Disable write operations and metadata changes.", - "name": "read_only" - }, - { - "description": "Disable write operations. However, metadata changes are still allowed.", - "name": "write" - } - ], - "name": { - "name": "IndicesBlockOptions", - "namespace": "indices.add_block" - }, - "specLocation": "indices/add_block/IndicesAddBlockRequest.ts#L91-L100" + "specLocation": "indices/_types/IndexSettings.ts#L409-L428" }, { "kind": "interface", "name": { - "name": "IndicesBlockStatus", + "name": "AddIndicesBlockStatus", "namespace": "indices.add_block" }, "properties": [ @@ -145640,7 +149203,7 @@ "kind": "instance_of", "type": { "name": "IndicesBlockOptions", - "namespace": "indices.add_block" + "namespace": "indices._types" } } } @@ -145712,7 +149275,7 @@ } } ], - "specLocation": "indices/add_block/IndicesAddBlockRequest.ts#L24-L89" + "specLocation": "indices/add_block/IndicesAddBlockRequest.ts#L25-L90" }, { "kind": "response", @@ -145749,7 +149312,7 @@ "value": { "kind": "instance_of", "type": { - "name": "IndicesBlockStatus", + "name": "AddIndicesBlockStatus", "namespace": "indices.add_block" } } @@ -148374,6 +151937,33 @@ }, "specLocation": "indices/delete/IndicesDeleteResponse.ts#L22-L25" }, + { + "kind": "interface", + "inherits": { + "type": { + "name": "AcknowledgedResponseBase", + "namespace": "_types" + } + }, + "name": { + "name": "IndicesAliasesResponseBody", + "namespace": "indices.delete_alias" + }, + "properties": [ + { + "name": "errors", + "required": false, + "type": { + "kind": "instance_of", + "type": { + "name": "boolean", + "namespace": "_builtins" + } + } + } + ], + "specLocation": "indices/delete_alias/IndicesDeleteAliasResponse.ts#L27-L29" + }, { "kind": "request", "attachedBehaviors": [ @@ -148488,8 +152078,8 @@ "value": { "kind": "instance_of", "type": { - "name": "AcknowledgedResponseBase", - "namespace": "_types" + "name": "IndicesAliasesResponseBody", + "namespace": "indices.delete_alias" } } }, @@ -149694,7 +153284,7 @@ } } ], - "specLocation": "indices/exists_index_template/IndicesExistsIndexTemplateRequest.ts#L24-L61" + "specLocation": "indices/exists_index_template/IndicesExistsIndexTemplateRequest.ts#L24-L62" }, { "kind": "response", @@ -151208,38 +154798,6 @@ }, "specLocation": "indices/get/IndicesGetResponse.ts#L24-L27" }, - { - "kind": "interface", - "name": { - "name": "IndexAliases", - "namespace": "indices.get_alias" - }, - "properties": [ - { - "name": "aliases", - "required": true, - "type": { - "kind": "dictionary_of", - "key": { - "kind": "instance_of", - "type": { - "name": "string", - "namespace": "_builtins" - } - }, - "singleKey": false, - "value": { - "kind": "instance_of", - "type": { - "name": "AliasDefinition", - "namespace": "indices._types" - } - } - } - } - ], - "specLocation": "indices/get_alias/IndicesGetAliasResponse.ts#L37-L39" - }, { "kind": "request", "attachedBehaviors": [ @@ -151391,7 +154949,7 @@ "kind": "instance_of", "type": { "name": "IndexAliases", - "namespace": "indices.get_alias" + "namespace": "indices.get_alias._types" } } } @@ -151407,7 +154965,7 @@ "kind": "instance_of", "type": { "name": "NotFoundAliases", - "namespace": "indices.get_alias" + "namespace": "indices.get_alias._types" } }, { @@ -151429,7 +154987,102 @@ "name": "Response", "namespace": "indices.get_alias" }, - "specLocation": "indices/get_alias/IndicesGetAliasResponse.ts#L26-L35" + "specLocation": "indices/get_alias/IndicesGetAliasResponse.ts#L28-L37" + }, + { + "kind": "interface", + "name": { + "name": "IndexAliases", + "namespace": "indices.get_alias._types" + }, + "properties": [ + { + "name": "aliases", + "required": true, + "type": { + "kind": "dictionary_of", + "key": { + "kind": "instance_of", + "type": { + "name": "string", + "namespace": "_builtins" + } + }, + "singleKey": false, + "value": { + "kind": "instance_of", + "type": { + "name": "AliasDefinition", + "namespace": "indices._types" + } + } + } + } + ], + "specLocation": "indices/get_alias/_types/response.ts#L24-L26" + }, + { + "kind": "interface", + "attachedBehaviors": [ + "AdditionalProperties" + ], + "behaviors": [ + { + "generics": [ + { + "kind": "instance_of", + "type": { + "name": "string", + "namespace": "_builtins" + } + }, + { + "kind": "instance_of", + "type": { + "name": "IndexAliases", + "namespace": "indices.get_alias._types" + } + } + ], + "meta": { + "description": "The index aliases", + "fieldname": "aliases" + }, + "type": { + "name": "AdditionalProperties", + "namespace": "_spec_utils" + } + } + ], + "name": { + "name": "NotFoundAliases", + "namespace": "indices.get_alias._types" + }, + "properties": [ + { + "name": "error", + "required": true, + "type": { + "kind": "instance_of", + "type": { + "name": "string", + "namespace": "_builtins" + } + } + }, + { + "name": "status", + "required": true, + "type": { + "kind": "instance_of", + "type": { + "name": "number", + "namespace": "_builtins" + } + } + } + ], + "specLocation": "indices/get_alias/_types/response.ts#L28-L36" }, { "kind": "interface", @@ -155764,30 +159417,30 @@ "indicesPutSettingsRequestExample3": { "alternatives": [ { - "code": "resp = client.indices.close(\n index=\"my-index-000001\",\n)\n\nresp1 = client.indices.open(\n index=\"my-index-000001\",\n)", + "code": "resp = client.indices.put_settings(\n index=\"my-index-000001\",\n settings={\n \"analysis\": {\n \"analyzer\": {\n \"content\": {\n \"type\": \"custom\",\n \"tokenizer\": \"whitespace\"\n }\n }\n }\n },\n)", "language": "Python" }, { - "code": "const response = await client.indices.close({\n index: \"my-index-000001\",\n});\n\nconst response1 = await client.indices.open({\n index: \"my-index-000001\",\n});", + "code": "const response = await client.indices.putSettings({\n index: \"my-index-000001\",\n settings: {\n analysis: {\n analyzer: {\n content: {\n type: \"custom\",\n tokenizer: \"whitespace\",\n },\n },\n },\n },\n});", "language": "JavaScript" }, { - "code": "response = client.indices.close(\n index: \"my-index-000001\",\n body: {\n \"analysis\": {\n \"analyzer\": {\n \"content\": {\n \"type\": \"custom\",\n \"tokenizer\": \"whitespace\"\n }\n }\n }\n }\n)\n\nresponse1 = client.indices.open(\n index: \"my-index-000001\"\n)", + "code": "response = client.indices.put_settings(\n index: \"my-index-000001\",\n body: {\n \"analysis\": {\n \"analyzer\": {\n \"content\": {\n \"type\": \"custom\",\n \"tokenizer\": \"whitespace\"\n }\n }\n }\n }\n)", "language": "Ruby" }, { - "code": "$resp = $client->indices()->close([\n \"index\" => \"my-index-000001\",\n \"body\" => [\n \"analysis\" => [\n \"analyzer\" => [\n \"content\" => [\n \"type\" => \"custom\",\n \"tokenizer\" => \"whitespace\",\n ],\n ],\n ],\n ],\n]);\n\n$resp1 = $client->indices()->open([\n \"index\" => \"my-index-000001\",\n]);", + "code": "$resp = $client->indices()->putSettings([\n \"index\" => \"my-index-000001\",\n \"body\" => [\n \"analysis\" => [\n \"analyzer\" => [\n \"content\" => [\n \"type\" => \"custom\",\n \"tokenizer\" => \"whitespace\",\n ],\n ],\n ],\n ],\n]);", "language": "PHP" }, { - "code": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"analysis\":{\"analyzer\":{\"content\":{\"type\":\"custom\",\"tokenizer\":\"whitespace\"}}}}' \"$ELASTICSEARCH_URL/my-index-000001/_close\"\ncurl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/my-index-000001/_open\"", + "code": "curl -X PUT -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"analysis\":{\"analyzer\":{\"content\":{\"type\":\"custom\",\"tokenizer\":\"whitespace\"}}}}' \"$ELASTICSEARCH_URL/my-index-000001/_settings\"", "language": "curl" } ], - "description": "To add an analyzer, you must close the index, define the analyzer, then reopen the index.", - "method_request": "POST /my-index-000001/_close", + "description": "To add an analyzer, you must close the index (`POST /my-index-000001/_close`), define the analyzer, then reopen the index (`POST /my-index-000001/_open`).", + "method_request": "PUT /my-index-000001/_settings", "summary": "Update index analysis", - "value": "{\n \"analysis\" : {\n \"analyzer\":{\n \"content\":{\n \"type\":\"custom\",\n \"tokenizer\":\"whitespace\"\n }\n }\n }\n}\n\nPOST /my-index-000001/_open" + "value": "{\n \"analysis\": {\n \"analyzer\": {\n \"content\": {\n \"type\": \"custom\",\n \"tokenizer\": \"whitespace\"\n }\n }\n }\n}" } }, "inherits": { @@ -156900,9 +160553,48 @@ "namespace": "_builtins" } } + }, + { + "description": "If `false`, the request returns an error if any wildcard expression, index alias, or `_all` value targets only missing or closed indices.\nThis behavior applies even if the request targets other open indices.", + "name": "allow_no_indices", + "required": false, + "serverDefault": true, + "type": { + "kind": "instance_of", + "type": { + "name": "boolean", + "namespace": "_builtins" + } + } + }, + { + "description": "Type of index that wildcard patterns can match.\nIf the request can target data streams, this argument determines whether wildcard expressions match hidden data streams.\nSupports comma-separated values, such as `open,hidden`.", + "name": "expand_wildcards", + "required": false, + "serverDefault": "open", + "type": { + "kind": "instance_of", + "type": { + "name": "ExpandWildcards", + "namespace": "_types" + } + } + }, + { + "description": "If `false`, the request returns an error if it targets a missing or closed index.", + "name": "ignore_unavailable", + "required": false, + "serverDefault": false, + "type": { + "kind": "instance_of", + "type": { + "name": "boolean", + "namespace": "_builtins" + } + } } ], - "specLocation": "indices/recovery/IndicesRecoveryRequest.ts#L23-L84" + "specLocation": "indices/recovery/IndicesRecoveryRequest.ts#L23-L102" }, { "kind": "response", @@ -157658,6 +161350,238 @@ }, "specLocation": "indices/reload_search_analyzers/ReloadSearchAnalyzersResponse.ts#L22-L25" }, + { + "kind": "interface", + "name": { + "name": "RemoveIndicesBlockStatus", + "namespace": "indices.remove_block" + }, + "properties": [ + { + "name": "name", + "required": true, + "type": { + "kind": "instance_of", + "type": { + "name": "IndexName", + "namespace": "_types" + } + } + }, + { + "name": "unblocked", + "required": false, + "type": { + "kind": "instance_of", + "type": { + "name": "boolean", + "namespace": "_builtins" + } + } + }, + { + "name": "exception", + "required": false, + "type": { + "kind": "instance_of", + "type": { + "name": "ErrorCause", + "namespace": "_types" + } + } + } + ], + "specLocation": "indices/remove_block/IndicesRemoveBlockResponse.ts#L30-L34" + }, + { + "kind": "request", + "attachedBehaviors": [ + "CommonQueryParameters" + ], + "body": { + "kind": "no_body" + }, + "description": "Remove an index block.\n\nRemove an index block from an index.\nIndex blocks limit the operations allowed on an index by blocking specific operation types.", + "examples": { + "IndicesRemoveBlockRequestExample1": { + "alternatives": [ + { + "code": "resp = client.indices.remove_block(\n index=\"my-index-000001\",\n block=\"write\",\n)", + "language": "Python" + }, + { + "code": "const response = await client.indices.removeBlock({\n index: \"my-index-000001\",\n block: \"write\",\n});", + "language": "JavaScript" + }, + { + "code": "response = client.indices.remove_block(\n index: \"my-index-000001\",\n block: \"write\"\n)", + "language": "Ruby" + }, + { + "code": "$resp = $client->indices()->removeBlock([\n \"index\" => \"my-index-000001\",\n \"block\" => \"write\",\n]);", + "language": "PHP" + }, + { + "code": "curl -X DELETE -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/my-index-000001/_block/write\"", + "language": "curl" + }, + { + "code": "client.indices().removeBlock(a -> a\n .block(IndicesBlockOptions.Write)\n .index(\"my-index-000001\")\n);\n", + "language": "Java" + } + ], + "method_request": "DELETE /my-index-000001/_block/write" + } + }, + "inherits": { + "type": { + "name": "RequestBase", + "namespace": "_types" + } + }, + "name": { + "name": "Request", + "namespace": "indices.remove_block" + }, + "path": [ + { + "description": "A comma-separated list or wildcard expression of index names used to limit the request.\nBy default, you must explicitly name the indices you are removing blocks from.\nTo allow the removal of blocks from indices with `_all`, `*`, or other wildcard expressions, change the `action.destructive_requires_name` setting to `false`.\nYou can update this setting in the `elasticsearch.yml` file or by using the cluster update settings API.", + "name": "index", + "required": true, + "type": { + "kind": "instance_of", + "type": { + "name": "IndexName", + "namespace": "_types" + } + } + }, + { + "description": "The block type to remove from the index.", + "name": "block", + "required": true, + "type": { + "kind": "instance_of", + "type": { + "name": "IndicesBlockOptions", + "namespace": "indices._types" + } + } + } + ], + "query": [ + { + "description": "If `false`, the request returns an error if any wildcard expression, index alias, or `_all` value targets only missing or closed indices.\nThis behavior applies even if the request targets other open indices.\nFor example, a request targeting `foo*,bar*` returns an error if an index starts with `foo` but no index starts with `bar`.", + "name": "allow_no_indices", + "required": false, + "serverDefault": true, + "type": { + "kind": "instance_of", + "type": { + "name": "boolean", + "namespace": "_builtins" + } + } + }, + { + "description": "The type of index that wildcard patterns can match.\nIf the request can target data streams, this argument determines whether wildcard expressions match hidden data streams.\nIt supports comma-separated values, such as `open,hidden`.", + "name": "expand_wildcards", + "required": false, + "serverDefault": "open", + "type": { + "kind": "instance_of", + "type": { + "name": "ExpandWildcards", + "namespace": "_types" + } + } + }, + { + "description": "If `false`, the request returns an error if it targets a missing or closed index.", + "name": "ignore_unavailable", + "required": false, + "serverDefault": false, + "type": { + "kind": "instance_of", + "type": { + "name": "boolean", + "namespace": "_builtins" + } + } + }, + { + "description": "The period to wait for the master node.\nIf the master node is not available before the timeout expires, the request fails and returns an error.\nIt can also be set to `-1` to indicate that the request should never timeout.", + "name": "master_timeout", + "required": false, + "serverDefault": "30s", + "type": { + "kind": "instance_of", + "type": { + "name": "Duration", + "namespace": "_types" + } + } + }, + { + "description": "The period to wait for a response from all relevant nodes in the cluster after updating the cluster metadata.\nIf no response is received before the timeout expires, the cluster metadata update still applies but the response will indicate that it was not completely acknowledged.\nIt can also be set to `-1` to indicate that the request should never timeout.", + "name": "timeout", + "required": false, + "serverDefault": "30s", + "type": { + "kind": "instance_of", + "type": { + "name": "Duration", + "namespace": "_types" + } + } + } + ], + "specLocation": "indices/remove_block/IndicesRemoveBlockRequest.ts#L25-L91" + }, + { + "kind": "response", + "body": { + "kind": "properties", + "properties": [ + { + "name": "acknowledged", + "required": true, + "type": { + "kind": "instance_of", + "type": { + "name": "boolean", + "namespace": "_builtins" + } + } + }, + { + "name": "indices", + "required": true, + "type": { + "kind": "array_of", + "value": { + "kind": "instance_of", + "type": { + "name": "RemoveIndicesBlockStatus", + "namespace": "indices.remove_block" + } + } + } + } + ] + }, + "examples": { + "IndicesRemoveBlockResponseExample1": { + "description": "A successful response from `DELETE /my-index-000001/_block/write`, which removes an index block from an index.'", + "value": "{\n \"acknowledged\" : true,\n \"indices\" : [ {\n \"name\" : \"my-index-000001\",\n \"unblocked\" : true\n } ]\n}" + } + }, + "name": { + "name": "Response", + "namespace": "indices.remove_block" + }, + "specLocation": "indices/remove_block/IndicesRemoveBlockResponse.ts#L23-L28" + }, { "kind": "request", "attachedBehaviors": [ @@ -163274,6 +167198,258 @@ }, "specLocation": "inference/_types/CommonTypes.ts#L436-L439" }, + { + "kind": "enum", + "members": [ + { + "name": "openai" + }, + { + "name": "elastic" + } + ], + "name": { + "name": "AmazonSageMakerApi", + "namespace": "inference._types" + }, + "specLocation": "inference/_types/CommonTypes.ts#L501-L504" + }, + { + "kind": "interface", + "name": { + "name": "AmazonSageMakerServiceSettings", + "namespace": "inference._types" + }, + "properties": [ + { + "description": "A valid AWS access key that has permissions to use Amazon SageMaker and access to models for invoking requests.", + "name": "access_key", + "required": true, + "type": { + "kind": "instance_of", + "type": { + "name": "string", + "namespace": "_builtins" + } + } + }, + { + "description": "The name of the SageMaker endpoint.", + "extDocId": "amazonsagemaker-invoke", + "extDocUrl": "https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_runtime_InvokeEndpoint.html", + "name": "endpoint_name", + "required": true, + "type": { + "kind": "instance_of", + "type": { + "name": "string", + "namespace": "_builtins" + } + } + }, + { + "description": "The API format to use when calling SageMaker.\nElasticsearch will convert the POST _inference request to this data format when invoking the SageMaker endpoint.", + "name": "api", + "required": true, + "type": { + "kind": "instance_of", + "type": { + "name": "AmazonSageMakerApi", + "namespace": "inference._types" + } + } + }, + { + "description": "The region that your endpoint or Amazon Resource Name (ARN) is deployed in.\nThe list of available regions per model can be found in the Amazon SageMaker documentation.", + "extDocId": "amazonsagemaker-invoke", + "extDocUrl": "https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_runtime_InvokeEndpoint.html", + "name": "region", + "required": true, + "type": { + "kind": "instance_of", + "type": { + "name": "string", + "namespace": "_builtins" + } + } + }, + { + "description": "A valid AWS secret key that is paired with the `access_key`.\nFor information about creating and managing access and secret keys, refer to the AWS documentation.", + "extDocId": "amazonsagemaker-secret-keys", + "extDocUrl": "https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_access-keys.html", + "name": "secret_key", + "required": true, + "type": { + "kind": "instance_of", + "type": { + "name": "string", + "namespace": "_builtins" + } + } + }, + { + "description": "The model ID when calling a multi-model endpoint.", + "extDocId": "amazonsagemaker-invoke", + "extDocUrl": "https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_runtime_InvokeEndpoint.html", + "name": "target_model", + "required": false, + "type": { + "kind": "instance_of", + "type": { + "name": "string", + "namespace": "_builtins" + } + } + }, + { + "description": "The container to directly invoke when calling a multi-container endpoint.", + "extDocId": "amazonsagemaker-invoke", + "extDocUrl": "https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_runtime_InvokeEndpoint.html", + "name": "target_container_hostname", + "required": false, + "type": { + "kind": "instance_of", + "type": { + "name": "string", + "namespace": "_builtins" + } + } + }, + { + "description": "The inference component to directly invoke when calling a multi-component endpoint.", + "extDocId": "amazonsagemaker-invoke", + "extDocUrl": "https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_runtime_InvokeEndpoint.html", + "name": "inference_component_name", + "required": false, + "type": { + "kind": "instance_of", + "type": { + "name": "string", + "namespace": "_builtins" + } + } + }, + { + "description": "The maximum number of inputs in each batch. This value is used by inference ingestion pipelines\nwhen processing semantic values. It correlates to the number of times the SageMaker endpoint is\ninvoked (one per batch of input).", + "name": "batch_size", + "required": false, + "serverDefault": 256, + "type": { + "kind": "instance_of", + "type": { + "name": "integer", + "namespace": "_types" + } + } + }, + { + "description": "The number of dimensions returned by the text embedding models. If this value is not provided, then\nit is guessed by making invoking the endpoint for the `text_embedding` task.", + "name": "dimensions", + "required": false, + "type": { + "kind": "instance_of", + "type": { + "name": "integer", + "namespace": "_types" + } + } + } + ], + "specLocation": "inference/_types/CommonTypes.ts#L445-L499" + }, + { + "kind": "enum", + "members": [ + { + "name": "amazon_sagemaker" + } + ], + "name": { + "name": "AmazonSageMakerServiceType", + "namespace": "inference._types" + }, + "specLocation": "inference/_types/CommonTypes.ts#L584-L586" + }, + { + "kind": "interface", + "name": { + "name": "AmazonSageMakerTaskSettings", + "namespace": "inference._types" + }, + "properties": [ + { + "description": "The AWS custom attributes passed verbatim through to the model running in the SageMaker Endpoint.\nValues will be returned in the `X-elastic-sagemaker-custom-attributes` header.", + "extDocId": "amazonsagemaker-invoke", + "extDocUrl": "https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_runtime_InvokeEndpoint.html", + "name": "custom_attributes", + "required": false, + "type": { + "kind": "instance_of", + "type": { + "name": "string", + "namespace": "_builtins" + } + } + }, + { + "description": "The optional JMESPath expression used to override the EnableExplanations provided during endpoint creation.", + "extDocId": "amazonsagemaker-invoke", + "extDocUrl": "https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_runtime_InvokeEndpoint.html", + "name": "enable_explanations", + "required": false, + "type": { + "kind": "instance_of", + "type": { + "name": "string", + "namespace": "_builtins" + } + } + }, + { + "description": "The capture data ID when enabled in the endpoint.", + "extDocId": "amazonsagemaker-invoke", + "extDocUrl": "https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_runtime_InvokeEndpoint.html", + "name": "inference_id", + "required": false, + "type": { + "kind": "instance_of", + "type": { + "name": "string", + "namespace": "_builtins" + } + } + }, + { + "description": "The stateful session identifier for a new or existing session.\nNew sessions will be returned in the `X-elastic-sagemaker-new-session-id` header.\nClosed sessions will be returned in the `X-elastic-sagemaker-closed-session-id` header.", + "extDocId": "amazonsagemaker-invoke", + "extDocUrl": "https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_runtime_InvokeEndpoint.html", + "name": "session_id", + "required": false, + "type": { + "kind": "instance_of", + "type": { + "name": "string", + "namespace": "_builtins" + } + } + }, + { + "description": "Specifies the variant when running with multi-variant Endpoints.", + "extDocId": "amazonsagemaker-invoke", + "extDocUrl": "https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_runtime_InvokeEndpoint.html", + "name": "target_variant", + "required": false, + "type": { + "kind": "instance_of", + "type": { + "name": "string", + "namespace": "_builtins" + } + } + } + ], + "specLocation": "inference/_types/CommonTypes.ts#L535-L564" + }, { "kind": "interface", "name": { @@ -163319,7 +167495,7 @@ } } ], - "specLocation": "inference/_types/CommonTypes.ts#L445-L461" + "specLocation": "inference/_types/CommonTypes.ts#L588-L604" }, { "kind": "enum", @@ -163332,7 +167508,7 @@ "name": "AnthropicServiceType", "namespace": "inference._types" }, - "specLocation": "inference/_types/CommonTypes.ts#L494-L496" + "specLocation": "inference/_types/CommonTypes.ts#L637-L639" }, { "kind": "interface", @@ -163392,7 +167568,7 @@ } } ], - "specLocation": "inference/_types/CommonTypes.ts#L463-L488" + "specLocation": "inference/_types/CommonTypes.ts#L606-L631" }, { "kind": "enum", @@ -163405,7 +167581,7 @@ "name": "AnthropicTaskType", "namespace": "inference._types" }, - "specLocation": "inference/_types/CommonTypes.ts#L490-L492" + "specLocation": "inference/_types/CommonTypes.ts#L633-L635" }, { "kind": "interface", @@ -163479,7 +167655,7 @@ } } ], - "specLocation": "inference/_types/CommonTypes.ts#L498-L540" + "specLocation": "inference/_types/CommonTypes.ts#L641-L683" }, { "kind": "enum", @@ -163492,7 +167668,7 @@ "name": "AzureAiStudioServiceType", "namespace": "inference._types" }, - "specLocation": "inference/_types/CommonTypes.ts#L577-L579" + "specLocation": "inference/_types/CommonTypes.ts#L720-L722" }, { "kind": "interface", @@ -163563,7 +167739,7 @@ } } ], - "specLocation": "inference/_types/CommonTypes.ts#L542-L570" + "specLocation": "inference/_types/CommonTypes.ts#L685-L713" }, { "kind": "enum", @@ -163579,7 +167755,7 @@ "name": "AzureAiStudioTaskType", "namespace": "inference._types" }, - "specLocation": "inference/_types/CommonTypes.ts#L572-L575" + "specLocation": "inference/_types/CommonTypes.ts#L715-L718" }, { "kind": "interface", @@ -163671,7 +167847,7 @@ } } ], - "specLocation": "inference/_types/CommonTypes.ts#L581-L626" + "specLocation": "inference/_types/CommonTypes.ts#L724-L769" }, { "kind": "enum", @@ -163684,7 +167860,7 @@ "name": "AzureOpenAIServiceType", "namespace": "inference._types" }, - "specLocation": "inference/_types/CommonTypes.ts#L641-L643" + "specLocation": "inference/_types/CommonTypes.ts#L784-L786" }, { "kind": "interface", @@ -163706,7 +167882,7 @@ } } ], - "specLocation": "inference/_types/CommonTypes.ts#L628-L634" + "specLocation": "inference/_types/CommonTypes.ts#L771-L777" }, { "kind": "enum", @@ -163722,7 +167898,7 @@ "name": "AzureOpenAITaskType", "namespace": "inference._types" }, - "specLocation": "inference/_types/CommonTypes.ts#L636-L639" + "specLocation": "inference/_types/CommonTypes.ts#L779-L782" }, { "kind": "enum", @@ -163747,7 +167923,7 @@ "name": "CohereEmbeddingType", "namespace": "inference._types" }, - "specLocation": "inference/_types/CommonTypes.ts#L700-L706" + "specLocation": "inference/_types/CommonTypes.ts#L843-L849" }, { "kind": "enum", @@ -163769,7 +167945,7 @@ "name": "CohereInputType", "namespace": "inference._types" }, - "specLocation": "inference/_types/CommonTypes.ts#L708-L713" + "specLocation": "inference/_types/CommonTypes.ts#L851-L856" }, { "kind": "interface", @@ -163842,7 +168018,7 @@ } } ], - "specLocation": "inference/_types/CommonTypes.ts#L645-L688" + "specLocation": "inference/_types/CommonTypes.ts#L788-L831" }, { "kind": "enum", @@ -163855,7 +168031,7 @@ "name": "CohereServiceType", "namespace": "inference._types" }, - "specLocation": "inference/_types/CommonTypes.ts#L696-L698" + "specLocation": "inference/_types/CommonTypes.ts#L839-L841" }, { "kind": "enum", @@ -163874,7 +168050,7 @@ "name": "CohereSimilarityType", "namespace": "inference._types" }, - "specLocation": "inference/_types/CommonTypes.ts#L715-L719" + "specLocation": "inference/_types/CommonTypes.ts#L858-L862" }, { "kind": "interface", @@ -163932,7 +168108,7 @@ } } ], - "specLocation": "inference/_types/CommonTypes.ts#L727-L759" + "specLocation": "inference/_types/CommonTypes.ts#L870-L902" }, { "kind": "enum", @@ -163951,7 +168127,7 @@ "name": "CohereTaskType", "namespace": "inference._types" }, - "specLocation": "inference/_types/CommonTypes.ts#L690-L694" + "specLocation": "inference/_types/CommonTypes.ts#L833-L837" }, { "kind": "enum", @@ -163970,7 +168146,7 @@ "name": "CohereTruncateType", "namespace": "inference._types" }, - "specLocation": "inference/_types/CommonTypes.ts#L721-L725" + "specLocation": "inference/_types/CommonTypes.ts#L864-L868" }, { "kind": "interface", @@ -164233,6 +168409,238 @@ ], "specLocation": "inference/_types/CommonTypes.ts#L123-L135" }, + { + "kind": "interface", + "name": { + "name": "CustomRequestParams", + "namespace": "inference._types" + }, + "properties": [ + { + "description": "The body structure of the request. It requires passing in the string-escaped result of the JSON format HTTP request body.\nFor example:\n```\n\"request\": \"{\\\"input\\\":${input}}\"\n```\n> info\n> The content string needs to be a single line except when using the Kibana console.", + "name": "content", + "required": true, + "type": { + "kind": "instance_of", + "type": { + "name": "string", + "namespace": "_builtins" + } + } + } + ], + "specLocation": "inference/_types/CommonTypes.ts#L974-L985" + }, + { + "kind": "interface", + "name": { + "name": "CustomResponseParams", + "namespace": "inference._types" + }, + "properties": [ + { + "description": "Specifies the JSON parser that is used to parse the response from the custom service.\nDifferent task types require different json_parser parameters.\nFor example:\n```\n# text_embedding\n# For a response like this:\n\n{\n \"object\": \"list\",\n \"data\": [\n {\n \"object\": \"embedding\",\n \"index\": 0,\n \"embedding\": [\n 0.014539449,\n -0.015288644\n ]\n }\n ],\n \"model\": \"text-embedding-ada-002-v2\",\n \"usage\": {\n \"prompt_tokens\": 8,\n \"total_tokens\": 8\n }\n}\n\n# the json_parser definition should look like this:\n\n\"response\":{\n \"json_parser\":{\n \"text_embeddings\":\"$.data[*].embedding[*]\"\n }\n}\n\n# sparse_embedding\n# For a response like this:\n\n{\n \"request_id\": \"75C50B5B-E79E-4930-****-F48DBB392231\",\n \"latency\": 22,\n \"usage\": {\n \"token_count\": 11\n },\n \"result\": {\n \"sparse_embeddings\": [\n {\n \"index\": 0,\n \"embedding\": [\n {\n \"token_id\": 6,\n \"weight\": 0.101\n },\n {\n \"token_id\": 163040,\n \"weight\": 0.28417\n }\n ]\n }\n ]\n }\n}\n\n# the json_parser definition should look like this:\n\n\"response\":{\n \"json_parser\":{\n \"token_path\":\"$.result.sparse_embeddings[*].embedding[*].token_id\",\n \"weight_path\":\"$.result.sparse_embeddings[*].embedding[*].weight\"\n }\n}\n\n# rerank\n# For a response like this:\n\n{\n \"results\": [\n {\n \"index\": 3,\n \"relevance_score\": 0.999071,\n \"document\": \"abc\"\n },\n {\n \"index\": 4,\n \"relevance_score\": 0.7867867,\n \"document\": \"123\"\n },\n {\n \"index\": 0,\n \"relevance_score\": 0.32713068,\n \"document\": \"super\"\n }\n ],\n}\n\n# the json_parser definition should look like this:\n\n\"response\":{\n \"json_parser\":{\n \"reranked_index\":\"$.result.scores[*].index\", // optional\n \"relevance_score\":\"$.result.scores[*].score\",\n \"document_text\":\"xxx\" // optional\n }\n}\n\n# completion\n# For a response like this:\n\n{\n \"id\": \"chatcmpl-B9MBs8CjcvOU2jLn4n570S5qMJKcT\",\n \"object\": \"chat.completion\",\n \"created\": 1741569952,\n \"model\": \"gpt-4.1-2025-04-14\",\n \"choices\": [\n {\n \"index\": 0,\n \"message\": {\n \"role\": \"assistant\",\n \"content\": \"Hello! How can I assist you today?\",\n \"refusal\": null,\n \"annotations\": []\n },\n \"logprobs\": null,\n \"finish_reason\": \"stop\"\n }\n ]\n}\n\n# the json_parser definition should look like this:\n\n\"response\":{\n \"json_parser\":{\n \"completion_result\":\"$.choices[*].message.content\"\n }\n}", + "name": "json_parser", + "required": true, + "type": { + "kind": "user_defined_value" + } + } + ], + "specLocation": "inference/_types/CommonTypes.ts#L987-L1125" + }, + { + "kind": "interface", + "name": { + "name": "CustomServiceSettings", + "namespace": "inference._types" + }, + "properties": [ + { + "description": "Specifies the HTTPS header parameters – such as `Authentication` or `Contet-Type` – that are required to access the custom service.\nFor example:\n```\n\"headers\":{\n \"Authorization\": \"Bearer ${api_key}\",\n \"Content-Type\": \"application/json;charset=utf-8\"\n}\n```", + "name": "headers", + "required": false, + "type": { + "kind": "user_defined_value" + } + }, + { + "description": "Specifies the input type translation values that are used to replace the `${input_type}` template in the request body.\nFor example:\n```\n\"input_type\": {\n \"translation\": {\n \"ingest\": \"do_ingest\",\n \"search\": \"do_search\"\n },\n \"default\": \"a_default\"\n},\n```\nIf the subsequent inference requests come from a search context, the `search` key will be used and the template will be replaced with `do_search`.\nIf it comes from the ingest context `do_ingest` is used. If it's a different context that is not specified, the default value will be used. If no default is specified an empty string is used.\n`translation` can be:\n* `classification`\n* `clustering`\n* `ingest`\n* `search`", + "name": "input_type", + "required": false, + "type": { + "kind": "user_defined_value" + } + }, + { + "description": "Specifies the query parameters as a list of tuples. The arrays inside the `query_parameters` must have two items, a key and a value.\nFor example:\n```\n\"query_parameters\":[\n [\"param_key\", \"some_value\"],\n [\"param_key\", \"another_value\"],\n [\"other_key\", \"other_value\"]\n]\n```\nIf the base url is `https://www.elastic.co` it results in: `https://www.elastic.co?param_key=some_value¶m_key=another_value&other_key=other_value`.", + "name": "query_parameters", + "required": false, + "type": { + "kind": "user_defined_value" + } + }, + { + "description": "The request configuration object.", + "name": "request", + "required": true, + "type": { + "kind": "instance_of", + "type": { + "name": "CustomRequestParams", + "namespace": "inference._types" + } + } + }, + { + "description": "The response configuration object.", + "name": "response", + "required": true, + "type": { + "kind": "instance_of", + "type": { + "name": "CustomResponseParams", + "namespace": "inference._types" + } + } + }, + { + "description": "Specifies secret parameters, like `api_key` or `api_token`, that are required to access the custom service.\nFor example:\n```\n\"secret_parameters\":{\n \"api_key\":\"\"\n}\n```", + "name": "secret_parameters", + "required": true, + "type": { + "kind": "user_defined_value" + } + }, + { + "description": "The URL endpoint to use for the requests.", + "name": "url", + "required": false, + "type": { + "kind": "instance_of", + "type": { + "name": "string", + "namespace": "_builtins" + } + } + } + ], + "specLocation": "inference/_types/CommonTypes.ts#L904-L972" + }, + { + "kind": "enum", + "members": [ + { + "name": "custom" + } + ], + "name": { + "name": "CustomServiceType", + "namespace": "inference._types" + }, + "specLocation": "inference/_types/CommonTypes.ts#L1134-L1136" + }, + { + "kind": "interface", + "name": { + "name": "CustomTaskSettings", + "namespace": "inference._types" + }, + "properties": [ + { + "description": "Specifies parameters that are required to run the custom service. The parameters depend on the model your custom service uses.\nFor example:\n```\n\"task_settings\":{\n \"parameters\":{\n \"input_type\":\"query\",\n \"return_token\":true\n }\n}\n```", + "name": "parameters", + "required": false, + "type": { + "kind": "user_defined_value" + } + } + ], + "specLocation": "inference/_types/CommonTypes.ts#L1138-L1152" + }, + { + "kind": "enum", + "members": [ + { + "name": "text_embedding" + }, + { + "name": "sparse_embedding" + }, + { + "name": "rerank" + }, + { + "name": "completion" + } + ], + "name": { + "name": "CustomTaskType", + "namespace": "inference._types" + }, + "specLocation": "inference/_types/CommonTypes.ts#L1127-L1132" + }, + { + "kind": "interface", + "name": { + "name": "DeepSeekServiceSettings", + "namespace": "inference._types" + }, + "properties": [ + { + "description": "A valid API key for your DeepSeek account.\nYou can find or create your DeepSeek API keys on the DeepSeek API key page.\n\nIMPORTANT: You need to provide the API key only once, during the inference model creation.\nThe get inference endpoint API does not retrieve your API key.\nAfter creating the inference model, you cannot change the associated API key.\nIf you want to use a different API key, delete the inference model and recreate it with the same name and the updated API key.", + "extDocId": "deepseek-api-keys", + "extDocUrl": "https://api-docs.deepseek.com/", + "name": "api_key", + "required": true, + "type": { + "kind": "instance_of", + "type": { + "name": "string", + "namespace": "_builtins" + } + } + }, + { + "description": "For a `completion` or `chat_completion` task, the name of the model to use for the inference task.\n\nFor the available `completion` and `chat_completion` models, refer to the [DeepSeek Models & Pricing docs](https://api-docs.deepseek.com/quick_start/pricing).", + "name": "model_id", + "required": true, + "type": { + "kind": "instance_of", + "type": { + "name": "string", + "namespace": "_builtins" + } + } + }, + { + "description": "The URL endpoint to use for the requests. Defaults to `https://api.deepseek.com/chat/completions`.", + "name": "url", + "required": false, + "type": { + "kind": "instance_of", + "type": { + "name": "string", + "namespace": "_builtins" + } + } + } + ], + "specLocation": "inference/_types/CommonTypes.ts#L1166-L1188" + }, + { + "kind": "enum", + "members": [ + { + "name": "deepseek" + } + ], + "name": { + "name": "DeepSeekServiceType", + "namespace": "inference._types" + }, + "specLocation": "inference/_types/CommonTypes.ts#L1190-L1192" + }, { "kind": "interface", "description": "Acknowledged response. For dry_run, contains the list of pipelines which reference the inference endpoint", @@ -164372,7 +168780,7 @@ } } ], - "specLocation": "inference/_types/CommonTypes.ts#L781-L815" + "specLocation": "inference/_types/CommonTypes.ts#L1215-L1249" }, { "kind": "enum", @@ -164385,7 +168793,7 @@ "name": "ElasticsearchServiceType", "namespace": "inference._types" }, - "specLocation": "inference/_types/CommonTypes.ts#L831-L833" + "specLocation": "inference/_types/CommonTypes.ts#L1265-L1267" }, { "kind": "interface", @@ -164408,7 +168816,7 @@ } } ], - "specLocation": "inference/_types/CommonTypes.ts#L817-L823" + "specLocation": "inference/_types/CommonTypes.ts#L1251-L1257" }, { "kind": "enum", @@ -164427,7 +168835,7 @@ "name": "ElasticsearchTaskType", "namespace": "inference._types" }, - "specLocation": "inference/_types/CommonTypes.ts#L825-L829" + "specLocation": "inference/_types/CommonTypes.ts#L1259-L1263" }, { "kind": "interface", @@ -164473,7 +168881,7 @@ } } ], - "specLocation": "inference/_types/CommonTypes.ts#L835-L861" + "specLocation": "inference/_types/CommonTypes.ts#L1269-L1295" }, { "kind": "enum", @@ -164486,7 +168894,7 @@ "name": "ElserServiceType", "namespace": "inference._types" }, - "specLocation": "inference/_types/CommonTypes.ts#L867-L869" + "specLocation": "inference/_types/CommonTypes.ts#L1301-L1303" }, { "kind": "enum", @@ -164499,7 +168907,7 @@ "name": "ElserTaskType", "namespace": "inference._types" }, - "specLocation": "inference/_types/CommonTypes.ts#L863-L865" + "specLocation": "inference/_types/CommonTypes.ts#L1297-L1299" }, { "kind": "enum", @@ -164512,7 +168920,7 @@ "name": "GoogleAiServiceType", "namespace": "inference._types" }, - "specLocation": "inference/_types/CommonTypes.ts#L894-L896" + "specLocation": "inference/_types/CommonTypes.ts#L1328-L1330" }, { "kind": "interface", @@ -164560,7 +168968,7 @@ } } ], - "specLocation": "inference/_types/CommonTypes.ts#L871-L887" + "specLocation": "inference/_types/CommonTypes.ts#L1305-L1321" }, { "kind": "enum", @@ -164576,7 +168984,7 @@ "name": "GoogleAiStudioTaskType", "namespace": "inference._types" }, - "specLocation": "inference/_types/CommonTypes.ts#L889-L892" + "specLocation": "inference/_types/CommonTypes.ts#L1323-L1326" }, { "kind": "interface", @@ -164650,7 +169058,7 @@ } } ], - "specLocation": "inference/_types/CommonTypes.ts#L898-L924" + "specLocation": "inference/_types/CommonTypes.ts#L1332-L1358" }, { "kind": "enum", @@ -164663,7 +169071,7 @@ "name": "GoogleVertexAIServiceType", "namespace": "inference._types" }, - "specLocation": "inference/_types/CommonTypes.ts#L944-L946" + "specLocation": "inference/_types/CommonTypes.ts#L1378-L1380" }, { "kind": "interface", @@ -164697,7 +169105,7 @@ } } ], - "specLocation": "inference/_types/CommonTypes.ts#L926-L935" + "specLocation": "inference/_types/CommonTypes.ts#L1360-L1369" }, { "kind": "enum", @@ -164719,7 +169127,7 @@ "name": "GoogleVertexAITaskType", "namespace": "inference._types" }, - "specLocation": "inference/_types/CommonTypes.ts#L937-L942" + "specLocation": "inference/_types/CommonTypes.ts#L1371-L1376" }, { "kind": "interface", @@ -164781,7 +169189,7 @@ } } ], - "specLocation": "inference/_types/CommonTypes.ts#L948-L980" + "specLocation": "inference/_types/CommonTypes.ts#L1382-L1414" }, { "kind": "enum", @@ -164794,7 +169202,7 @@ "name": "HuggingFaceServiceType", "namespace": "inference._types" }, - "specLocation": "inference/_types/CommonTypes.ts#L1001-L1003" + "specLocation": "inference/_types/CommonTypes.ts#L1435-L1437" }, { "kind": "interface", @@ -164828,7 +169236,7 @@ } } ], - "specLocation": "inference/_types/CommonTypes.ts#L982-L992" + "specLocation": "inference/_types/CommonTypes.ts#L1416-L1426" }, { "kind": "enum", @@ -164850,7 +169258,7 @@ "name": "HuggingFaceTaskType", "namespace": "inference._types" }, - "specLocation": "inference/_types/CommonTypes.ts#L994-L999" + "specLocation": "inference/_types/CommonTypes.ts#L1428-L1433" }, { "kind": "interface", @@ -164913,7 +169321,7 @@ } } ], - "specLocation": "inference/_types/Services.ts#L254-L283" + "specLocation": "inference/_types/Services.ts#L288-L317" }, { "kind": "interface", @@ -164972,7 +169380,7 @@ } } ], - "specLocation": "inference/_types/Services.ts#L42-L62" + "specLocation": "inference/_types/Services.ts#L45-L65" }, { "kind": "interface", @@ -165013,7 +169421,7 @@ } } ], - "specLocation": "inference/_types/Services.ts#L64-L76" + "specLocation": "inference/_types/Services.ts#L67-L79" }, { "kind": "interface", @@ -165053,7 +169461,7 @@ } } ], - "specLocation": "inference/_types/Services.ts#L89-L98" + "specLocation": "inference/_types/Services.ts#L80-L89" }, { "kind": "interface", @@ -165093,7 +169501,47 @@ } } ], - "specLocation": "inference/_types/Services.ts#L100-L109" + "specLocation": "inference/_types/Services.ts#L91-L100" + }, + { + "kind": "interface", + "inherits": { + "type": { + "name": "InferenceEndpoint", + "namespace": "inference._types" + } + }, + "name": { + "name": "InferenceEndpointInfoAmazonSageMaker", + "namespace": "inference._types" + }, + "properties": [ + { + "description": "The inference Id", + "name": "inference_id", + "required": true, + "type": { + "kind": "instance_of", + "type": { + "name": "string", + "namespace": "_builtins" + } + } + }, + { + "description": "The task type", + "name": "task_type", + "required": true, + "type": { + "kind": "instance_of", + "type": { + "name": "TaskTypeAmazonSageMaker", + "namespace": "inference._types" + } + } + } + ], + "specLocation": "inference/_types/Services.ts#L102-L111" }, { "kind": "interface", @@ -165133,7 +169581,7 @@ } } ], - "specLocation": "inference/_types/Services.ts#L111-L120" + "specLocation": "inference/_types/Services.ts#L113-L122" }, { "kind": "interface", @@ -165173,7 +169621,7 @@ } } ], - "specLocation": "inference/_types/Services.ts#L122-L131" + "specLocation": "inference/_types/Services.ts#L124-L133" }, { "kind": "interface", @@ -165213,7 +169661,7 @@ } } ], - "specLocation": "inference/_types/Services.ts#L133-L142" + "specLocation": "inference/_types/Services.ts#L135-L144" }, { "kind": "interface", @@ -165253,7 +169701,87 @@ } } ], - "specLocation": "inference/_types/Services.ts#L144-L153" + "specLocation": "inference/_types/Services.ts#L146-L155" + }, + { + "kind": "interface", + "inherits": { + "type": { + "name": "InferenceEndpoint", + "namespace": "inference._types" + } + }, + "name": { + "name": "InferenceEndpointInfoCustom", + "namespace": "inference._types" + }, + "properties": [ + { + "description": "The inference Id", + "name": "inference_id", + "required": true, + "type": { + "kind": "instance_of", + "type": { + "name": "string", + "namespace": "_builtins" + } + } + }, + { + "description": "The task type", + "name": "task_type", + "required": true, + "type": { + "kind": "instance_of", + "type": { + "name": "TaskTypeCustom", + "namespace": "inference._types" + } + } + } + ], + "specLocation": "inference/_types/Services.ts#L157-L166" + }, + { + "kind": "interface", + "inherits": { + "type": { + "name": "InferenceEndpoint", + "namespace": "inference._types" + } + }, + "name": { + "name": "InferenceEndpointInfoDeepSeek", + "namespace": "inference._types" + }, + "properties": [ + { + "description": "The inference Id", + "name": "inference_id", + "required": true, + "type": { + "kind": "instance_of", + "type": { + "name": "string", + "namespace": "_builtins" + } + } + }, + { + "description": "The task type", + "name": "task_type", + "required": true, + "type": { + "kind": "instance_of", + "type": { + "name": "TaskTypeDeepSeek", + "namespace": "inference._types" + } + } + } + ], + "specLocation": "inference/_types/Services.ts#L167-L176" }, { "kind": "interface", @@ -165293,7 +169821,7 @@ } } ], - "specLocation": "inference/_types/Services.ts#L166-L175" + "specLocation": "inference/_types/Services.ts#L189-L198" }, { "kind": "interface", @@ -165333,7 +169861,7 @@ } } ], - "specLocation": "inference/_types/Services.ts#L155-L164" + "specLocation": "inference/_types/Services.ts#L178-L187" }, { "kind": "interface", @@ -165373,7 +169901,7 @@ } } ], - "specLocation": "inference/_types/Services.ts#L177-L186" + "specLocation": "inference/_types/Services.ts#L200-L209" }, { "kind": "interface", @@ -165413,7 +169941,7 @@ } } ], - "specLocation": "inference/_types/Services.ts#L188-L197" + "specLocation": "inference/_types/Services.ts#L211-L220" }, { "kind": "interface", @@ -165453,7 +169981,7 @@ } } ], - "specLocation": "inference/_types/Services.ts#L199-L208" + "specLocation": "inference/_types/Services.ts#L222-L231" }, { "kind": "interface", @@ -165493,7 +170021,7 @@ } } ], - "specLocation": "inference/_types/Services.ts#L78-L87" + "specLocation": "inference/_types/Services.ts#L233-L242" }, { "kind": "interface", @@ -165533,7 +170061,7 @@ } } ], - "specLocation": "inference/_types/Services.ts#L210-L219" + "specLocation": "inference/_types/Services.ts#L244-L253" }, { "kind": "interface", @@ -165573,7 +170101,7 @@ } } ], - "specLocation": "inference/_types/Services.ts#L221-L230" + "specLocation": "inference/_types/Services.ts#L255-L264" }, { "kind": "interface", @@ -165613,7 +170141,7 @@ } } ], - "specLocation": "inference/_types/Services.ts#L232-L241" + "specLocation": "inference/_types/Services.ts#L266-L275" }, { "kind": "interface", @@ -165653,7 +170181,7 @@ } } ], - "specLocation": "inference/_types/Services.ts#L243-L252" + "specLocation": "inference/_types/Services.ts#L277-L286" }, { "kind": "interface", @@ -165813,7 +170341,7 @@ } } ], - "specLocation": "inference/_types/CommonTypes.ts#L1005-L1034" + "specLocation": "inference/_types/CommonTypes.ts#L1439-L1468" }, { "kind": "enum", @@ -165826,7 +170354,7 @@ "name": "JinaAIServiceType", "namespace": "inference._types" }, - "specLocation": "inference/_types/CommonTypes.ts#L1064-L1066" + "specLocation": "inference/_types/CommonTypes.ts#L1498-L1500" }, { "kind": "enum", @@ -165845,7 +170373,7 @@ "name": "JinaAISimilarityType", "namespace": "inference._types" }, - "specLocation": "inference/_types/CommonTypes.ts#L1068-L1072" + "specLocation": "inference/_types/CommonTypes.ts#L1502-L1506" }, { "kind": "interface", @@ -165891,7 +170419,7 @@ } } ], - "specLocation": "inference/_types/CommonTypes.ts#L1036-L1057" + "specLocation": "inference/_types/CommonTypes.ts#L1470-L1491" }, { "kind": "enum", @@ -165907,7 +170435,7 @@ "name": "JinaAITaskType", "namespace": "inference._types" }, - "specLocation": "inference/_types/CommonTypes.ts#L1059-L1062" + "specLocation": "inference/_types/CommonTypes.ts#L1493-L1496" }, { "kind": "enum", @@ -165929,7 +170457,7 @@ "name": "JinaAITextEmbeddingTask", "namespace": "inference._types" }, - "specLocation": "inference/_types/CommonTypes.ts#L1074-L1079" + "specLocation": "inference/_types/CommonTypes.ts#L1508-L1513" }, { "kind": "interface", @@ -166087,7 +170615,7 @@ } } ], - "specLocation": "inference/_types/CommonTypes.ts#L1081-L1108" + "specLocation": "inference/_types/CommonTypes.ts#L1515-L1542" }, { "kind": "enum", @@ -166100,7 +170628,7 @@ "name": "MistralServiceType", "namespace": "inference._types" }, - "specLocation": "inference/_types/CommonTypes.ts#L1116-L1118" + "specLocation": "inference/_types/CommonTypes.ts#L1550-L1552" }, { "kind": "enum", @@ -166119,7 +170647,7 @@ "name": "MistralTaskType", "namespace": "inference._types" }, - "specLocation": "inference/_types/CommonTypes.ts#L1110-L1114" + "specLocation": "inference/_types/CommonTypes.ts#L1544-L1548" }, { "kind": "interface", @@ -166206,7 +170734,7 @@ } } ], - "specLocation": "inference/_types/CommonTypes.ts#L1120-L1162" + "specLocation": "inference/_types/CommonTypes.ts#L1554-L1596" }, { "kind": "enum", @@ -166219,7 +170747,7 @@ "name": "OpenAIServiceType", "namespace": "inference._types" }, - "specLocation": "inference/_types/CommonTypes.ts#L1178-L1180" + "specLocation": "inference/_types/CommonTypes.ts#L1612-L1614" }, { "kind": "interface", @@ -166241,7 +170769,7 @@ } } ], - "specLocation": "inference/_types/CommonTypes.ts#L1164-L1170" + "specLocation": "inference/_types/CommonTypes.ts#L1598-L1604" }, { "kind": "enum", @@ -166260,7 +170788,7 @@ "name": "OpenAITaskType", "namespace": "inference._types" }, - "specLocation": "inference/_types/CommonTypes.ts#L1172-L1176" + "specLocation": "inference/_types/CommonTypes.ts#L1606-L1610" }, { "kind": "interface", @@ -166327,7 +170855,7 @@ } } ], - "specLocation": "inference/_types/Services.ts#L289-L315" + "specLocation": "inference/_types/Services.ts#L323-L349" }, { "kind": "interface", @@ -166475,7 +171003,7 @@ "name": "ServiceSettings", "namespace": "inference._types" }, - "specLocation": "inference/_types/Services.ts#L285-L285", + "specLocation": "inference/_types/Services.ts#L319-L319", "type": { "kind": "user_defined_value" } @@ -166559,7 +171087,7 @@ "name": "TaskSettings", "namespace": "inference._types" }, - "specLocation": "inference/_types/Services.ts#L287-L287", + "specLocation": "inference/_types/Services.ts#L321-L321", "type": { "kind": "user_defined_value" } @@ -166627,6 +171155,31 @@ }, "specLocation": "inference/_types/TaskType.ts#L43-L46" }, + { + "kind": "enum", + "members": [ + { + "name": "text_embedding" + }, + { + "name": "completion" + }, + { + "name": "chat_completion" + }, + { + "name": "sparse_embedding" + }, + { + "name": "rerank" + } + ], + "name": { + "name": "TaskTypeAmazonSageMaker", + "namespace": "inference._types" + }, + "specLocation": "inference/_types/TaskType.ts#L48-L54" + }, { "kind": "enum", "members": [ @@ -166638,7 +171191,7 @@ "name": "TaskTypeAnthropic", "namespace": "inference._types" }, - "specLocation": "inference/_types/TaskType.ts#L48-L50" + "specLocation": "inference/_types/TaskType.ts#L56-L58" }, { "kind": "enum", @@ -166654,7 +171207,7 @@ "name": "TaskTypeAzureAIStudio", "namespace": "inference._types" }, - "specLocation": "inference/_types/TaskType.ts#L52-L55" + "specLocation": "inference/_types/TaskType.ts#L60-L63" }, { "kind": "enum", @@ -166670,7 +171223,7 @@ "name": "TaskTypeAzureOpenAI", "namespace": "inference._types" }, - "specLocation": "inference/_types/TaskType.ts#L57-L60" + "specLocation": "inference/_types/TaskType.ts#L65-L68" }, { "kind": "enum", @@ -166689,7 +171242,45 @@ "name": "TaskTypeCohere", "namespace": "inference._types" }, - "specLocation": "inference/_types/TaskType.ts#L62-L66" + "specLocation": "inference/_types/TaskType.ts#L70-L74" + }, + { + "kind": "enum", + "members": [ + { + "name": "text_embedding" + }, + { + "name": "sparse_embedding" + }, + { + "name": "rerank" + }, + { + "name": "completion" + } + ], + "name": { + "name": "TaskTypeCustom", + "namespace": "inference._types" + }, + "specLocation": "inference/_types/TaskType.ts#L76-L81" + }, + { + "kind": "enum", + "members": [ + { + "name": "completion" + }, + { + "name": "chat_completion" + } + ], + "name": { + "name": "TaskTypeDeepSeek", + "namespace": "inference._types" + }, + "specLocation": "inference/_types/TaskType.ts#L83-L86" }, { "kind": "enum", @@ -166702,7 +171293,7 @@ "name": "TaskTypeELSER", "namespace": "inference._types" }, - "specLocation": "inference/_types/TaskType.ts#L74-L76" + "specLocation": "inference/_types/TaskType.ts#L94-L96" }, { "kind": "enum", @@ -166721,7 +171312,7 @@ "name": "TaskTypeElasticsearch", "namespace": "inference._types" }, - "specLocation": "inference/_types/TaskType.ts#L68-L72" + "specLocation": "inference/_types/TaskType.ts#L88-L92" }, { "kind": "enum", @@ -166737,7 +171328,7 @@ "name": "TaskTypeGoogleAIStudio", "namespace": "inference._types" }, - "specLocation": "inference/_types/TaskType.ts#L78-L81" + "specLocation": "inference/_types/TaskType.ts#L98-L101" }, { "kind": "enum", @@ -166753,7 +171344,7 @@ "name": "TaskTypeGoogleVertexAI", "namespace": "inference._types" }, - "specLocation": "inference/_types/TaskType.ts#L83-L86" + "specLocation": "inference/_types/TaskType.ts#L103-L106" }, { "kind": "enum", @@ -166775,7 +171366,7 @@ "name": "TaskTypeHuggingFace", "namespace": "inference._types" }, - "specLocation": "inference/_types/TaskType.ts#L88-L93" + "specLocation": "inference/_types/TaskType.ts#L108-L113" }, { "kind": "enum", @@ -166810,7 +171401,7 @@ "name": "TaskTypeMistral", "namespace": "inference._types" }, - "specLocation": "inference/_types/TaskType.ts#L95-L99" + "specLocation": "inference/_types/TaskType.ts#L115-L119" }, { "kind": "enum", @@ -166829,7 +171420,7 @@ "name": "TaskTypeOpenAI", "namespace": "inference._types" }, - "specLocation": "inference/_types/TaskType.ts#L101-L105" + "specLocation": "inference/_types/TaskType.ts#L121-L125" }, { "kind": "enum", @@ -166845,7 +171436,7 @@ "name": "TaskTypeVoyageAI", "namespace": "inference._types" }, - "specLocation": "inference/_types/TaskType.ts#L107-L110" + "specLocation": "inference/_types/TaskType.ts#L127-L130" }, { "kind": "enum", @@ -166864,7 +171455,7 @@ "name": "TaskTypeWatsonx", "namespace": "inference._types" }, - "specLocation": "inference/_types/TaskType.ts#L112-L116" + "specLocation": "inference/_types/TaskType.ts#L132-L136" }, { "kind": "interface", @@ -167110,7 +171701,7 @@ } } ], - "specLocation": "inference/_types/CommonTypes.ts#L1182-L1213" + "specLocation": "inference/_types/CommonTypes.ts#L1616-L1647" }, { "kind": "enum", @@ -167123,7 +171714,7 @@ "name": "VoyageAIServiceType", "namespace": "inference._types" }, - "specLocation": "inference/_types/CommonTypes.ts#L1246-L1248" + "specLocation": "inference/_types/CommonTypes.ts#L1680-L1682" }, { "kind": "interface", @@ -167183,7 +171774,7 @@ } } ], - "specLocation": "inference/_types/CommonTypes.ts#L1215-L1239" + "specLocation": "inference/_types/CommonTypes.ts#L1649-L1673" }, { "kind": "enum", @@ -167199,7 +171790,7 @@ "name": "VoyageAITaskType", "namespace": "inference._types" }, - "specLocation": "inference/_types/CommonTypes.ts#L1241-L1244" + "specLocation": "inference/_types/CommonTypes.ts#L1675-L1678" }, { "kind": "interface", @@ -167287,7 +171878,7 @@ } } ], - "specLocation": "inference/_types/CommonTypes.ts#L1250-L1288" + "specLocation": "inference/_types/CommonTypes.ts#L1684-L1722" }, { "kind": "enum", @@ -167300,7 +171891,7 @@ "name": "WatsonxServiceType", "namespace": "inference._types" }, - "specLocation": "inference/_types/CommonTypes.ts#L1296-L1298" + "specLocation": "inference/_types/CommonTypes.ts#L1730-L1732" }, { "kind": "enum", @@ -167319,7 +171910,7 @@ "name": "WatsonxTaskType", "namespace": "inference._types" }, - "specLocation": "inference/_types/CommonTypes.ts#L1290-L1294" + "specLocation": "inference/_types/CommonTypes.ts#L1724-L1728" }, { "kind": "request", @@ -167931,6 +172522,18 @@ ] } }, + { + "description": "Specifies the input data type for the text embedding model. The `input_type` parameter only applies to Inference Endpoints with the `text_embedding` task type. Possible values include:\n* `SEARCH`\n* `INGEST`\n* `CLASSIFICATION`\n* `CLUSTERING`\nNot all services support all values. Unsupported values will trigger a validation exception.\nAccepted values depend on the configured inference service, refer to the relevant service-specific documentation for more info.\n\n> info\n> The `input_type` parameter specified on the root level of the request body will take precedence over the `input_type` parameter specified in `task_settings`.", + "name": "input_type", + "required": false, + "type": { + "kind": "instance_of", + "type": { + "name": "string", + "namespace": "_builtins" + } + } + }, { "description": "Task settings for the individual inference request.\nThese settings are specific to the task type you specified and override the task settings specified when initializing the service.", "name": "task_settings", @@ -167997,7 +172600,7 @@ } } ], - "specLocation": "inference/inference/InferenceRequest.ts#L26-L91" + "specLocation": "inference/inference/InferenceRequest.ts#L26-L104" }, { "kind": "response", @@ -168034,7 +172637,7 @@ } } }, - "description": "Create an inference endpoint.\n\nIMPORTANT: The inference APIs enable you to use certain services, such as built-in machine learning models (ELSER, E5), models uploaded through Eland, Cohere, OpenAI, Mistral, Azure OpenAI, Google AI Studio, Google Vertex AI, Anthropic, Watsonx.ai, or Hugging Face.\nFor built-in models and models uploaded through Eland, the inference APIs offer an alternative way to use and manage trained models.\nHowever, if you do not plan to use the inference APIs to use these models or if you want to use non-NLP models, use the machine learning trained model APIs.\n\nThe following integrations are available through the inference API. You can find the available task types next to the integration name:\n* AlibabaCloud AI Search (`completion`, `rerank`, `sparse_embedding`, `text_embedding`)\n* Amazon Bedrock (`completion`, `text_embedding`)\n* Anthropic (`completion`)\n* Azure AI Studio (`completion`, `text_embedding`)\n* Azure OpenAI (`completion`, `text_embedding`)\n* Cohere (`completion`, `rerank`, `text_embedding`)\n* Elasticsearch (`rerank`, `sparse_embedding`, `text_embedding` - this service is for built-in models and models uploaded through Eland)\n* ELSER (`sparse_embedding`)\n* Google AI Studio (`completion`, `text_embedding`)\n* Google Vertex AI (`rerank`, `text_embedding`)\n* Hugging Face (`chat_completion`, `completion`, `rerank`, `text_embedding`)\n* Mistral (`chat_completion`, `completion`, `text_embedding`)\n* OpenAI (`chat_completion`, `completion`, `text_embedding`)\n* VoyageAI (`text_embedding`, `rerank`)\n* Watsonx inference integration (`text_embedding`)\n* JinaAI (`text_embedding`, `rerank`)", + "description": "Create an inference endpoint.\n\nIMPORTANT: The inference APIs enable you to use certain services, such as built-in machine learning models (ELSER, E5), models uploaded through Eland, Cohere, OpenAI, Mistral, Azure OpenAI, Google AI Studio, Google Vertex AI, Anthropic, Watsonx.ai, or Hugging Face.\nFor built-in models and models uploaded through Eland, the inference APIs offer an alternative way to use and manage trained models.\nHowever, if you do not plan to use the inference APIs to use these models or if you want to use non-NLP models, use the machine learning trained model APIs.\n\nThe following integrations are available through the inference API. You can find the available task types next to the integration name:\n* AlibabaCloud AI Search (`completion`, `rerank`, `sparse_embedding`, `text_embedding`)\n* Amazon Bedrock (`completion`, `text_embedding`)\n* Amazon SageMaker (`chat_completion`, `completion`, `rerank`, `sparse_embedding`, `text_embedding`)\n* Anthropic (`completion`)\n* Azure AI Studio (`completion`, `text_embedding`)\n* Azure OpenAI (`completion`, `text_embedding`)\n* Cohere (`completion`, `rerank`, `text_embedding`)\n* DeepSeek (`completion`, `chat_completion`)\n* Elasticsearch (`rerank`, `sparse_embedding`, `text_embedding` - this service is for built-in models and models uploaded through Eland)\n* ELSER (`sparse_embedding`)\n* Google AI Studio (`completion`, `text_embedding`)\n* Google Vertex AI (`rerank`, `text_embedding`)\n* Hugging Face (`chat_completion`, `completion`, `rerank`, `text_embedding`)\n* Mistral (`chat_completion`, `completion`, `text_embedding`)\n* OpenAI (`chat_completion`, `completion`, `text_embedding`)\n* VoyageAI (`text_embedding`, `rerank`)\n* Watsonx inference integration (`text_embedding`)\n* JinaAI (`text_embedding`, `rerank`)", "examples": { "InferencePutExample1": { "alternatives": [ @@ -168104,8 +172707,22 @@ } } ], - "query": [], - "specLocation": "inference/put/PutRequest.ts#L25-L78" + "query": [ + { + "description": "Specifies the amount of time to wait for the inference endpoint to be created.", + "name": "timeout", + "required": false, + "serverDefault": "30s", + "type": { + "kind": "instance_of", + "type": { + "name": "Duration", + "namespace": "_types" + } + } + } + ], + "specLocation": "inference/put/PutRequest.ts#L26-L88" }, { "kind": "response", @@ -168353,8 +172970,22 @@ } } ], - "query": [], - "specLocation": "inference/put_alibabacloud/PutAlibabaCloudRequest.ts#L30-L77" + "query": [ + { + "description": "Specifies the amount of time to wait for the inference endpoint to be created.", + "name": "timeout", + "required": false, + "serverDefault": "30s", + "type": { + "kind": "instance_of", + "type": { + "name": "Duration", + "namespace": "_types" + } + } + } + ], + "specLocation": "inference/put_alibabacloud/PutAlibabaCloudRequest.ts#L31-L85" }, { "kind": "response", @@ -168538,8 +173169,22 @@ } } ], - "query": [], - "specLocation": "inference/put_amazonbedrock/PutAmazonBedrockRequest.ts#L30-L80" + "query": [ + { + "description": "Specifies the amount of time to wait for the inference endpoint to be created.", + "name": "timeout", + "required": false, + "serverDefault": "30s", + "type": { + "kind": "instance_of", + "type": { + "name": "Duration", + "namespace": "_types" + } + } + } + ], + "specLocation": "inference/put_amazonbedrock/PutAmazonBedrockRequest.ts#L31-L88" }, { "kind": "response", @@ -168560,6 +173205,139 @@ }, "specLocation": "inference/put_amazonbedrock/PutAmazonBedrockResponse.ts#L22-L25" }, + { + "kind": "request", + "attachedBehaviors": [ + "CommonQueryParameters" + ], + "body": { + "kind": "properties", + "properties": [ + { + "description": "The chunking configuration object.", + "extDocId": "inference-chunking", + "extDocUrl": "https://www.elastic.co/docs/explore-analyze/elastic-inference/inference-api#infer-chunking-config", + "name": "chunking_settings", + "required": false, + "type": { + "kind": "instance_of", + "type": { + "name": "InferenceChunkingSettings", + "namespace": "inference._types" + } + } + }, + { + "description": "The type of service supported for the specified task type. In this case, `amazon_sagemaker`.", + "name": "service", + "required": true, + "type": { + "kind": "instance_of", + "type": { + "name": "AmazonSageMakerServiceType", + "namespace": "inference._types" + } + } + }, + { + "description": "Settings used to install the inference model.\nThese settings are specific to the `amazon_sagemaker` service and `service_settings.api` you specified.", + "name": "service_settings", + "required": true, + "type": { + "kind": "instance_of", + "type": { + "name": "AmazonSageMakerServiceSettings", + "namespace": "inference._types" + } + } + }, + { + "description": "Settings to configure the inference task.\nThese settings are specific to the task type and `service_settings.api` you specified.", + "name": "task_settings", + "required": false, + "type": { + "kind": "instance_of", + "type": { + "name": "AmazonSageMakerTaskSettings", + "namespace": "inference._types" + } + } + } + ] + }, + "description": "Create an Amazon SageMaker inference endpoint.\n\nCreate an inference endpoint to perform an inference task with the `amazon_sagemaker` service.", + "inherits": { + "type": { + "name": "RequestBase", + "namespace": "_types" + } + }, + "name": { + "name": "Request", + "namespace": "inference.put_amazonsagemaker" + }, + "path": [ + { + "description": "The type of the inference task that the model will perform.", + "name": "task_type", + "required": true, + "type": { + "kind": "instance_of", + "type": { + "name": "TaskTypeAmazonSageMaker", + "namespace": "inference._types" + } + } + }, + { + "description": "The unique identifier of the inference endpoint.", + "name": "amazonsagemaker_inference_id", + "required": true, + "type": { + "kind": "instance_of", + "type": { + "name": "Id", + "namespace": "_types" + } + } + } + ], + "query": [ + { + "description": "Specifies the amount of time to wait for the inference endpoint to be created.", + "name": "timeout", + "required": false, + "serverDefault": "30s", + "type": { + "kind": "instance_of", + "type": { + "name": "Duration", + "namespace": "_types" + } + } + } + ], + "specLocation": "inference/put_amazonsagemaker/PutAmazonSageMakerRequest.ts#L31-L86" + }, + { + "kind": "response", + "body": { + "kind": "value", + "codegenName": "endpoint_info", + "value": { + "kind": "instance_of", + "type": { + "name": "InferenceEndpointInfoAmazonSageMaker", + "namespace": "inference._types" + } + } + }, + "name": { + "name": "Response", + "namespace": "inference.put_amazonsagemaker" + }, + "specLocation": "inference/put_amazonsagemaker/PutAmazonSageMakerResponse.ts#L22-L25" + }, { "kind": "request", "attachedBehaviors": [ @@ -168690,8 +173468,22 @@ } } ], - "query": [], - "specLocation": "inference/put_anthropic/PutAnthropicRequest.ts#L30-L78" + "query": [ + { + "description": "Specifies the amount of time to wait for the inference endpoint to be created.", + "name": "timeout", + "required": false, + "serverDefault": "30s", + "type": { + "kind": "instance_of", + "type": { + "name": "Duration", + "namespace": "_types" + } + } + } + ], + "specLocation": "inference/put_anthropic/PutAnthropicRequest.ts#L31-L86" }, { "kind": "response", @@ -168875,8 +173667,22 @@ } } ], - "query": [], - "specLocation": "inference/put_azureaistudio/PutAzureAiStudioRequest.ts#L30-L77" + "query": [ + { + "description": "Specifies the amount of time to wait for the inference endpoint to be created.", + "name": "timeout", + "required": false, + "serverDefault": "30s", + "type": { + "kind": "instance_of", + "type": { + "name": "Duration", + "namespace": "_types" + } + } + } + ], + "specLocation": "inference/put_azureaistudio/PutAzureAiStudioRequest.ts#L31-L85" }, { "kind": "response", @@ -169060,8 +173866,22 @@ } } ], - "query": [], - "specLocation": "inference/put_azureopenai/PutAzureOpenAiRequest.ts#L30-L85" + "query": [ + { + "description": "Specifies the amount of time to wait for the inference endpoint to be created.", + "name": "timeout", + "required": false, + "serverDefault": "30s", + "type": { + "kind": "instance_of", + "type": { + "name": "Duration", + "namespace": "_types" + } + } + } + ], + "specLocation": "inference/put_azureopenai/PutAzureOpenAiRequest.ts#L31-L93" }, { "kind": "response", @@ -169207,6 +174027,12 @@ "method_request": "PUT _inference/rerank/cohere-rerank", "summary": "A rerank task", "value": "{\n \"service\": \"cohere\",\n \"service_settings\": {\n \"api_key\": \"Cohere-API-key\",\n \"model_id\": \"rerank-english-v3.0\"\n },\n \"task_settings\": {\n \"top_n\": 10,\n \"return_documents\": true\n }\n}" + }, + "PutCohereRequestExample3": { + "description": "Run `PUT _inference/completion/cohere-completion` to create an inference endpoint that performs a completion task.", + "method_request": "PUT _inference/completion/cohere-completion", + "summary": "A completion task", + "value": "{\n \"service\": \"cohere\",\n \"service_settings\": {\n \"api_key\": \"Cohere-API-key\",\n \"model_id\": \"command-a-03-2025\"\n }\n}" } }, "inherits": { @@ -169245,8 +174071,22 @@ } } ], - "query": [], - "specLocation": "inference/put_cohere/PutCohereRequest.ts#L30-L78" + "query": [ + { + "description": "Specifies the amount of time to wait for the inference endpoint to be created.", + "name": "timeout", + "required": false, + "serverDefault": "30s", + "type": { + "kind": "instance_of", + "type": { + "name": "Duration", + "namespace": "_types" + } + } + } + ], + "specLocation": "inference/put_cohere/PutCohereRequest.ts#L31-L86" }, { "kind": "response", @@ -169267,6 +174107,246 @@ }, "specLocation": "inference/put_cohere/PutCohereResponse.ts#L22-L25" }, + { + "kind": "request", + "attachedBehaviors": [ + "CommonQueryParameters" + ], + "body": { + "kind": "properties", + "properties": [ + { + "description": "The chunking configuration object.", + "extDocId": "inference-chunking", + "extDocUrl": "https://www.elastic.co/docs/explore-analyze/elastic-inference/inference-api#infer-chunking-config", + "name": "chunking_settings", + "required": false, + "type": { + "kind": "instance_of", + "type": { + "name": "InferenceChunkingSettings", + "namespace": "inference._types" + } + } + }, + { + "description": "The type of service supported for the specified task type. In this case, `custom`.", + "name": "service", + "required": true, + "type": { + "kind": "instance_of", + "type": { + "name": "CustomServiceType", + "namespace": "inference._types" + } + } + }, + { + "description": "Settings used to install the inference model.\nThese settings are specific to the `custom` service.", + "name": "service_settings", + "required": true, + "type": { + "kind": "instance_of", + "type": { + "name": "CustomServiceSettings", + "namespace": "inference._types" + } + } + }, + { + "description": "Settings to configure the inference task.\nThese settings are specific to the task type you specified.", + "name": "task_settings", + "required": false, + "type": { + "kind": "instance_of", + "type": { + "name": "CustomTaskSettings", + "namespace": "inference._types" + } + } + } + ] + }, + "description": "Create a custom inference endpoint.\n\nThe custom service gives more control over how to interact with external inference services that aren't explicitly supported through dedicated integrations.\nThe custom service gives you the ability to define the headers, url, query parameters, request body, and secrets.\nThe custom service supports the template replacement functionality, which enables you to define a template that can be replaced with the value associated with that key.\nTemplates are portions of a string that start with `${` and end with `}`.\nThe parameters `secret_parameters` and `task_settings` are checked for keys for template replacement. Template replacement is supported in the `request`, `headers`, `url`, and `query_parameters`.\nIf the definition (key) is not found for a template, an error message is returned.\nIn case of an endpoint definition like the following:\n```\nPUT _inference/text_embedding/test-text-embedding\n{\n \"service\": \"custom\",\n \"service_settings\": {\n \"secret_parameters\": {\n \"api_key\": \"\"\n },\n \"url\": \"...endpoints.huggingface.cloud/v1/embeddings\",\n \"headers\": {\n \"Authorization\": \"Bearer ${api_key}\",\n \"Content-Type\": \"application/json\"\n },\n \"request\": \"{\\\"input\\\": ${input}}\",\n \"response\": {\n \"json_parser\": {\n \"text_embeddings\":\"$.data[*].embedding[*]\"\n }\n }\n }\n}\n```\nTo replace `${api_key}` the `secret_parameters` and `task_settings` are checked for a key named `api_key`.\n\n> info\n> Templates should not be surrounded by quotes.\n\nPre-defined templates:\n* `${input}` refers to the array of input strings that comes from the `input` field of the subsequent inference requests.\n* `${input_type}` refers to the input type translation values.\n* `${query}` refers to the query field used specifically for reranking tasks.\n* `${top_n}` refers to the `top_n` field available when performing rerank requests.\n* `${return_documents}` refers to the `return_documents` field available when performing rerank requests.", + "inherits": { + "type": { + "name": "RequestBase", + "namespace": "_types" + } + }, + "name": { + "name": "Request", + "namespace": "inference.put_custom" + }, + "path": [ + { + "description": "The type of the inference task that the model will perform.", + "name": "task_type", + "required": true, + "type": { + "kind": "instance_of", + "type": { + "name": "CustomTaskType", + "namespace": "inference._types" + } + } + }, + { + "description": "The unique identifier of the inference endpoint.", + "name": "custom_inference_id", + "required": true, + "type": { + "kind": "instance_of", + "type": { + "name": "Id", + "namespace": "_types" + } + } + } + ], + "query": [], + "specLocation": "inference/put_custom/PutCustomRequest.ts#L30-L117" + }, + { + "kind": "response", + "body": { + "kind": "value", + "codegenName": "endpoint_info", + "value": { + "kind": "instance_of", + "type": { + "name": "InferenceEndpointInfoCustom", + "namespace": "inference._types" + } + } + }, + "name": { + "name": "Response", + "namespace": "inference.put_custom" + }, + "specLocation": "inference/put_custom/PutCustomResponse.ts#L22-L25" + }, + { + "kind": "request", + "attachedBehaviors": [ + "CommonQueryParameters" + ], + "body": { + "kind": "properties", + "properties": [ + { + "description": "The chunking configuration object.", + "extDocId": "inference-chunking", + "extDocUrl": "https://www.elastic.co/docs/explore-analyze/elastic-inference/inference-api#infer-chunking-config", + "name": "chunking_settings", + "required": false, + "type": { + "kind": "instance_of", + "type": { + "name": "InferenceChunkingSettings", + "namespace": "inference._types" + } + } + }, + { + "description": "The type of service supported for the specified task type. In this case, `deepseek`.", + "name": "service", + "required": true, + "type": { + "kind": "instance_of", + "type": { + "name": "DeepSeekServiceType", + "namespace": "inference._types" + } + } + }, + { + "description": "Settings used to install the inference model.\nThese settings are specific to the `deepseek` service.", + "name": "service_settings", + "required": true, + "type": { + "kind": "instance_of", + "type": { + "name": "DeepSeekServiceSettings", + "namespace": "inference._types" + } + } + } + ] + }, + "description": "Create a DeepSeek inference endpoint.\n\nCreate an inference endpoint to perform an inference task with the `deepseek` service.", + "inherits": { + "type": { + "name": "RequestBase", + "namespace": "_types" + } + }, + "name": { + "name": "Request", + "namespace": "inference.put_deepseek" + }, + "path": [ + { + "description": "The type of the inference task that the model will perform.", + "name": "task_type", + "required": true, + "type": { + "kind": "instance_of", + "type": { + "name": "TaskTypeDeepSeek", + "namespace": "inference._types" + } + } + }, + { + "description": "The unique identifier of the inference endpoint.", + "name": "deepseek_inference_id", + "required": true, + "type": { + "kind": "instance_of", + "type": { + "name": "Id", + "namespace": "_types" + } + } + } + ], + "query": [ + { + "description": "Specifies the amount of time to wait for the inference endpoint to be created.", + "name": "timeout", + "required": false, + "serverDefault": "30s", + "type": { + "kind": "instance_of", + "type": { + "name": "Duration", + "namespace": "_types" + } + } + } + ], + "specLocation": "inference/put_deepseek/PutDeepSeekRequest.ts#L30-L80" + }, + { + "kind": "response", + "body": { + "kind": "value", + "codegenName": "endpoint_info", + "value": { + "kind": "instance_of", + "type": { + "name": "InferenceEndpointInfoDeepSeek", + "namespace": "inference._types" + } + } + }, + "name": { + "name": "Response", + "namespace": "inference.put_deepseek" + }, + "specLocation": "inference/put_deepseek/PutDeepSeekResponse.ts#L22-L25" + }, { "kind": "request", "attachedBehaviors": [ @@ -169558,8 +174638,22 @@ } } ], - "query": [], - "specLocation": "inference/put_elasticsearch/PutElasticsearchRequest.ts#L30-L91" + "query": [ + { + "description": "Specifies the amount of time to wait for the inference endpoint to be created.", + "name": "timeout", + "required": false, + "serverDefault": "30s", + "type": { + "kind": "instance_of", + "type": { + "name": "Duration", + "namespace": "_types" + } + } + } + ], + "specLocation": "inference/put_elasticsearch/PutElasticsearchRequest.ts#L31-L99" }, { "kind": "response", @@ -169741,8 +174835,22 @@ } } ], - "query": [], - "specLocation": "inference/put_elser/PutElserRequest.ts#L29-L86" + "query": [ + { + "description": "Specifies the amount of time to wait for the inference endpoint to be created.", + "name": "timeout", + "required": false, + "serverDefault": "30s", + "type": { + "kind": "instance_of", + "type": { + "name": "Duration", + "namespace": "_types" + } + } + } + ], + "specLocation": "inference/put_elser/PutElserRequest.ts#L30-L94" }, { "kind": "response", @@ -169888,8 +174996,22 @@ } } ], - "query": [], - "specLocation": "inference/put_googleaistudio/PutGoogleAiStudioRequest.ts#L29-L71" + "query": [ + { + "description": "Specifies the amount of time to wait for the inference endpoint to be created.", + "name": "timeout", + "required": false, + "serverDefault": "30s", + "type": { + "kind": "instance_of", + "type": { + "name": "Duration", + "namespace": "_types" + } + } + } + ], + "specLocation": "inference/put_googleaistudio/PutGoogleAiStudioRequest.ts#L30-L79" }, { "kind": "response", @@ -170073,8 +175195,22 @@ } } ], - "query": [], - "specLocation": "inference/put_googlevertexai/PutGoogleVertexAiRequest.ts#L30-L77" + "query": [ + { + "description": "Specifies the amount of time to wait for the inference endpoint to be created.", + "name": "timeout", + "required": false, + "serverDefault": "30s", + "type": { + "kind": "instance_of", + "type": { + "name": "Duration", + "namespace": "_types" + } + } + } + ], + "specLocation": "inference/put_googlevertexai/PutGoogleVertexAiRequest.ts#L31-L85" }, { "kind": "response", @@ -170258,8 +175394,22 @@ } } ], - "query": [], - "specLocation": "inference/put_hugging_face/PutHuggingFaceRequest.ts#L30-L113" + "query": [ + { + "description": "Specifies the amount of time to wait for the inference endpoint to be created.", + "name": "timeout", + "required": false, + "serverDefault": "30s", + "type": { + "kind": "instance_of", + "type": { + "name": "Duration", + "namespace": "_types" + } + } + } + ], + "specLocation": "inference/put_hugging_face/PutHuggingFaceRequest.ts#L31-L121" }, { "kind": "response", @@ -170443,8 +175593,22 @@ } } ], - "query": [], - "specLocation": "inference/put_jinaai/PutJinaAiRequest.ts#L30-L80" + "query": [ + { + "description": "Specifies the amount of time to wait for the inference endpoint to be created.", + "name": "timeout", + "required": false, + "serverDefault": "30s", + "type": { + "kind": "instance_of", + "type": { + "name": "Duration", + "namespace": "_types" + } + } + } + ], + "specLocation": "inference/put_jinaai/PutJinaAiRequest.ts#L31-L88" }, { "kind": "response", @@ -170583,8 +175747,22 @@ } } ], - "query": [], - "specLocation": "inference/put_mistral/PutMistralRequest.ts#L29-L71" + "query": [ + { + "description": "Specifies the amount of time to wait for the inference endpoint to be created.", + "name": "timeout", + "required": false, + "serverDefault": "30s", + "type": { + "kind": "instance_of", + "type": { + "name": "Duration", + "namespace": "_types" + } + } + } + ], + "specLocation": "inference/put_mistral/PutMistralRequest.ts#L30-L79" }, { "kind": "response", @@ -170768,8 +175946,22 @@ } } ], - "query": [], - "specLocation": "inference/put_openai/PutOpenAiRequest.ts#L30-L78" + "query": [ + { + "description": "Specifies the amount of time to wait for the inference endpoint to be created.", + "name": "timeout", + "required": false, + "serverDefault": "30s", + "type": { + "kind": "instance_of", + "type": { + "name": "Duration", + "namespace": "_types" + } + } + } + ], + "specLocation": "inference/put_openai/PutOpenAiRequest.ts#L31-L86" }, { "kind": "response", @@ -170953,8 +176145,22 @@ } } ], - "query": [], - "specLocation": "inference/put_voyageai/PutVoyageAIRequest.ts#L30-L79" + "query": [ + { + "description": "Specifies the amount of time to wait for the inference endpoint to be created.", + "name": "timeout", + "required": false, + "serverDefault": "30s", + "type": { + "kind": "instance_of", + "type": { + "name": "Duration", + "namespace": "_types" + } + } + } + ], + "specLocation": "inference/put_voyageai/PutVoyageAIRequest.ts#L31-L87" }, { "kind": "response", @@ -171079,8 +176285,22 @@ } } ], - "query": [], - "specLocation": "inference/put_watsonx/PutWatsonxRequest.ts#L28-L67" + "query": [ + { + "description": "Specifies the amount of time to wait for the inference endpoint to be created.", + "name": "timeout", + "required": false, + "serverDefault": "30s", + "type": { + "kind": "instance_of", + "type": { + "name": "Duration", + "namespace": "_types" + } + } + } + ], + "specLocation": "inference/put_watsonx/PutWatsonxRequest.ts#L29-L75" }, { "kind": "response", @@ -171162,7 +176382,7 @@ } ] }, - "description": "Perform rereanking inference on the service", + "description": "Perform reranking inference on the service", "examples": { "RerankRequestExample1": { "alternatives": [ @@ -171597,8 +176817,22 @@ } } ], - "query": [], - "specLocation": "inference/stream_completion/StreamInferenceRequest.ts#L24-L63" + "query": [ + { + "description": "The amount of time to wait for the inference request to complete.", + "name": "timeout", + "required": false, + "serverDefault": "30s", + "type": { + "kind": "instance_of", + "type": { + "name": "Duration", + "namespace": "_types" + } + } + } + ], + "specLocation": "inference/stream_completion/StreamInferenceRequest.ts#L25-L71" }, { "kind": "response", @@ -177970,22 +183204,8 @@ } } ], - "query": [ - { - "description": "The period to wait for a connection to the master node.\nIf no response is received before the timeout expires, the request fails and returns an error.\nA value of `-1` indicates that the request should never time out.", - "name": "master_timeout", - "required": false, - "serverDefault": "30s", - "type": { - "kind": "instance_of", - "type": { - "name": "Duration", - "namespace": "_types" - } - } - } - ], - "specLocation": "ingest/get_ip_location_database/GetIpLocationDatabaseRequest.ts#L24-L59" + "query": [], + "specLocation": "ingest/get_ip_location_database/GetIpLocationDatabaseRequest.ts#L23-L50" }, { "kind": "response", @@ -180112,7 +185332,8 @@ } }, { - "name": "type_query_string", + "description": "The type of trial license to generate (default: \"trial\")", + "name": "type", "required": false, "type": { "kind": "instance_of", @@ -209703,7 +214924,7 @@ } } ], - "specLocation": "nodes/_types/Stats.ts#L439-L468" + "specLocation": "nodes/_types/Stats.ts#L441-L470" }, { "kind": "interface", @@ -209785,7 +215006,7 @@ } } ], - "specLocation": "nodes/_types/Stats.ts#L470-L495" + "specLocation": "nodes/_types/Stats.ts#L472-L497" }, { "kind": "interface", @@ -209831,7 +215052,7 @@ } } ], - "specLocation": "nodes/_types/Stats.ts#L497-L510" + "specLocation": "nodes/_types/Stats.ts#L499-L512" }, { "kind": "interface", @@ -209889,7 +215110,7 @@ } } ], - "specLocation": "nodes/_types/Stats.ts#L523-L540" + "specLocation": "nodes/_types/Stats.ts#L525-L542" }, { "kind": "interface", @@ -209944,7 +215165,7 @@ } } ], - "specLocation": "nodes/_types/Stats.ts#L542-L555" + "specLocation": "nodes/_types/Stats.ts#L544-L557" }, { "kind": "interface", @@ -209990,7 +215211,7 @@ } } ], - "specLocation": "nodes/_types/Stats.ts#L557-L573" + "specLocation": "nodes/_types/Stats.ts#L559-L575" }, { "kind": "interface", @@ -210132,7 +215353,7 @@ } } ], - "specLocation": "nodes/_types/Stats.ts#L720-L767" + "specLocation": "nodes/_types/Stats.ts#L722-L769" }, { "kind": "interface", @@ -210156,7 +215377,7 @@ } } ], - "specLocation": "nodes/_types/Stats.ts#L221-L223" + "specLocation": "nodes/_types/Stats.ts#L223-L225" }, { "kind": "interface", @@ -210202,7 +215423,7 @@ } } ], - "specLocation": "nodes/_types/Stats.ts#L248-L261" + "specLocation": "nodes/_types/Stats.ts#L250-L263" }, { "kind": "interface", @@ -210455,7 +215676,7 @@ } } ], - "specLocation": "nodes/_types/Stats.ts#L278-L343" + "specLocation": "nodes/_types/Stats.ts#L280-L345" }, { "kind": "interface", @@ -210509,7 +215730,7 @@ } } ], - "specLocation": "nodes/_types/Stats.ts#L1068-L1073" + "specLocation": "nodes/_types/Stats.ts#L1075-L1080" }, { "kind": "interface", @@ -210645,7 +215866,7 @@ } } ], - "specLocation": "nodes/_types/Stats.ts#L575-L584" + "specLocation": "nodes/_types/Stats.ts#L577-L586" }, { "kind": "interface", @@ -210688,7 +215909,7 @@ } } ], - "specLocation": "nodes/_types/Stats.ts#L512-L521" + "specLocation": "nodes/_types/Stats.ts#L514-L523" }, { "kind": "interface", @@ -210883,7 +216104,7 @@ } } ], - "specLocation": "nodes/_types/Stats.ts#L586-L630" + "specLocation": "nodes/_types/Stats.ts#L588-L632" }, { "kind": "interface", @@ -210962,7 +216183,7 @@ } } ], - "specLocation": "nodes/_types/Stats.ts#L201-L219" + "specLocation": "nodes/_types/Stats.ts#L203-L221" }, { "kind": "interface", @@ -211002,7 +216223,7 @@ } } ], - "specLocation": "nodes/_types/Stats.ts#L658-L667" + "specLocation": "nodes/_types/Stats.ts#L660-L669" }, { "kind": "interface", @@ -211063,7 +216284,7 @@ } } ], - "specLocation": "nodes/_types/Stats.ts#L769-L787" + "specLocation": "nodes/_types/Stats.ts#L771-L789" }, { "kind": "interface", @@ -211145,7 +216366,7 @@ } } ], - "specLocation": "nodes/_types/Stats.ts#L828-L857" + "specLocation": "nodes/_types/Stats.ts#L830-L859" }, { "kind": "interface", @@ -211178,7 +216399,7 @@ } } ], - "specLocation": "nodes/_types/Stats.ts#L994-L999" + "specLocation": "nodes/_types/Stats.ts#L1001-L1006" }, { "kind": "interface", @@ -211224,7 +216445,7 @@ } } ], - "specLocation": "nodes/_types/Stats.ts#L1001-L1014" + "specLocation": "nodes/_types/Stats.ts#L1008-L1021" }, { "kind": "interface", @@ -211302,7 +216523,7 @@ } } ], - "specLocation": "nodes/_types/Stats.ts#L669-L688" + "specLocation": "nodes/_types/Stats.ts#L671-L690" }, { "kind": "interface", @@ -211334,7 +216555,7 @@ } } ], - "specLocation": "nodes/_types/Stats.ts#L690-L693" + "specLocation": "nodes/_types/Stats.ts#L692-L695" }, { "kind": "interface", @@ -211380,7 +216601,7 @@ } } ], - "specLocation": "nodes/_types/Stats.ts#L695-L699" + "specLocation": "nodes/_types/Stats.ts#L697-L701" }, { "kind": "interface", @@ -211440,7 +216661,7 @@ } } ], - "specLocation": "nodes/_types/Stats.ts#L701-L706" + "specLocation": "nodes/_types/Stats.ts#L703-L708" }, { "kind": "interface", @@ -211565,7 +216786,7 @@ } } ], - "specLocation": "nodes/_types/Stats.ts#L345-L354" + "specLocation": "nodes/_types/Stats.ts#L347-L356" }, { "kind": "interface", @@ -211696,7 +216917,7 @@ } } ], - "specLocation": "nodes/_types/Stats.ts#L356-L394" + "specLocation": "nodes/_types/Stats.ts#L358-L396" }, { "kind": "interface", @@ -211763,7 +216984,7 @@ } } ], - "specLocation": "nodes/_types/Stats.ts#L396-L413" + "specLocation": "nodes/_types/Stats.ts#L398-L415" }, { "kind": "interface", @@ -211845,7 +217066,7 @@ } } ], - "specLocation": "nodes/_types/Stats.ts#L801-L826" + "specLocation": "nodes/_types/Stats.ts#L803-L828" }, { "kind": "interface", @@ -211882,7 +217103,7 @@ } } ], - "specLocation": "nodes/_types/Stats.ts#L789-L799" + "specLocation": "nodes/_types/Stats.ts#L791-L801" }, { "kind": "interface", @@ -211999,7 +217220,7 @@ } } ], - "specLocation": "nodes/_types/Stats.ts#L882-L916" + "specLocation": "nodes/_types/Stats.ts#L884-L918" }, { "kind": "interface", @@ -212045,7 +217266,7 @@ } } ], - "specLocation": "nodes/_types/Stats.ts#L979-L992" + "specLocation": "nodes/_types/Stats.ts#L986-L999" }, { "kind": "interface", @@ -212102,6 +217323,18 @@ } } }, + { + "description": "Maximum amount of memory, available for use by the heap.", + "name": "heap_max", + "required": false, + "type": { + "kind": "instance_of", + "type": { + "name": "ByteSize", + "namespace": "_types" + } + } + }, { "description": "Non-heap memory used, in bytes.", "name": "non_heap_used_in_bytes", @@ -212150,7 +217383,7 @@ } } ], - "specLocation": "nodes/_types/Stats.ts#L918-L947" + "specLocation": "nodes/_types/Stats.ts#L920-L954" }, { "kind": "interface", @@ -212184,7 +217417,7 @@ } } ], - "specLocation": "nodes/_types/Stats.ts#L968-L977" + "specLocation": "nodes/_types/Stats.ts#L975-L984" }, { "kind": "interface", @@ -212216,7 +217449,7 @@ } } ], - "specLocation": "nodes/_types/Stats.ts#L415-L418" + "specLocation": "nodes/_types/Stats.ts#L417-L420" }, { "kind": "interface", @@ -212340,7 +217573,7 @@ } } ], - "specLocation": "nodes/_types/Stats.ts#L632-L656" + "specLocation": "nodes/_types/Stats.ts#L634-L658" }, { "kind": "interface", @@ -212410,7 +217643,7 @@ } } ], - "specLocation": "nodes/_types/Stats.ts#L859-L880" + "specLocation": "nodes/_types/Stats.ts#L861-L882" }, { "kind": "interface", @@ -212532,7 +217765,7 @@ } } ], - "specLocation": "nodes/_types/Stats.ts#L1016-L1022" + "specLocation": "nodes/_types/Stats.ts#L1023-L1029" }, { "kind": "interface", @@ -212590,7 +217823,7 @@ } } ], - "specLocation": "nodes/_types/Stats.ts#L949-L966" + "specLocation": "nodes/_types/Stats.ts#L956-L973" }, { "kind": "interface", @@ -212754,9 +217987,31 @@ "namespace": "_types" } } + }, + { + "name": "primary_document_rejections", + "required": false, + "type": { + "kind": "instance_of", + "type": { + "name": "long", + "namespace": "_types" + } + } + }, + { + "name": "large_operation_rejections", + "required": false, + "type": { + "kind": "instance_of", + "type": { + "name": "long", + "namespace": "_types" + } + } } ], - "specLocation": "nodes/_types/Stats.ts#L144-L199" + "specLocation": "nodes/_types/Stats.ts#L144-L201" }, { "kind": "interface", @@ -212826,7 +218081,7 @@ } } ], - "specLocation": "nodes/_types/Stats.ts#L1024-L1046" + "specLocation": "nodes/_types/Stats.ts#L1031-L1053" }, { "kind": "interface", @@ -212893,7 +218148,7 @@ } } ], - "specLocation": "nodes/_types/Stats.ts#L420-L437" + "specLocation": "nodes/_types/Stats.ts#L422-L439" }, { "kind": "interface", @@ -212939,7 +218194,7 @@ } } ], - "specLocation": "nodes/_types/Stats.ts#L263-L276" + "specLocation": "nodes/_types/Stats.ts#L265-L278" }, { "kind": "interface", @@ -213002,7 +218257,7 @@ } } ], - "specLocation": "nodes/_types/Stats.ts#L225-L230" + "specLocation": "nodes/_types/Stats.ts#L227-L232" }, { "kind": "interface", @@ -213382,7 +218637,7 @@ } } ], - "specLocation": "nodes/_types/Stats.ts#L1102-L1116" + "specLocation": "nodes/_types/Stats.ts#L1109-L1123" }, { "kind": "interface", @@ -213465,7 +218720,7 @@ } } ], - "specLocation": "nodes/_types/Stats.ts#L1048-L1066" + "specLocation": "nodes/_types/Stats.ts#L1055-L1073" }, { "kind": "interface", @@ -213498,7 +218753,7 @@ } } ], - "specLocation": "nodes/_types/Stats.ts#L232-L238" + "specLocation": "nodes/_types/Stats.ts#L234-L240" }, { "kind": "interface", @@ -213563,7 +218818,7 @@ } } ], - "specLocation": "nodes/_types/Stats.ts#L240-L246" + "specLocation": "nodes/_types/Stats.ts#L242-L248" }, { "kind": "interface", @@ -213606,7 +218861,7 @@ } } ], - "specLocation": "nodes/_types/Stats.ts#L714-L718" + "specLocation": "nodes/_types/Stats.ts#L716-L720" }, { "kind": "interface", @@ -214045,7 +219300,7 @@ } } ], - "specLocation": "nodes/_types/Stats.ts#L1075-L1100" + "specLocation": "nodes/_types/Stats.ts#L1082-L1107" }, { "kind": "interface", @@ -214088,7 +219343,7 @@ } } ], - "specLocation": "nodes/_types/Stats.ts#L708-L712" + "specLocation": "nodes/_types/Stats.ts#L710-L714" }, { "kind": "interface", @@ -214224,7 +219479,7 @@ } } ], - "specLocation": "nodes/_types/Stats.ts#L1118-L1161" + "specLocation": "nodes/_types/Stats.ts#L1125-L1168" }, { "kind": "interface", @@ -214270,7 +219525,7 @@ } } ], - "specLocation": "nodes/_types/Stats.ts#L1163-L1177" + "specLocation": "nodes/_types/Stats.ts#L1170-L1184" }, { "kind": "request", @@ -214703,7 +219958,7 @@ } } ], - "specLocation": "nodes/info/types.ts#L144-L146" + "specLocation": "nodes/info/types.ts#L154-L156" }, { "kind": "interface", @@ -214768,6 +220023,28 @@ } } }, + { + "name": "component_versions", + "required": true, + "type": { + "kind": "dictionary_of", + "key": { + "kind": "instance_of", + "type": { + "name": "Name", + "namespace": "_types" + } + }, + "singleKey": false, + "value": { + "kind": "instance_of", + "type": { + "name": "integer", + "namespace": "_types" + } + } + } + }, { "description": "The node’s host name.", "name": "host", @@ -214791,6 +220068,17 @@ } } }, + { + "name": "index_version", + "required": true, + "type": { + "kind": "instance_of", + "type": { + "name": "VersionNumber", + "namespace": "_types" + } + } + }, { "description": "The node’s IP address.", "name": "ip", @@ -214826,17 +220114,6 @@ } } }, - { - "name": "network", - "required": false, - "type": { - "kind": "instance_of", - "type": { - "name": "NodeInfoNetwork", - "namespace": "nodes.info" - } - } - }, { "name": "os", "required": false, @@ -214966,6 +220243,17 @@ } } }, + { + "name": "transport_version", + "required": true, + "type": { + "kind": "instance_of", + "type": { + "name": "VersionNumber", + "namespace": "_types" + } + } + }, { "description": "Elasticsearch version running on this node.", "name": "version", @@ -215024,9 +220312,20 @@ } } } + }, + { + "name": "remote_cluster_server", + "required": false, + "type": { + "kind": "instance_of", + "type": { + "name": "RemoveClusterServer", + "namespace": "nodes.info" + } + } } ], - "specLocation": "nodes/info/types.ts#L31-L67" + "specLocation": "nodes/info/types.ts#L32-L72" }, { "kind": "interface", @@ -215047,7 +220346,7 @@ } } ], - "specLocation": "nodes/info/types.ts#L184-L186" + "specLocation": "nodes/info/types.ts#L194-L196" }, { "kind": "interface", @@ -215071,7 +220370,7 @@ } } ], - "specLocation": "nodes/info/types.ts#L235-L237" + "specLocation": "nodes/info/types.ts#L250-L252" }, { "kind": "interface", @@ -215092,7 +220391,7 @@ } } ], - "specLocation": "nodes/info/types.ts#L204-L206" + "specLocation": "nodes/info/types.ts#L214-L216" }, { "kind": "interface", @@ -215113,7 +220412,7 @@ } } ], - "specLocation": "nodes/info/types.ts#L188-L190" + "specLocation": "nodes/info/types.ts#L198-L200" }, { "kind": "interface", @@ -215153,14 +220452,26 @@ "name": "seed_hosts", "required": false, "type": { - "kind": "array_of", - "value": { - "kind": "instance_of", - "type": { - "name": "string", - "namespace": "_builtins" + "kind": "union_of", + "items": [ + { + "kind": "array_of", + "value": { + "kind": "instance_of", + "type": { + "name": "string", + "namespace": "_builtins" + } + } + }, + { + "kind": "instance_of", + "type": { + "name": "string", + "namespace": "_builtins" + } } - } + ] } }, { @@ -215189,7 +220500,7 @@ } } ], - "specLocation": "nodes/info/types.ts#L173-L182" + "specLocation": "nodes/info/types.ts#L183-L192" }, { "kind": "interface", @@ -215246,7 +220557,7 @@ } } ], - "specLocation": "nodes/info/types.ts#L311-L316" + "specLocation": "nodes/info/types.ts#L326-L331" }, { "kind": "interface", @@ -215270,7 +220581,7 @@ } } ], - "specLocation": "nodes/info/types.ts#L227-L229" + "specLocation": "nodes/info/types.ts#L242-L244" }, { "kind": "interface", @@ -215291,7 +220602,7 @@ } } ], - "specLocation": "nodes/info/types.ts#L128-L130" + "specLocation": "nodes/info/types.ts#L138-L140" }, { "kind": "interface", @@ -215312,7 +220623,7 @@ } } ], - "specLocation": "nodes/info/types.ts#L124-L126" + "specLocation": "nodes/info/types.ts#L134-L136" }, { "kind": "interface", @@ -215333,7 +220644,7 @@ } } ], - "specLocation": "nodes/info/types.ts#L231-L233" + "specLocation": "nodes/info/types.ts#L246-L248" }, { "kind": "interface", @@ -215453,7 +220764,7 @@ } } ], - "specLocation": "nodes/info/types.ts#L318-L329" + "specLocation": "nodes/info/types.ts#L333-L344" }, { "kind": "interface", @@ -215485,82 +220796,7 @@ } } ], - "specLocation": "nodes/info/types.ts#L331-L334" - }, - { - "kind": "interface", - "name": { - "name": "NodeInfoNetwork", - "namespace": "nodes.info" - }, - "properties": [ - { - "name": "primary_interface", - "required": true, - "type": { - "kind": "instance_of", - "type": { - "name": "NodeInfoNetworkInterface", - "namespace": "nodes.info" - } - } - }, - { - "name": "refresh_interval", - "required": true, - "type": { - "kind": "instance_of", - "type": { - "name": "integer", - "namespace": "_types" - } - } - } - ], - "specLocation": "nodes/info/types.ts#L336-L339" - }, - { - "kind": "interface", - "name": { - "name": "NodeInfoNetworkInterface", - "namespace": "nodes.info" - }, - "properties": [ - { - "name": "address", - "required": true, - "type": { - "kind": "instance_of", - "type": { - "name": "string", - "namespace": "_builtins" - } - } - }, - { - "name": "mac_address", - "required": true, - "type": { - "kind": "instance_of", - "type": { - "name": "string", - "namespace": "_builtins" - } - } - }, - { - "name": "name", - "required": true, - "type": { - "kind": "instance_of", - "type": { - "name": "Name", - "namespace": "_types" - } - } - } - ], - "specLocation": "nodes/info/types.ts#L341-L345" + "specLocation": "nodes/info/types.ts#L346-L349" }, { "kind": "interface", @@ -215658,7 +220894,7 @@ } } ], - "specLocation": "nodes/info/types.ts#L347-L356" + "specLocation": "nodes/info/types.ts#L351-L360" }, { "kind": "interface", @@ -215730,7 +220966,7 @@ } } ], - "specLocation": "nodes/info/types.ts#L158-L163" + "specLocation": "nodes/info/types.ts#L168-L173" }, { "kind": "interface", @@ -215751,7 +220987,7 @@ } } ], - "specLocation": "nodes/info/types.ts#L165-L167" + "specLocation": "nodes/info/types.ts#L175-L177" }, { "kind": "interface", @@ -215772,7 +221008,7 @@ } } ], - "specLocation": "nodes/info/types.ts#L169-L171" + "specLocation": "nodes/info/types.ts#L179-L181" }, { "kind": "interface", @@ -215804,7 +221040,7 @@ } } ], - "specLocation": "nodes/info/types.ts#L289-L292" + "specLocation": "nodes/info/types.ts#L304-L307" }, { "kind": "interface", @@ -215825,7 +221061,7 @@ } } ], - "specLocation": "nodes/info/types.ts#L294-L296" + "specLocation": "nodes/info/types.ts#L309-L311" }, { "kind": "interface", @@ -215846,7 +221082,7 @@ } } ], - "specLocation": "nodes/info/types.ts#L298-L300" + "specLocation": "nodes/info/types.ts#L313-L315" }, { "kind": "interface", @@ -216021,7 +221257,7 @@ } } ], - "specLocation": "nodes/info/types.ts#L69-L85" + "specLocation": "nodes/info/types.ts#L79-L95" }, { "kind": "interface", @@ -216067,14 +221303,26 @@ "name": "initial_master_nodes", "required": false, "type": { - "kind": "array_of", - "value": { - "kind": "instance_of", - "type": { - "name": "string", - "namespace": "_builtins" + "kind": "union_of", + "items": [ + { + "kind": "array_of", + "value": { + "kind": "instance_of", + "type": { + "name": "string", + "namespace": "_builtins" + } + } + }, + { + "kind": "instance_of", + "type": { + "name": "string", + "namespace": "_builtins" + } } - } + ] } }, { @@ -216095,7 +221343,7 @@ } } ], - "specLocation": "nodes/info/types.ts#L132-L142" + "specLocation": "nodes/info/types.ts#L142-L152" }, { "kind": "interface", @@ -216116,7 +221364,7 @@ } } ], - "specLocation": "nodes/info/types.ts#L148-L150" + "specLocation": "nodes/info/types.ts#L158-L160" }, { "kind": "interface", @@ -216194,7 +221442,7 @@ } } ], - "specLocation": "nodes/info/types.ts#L192-L197" + "specLocation": "nodes/info/types.ts#L202-L207" }, { "kind": "interface", @@ -216216,7 +221464,7 @@ } ], "shortcutProperty": "default", - "specLocation": "nodes/info/types.ts#L199-L202" + "specLocation": "nodes/info/types.ts#L209-L212" }, { "kind": "interface", @@ -216600,7 +221848,7 @@ } } ], - "specLocation": "nodes/info/types.ts#L87-L122" + "specLocation": "nodes/info/types.ts#L97-L132" }, { "kind": "interface", @@ -216636,7 +221884,7 @@ } } ], - "specLocation": "nodes/info/types.ts#L223-L225" + "specLocation": "nodes/info/types.ts#L238-L240" }, { "kind": "interface", @@ -216686,7 +221934,7 @@ } } ], - "specLocation": "nodes/info/types.ts#L152-L156" + "specLocation": "nodes/info/types.ts#L162-L166" }, { "kind": "interface", @@ -216727,9 +221975,35 @@ "namespace": "nodes.info" } } + }, + { + "availability": { + "stack": { + "visibility": "private" + } + }, + "description": "Only used in unit tests", + "name": "ignore_deserialization_errors", + "required": false, + "type": { + "kind": "instance_of", + "generics": [ + { + "kind": "instance_of", + "type": { + "name": "boolean", + "namespace": "_builtins" + } + } + ], + "type": { + "name": "Stringified", + "namespace": "_spec_utils" + } + } } ], - "specLocation": "nodes/info/types.ts#L208-L212" + "specLocation": "nodes/info/types.ts#L218-L227" }, { "kind": "interface", @@ -216750,7 +222024,7 @@ } } ], - "specLocation": "nodes/info/types.ts#L219-L221" + "specLocation": "nodes/info/types.ts#L234-L236" }, { "kind": "interface", @@ -216772,7 +222046,7 @@ } ], "shortcutProperty": "default", - "specLocation": "nodes/info/types.ts#L214-L217" + "specLocation": "nodes/info/types.ts#L229-L232" }, { "kind": "interface", @@ -216829,7 +222103,7 @@ } } ], - "specLocation": "nodes/info/types.ts#L358-L362" + "specLocation": "nodes/info/types.ts#L362-L366" }, { "kind": "interface", @@ -216890,7 +222164,7 @@ } } ], - "specLocation": "nodes/info/types.ts#L239-L244" + "specLocation": "nodes/info/types.ts#L254-L259" }, { "kind": "interface", @@ -216911,7 +222185,7 @@ } } ], - "specLocation": "nodes/info/types.ts#L281-L283" + "specLocation": "nodes/info/types.ts#L296-L298" }, { "kind": "interface", @@ -216932,7 +222206,7 @@ } } ], - "specLocation": "nodes/info/types.ts#L285-L287" + "specLocation": "nodes/info/types.ts#L300-L302" }, { "kind": "interface", @@ -216953,7 +222227,7 @@ } } ], - "specLocation": "nodes/info/types.ts#L253-L255" + "specLocation": "nodes/info/types.ts#L268-L270" }, { "kind": "interface", @@ -217007,7 +222281,7 @@ } } ], - "specLocation": "nodes/info/types.ts#L246-L251" + "specLocation": "nodes/info/types.ts#L261-L266" }, { "kind": "interface", @@ -217039,7 +222313,7 @@ } } ], - "specLocation": "nodes/info/types.ts#L261-L264" + "specLocation": "nodes/info/types.ts#L276-L279" }, { "kind": "interface", @@ -217115,7 +222389,7 @@ } } ], - "specLocation": "nodes/info/types.ts#L266-L270" + "specLocation": "nodes/info/types.ts#L281-L285" }, { "kind": "interface", @@ -217147,7 +222421,7 @@ } } ], - "specLocation": "nodes/info/types.ts#L276-L279" + "specLocation": "nodes/info/types.ts#L291-L294" }, { "kind": "interface", @@ -217168,7 +222442,7 @@ } } ], - "specLocation": "nodes/info/types.ts#L272-L274" + "specLocation": "nodes/info/types.ts#L287-L289" }, { "kind": "interface", @@ -217200,7 +222474,7 @@ } } ], - "specLocation": "nodes/info/types.ts#L257-L259" + "specLocation": "nodes/info/types.ts#L272-L274" }, { "kind": "interface", @@ -217324,9 +222598,6 @@ } }, { - "aliases": [ - "bundled_jdk" - ], "name": "using_bundled_jdk", "required": true, "type": { @@ -217375,7 +222646,7 @@ } } ], - "specLocation": "nodes/info/types.ts#L364-L378" + "specLocation": "nodes/info/types.ts#L368-L381" }, { "kind": "interface", @@ -217510,7 +222781,7 @@ } } ], - "specLocation": "nodes/info/types.ts#L380-L397" + "specLocation": "nodes/info/types.ts#L383-L400" }, { "kind": "interface", @@ -217565,7 +222836,7 @@ } } ], - "specLocation": "nodes/info/types.ts#L399-L406" + "specLocation": "nodes/info/types.ts#L402-L409" }, { "kind": "interface", @@ -217641,7 +222912,42 @@ } } ], - "specLocation": "nodes/info/types.ts#L302-L309" + "specLocation": "nodes/info/types.ts#L317-L324" + }, + { + "kind": "interface", + "name": { + "name": "RemoveClusterServer", + "namespace": "nodes.info" + }, + "properties": [ + { + "name": "bound_address", + "required": true, + "type": { + "kind": "array_of", + "value": { + "kind": "instance_of", + "type": { + "name": "TransportAddress", + "namespace": "_types" + } + } + } + }, + { + "name": "publish_address", + "required": true, + "type": { + "kind": "instance_of", + "type": { + "name": "TransportAddress", + "namespace": "_types" + } + } + } + ], + "specLocation": "nodes/info/types.ts#L74-L77" }, { "kind": "request", @@ -221450,7 +226756,7 @@ "description": "", "version": "8.11.0" }, - "description": "Search rolled-up data.\nThe rollup search endpoint is needed because, internally, rolled-up documents utilize a different document structure than the original data.\nIt rewrites standard Query DSL into a format that matches the rollup documents then takes the response and rewrites it back to what a client would expect given the original query.\n\nThe request body supports a subset of features from the regular search API.\nThe following functionality is not available:\n\n`size`: Because rollups work on pre-aggregated data, no search hits can be returned and so size must be set to zero or omitted entirely.\n`highlighter`, `suggestors`, `post_filter`, `profile`, `explain`: These are similarly disallowed.\n\n**Searching both historical rollup and non-rollup data**\n\nThe rollup search API has the capability to search across both \"live\" non-rollup data and the aggregated rollup data.\nThis is done by simply adding the live indices to the URI. For example:\n\n```\nGET sensor-1,sensor_rollup/_rollup_search\n{\n \"size\": 0,\n \"aggregations\": {\n \"max_temperature\": {\n \"max\": {\n \"field\": \"temperature\"\n }\n }\n }\n}\n```\n\nThe rollup search endpoint does two things when the search runs:\n\n* The original request is sent to the non-rollup index unaltered.\n* A rewritten version of the original request is sent to the rollup index.\n\nWhen the two responses are received, the endpoint rewrites the rollup response and merges the two together.\nDuring the merging process, if there is any overlap in buckets between the two responses, the buckets from the non-rollup index are used.", + "description": "Search rolled-up data.\nThe rollup search endpoint is needed because, internally, rolled-up documents utilize a different document structure than the original data.\nIt rewrites standard Query DSL into a format that matches the rollup documents then takes the response and rewrites it back to what a client would expect given the original query.\n\nThe request body supports a subset of features from the regular search API.\nThe following functionality is not available:\n\n`size`: Because rollups work on pre-aggregated data, no search hits can be returned and so size must be set to zero or omitted entirely.\n`highlighter`, `suggestors`, `post_filter`, `profile`, `explain`: These are similarly disallowed.\n\nFor more detailed examples of using the rollup search API, including querying rolled-up data only or combining rolled-up and live data, refer to the External documentation.", "examples": { "RollupSearchRequestExample1": { "alternatives": [ @@ -221534,7 +226840,7 @@ } } ], - "specLocation": "rollup/rollup_search/RollupSearchRequest.ts#L27-L109" + "specLocation": "rollup/rollup_search/RollupSearchRequest.ts#L27-L86" }, { "kind": "response", @@ -232832,56 +238138,8 @@ "namespace": "security.get_user_privileges" }, "path": [], - "query": [ - { - "description": "The name of the application. Application privileges are always associated with exactly one application. If you do not specify this parameter, the API returns information about all privileges for all applications.", - "name": "application", - "required": false, - "type": { - "kind": "instance_of", - "type": { - "name": "Name", - "namespace": "_types" - } - } - }, - { - "description": "The name of the privilege. If you do not specify this parameter, the API returns information about all privileges for the requested application.", - "name": "priviledge", - "required": false, - "type": { - "kind": "instance_of", - "type": { - "name": "Name", - "namespace": "_types" - } - } - }, - { - "name": "username", - "required": false, - "type": { - "kind": "union_of", - "items": [ - { - "kind": "instance_of", - "type": { - "name": "Name", - "namespace": "_types" - } - }, - { - "kind": "instance_of", - "type": { - "name": "null", - "namespace": "_builtins" - } - } - ] - } - } - ], - "specLocation": "security/get_user_privileges/SecurityGetUserPrivilegesRequest.ts#L23-L49" + "query": [], + "specLocation": "security/get_user_privileges/SecurityGetUserPrivilegesRequest.ts#L22-L41" }, { "kind": "response", @@ -233479,8 +238737,22 @@ "namespace": "security.grant_api_key" }, "path": [], - "query": [], - "specLocation": "security/grant_api_key/SecurityGrantApiKeyRequest.ts#L24-L92" + "query": [ + { + "description": "If 'true', Elasticsearch refreshes the affected shards to make this operation\nvisible to search.\nIf 'wait_for', it waits for a refresh to make this operation visible to search.\nIf 'false', nothing is done with refreshes.", + "name": "refresh", + "required": false, + "serverDefault": "false", + "type": { + "kind": "instance_of", + "type": { + "name": "Refresh", + "namespace": "_types" + } + } + } + ], + "specLocation": "security/grant_api_key/SecurityGrantApiKeyRequest.ts#L24-L102" }, { "kind": "response", @@ -237388,6 +242660,70 @@ "method_request": "GET /_security/_query/api_key?with_limited_by=true", "summary": "Query API keys by ID", "value": "{\n \"query\": {\n \"ids\": {\n \"values\": [\n \"VuaCfGcBCdbkQm-e5aOx\"\n ]\n }\n }\n}" + }, + "QueryApiKeysRequestExample2": { + "alternatives": [ + { + "code": "resp = client.security.query_api_keys(\n query={\n \"bool\": {\n \"must\": [\n {\n \"prefix\": {\n \"name\": \"app1-key-\"\n }\n },\n {\n \"term\": {\n \"invalidated\": \"false\"\n }\n }\n ],\n \"must_not\": [\n {\n \"term\": {\n \"name\": \"app1-key-01\"\n }\n }\n ],\n \"filter\": [\n {\n \"wildcard\": {\n \"username\": \"org-*-user\"\n }\n },\n {\n \"term\": {\n \"metadata.environment\": \"production\"\n }\n }\n ]\n }\n },\n from=20,\n size=10,\n sort=[\n {\n \"creation\": {\n \"order\": \"desc\",\n \"format\": \"date_time\"\n }\n },\n \"name\"\n ],\n)", + "language": "Python" + }, + { + "code": "const response = await client.security.queryApiKeys({\n query: {\n bool: {\n must: [\n {\n prefix: {\n name: \"app1-key-\",\n },\n },\n {\n term: {\n invalidated: \"false\",\n },\n },\n ],\n must_not: [\n {\n term: {\n name: \"app1-key-01\",\n },\n },\n ],\n filter: [\n {\n wildcard: {\n username: \"org-*-user\",\n },\n },\n {\n term: {\n \"metadata.environment\": \"production\",\n },\n },\n ],\n },\n },\n from: 20,\n size: 10,\n sort: [\n {\n creation: {\n order: \"desc\",\n format: \"date_time\",\n },\n },\n \"name\",\n ],\n});", + "language": "JavaScript" + }, + { + "code": "response = client.security.query_api_keys(\n body: {\n \"query\": {\n \"bool\": {\n \"must\": [\n {\n \"prefix\": {\n \"name\": \"app1-key-\"\n }\n },\n {\n \"term\": {\n \"invalidated\": \"false\"\n }\n }\n ],\n \"must_not\": [\n {\n \"term\": {\n \"name\": \"app1-key-01\"\n }\n }\n ],\n \"filter\": [\n {\n \"wildcard\": {\n \"username\": \"org-*-user\"\n }\n },\n {\n \"term\": {\n \"metadata.environment\": \"production\"\n }\n }\n ]\n }\n },\n \"from\": 20,\n \"size\": 10,\n \"sort\": [\n {\n \"creation\": {\n \"order\": \"desc\",\n \"format\": \"date_time\"\n }\n },\n \"name\"\n ]\n }\n)", + "language": "Ruby" + }, + { + "code": "$resp = $client->security()->queryApiKeys([\n \"body\" => [\n \"query\" => [\n \"bool\" => [\n \"must\" => array(\n [\n \"prefix\" => [\n \"name\" => \"app1-key-\",\n ],\n ],\n [\n \"term\" => [\n \"invalidated\" => \"false\",\n ],\n ],\n ),\n \"must_not\" => array(\n [\n \"term\" => [\n \"name\" => \"app1-key-01\",\n ],\n ],\n ),\n \"filter\" => array(\n [\n \"wildcard\" => [\n \"username\" => \"org-*-user\",\n ],\n ],\n [\n \"term\" => [\n \"metadata.environment\" => \"production\",\n ],\n ],\n ),\n ],\n ],\n \"from\" => 20,\n \"size\" => 10,\n \"sort\" => array(\n [\n \"creation\" => [\n \"order\" => \"desc\",\n \"format\" => \"date_time\",\n ],\n ],\n \"name\",\n ),\n ],\n]);", + "language": "PHP" + }, + { + "code": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"query\":{\"bool\":{\"must\":[{\"prefix\":{\"name\":\"app1-key-\"}},{\"term\":{\"invalidated\":\"false\"}}],\"must_not\":[{\"term\":{\"name\":\"app1-key-01\"}}],\"filter\":[{\"wildcard\":{\"username\":\"org-*-user\"}},{\"term\":{\"metadata.environment\":\"production\"}}]}},\"from\":20,\"size\":10,\"sort\":[{\"creation\":{\"order\":\"desc\",\"format\":\"date_time\"}},\"name\"]}' \"$ELASTICSEARCH_URL/_security/_query/api_key\"", + "language": "curl" + }, + { + "code": "client.security().queryApiKeys(q -> q\n .from(20)\n .query(qu -> qu\n .bool(b -> b\n .filter(List.of(Query.of(que -> que\n .wildcard(w -> w\n .field(\"username\")\n .value(\"org-*-user\")\n )),Query.of(quer -> quer\n .term(t -> t\n .field(\"metadata.environment\")\n .value(FieldValue.of(\"production\"))\n ))))\n .must(List.of(Query.of(query -> query\n .prefix(p -> p\n .field(\"name\")\n .value(\"app1-key-\")\n )),Query.of(query1 -> query1\n .term(t -> t\n .field(\"invalidated\")\n .value(FieldValue.of(\"false\"))\n ))))\n .mustNot(m -> m\n .term(t -> t\n .field(\"name\")\n .value(FieldValue.of(\"app1-key-01\"))\n )\n )\n )\n )\n .size(10)\n .sort(List.of(SortOptions.of(s -> s\n .field(f -> f\n .field(\"creation\")\n .order(SortOrder.Desc)\n .format(\"date_time\")\n )),SortOptions.of(so -> so\n .field(f -> f\n .field(\"name\")\n ))))\n);\n", + "language": "Java" + } + ], + "description": "Run `GET /_security/_query/api_key`. Use a `bool` query to issue complex logical conditions and use `from`, `size`, and `sort` to help paginate the result. For example, the API key name must begin with `app1-key-` and must not be `app1-key-01`. It must be owned by a username with the wildcard pattern `org-*-user` and the `environment` metadata field must have a `production` value. The offset to begin the search result is the twentieth (zero-based index) API key. The page size of the response is 10 API keys. The result is first sorted by creation date in descending order, then by name in ascending order.\n", + "method_request": "GET /_security/_query/api_key", + "summary": "Query API keys with pagination", + "value": "{\n \"query\": {\n \"bool\": {\n \"must\": [\n {\n \"prefix\": {\n \"name\": \"app1-key-\" \n }\n },\n {\n \"term\": {\n \"invalidated\": \"false\" \n }\n }\n ],\n \"must_not\": [\n {\n \"term\": {\n \"name\": \"app1-key-01\" \n }\n }\n ],\n \"filter\": [\n {\n \"wildcard\": {\n \"username\": \"org-*-user\" \n }\n },\n {\n \"term\": {\n \"metadata.environment\": \"production\" \n }\n }\n ]\n }\n },\n \"from\": 20, \n \"size\": 10, \n \"sort\": [ \n { \"creation\": { \"order\": \"desc\", \"format\": \"date_time\" } },\n \"name\"\n ]\n}" + }, + "QueryApiKeysRequestExample3": { + "alternatives": [ + { + "code": "resp = client.security.query_api_keys(\n query={\n \"term\": {\n \"name\": {\n \"value\": \"application-key-1\"\n }\n }\n },\n)", + "language": "Python" + }, + { + "code": "const response = await client.security.queryApiKeys({\n query: {\n term: {\n name: {\n value: \"application-key-1\",\n },\n },\n },\n});", + "language": "JavaScript" + }, + { + "code": "response = client.security.query_api_keys(\n body: {\n \"query\": {\n \"term\": {\n \"name\": {\n \"value\": \"application-key-1\"\n }\n }\n }\n }\n)", + "language": "Ruby" + }, + { + "code": "$resp = $client->security()->queryApiKeys([\n \"body\" => [\n \"query\" => [\n \"term\" => [\n \"name\" => [\n \"value\" => \"application-key-1\",\n ],\n ],\n ],\n ],\n]);", + "language": "PHP" + }, + { + "code": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"query\":{\"term\":{\"name\":{\"value\":\"application-key-1\"}}}}' \"$ELASTICSEARCH_URL/_security/_query/api_key\"", + "language": "curl" + }, + { + "code": "client.security().queryApiKeys(q -> q\n .query(qu -> qu\n .term(t -> t\n .field(\"name\")\n .value(FieldValue.of(\"application-key-1\"))\n )\n )\n);\n", + "language": "Java" + } + ], + "description": "Run `GET /_security/_query/api_key` to retrieve the API key by name.", + "method_request": "GET /_security/_query/api_key", + "summary": "Query API keys by name", + "value": "{\n \"query\": {\n \"term\": {\n \"name\": {\n \"value\": \"application-key-1\"\n }\n }\n }\n}" } }, "inherits": { @@ -237530,6 +242866,23 @@ } ] }, + "examples": { + "QueryApiKeysResponseExample1": { + "description": "A successful response from `GET /_security/_query/api_key?with_limited_by=true`. The `limited_by` details are the owner user's permissions associated with the API key. It is a point-in-time snapshot captured at creation and subsequent updates. An API key's effective permissions are an intersection of its assigned privileges and the owner user's permissions.\n", + "summary": "Query API keys by ID", + "value": "{\n \"api_keys\": [\n {\n \"id\": \"VuaCfGcBCdbkQm-e5aOx\",\n \"name\": \"application-key-1\",\n \"creation\": 1548550550158,\n \"expiration\": 1548551550158,\n \"invalidated\": false,\n \"username\": \"myuser\",\n \"realm\": \"native1\",\n \"realm_type\": \"native\",\n \"metadata\": {\n \"application\": \"my-application\"\n },\n \"role_descriptors\": { },\n \"limited_by\": [ \n {\n \"role-power-user\": {\n \"cluster\": [\n \"monitor\"\n ],\n \"indices\": [\n {\n \"names\": [\n \"*\"\n ],\n \"privileges\": [\n \"read\"\n ],\n \"allow_restricted_indices\": false\n }\n ],\n \"applications\": [ ],\n \"run_as\": [ ],\n \"metadata\": { },\n \"transient_metadata\": {\n \"enabled\": true\n }\n }\n }\n ]\n }\n ]\n}" + }, + "QueryApiKeysResponseExample2": { + "description": "An abbreviated response from `GET /_security/_query/api_key` that contains a list of matched API keys along with their sort values. The first sort value is creation time, which is displayed in `date_time` format. The second sort value is the API key name.\n", + "summary": "Query API keys with pagination", + "value": "{\n \"total\": 100,\n \"count\": 10,\n \"api_keys\": [\n {\n \"id\": \"CLXgVnsBOGkf8IyjcXU7\",\n \"name\": \"app1-key-79\",\n \"creation\": 1629250154811,\n \"invalidated\": false,\n \"username\": \"org-admin-user\",\n \"realm\": \"native1\",\n \"metadata\": {\n \"environment\": \"production\"\n },\n \"role_descriptors\": { },\n \"_sort\": [\n \"2021-08-18T01:29:14.811Z\", \n \"app1-key-79\" \n ]\n },\n {\n \"id\": \"BrXgVnsBOGkf8IyjbXVB\",\n \"name\": \"app1-key-78\",\n \"creation\": 1629250153794,\n \"invalidated\": false,\n \"username\": \"org-admin-user\",\n \"realm\": \"native1\",\n \"metadata\": {\n \"environment\": \"production\"\n },\n \"role_descriptors\": { },\n \"_sort\": [\n \"2021-08-18T01:29:13.794Z\",\n \"app1-key-78\"\n ]\n }\n ]\n}" + }, + "QueryApiKeysResponseExample3": { + "description": "A successful response from `GET /_security/_query/api_key`. It includes the role descriptors that are assigned to each API key when it was created or last updated. Note that an API key's effective permissions are an intersection of its assigned privileges and the point-in-time snapshot of the owner user's permissions. An empty role descriptors object means the API key inherits the owner user's permissions.\n", + "summary": "Query all API keys", + "value": "{\n \"total\": 3,\n \"count\": 3,\n \"api_keys\": [ \n {\n \"id\": \"nkvrGXsB8w290t56q3Rg\",\n \"name\": \"my-api-key-1\",\n \"creation\": 1628227480421,\n \"expiration\": 1629091480421,\n \"invalidated\": false,\n \"username\": \"elastic\",\n \"realm\": \"reserved\",\n \"realm_type\": \"reserved\",\n \"metadata\": {\n \"letter\": \"a\"\n },\n \"role_descriptors\": { \n \"role-a\": {\n \"cluster\": [\n \"monitor\"\n ],\n \"indices\": [\n {\n \"names\": [\n \"index-a\"\n ],\n \"privileges\": [\n \"read\"\n ],\n \"allow_restricted_indices\": false\n }\n ],\n \"applications\": [ ],\n \"run_as\": [ ],\n \"metadata\": { },\n \"transient_metadata\": {\n \"enabled\": true\n }\n }\n }\n },\n {\n \"id\": \"oEvrGXsB8w290t5683TI\",\n \"name\": \"my-api-key-2\",\n \"creation\": 1628227498953,\n \"expiration\": 1628313898953,\n \"invalidated\": false,\n \"username\": \"elastic\",\n \"realm\": \"reserved\",\n \"metadata\": {\n \"letter\": \"b\"\n },\n \"role_descriptors\": { } \n }\n ]\n}" + } + }, "name": { "name": "Response", "namespace": "security.query_api_keys" @@ -246253,9 +251606,22 @@ "namespace": "_types" } } + }, + { + "description": "If `true`, the request returns a response when the matching snapshots are all deleted.\nIf `false`, the request returns a response as soon as the deletes are scheduled.", + "name": "wait_for_completion", + "required": false, + "serverDefault": true, + "type": { + "kind": "instance_of", + "type": { + "name": "boolean", + "namespace": "_builtins" + } + } } ], - "specLocation": "snapshot/delete/SnapshotDeleteRequest.ts#L24-L59" + "specLocation": "snapshot/delete/SnapshotDeleteRequest.ts#L24-L65" }, { "kind": "response", @@ -251299,7 +256665,7 @@ } ] }, - "description": "Create or update a synonym set.\nSynonyms sets are limited to a maximum of 10,000 synonym rules per set.\nIf you need to manage more synonym rules, you can create multiple synonym sets.\n\nWhen an existing synonyms set is updated, the search analyzers that use the synonyms set are reloaded automatically for all indices.\nThis is equivalent to invoking the reload search analyzers API for all indices that use the synonyms set.", + "description": "Create or update a synonym set.\nSynonyms sets are limited to a maximum of 10,000 synonym rules per set.\nIf you need to manage more synonym rules, you can create multiple synonym sets.\n\nWhen an existing synonyms set is updated, the search analyzers that use the synonyms set are reloaded automatically for all indices.\nThis is equivalent to invoking the reload search analyzers API for all indices that use the synonyms set.\n\nFor practical examples of how to create or update a synonyms set, refer to the External documentation.", "examples": { "SynonymsPutRequestExample1": { "alternatives": [ @@ -251371,7 +256737,7 @@ } } ], - "specLocation": "synonyms/put_synonym/SynonymsPutRequest.ts#L23-L64" + "specLocation": "synonyms/put_synonym/SynonymsPutRequest.ts#L23-L67" }, { "kind": "response", @@ -257263,7 +262629,7 @@ ], "description": "Run `POST _transform/simple-kibana-ecomm-pivot/_update` to update a transform that uses the pivot method.", "method_request": "POST _transform/simple-kibana-ecomm-pivot/_update", - "value": "{\n \"source\": {\n \"index\": \"kibana_sample_data_ecommerce\",\n \"query\": {\n \"term\": {\n \"geoip.continent_name\": {\n \"value\": \"Asia\"\n }\n }\n }\n },\n \"pivot\": {\n \"group_by\": {\n \"customer_id\": {\n \"terms\": {\n \"field\": \"customer_id\",\n \"missing_bucket\": true\n }\n }\n },\n \"aggregations\": {\n \"max_price\": {\n \"max\": {\n \"field\": \"taxful_total_price\"\n }\n }\n }\n },\n \"description\": \"Maximum priced ecommerce data by customer_id in Asia\",\n \"dest\": {\n \"index\": \"kibana_sample_data_ecommerce_transform1\",\n \"pipeline\": \"add_timestamp_pipeline\"\n },\n \"frequency\": \"5m\",\n \"sync\": {\n \"time\": {\n \"field\": \"order_date\",\n \"delay\": \"60s\"\n }\n },\n \"retention_policy\": {\n \"time\": {\n \"field\": \"order_date\",\n \"max_age\": \"30d\"\n }\n }\n}" + "value": "{\n \"source\": {\n \"index\": \"kibana_sample_data_ecommerce\",\n \"query\": {\n \"term\": {\n \"geoip.continent_name\": {\n \"value\": \"Asia\"\n }\n }\n }\n },\n \"description\": \"Maximum priced ecommerce data by customer_id in Asia\",\n \"dest\": {\n \"index\": \"kibana_sample_data_ecommerce_transform_v2\",\n \"pipeline\": \"add_timestamp_pipeline\"\n },\n \"frequency\": \"15m\",\n \"sync\": {\n \"time\": {\n \"field\": \"order_date\",\n \"delay\": \"120s\"\n }\n }\n}" } }, "inherits": { @@ -262639,6 +268005,70 @@ "method_request": "POST _watcher/watch/my_watch/_execute", "summary": "Run a watch", "value": "{\n \"trigger_data\" : { \n \"triggered_time\" : \"now\",\n \"scheduled_time\" : \"now\"\n },\n \"alternative_input\" : { \n \"foo\" : \"bar\"\n },\n \"ignore_condition\" : true, \n \"action_modes\" : {\n \"my-action\" : \"force_simulate\" \n },\n \"record_execution\" : true \n}" + }, + "WatcherExecuteRequestExample2": { + "alternatives": [ + { + "code": "resp = client.watcher.execute_watch(\n id=\"my_watch\",\n action_modes={\n \"action1\": \"force_simulate\",\n \"action2\": \"skip\"\n },\n)", + "language": "Python" + }, + { + "code": "const response = await client.watcher.executeWatch({\n id: \"my_watch\",\n action_modes: {\n action1: \"force_simulate\",\n action2: \"skip\",\n },\n});", + "language": "JavaScript" + }, + { + "code": "response = client.watcher.execute_watch(\n id: \"my_watch\",\n body: {\n \"action_modes\": {\n \"action1\": \"force_simulate\",\n \"action2\": \"skip\"\n }\n }\n)", + "language": "Ruby" + }, + { + "code": "$resp = $client->watcher()->executeWatch([\n \"id\" => \"my_watch\",\n \"body\" => [\n \"action_modes\" => [\n \"action1\" => \"force_simulate\",\n \"action2\" => \"skip\",\n ],\n ],\n]);", + "language": "PHP" + }, + { + "code": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"action_modes\":{\"action1\":\"force_simulate\",\"action2\":\"skip\"}}' \"$ELASTICSEARCH_URL/_watcher/watch/my_watch/_execute\"", + "language": "curl" + }, + { + "code": "client.watcher().executeWatch(e -> e\n .actionModes(Map.of(\"action1\", ActionExecutionMode.ForceSimulate,\"action2\", ActionExecutionMode.Skip))\n .id(\"my_watch\")\n);\n", + "language": "Java" + } + ], + "description": "Run `POST _watcher/watch/my_watch/_execute` and set a different mode for each action.\n", + "method_request": "POST _watcher/watch/my_watch/_execute", + "summary": "Run a watch with multiple action modes", + "value": "{\n \"action_modes\" : {\n \"action1\" : \"force_simulate\",\n \"action2\" : \"skip\"\n }\n}" + }, + "WatcherExecuteRequestExample3": { + "alternatives": [ + { + "code": "resp = client.watcher.execute_watch(\n watch={\n \"trigger\": {\n \"schedule\": {\n \"interval\": \"10s\"\n }\n },\n \"input\": {\n \"search\": {\n \"request\": {\n \"indices\": [\n \"logs\"\n ],\n \"body\": {\n \"query\": {\n \"match\": {\n \"message\": \"error\"\n }\n }\n }\n }\n }\n },\n \"condition\": {\n \"compare\": {\n \"ctx.payload.hits.total\": {\n \"gt\": 0\n }\n }\n },\n \"actions\": {\n \"log_error\": {\n \"logging\": {\n \"text\": \"Found {{ctx.payload.hits.total}} errors in the logs\"\n }\n }\n }\n },\n)", + "language": "Python" + }, + { + "code": "const response = await client.watcher.executeWatch({\n watch: {\n trigger: {\n schedule: {\n interval: \"10s\",\n },\n },\n input: {\n search: {\n request: {\n indices: [\"logs\"],\n body: {\n query: {\n match: {\n message: \"error\",\n },\n },\n },\n },\n },\n },\n condition: {\n compare: {\n \"ctx.payload.hits.total\": {\n gt: 0,\n },\n },\n },\n actions: {\n log_error: {\n logging: {\n text: \"Found {{ctx.payload.hits.total}} errors in the logs\",\n },\n },\n },\n },\n});", + "language": "JavaScript" + }, + { + "code": "response = client.watcher.execute_watch(\n body: {\n \"watch\": {\n \"trigger\": {\n \"schedule\": {\n \"interval\": \"10s\"\n }\n },\n \"input\": {\n \"search\": {\n \"request\": {\n \"indices\": [\n \"logs\"\n ],\n \"body\": {\n \"query\": {\n \"match\": {\n \"message\": \"error\"\n }\n }\n }\n }\n }\n },\n \"condition\": {\n \"compare\": {\n \"ctx.payload.hits.total\": {\n \"gt\": 0\n }\n }\n },\n \"actions\": {\n \"log_error\": {\n \"logging\": {\n \"text\": \"Found {{ctx.payload.hits.total}} errors in the logs\"\n }\n }\n }\n }\n }\n)", + "language": "Ruby" + }, + { + "code": "$resp = $client->watcher()->executeWatch([\n \"body\" => [\n \"watch\" => [\n \"trigger\" => [\n \"schedule\" => [\n \"interval\" => \"10s\",\n ],\n ],\n \"input\" => [\n \"search\" => [\n \"request\" => [\n \"indices\" => array(\n \"logs\",\n ),\n \"body\" => [\n \"query\" => [\n \"match\" => [\n \"message\" => \"error\",\n ],\n ],\n ],\n ],\n ],\n ],\n \"condition\" => [\n \"compare\" => [\n \"ctx.payload.hits.total\" => [\n \"gt\" => 0,\n ],\n ],\n ],\n \"actions\" => [\n \"log_error\" => [\n \"logging\" => [\n \"text\" => \"Found {{ctx.payload.hits.total}} errors in the logs\",\n ],\n ],\n ],\n ],\n ],\n]);", + "language": "PHP" + }, + { + "code": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"watch\":{\"trigger\":{\"schedule\":{\"interval\":\"10s\"}},\"input\":{\"search\":{\"request\":{\"indices\":[\"logs\"],\"body\":{\"query\":{\"match\":{\"message\":\"error\"}}}}}},\"condition\":{\"compare\":{\"ctx.payload.hits.total\":{\"gt\":0}}},\"actions\":{\"log_error\":{\"logging\":{\"text\":\"Found {{ctx.payload.hits.total}} errors in the logs\"}}}}}' \"$ELASTICSEARCH_URL/_watcher/watch/_execute\"", + "language": "curl" + }, + { + "code": "client.watcher().executeWatch(e -> e\n .watch(w -> w\n .actions(\"log_error\", a -> a\n .logging(l -> l\n .text(\"Found {{ctx.payload.hits.total}} errors in the logs\")\n )\n )\n .condition(c -> c\n .compare(NamedValue.of(\"ctx.payload.hits.total\",Pair.of(ConditionOp.Gt,FieldValue.of(0))))\n )\n .input(i -> i\n .search(s -> s\n .request(r -> r\n .body(b -> b\n .query(q -> q\n .match(m -> m\n .field(\"message\")\n .query(FieldValue.of(\"error\"))\n )\n )\n )\n .indices(\"logs\")\n )\n )\n )\n .trigger(t -> t\n .schedule(sc -> sc\n .interval(in -> in\n .time(\"10s\")\n )\n )\n )\n )\n);\n", + "language": "Java" + } + ], + "description": "Run `POST _watcher/watch/_execute` to run a watch inline. All other settings for this API still apply when inlining a watch. In this example, while the inline watch defines a compare condition, during the execution this condition will be ignored.\n", + "method_request": "POST _watcher/watch/_execute", + "summary": "Run a watch inline", + "value": "{\n \"watch\" : {\n \"trigger\" : { \"schedule\" : { \"interval\" : \"10s\" } },\n \"input\" : {\n \"search\" : {\n \"request\" : {\n \"indices\" : [ \"logs\" ],\n \"body\" : {\n \"query\" : {\n \"match\" : { \"message\": \"error\" }\n }\n }\n }\n }\n },\n \"condition\" : {\n \"compare\" : { \"ctx.payload.hits.total\" : { \"gt\" : 0 }}\n },\n \"actions\" : {\n \"log_error\" : {\n \"logging\" : {\n \"text\" : \"Found {{ctx.payload.hits.total}} errors in the logs\"\n }\n }\n }\n }\n}" } }, "inherits": { diff --git a/output/schema/validation-errors.json b/output/schema/validation-errors.json index 829c2c8dc3..f6fab219e8 100644 --- a/output/schema/validation-errors.json +++ b/output/schema/validation-errors.json @@ -1,157 +1,4 @@ { - "endpointErrors": { - "async_search.submit": { - "request": [ - "interface definition _types:QueryVectorBuilder - Property text_embedding is a single-variant and must be required", - "interface definition _types:RankContainer - Property rrf is a single-variant and must be required" - ], - "response": [] - }, - "cluster.get_component_template": { - "request": [ - "Request: query parameter 'flat_settings' does not exist in the json spec" - ], - "response": [] - }, - "cluster.put_component_template": { - "request": [ - "Request: missing json spec query parameter 'timeout'" - ], - "response": [] - }, - "create": { - "request": [ - "Request: query parameter 'if_primary_term' does not exist in the json spec", - "Request: query parameter 'if_seq_no' does not exist in the json spec", - "Request: query parameter 'op_type' does not exist in the json spec", - "Request: query parameter 'require_alias' does not exist in the json spec", - "Request: query parameter 'require_data_stream' does not exist in the json spec" - ], - "response": [] - }, - "eql.search": { - "request": [ - "Request: query parameter 'allow_no_indices' does not exist in the json spec", - "Request: query parameter 'expand_wildcards' does not exist in the json spec", - "Request: query parameter 'ignore_unavailable' does not exist in the json spec" - ], - "response": [] - }, - "esql.async_query_get": { - "request": [ - "Request: query parameter 'format' does not exist in the json spec" - ], - "response": [] - }, - "get_source": { - "request": [ - "Request: query parameter 'stored_fields' does not exist in the json spec" - ], - "response": [] - }, - "index": { - "request": [ - "Request: missing json spec query parameter 'require_data_stream'" - ], - "response": [] - }, - "ingest.get_ip_location_database": { - "request": [ - "Request: query parameter 'master_timeout' does not exist in the json spec" - ], - "response": [] - }, - "license.post_start_trial": { - "request": [ - "Request: query parameter 'type_query_string' does not exist in the json spec", - "Request: missing json spec query parameter 'type'" - ], - "response": [] - }, - "msearch": { - "request": [ - "Request: query parameter 'allow_no_indices' does not exist in the json spec", - "Request: query parameter 'expand_wildcards' does not exist in the json spec", - "Request: query parameter 'ignore_throttled' does not exist in the json spec", - "Request: query parameter 'ignore_unavailable' does not exist in the json spec", - "Request: query parameter 'include_named_queries_score' does not exist in the json spec", - "Request: query parameter 'routing' does not exist in the json spec" - ], - "response": [] - }, - "open_point_in_time": { - "request": [ - "Request: query parameter 'max_concurrent_shard_requests' does not exist in the json spec" - ], - "response": [] - }, - "reindex": { - "request": [ - "Request: query parameter 'require_alias' does not exist in the json spec", - "Request: missing json spec query parameter 'max_docs'" - ], - "response": [] - }, - "search_mvt": { - "request": [ - "Request: query parameter 'grid_agg' does not exist in the json spec", - "Request: missing json spec query parameter 'track_total_hits'" - ], - "response": [] - }, - "searchable_snapshots.clear_cache": { - "request": [ - "Request: missing json spec query parameter 'index'" - ], - "response": [] - }, - "security.get_user_privileges": { - "request": [ - "Request: query parameter 'application' does not exist in the json spec", - "Request: query parameter 'priviledge' does not exist in the json spec", - "Request: query parameter 'username' does not exist in the json spec" - ], - "response": [] - }, - "security.grant_api_key": { - "request": [ - "Request: missing json spec query parameter 'refresh'" - ], - "response": [] - }, - "snapshot.delete": { - "request": [ - "Request: missing json spec query parameter 'wait_for_completion'" - ], - "response": [] - }, - "snapshot.repository_analyze": { - "request": [ - "Request: query parameter 'register_operation_count' does not exist in the json spec" - ], - "response": [] - }, - "transform.get_transform": { - "request": [], - "response": [ - "interface definition transform._types:RetentionPolicyContainer - Property time is a single-variant and must be required", - "interface definition transform._types:SyncContainer - Property time is a single-variant and must be required" - ] - }, - "watcher.execute_watch": { - "request": [ - "interface definition watcher._types:TriggerContainer - Property schedule is a single-variant and must be required" - ], - "response": [ - "interface definition watcher._types:TriggerEventContainer - Property schedule is a single-variant and must be required" - ] - }, - "xpack.info": { - "request": [ - "request definition xpack.info:Request / query - Property 'human' is already defined in an ancestor class" - ], - "response": [] - } - }, + "endpointErrors": {}, "generalErrors": [] } \ No newline at end of file diff --git a/output/typescript/types.ts b/output/typescript/types.ts index a024c15802..2a3d50d506 100644 --- a/output/typescript/types.ts +++ b/output/typescript/types.ts @@ -159,10 +159,7 @@ export interface CountResponse { export interface CreateRequest extends RequestBase { id: Id index: IndexName - if_primary_term?: long - if_seq_no?: SequenceNumber include_source_on_error?: boolean - op_type?: OpType pipeline?: string refresh?: Refresh require_alias?: boolean @@ -462,7 +459,6 @@ export interface GetSourceRequest extends RequestBase { _source?: SearchSourceConfigParam _source_excludes?: Fields _source_includes?: Fields - stored_fields?: Fields version?: VersionNumber version_type?: VersionType } @@ -542,7 +538,7 @@ export interface HealthReportImpact { export type HealthReportImpactArea = 'search' | 'ingest' | 'backup' | 'deployment_management' -export type HealthReportIndicatorHealthStatus = 'green' | 'yellow' | 'red' | 'unknown' +export type HealthReportIndicatorHealthStatus = 'green' | 'yellow' | 'red' | 'unknown' | 'unavailable' export interface HealthReportIndicatorNode { name: string | null @@ -673,6 +669,7 @@ export interface IndexRequest extends RequestBase { version_type?: VersionType wait_for_active_shards?: WaitForActiveShards require_alias?: boolean + require_data_stream?: boolean body?: TDocument } @@ -999,6 +996,7 @@ export interface ReindexRequest extends RequestBase { requests_per_second?: float scroll?: Duration slices?: Slices + max_docs?: integer timeout?: Duration wait_for_active_shards?: WaitForActiveShards wait_for_completion?: boolean @@ -1851,6 +1849,7 @@ export interface SearchMvtRequest extends RequestBase { grid_precision?: integer grid_type?: SearchMvtGridType size?: integer + track_total_hits?: SearchTrackHits with_labels?: boolean body?: { aggs?: Record @@ -2271,6 +2270,8 @@ export type DistanceUnit = 'in' | 'ft' | 'yd' | 'mi' | 'nmi' | 'km' | 'm' | 'cm' export interface DocStats { count: long deleted?: long + total_size_in_bytes: long + total_size?: ByteSize } export type Duration = string | -1 | 0 @@ -2355,6 +2356,7 @@ export interface FielddataStats { memory_size?: ByteSize memory_size_in_bytes: long fields?: Record + global_ordinals: GlobalOrdinalsStats } export type Fields = Field | Field[] @@ -2421,9 +2423,21 @@ export interface GetStats { total: long } +export interface GlobalOrdinalFieldStats { + build_time_in_millis: UnitMillis + build_time?: string + shard_max_value_count: long +} + +export interface GlobalOrdinalsStats { + build_time_in_millis: UnitMillis + build_time?: string + fields?: Record +} + export type GrokPattern = string -export type HealthStatus = 'green' | 'GREEN' | 'yellow' | 'YELLOW' | 'red' | 'RED' +export type HealthStatus = 'green' | 'GREEN' | 'yellow' | 'YELLOW' | 'red' | 'RED' | 'unknown' | 'unavailable' export type Host = string @@ -2543,6 +2557,9 @@ export type LifecycleOperationMode = 'RUNNING' | 'STOPPING' | 'STOPPED' export interface LinearRetriever extends RetrieverBase { retrievers?: InnerRetriever[] rank_window_size?: integer + query?: string + fields?: string[] + normalizer?: ScoreNormalizer } export type MapboxVectorTiles = ArrayBuffer @@ -2677,6 +2694,8 @@ export interface RRFRetriever extends RetrieverBase { retrievers: RetrieverContainer[] rank_constant?: integer rank_window_size?: integer + query?: string + fields?: string[] } export interface RankBase { @@ -2832,6 +2851,7 @@ export interface SearchStats { suggest_time?: Duration suggest_time_in_millis: DurationValue suggest_total: long + recent_search_load?: double groups?: Record } @@ -2850,7 +2870,6 @@ export interface SegmentsStats { fixed_bit_set?: ByteSize fixed_bit_set_memory_in_bytes: long index_writer_memory?: ByteSize - index_writer_max_memory_in_bytes?: long index_writer_memory_in_bytes: long max_unsafe_auto_id_timestamp: long memory?: ByteSize @@ -2859,11 +2878,11 @@ export interface SegmentsStats { norms_memory_in_bytes: long points_memory?: ByteSize points_memory_in_bytes: long - stored_memory?: ByteSize stored_fields_memory_in_bytes: long + stored_fields_memory?: ByteSize terms_memory_in_bytes: long terms_memory?: ByteSize - term_vectory_memory?: ByteSize + term_vectors_memory?: ByteSize term_vectors_memory_in_bytes: long version_map_memory?: ByteSize version_map_memory_in_bytes: long @@ -2986,6 +3005,12 @@ export type TimeUnit = 'nanos' | 'micros' | 'ms' | 's' | 'm' | 'h' | 'd' export type TimeZone = string +export interface TokenPruningConfig { + tokens_freq_ratio_threshold?: integer + tokens_weight_threshold?: float + only_score_pruned_tokens?: boolean +} + export interface TopLeftBottomRightGeoBounds { top_left: GeoLocation bottom_right: GeoLocation @@ -3545,9 +3570,10 @@ export interface AggregationsFiltersAggregation extends AggregationsBucketAggreg } export interface AggregationsFiltersBucketKeys extends AggregationsMultiBucketBase { + key?: string } export type AggregationsFiltersBucket = AggregationsFiltersBucketKeys - & { [property: string]: AggregationsAggregate | long } + & { [property: string]: AggregationsAggregate | string | long } export interface AggregationsFormatMetricAggregationBase extends AggregationsMetricAggregationBase { format?: string @@ -4516,6 +4542,10 @@ export interface AnalysisArabicNormalizationTokenFilter extends AnalysisTokenFil type: 'arabic_normalization' } +export interface AnalysisArabicStemTokenFilter extends AnalysisTokenFilterBase { + type: 'arabic_stem' +} + export interface AnalysisArmenianAnalyzer { type: 'armenian' stopwords?: AnalysisStopWords @@ -4542,12 +4572,20 @@ export interface AnalysisBengaliAnalyzer { stem_exclusion?: string[] } +export interface AnalysisBengaliNormalizationTokenFilter extends AnalysisTokenFilterBase { + type: 'bengali_normalization' +} + export interface AnalysisBrazilianAnalyzer { type: 'brazilian' stopwords?: AnalysisStopWords stopwords_path?: string } +export interface AnalysisBrazilianStemTokenFilter extends AnalysisTokenFilterBase { + type: 'brazilian_stem' +} + export interface AnalysisBulgarianAnalyzer { type: 'bulgarian' stopwords?: AnalysisStopWords @@ -4654,6 +4692,10 @@ export interface AnalysisCzechAnalyzer { stem_exclusion?: string[] } +export interface AnalysisCzechStemTokenFilter extends AnalysisTokenFilterBase { + type: 'czech_stem' +} + export interface AnalysisDanishAnalyzer { type: 'danish' stopwords?: AnalysisStopWords @@ -4683,6 +4725,10 @@ export interface AnalysisDutchAnalyzer { stem_exclusion?: string[] } +export interface AnalysisDutchStemTokenFilter extends AnalysisTokenFilterBase { + type: 'dutch_stem' +} + export type AnalysisEdgeNGramSide = 'front' | 'back' export interface AnalysisEdgeNGramTokenFilter extends AnalysisTokenFilterBase { @@ -4754,6 +4800,10 @@ export interface AnalysisFrenchAnalyzer { stem_exclusion?: string[] } +export interface AnalysisFrenchStemTokenFilter extends AnalysisTokenFilterBase { + type: 'french_stem' +} + export interface AnalysisGalicianAnalyzer { type: 'galician' stopwords?: AnalysisStopWords @@ -4772,6 +4822,10 @@ export interface AnalysisGermanNormalizationTokenFilter extends AnalysisTokenFil type: 'german_normalization' } +export interface AnalysisGermanStemTokenFilter extends AnalysisTokenFilterBase { + type: 'german_stem' +} + export interface AnalysisGreekAnalyzer { type: 'greek' stopwords?: AnalysisStopWords @@ -4835,16 +4889,16 @@ export type AnalysisIcuCollationStrength = 'primary' | 'secondary' | 'tertiary' export interface AnalysisIcuCollationTokenFilter extends AnalysisTokenFilterBase { type: 'icu_collation' alternate?: AnalysisIcuCollationAlternate - case_first?: AnalysisIcuCollationCaseFirst - case_level?: boolean + caseFirst?: AnalysisIcuCollationCaseFirst + caseLevel?: boolean country?: string decomposition?: AnalysisIcuCollationDecomposition - hiragana_quaternary_mode?: boolean + hiraganaQuaternaryMode?: boolean language?: string numeric?: boolean rules?: string strength?: AnalysisIcuCollationStrength - variable_top?: string + variableTop?: string variant?: string } @@ -5140,6 +5194,7 @@ export interface AnalysisPatternReplaceCharFilter extends AnalysisCharFilterBase export interface AnalysisPatternReplaceTokenFilter extends AnalysisTokenFilterBase { type: 'pattern_replace' all?: boolean + flags?: string pattern: string replacement?: string } @@ -5161,6 +5216,10 @@ export interface AnalysisPersianNormalizationTokenFilter extends AnalysisTokenFi type: 'persian_normalization' } +export interface AnalysisPersianStemTokenFilter extends AnalysisTokenFilterBase { + type: 'persian_stem' +} + export type AnalysisPhoneticEncoder = 'metaphone' | 'double_metaphone' | 'soundex' | 'refined_soundex' | 'caverphone1' | 'caverphone2' | 'cologne' | 'nysiis' | 'koelnerphonetik' | 'haasephonetik' | 'beider_morse' | 'daitch_mokotoff' export type AnalysisPhoneticLanguage = 'any' | 'common' | 'cyrillic' | 'english' | 'french' | 'german' | 'hebrew' | 'hungarian' | 'polish' | 'romanian' | 'russian' | 'spanish' @@ -5217,6 +5276,10 @@ export interface AnalysisRussianAnalyzer { stem_exclusion?: string[] } +export interface AnalysisRussianStemTokenFilter extends AnalysisTokenFilterBase { + type: 'russian_stem' +} + export interface AnalysisScandinavianFoldingTokenFilter extends AnalysisTokenFilterBase { type: 'scandinavian_folding' } @@ -5382,7 +5445,7 @@ export interface AnalysisTokenFilterBase { version?: VersionString } -export type AnalysisTokenFilterDefinition = AnalysisApostropheTokenFilter | AnalysisArabicNormalizationTokenFilter | AnalysisAsciiFoldingTokenFilter | AnalysisCjkBigramTokenFilter | AnalysisCjkWidthTokenFilter | AnalysisClassicTokenFilter | AnalysisCommonGramsTokenFilter | AnalysisConditionTokenFilter | AnalysisDecimalDigitTokenFilter | AnalysisDelimitedPayloadTokenFilter | AnalysisEdgeNGramTokenFilter | AnalysisElisionTokenFilter | AnalysisFingerprintTokenFilter | AnalysisFlattenGraphTokenFilter | AnalysisGermanNormalizationTokenFilter | AnalysisHindiNormalizationTokenFilter | AnalysisHunspellTokenFilter | AnalysisHyphenationDecompounderTokenFilter | AnalysisIndicNormalizationTokenFilter | AnalysisKeepTypesTokenFilter | AnalysisKeepWordsTokenFilter | AnalysisKeywordMarkerTokenFilter | AnalysisKeywordRepeatTokenFilter | AnalysisKStemTokenFilter | AnalysisLengthTokenFilter | AnalysisLimitTokenCountTokenFilter | AnalysisLowercaseTokenFilter | AnalysisMinHashTokenFilter | AnalysisMultiplexerTokenFilter | AnalysisNGramTokenFilter | AnalysisNoriPartOfSpeechTokenFilter | AnalysisPatternCaptureTokenFilter | AnalysisPatternReplaceTokenFilter | AnalysisPersianNormalizationTokenFilter | AnalysisPorterStemTokenFilter | AnalysisPredicateTokenFilter | AnalysisRemoveDuplicatesTokenFilter | AnalysisReverseTokenFilter | AnalysisScandinavianFoldingTokenFilter | AnalysisScandinavianNormalizationTokenFilter | AnalysisSerbianNormalizationTokenFilter | AnalysisShingleTokenFilter | AnalysisSnowballTokenFilter | AnalysisSoraniNormalizationTokenFilter | AnalysisStemmerOverrideTokenFilter | AnalysisStemmerTokenFilter | AnalysisStopTokenFilter | AnalysisSynonymGraphTokenFilter | AnalysisSynonymTokenFilter | AnalysisTrimTokenFilter | AnalysisTruncateTokenFilter | AnalysisUniqueTokenFilter | AnalysisUppercaseTokenFilter | AnalysisWordDelimiterGraphTokenFilter | AnalysisWordDelimiterTokenFilter | AnalysisJaStopTokenFilter | AnalysisKuromojiStemmerTokenFilter | AnalysisKuromojiReadingFormTokenFilter | AnalysisKuromojiPartOfSpeechTokenFilter | AnalysisIcuCollationTokenFilter | AnalysisIcuFoldingTokenFilter | AnalysisIcuNormalizationTokenFilter | AnalysisIcuTransformTokenFilter | AnalysisPhoneticTokenFilter | AnalysisDictionaryDecompounderTokenFilter +export type AnalysisTokenFilterDefinition = AnalysisApostropheTokenFilter | AnalysisArabicStemTokenFilter | AnalysisArabicNormalizationTokenFilter | AnalysisAsciiFoldingTokenFilter | AnalysisBengaliNormalizationTokenFilter | AnalysisBrazilianStemTokenFilter | AnalysisCjkBigramTokenFilter | AnalysisCjkWidthTokenFilter | AnalysisClassicTokenFilter | AnalysisCommonGramsTokenFilter | AnalysisConditionTokenFilter | AnalysisCzechStemTokenFilter | AnalysisDecimalDigitTokenFilter | AnalysisDelimitedPayloadTokenFilter | AnalysisDutchStemTokenFilter | AnalysisEdgeNGramTokenFilter | AnalysisElisionTokenFilter | AnalysisFingerprintTokenFilter | AnalysisFlattenGraphTokenFilter | AnalysisFrenchStemTokenFilter | AnalysisGermanNormalizationTokenFilter | AnalysisGermanStemTokenFilter | AnalysisHindiNormalizationTokenFilter | AnalysisHunspellTokenFilter | AnalysisHyphenationDecompounderTokenFilter | AnalysisIndicNormalizationTokenFilter | AnalysisKeepTypesTokenFilter | AnalysisKeepWordsTokenFilter | AnalysisKeywordMarkerTokenFilter | AnalysisKeywordRepeatTokenFilter | AnalysisKStemTokenFilter | AnalysisLengthTokenFilter | AnalysisLimitTokenCountTokenFilter | AnalysisLowercaseTokenFilter | AnalysisMinHashTokenFilter | AnalysisMultiplexerTokenFilter | AnalysisNGramTokenFilter | AnalysisNoriPartOfSpeechTokenFilter | AnalysisPatternCaptureTokenFilter | AnalysisPatternReplaceTokenFilter | AnalysisPersianNormalizationTokenFilter | AnalysisPersianStemTokenFilter | AnalysisPorterStemTokenFilter | AnalysisPredicateTokenFilter | AnalysisRemoveDuplicatesTokenFilter | AnalysisReverseTokenFilter | AnalysisRussianStemTokenFilter | AnalysisScandinavianFoldingTokenFilter | AnalysisScandinavianNormalizationTokenFilter | AnalysisSerbianNormalizationTokenFilter | AnalysisShingleTokenFilter | AnalysisSnowballTokenFilter | AnalysisSoraniNormalizationTokenFilter | AnalysisStemmerOverrideTokenFilter | AnalysisStemmerTokenFilter | AnalysisStopTokenFilter | AnalysisSynonymGraphTokenFilter | AnalysisSynonymTokenFilter | AnalysisTrimTokenFilter | AnalysisTruncateTokenFilter | AnalysisUniqueTokenFilter | AnalysisUppercaseTokenFilter | AnalysisWordDelimiterGraphTokenFilter | AnalysisWordDelimiterTokenFilter | AnalysisJaStopTokenFilter | AnalysisKuromojiStemmerTokenFilter | AnalysisKuromojiReadingFormTokenFilter | AnalysisKuromojiPartOfSpeechTokenFilter | AnalysisIcuCollationTokenFilter | AnalysisIcuFoldingTokenFilter | AnalysisIcuNormalizationTokenFilter | AnalysisIcuTransformTokenFilter | AnalysisPhoneticTokenFilter | AnalysisDictionaryDecompounderTokenFilter export type AnalysisTokenizer = string | AnalysisTokenizerDefinition @@ -5461,6 +5524,7 @@ export interface AnalysisWordDelimiterTokenFilterBase extends AnalysisTokenFilte export interface MappingAggregateMetricDoubleProperty extends MappingPropertyBase { type: 'aggregate_metric_double' default_metric: string + ignore_malformed?: boolean metrics: string[] time_series_metric?: MappingTimeSeriesMetricType } @@ -5676,6 +5740,7 @@ export interface MappingFlattenedProperty extends MappingPropertyBase { null_value?: string similarity?: string split_queries_on_whitespace?: boolean + time_series_dimensions?: string[] type: 'flattened' } @@ -5690,6 +5755,8 @@ export interface MappingFloatRangeProperty extends MappingRangePropertyBase { export type MappingGeoOrientation = 'right' | 'RIGHT' | 'counterclockwise' | 'ccw' | 'left' | 'LEFT' | 'clockwise' | 'cw' +export type MappingGeoPointMetricType = 'gauge' | 'counter' | 'position' + export interface MappingGeoPointProperty extends MappingDocValuesPropertyBase { ignore_malformed?: boolean ignore_z_value?: boolean @@ -5698,6 +5765,7 @@ export interface MappingGeoPointProperty extends MappingDocValuesPropertyBase { on_script_error?: MappingOnScriptError script?: Script | ScriptSource type: 'geo_point' + time_series_metric?: MappingGeoPointMetricType } export interface MappingGeoShapeProperty extends MappingDocValuesPropertyBase { @@ -5860,7 +5928,7 @@ export interface MappingPointProperty extends MappingDocValuesPropertyBase { type: 'point' } -export type MappingProperty = MappingBinaryProperty | MappingBooleanProperty | MappingDynamicProperty | MappingJoinProperty | MappingKeywordProperty | MappingMatchOnlyTextProperty | MappingPercolatorProperty | MappingRankFeatureProperty | MappingRankFeaturesProperty | MappingSearchAsYouTypeProperty | MappingTextProperty | MappingVersionProperty | MappingWildcardProperty | MappingDateNanosProperty | MappingDateProperty | MappingAggregateMetricDoubleProperty | MappingDenseVectorProperty | MappingFlattenedProperty | MappingNestedProperty | MappingObjectProperty | MappingPassthroughObjectProperty | MappingSemanticTextProperty | MappingSparseVectorProperty | MappingCompletionProperty | MappingConstantKeywordProperty | MappingCountedKeywordProperty | MappingFieldAliasProperty | MappingHistogramProperty | MappingIpProperty | MappingMurmur3HashProperty | MappingTokenCountProperty | MappingGeoPointProperty | MappingGeoShapeProperty | MappingPointProperty | MappingShapeProperty | MappingByteNumberProperty | MappingDoubleNumberProperty | MappingFloatNumberProperty | MappingHalfFloatNumberProperty | MappingIntegerNumberProperty | MappingLongNumberProperty | MappingScaledFloatNumberProperty | MappingShortNumberProperty | MappingUnsignedLongNumberProperty | MappingDateRangeProperty | MappingDoubleRangeProperty | MappingFloatRangeProperty | MappingIntegerRangeProperty | MappingIpRangeProperty | MappingLongRangeProperty | MappingIcuCollationProperty +export type MappingProperty = MappingBinaryProperty | MappingBooleanProperty | MappingDynamicProperty | MappingJoinProperty | MappingKeywordProperty | MappingMatchOnlyTextProperty | MappingPercolatorProperty | MappingRankFeatureProperty | MappingRankFeaturesProperty | MappingSearchAsYouTypeProperty | MappingTextProperty | MappingVersionProperty | MappingWildcardProperty | MappingDateNanosProperty | MappingDateProperty | MappingAggregateMetricDoubleProperty | MappingDenseVectorProperty | MappingFlattenedProperty | MappingNestedProperty | MappingObjectProperty | MappingPassthroughObjectProperty | MappingRankVectorProperty | MappingSemanticTextProperty | MappingSparseVectorProperty | MappingCompletionProperty | MappingConstantKeywordProperty | MappingCountedKeywordProperty | MappingFieldAliasProperty | MappingHistogramProperty | MappingIpProperty | MappingMurmur3HashProperty | MappingTokenCountProperty | MappingGeoPointProperty | MappingGeoShapeProperty | MappingPointProperty | MappingShapeProperty | MappingByteNumberProperty | MappingDoubleNumberProperty | MappingFloatNumberProperty | MappingHalfFloatNumberProperty | MappingIntegerNumberProperty | MappingLongNumberProperty | MappingScaledFloatNumberProperty | MappingShortNumberProperty | MappingUnsignedLongNumberProperty | MappingDateRangeProperty | MappingDoubleRangeProperty | MappingFloatRangeProperty | MappingIntegerRangeProperty | MappingIpRangeProperty | MappingLongRangeProperty | MappingIcuCollationProperty export interface MappingPropertyBase { meta?: Record @@ -5887,6 +5955,14 @@ export interface MappingRankFeaturesProperty extends MappingPropertyBase { type: 'rank_features' } +export type MappingRankVectorElementType = 'byte' | 'float' | 'bit' + +export interface MappingRankVectorProperty extends MappingPropertyBase { + type: 'rank_vectors' + element_type?: MappingRankVectorElementType + dims?: integer +} + export interface MappingRoutingField { required: boolean } @@ -5966,8 +6042,15 @@ export interface MappingSourceField { export type MappingSourceFieldMode = 'disabled' | 'stored' | 'synthetic' +export interface MappingSparseVectorIndexOptions { + prune?: boolean + pruning_config?: TokenPruningConfig +} + export interface MappingSparseVectorProperty extends MappingPropertyBase { + store?: boolean type: 'sparse_vector' + index_options?: MappingSparseVectorIndexOptions } export type MappingSubobjects = boolean | 'true' | 'false' | 'auto' @@ -6798,7 +6881,7 @@ export interface QueryDslSparseVectorQuery extends QueryDslQueryBase { inference_id?: Id query?: string prune?: boolean - pruning_config?: QueryDslTokenPruningConfig + pruning_config?: TokenPruningConfig } export interface QueryDslTermQuery extends QueryDslQueryBase { @@ -6833,17 +6916,11 @@ export interface QueryDslTermsSetQuery extends QueryDslQueryBase { export interface QueryDslTextExpansionQuery extends QueryDslQueryBase { model_id: string model_text: string - pruning_config?: QueryDslTokenPruningConfig + pruning_config?: TokenPruningConfig } export type QueryDslTextQueryType = 'best_fields' | 'most_fields' | 'cross_fields' | 'phrase' | 'phrase_prefix' | 'bool_prefix' -export interface QueryDslTokenPruningConfig { - tokens_freq_ratio_threshold?: integer - tokens_weight_threshold?: float - only_score_pruned_tokens?: boolean -} - export interface QueryDslTypeQuery extends QueryDslQueryBase { value: string } @@ -6863,7 +6940,7 @@ export interface QueryDslUntypedRangeQuery extends QueryDslRangeQueryBase { export interface QueryDslWeightedTokensQuery extends QueryDslQueryBase { tokens: Record | Record[] - pruning_config?: QueryDslTokenPruningConfig + pruning_config?: TokenPruningConfig } export interface QueryDslWildcardQuery extends QueryDslQueryBase { @@ -7104,9 +7181,29 @@ export type CatCatNodeColumn = 'build' | 'b' | 'completion.size' | 'cs' | 'compl export type CatCatNodeColumns = CatCatNodeColumn | CatCatNodeColumn[] +export type CatCatRecoveryColumn = 'index' | 'i' | 'idx' | 'shard' | 's' | 'sh' | 'time' | 't' | 'ti' | 'primaryOrReplica' | 'type' | 'stage' | 'st' | 'source_host' | 'shost' | 'source_node' | 'snode' | 'target_host' | 'thost' | 'target_node' | 'tnode' | 'repository' | 'tnode' | 'snapshot' | 'snap' | 'files' | 'f' | 'files_recovered' | 'fr' | 'files_percent' | 'fp' | 'files_total' | 'tf' | 'bytes' | 'b' | 'bytes_recovered' | 'br' | 'bytes_percent' | 'bp' | 'bytes_total' | 'tb' | 'translog_ops' | 'to' | 'translog_ops_recovered' | 'tor' | 'translog_ops_percent' | 'top' | 'start_time' | 'start' | 'start_time_millis' | 'start_millis' | 'stop_time' | 'stop' | 'stop_time_millis' | 'stop_millis'| string + +export type CatCatRecoveryColumns = CatCatRecoveryColumn | CatCatRecoveryColumn[] + export interface CatCatRequestBase extends RequestBase, SpecUtilsCommonCatQueryParameters { } +export type CatCatSegmentsColumn = 'index' | 'i' | 'idx' | 'shard' | 's' | 'sh' | 'prirep' | 'p' | 'pr' | 'primaryOrReplica' | 'ip' | 'segment' | 'generation' | 'docs.count' | 'docs.deleted' | 'size' | 'size.memory' | 'committed' | 'searchable' | 'version' | 'compound' | 'id'| string + +export type CatCatSegmentsColumns = CatCatSegmentsColumn | CatCatSegmentsColumn[] + +export type CatCatShardColumn = 'completion.size' | 'cs' | 'completionSize' | 'dataset.size' | 'dense_vector.value_count' | 'dvc' | 'denseVectorCount' | 'docs' | 'd' | 'dc' | 'fielddata.evictions' | 'fe' | 'fielddataEvictions' | 'fielddata.memory_size' | 'fm' | 'fielddataMemory' | 'flush.total' | 'ft' | 'flushTotal' | 'flush.total_time' | 'ftt' | 'flushTotalTime' | 'get.current' | 'gc' | 'getCurrent' | 'get.exists_time' | 'geti' | 'getExistsTime' | 'get.exists_total' | 'geto' | 'getExistsTotal' | 'get.missing_time' | 'gmti' | 'getMissingTime' | 'get.missing_total' | 'gmto' | 'getMissingTotal' | 'get.time' | 'gti' | 'getTime' | 'get.total' | 'gto' | 'getTotal' | 'id' | 'index' | 'i' | 'idx' | 'indexing.delete_current' | 'idc' | 'indexingDeleteCurrent' | 'indexing.delete_time' | 'idti' | 'indexingDeleteTime' | 'indexing.delete_total' | 'idto' | 'indexingDeleteTotal' | 'indexing.index_current' | 'iic' | 'indexingIndexCurrent' | 'indexing.index_failed_due_to_version_conflict' | 'iifvc' | 'indexingIndexFailedDueToVersionConflict' | 'indexing.index_failed' | 'iif' | 'indexingIndexFailed' | 'indexing.index_time' | 'iiti' | 'indexingIndexTime' | 'indexing.index_total' | 'iito' | 'indexingIndexTotal' | 'ip' | 'merges.current' | 'mc' | 'mergesCurrent' | 'merges.current_docs' | 'mcd' | 'mergesCurrentDocs' | 'merges.current_size' | 'mcs' | 'mergesCurrentSize' | 'merges.total' | 'mt' | 'mergesTotal' | 'merges.total_docs' | 'mtd' | 'mergesTotalDocs' | 'merges.total_size' | 'mts' | 'mergesTotalSize' | 'merges.total_time' | 'mtt' | 'mergesTotalTime' | 'node' | 'n' | 'prirep' | 'p' | 'pr' | 'primaryOrReplica' | 'query_cache.evictions' | 'qce' | 'queryCacheEvictions' | 'query_cache.memory_size' | 'qcm' | 'queryCacheMemory' | 'recoverysource.type' | 'rs' | 'refresh.time' | 'rti' | 'refreshTime' | 'refresh.total' | 'rto' | 'refreshTotal' | 'search.fetch_current' | 'sfc' | 'searchFetchCurrent' | 'search.fetch_time' | 'sfti' | 'searchFetchTime' | 'search.fetch_total' | 'sfto' | 'searchFetchTotal' | 'search.open_contexts' | 'so' | 'searchOpenContexts' | 'search.query_current' | 'sqc' | 'searchQueryCurrent' | 'search.query_time' | 'sqti' | 'searchQueryTime' | 'search.query_total' | 'sqto' | 'searchQueryTotal' | 'search.scroll_current' | 'scc' | 'searchScrollCurrent' | 'search.scroll_time' | 'scti' | 'searchScrollTime' | 'search.scroll_total' | 'scto' | 'searchScrollTotal' | 'segments.count' | 'sc' | 'segmentsCount' | 'segments.fixed_bitset_memory' | 'sfbm' | 'fixedBitsetMemory' | 'segments.index_writer_memory' | 'siwm' | 'segmentsIndexWriterMemory' | 'segments.memory' | 'sm' | 'segmentsMemory' | 'segments.version_map_memory' | 'svmm' | 'segmentsVersionMapMemory' | 'seq_no.global_checkpoint' | 'sqg' | 'globalCheckpoint' | 'seq_no.local_checkpoint' | 'sql' | 'localCheckpoint' | 'seq_no.max' | 'sqm' | 'maxSeqNo' | 'shard' | 's' | 'sh' | 'dsparse_vector.value_count' | 'svc' | 'sparseVectorCount' | 'state' | 'st' | 'store' | 'sto' | 'suggest.current' | 'suc' | 'suggestCurrent' | 'suggest.time' | 'suti' | 'suggestTime' | 'suggest.total' | 'suto' | 'suggestTotal' | 'sync_id' | 'unassigned.at' | 'ua' | 'unassigned.details' | 'ud' | 'unassigned.for' | 'uf' | 'unassigned.reason' | 'ur'| string + +export type CatCatShardColumns = CatCatShardColumn | CatCatShardColumn[] + +export type CatCatSnapshotsColumn = 'id' | 'snapshot' | 'repository' | 're' | 'repo' | 'status' | 's' | 'start_epoch' | 'ste' | 'startEpoch' | 'start_time' | 'sti' | 'startTime' | 'end_epoch' | 'ete' | 'endEpoch' | 'end_time' | 'eti' | 'endTime' | 'duration' | 'dur' | 'indices' | 'i' | 'successful_shards' | 'ss' | 'failed_shards' | 'fs' | 'total_shards' | 'ts' | 'reason' | 'r'| string + +export type CatCatSnapshotsColumns = CatCatSnapshotsColumn | CatCatSnapshotsColumn[] + +export type CatCatThreadPoolColumn = 'active' | 'a' | 'completed' | 'c' | 'core' | 'cr' | 'ephemeral_id' | 'eid' | 'host' | 'h' | 'ip' | 'i' | 'keep_alive' | 'k' | 'largest' | 'l' | 'max' | 'mx' | 'name' | 'node_id' | 'id' | 'node_name' | 'pid' | 'p' | 'pool_size' | 'psz' | 'port' | 'po' | 'queue' | 'q' | 'queue_size' | 'qs' | 'rejected' | 'r' | 'size' | 'sz' | 'type' | 't'| string + +export type CatCatThreadPoolColumns = CatCatThreadPoolColumn | CatCatThreadPoolColumn[] + export type CatCatTrainedModelsColumn = 'create_time' | 'ct' | 'created_by' | 'c' | 'createdBy' | 'data_frame_analytics_id' | 'df' | 'dataFrameAnalytics' | 'dfid' | 'description' | 'd' | 'heap_size' | 'hs' | 'modelHeapSize' | 'id' | 'ingest.count' | 'ic' | 'ingestCount' | 'ingest.current' | 'icurr' | 'ingestCurrent' | 'ingest.failed' | 'if' | 'ingestFailed' | 'ingest.pipelines' | 'ip' | 'ingestPipelines' | 'ingest.time' | 'it' | 'ingestTime' | 'license' | 'l' | 'operations' | 'o' | 'modelOperations' | 'version' | 'v' export type CatCatTrainedModelsColumns = CatCatTrainedModelsColumn | CatCatTrainedModelsColumn[] @@ -8409,7 +8506,7 @@ export interface CatRecoveryRequest extends CatCatRequestBase { active_only?: boolean bytes?: Bytes detailed?: boolean - h?: Names + h?: CatCatRecoveryColumns s?: Names time?: TimeUnit } @@ -8435,7 +8532,7 @@ export type CatRepositoriesResponse = CatRepositoriesRepositoriesRecord[] export interface CatSegmentsRequest extends CatCatRequestBase { index?: Indices bytes?: Bytes - h?: Names + h?: CatCatSegmentsColumns s?: Names local?: boolean master_timeout?: Duration @@ -8488,7 +8585,7 @@ export interface CatSegmentsSegmentsRecord { export interface CatShardsRequest extends CatCatRequestBase { index?: Indices bytes?: Bytes - h?: Names + h?: CatCatShardColumns s?: Names master_timeout?: Duration time?: TimeUnit @@ -8714,7 +8811,7 @@ export interface CatShardsShardsRecord { export interface CatSnapshotsRequest extends CatCatRequestBase { repository?: Names ignore_unavailable?: boolean - h?: Names + h?: CatCatSnapshotsColumns s?: Names master_timeout?: Duration time?: TimeUnit @@ -8831,7 +8928,7 @@ export interface CatTemplatesTemplatesRecord { export interface CatThreadPoolRequest extends CatCatRequestBase { thread_pool_patterns?: Names - h?: Names + h?: CatCatThreadPoolColumns s?: Names time?: TimeUnit local?: boolean @@ -9400,6 +9497,7 @@ export type ClusterExistsComponentTemplateResponse = boolean export interface ClusterGetComponentTemplateRequest extends RequestBase { name?: Name flat_settings?: boolean + settings_filter?: string | string[] include_defaults?: boolean local?: boolean master_timeout?: Duration @@ -9528,6 +9626,7 @@ export type ClusterPostVotingConfigExclusionsResponse = boolean export interface ClusterPutComponentTemplateRequest extends RequestBase { name: Name create?: boolean + cause?: string master_timeout?: Duration body?: { template: IndicesIndexState @@ -9715,26 +9814,44 @@ export interface ClusterStatsCharFilterTypes { char_filter_types: ClusterStatsFieldTypes[] filter_types: ClusterStatsFieldTypes[] tokenizer_types: ClusterStatsFieldTypes[] + synonyms: Record } export interface ClusterStatsClusterFileSystem { - available_in_bytes: long - free_in_bytes: long - total_in_bytes: long + path?: string + mount?: string + type?: string + available_in_bytes?: long + available?: ByteSize + free_in_bytes?: long + free?: ByteSize + total_in_bytes?: long + total?: ByteSize + low_watermark_free_space?: ByteSize + low_watermark_free_space_in_bytes?: long + high_watermark_free_space?: ByteSize + high_watermark_free_space_in_bytes?: long + flood_stage_free_space?: ByteSize + flood_stage_free_space_in_bytes?: long + frozen_flood_stage_free_space?: ByteSize + frozen_flood_stage_free_space_in_bytes?: long } export interface ClusterStatsClusterIndices { - analysis: ClusterStatsCharFilterTypes + analysis?: ClusterStatsCharFilterTypes completion: CompletionStats count: long docs: DocStats fielddata: FielddataStats query_cache: QueryCacheStats + search: ClusterStatsSearchUsageStats segments: SegmentsStats shards: ClusterStatsClusterIndicesShards store: StoreStats - mappings: ClusterStatsFieldTypesMappings + mappings?: ClusterStatsFieldTypesMappings versions?: ClusterStatsIndicesVersions[] + dense_vector: ClusterStatsDenseVectorStats + sparse_vector: ClusterStatsSparseVectorStats } export interface ClusterStatsClusterIndicesShards { @@ -9757,6 +9874,7 @@ export interface ClusterStatsClusterIngest { export interface ClusterStatsClusterJvm { max_uptime_in_millis: DurationValue + max_uptime?: Duration mem: ClusterStatsClusterJvmMemory threads: long versions: ClusterStatsClusterJvmVersion[] @@ -9764,7 +9882,9 @@ export interface ClusterStatsClusterJvm { export interface ClusterStatsClusterJvmMemory { heap_max_in_bytes: long + heap_max?: ByteSize heap_used_in_bytes: long + heap_used?: ByteSize } export interface ClusterStatsClusterJvmVersion { @@ -9783,20 +9903,22 @@ export interface ClusterStatsClusterNetworkTypes { } export interface ClusterStatsClusterNodeCount { - coordinating_only: integer - data: integer - data_cold: integer - data_content: integer - data_frozen?: integer - data_hot: integer - data_warm: integer - ingest: integer - master: integer - ml: integer - remote_cluster_client: integer total: integer - transform: integer - voting_only: integer + coordinating_only?: integer + data?: integer + data_cold?: integer + data_content?: integer + data_frozen?: integer + data_hot?: integer + data_warm?: integer + index?: integer + ingest?: integer + master?: integer + ml?: integer + remote_cluster_client?: integer + search?: integer + transform?: integer + voting_only?: integer } export interface ClusterStatsClusterNodes { @@ -9867,50 +9989,62 @@ export interface ClusterStatsClusterShardMetrics { min: double } +export interface ClusterStatsClusterSnapshotStats { + current_counts: ClusterStatsSnapshotCurrentCounts + repositories: Record +} + +export interface ClusterStatsDenseVectorOffHeapStats { + total_size_bytes: long + total_size?: ByteSize + total_veb_size_bytes: long + total_veb_size?: ByteSize + total_vec_size_bytes: long + total_vec_size?: ByteSize + total_veq_size_bytes: long + total_veq_size?: ByteSize + total_vex_size_bytes: long + total_vex_size?: ByteSize + fielddata?: Record> +} + +export interface ClusterStatsDenseVectorStats { + value_count: long + off_heap?: ClusterStatsDenseVectorOffHeapStats +} + export interface ClusterStatsFieldTypes { name: Name count: integer index_count: integer - indexed_vector_count?: long - indexed_vector_dim_max?: long - indexed_vector_dim_min?: long + indexed_vector_count?: integer + indexed_vector_dim_max?: integer + indexed_vector_dim_min?: integer script_count?: integer + vector_index_type_count?: Record + vector_similarity_type_count?: Record + vector_element_type_count?: Record } export interface ClusterStatsFieldTypesMappings { field_types: ClusterStatsFieldTypes[] - runtime_field_types?: ClusterStatsRuntimeFieldTypes[] - total_field_count?: integer - total_deduplicated_field_count?: integer + runtime_field_types: ClusterStatsRuntimeFieldTypes[] + total_field_count?: long + total_deduplicated_field_count?: long total_deduplicated_mapping_size?: ByteSize total_deduplicated_mapping_size_in_bytes?: long + source_modes: Record } export interface ClusterStatsIndexingPressure { - memory: ClusterStatsIndexingPressureMemory -} - -export interface ClusterStatsIndexingPressureMemory { - current: ClusterStatsIndexingPressureMemorySummary - limit_in_bytes: long - total: ClusterStatsIndexingPressureMemorySummary -} - -export interface ClusterStatsIndexingPressureMemorySummary { - all_in_bytes: long - combined_coordinating_and_primary_in_bytes: long - coordinating_in_bytes: long - coordinating_rejections?: long - primary_in_bytes: long - primary_rejections?: long - replica_in_bytes: long - replica_rejections?: long + memory: NodesIndexingPressureMemory } export interface ClusterStatsIndicesVersions { index_count: integer primary_shard_count: integer total_primary_bytes: long + total_primary_size?: ByteSize version: VersionString } @@ -9922,18 +10056,29 @@ export interface ClusterStatsNodePackagingType { export interface ClusterStatsOperatingSystemMemoryInfo { adjusted_total_in_bytes?: long + adjusted_total?: ByteSize free_in_bytes: long + free?: ByteSize free_percent: integer total_in_bytes: long + total?: ByteSize used_in_bytes: long + used?: ByteSize used_percent: integer } +export interface ClusterStatsPerRepositoryStats { + type: string + oldest_start_time_millis: UnitMillis + oldest_start_time?: DateFormat + current_counts: ClusterStatsRepositoryStatsCurrentCounts +} + export interface ClusterStatsRemoteClusterInfo { cluster_uuid: string mode: string skip_unavailable: boolean - transport_compress: string + 'transport.compress': string status: HealthStatus version: VersionString[] nodes_count: integer @@ -9947,6 +10092,23 @@ export interface ClusterStatsRemoteClusterInfo { mem_total?: string } +export interface ClusterStatsRepositoryStatsCurrentCounts { + snapshots: integer + clones: integer + finalizations: integer + deletions: integer + snapshot_deletions: integer + active_deletions: integer + shards: ClusterStatsRepositoryStatsShards +} + +export interface ClusterStatsRepositoryStatsShards { + total: integer + complete: integer + incomplete: integer + states: Record +} + export interface ClusterStatsRequest extends RequestBase { node_id?: NodeIds include_remotes?: boolean @@ -9972,16 +10134,45 @@ export interface ClusterStatsRuntimeFieldTypes { source_total: integer } +export interface ClusterStatsSearchUsageStats { + total: long + queries: Record + rescorers: Record + sections: Record + retrievers: Record +} + +export type ClusterStatsShardState = 'INIT' | 'SUCCESS' | 'FAILED' | 'ABORTED' | 'MISSING' | 'WAITING' | 'QUEUED' | 'PAUSED_FOR_NODE_REMOVAL' + +export interface ClusterStatsSnapshotCurrentCounts { + snapshots: integer + shard_snapshots: integer + snapshot_deletions: integer + concurrent_operations: integer + cleanups: integer +} + +export interface ClusterStatsSparseVectorStats { + value_count: long +} + export interface ClusterStatsStatsResponseBase extends NodesNodesResponseBase { cluster_name: Name cluster_uuid: Uuid indices: ClusterStatsClusterIndices nodes: ClusterStatsClusterNodes - status: HealthStatus + repositories: Record> + snapshots: ClusterStatsClusterSnapshotStats + status?: HealthStatus timestamp: long ccs: ClusterStatsCCSStats } +export interface ClusterStatsSynonymsStats { + count: integer + index_count: integer +} + export interface ConnectorConnector { api_key_id?: string api_key_secret_id?: string @@ -10740,6 +10931,7 @@ export interface EqlSearchRequest extends RequestBase { allow_partial_search_results?: boolean allow_partial_sequence_results?: boolean expand_wildcards?: ExpandWildcards + ccs_minimize_roundtrips?: boolean ignore_unavailable?: boolean keep_alive?: Duration keep_on_completion?: boolean @@ -11744,6 +11936,8 @@ export interface IndicesIndexingSlowlogTresholds { index?: IndicesSlowlogTresholdLevels } +export type IndicesIndicesBlockOptions = 'metadata' | 'read' | 'read_only' | 'write' + export type IndicesManagedBy = 'Index Lifecycle Management' | 'Data stream lifecycle' | 'Unmanaged' export interface IndicesMappingLimitSettings { @@ -11914,6 +12108,7 @@ export type IndicesSourceMode = 'disabled' | 'stored' | 'synthetic' export interface IndicesStorage { type: IndicesStorageType allow_mmap?: boolean + stats_refresh_interval?: Duration } export type IndicesStorageType = 'fs' | 'niofs' | 'mmapfs' | 'hybridfs'| string @@ -11941,16 +12136,14 @@ export interface IndicesTranslogRetention { age?: Duration } -export type IndicesAddBlockIndicesBlockOptions = 'metadata' | 'read' | 'read_only' | 'write' - -export interface IndicesAddBlockIndicesBlockStatus { +export interface IndicesAddBlockAddIndicesBlockStatus { name: IndexName blocked: boolean } export interface IndicesAddBlockRequest extends RequestBase { index: IndexName - block: IndicesAddBlockIndicesBlockOptions + block: IndicesIndicesBlockOptions allow_no_indices?: boolean expand_wildcards?: ExpandWildcards ignore_unavailable?: boolean @@ -11961,7 +12154,7 @@ export interface IndicesAddBlockRequest extends RequestBase { export interface IndicesAddBlockResponse { acknowledged: boolean shards_acknowledged: boolean - indices: IndicesAddBlockIndicesBlockStatus[] + indices: IndicesAddBlockAddIndicesBlockStatus[] } export interface IndicesAnalyzeAnalyzeDetail { @@ -12171,6 +12364,10 @@ export interface IndicesDeleteRequest extends RequestBase { export type IndicesDeleteResponse = IndicesResponseBase +export interface IndicesDeleteAliasIndicesAliasesResponseBody extends AcknowledgedResponseBase { + errors?: boolean +} + export interface IndicesDeleteAliasRequest extends RequestBase { index: Indices name: Names @@ -12178,7 +12375,7 @@ export interface IndicesDeleteAliasRequest extends RequestBase { timeout?: Duration } -export type IndicesDeleteAliasResponse = AcknowledgedResponseBase +export type IndicesDeleteAliasResponse = IndicesDeleteAliasIndicesAliasesResponseBody export interface IndicesDeleteDataLifecycleRequest extends RequestBase { name: DataStreamNames @@ -12403,10 +12600,6 @@ export interface IndicesGetRequest extends RequestBase { export type IndicesGetResponse = Record -export interface IndicesGetAliasIndexAliases { - aliases: Record -} - export interface IndicesGetAliasRequest extends RequestBase { name?: Names index?: Indices @@ -12418,6 +12611,17 @@ export interface IndicesGetAliasRequest extends RequestBase { export type IndicesGetAliasResponse = Record +export interface IndicesGetAliasIndexAliases { + aliases: Record +} + +export interface IndicesGetAliasNotFoundAliasesKeys { + error: string + status: number +} +export type IndicesGetAliasNotFoundAliases = IndicesGetAliasNotFoundAliasesKeys + & { [property: string]: IndicesGetAliasIndexAliases | string | number } + export interface IndicesGetDataLifecycleDataStreamWithLifecycle { name: DataStreamName lifecycle?: IndicesDataStreamLifecycleWithRollover @@ -12884,6 +13088,9 @@ export interface IndicesRecoveryRequest extends RequestBase { index?: Indices active_only?: boolean detailed?: boolean + allow_no_indices?: boolean + expand_wildcards?: ExpandWildcards + ignore_unavailable?: boolean } export type IndicesRecoveryResponse = Record @@ -12953,6 +13160,27 @@ export interface IndicesReloadSearchAnalyzersRequest extends RequestBase { export type IndicesReloadSearchAnalyzersResponse = IndicesReloadSearchAnalyzersReloadResult +export interface IndicesRemoveBlockRemoveIndicesBlockStatus { + name: IndexName + unblocked?: boolean + exception?: ErrorCause +} + +export interface IndicesRemoveBlockRequest extends RequestBase { + index: IndexName + block: IndicesIndicesBlockOptions + allow_no_indices?: boolean + expand_wildcards?: ExpandWildcards + ignore_unavailable?: boolean + master_timeout?: Duration + timeout?: Duration +} + +export interface IndicesRemoveBlockResponse { + acknowledged: boolean + indices: IndicesRemoveBlockRemoveIndicesBlockStatus[] +} + export interface IndicesResolveClusterRequest extends RequestBase { name?: Names allow_no_indices?: boolean @@ -13491,6 +13719,31 @@ export interface InferenceAmazonBedrockTaskSettings { export type InferenceAmazonBedrockTaskType = 'completion' | 'text_embedding' +export type InferenceAmazonSageMakerApi = 'openai' | 'elastic' + +export interface InferenceAmazonSageMakerServiceSettings { + access_key: string + endpoint_name: string + api: InferenceAmazonSageMakerApi + region: string + secret_key: string + target_model?: string + target_container_hostname?: string + inference_component_name?: string + batch_size?: integer + dimensions?: integer +} + +export type InferenceAmazonSageMakerServiceType = 'amazon_sagemaker' + +export interface InferenceAmazonSageMakerTaskSettings { + custom_attributes?: string + enable_explanations?: string + inference_id?: string + session_id?: string + target_variant?: string +} + export interface InferenceAnthropicServiceSettings { api_key: string model_id: string @@ -13552,7 +13805,7 @@ export type InferenceCohereInputType = 'classification' | 'clustering' | 'ingest export interface InferenceCohereServiceSettings { api_key: string embedding_type?: InferenceCohereEmbeddingType - model_id?: string + model_id: string rate_limit?: InferenceRateLimitSetting similarity?: InferenceCohereSimilarityType } @@ -13562,7 +13815,7 @@ export type InferenceCohereServiceType = 'cohere' export type InferenceCohereSimilarityType = 'cosine' | 'dot_product' | 'l2_norm' export interface InferenceCohereTaskSettings { - input_type?: InferenceCohereInputType + input_type: InferenceCohereInputType return_documents?: boolean top_n?: integer truncate?: InferenceCohereTruncateType @@ -13608,6 +13861,40 @@ export interface InferenceContentObject { type: string } +export interface InferenceCustomRequestParams { + content: string +} + +export interface InferenceCustomResponseParams { + json_parser: any +} + +export interface InferenceCustomServiceSettings { + headers?: any + input_type?: any + query_parameters?: any + request: InferenceCustomRequestParams + response: InferenceCustomResponseParams + secret_parameters: any + url?: string +} + +export type InferenceCustomServiceType = 'custom' + +export interface InferenceCustomTaskSettings { + parameters?: any +} + +export type InferenceCustomTaskType = 'text_embedding' | 'sparse_embedding' | 'rerank' | 'completion' + +export interface InferenceDeepSeekServiceSettings { + api_key: string + model_id: string + url?: string +} + +export type InferenceDeepSeekServiceType = 'deepseek' + export interface InferenceDeleteInferenceEndpointResult extends AcknowledgedResponseBase { pipelines: string[] } @@ -13714,6 +14001,11 @@ export interface InferenceInferenceEndpointInfoAmazonBedrock extends InferenceIn task_type: InferenceTaskTypeAmazonBedrock } +export interface InferenceInferenceEndpointInfoAmazonSageMaker extends InferenceInferenceEndpoint { + inference_id: string + task_type: InferenceTaskTypeAmazonSageMaker +} + export interface InferenceInferenceEndpointInfoAnthropic extends InferenceInferenceEndpoint { inference_id: string task_type: InferenceTaskTypeAnthropic @@ -13734,6 +14026,16 @@ export interface InferenceInferenceEndpointInfoCohere extends InferenceInference task_type: InferenceTaskTypeCohere } +export interface InferenceInferenceEndpointInfoCustom extends InferenceInferenceEndpoint { + inference_id: string + task_type: InferenceTaskTypeCustom +} + +export interface InferenceInferenceEndpointInfoDeepSeek extends InferenceInferenceEndpoint { + inference_id: string + task_type: InferenceTaskTypeDeepSeek +} + export interface InferenceInferenceEndpointInfoELSER extends InferenceInferenceEndpoint { inference_id: string task_type: InferenceTaskTypeELSER @@ -13896,6 +14198,8 @@ export type InferenceTaskTypeAlibabaCloudAI = 'text_embedding' | 'rerank' | 'com export type InferenceTaskTypeAmazonBedrock = 'text_embedding' | 'completion' +export type InferenceTaskTypeAmazonSageMaker = 'text_embedding' | 'completion' | 'chat_completion' | 'sparse_embedding' | 'rerank' + export type InferenceTaskTypeAnthropic = 'completion' export type InferenceTaskTypeAzureAIStudio = 'text_embedding' | 'completion' @@ -13904,6 +14208,10 @@ export type InferenceTaskTypeAzureOpenAI = 'text_embedding' | 'completion' export type InferenceTaskTypeCohere = 'text_embedding' | 'rerank' | 'completion' +export type InferenceTaskTypeCustom = 'text_embedding' | 'sparse_embedding' | 'rerank' | 'completion' + +export type InferenceTaskTypeDeepSeek = 'completion' | 'chat_completion' + export type InferenceTaskTypeELSER = 'sparse_embedding' export type InferenceTaskTypeElasticsearch = 'sparse_embedding' | 'text_embedding' | 'rerank' @@ -14024,6 +14332,7 @@ export interface InferenceInferenceRequest extends RequestBase { body?: { query?: string input: string | string[] + input_type?: string task_settings?: InferenceTaskSettings } } @@ -14033,6 +14342,7 @@ export type InferenceInferenceResponse = InferenceInferenceResult export interface InferencePutRequest extends RequestBase { task_type?: InferenceTaskType inference_id: Id + timeout?: Duration body?: InferenceInferenceEndpoint } @@ -14041,6 +14351,7 @@ export type InferencePutResponse = InferenceInferenceEndpointInfo export interface InferencePutAlibabacloudRequest extends RequestBase { task_type: InferenceAlibabaCloudTaskType alibabacloud_inference_id: Id + timeout?: Duration body?: { chunking_settings?: InferenceInferenceChunkingSettings service: InferenceAlibabaCloudServiceType @@ -14054,6 +14365,7 @@ export type InferencePutAlibabacloudResponse = InferenceInferenceEndpointInfoAli export interface InferencePutAmazonbedrockRequest extends RequestBase { task_type: InferenceAmazonBedrockTaskType amazonbedrock_inference_id: Id + timeout?: Duration body?: { chunking_settings?: InferenceInferenceChunkingSettings service: InferenceAmazonBedrockServiceType @@ -14064,9 +14376,24 @@ export interface InferencePutAmazonbedrockRequest extends RequestBase { export type InferencePutAmazonbedrockResponse = InferenceInferenceEndpointInfoAmazonBedrock +export interface InferencePutAmazonsagemakerRequest extends RequestBase { + task_type: InferenceTaskTypeAmazonSageMaker + amazonsagemaker_inference_id: Id + timeout?: Duration + body?: { + chunking_settings?: InferenceInferenceChunkingSettings + service: InferenceAmazonSageMakerServiceType + service_settings: InferenceAmazonSageMakerServiceSettings + task_settings?: InferenceAmazonSageMakerTaskSettings + } +} + +export type InferencePutAmazonsagemakerResponse = InferenceInferenceEndpointInfoAmazonSageMaker + export interface InferencePutAnthropicRequest extends RequestBase { task_type: InferenceAnthropicTaskType anthropic_inference_id: Id + timeout?: Duration body?: { chunking_settings?: InferenceInferenceChunkingSettings service: InferenceAnthropicServiceType @@ -14080,6 +14407,7 @@ export type InferencePutAnthropicResponse = InferenceInferenceEndpointInfoAnthro export interface InferencePutAzureaistudioRequest extends RequestBase { task_type: InferenceAzureAiStudioTaskType azureaistudio_inference_id: Id + timeout?: Duration body?: { chunking_settings?: InferenceInferenceChunkingSettings service: InferenceAzureAiStudioServiceType @@ -14093,6 +14421,7 @@ export type InferencePutAzureaistudioResponse = InferenceInferenceEndpointInfoAz export interface InferencePutAzureopenaiRequest extends RequestBase { task_type: InferenceAzureOpenAITaskType azureopenai_inference_id: Id + timeout?: Duration body?: { chunking_settings?: InferenceInferenceChunkingSettings service: InferenceAzureOpenAIServiceType @@ -14106,6 +14435,7 @@ export type InferencePutAzureopenaiResponse = InferenceInferenceEndpointInfoAzur export interface InferencePutCohereRequest extends RequestBase { task_type: InferenceCohereTaskType cohere_inference_id: Id + timeout?: Duration body?: { chunking_settings?: InferenceInferenceChunkingSettings service: InferenceCohereServiceType @@ -14116,9 +14446,36 @@ export interface InferencePutCohereRequest extends RequestBase { export type InferencePutCohereResponse = InferenceInferenceEndpointInfoCohere +export interface InferencePutCustomRequest extends RequestBase { + task_type: InferenceCustomTaskType + custom_inference_id: Id + body?: { + chunking_settings?: InferenceInferenceChunkingSettings + service: InferenceCustomServiceType + service_settings: InferenceCustomServiceSettings + task_settings?: InferenceCustomTaskSettings + } +} + +export type InferencePutCustomResponse = InferenceInferenceEndpointInfoCustom + +export interface InferencePutDeepseekRequest extends RequestBase { + task_type: InferenceTaskTypeDeepSeek + deepseek_inference_id: Id + timeout?: Duration + body?: { + chunking_settings?: InferenceInferenceChunkingSettings + service: InferenceDeepSeekServiceType + service_settings: InferenceDeepSeekServiceSettings + } +} + +export type InferencePutDeepseekResponse = InferenceInferenceEndpointInfoDeepSeek + export interface InferencePutElasticsearchRequest extends RequestBase { task_type: InferenceElasticsearchTaskType elasticsearch_inference_id: Id + timeout?: Duration body?: { chunking_settings?: InferenceInferenceChunkingSettings service: InferenceElasticsearchServiceType @@ -14132,6 +14489,7 @@ export type InferencePutElasticsearchResponse = InferenceInferenceEndpointInfoEl export interface InferencePutElserRequest extends RequestBase { task_type: InferenceElserTaskType elser_inference_id: Id + timeout?: Duration body?: { chunking_settings?: InferenceInferenceChunkingSettings service: InferenceElserServiceType @@ -14144,6 +14502,7 @@ export type InferencePutElserResponse = InferenceInferenceEndpointInfoELSER export interface InferencePutGoogleaistudioRequest extends RequestBase { task_type: InferenceGoogleAiStudioTaskType googleaistudio_inference_id: Id + timeout?: Duration body?: { chunking_settings?: InferenceInferenceChunkingSettings service: InferenceGoogleAiServiceType @@ -14156,6 +14515,7 @@ export type InferencePutGoogleaistudioResponse = InferenceInferenceEndpointInfoG export interface InferencePutGooglevertexaiRequest extends RequestBase { task_type: InferenceGoogleVertexAITaskType googlevertexai_inference_id: Id + timeout?: Duration body?: { chunking_settings?: InferenceInferenceChunkingSettings service: InferenceGoogleVertexAIServiceType @@ -14169,6 +14529,7 @@ export type InferencePutGooglevertexaiResponse = InferenceInferenceEndpointInfoG export interface InferencePutHuggingFaceRequest extends RequestBase { task_type: InferenceHuggingFaceTaskType huggingface_inference_id: Id + timeout?: Duration body?: { chunking_settings?: InferenceInferenceChunkingSettings service: InferenceHuggingFaceServiceType @@ -14182,6 +14543,7 @@ export type InferencePutHuggingFaceResponse = InferenceInferenceEndpointInfoHugg export interface InferencePutJinaaiRequest extends RequestBase { task_type: InferenceJinaAITaskType jinaai_inference_id: Id + timeout?: Duration body?: { chunking_settings?: InferenceInferenceChunkingSettings service: InferenceJinaAIServiceType @@ -14195,6 +14557,7 @@ export type InferencePutJinaaiResponse = InferenceInferenceEndpointInfoJinaAi export interface InferencePutMistralRequest extends RequestBase { task_type: InferenceMistralTaskType mistral_inference_id: Id + timeout?: Duration body?: { chunking_settings?: InferenceInferenceChunkingSettings service: InferenceMistralServiceType @@ -14207,6 +14570,7 @@ export type InferencePutMistralResponse = InferenceInferenceEndpointInfoMistral export interface InferencePutOpenaiRequest extends RequestBase { task_type: InferenceOpenAITaskType openai_inference_id: Id + timeout?: Duration body?: { chunking_settings?: InferenceInferenceChunkingSettings service: InferenceOpenAIServiceType @@ -14220,6 +14584,7 @@ export type InferencePutOpenaiResponse = InferenceInferenceEndpointInfoOpenAI export interface InferencePutVoyageaiRequest extends RequestBase { task_type: InferenceVoyageAITaskType voyageai_inference_id: Id + timeout?: Duration body?: { chunking_settings?: InferenceInferenceChunkingSettings service: InferenceVoyageAIServiceType @@ -14233,6 +14598,7 @@ export type InferencePutVoyageaiResponse = InferenceInferenceEndpointInfoVoyageA export interface InferencePutWatsonxRequest extends RequestBase { task_type: InferenceWatsonxTaskType watsonx_inference_id: Id + timeout?: Duration body?: { service: InferenceWatsonxServiceType service_settings: InferenceWatsonxServiceSettings @@ -14266,6 +14632,7 @@ export type InferenceSparseEmbeddingResponse = InferenceSparseEmbeddingInference export interface InferenceStreamCompletionRequest extends RequestBase { inference_id: Id + timeout?: Duration body?: { input: string | string[] task_settings?: InferenceTaskSettings @@ -14897,7 +15264,6 @@ export interface IngestGetIpLocationDatabaseDatabaseConfigurationMetadata { export interface IngestGetIpLocationDatabaseRequest extends RequestBase { id?: Ids - master_timeout?: Duration } export interface IngestGetIpLocationDatabaseResponse { @@ -15069,7 +15435,7 @@ export interface LicensePostStartBasicResponse { export interface LicensePostStartTrialRequest extends RequestBase { acknowledge?: boolean - type_query_string?: string + type?: string master_timeout?: Duration } @@ -18138,6 +18504,7 @@ export interface NodesJvmMemoryStats { heap_used_percent?: long heap_committed_in_bytes?: long heap_max_in_bytes?: long + heap_max?: ByteSize non_heap_used_in_bytes?: long non_heap_committed_in_bytes?: long pools?: Record @@ -18212,6 +18579,8 @@ export interface NodesPressureMemory { coordinating_rejections?: long primary_rejections?: long replica_rejections?: long + primary_document_rejections?: long + large_operation_rejections?: long } export interface NodesProcess { @@ -18413,12 +18782,13 @@ export interface NodesInfoNodeInfo { build_flavor: string build_hash: string build_type: string + component_versions: Record host: Host http?: NodesInfoNodeInfoHttp + index_version: VersionNumber ip: Ip jvm?: NodesInfoNodeJvmInfo name: Name - network?: NodesInfoNodeInfoNetwork os?: NodesInfoNodeOperatingSystemInfo plugins?: PluginStats[] process?: NodesInfoNodeProcessInfo @@ -18429,10 +18799,12 @@ export interface NodesInfoNodeInfo { total_indexing_buffer_in_bytes?: ByteSize transport?: NodesInfoNodeInfoTransport transport_address: TransportAddress + transport_version: VersionNumber version: VersionString modules?: PluginStats[] ingest?: NodesInfoNodeInfoIngest aggregations?: Record + remote_cluster_server?: NodesInfoRemoveClusterServer } export interface NodesInfoNodeInfoAction { @@ -18452,7 +18824,7 @@ export interface NodesInfoNodeInfoClient { } export interface NodesInfoNodeInfoDiscoverKeys { - seed_hosts?: string[] + seed_hosts?: string[] | string type?: string seed_providers?: string[] } @@ -18500,17 +18872,6 @@ export interface NodesInfoNodeInfoMemory { total_in_bytes: long } -export interface NodesInfoNodeInfoNetwork { - primary_interface: NodesInfoNodeInfoNetworkInterface - refresh_interval: integer -} - -export interface NodesInfoNodeInfoNetworkInterface { - address: string - mac_address: string - name: Name -} - export interface NodesInfoNodeInfoOSCPU { cache_size: string cache_size_in_bytes: integer @@ -18572,7 +18933,7 @@ export interface NodesInfoNodeInfoSettingsCluster { name: Name routing?: IndicesIndexRouting election: NodesInfoNodeInfoSettingsClusterElection - initial_master_nodes?: string[] + initial_master_nodes?: string[] | string deprecation_indexing?: NodesInfoDeprecationIndexing } @@ -18642,6 +19003,7 @@ export interface NodesInfoNodeInfoSettingsTransport { type: NodesInfoNodeInfoSettingsTransportType | string 'type.default'?: string features?: NodesInfoNodeInfoSettingsTransportFeatures + ignore_deserialization_errors?: SpecUtilsStringified } export interface NodesInfoNodeInfoSettingsTransportFeatures { @@ -18719,7 +19081,6 @@ export interface NodesInfoNodeJvmInfo { vm_vendor: string vm_version: VersionString using_bundled_jdk: boolean - bundled_jdk: boolean using_compressed_ordinary_object_pointers?: boolean | string input_arguments: string[] } @@ -18752,6 +19113,11 @@ export interface NodesInfoNodeThreadPoolInfo { type: string } +export interface NodesInfoRemoveClusterServer { + bound_address: TransportAddress[] + publish_address: TransportAddress +} + export interface NodesInfoRequest extends RequestBase { node_id?: NodeIds metric?: Metrics @@ -20033,9 +20399,6 @@ export interface SecurityGetUserRequest extends RequestBase { export type SecurityGetUserResponse = Record export interface SecurityGetUserPrivilegesRequest extends RequestBase { - application?: Name - priviledge?: Name - username?: Name | null } export interface SecurityGetUserPrivilegesResponse { @@ -20073,6 +20436,7 @@ export interface SecurityGrantApiKeyGrantApiKey { } export interface SecurityGrantApiKeyRequest extends RequestBase { + refresh?: Refresh body?: { api_key: SecurityGrantApiKeyGrantApiKey grant_type: SecurityGrantApiKeyApiKeyGrantType @@ -21105,6 +21469,7 @@ export interface SnapshotDeleteRequest extends RequestBase { repository: Name snapshot: Name master_timeout?: Duration + wait_for_completion?: boolean } export type SnapshotDeleteResponse = AcknowledgedResponseBase diff --git a/package-lock.json b/package-lock.json index d8f36c63ae..d72f33ac58 100644 --- a/package-lock.json +++ b/package-lock.json @@ -5,7 +5,7 @@ "packages": { "": { "dependencies": { - "@redocly/cli": "^1.34.3", + "@redocly/cli": "^1.34.5", "@stoplight/spectral-cli": "^6.14.2" } }, @@ -489,9 +489,9 @@ } }, "node_modules/@redocly/cli": { - "version": "1.34.3", - "resolved": "https://registry.npmjs.org/@redocly/cli/-/cli-1.34.3.tgz", - "integrity": "sha512-GJNBTMfm5wTCtH6K+RtPQZuGbqflMclXqAZ5My12tfux6xFDMW1l0MNd5RMpnIS1aeFcDX++P1gnnROWlesj4w==", + "version": "1.34.5", + "resolved": "https://registry.npmjs.org/@redocly/cli/-/cli-1.34.5.tgz", + "integrity": "sha512-5IEwxs7SGP5KEXjBKLU8Ffdz9by/KqNSeBk6YUVQaGxMXK//uYlTJIPntgUXbo1KAGG2d2q2XF8y4iFz6qNeiw==", "license": "MIT", "dependencies": { "@opentelemetry/api": "1.9.0", @@ -500,14 +500,14 @@ "@opentelemetry/sdk-trace-node": "1.26.0", "@opentelemetry/semantic-conventions": "1.27.0", "@redocly/config": "^0.22.0", - "@redocly/openapi-core": "1.34.3", - "@redocly/respect-core": "1.34.3", + "@redocly/openapi-core": "1.34.5", + "@redocly/respect-core": "1.34.5", "abort-controller": "^3.0.0", "chokidar": "^3.5.1", "colorette": "^1.2.0", "core-js": "^3.32.1", - "dotenv": "^16.4.7", - "form-data": "^4.0.0", + "dotenv": "16.4.7", + "form-data": "^4.0.4", "get-port-please": "^3.0.1", "glob": "^7.1.6", "handlebars": "^4.7.6", @@ -537,9 +537,9 @@ "license": "MIT" }, "node_modules/@redocly/openapi-core": { - "version": "1.34.3", - "resolved": "https://registry.npmjs.org/@redocly/openapi-core/-/openapi-core-1.34.3.tgz", - "integrity": "sha512-3arRdUp1fNx55itnjKiUhO6t4Mf91TsrTIYINDNLAZPS0TPd5YpiXRctwjel0qqWoOOhjA34cZ3m4dksLDFUYg==", + "version": "1.34.5", + "resolved": "https://registry.npmjs.org/@redocly/openapi-core/-/openapi-core-1.34.5.tgz", + "integrity": "sha512-0EbE8LRbkogtcCXU7liAyC00n9uNG9hJ+eMyHFdUsy9lB/WGqnEBgwjA9q2cyzAVcdTkQqTBBU1XePNnN3OijA==", "license": "MIT", "dependencies": { "@redocly/ajv": "^8.11.2", @@ -558,20 +558,20 @@ } }, "node_modules/@redocly/respect-core": { - "version": "1.34.3", - "resolved": "https://registry.npmjs.org/@redocly/respect-core/-/respect-core-1.34.3.tgz", - "integrity": "sha512-vo/gu7dRGwTVsRueVSjVk04jOQuL0w22RBJRdRUWkfyse791tYXgMCOx35ijKekL83Q/7Okxf/YX6UY1v5CAug==", + "version": "1.34.5", + "resolved": "https://registry.npmjs.org/@redocly/respect-core/-/respect-core-1.34.5.tgz", + "integrity": "sha512-GheC/g/QFztPe9UA9LamooSplQuy9pe0Yr8XGTqkz0ahivLDl7svoy/LSQNn1QH3XGtLKwFYMfTwFR2TAYyh5Q==", "license": "MIT", "dependencies": { "@faker-js/faker": "^7.6.0", "@redocly/ajv": "8.11.2", - "@redocly/openapi-core": "1.34.3", + "@redocly/openapi-core": "1.34.5", "better-ajv-errors": "^1.2.0", "colorette": "^2.0.20", "concat-stream": "^2.0.0", "cookie": "^0.7.2", - "dotenv": "16.4.5", - "form-data": "4.0.0", + "dotenv": "16.4.7", + "form-data": "^4.0.4", "jest-diff": "^29.3.1", "jest-matcher-utils": "^29.3.1", "js-yaml": "4.1.0", @@ -594,32 +594,6 @@ "integrity": "sha512-IfEDxwoWIjkeXL1eXcDiow4UbKjhLdq6/EuSVR9GMN7KVH3r9gQ83e73hsz1Nd1T3ijd5xv1wcWRYO+D6kCI2w==", "license": "MIT" }, - "node_modules/@redocly/respect-core/node_modules/dotenv": { - "version": "16.4.5", - "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-16.4.5.tgz", - "integrity": "sha512-ZmdL2rui+eB2YwhsWzjInR8LldtZHGDoQ1ugH85ppHKwpUHL7j7rN0Ti9NCnGiQbhaZ11FpR+7ao1dNsmduNUg==", - "license": "BSD-2-Clause", - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://dotenvx.com" - } - }, - "node_modules/@redocly/respect-core/node_modules/form-data": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.0.tgz", - "integrity": "sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==", - "license": "MIT", - "dependencies": { - "asynckit": "^0.4.0", - "combined-stream": "^1.0.8", - "mime-types": "^2.1.12" - }, - "engines": { - "node": ">= 6" - } - }, "node_modules/@rollup/plugin-commonjs": { "version": "22.0.2", "resolved": "https://registry.npmjs.org/@rollup/plugin-commonjs/-/plugin-commonjs-22.0.2.tgz", @@ -1961,9 +1935,9 @@ } }, "node_modules/dotenv": { - "version": "16.5.0", - "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-16.5.0.tgz", - "integrity": "sha512-m/C+AwOAr9/W1UOIZUo232ejMNnJAJtYQjUbHoNTBNTJSvqzzDh7vnrei3o3r3m9blf6ZoDkvcw0VmozNRFJxg==", + "version": "16.4.7", + "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-16.4.7.tgz", + "integrity": "sha512-47qPchRCykZC03FhkYAhrvwU4xDBFIj1QPqaarj6mdM/hgUzfPHcpkHJOn3mJAufFeeAxAzeGsr5X0M4k6fLZQ==", "license": "BSD-2-Clause", "engines": { "node": ">=12" @@ -2291,9 +2265,9 @@ "license": "MIT" }, "node_modules/form-data": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.3.tgz", - "integrity": "sha512-qsITQPfmvMOSAdeyZ+12I1c+CKSstAFAwu+97zrnWAbIr5u8wfsExUzCesVLC8NgHuRUqNN4Zy6UPWUTRGslcA==", + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.4.tgz", + "integrity": "sha512-KrGhL9Q4zjj0kiUt5OO4Mr/A/jlI2jDYs5eHBpYHPcBEVSiipAvn2Ko2HnPe20rmcuuvMHNdZFp+4IlGTMF0Ow==", "license": "MIT", "dependencies": { "asynckit": "^0.4.0", @@ -3761,15 +3735,15 @@ } }, "node_modules/open": { - "version": "10.1.2", - "resolved": "https://registry.npmjs.org/open/-/open-10.1.2.tgz", - "integrity": "sha512-cxN6aIDPz6rm8hbebcP7vrQNhvRcveZoJU72Y7vskh4oIm+BZwBECnx5nTmrlres1Qapvx27Qo1Auukpf8PKXw==", + "version": "10.2.0", + "resolved": "https://registry.npmjs.org/open/-/open-10.2.0.tgz", + "integrity": "sha512-YgBpdJHPyQ2UE5x+hlSXcnejzAvD0b22U2OuAP+8OnlJT+PjWPxtgmGqKKc+RgTM63U9gN0YzrYc71R2WT/hTA==", "license": "MIT", "dependencies": { "default-browser": "^5.2.1", "define-lazy-prop": "^3.0.0", "is-inside-container": "^1.0.0", - "is-wsl": "^3.1.0" + "wsl-utils": "^0.1.0" }, "engines": { "node": ">=18" @@ -5246,6 +5220,21 @@ } } }, + "node_modules/wsl-utils": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/wsl-utils/-/wsl-utils-0.1.0.tgz", + "integrity": "sha512-h3Fbisa2nKGPxCpm89Hk33lBLsnaGBvctQopaBSOW/uIs6FTe1ATyAnKFJrzVs9vpGdsTe73WF3V4lIsk4Gacw==", + "license": "MIT", + "dependencies": { + "is-wsl": "^3.1.0" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/y18n": { "version": "5.0.8", "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", diff --git a/package.json b/package.json index 894d629b9b..a8d71d5a7b 100644 --- a/package.json +++ b/package.json @@ -3,7 +3,7 @@ "transform-to-openapi": "npm run transform-to-openapi --prefix compiler --" }, "dependencies": { - "@redocly/cli": "^1.34.3", + "@redocly/cli": "^1.34.5", "@stoplight/spectral-cli": "^6.14.2" } } diff --git a/specification/_doc_ids/product-meta.json b/specification/_doc_ids/product-meta.json index f2f4f91363..44adc7d8a0 100644 --- a/specification/_doc_ids/product-meta.json +++ b/specification/_doc_ids/product-meta.json @@ -1,6 +1,6 @@ { - "fleet": "fleet", - "inference": "machine-learning", - "logstash": "logstash", - "ml": "machine-learning" + "fleet": "Fleet", + "inference": "Machine Learning", + "logstash": "Logstash", + "ml": "Machine Learning" } diff --git a/specification/_doc_ids/table.csv b/specification/_doc_ids/table.csv index 6a0a214e4f..b5039d7ce1 100644 --- a/specification/_doc_ids/table.csv +++ b/specification/_doc_ids/table.csv @@ -1,927 +1,939 @@ -doc_id,doc_url,previous_version_doc_url -ack-watch, https://www.elastic.co/docs/explore-analyze/alerts-cases/watcher/actions#example, -apis,https://www.elastic.co/docs/api/doc/elasticsearch, -add-nodes,https://www.elastic.co/docs/deploy-manage/maintenance/add-and-remove-elasticsearch-nodes, -alias-update,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-put-alias,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/indices-add-alias.html -aliases-update,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-update-aliases,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/indices-aliases.html -alibabacloud-api-keys,https://opensearch.console.aliyun.com/cn-shanghai/rag/api-key, -analysis-analyzers,https://www.elastic.co/docs/reference/text-analysis/analyzer-reference, -amazonbedrock-models,https://docs.aws.amazon.com/bedrock/latest/userguide/models-supported.html, -amazonbedrock-secret-keys,https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_access-keys.html, -analysis-charfilters,https://www.elastic.co/docs/reference/text-analysis/character-filter-reference, -analysis-normalizers,https://www.elastic.co/docs/reference/text-analysis/normalizers, -analysis-standard-analyzer,https://www.elastic.co/docs/reference/text-analysis/analysis-standard-analyzer, -analysis-tokenfilters,https://www.elastic.co/docs/reference/text-analysis/token-filter-reference, -analysis-tokenizers,https://www.elastic.co/docs/reference/text-analysis/tokenizer-reference, -analysis,https://www.elastic.co/docs/manage-data/data-store/text-analysis, -analyze-repository,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-snapshot-repository-analyze,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/repo-analysis-api.html -analyzer-anatomy,https://www.elastic.co/docs/manage-data/data-store/text-analysis/anatomy-of-an-analyzer, -analyzer-update-existing,https://www.elastic.co/docs/manage-data/data-store/text-analysis/specify-an-analyzer#update-analyzers-on-existing-indices, -anthropic-messages,https://docs.anthropic.com/en/api/messages, -anthropic-models,https://docs.anthropic.com/en/docs/about-claude/models/all-models#model-names, -api-date-math-index-names,https://www.elastic.co/docs/reference/elasticsearch/rest-apis/api-conventions#api-date-math-index-names, -api-root,https://www.elastic.co/docs/api/doc/elasticsearch/group/endpoint-info,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/rest-api-root.html -append-processor,https://www.elastic.co/docs/reference/enrich-processor/append-processor, -async-search,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-async-search-submit,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/async-search.html -attachment,https://www.elastic.co/docs/reference/enrich-processor/attachment, -autoscaling,https://www.elastic.co/docs/deploy-manage/autoscaling, -autoscaling-deciders,https://www.elastic.co/docs/deploy-manage/autoscaling/autoscaling-deciders, -autoscaling-delete-autoscaling-policy,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-autoscaling-delete-autoscaling-policy,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/autoscaling-delete-autoscaling-policy.html -autoscaling-get-autoscaling-capacity,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-autoscaling-get-autoscaling-capacity,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/autoscaling-get-autoscaling-capacity.html -autoscaling-get-autoscaling-policy,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-autoscaling-get-autoscaling-policy,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/autoscaling-get-autoscaling-policy.html -autoscaling-put-autoscaling-policy,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-autoscaling-put-autoscaling-policy,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/autoscaling-put-autoscaling-policy.html -avoid-index-pattern-collisions,https://www.elastic.co/docs/manage-data/data-store/templates#avoid-index-pattern-collisions, -azureaistudio-api-keys,https://ai.azure.com/, -azureaistudio-endpoint-types,https://learn.microsoft.com/en-us/azure/ai-foundry/concepts/deployments-overview#billing-for-deploying-and-inferencing-llms-in-azure-ai-studio, -azureopenai,https://oai.azure.com/, -azureopenai-auth,https://learn.microsoft.com/en-us/azure/ai-services/openai/reference#authentication, -azureopenai-portal,https://portal.azure.com/#view/HubsExtension/BrowseAll, -azureopenai-quota-limits,https://learn.microsoft.com/en-us/azure/ai-services/openai/quotas-limits, -behavioral-analytics-collection-event,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-search-application-post-behavioral-analytics-event,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/post-analytics-collection-event.html -behavioral-analytics-event-reference,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/behavioral-analytics-event-reference.html, -byte-units,https://www.elastic.co/docs/reference/elasticsearch/rest-apis/api-conventions#byte-units, -bytes-processor,https://www.elastic.co/docs/reference/enrich-processor/bytes-processor, -calendar-and-fixed-intervals,https://www.elastic.co/docs/reference/aggregations/search-aggregations-bucket-datehistogram-aggregation#calendar_and_fixed_intervals, -cat-alias,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-cat-aliases,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/cat-alias.html -cat-allocation,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-cat-allocation,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/cat-allocation.html -cat-anomaly-detectors,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-cat-ml-jobs,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/cat-anomaly-detectors.html -cat-component-templates,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-cat-component-templates,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/cat-component-templates.html -cat-count,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-cat-count,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/cat-count.html -cat-datafeeds,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-cat-ml-datafeeds,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/cat-datafeeds.html -cat-dfanalytics,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-cat-ml-data-frame-analytics,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/cat-dfanalytics.html -cat-fielddata,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-cat-fielddata,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/cat-fielddata.html -cat-health,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-cat-health,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/cat-health.html -cat-indices,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-cat-indices,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/cat-indices.html -cat-master,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-cat-master,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/cat-master.html -cat-nodeattrs,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-cat-nodeattrs,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/cat-nodeattrs.html -cat-nodes,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-cat-nodes,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/cat-nodes.html -cat-pending-tasks,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-cat-pending-tasks,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/cat-pending-tasks.html -cat-plugins,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-cat-plugins,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/cat-plugins.html -cat-recovery,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-cat-recovery,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/cat-recovery.html -cat-repositories,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-cat-repositories,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/cat-repositories.html -cat-segments,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-cat-segments,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/cat-segments.html -cat-shards,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-cat-shards,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/cat-shards.html -cat-snapshots,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-cat-snapshots,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/cat-snapshots.html -cat-tasks,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-cat-tasks,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/cat-tasks.html -cat-templates,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-cat-templates,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/cat-templates.html -cat-thread-pool,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-cat-thread-pool,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/cat-thread-pool.html -cat-trained-model,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-cat-ml-trained-models,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/cat-trained-model.html -cat-transforms,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-cat-transforms,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/cat-transforms.html -cat,https://www.elastic.co/docs/api/doc/elasticsearch/group/endpoint-cat,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/cat.html -ccr,https://www.elastic.co/docs/deploy-manage/tools/cross-cluster-replication, -ccr-auto-follow,https://www.elastic.co/docs/deploy-manage/tools/cross-cluster-replication/manage-auto-follow-patterns, -ccr-delete-auto-follow-pattern,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ccr-delete-auto-follow-pattern,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/ccr-delete-auto-follow-pattern.html -ccr-get-auto-follow-pattern,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ccr-get-auto-follow-pattern-1,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/ccr-get-auto-follow-pattern.html -ccr-get-follow-info,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ccr-follow-info,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/ccr-get-follow-info.html -ccr-get-follow-stats,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ccr-follow-stats,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/ccr-get-follow-stats.html -ccr-get-stats,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ccr-stats,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/ccr-get-stats.html -ccr-pause-auto-follow-pattern,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ccr-pause-auto-follow-pattern,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/ccr-pause-auto-follow-pattern.html -ccr-post-forget-follower,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ccr-forget-follower,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/ccr-post-forget-follower.html -ccr-post-pause-follow,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ccr-pause-follow,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/ccr-post-pause-follow.html -ccr-post-resume-follow,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ccr-resume-follow,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/ccr-post-resume-follow.html -ccr-post-unfollow,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ccr-unfollow,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/ccr-post-unfollow.html -ccr-put-auto-follow-pattern,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ccr-put-auto-follow-pattern,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/ccr-put-auto-follow-pattern.html -ccr-put-follow,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ccr-follow,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/ccr-put-follow.html -ccr-resume-auto-follow-pattern,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ccr-resume-auto-follow-pattern,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/ccr-resume-auto-follow-pattern.html -ccs-network-delays,https://www.elastic.co/docs/solutions/search/cross-cluster-search#ccs-network-delays, -ccs-privileges,https://www.elastic.co/docs/deploy-manage/remote-clusters/remote-clusters-cert#remote-clusters-privileges-ccs, -clean-up-snapshot-repo,https://www.elastic.co/docs/deploy-manage/tools/snapshot-and-restore/self-managed#snapshots-repository-cleanup, -clear-repositories-metering-archive-api,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-nodes-clear-repositories-metering-archive,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/clear-repositories-metering-archive-api.html -clear-scroll-api,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-clear-scroll,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/clear-scroll-api.html -clear-trained-model,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ml-clear-trained-model-deployment-cache,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/clear-trained-model-deployment-cache.html -cluster-allocation-explain,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-cluster-allocation-explain,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/cluster-allocation-explain.html -cluster-allocation-explain-examples,https://www.elastic.co/docs/troubleshoot/elasticsearch/cluster-allocation-api-examples, -cluster-get-settings,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-cluster-get-settings,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/cluster-get-settings.html -cluster-health,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-cluster-health,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/cluster-health.html -cluster-info,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-cluster-info,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/cluster-info.html -cluster-name,https://www.elastic.co/docs/deploy-manage/deploy/self-managed/important-settings-configuration##_cluster_name_setting, -cluster-nodes-hot-threads,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-nodes-hot-threads,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/cluster-nodes-hot-threads.html -cluster-nodes-info,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-nodes-info,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/cluster-nodes-info.html -cluster-nodes-reload-secure-settings,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-nodes-reload-secure-settings,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/cluster-nodes-reload-secure-settings.html -cluster-nodes-stats,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-nodes-stats,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/cluster-nodes-stats.html -cluster-nodes-usage,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-nodes-usage,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/cluster-nodes-usage.html -cluster-nodes,https://www.elastic.co/docs/reference/elasticsearch/rest-apis/api-conventions#cluster-nodes, -cluster-pending,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-cluster-pending-tasks,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/cluster-pending.html -cluster-ping,https://www.elastic.co/docs/api/doc/elasticsearch/group/endpoint-cluster,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/cluster.html -cluster-remote-info,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-cluster-remote-info,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/cluster-remote-info.html -cluster-reroute,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-cluster-reroute,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/cluster-reroute.html -cluster-state,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-cluster-state,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/cluster-state.html -cluster-stats,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-cluster-stats,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/cluster-stats.html -cluster-update-settings,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-cluster-put-settings,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/cluster-update-settings.html -cluster,https://www.elastic.co/docs/api/doc/elasticsearch/group/endpoint-cluster,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/cluster.html -cohere-api-keys,https://dashboard.cohere.com/api-keys, -cohere-models,https://docs.cohere.com/docs/models#command, -common-options,https://www.elastic.co/docs/reference/elasticsearch/rest-apis/common-options, -community-id-processor,https://www.elastic.co/docs/reference/enrich-processor/community-id-processor, -connector-sync-job-cancel,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-connector-sync-job-cancel,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/cancel-connector-sync-job-api.html -connector-sync-job-checkin,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-connector-sync-job-check-in,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/check-in-connector-sync-job-api.html -connector-sync-job-claim,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-connector-sync-job-claim,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/claim-connector-sync-job-api.html -connector-sync-job-error,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-connector-sync-job-error,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/set-connector-sync-job-error-api.html -collapse-search-results,https://www.elastic.co/docs/reference/elasticsearch/rest-apis/collapse-search-results, -connector-sync-job-delete,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-connector-sync-job-delete,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/delete-connector-sync-job-api.html -connector-sync-job-get,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-connector-sync-job-get,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/get-connector-sync-job-api.html -connector-sync-job-post,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-connector-sync-job-post,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/create-connector-sync-job-api.html -connector-sync-job-list,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-connector-sync-job-list,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/list-connector-sync-jobs-api.html -connector-sync-job-stats,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-connector-sync-job-update-stats,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/set-connector-sync-job-stats-api.html -connector-checkin,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-connector-check-in,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/check-in-connector-api.html -connector-delete,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-connector-delete,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/delete-connector-api.html -connector-features,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-connector-update-features,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/update-connector-features-api.html -connector-get,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-connector-get,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/get-connector-api.html -connector-last-sync,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-connector-last-sync,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/update-connector-last-sync-api.html -connector-list,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-connector-list,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/list-connector-api.html -connector-post,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-connector-put,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/create-connector-api.html -connector-put,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-connector-put,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/create-connector-api.html -connector-configuration,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-connector-update-configuration,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/update-connector-configuration-api.html -connector-update-api-key-id,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-connector-update-api-key-id,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/update-connector-api-key-id-api.html -connector-update-error,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-connector-update-error,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/update-connector-error-api.html -connector-update-filtering,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-connector-update-filtering,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/update-connector-filtering-api.html -connector-update-filtering-validation,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-connector-update-filtering-validation, -connector-update-index-name,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-connector-update-index-name,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/update-connector-index-name-api.html -connector-update-name,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-connector-update-name,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/update-connector-name-description-api.html -connector-update-native,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-connector-update-native, -connector-update-pipeline,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-connector-update-pipeline,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/update-connector-pipeline-api.html -connector-update-scheduling,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-connector-update-scheduling,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/update-connector-scheduling-api.html -connector-update-service-type,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-connector-update-service-type,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/update-connector-service-type-api.html -connector-update-status,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-connector-update-status,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/update-connector-status-api.html -convert-processor,https://www.elastic.co/docs/reference/enrich-processor/convert-processor, -cron-expressions,https://www.elastic.co/docs/reference/elasticsearch/rest-apis/api-conventions#api-cron-expressions, -csv-processor,https://www.elastic.co/docs/reference/enrich-processor/csv-processor, -dangling-index-delete,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-dangling-indices-delete-dangling-index,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/dangling-index-delete.html -dangling-index-import,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-dangling-indices-import-dangling-index,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/dangling-index-import.html -dangling-indices-list,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-dangling-indices-list-dangling-indices,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/dangling-indices-list.html -data-processor,https://www.elastic.co/docs/reference/enrich-processor/date-processor, -data-stream-delete,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-delete-data-stream,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/indices-delete-data-stream.html -data-stream-delete-lifecycle,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-delete-data-lifecycle,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/data-streams-delete-lifecycle.html -data-stream-explain-lifecycle,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-explain-data-lifecycle,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/data-streams-explain-lifecycle.html -data-stream-get,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-get-data-stream,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/indices-get-data-stream.html -data-stream-get-lifecycle,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-get-data-lifecycle,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/data-streams-get-lifecycle.html -data-stream-lifecycle,https://www.elastic.co/docs/manage-data/lifecycle/data-stream, -data-stream-lifecycle-stats,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-get-data-lifecycle-stats,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/data-streams-get-lifecycle-stats.html -data-stream-migrate,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-migrate-to-data-stream,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/indices-migrate-to-data-stream.html -data-stream-promote,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-promote-data-stream,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/promote-data-stream-api.html -data-stream-put-lifecycle,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-put-data-lifecycle,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/data-streams-put-lifecycle.html -data-stream-stats-api,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-data-streams-stats-1,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/data-stream-stats-api.html -data-stream-update,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-modify-data-stream,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/modify-data-streams-api.html -data-streams,https://www.elastic.co/docs/manage-data/data-store/data-streams, -date-index-name-processor,https://www.elastic.co/docs/reference/enrich-processor/date-index-name-processor, -dcg,https://www.elastic.co/docs/reference/elasticsearch/rest-apis/search-rank-eval#_discounted_cumulative_gain_dcg, -defining-roles,https://www.elastic.co/docs/deploy-manage/users-roles/cluster-or-deployment-auth/defining-roles, -delete-analytics-collection,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-search-application-delete-behavioral-analytics,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/delete-analytics-collection.html -delete-async-sql-search-api,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-sql-delete-async,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/delete-async-sql-search-api.html -delete-enrich-policy-api,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-enrich-delete-policy,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/delete-enrich-policy-api.html -delete-license,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-license-delete,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/delete-license.html -delete-pipeline-api,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ingest-delete-pipeline,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/delete-pipeline-api.html -delete-synonym-rule,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-synonyms-delete-synonym-rule,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/delete-synonym-rule.html -delete-synonyms-set,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-synonyms-delete-synonym,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/delete-synonyms-set.html -delete-trained-models-aliases,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ml-delete-trained-model-alias,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/delete-trained-models-aliases.html -delete-trained-models,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ml-delete-trained-model,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/delete-trained-models.html -delete-transform,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-transform-delete-transform,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/delete-transform.html -dissect-processor,https://www.elastic.co/docs/reference/enrich-processor/dissect-processor, -distance-units,https://www.elastic.co/docs/reference/elasticsearch/rest-apis/api-conventions#distance-units, -docs-bulk,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-bulk,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/docs-bulk.html -docs-delete-by-query,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-delete-by-query,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/docs-delete-by-query.html -docs-delete-by-query-rethrottle,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-delete-by-query-rethrottle, -docs-delete,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-delete,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/docs-delete.html -docs-get,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-get,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/docs-get.html -docs-index,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-create,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/docs-index_.html -docs-multi-get,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-mget,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/docs-multi-get.html -docs-multi-termvectors,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-mtermvectors,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/docs-multi-termvectors.html -docs-reindex,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-reindex,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/docs-reindex.html -docs-termvectors,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-termvectors,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/docs-termvectors.html -docs-update-by-query,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-update-by-query,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/docs-update-by-query.html -docs-update-by-query-rethrottle,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-update-by-query-rethrottle, -docs-update,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-update,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/docs-update.html -document-input-parameters,https://www.elastic.co/docs/reference/query-languages/query-dsl/query-dsl-mlt-query#_document_input_parameters, -docvalue-fields,https://www.elastic.co/docs/reference/elasticsearch/rest-apis/retrieve-selected-fields#docvalue-fields, -dot-expand-processor,https://www.elastic.co/docs/reference/enrich-processor/dot-expand-processor, -drop-processor,https://www.elastic.co/docs/reference/enrich-processor/drop-processor, -eland-import,https://www.elastic.co/docs/explore-analyze/machine-learning/nlp/ml-nlp-import-model#ml-nlp-import-script, -enrich-processor,https://www.elastic.co/docs/reference/enrich-processor/enrich-processor, -enrich-stats-api,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-enrich-stats,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/enrich-stats-api.html -eql-async-search-api,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-eql-get,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/get-async-eql-search-api.html -eql-async-search-delete,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-eql-delete,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/delete-async-eql-search-api.html -eql-async-search-status-api,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-eql-get-status,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/get-async-eql-status-api.html -eql-basic-syntax,https://www.elastic.co/docs/reference/query-languages/eql/eql-syntax#eql-basic-syntax, -eql-search-api,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-eql-search,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/eql-search-api.html -eql-sequences,https://www.elastic.co/docs/reference/query-languages/eql/eql-syntax#eql-sequences, -eql-missing-events,https://www.elastic.co/docs/reference/query-languages/eql/eql-syntax#eql-missing-events, -eql-syntax,https://www.elastic.co/docs/reference/query-languages/eql/eql-syntax, -eql,https://www.elastic.co/docs/explore-analyze/query-filter/languages/eql, -esql,https://www.elastic.co/docs/explore-analyze/query-filter/languages/esql, -esql-async-query,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-esql-async-query,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/esql-async-query-api.html -esql-async-query-delete,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-esql-async-query-delete,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/esql-async-query-delete-api.html -esql-async-query-get,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-esql-async-query-get,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/esql-async-query-get-api.html -esql-async-query-stop,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-esql-async-query-stop, -esql-query,https://www.elastic.co/docs/explore-analyze/query-filter/languages/esql-rest, -esql-query-params,https://www.elastic.co/docs/explore-analyze/query-filter/languages/esql-rest#esql-rest-params, -esql-returning-localized-results,https://www.elastic.co/docs/explore-analyze/query-filter/languages/esql-rest#esql-locale-param, -evaluate-dfanalytics,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ml-evaluate-data-frame,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/evaluate-dfanalytics.html -execute-enrich-policy-api,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-enrich-execute-policy,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/execute-enrich-policy-api.html -execute-watch,https://www.elastic.co/docs/explore-analyze/alerts-cases/watcher/execute-watch,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/watcher-api-execute-watch.html -expected-reciprocal,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-rank-eval#_expected_reciprocal_rank_err, -explain-dfanalytics,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ml-explain-data-frame-analytics,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/explain-dfanalytics.html -fail-processor,https://www.elastic.co/docs/reference/enrich-processor/fail-processor, -features-reset,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-features-reset-features,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/reset-features-api.html -field-and-document-access-control,https://www.elastic.co/docs/deploy-manage/users-roles/cluster-or-deployment-auth/controlling-access-at-document-field-level, -field-usage-stats,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-field-usage-stats,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/field-usage-stats.html -find-field-structure,https://www.elastic.co/docs/api/doc/elasticsearch/group/endpoint-text_structure,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/text-structure-apis.html -find-message-structure,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-text-structure-find-message-structure,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/find-message-structure.html -find-structure,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-text-structure-find-structure,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/find-structure.html -find-text-structure-examples,https://www.elastic.co/docs/reference/elasticsearch/rest-apis/find-text-structure-examples, -fingerprint-processor,https://www.elastic.co/docs/reference/enrich-processor/fingerprint-processor, -fleet-multi-search,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-fleet-msearch,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/fleet-multi-search.html -fleet-search,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-fleet-search,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/fleet-search.html -foreach-processor,https://www.elastic.co/docs/reference/enrich-processor/foreach-processor, -fuzziness,https://www.elastic.co/docs/reference/elasticsearch/rest-apis/common-options#fuzziness, -gap-policy,https://www.elastic.co/docs/reference/aggregations/pipeline#gap-policy, -geo-shape,https://www.elastic.co/docs/reference/elasticsearch/mapping-reference/geo-shape, -geo-grid-processor,https://www.elastic.co/docs/reference/enrich-processor/ingest-geo-grid-processor, -geoip-delete-database,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ingest-delete-geoip-database, -geoip-get-database,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ingest-get-geoip-database, -geoip-put-database,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ingest-put-geoip-database, -geoip-processor,https://www.elastic.co/docs/reference/enrich-processor/geoip-processor, -geoip-stats-api,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ingest-geo-ip-stats,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/geoip-stats-api.html -get-basic-status,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-license-get-basic-status,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/get-basic-status.html -get-dfanalytics-stats,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ml-get-data-frame-analytics-stats,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/get-dfanalytics-stats.html -get-dfanalytics,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ml-get-data-frame-analytics,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/get-dfanalytics.html -get-enrich-policy-api,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-enrich-get-policy,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/get-enrich-policy-api.html -get-features-api,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-features-get-features,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/get-features-api.html -get-global-checkpoints,https://www.elastic.co/docs/api/doc/elasticsearch/group/endpoint-fleet,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/fleet-apis.html -get-license,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-license-get,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/get-license.html -get-ml-info,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ml-info,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/get-ml-info.html -get-pipeline-api,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ingest-get-pipeline,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/get-pipeline-api.html -get-repositories-metering-api,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-nodes-get-repositories-metering-info,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/get-repositories-metering-api.html -get-synonym-rule,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-synonyms-get-synonym-rule,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/get-synonym-rule.html -get-synonyms-set,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-synonyms-get-synonym,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/get-synonyms-set.html -get-trained-models-stats,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ml-get-trained-models-stats,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/get-trained-models-stats.html -get-trained-models,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ml-get-trained-models,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/get-trained-models.html -get-transform-stats,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-transform-get-transform-stats,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/get-transform-stats.html -get-transform,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-transform-get-transform,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/get-transform.html -get-trial-status,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-license-get-trial-status,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/get-trial-status.html -googlevertexai-locations,https://cloud.google.com/vertex-ai/generative-ai/docs/learn/locations, -googlevertexai-models,https://cloud.google.com/vertex-ai/generative-ai/docs/model-reference/text-embeddings-api, -googleaistudio-models,https://ai.google.dev/gemini-api/docs/models, -graph,https://www.elastic.co/docs/explore-analyze/visualize/graph, -graph-explore-api,https://www.elastic.co/docs/api/doc/elasticsearch/group/endpoint-graph,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/graph-explore-api.html -grok,https://www.elastic.co/docs/explore-analyze/scripting/grok, -grok-processor,https://www.elastic.co/docs/reference/enrich-processor/grok-processor, -gsub-processor,https://www.elastic.co/docs/reference/enrich-processor/gsub-processor, -health-api,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-health-report,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/health-api.html -huggingface-chat-completion-interface,https://huggingface.co/docs/inference-providers/en/tasks/chat-completion#conversational-large-language-models-llms, -huggingface-tokens,https://huggingface.co/settings/tokens, -ilm-delete-lifecycle,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ilm-delete-lifecycle,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/ilm-delete-lifecycle.html -ilm-explain-lifecycle,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ilm-explain-lifecycle,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/ilm-explain-lifecycle.html -ilm-get-lifecycle,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ilm-get-lifecycle,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/ilm-get-lifecycle.html -ilm-get-status,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ilm-get-status,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/ilm-get-status.html -ilm-index-lifecycle,https://www.elastic.co/docs/manage-data/lifecycle/index-lifecycle-management/index-lifecycle, -ilm-migrate-to-data-tiers,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ilm-migrate-to-data-tiers,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/ilm-migrate-to-data-tiers.html -ilm-move-to-step,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ilm-move-to-step,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/ilm-move-to-step.html -ilm-put-lifecycle,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ilm-put-lifecycle,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/ilm-put-lifecycle.html -ilm-remove-policy,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ilm-remove-policy,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/ilm-remove-policy.html -ilm-retry-policy,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ilm-retry,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/ilm-retry-policy.html -ilm-start,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ilm-start,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/ilm-start.html -ilm-stop,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ilm-stop,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/ilm-stop.html -important-settings,https://www.elastic.co/docs/deploy-manage/deploy/self-managed/important-settings-configuration, -index-block-add,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-add-block, -index-modules-blocks,https://www.elastic.co/docs/reference/elasticsearch/index-settings/index-block, -index-modules-settings,https://www.elastic.co/docs/reference/elasticsearch/index-settings/index-modules, -index-modules-slowlog-slowlog,https://www.elastic.co/docs/reference/elasticsearch/index-settings/slow-log#index-slow-log, -index-modules,https://www.elastic.co/docs/reference/elasticsearch/index-settings/index-modules, -index,https://www.elastic.co/docs/get-started, -indexing-buffer,https://www.elastic.co/docs/reference/elasticsearch/configuration-reference/indexing-buffer-settings, -index-modules-merge,https://www.elastic.co/docs/reference/elasticsearch/index-settings/merge, -index-settings,https://www.elastic.co/docs/reference/elasticsearch/index-settings/, -index-templates,https://www.elastic.co/docs/manage-data/data-store/templates, -index-templates-exist,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-exists-index-template, -index-templates-put,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-put-index-template,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/indices-put-template.html -index-templates-v1,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-put-template,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/indices-templates-v1.html -indices-aliases,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-update-aliases,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/indices-aliases.html -indices-aliases-exist,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-exists-alias,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/indices-alias-exists.html -indices-analyze,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-analyze,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/indices-analyze.html -indices-clearcache,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-clear-cache,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/indices-clearcache.html -indices-clone-index,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-clone,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/indices-clone-index.html -indices-close,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-close,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/indices-close.html -indices-component-template,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-cluster-put-component-template,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/indices-component-template.html -indices-create-data-stream,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-create-data-stream,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/indices-create-data-stream.html -indices-create-index,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-create,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/indices-create-index.html -indices-delete-alias,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-delete-alias,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/indices-delete-alias.html -indices-delete-index,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-delete,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/indices-delete-index.html -indices-delete-template,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-delete-index-template,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/indices-delete-template.html -indices-delete-template-v1,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-delete-template,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/indices-delete-template-v1.html -indices-disk-usage,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-disk-usage,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/indices-disk-usage.html -indices-downsample-data-stream,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-downsample,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/indices-downsample-data-stream.html -indices-exists,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-exists,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/indices-exists.html -indices-flush,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-flush,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/indices-flush.html -indices-forcemerge,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-forcemerge,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/indices-forcemerge.html -indices-get-alias,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-get-alias,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/indices-get-alias.html -indices-get-data-stream-settings,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-get-data-stream-settings, -indices-get-field-mapping,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-get-mapping,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/indices-get-field-mapping.html -indices-get-index,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-get,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/indices-get-index.html -indices-get-mapping,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-get-mapping,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/indices-get-field-mapping.html -indices-get-settings,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-get-settings,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/indices-get-settings.html -indices-get-template,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-get-index-template,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/indices-get-template.html -indices-get-template-v1,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-get-template,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/indices-get-template-v1.html -indices-open-close,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-open,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/indices-open-close.html -indices-put-data-stream-settings,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-put-data-stream-settings, -indices-put-mapping,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-put-mapping,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/indices-put-mapping.html -indices-recovery,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-recovery,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/indices-recovery.html -indices-refresh,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-refresh,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/indices-refresh.html -indices-refresh-disable,https://www.elastic.co/docs/deploy-manage/production-guidance/optimize-performance/indexing-speed#disable-refresh-interval, -indices-reload-analyzers,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-reload-search-analyzers,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/indices-reload-analyzers.html -indices-resolve-cluster-api,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-resolve-cluster,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/indices-resolve-cluster-api.html -indices-resolve-index-api,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-resolve-index,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/indices-resolve-index-api.html -indices-rollover-index,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-rollover,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/indices-rollover-index.html -indices-segments,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-segments,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/indices-segments.html -indices-shards-stores,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-shard-stores,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/indices-shards-stores.html -indices-shrink-index,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-shrink,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/indices-shrink-index.html -indices-simulate,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-simulate-index-template,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/indices-simulate-index.html -indices-simulate-template,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-simulate-template,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/indices-simulate-template.html -indices-split-index,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-split,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/indices-split-index.html -indices-stats,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-stats,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/indices-stats.html -indices-template-exists-v1,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-exists-template,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/indices-template-exists-v1.html -indices-templates,https://www.elastic.co/docs/manage-data/data-store/templates, -indices-update-settings,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-put-settings,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/indices-update-settings.html -infer-trained-model,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ml-infer-trained-model,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/infer-trained-model.html -infer-trained-model-deployment,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ml-infer-trained-model,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/infer-trained-model.html -inference-api-delete,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-inference-delete,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/delete-inference-api.html -inference-api-get,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-inference-get,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/get-inference-api.html -inference-api-post,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-inference-inference,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/post-inference-api.html -inference-api-post-eis-chat-completion,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-inference-post-eis-chat-completion, -inference-api-put,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-inference-put,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/put-inference-api.html -inference-api-put-alibabacloud,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-inference-put-alibabacloud,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/infer-service-alibabacloud-ai-search.html -inference-api-put-amazonbedrock,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-inference-put-amazonbedrock,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/infer-service-amazon-bedrock.html -inference-api-put-anthropic,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-inference-put-anthropic,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/infer-service-anthropic.html -inference-api-put-azureaistudio,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-inference-put-azureaistudio,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/infer-service-azure-ai-studio.html -inference-api-put-azureopenai,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-inference-put-azureopenai,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/infer-service-azure-openai.html -inference-api-put-cohere,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-inference-put-cohere,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/infer-service-cohere.html -inference-api-put-eis,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-inference-put-eis, -inference-api-put-elasticsearch,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-inference-put-elasticsearch,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/infer-service-elasticsearch.html -inference-api-put-elser,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-inference-put-elser,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/infer-service-elser.html -inference-api-put-googleaistudio,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-inference-put-googleaistudio,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/infer-service-google-ai-studio.html -inference-api-put-googlevertexai,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-inference-put-googlevertexai,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/infer-service-google-vertex-ai.html -inference-api-put-huggingface,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-inference-put-hugging-face,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/infer-service-hugging-face.html -inference-api-put-jinaai,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-inference-put-jinaai, -inference-api-put-mistral,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-inference-put-mistral,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/infer-service-mistral.html -inference-api-put-openai,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-inference-put-openai,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/infer-service-openai.html -inference-api-put-voyageai,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-inference-put-voyageai, -inference-api-put-watsonx,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-inference-put-watsonx,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/infer-service-watsonx-ai.html -inference-api-stream,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-inference-stream-inference,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/stream-inference-api.html -inference-api-chat-completion,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-inference-unified-inference, -inference-api-update,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-inference-update,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/update-inference-api.html -inference-chunking,https://www.elastic.co/docs/explore-analyze/elastic-inference/inference-api#infer-chunking-config, -inference-processor,https://www.elastic.co/docs/reference/enrich-processor/inference-processor, -info-api,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-info,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/info-api.html -ingest,https://www.elastic.co/docs/manage-data/ingest/transform-enrich/ingest-pipelines, -ingest-circle-processor,https://www.elastic.co/docs/reference/enrich-processor/ingest-circle-processor, -ingest-node-set-security-user-processor,https://www.elastic.co/docs/reference/enrich-processor/ingest-node-set-security-user-processor, -inner-hits,https://www.elastic.co/docs/reference/elasticsearch/rest-apis/retrieve-inner-hits, -ip-location-delete-database,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ingest-delete-ip-location-database,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/delete-ip-location-database-api.html -ip-location-get-database,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ingest-get-ip-location-database,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/get-ip-location-database-api.html -ip-location-put-database,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ingest-put-ip-location-database,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/put-ip-location-database-api.html -jinaAi-embeddings,https://jina.ai/embeddings/, -jinaAi-rate-limit,https://jina.ai/contact-sales/#rate-limit, -join-processor,https://www.elastic.co/docs/reference/enrich-processor/join-processor, -json-processor,https://www.elastic.co/docs/reference/enrich-processor/json-processor, -k-precision,https://www.elastic.co/docs/reference/elasticsearch/rest-apis/search-rank-eval#k-precision, -k-recall,https://www.elastic.co/docs/reference/elasticsearch/rest-apis/search-rank-eval#k-recall, -kv-processor,https://www.elastic.co/docs/reference/enrich-processor/kv-processor, -knn-approximate,https://www.elastic.co/docs/solutions/search/vector/knn#approximate-knn, -knn-inner-hits,https://www.elastic.co/docs/solutions/search/vector/knn#nested-knn-search-inner-hits, -license-management,https://www.elastic.co/docs/deploy-manage/license/manage-your-license-in-self-managed-cluster, -list-analytics-collection,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-search-application-get-behavioral-analytics,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/list-analytics-collection.html -list-synonyms-sets,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-synonyms-get-synonyms-sets,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/list-synonyms-sets.html -logstash-api-delete-pipeline,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-logstash-delete-pipeline,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/logstash-api-delete-pipeline.html -logstash-api-get-pipeline,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-logstash-get-pipeline,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/logstash-api-get-pipeline.html -logstash-api-put-pipeline,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-logstash-put-pipeline,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/logstash-api-put-pipeline.html -logstash-centralized-pipeline-management,https://www.elastic.co/docs/reference/logstash/logstash-centralized-pipeline-management, -logstash-configuration-file-structure,https://www.elastic.co/docs/reference/logstash/configuration-file-structure, -logstash-logstash-settings-file,https://www.elastic.co/docs/reference/logstash/logstash-settings-file, -lowercase-processor,https://www.elastic.co/docs/reference/enrich-processor/lowercase-processor, -mapbox-vector-tile,https://github.com/mapbox/vector-tile-spec/blob/master/README.md, -mapping-date-format,https://www.elastic.co/docs/reference/elasticsearch/mapping-reference/mapping-date-format, -mapping-meta-field,https://www.elastic.co/docs/reference/elasticsearch/mapping-reference/mapping-meta-field, -mapping-params,https://www.elastic.co/docs/reference/elasticsearch/mapping-reference/mapping-parameters, -mapping-metadata,https://www.elastic.co/docs/reference/elasticsearch/mapping-reference/document-metadata-fields, -mapping-roles,https://www.elastic.co/docs/deploy-manage/users-roles/cluster-or-deployment-auth/mapping-users-groups-to-roles, -mapping-settings-limit,https://www.elastic.co/docs/reference/elasticsearch/index-settings/mapping-limit, -mapping-source-field,https://www.elastic.co/docs/reference/elasticsearch/mapping-reference/mapping-source-field, -mapping,https://www.elastic.co/docs/manage-data/data-store/mapping, -mean-reciprocal,https://www.elastic.co/docs/reference/elasticsearch/rest-apis/search-rank-eval#_mean_reciprocal_rank, -migrate,https://www.elastic.co/docs/api/doc/elasticsearch/group/endpoint-migration,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/migration-api.html -migrate-index-allocation-filters,https://www.elastic.co/docs/manage-data/lifecycle/index-lifecycle-management/migrate-index-allocation-filters-to-node-roles, -migration-api-cancel,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-cancel-migrate-reindex, -migration-api-create-from,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-create-from, -migration-api-deprecation,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-migration-deprecations,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/migration-api-deprecation.html -migration-api-feature-upgrade,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-migration-get-feature-upgrade-status,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/feature-migration-api.html -migration-api-reindex,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-migrate-reindex, -mistral-api-keys,https://console.mistral.ai/api-keys/, -mistral-api-models,https://docs.mistral.ai/getting-started/models/, -ml-apis,https://www.elastic.co/docs/api/doc/elasticsearch/group/endpoint-ml,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/ml-apis.html -ml-classification,https://www.elastic.co/docs/explore-analyze/machine-learning/data-frame-analytics/ml-dfa-classification, -ml-close-job,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ml-close-job,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/ml-close-job.html -ml-delete-calendar-event,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ml-delete-calendar-event,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/ml-delete-calendar-event.html -ml-delete-calendar-job,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ml-delete-calendar-job,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/ml-delete-calendar-job.html -ml-delete-calendar,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ml-delete-calendar,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/ml-delete-calendar.html -ml-delete-datafeed,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ml-delete-datafeed,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/ml-delete-datafeed.html -ml-delete-dfanalytics,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ml-delete-data-frame-analytics,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/delete-dfanalytics.html -ml-delete-expired-data,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ml-delete-expired-data,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/ml-delete-expired-data.html -ml-delete-filter,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ml-delete-filter,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/ml-delete-filter.html -ml-delete-forecast,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ml-delete-forecast,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/ml-delete-forecast.html -ml-delete-job,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ml-delete-job,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/ml-delete-job.html -ml-delete-snapshot,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ml-delete-model-snapshot,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/ml-delete-snapshot.html -ml-estimate-memory,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ml-estimate-model-memory,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/ml-estimate-model-memory.html -ml-feature-importance,https://www.elastic.co/docs/explore-analyze/machine-learning/data-frame-analytics/ml-feature-importance, -ml-flush-job,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ml-flush-job,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/ml-flush-job.html -ml-forecast,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ml-forecast,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/ml-forecast.html -ml-functions,https://www.elastic.co/docs/explore-analyze/machine-learning/anomaly-detection/ml-functions, -ml-get-bucket,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ml-get-buckets,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/ml-get-bucket.html -ml-get-calendar-event,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ml-get-calendar-events,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/ml-get-calendar-event.html -ml-get-calendar,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ml-get-calendars,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/ml-get-calendar.html -ml-get-category,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ml-get-categories,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/ml-get-category.html -ml-get-datafeed-stats,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ml-get-datafeed-stats,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/ml-get-datafeed-stats.html -ml-get-datafeed,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ml-get-datafeeds,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/ml-get-datafeed.html -ml-get-filter,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ml-get-filters,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/ml-get-filter.html -ml-get-influencer,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ml-get-influencers,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/ml-get-influencer.html -ml-get-job-model-snapshot-upgrade-stats,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ml-get-model-snapshot-upgrade-stats,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/ml-get-job-model-snapshot-upgrade-stats.html -ml-get-job-stats,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ml-get-job-stats,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/ml-get-job-stats.html -ml-get-job,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ml-get-jobs,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/ml-get-job.html -ml-get-memory,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ml-get-memory-stats,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/get-ml-memory.html -ml-get-overall-buckets,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ml-get-overall-buckets,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/ml-get-overall-buckets.html -ml-get-record,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ml-get-records,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/ml-get-record.html -ml-get-snapshot,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ml-get-model-snapshots,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/ml-get-snapshot.html -ml-jobs,https://www.elastic.co/docs/explore-analyze/machine-learning/anomaly-detection/ml-ad-run-jobs, -ml-model-snapshots,https://www.elastic.co/docs/explore-analyze/machine-learning/anomaly-detection/ml-ad-run-jobs#ml-ad-model-snapshots, -ml-open-job,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ml-open-job,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/ml-open-job.html -ml-post-calendar-event,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ml-post-calendar-events,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/ml-post-calendar-event.html -ml-post-data,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ml-post-data,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/ml-post-data.html -ml-preview-datafeed,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ml-preview-datafeed,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/ml-preview-datafeed.html -ml-put-calendar-job,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ml-put-calendar-job,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/ml-put-calendar-job.html -ml-put-calendar,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ml-put-calendar,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/ml-put-calendar.html -ml-put-datafeed,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ml-put-datafeed,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/ml-put-datafeed.html -ml-put-filter,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ml-put-filter,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/ml-put-filter.html -ml-put-job,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ml-put-job,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/ml-put-job.html -ml-regression-loss,https://www.elastic.co/docs/explore-analyze/machine-learning/data-frame-analytics/dfa-regression-lossfunction, -ml-regression,https://www.elastic.co/docs/explore-analyze/machine-learning/data-frame-analytics/ml-dfa-regression, -ml-reset-job,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ml-reset-job,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/ml-reset-job.html -ml-revert-snapshot,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ml-revert-model-snapshot,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/ml-revert-snapshot.html -ml-set-upgrade-mode,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ml-set-upgrade-mode,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/ml-set-upgrade-mode.html -ml-settings,https://www.elastic.co/docs/reference/elasticsearch/configuration-reference/machine-learning-settings, -ml-start-datafeed,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ml-start-datafeed,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/ml-start-datafeed.html -ml-stop-datafeed,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ml-stop-datafeed,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/ml-stop-datafeed.html -ml-update-datafeed,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ml-update-datafeed,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/ml-update-datafeed.html -ml-update-filter,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ml-update-filter,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/ml-update-filter.html -ml-update-job,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ml-update-job,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/ml-update-job.html -ml-update-snapshot,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ml-update-model-snapshot,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/ml-update-snapshot.html -ml-upgrade-job-model-snapshot,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ml-upgrade-job-snapshot,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/ml-upgrade-job-model-snapshot.html -modules-cluster,https://www.elastic.co/docs/reference/elasticsearch/configuration-reference/cluster-level-shard-allocation-routing-settings, -modules-cross-cluster-search,https://www.elastic.co/docs/solutions/search/cross-cluster-search, -modules-discovery-hosts-providers,https://www.elastic.co/docs/deploy-manage/distributed-architecture/discovery-cluster-formation/discovery-hosts-providers, -modules-fielddata,https://www.elastic.co/docs/reference/elasticsearch/configuration-reference/field-data-cache-settings, -modules-gateway-dangling-indices,https://www.elastic.co/docs/reference/elasticsearch/configuration-reference/local-gateway, -modules-node,https://www.elastic.co/docs/reference/elasticsearch/configuration-reference/node-settings, -modules-remote-clusters,https://www.elastic.co/docs/deploy-manage/remote-clusters/remote-clusters-self-managed, -modules-scripting,https://www.elastic.co/docs/explore-analyze/scripting, -modules-snapshots,https://www.elastic.co/docs/deploy-manage/tools/snapshot-and-restore, -monitor-elasticsearch-cluster,https://www.elastic.co/docs/deploy-manage/monitor/cloud-health-perf, -multi-fields,https://www.elastic.co/docs/reference/elasticsearch/mapping-reference/multi-fields, -network-direction-processor,https://www.elastic.co/docs/reference/enrich-processor/network-direction-processor, -node-roles,https://www.elastic.co/docs/reference/elasticsearch/configuration-reference/node-settings#node-roles, -nodes-api-shutdown-delete,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-shutdown-delete-node,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/delete-shutdown.html -nodes-api-shutdown-status,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-shutdown-get-node,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/get-shutdown.html -nodes-api-shutdown,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-shutdown-put-node,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/put-shutdown.html -openai-api-keys,https://platform.openai.com/api-keys, -openai-models,https://platform.openai.com/docs/guides/embeddings/what-are-embeddings, -optimistic-concurrency,https://www.elastic.co/docs/reference/elasticsearch/rest-apis/optimistic-concurrency-control, -paginate-search-results,https://www.elastic.co/docs/reference/elasticsearch/rest-apis/paginate-search-results, -painless-contexts,https://www.elastic.co/docs/reference/scripting-languages/painless/painless-contexts, -painless-execute-api,https://www.elastic.co/docs/reference/scripting-languages/painless/painless-api-examples, -pipeline-processor,https://www.elastic.co/docs/reference/enrich-processor/pipeline-processor, -pki-realm,https://www.elastic.co/docs/deploy-manage/users-roles/cluster-or-deployment-auth/pki, -point-in-time-api,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-open-point-in-time,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/point-in-time-api.html -prevalidate-node-removal,https://www.elastic.co/docs/api/doc/elasticsearch/group/endpoint-cluster,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/cluster.html -preview-dfanalytics,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ml-preview-data-frame-analytics,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/preview-dfanalytics.html -preview-transform,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-transform-preview-transform,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/preview-transform.html -put-analytics-collection,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-search-application-put-behavioral-analytics,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/put-analytics-collection.html -put-dfanalytics,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ml-put-data-frame-analytics,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/put-dfanalytics.html -put-enrich-policy-api,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-enrich-put-policy,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/put-enrich-policy-api.html -put-pipeline-api,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ingest-put-pipeline,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/put-pipeline-api.html -put-synonym-rule,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-synonyms-put-synonym-rule,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/put-synonym-rule.html -put-synonyms-set,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-synonyms-put-synonym,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/put-synonyms-set.html -put-trained-model-definition-part,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ml-put-trained-model-definition-part,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/put-trained-model-definition-part.html -put-trained-model-vocabulary,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ml-put-trained-model-vocabulary,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/put-trained-model-vocabulary.html -put-trained-models-aliases,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ml-put-trained-model-alias,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/put-trained-models-aliases.html -put-trained-models,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ml-put-trained-model,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/put-trained-models.html -put-transform,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-transform-put-transform,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/put-transform.html -query-dsl-bool-query,https://www.elastic.co/docs/reference/query-languages/query-dsl/query-dsl-bool-query, -query-dsl-boosting-query,https://www.elastic.co/docs/reference/query-languages/query-dsl/query-dsl-boosting-query, -query-dsl-combined-fields-query,https://www.elastic.co/docs/reference/query-languages/query-dsl/query-dsl-combined-fields-query, -query-dsl-constant-score-query,https://www.elastic.co/docs/reference/query-languages/query-dsl/query-dsl-constant-score-query, -query-dsl-dis-max-query,https://www.elastic.co/docs/reference/query-languages/query-dsl/query-dsl-dis-max-query, -query-dsl-distance-feature-query,https://www.elastic.co/docs/reference/query-languages/query-dsl/query-dsl-distance-feature-query, -query-dsl-exists-query,https://www.elastic.co/docs/reference/query-languages/query-dsl/query-dsl-exists-query, -query-dsl-function-score-query,https://www.elastic.co/docs/reference/query-languages/query-dsl/query-dsl-function-score-query, -query-dsl-fuzzy-query,https://www.elastic.co/docs/reference/query-languages/query-dsl/query-dsl-fuzzy-query, -query-dsl-geo-bounding-box-query,https://www.elastic.co/docs/reference/query-languages/query-dsl/query-dsl-geo-bounding-box-query, -query-dsl-geo-distance-query,https://www.elastic.co/docs/reference/query-languages/query-dsl/query-dsl-geo-distance-query, -query-dsl-geo-polygon-query,https://www.elastic.co/docs/reference/query-languages/query-dsl/query-dsl-geo-polygon-query, -query-dsl-geo-shape-query,https://www.elastic.co/docs/reference/query-languages/query-dsl/query-dsl-geo-shape-query, -query-dsl-has-child-query,https://www.elastic.co/docs/reference/query-languages/query-dsl/query-dsl-has-child-query, -query-dsl-has-parent-query,https://www.elastic.co/docs/reference/query-languages/query-dsl/query-dsl-has-parent-query, -query-dsl-ids-query,https://www.elastic.co/docs/reference/query-languages/query-dsl/query-dsl-ids-query, -query-dsl-intervals-query,https://www.elastic.co/docs/reference/query-languages/query-dsl/query-dsl-intervals-query, -query-dsl-knn-query,https://www.elastic.co/docs/reference/query-languages/query-dsl/query-dsl-knn-query, -query-dsl-match-all-query,https://www.elastic.co/docs/reference/query-languages/query-dsl/query-dsl-match-all-query, -query-dsl-match-bool-prefix-query,https://www.elastic.co/docs/reference/query-languages/query-dsl/query-dsl-match-bool-prefix-query, -query-dsl-match-none-query,https://www.elastic.co/docs/reference/query-languages/query-dsl/query-dsl-match-all-query#query-dsl-match-none-query, -query-dsl-match-query-phrase-prefix,https://www.elastic.co/docs/reference/query-languages/query-dsl/query-dsl-match-query-phrase-prefix, -query-dsl-match-query-phrase,https://www.elastic.co/docs/reference/query-languages/query-dsl/query-dsl-match-query-phrase, -query-dsl-match-query,https://www.elastic.co/docs/reference/query-languages/query-dsl/query-dsl-match-query, -query-dsl-minimum-should-match,https://www.elastic.co/docs/reference/query-languages/query-dsl/query-dsl-minimum-should-match, -query-dsl-minimum-should-match,https://www.elastic.co/docs/reference/query-languages/query-dsl/query-dsl-minimum-should-match, -query-dsl-mlt-query,https://www.elastic.co/docs/reference/query-languages/query-dsl/query-dsl-mlt-query, -query-dsl-multi-match-query,https://www.elastic.co/docs/reference/query-languages/query-dsl/query-dsl-multi-match-query, -query-dsl-multi-term-rewrite,https://www.elastic.co/docs/reference/query-languages/query-dsl/query-dsl-multi-term-rewrite, -query-dsl-nested-query,https://www.elastic.co/docs/reference/query-languages/query-dsl/query-dsl-nested-query, -query-dsl-parent-id-query,https://www.elastic.co/docs/reference/query-languages/query-dsl/query-dsl-parent-id-query, -query-dsl-percolate-query,https://www.elastic.co/docs/reference/query-languages/query-dsl/query-dsl-percolate-query, -query-dsl-pinned-query,https://www.elastic.co/docs/reference/query-languages/query-dsl/query-dsl-pinned-query, -query-dsl-prefix-query,https://www.elastic.co/docs/reference/query-languages/query-dsl/query-dsl-prefix-query, -query-dsl-query-string-query,https://www.elastic.co/docs/reference/query-languages/query-dsl/query-dsl-query-string-query, -query-dsl-range-query,https://www.elastic.co/docs/reference/query-languages/query-dsl/query-dsl-range-query, -query-dsl-rank-feature-query,https://www.elastic.co/docs/reference/query-languages/query-dsl/query-dsl-rank-feature-query, -query-dsl-regexp-query,https://www.elastic.co/docs/reference/query-languages/query-dsl/query-dsl-regexp-query, -query-dsl-rule-query,https://www.elastic.co/docs/reference/query-languages/query-dsl/query-dsl-rule-query, -query-dsl-script-query,https://www.elastic.co/docs/reference/query-languages/query-dsl/query-dsl-script-query, -query-dsl-script-score-query,https://www.elastic.co/docs/reference/query-languages/query-dsl/query-dsl-script-score-query, -query-dsl-semantic-query,https://www.elastic.co/docs/reference/query-languages/query-dsl/query-dsl-semantic-query, -query-dsl-shape-query,https://www.elastic.co/docs/reference/query-languages/query-dsl/query-dsl-shape-query, -query-dsl-simple-query-string-query,https://www.elastic.co/docs/reference/query-languages/query-dsl/query-dsl-simple-query-string-query, -query-dsl-span-containing-query,https://www.elastic.co/docs/reference/query-languages/query-dsl/query-dsl-span-containing-query, -query-dsl-span-field-masking-query,https://www.elastic.co/docs/reference/query-languages/query-dsl/query-dsl-span-field-masking-query, -query-dsl-span-first-query,https://www.elastic.co/docs/reference/query-languages/query-dsl/query-dsl-span-first-query, -query-dsl-span-multi-term-query,https://www.elastic.co/docs/reference/query-languages/query-dsl/query-dsl-span-multi-term-query, -query-dsl-span-near-query,https://www.elastic.co/docs/reference/query-languages/query-dsl/query-dsl-span-near-query, -query-dsl-span-not-query,https://www.elastic.co/docs/reference/query-languages/query-dsl/query-dsl-span-not-query, -query-dsl-span-or-query,https://www.elastic.co/docs/reference/query-languages/query-dsl/query-dsl-span-query, -query-dsl-span-term-query,https://www.elastic.co/docs/reference/query-languages/query-dsl/query-dsl-span-term-query, -query-dsl-span-within-query,https://www.elastic.co/docs/reference/query-languages/query-dsl/query-dsl-span-within-query, -query-dsl-sparse-vector-query,https://www.elastic.co/docs/reference/query-languages/query-dsl/query-dsl-sparse-vector-query, -query-dsl-term-query,https://www.elastic.co/docs/reference/query-languages/query-dsl/query-dsl-term-query, -query-dsl-terms-query,https://www.elastic.co/docs/reference/query-languages/query-dsl/query-dsl-terms-query, -query-dsl-terms-set-query,https://www.elastic.co/docs/reference/query-languages/query-dsl/query-dsl-terms-set-query, -query-dsl-text-expansion-query,https://www.elastic.co/docs/reference/query-languages/query-dsl/query-dsl-text-expansion-query, -query-dsl-weighted-tokens-query,https://www.elastic.co/docs/reference/query-languages/query-dsl/query-dsl-weighted-tokens-query, -query-dsl-wildcard-query,https://www.elastic.co/docs/reference/query-languages/query-dsl/query-dsl-wildcard-query, -query-dsl-wrapper-query,https://www.elastic.co/docs/reference/query-languages/query-dsl/query-dsl-wrapper-query, -query-dsl,https://www.elastic.co/docs/explore-analyze/query-filter/languages/querydsl, -query-rule,https://www.elastic.co/docs/reference/elasticsearch/rest-apis/searching-with-query-rules, -query-rule-delete,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-query-rules-delete-rule,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/delete-query-rule.html -query-rule-get,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-query-rules-get-rule,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/get-query-rule.html -query-rule-put,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-query-rules-put-rule,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/put-query-rule.html -query-ruleset-delete,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-query-rules-delete-ruleset,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/delete-query-ruleset.html -query-ruleset-get,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-query-rules-get-ruleset,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/get-query-ruleset.html -query-ruleset-list,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-query-rules-list-rulesets,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/list-query-rulesets.html -query-ruleset-put,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-query-rules-put-ruleset,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/put-query-ruleset.html -query-ruleset-test,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-query-rules-test,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/test-query-ruleset.html -realtime,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-get,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/docs-get.html -redact-processor,https://www.elastic.co/docs/reference/enrich-processor/redact-processor, -regexp-syntax,https://www.elastic.co/docs/reference/query-languages/query-dsl/regexp-syntax, -register-repository,https://www.elastic.co/docs/deploy-manage/tools/snapshot-and-restore/self-managed, -registered-domain-processor,https://www.elastic.co/docs/reference/enrich-processor/registered-domain-processor, -reindex-indices,https://www.elastic.co/docs/reference/elasticsearch/rest-apis/reindex-indices, -relevance-scores,https://www.elastic.co/docs/explore-analyze/query-filter/languages/querydsl#relevance-scores, -remove-processor,https://www.elastic.co/docs/reference/enrich-processor/remove-processor, -remote-clusters-api-key,https://www.elastic.co/docs/deploy-manage/remote-clusters/remote-clusters-api-key, -rename-processor,https://www.elastic.co/docs/reference/enrich-processor/rename-processor, -repository-azure,https://www.elastic.co/docs/deploy-manage/tools/snapshot-and-restore/azure-repository, -repository-gcs,https://www.elastic.co/docs/deploy-manage/tools/snapshot-and-restore/google-cloud-storage-repository, -repository-read-only,https://www.elastic.co/docs/deploy-manage/tools/snapshot-and-restore/read-only-url-repository, -repository-s3,https://www.elastic.co/docs/deploy-manage/tools/snapshot-and-restore/s3-repository, -repository-s3-canned-acl,https://docs.aws.amazon.com/AmazonS3/latest/userguide/acl-overview.html#canned-acl, -repository-s3-delete-objects,https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteObjects.html, -repository-s3-list-multipart,https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListMultipartUploads.html, -repository-s3-naming,https://docs.aws.amazon.com/AmazonS3/latest/userguide/BucketRestrictions.html#bucketnamingrules, -repository-s3-storage-classes,https://www.elastic.co/docs/deploy-manage/tools/snapshot-and-restore/s3-repository#repository-s3-storage-classes, -repository-shared-fs,https://www.elastic.co/docs/deploy-manage/tools/snapshot-and-restore/shared-file-system-repository, -repository-source-only,https://www.elastic.co/docs/deploy-manage/tools/snapshot-and-restore/source-only-repository, -reroute-processor,https://www.elastic.co/docs/reference/enrich-processor/reroute-processor, -render-search-template-api,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-render-search-template,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/render-search-template-api.html -reset-transform,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-transform-reset-transform,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/reset-transform.html -restore-snapshot,https://www.elastic.co/docs/deploy-manage/tools/snapshot-and-restore/restore-snapshot, -retrieve-stored-fields,https://www.elastic.co/docs/reference/elasticsearch/rest-apis/retrieve-stored-fields -role-restriction,https://www.elastic.co/docs/deploy-manage/users-roles/cluster-or-deployment-auth/role-restriction, -rollup-agg-limitations,https://www.elastic.co/docs/manage-data/lifecycle/rollup/rollup-aggregation-limitations, -rollup-delete-job,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-rollup-delete-job,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/rollup-delete-job.html -rollup-get-job,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-rollup-get-jobs,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/rollup-get-job.html -rollup-get-rollup-caps,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-rollup-get-rollup-caps,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/rollup-get-rollup-caps.html -rollup-get-rollup-index-caps,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-rollup-get-rollup-index-caps,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/rollup-get-rollup-index-caps.html -rollup-put-job,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-rollup-put-job,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/rollup-put-job.html -rollup-search,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-rollup-rollup-search,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/rollup-search.html -rollup-search-limitations,https://www.elastic.co/docs/manage-data/lifecycle/rollup/rollup-search-limitations, -rollup-start-job,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-rollup-start-job,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/rollup-start-job.html -rollup-stop-job,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-rollup-stop-job,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/rollup-stop-job.html -routing,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-get#get-routing, -run-as-privilege,https://www.elastic.co/docs/deploy-manage/users-roles/cluster-or-deployment-auth/submitting-requests-on-behalf-of-other-users, -runtime-search-request,https://www.elastic.co/docs/manage-data/data-store/mapping/define-runtime-fields-in-search-request, -schedule-now-transform,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-transform-schedule-now-transform,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/schedule-now-transform.html -script-contexts,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-get-script-context,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/get-script-contexts-api.html -script-delete,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-delete-script,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/delete-stored-script-api.html -script-get,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-get-script,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/get-stored-script-api.html -script-languages,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-get-script-languages,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/get-script-languages-api.html -script-processor,https://www.elastic.co/docs/reference/enrich-processor/script-processor, -script-put,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-put-script,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/create-stored-script-api.html -scroll-api,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-scroll,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/scroll-api.html -scroll-search-results,https://www.elastic.co/docs/reference/elasticsearch/rest-apis/paginate-search-results#scroll-search-results, -search-after,https://www.elastic.co/docs/reference/elasticsearch/rest-apis/paginate-search-results#search-after, -search-aggregations,https://www.elastic.co/docs/explore-analyze/query-filter/aggregations, -search-aggregations-bucket-adjacency-matrix-aggregation,https://www.elastic.co/docs/reference/aggregations/search-aggregations-bucket-adjacency-matrix-aggregation, -search-aggregations-bucket-autodatehistogram-aggregation,https://www.elastic.co/docs/reference/aggregations/search-aggregations-bucket-autodatehistogram-aggregation, -search-aggregations-bucket-categorize-text-aggregation,https://www.elastic.co/docs/reference/aggregations/search-aggregations-bucket-categorize-text-aggregation, -search-aggregations-bucket-children-aggregation,https://www.elastic.co/docs/reference/aggregations/search-aggregations-bucket-children-aggregation, -search-aggregations-bucket-correlation-aggregation,https://www.elastic.co/docs/reference/aggregations/search-aggregations-bucket-correlation-aggregation, -search-aggregations-bucket-count-ks-test-aggregation,https://www.elastic.co/docs/reference/aggregations/search-aggregations-bucket-count-ks-test-aggregation, -search-aggregations-bucket-datehistogram-aggregation,https://www.elastic.co/docs/reference/aggregations/search-aggregations-bucket-datehistogram-aggregation, -search-aggregations-bucket-daterange-aggregation,https://www.elastic.co/docs/reference/aggregations/search-aggregations-bucket-daterange-aggregation, -search-aggregations-bucket-diversified-sampler-aggregation,https://www.elastic.co/docs/reference/aggregations/search-aggregations-bucket-diversified-sampler-aggregation, -search-aggregations-bucket-filter-aggregation,https://www.elastic.co/docs/reference/aggregations/search-aggregations-bucket-filter-aggregation, -search-aggregations-bucket-frequent-item-sets-aggregation,https://www.elastic.co/docs/reference/aggregations/search-aggregations-bucket-frequent-item-sets-aggregation, -search-aggregations-bucket-significantterms-aggregation,https://www.elastic.co/docs/reference/aggregations/search-aggregations-bucket-significantterms-aggregation, -search-aggregations-metrics-avg-aggregation,https://www.elastic.co/docs/reference/aggregations/search-aggregations-metrics-avg-aggregation, -search-aggregations-metrics-boxplot-aggregation,https://www.elastic.co/docs/reference/aggregations/search-aggregations-metrics-boxplot-aggregation, -search-aggregations-metrics-cardinality-aggregation,https://www.elastic.co/docs/reference/aggregations/search-aggregations-metrics-cardinality-aggregation, -search-aggregations-metrics-extendedstats-aggregation,https://www.elastic.co/docs/reference/aggregations/search-aggregations-metrics-extendedstats-aggregation, -search-aggregations-pipeline-avg-bucket-aggregation,https://www.elastic.co/docs/reference/aggregations/search-aggregations-pipeline-avg-bucket-aggregation, -search-aggregations-pipeline-bucket-path,https://www.elastic.co/docs/reference/aggregations/pipeline#buckets-path-syntax, -search-aggregations-pipeline-bucket-script-aggregation,https://www.elastic.co/docs/reference/aggregations/search-aggregations-pipeline-bucket-script-aggregation, -search-aggregations-pipeline-bucket-selector-aggregation,https://www.elastic.co/docs/reference/aggregations/search-aggregations-pipeline-bucket-selector-aggregation, -search-aggregations-pipeline-bucket-sort-aggregation,https://www.elastic.co/docs/reference/aggregations/search-aggregations-pipeline-bucket-sort-aggregation, -search-aggregations-bucket-composite-aggregation,https://www.elastic.co/docs/reference/aggregations/search-aggregations-bucket-composite-aggregation, -search-aggregations-pipeline-cumulative-cardinality-aggregation,https://www.elastic.co/docs/reference/aggregations/search-aggregations-pipeline-cumulative-cardinality-aggregation, -search-aggregations-pipeline-cumulative-sum-aggregation,https://www.elastic.co/docs/reference/aggregations/search-aggregations-pipeline-cumulative-sum-aggregation, -search-aggregations-pipeline-derivative-aggregation,https://www.elastic.co/docs/reference/aggregations/search-aggregations-pipeline-derivative-aggregation, -search-aggregations-pipeline-extended-stats-bucket-aggregation,https://www.elastic.co/docs/reference/aggregations/search-aggregations-pipeline-extended-stats-bucket-aggregation, -search-aggregations-bucket-frequent-item-sets-aggregation,https://www.elastic.co/docs/reference/aggregations/search-aggregations-bucket-frequent-item-sets-aggregation, -search-aggregations-bucket-filter-aggregation,https://www.elastic.co/docs/reference/aggregations/search-aggregations-bucket-filter-aggregation, -search-aggregations-bucket-filters-aggregation,https://www.elastic.co/docs/reference/aggregations/search-aggregations-bucket-filters-aggregation, -search-aggregations-metrics-geobounds-aggregation,https://www.elastic.co/docs/reference/aggregations/search-aggregations-metrics-geobounds-aggregation, -search-aggregations-metrics-geocentroid-aggregation,https://www.elastic.co/docs/reference/aggregations/search-aggregations-metrics-geocentroid-aggregation, -search-aggregations-bucket-geodistance-aggregation,https://www.elastic.co/docs/reference/aggregations/search-aggregations-bucket-geodistance-aggregation, -search-aggregations-bucket-geohashgrid-aggregation,https://www.elastic.co/docs/reference/aggregations/search-aggregations-bucket-geohashgrid-aggregation, -search-aggregations-metrics-geo-line,https://www.elastic.co/docs/reference/aggregations/search-aggregations-metrics-geo-line, -search-aggregations-bucket-geotilegrid-aggregation,https://www.elastic.co/docs/reference/aggregations/search-aggregations-bucket-geotilegrid-aggregation, -search-aggregations-bucket-geohexgrid-aggregation,https://www.elastic.co/docs/reference/aggregations/search-aggregations-bucket-geohexgrid-aggregation, -search-aggregations-bucket-global-aggregation,https://www.elastic.co/docs/reference/aggregations/search-aggregations-bucket-global-aggregation, -search-aggregations-bucket-histogram-aggregation,https://www.elastic.co/docs/reference/aggregations/search-aggregations-bucket-histogram-aggregation, -search-aggregations-bucket-iprange-aggregation,https://www.elastic.co/docs/reference/aggregations/search-aggregations-bucket-iprange-aggregation, -search-aggregations-bucket-ipprefix-aggregation,https://www.elastic.co/docs/reference/aggregations/search-aggregations-bucket-ipprefix-aggregation, -search-aggregations-pipeline-inference-bucket-aggregation,https://www.elastic.co/docs/reference/aggregations/search-aggregations-pipeline-inference-bucket-aggregation, -search-aggregations-matrix-stats-aggregation,https://www.elastic.co/docs/reference/aggregations/search-aggregations-matrix-stats-aggregation, -search-aggregations-metrics-max-aggregation,https://www.elastic.co/docs/reference/aggregations/search-aggregations-metrics-max-aggregation, -search-aggregations-pipeline-max-bucket-aggregation,https://www.elastic.co/docs/reference/aggregations/search-aggregations-pipeline-max-bucket-aggregation, -search-aggregations-metrics-median-absolute-deviation-aggregation,https://www.elastic.co/docs/reference/aggregations/search-aggregations-metrics-median-absolute-deviation-aggregation, -search-aggregations-metrics-min-aggregation,https://www.elastic.co/docs/reference/aggregations/search-aggregations-metrics-min-aggregation, -search-aggregations-pipeline-min-bucket-aggregation,https://www.elastic.co/docs/reference/aggregations/search-aggregations-pipeline-min-bucket-aggregation, -search-aggregations-bucket-missing-aggregation,https://www.elastic.co/docs/reference/aggregations/search-aggregations-bucket-missing-aggregation, -search-aggregations-pipeline-moving-percentiles-aggregation,https://www.elastic.co/docs/reference/aggregations/search-aggregations-pipeline-moving-percentiles-aggregation, -search-aggregations-pipeline-movfn-aggregation,https://www.elastic.co/docs/reference/aggregations/search-aggregations-pipeline-movfn-aggregation, -search-aggregations-bucket-multi-terms-aggregation,https://www.elastic.co/docs/reference/aggregations/search-aggregations-bucket-multi-terms-aggregation, -search-aggregations-bucket-nested-aggregation,https://www.elastic.co/docs/reference/aggregations/search-aggregations-bucket-nested-aggregation, -search-aggregations-pipeline-normalize-aggregation,https://www.elastic.co/docs/reference/aggregations/search-aggregations-pipeline-normalize-aggregation, -search-aggregations-bucket-parent-aggregation,https://www.elastic.co/docs/reference/aggregations/search-aggregations-bucket-parent-aggregation, -search-aggregations-metrics-percentile-rank-aggregation,https://www.elastic.co/docs/reference/aggregations/search-aggregations-metrics-percentile-rank-aggregation, -search-aggregations-metrics-percentile-aggregation,https://www.elastic.co/docs/reference/aggregations/search-aggregations-metrics-percentile-aggregation, -search-aggregations-pipeline-percentiles-bucket-aggregation,https://www.elastic.co/docs/reference/aggregations/search-aggregations-pipeline-percentiles-bucket-aggregation, -search-aggregations-bucket-range-aggregation,https://www.elastic.co/docs/reference/aggregations/search-aggregations-bucket-range-aggregation, -search-aggregations-bucket-rare-terms-aggregation,https://www.elastic.co/docs/reference/aggregations/search-aggregations-bucket-rare-terms-aggregation, -search-aggregations-metrics-rate-aggregation,https://www.elastic.co/docs/reference/aggregations/search-aggregations-metrics-rate-aggregation, -search-aggregations-bucket-reverse-nested-aggregation,https://www.elastic.co/docs/reference/aggregations/search-aggregations-bucket-reverse-nested-aggregation, -search-aggregations-bucket-sampler-aggregation,https://www.elastic.co/docs/reference/aggregations/search-aggregations-bucket-sampler-aggregation, -search-aggregations-random-sampler-aggregation,https://www.elastic.co/docs/reference/aggregations/search-aggregations-random-sampler-aggregation, -search-aggregations-metrics-scripted-metric-aggregation,https://www.elastic.co/docs/reference/aggregations/search-aggregations-metrics-scripted-metric-aggregation, -search-aggregations-pipeline-serialdiff-aggregation,https://www.elastic.co/docs/reference/aggregations/search-aggregations-pipeline-serialdiff-aggregation, -search-aggregations-bucket-significantterms-aggregation,https://www.elastic.co/docs/reference/aggregations/search-aggregations-bucket-significantterms-aggregation, -search-aggregations-bucket-significanttext-aggregation,https://www.elastic.co/docs/reference/aggregations/search-aggregations-bucket-significanttext-aggregation, -search-aggregations-metrics-stats-aggregation,https://www.elastic.co/docs/reference/aggregations/search-aggregations-metrics-stats-aggregation, -search-aggregations-pipeline-stats-bucket-aggregation,https://www.elastic.co/docs/reference/aggregations/search-aggregations-pipeline-stats-bucket-aggregation, -search-aggregations-metrics-string-stats-aggregation,https://www.elastic.co/docs/reference/aggregations/search-aggregations-metrics-string-stats-aggregation, -search-aggregations-metrics-sum-aggregation,https://www.elastic.co/docs/reference/aggregations/search-aggregations-metrics-sum-aggregation, -search-aggregations-pipeline-sum-bucket-aggregation,https://www.elastic.co/docs/reference/aggregations/search-aggregations-pipeline-sum-bucket-aggregation, -search-aggregations-bucket-terms-aggregation,https://www.elastic.co/docs/reference/aggregations/search-aggregations-bucket-terms-aggregation, -search-aggregations-bucket-time-series-aggregation,https://www.elastic.co/docs/reference/aggregations/search-aggregations-bucket-time-series-aggregation, -search-aggregations-metrics-top-hits-aggregation,https://www.elastic.co/docs/reference/aggregations/search-aggregations-metrics-top-hits-aggregation, -search-aggregations-metrics-ttest-aggregation,https://www.elastic.co/docs/reference/aggregations/search-aggregations-metrics-ttest-aggregation, -search-aggregations-metrics-top-metrics,https://www.elastic.co/docs/reference/aggregations/search-aggregations-metrics-top-metrics, -search-aggregations-metrics-valuecount-aggregation,https://www.elastic.co/docs/reference/aggregations/search-aggregations-metrics-valuecount-aggregation, -search-aggregations-metrics-weight-avg-aggregation,https://www.elastic.co/docs/reference/aggregations/search-aggregations-metrics-weight-avg-aggregation, -search-aggregations-bucket-variablewidthhistogram-aggregation,https://www.elastic.co/docs/reference/aggregations/search-aggregations-bucket-variablewidthhistogram-aggregation, -search-analyzer,https://www.elastic.co/docs/reference/elasticsearch/mapping-reference/search-analyzer, -search-application-delete,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-search-application-delete,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/delete-search-application.html -search-application-get,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-search-application-get,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/get-search-application.html -search-application-put,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-search-application-put,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/put-search-application.html -search-application-search,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-search-application-search,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/search-application-search.html -search-render-query,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-search-application-render-query,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/search-application-render-query.html -search-retrievers,https://www.elastic.co/docs/reference/elasticsearch/rest-apis/retrievers, -search-count,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-count,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/search-count.html -search-explain,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-explain,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/search-explain.html -search-field-caps,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-field-caps,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/search-field-caps.html -search-highlight,https://www.elastic.co/docs/reference/elasticsearch/rest-apis/highlighting, -search-knn,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-knn-search, -search-multi-search,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-msearch,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/search-multi-search.html -search-multi-search-template,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-msearch-template,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/multi-search-template.html -search-rank-eval,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-rank-eval,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/search-rank-eval.html -search-search,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-search,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/search-search.html -search-shards,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-search-shards,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/search-shards.html -search-template,https://www.elastic.co/docs/solutions/search/search-templates, -search-template-api,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-search-template,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/search-template-api.html -search-terms-enum,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-terms-enum,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/search-terms-enum.html -search-validate,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-validate-query,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/search-validate.html -search-vector-tile-api,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-search-mvt,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/search-vector-tile-api.html -searchable-snapshots,https://www.elastic.co/docs/deploy-manage/tools/snapshot-and-restore/searchable-snapshots, -searchable-snapshots-api-cache-stats,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-searchable-snapshots-cache-stats,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/searchable-snapshots-api-cache-stats.html -searchable-snapshots-api-clear-cache,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-searchable-snapshots-clear-cache,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/searchable-snapshots-api-clear-cache.html -searchable-snapshots-api-mount-snapshot,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-searchable-snapshots-mount,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/searchable-snapshots-api-mount-snapshot.html -searchable-snapshots-api-stats,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-searchable-snapshots-stats,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/searchable-snapshots-api-stats.html -searchable-snapshots-apis,https://www.elastic.co/docs/api/doc/elasticsearch/group/endpoint-searchable_snapshots,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/searchable-snapshots-apis.html -search-templates,https://www.elastic.co/docs/solutions/search/search-templates, -secure-settings,https://www.elastic.co/docs/deploy-manage/security/secure-settings, -security-api-activate-user-profile,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-security-activate-user-profile,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/security-api-activate-user-profile.html -security-api-authenticate,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-security-authenticate,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/security-api-authenticate.html -security-api-bulk-delete-role,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-security-bulk-delete-role,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/security-api-bulk-delete-role.html -security-api-bulk-put-role,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-security-bulk-put-role,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/security-api-bulk-put-role.html -security-api-bulk-update-key,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-security-bulk-update-api-keys,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/security-api-bulk-update-api-keys.html -security-api-change-password,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-security-change-password,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/security-api-change-password.html -security-api-clear-api-key-cache,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-security-clear-api-key-cache,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/security-api-clear-api-key-cache.html -security-api-clear-cache,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-security-clear-cached-realms,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/security-api-clear-cache.html -security-api-clear-privilege-cache,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-security-clear-cached-privileges,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/security-api-clear-privilege-cache.html -security-api-clear-role-cache,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-security-clear-cached-roles,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/security-api-clear-role-cache.html -security-api-clear-service-token-caches,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-security-clear-cached-service-tokens,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/security-api-clear-service-token-caches.html -security-api-create-api-key,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-security-create-api-key,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/security-api-create-api-key.html -security-api-create-service-token,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-security-create-service-token,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/security-api-create-service-token.html -security-api-cross-cluster-key,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-security-create-cross-cluster-api-key,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/security-api-create-cross-cluster-api-key.html -security-api-delegate-pki,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-security-delegate-pki,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/security-api-delegate-pki-authentication.html -security-api-delete-privilege,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-security-delete-privileges,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/security-api-delete-privilege.html -security-api-delete-role-mapping,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-security-delete-role-mapping,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/security-api-delete-role-mapping.html -security-api-delete-role,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-security-delete-role,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/security-api-delete-role.html -security-api-delete-service-token,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-security-delete-service-token,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/security-api-delete-service-token.html -security-api-delete-user,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-security-delete-user,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/security-api-delete-user.html -security-api-disable-user,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-security-disable-user,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/security-api-disable-user.html -security-api-disable-user-profile,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-security-disable-user-profile,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/security-api-disable-user-profile.html -security-api-enable-user,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-security-enable-user,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/security-api-enable-user.html -security-api-enable-user-profile,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-security-enable-user-profile,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/security-api-enable-user-profile.html -security-api-get-api-key,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-security-get-api-key,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/security-api-get-api-key.html -security-api-get-builtin-privileges,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-security-get-builtin-privileges,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/security-api-get-builtin-privileges.html -security-api-get-privileges,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-security-get-privileges,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/security-api-get-privileges.html -security-api-get-role-mapping,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-security-get-role-mapping,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/security-api-get-role-mapping.html -security-api-get-role,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-security-get-role,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/security-api-get-role.html -security-api-get-service-accounts,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-security-get-service-accounts,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/security-api-get-service-accounts.html -security-api-get-service-credentials,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-security-get-service-credentials,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/security-api-get-service-credentials.html -security-api-get-settings,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-security-get-settings,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/security-api-get-settings.html -security-api-get-token,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-security-get-token,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/security-api-get-token.html -security-api-get-user-privileges,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-security-get-user-privileges,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/security-api-get-user-privileges.html -security-api-get-user-profile,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-security-get-user-profile,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/security-api-get-user-profile.html -security-api-get-user,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-security-get-user,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/security-api-get-user.html -security-api-grant-api-key,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-security-grant-api-key,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/security-api-grant-api-key.html -security-api-has-privileges,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-security-has-privileges,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/security-api-has-privileges.html -security-api-has-privileges-profile,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-security-has-privileges-user-profile,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/security-api-has-privileges-user-profile.html -security-api-invalidate-api-key,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-security-invalidate-api-key,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/security-api-invalidate-api-key.html -security-api-invalidate-token,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-security-invalidate-token,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/security-api-invalidate-token.html -security-api-kibana-enrollment,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-security-enroll-kibana,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/security-api-kibana-enrollment.html -security-api-node-enrollment,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-security-enroll-node,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/security-api-node-enrollment.html -security-api-oidc-authenticate,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-security-oidc-authenticate,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/security-api-oidc-authenticate.html -security-api-oidc-logout,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-security-oidc-logout,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/security-api-oidc-logout.html -security-api-oidc-prepare,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-security-oidc-prepare-authentication,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/security-api-oidc-prepare-authentication.html -security-api-put-privileges,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-security-put-privileges,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/security-api-put-privileges.html -security-api-put-role-mapping,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-security-put-role-mapping,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/security-api-put-role-mapping.html -security-api-put-role,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-security-put-role,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/security-api-put-role.html -security-api-put-user,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-security-put-user,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/security-api-put-user.html -security-api-query-api-key,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-security-query-api-keys,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/security-api-query-api-key.html -security-api-query-role,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-security-query-role,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/security-api-query-role.html -security-api-query-user,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-security-query-user,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/security-api-query-user.html -security-api-saml-authenticate,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-security-saml-authenticate,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/security-api-saml-authenticate.html -security-api-saml-complete-logout,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-security-saml-complete-logout,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/security-api-saml-complete-logout.html -security-api-saml-invalidate,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-security-saml-invalidate,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/security-api-saml-invalidate.html -security-api-saml-logout,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-security-saml-logout,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/security-api-saml-logout.html -security-api-saml-prepare-authentication,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-security-saml-prepare-authentication,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/security-api-saml-prepare-authentication.html -security-api-saml-sp-metadata,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-security-saml-service-provider-metadata,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/security-api-saml-sp-metadata.html -security-api-ssl,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ssl-certificates,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/security-api-ssl.html -security-api-suggest,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-security-suggest-user-profiles,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/security-api-suggest-user-profile.html -security-api-cross-cluster-key-update,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-security-update-cross-cluster-api-key,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/security-api-update-cross-cluster-api-key.html -security-api-update-key,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-security-update-api-key,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/security-api-update-api-key.html -security-api-update-user-data,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-security-update-user-profile-data,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/security-api-update-user-profile-data.html -security-api-update-settings,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-security-update-settings,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/security-api-update-settings.html -security-application-privileges,https://www.elastic.co/docs/reference/elasticsearch/security-privileges#application-privileges, -security-encrypt-http,https://www.elastic.co/docs/deploy-manage/security/set-up-basic-security-plus-https#encrypt-http-communication, -security-encrypt-internode,https://www.elastic.co/docs/deploy-manage/security/set-up-basic-security#encrypt-internode-communication, -security-privileges,https://www.elastic.co/docs/reference/elasticsearch/security-privileges, -security-query-api-keys,https://www.elastic.co/docs/reference/elasticsearch/rest-apis/query-api-keys, -security-saml-guide,https://www.elastic.co/docs/deploy-manage/users-roles/cluster-or-deployment-auth/saml, -security-settings-api-keys,https://www.elastic.co/docs/reference/elasticsearch/configuration-reference/security-settings#api-key-service-settings, -security-settings-hashing,https://www.elastic.co/docs/reference/elasticsearch/configuration-reference/security-settings#hashing-settings, -security-user-cache,https://www.elastic.co/docs/deploy-manage/users-roles/cluster-or-deployment-auth/controlling-user-cache, -service-accounts,https://www.elastic.co/docs/deploy-manage/users-roles/cluster-or-deployment-auth/service-accounts, -set-processor,https://www.elastic.co/docs/reference/enrich-processor/set-processor, -shape,https://www.elastic.co/docs/reference/elasticsearch/mapping-reference/shape, -shard-request-cache,https://www.elastic.co/docs/reference/elasticsearch/rest-apis/shard-request-cache, -simulate-ingest-api,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-simulate-ingest,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/simulate-ingest-api.html -simulate-pipeline-api,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ingest-simulate,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/simulate-pipeline-api.html -slice-scroll,https://www.elastic.co/docs/reference/elasticsearch/rest-apis/paginate-search-results#slice-scroll, -slm-api-delete-policy,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-slm-delete-lifecycle,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/slm-api-delete-policy.html -slm-api-execute-lifecycle,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-slm-execute-lifecycle,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/slm-api-execute-lifecycle.html -slm-api-execute-retention,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-slm-execute-retention,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/slm-api-execute-retention.html -slm-api-get-policy,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-slm-get-lifecycle,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/slm-api-get-policy.html -slm-api-get-stats,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-slm-get-stats,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/slm-api-get-stats.html -slm-api-get-status,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-slm-get-status,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/slm-api-get-status.html -slm-api-put-policy,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-slm-put-lifecycle,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/slm-api-put-policy.html -slm-api-start,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-slm-start,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/slm-api-start.html -slm-api-stop,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-slm-stop,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/slm-api-stop.html -snapshot-clone,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-snapshot-clone,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/clone-snapshot-api.html -snapshot-create,https://www.elastic.co/docs/deploy-manage/tools/snapshot-and-restore/create-snapshots, -snapshot-create-api,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-snapshot-create,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/create-snapshot-api.html -snapshot-delete,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-snapshot-delete,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/delete-snapshot-api.html -snapshot-get,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-snapshot-get,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/get-snapshot-api.html -snapshot-restore-api,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-snapshot-restore,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/restore-snapshot-api.html -snapshot-status,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-snapshot-status,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/get-snapshot-status-api.html -snapshot-repo-cleanup,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-snapshot-cleanup-repository,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/clean-up-snapshot-repo-api.html -snapshot-repo-create,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-snapshot-create-repository,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/put-snapshot-repo-api.html -snapshot-repo-delete,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-snapshot-delete-repository,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/delete-snapshot-repo-api.html -snapshot-repo-get,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-snapshot-get-repository,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/get-snapshot-repo-api.html -snapshot-repo-verify,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-snapshot-verify-repository,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/verify-snapshot-repo-api.html -snapshot-repo-verify-integrity,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-snapshot-repository-verify-integrity,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/verify-repo-integrity-api.html -snapshot-restore-amend-replacement,https://docs.oracle.com/javase/8/docs/api/java/util/regex/Matcher.html#appendReplacement-java.lang.StringBuffer-java.lang.String-, -snapshot-restore-feature-state,https://www.elastic.co/docs/deploy-manage/tools/snapshot-and-restore#feature-state, -sort-processor,https://www.elastic.co/docs/reference/enrich-processor/sort-processor, -sort-search-results,https://www.elastic.co/docs/reference/elasticsearch/rest-apis/sort-search-results, -sort-tiebreaker,https://www.elastic.co/docs/explore-analyze/query-filter/languages/eql#eql-search-specify-a-sort-tiebreaker, -source-filtering,https://www.elastic.co/docs/reference/elasticsearch/rest-apis/retrieve-selected-fields#source-filtering, -split-processor,https://www.elastic.co/docs/reference/enrich-processor/split-processor, -sql-async-search-api,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-sql-get-async,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/get-async-sql-search-api.html -sql-async-status-api,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-sql-get-async-status,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/get-async-sql-search-status-api.html -sql-clear-cursor-api,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-sql-clear-cursor,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/clear-sql-cursor-api.html -sql-delete-async-api,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-sql-delete-async,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/delete-async-sql-search-api.html -sql-rest-columnar,https://www.elastic.co/docs/explore-analyze/query-filter/languages/sql-rest-columnar, -sql-rest-filtering,https://www.elastic.co/docs/explore-analyze/query-filter/languages/sql-rest-filtering, -sql-rest-format,https://www.elastic.co/docs/explore-analyze/query-filter/languages/sql-rest-format, -sql-search-api,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-sql-query,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/sql-search-api.html -sql-spec,https://www.elastic.co/docs/reference/query-languages/sql/sql-spec, -sql-translate-api,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-sql-translate,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/sql-translate-api.html -stack-settings,https://www.elastic.co/docs/deploy-manage/stack-settings, -start-basic,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-license-post-start-basic,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/start-basic.html -start-dfanalytics,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ml-start-data-frame-analytics,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/start-dfanalytics.html -start-trained-model-deployment,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ml-start-trained-model-deployment,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/start-trained-model-deployment.html -start-transform,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-transform-start-transform,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/start-transform.html -start-trial,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-license-post-start-trial,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/start-trial.html -stop-dfanalytics,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ml-stop-data-frame-analytics,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/stop-dfanalytics.html -stop-trained-model-deployment,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ml-stop-trained-model-deployment,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/stop-trained-model-deployment.html -stop-transform,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-transform-stop-transform,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/stop-transform.html -stored-fields,https://www.elastic.co/docs/reference/elasticsearch/rest-apis/retrieve-selected-fields#stored-fields, -synonym-rule-create,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-synonyms-put-synonym-rule,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/put-synonym-rule.html -synonym-rule-delete,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-synonyms-delete-synonym-rule,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/delete-synonym-rule.html -synonym-rule-get,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-synonyms-get-synonym-rule,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/get-synonym-rule.html -synonym-set-create,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-synonyms-put-synonym,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/put-synonyms-set.html -synonym-set-define,https://www.elastic.co/docs/reference/text-analysis/analysis-synonym-graph-tokenfilter#analysis-synonym-graph-define-synonyms, -synonym-set-delete,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-synonyms-delete-synonym,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/delete-synonyms-set.html -synonym-set-get,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-synonyms-get-synonym,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/get-synonyms-set.html -synonym-set-list,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-synonyms-get-synonym,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/get-synonyms-set.html -synonym-solr,https://www.elastic.co/docs/reference/text-analysis/analysis-synonym-graph-tokenfilter#_solr_format_2, -supported-flags,https://www.elastic.co/docs/reference/query-languages/query-dsl/query-dsl-simple-query-string-query#supported-flags, -tasks,https://www.elastic.co/docs/api/doc/elasticsearch/group/endpoint-tasks,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/tasks.html -templating-role-query,https://www.elastic.co/docs/deploy-manage/users-roles/cluster-or-deployment-auth/controlling-access-at-document-field-level#templating-role-query, -term-vectors-examples,https://www.elastic.co/docs/reference/elasticsearch/rest-apis/term-vectors-examples, -terminate-processor,https://www.elastic.co/docs/reference/enrich-processor/terminate-processor, -test-grok-pattern,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-text-structure-test-grok-pattern,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/test-grok-pattern.html -time-value,https://github.com/elastic/elasticsearch/blob/current/libs/core/src/main/java/org/elasticsearch/core/TimeValue.java, -time-zone-id,https://docs.oracle.com/javase/8/docs/api/java/time/ZoneId.html, -trim-processor,https://www.elastic.co/docs/reference/enrich-processor/trim-processor, -update-dfanalytics,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ml-update-data-frame-analytics,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/update-dfanalytics.html -update-desired-nodes,https://www.elastic.co/docs/api/doc/elasticsearch/group/endpoint-cluster,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/cluster.html -update-license,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-license-post,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/update-license.html -update-trained-model-deployment,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ml-update-trained-model-deployment,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/update-trained-model-deployment.html -update-transform,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-transform-update-transform,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/update-transform.html -upgrade-transforms,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-transform-upgrade-transforms,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/upgrade-transforms.html -uppercase-processor,https://www.elastic.co/docs/reference/enrich-processor/uppercase-processor, -urldecode-processor,https://www.elastic.co/docs/reference/enrich-processor/urldecode-processor, -usage-api,https://www.elastic.co/docs/api/doc/elasticsearch/group/endpoint-xpack,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/usage-api.html -user-agent-processor,https://www.elastic.co/docs/reference/enrich-processor/user-agent-processor, -user-profile,https://www.elastic.co/docs/deploy-manage/users-roles/cluster-or-deployment-auth/user-profiles, -verify-repository,https://www.elastic.co/docs/deploy-manage/tools/snapshot-and-restore/self-managed#snapshots-repository-verification, -voting-config-exclusions,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-cluster-post-voting-config-exclusions,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/voting-config-exclusions.html -voyageai-embeddings,https://docs.voyageai.com/docs/embeddings, -voyageai-rerank,https://docs.voyageai.com/docs/reranker, -watcher-works,https://www.elastic.co/docs/explore-analyze/alerts-cases/watcher/how-watcher-works, -watcher-api-ack-watch,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-watcher-ack-watch,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/watcher-api-ack-watch.html -watcher-api-activate-watch,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-watcher-activate-watch,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/watcher-api-activate-watch.html -watcher-api-deactivate-watch,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-watcher-deactivate-watch,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/watcher-api-deactivate-watch.html -watcher-api-delete-watch,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-watcher-delete-watch,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/watcher-api-delete-watch.html -watcher-api-execute-watch,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-watcher-execute-watch,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/watcher-api-execute-watch.html -watcher-api-get-settings,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-watcher-get-settings,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/watcher-api-get-settings.html -watcher-api-get-watch,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-watcher-get-watch,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/watcher-api-get-watch.html -watcher-api-put-watch,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-watcher-put-watch,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/watcher-api-put-watch.html -watcher-api-query-watches,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-watcher-query-watches,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/watcher-api-query-watches.html -watcher-api-start,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-watcher-start,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/watcher-api-start.html -watcher-api-stats,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-watcher-stats,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/watcher-api-stats.html -watcher-api-stop,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-watcher-stop,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/watcher-api-stop.html -watcher-api-update-settings,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-watcher-update-settings,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/watcher-api-update-settings.html -watsonx-api-keys,https://cloud.ibm.com/iam/apikeys, -watsonx-api-models,https://www.ibm.com/products/watsonx-ai/foundation-models, -watsonx-api-version,https://cloud.ibm.com/apidocs/watsonx-ai#active-version-dates, -xpack-rollup,https://www.elastic.co/docs/manage-data/lifecycle/rollup, \ No newline at end of file +doc_id,doc_url,previous_version_doc_url,description +ack-watch, https://www.elastic.co/docs/explore-analyze/alerts-cases/watcher/actions#example,, +apis,https://www.elastic.co/docs/api/doc/elasticsearch,, +add-nodes,https://www.elastic.co/docs/deploy-manage/maintenance/add-and-remove-elasticsearch-nodes,, +alias-update,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-put-alias,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/indices-add-alias.html, +aliases-update,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-update-aliases,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/indices-aliases.html, +alibabacloud-api-keys,https://opensearch.console.aliyun.com/cn-shanghai/rag/api-key,, +analysis-analyzers,https://www.elastic.co/docs/reference/text-analysis/analyzer-reference,, +amazonbedrock-models,https://docs.aws.amazon.com/bedrock/latest/userguide/models-supported.html,, +amazonbedrock-secret-keys,https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_access-keys.html,, +amazonsagemaker-invoke,https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_runtime_InvokeEndpoint.html,, +amazonsagemaker-secret-keys,https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_access-keys.html,, +analysis-charfilters,https://www.elastic.co/docs/reference/text-analysis/character-filter-reference,, +analysis-normalizers,https://www.elastic.co/docs/reference/text-analysis/normalizers,, +analysis-standard-analyzer,https://www.elastic.co/docs/reference/text-analysis/analysis-standard-analyzer,, +analysis-tokenfilters,https://www.elastic.co/docs/reference/text-analysis/token-filter-reference,, +analysis-tokenizers,https://www.elastic.co/docs/reference/text-analysis/tokenizer-reference,, +analysis,https://www.elastic.co/docs/manage-data/data-store/text-analysis,, +analyze-repository,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-snapshot-repository-analyze,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/repo-analysis-api.html, +analyzer-anatomy,https://www.elastic.co/docs/manage-data/data-store/text-analysis/anatomy-of-an-analyzer,, +analyzer-update-existing,https://www.elastic.co/docs/manage-data/data-store/text-analysis/specify-an-analyzer#update-analyzers-on-existing-indices,, +anthropic-messages,https://docs.anthropic.com/en/api/messages,, +anthropic-models,https://docs.anthropic.com/en/docs/about-claude/models/all-models#model-names,, +api-date-math-index-names,https://www.elastic.co/docs/reference/elasticsearch/rest-apis/api-conventions#api-date-math-index-names,, +api-root,https://www.elastic.co/docs/api/doc/elasticsearch/group/endpoint-info,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/rest-api-root.html, +append-processor,https://www.elastic.co/docs/reference/enrich-processor/append-processor,, +async-search,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-async-search-submit,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/async-search.html, +attachment,https://www.elastic.co/docs/reference/enrich-processor/attachment,, +autoscaling,https://www.elastic.co/docs/deploy-manage/autoscaling,, +autoscaling-deciders,https://www.elastic.co/docs/deploy-manage/autoscaling/autoscaling-deciders,, +autoscaling-delete-autoscaling-policy,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-autoscaling-delete-autoscaling-policy,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/autoscaling-delete-autoscaling-policy.html, +autoscaling-get-autoscaling-capacity,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-autoscaling-get-autoscaling-capacity,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/autoscaling-get-autoscaling-capacity.html, +autoscaling-get-autoscaling-policy,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-autoscaling-get-autoscaling-policy,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/autoscaling-get-autoscaling-policy.html, +autoscaling-put-autoscaling-policy,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-autoscaling-put-autoscaling-policy,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/autoscaling-put-autoscaling-policy.html, +avoid-index-pattern-collisions,https://www.elastic.co/docs/manage-data/data-store/templates#avoid-index-pattern-collisions,, +azureaistudio-api-keys,https://ai.azure.com/,, +azureaistudio-endpoint-types,https://learn.microsoft.com/en-us/azure/ai-foundry/concepts/deployments-overview#billing-for-deploying-and-inferencing-llms-in-azure-ai-studio,, +azureopenai,https://oai.azure.com/,, +azureopenai-auth,https://learn.microsoft.com/en-us/azure/ai-services/openai/reference#authentication,, +azureopenai-portal,https://portal.azure.com/#view/HubsExtension/BrowseAll,, +azureopenai-quota-limits,https://learn.microsoft.com/en-us/azure/ai-services/openai/quotas-limits,, +behavioral-analytics-collection-event,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-search-application-post-behavioral-analytics-event,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/post-analytics-collection-event.html, +behavioral-analytics-event-reference,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/behavioral-analytics-event-reference.html,, +byte-units,https://www.elastic.co/docs/reference/elasticsearch/rest-apis/api-conventions#byte-units,, +bytes-processor,https://www.elastic.co/docs/reference/enrich-processor/bytes-processor,, +calendar-and-fixed-intervals,https://www.elastic.co/docs/reference/aggregations/search-aggregations-bucket-datehistogram-aggregation#calendar_and_fixed_intervals,, +cat-alias,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-cat-aliases,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/cat-alias.html, +cat-allocation,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-cat-allocation,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/cat-allocation.html, +cat-anomaly-detectors,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-cat-ml-jobs,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/cat-anomaly-detectors.html, +cat-component-templates,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-cat-component-templates,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/cat-component-templates.html, +cat-count,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-cat-count,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/cat-count.html, +cat-datafeeds,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-cat-ml-datafeeds,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/cat-datafeeds.html, +cat-dfanalytics,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-cat-ml-data-frame-analytics,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/cat-dfanalytics.html, +cat-fielddata,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-cat-fielddata,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/cat-fielddata.html, +cat-health,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-cat-health,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/cat-health.html, +cat-indices,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-cat-indices,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/cat-indices.html, +cat-master,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-cat-master,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/cat-master.html, +cat-nodeattrs,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-cat-nodeattrs,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/cat-nodeattrs.html, +cat-nodes,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-cat-nodes,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/cat-nodes.html, +cat-pending-tasks,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-cat-pending-tasks,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/cat-pending-tasks.html, +cat-plugins,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-cat-plugins,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/cat-plugins.html, +cat-recovery,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-cat-recovery,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/cat-recovery.html, +cat-repositories,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-cat-repositories,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/cat-repositories.html, +cat-segments,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-cat-segments,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/cat-segments.html, +cat-shards,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-cat-shards,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/cat-shards.html, +cat-snapshots,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-cat-snapshots,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/cat-snapshots.html, +cat-tasks,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-cat-tasks,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/cat-tasks.html, +cat-templates,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-cat-templates,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/cat-templates.html, +cat-thread-pool,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-cat-thread-pool,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/cat-thread-pool.html, +cat-trained-model,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-cat-ml-trained-models,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/cat-trained-model.html, +cat-transforms,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-cat-transforms,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/cat-transforms.html, +cat,https://www.elastic.co/docs/api/doc/elasticsearch/group/endpoint-cat,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/cat.html, +ccr,https://www.elastic.co/docs/deploy-manage/tools/cross-cluster-replication,, +ccr-auto-follow,https://www.elastic.co/docs/deploy-manage/tools/cross-cluster-replication/manage-auto-follow-patterns,, +ccr-delete-auto-follow-pattern,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ccr-delete-auto-follow-pattern,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/ccr-delete-auto-follow-pattern.html, +ccr-get-auto-follow-pattern,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ccr-get-auto-follow-pattern-1,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/ccr-get-auto-follow-pattern.html, +ccr-get-follow-info,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ccr-follow-info,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/ccr-get-follow-info.html, +ccr-get-follow-stats,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ccr-follow-stats,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/ccr-get-follow-stats.html, +ccr-get-stats,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ccr-stats,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/ccr-get-stats.html, +ccr-pause-auto-follow-pattern,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ccr-pause-auto-follow-pattern,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/ccr-pause-auto-follow-pattern.html, +ccr-post-forget-follower,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ccr-forget-follower,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/ccr-post-forget-follower.html, +ccr-post-pause-follow,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ccr-pause-follow,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/ccr-post-pause-follow.html, +ccr-post-resume-follow,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ccr-resume-follow,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/ccr-post-resume-follow.html, +ccr-post-unfollow,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ccr-unfollow,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/ccr-post-unfollow.html, +ccr-put-auto-follow-pattern,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ccr-put-auto-follow-pattern,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/ccr-put-auto-follow-pattern.html, +ccr-put-follow,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ccr-follow,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/ccr-put-follow.html, +ccr-resume-auto-follow-pattern,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ccr-resume-auto-follow-pattern,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/ccr-resume-auto-follow-pattern.html, +ccs-network-delays,https://www.elastic.co/docs/solutions/search/cross-cluster-search#ccs-network-delays,, +ccs-privileges,https://www.elastic.co/docs/deploy-manage/remote-clusters/remote-clusters-cert#remote-clusters-privileges-ccs,, +chunking-strategies,https://www.elastic.co/docs/explore-analyze/elastic-inference/inference-api#chunking-strategies, +clean-up-snapshot-repo,https://www.elastic.co/docs/deploy-manage/tools/snapshot-and-restore/self-managed#snapshots-repository-cleanup,, +clear-repositories-metering-archive-api,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-nodes-clear-repositories-metering-archive,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/clear-repositories-metering-archive-api.html, +clear-scroll-api,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-clear-scroll,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/clear-scroll-api.html, +clear-trained-model,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ml-clear-trained-model-deployment-cache,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/clear-trained-model-deployment-cache.html, +cluster-allocation-explain,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-cluster-allocation-explain,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/cluster-allocation-explain.html, +cluster-allocation-explain-examples,https://www.elastic.co/docs/troubleshoot/elasticsearch/cluster-allocation-api-examples,, +cluster-get-settings,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-cluster-get-settings,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/cluster-get-settings.html, +cluster-health,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-cluster-health,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/cluster-health.html, +cluster-info,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-cluster-info,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/cluster-info.html, +cluster-name,https://www.elastic.co/docs/deploy-manage/deploy/self-managed/important-settings-configuration##_cluster_name_setting,, +cluster-nodes-hot-threads,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-nodes-hot-threads,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/cluster-nodes-hot-threads.html, +cluster-nodes-info,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-nodes-info,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/cluster-nodes-info.html, +cluster-nodes-reload-secure-settings,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-nodes-reload-secure-settings,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/cluster-nodes-reload-secure-settings.html, +cluster-nodes-stats,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-nodes-stats,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/cluster-nodes-stats.html, +cluster-nodes-usage,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-nodes-usage,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/cluster-nodes-usage.html, +cluster-nodes,https://www.elastic.co/docs/reference/elasticsearch/rest-apis/api-conventions#cluster-nodes,, +cluster-pending,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-cluster-pending-tasks,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/cluster-pending.html, +cluster-ping,https://www.elastic.co/docs/api/doc/elasticsearch/group/endpoint-cluster,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/cluster.html, +cluster-remote-info,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-cluster-remote-info,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/cluster-remote-info.html, +cluster-reroute,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-cluster-reroute,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/cluster-reroute.html, +cluster-state,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-cluster-state,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/cluster-state.html, +cluster-stats,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-cluster-stats,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/cluster-stats.html, +cluster-update-settings,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-cluster-put-settings,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/cluster-update-settings.html, +cluster,https://www.elastic.co/docs/api/doc/elasticsearch/group/endpoint-cluster,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/cluster.html, +cohere-api-keys,https://dashboard.cohere.com/api-keys,, +cohere-models,https://docs.cohere.com/docs/models#command,, +common-options,https://www.elastic.co/docs/reference/elasticsearch/rest-apis/common-options,, +community-id-processor,https://www.elastic.co/docs/reference/enrich-processor/community-id-processor,, +connector-sync-job-cancel,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-connector-sync-job-cancel,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/cancel-connector-sync-job-api.html, +connector-sync-job-checkin,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-connector-sync-job-check-in,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/check-in-connector-sync-job-api.html, +connector-sync-job-claim,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-connector-sync-job-claim,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/claim-connector-sync-job-api.html, +connector-sync-job-error,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-connector-sync-job-error,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/set-connector-sync-job-error-api.html, +collapse-search-results,https://www.elastic.co/docs/reference/elasticsearch/rest-apis/collapse-search-results,, +connector-sync-job-delete,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-connector-sync-job-delete,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/delete-connector-sync-job-api.html, +connector-sync-job-get,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-connector-sync-job-get,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/get-connector-sync-job-api.html, +connector-sync-job-post,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-connector-sync-job-post,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/create-connector-sync-job-api.html, +connector-sync-job-list,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-connector-sync-job-list,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/list-connector-sync-jobs-api.html, +connector-sync-job-stats,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-connector-sync-job-update-stats,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/set-connector-sync-job-stats-api.html, +connector-checkin,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-connector-check-in,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/check-in-connector-api.html, +connector-delete,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-connector-delete,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/delete-connector-api.html, +connector-features,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-connector-update-features,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/update-connector-features-api.html, +connector-get,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-connector-get,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/get-connector-api.html, +connector-last-sync,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-connector-last-sync,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/update-connector-last-sync-api.html, +connector-list,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-connector-list,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/list-connector-api.html, +connector-post,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-connector-put,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/create-connector-api.html, +connector-put,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-connector-put,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/create-connector-api.html, +connector-configuration,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-connector-update-configuration,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/update-connector-configuration-api.html, +connector-update-api-key-id,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-connector-update-api-key-id,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/update-connector-api-key-id-api.html, +connector-update-error,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-connector-update-error,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/update-connector-error-api.html, +connector-update-filtering,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-connector-update-filtering,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/update-connector-filtering-api.html, +connector-update-filtering-validation,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-connector-update-filtering-validation,, +connector-update-index-name,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-connector-update-index-name,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/update-connector-index-name-api.html, +connector-update-name,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-connector-update-name,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/update-connector-name-description-api.html, +connector-update-native,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-connector-update-native,, +connector-update-pipeline,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-connector-update-pipeline,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/update-connector-pipeline-api.html, +connector-update-scheduling,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-connector-update-scheduling,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/update-connector-scheduling-api.html, +connector-update-service-type,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-connector-update-service-type,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/update-connector-service-type-api.html, +connector-update-status,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-connector-update-status,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/update-connector-status-api.html, +convert-processor,https://www.elastic.co/docs/reference/enrich-processor/convert-processor,, +cron-expressions,https://www.elastic.co/docs/reference/elasticsearch/rest-apis/api-conventions#api-cron-expressions,, +csv-processor,https://www.elastic.co/docs/reference/enrich-processor/csv-processor,, +dangling-index-delete,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-dangling-indices-delete-dangling-index,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/dangling-index-delete.html, +dangling-index-import,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-dangling-indices-import-dangling-index,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/dangling-index-import.html, +dangling-indices-list,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-dangling-indices-list-dangling-indices,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/dangling-indices-list.html, +data-processor,https://www.elastic.co/docs/reference/enrich-processor/date-processor,, +data-stream-delete,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-delete-data-stream,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/indices-delete-data-stream.html, +data-stream-delete-lifecycle,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-delete-data-lifecycle,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/data-streams-delete-lifecycle.html, +data-stream-explain-lifecycle,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-explain-data-lifecycle,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/data-streams-explain-lifecycle.html, +data-stream-get,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-get-data-stream,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/indices-get-data-stream.html, +data-stream-get-lifecycle,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-get-data-lifecycle,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/data-streams-get-lifecycle.html, +data-stream-lifecycle,https://www.elastic.co/docs/manage-data/lifecycle/data-stream,, +data-stream-lifecycle-stats,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-get-data-lifecycle-stats,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/data-streams-get-lifecycle-stats.html, +data-stream-migrate,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-migrate-to-data-stream,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/indices-migrate-to-data-stream.html, +data-stream-promote,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-promote-data-stream,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/promote-data-stream-api.html, +data-stream-put-lifecycle,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-put-data-lifecycle,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/data-streams-put-lifecycle.html, +data-stream-stats-api,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-data-streams-stats-1,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/data-stream-stats-api.html, +data-stream-update,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-modify-data-stream,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/modify-data-streams-api.html, +data-streams,https://www.elastic.co/docs/manage-data/data-store/data-streams,, +date-index-name-processor,https://www.elastic.co/docs/reference/enrich-processor/date-index-name-processor,, +dcg,https://www.elastic.co/docs/reference/elasticsearch/rest-apis/search-rank-eval#_discounted_cumulative_gain_dcg,, +deepseek-api-keys,https://api-docs.deepseek.com/,, +defining-roles,https://www.elastic.co/docs/deploy-manage/users-roles/cluster-or-deployment-auth/defining-roles,, +delete-analytics-collection,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-search-application-delete-behavioral-analytics,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/delete-analytics-collection.html, +delete-async-sql-search-api,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-sql-delete-async,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/delete-async-sql-search-api.html, +delete-enrich-policy-api,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-enrich-delete-policy,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/delete-enrich-policy-api.html, +delete-license,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-license-delete,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/delete-license.html, +delete-pipeline-api,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ingest-delete-pipeline,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/delete-pipeline-api.html, +delete-synonym-rule,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-synonyms-delete-synonym-rule,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/delete-synonym-rule.html, +delete-synonyms-set,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-synonyms-delete-synonym,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/delete-synonyms-set.html, +delete-trained-models-aliases,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ml-delete-trained-model-alias,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/delete-trained-models-aliases.html, +delete-trained-models,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ml-delete-trained-model,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/delete-trained-models.html, +delete-transform,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-transform-delete-transform,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/delete-transform.html, +dissect-processor,https://www.elastic.co/docs/reference/enrich-processor/dissect-processor,, +distance-units,https://www.elastic.co/docs/reference/elasticsearch/rest-apis/api-conventions#distance-units,, +docs-bulk,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-bulk,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/docs-bulk.html, +docs-delete-by-query,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-delete-by-query,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/docs-delete-by-query.html, +docs-delete-by-query-rethrottle,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-delete-by-query-rethrottle,, +docs-delete,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-delete,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/docs-delete.html, +docs-get,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-get,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/docs-get.html, +docs-index,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-create,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/docs-index_.html, +docs-multi-get,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-mget,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/docs-multi-get.html, +docs-multi-termvectors,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-mtermvectors,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/docs-multi-termvectors.html, +docs-reindex,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-reindex,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/docs-reindex.html, +docs-termvectors,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-termvectors,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/docs-termvectors.html, +docs-update-by-query,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-update-by-query,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/docs-update-by-query.html, +docs-update-by-query-rethrottle,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-update-by-query-rethrottle,, +docs-update,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-update,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/docs-update.html, +document-input-parameters,https://www.elastic.co/docs/reference/query-languages/query-dsl/query-dsl-mlt-query#_document_input_parameters,, +docvalue-fields,https://www.elastic.co/docs/reference/elasticsearch/rest-apis/retrieve-selected-fields#docvalue-fields,, +dot-expand-processor,https://www.elastic.co/docs/reference/enrich-processor/dot-expand-processor,, +drop-processor,https://www.elastic.co/docs/reference/enrich-processor/drop-processor,, +eland-import,https://www.elastic.co/docs/explore-analyze/machine-learning/nlp/ml-nlp-import-model#ml-nlp-import-script,, +enrich-processor,https://www.elastic.co/docs/reference/enrich-processor/enrich-processor,, +enrich-stats-api,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-enrich-stats,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/enrich-stats-api.html, +eql-async-search-api,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-eql-get,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/get-async-eql-search-api.html, +eql-async-search-delete,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-eql-delete,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/delete-async-eql-search-api.html, +eql-async-search-status-api,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-eql-get-status,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/get-async-eql-status-api.html, +eql-basic-syntax,https://www.elastic.co/docs/reference/query-languages/eql/eql-syntax#eql-basic-syntax,, +eql-search-api,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-eql-search,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/eql-search-api.html, +eql-sequences,https://www.elastic.co/docs/reference/query-languages/eql/eql-syntax#eql-sequences,, +eql-missing-events,https://www.elastic.co/docs/reference/query-languages/eql/eql-syntax#eql-missing-events,, +eql-syntax,https://www.elastic.co/docs/reference/query-languages/eql/eql-syntax,, +eql,https://www.elastic.co/docs/explore-analyze/query-filter/languages/eql,, +esql,https://www.elastic.co/docs/explore-analyze/query-filter/languages/esql,, +esql-async-query,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-esql-async-query,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/esql-async-query-api.html, +esql-async-query-delete,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-esql-async-query-delete,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/esql-async-query-delete-api.html, +esql-async-query-get,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-esql-async-query-get,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/esql-async-query-get-api.html, +esql-async-query-stop,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-esql-async-query-stop,, +esql-query,https://www.elastic.co/docs/explore-analyze/query-filter/languages/esql-rest,, +esql-query-params,https://www.elastic.co/docs/explore-analyze/query-filter/languages/esql-rest#esql-rest-params,, +esql-returning-localized-results,https://www.elastic.co/docs/explore-analyze/query-filter/languages/esql-rest#esql-locale-param,, +evaluate-dfanalytics,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ml-evaluate-data-frame,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/evaluate-dfanalytics.html, +execute-enrich-policy-api,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-enrich-execute-policy,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/execute-enrich-policy-api.html, +execute-watch,https://www.elastic.co/docs/explore-analyze/alerts-cases/watcher/execute-watch,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/watcher-api-execute-watch.html, +expected-reciprocal,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-rank-eval#_expected_reciprocal_rank_err,, +explain-dfanalytics,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ml-explain-data-frame-analytics,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/explain-dfanalytics.html, +fail-processor,https://www.elastic.co/docs/reference/enrich-processor/fail-processor,, +features-reset,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-features-reset-features,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/reset-features-api.html, +field-and-document-access-control,https://www.elastic.co/docs/deploy-manage/users-roles/cluster-or-deployment-auth/controlling-access-at-document-field-level,, +field-usage-stats,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-field-usage-stats,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/field-usage-stats.html, +find-field-structure,https://www.elastic.co/docs/api/doc/elasticsearch/group/endpoint-text_structure,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/text-structure-apis.html, +find-message-structure,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-text-structure-find-message-structure,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/find-message-structure.html, +find-structure,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-text-structure-find-structure,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/find-structure.html, +find-text-structure-examples,https://www.elastic.co/docs/reference/elasticsearch/rest-apis/find-text-structure-examples,, +fingerprint-processor,https://www.elastic.co/docs/reference/enrich-processor/fingerprint-processor,, +fleet-multi-search,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-fleet-msearch,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/fleet-multi-search.html, +fleet-search,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-fleet-search,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/fleet-search.html, +foreach-processor,https://www.elastic.co/docs/reference/enrich-processor/foreach-processor,, +fuzziness,https://www.elastic.co/docs/reference/elasticsearch/rest-apis/common-options#fuzziness,, +gap-policy,https://www.elastic.co/docs/reference/aggregations/pipeline#gap-policy,, +geo-shape,https://www.elastic.co/docs/reference/elasticsearch/mapping-reference/geo-shape,, +geo-grid-processor,https://www.elastic.co/docs/reference/enrich-processor/ingest-geo-grid-processor,, +geoip-delete-database,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ingest-delete-geoip-database,, +geoip-get-database,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ingest-get-geoip-database,, +geoip-put-database,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ingest-put-geoip-database,, +geoip-processor,https://www.elastic.co/docs/reference/enrich-processor/geoip-processor,, +geoip-stats-api,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ingest-geo-ip-stats,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/geoip-stats-api.html, +get-basic-status,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-license-get-basic-status,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/get-basic-status.html, +get-dfanalytics-stats,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ml-get-data-frame-analytics-stats,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/get-dfanalytics-stats.html, +get-dfanalytics,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ml-get-data-frame-analytics,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/get-dfanalytics.html, +get-enrich-policy-api,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-enrich-get-policy,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/get-enrich-policy-api.html, +get-features-api,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-features-get-features,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/get-features-api.html, +get-global-checkpoints,https://www.elastic.co/docs/api/doc/elasticsearch/group/endpoint-fleet,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/fleet-apis.html, +get-license,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-license-get,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/get-license.html, +get-ml-info,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ml-info,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/get-ml-info.html, +get-pipeline-api,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ingest-get-pipeline,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/get-pipeline-api.html, +get-repositories-metering-api,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-nodes-get-repositories-metering-info,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/get-repositories-metering-api.html, +get-synonym-rule,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-synonyms-get-synonym-rule,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/get-synonym-rule.html, +get-synonyms-set,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-synonyms-get-synonym,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/get-synonyms-set.html, +get-trained-models-stats,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ml-get-trained-models-stats,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/get-trained-models-stats.html, +get-trained-models,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ml-get-trained-models,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/get-trained-models.html, +get-transform-stats,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-transform-get-transform-stats,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/get-transform-stats.html, +get-transform,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-transform-get-transform,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/get-transform.html, +get-trial-status,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-license-get-trial-status,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/get-trial-status.html, +googlevertexai-locations,https://cloud.google.com/vertex-ai/generative-ai/docs/learn/locations,, +googlevertexai-models,https://cloud.google.com/vertex-ai/generative-ai/docs/model-reference/text-embeddings-api,, +googleaistudio-models,https://ai.google.dev/gemini-api/docs/models,, +graph,https://www.elastic.co/docs/explore-analyze/visualize/graph,, +graph-explore-api,https://www.elastic.co/docs/api/doc/elasticsearch/group/endpoint-graph,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/graph-explore-api.html, +grok,https://www.elastic.co/docs/explore-analyze/scripting/grok,, +grok-processor,https://www.elastic.co/docs/reference/enrich-processor/grok-processor,, +gsub-processor,https://www.elastic.co/docs/reference/enrich-processor/gsub-processor,, +health-api,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-health-report,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/health-api.html, +huggingface-chat-completion-interface,https://huggingface.co/docs/inference-providers/en/tasks/chat-completion#conversational-large-language-models-llms,, +huggingface-tokens,https://huggingface.co/settings/tokens,, +ilm-delete-lifecycle,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ilm-delete-lifecycle,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/ilm-delete-lifecycle.html, +ilm-explain-lifecycle,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ilm-explain-lifecycle,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/ilm-explain-lifecycle.html, +ilm-get-lifecycle,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ilm-get-lifecycle,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/ilm-get-lifecycle.html, +ilm-get-status,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ilm-get-status,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/ilm-get-status.html, +ilm-index-lifecycle,https://www.elastic.co/docs/manage-data/lifecycle/index-lifecycle-management/index-lifecycle,, +ilm-migrate-to-data-tiers,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ilm-migrate-to-data-tiers,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/ilm-migrate-to-data-tiers.html, +ilm-move-to-step,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ilm-move-to-step,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/ilm-move-to-step.html, +ilm-put-lifecycle,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ilm-put-lifecycle,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/ilm-put-lifecycle.html, +ilm-remove-policy,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ilm-remove-policy,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/ilm-remove-policy.html, +ilm-retry-policy,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ilm-retry,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/ilm-retry-policy.html, +ilm-start,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ilm-start,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/ilm-start.html, +ilm-stop,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ilm-stop,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/ilm-stop.html, +important-settings,https://www.elastic.co/docs/deploy-manage/deploy/self-managed/important-settings-configuration,, +index-block-add,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-add-block,, +index-block-remove,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-remove-block,, +index-modules-blocks,https://www.elastic.co/docs/reference/elasticsearch/index-settings/index-block,, +index-modules-settings,https://www.elastic.co/docs/reference/elasticsearch/index-settings/index-modules,, +index-modules-slowlog-slowlog,https://www.elastic.co/docs/reference/elasticsearch/index-settings/slow-log#index-slow-log,, +index-modules,https://www.elastic.co/docs/reference/elasticsearch/index-settings/index-modules,, +index,https://www.elastic.co/docs/get-started,, +indexing-buffer,https://www.elastic.co/docs/reference/elasticsearch/configuration-reference/indexing-buffer-settings,, +index-modules-merge,https://www.elastic.co/docs/reference/elasticsearch/index-settings/merge,, +index-settings,https://www.elastic.co/docs/reference/elasticsearch/index-settings/,, +index-templates,https://www.elastic.co/docs/manage-data/data-store/templates,, +index-templates-exist,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-exists-index-template,, +index-templates-put,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-put-index-template,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/indices-put-template.html, +index-templates-v1,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-put-template,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/indices-templates-v1.html, +indices-aliases,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-update-aliases,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/indices-aliases.html, +indices-aliases-exist,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-exists-alias,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/indices-alias-exists.html, +indices-analyze,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-analyze,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/indices-analyze.html, +indices-clearcache,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-clear-cache,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/indices-clearcache.html, +indices-clone-index,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-clone,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/indices-clone-index.html, +indices-close,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-close,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/indices-close.html, +indices-component-template,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-cluster-put-component-template,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/indices-component-template.html, +indices-create-data-stream,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-create-data-stream,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/indices-create-data-stream.html, +indices-create-index,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-create,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/indices-create-index.html, +indices-delete-alias,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-delete-alias,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/indices-delete-alias.html, +indices-delete-index,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-delete,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/indices-delete-index.html, +indices-delete-template,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-delete-index-template,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/indices-delete-template.html, +indices-delete-template-v1,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-delete-template,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/indices-delete-template-v1.html, +indices-disk-usage,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-disk-usage,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/indices-disk-usage.html, +indices-downsample-data-stream,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-downsample,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/indices-downsample-data-stream.html, +indices-exists,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-exists,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/indices-exists.html, +indices-flush,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-flush,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/indices-flush.html, +indices-forcemerge,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-forcemerge,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/indices-forcemerge.html, +indices-get-alias,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-get-alias,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/indices-get-alias.html, +indices-get-data-stream-settings,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-get-data-stream-settings,, +indices-get-field-mapping,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-get-mapping,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/indices-get-field-mapping.html, +indices-get-index,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-get,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/indices-get-index.html, +indices-get-mapping,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-get-mapping,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/indices-get-field-mapping.html, +indices-get-settings,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-get-settings,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/indices-get-settings.html, +indices-get-template,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-get-index-template,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/indices-get-template.html, +indices-get-template-v1,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-get-template,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/indices-get-template-v1.html, +indices-open-close,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-open,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/indices-open-close.html, +indices-put-data-stream-settings,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-put-data-stream-settings,, +indices-put-mapping,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-put-mapping,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/indices-put-mapping.html, +indices-recovery,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-recovery,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/indices-recovery.html, +indices-refresh,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-refresh,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/indices-refresh.html, +indices-refresh-disable,https://www.elastic.co/docs/deploy-manage/production-guidance/optimize-performance/indexing-speed#disable-refresh-interval,, +indices-reload-analyzers,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-reload-search-analyzers,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/indices-reload-analyzers.html, +indices-resolve-cluster-api,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-resolve-cluster,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/indices-resolve-cluster-api.html, +indices-resolve-index-api,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-resolve-index,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/indices-resolve-index-api.html, +indices-rollover-index,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-rollover,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/indices-rollover-index.html, +indices-segments,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-segments,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/indices-segments.html, +indices-shards-stores,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-shard-stores,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/indices-shards-stores.html, +indices-shrink-index,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-shrink,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/indices-shrink-index.html, +indices-simulate,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-simulate-index-template,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/indices-simulate-index.html, +indices-simulate-template,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-simulate-template,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/indices-simulate-template.html, +indices-split-index,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-split,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/indices-split-index.html, +indices-stats,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-stats,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/indices-stats.html, +indices-template-exists-v1,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-exists-template,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/indices-template-exists-v1.html, +indices-templates,https://www.elastic.co/docs/manage-data/data-store/templates,, +indices-update-settings,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-put-settings,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/indices-update-settings.html, +infer-trained-model,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ml-infer-trained-model,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/infer-trained-model.html, +infer-trained-model-deployment,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ml-infer-trained-model,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/infer-trained-model.html, +inference-api-delete,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-inference-delete,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/delete-inference-api.html, +inference-api-get,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-inference-get,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/get-inference-api.html, +inference-api-post,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-inference-inference,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/post-inference-api.html, +inference-api-post-eis-chat-completion,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-inference-post-eis-chat-completion,, +inference-api-put,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-inference-put,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/put-inference-api.html, +inference-api-put-alibabacloud,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-inference-put-alibabacloud,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/infer-service-alibabacloud-ai-search.html, +inference-api-put-amazonbedrock,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-inference-put-amazonbedrock,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/infer-service-amazon-bedrock.html, +inference-api-put-amazonsagemaker,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-inference-put-amazonsagemaker,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/infer-service-amazon-sagemaker.html, +inference-api-put-anthropic,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-inference-put-anthropic,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/infer-service-anthropic.html, +inference-api-put-azureaistudio,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-inference-put-azureaistudio,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/infer-service-azure-ai-studio.html, +inference-api-put-azureopenai,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-inference-put-azureopenai,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/infer-service-azure-openai.html, +inference-api-put-cohere,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-inference-put-cohere,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/infer-service-cohere.html, +inference-api-put-custom,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-inference-put-custom,https://www.elastic.co/guide/en/elasticsearch/reference/8.19/infer-service-custom.html, +inference-api-put-deepseek,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-inference-put-deepseek,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/infer-service-deepseek.html, +inference-api-put-eis,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-inference-put-eis,, +inference-api-put-elasticsearch,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-inference-put-elasticsearch,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/infer-service-elasticsearch.html, +inference-api-put-elser,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-inference-put-elser,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/infer-service-elser.html, +inference-api-put-googleaistudio,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-inference-put-googleaistudio,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/infer-service-google-ai-studio.html, +inference-api-put-googlevertexai,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-inference-put-googlevertexai,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/infer-service-google-vertex-ai.html, +inference-api-put-huggingface,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-inference-put-hugging-face,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/infer-service-hugging-face.html, +inference-api-put-jinaai,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-inference-put-jinaai,, +inference-api-put-mistral,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-inference-put-mistral,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/infer-service-mistral.html, +inference-api-put-openai,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-inference-put-openai,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/infer-service-openai.html, +inference-api-put-voyageai,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-inference-put-voyageai,, +inference-api-put-watsonx,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-inference-put-watsonx,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/infer-service-watsonx-ai.html, +inference-api-stream,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-inference-stream-inference,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/stream-inference-api.html, +inference-api-chat-completion,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-inference-unified-inference,, +inference-api-update,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-inference-update,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/update-inference-api.html, +inference-chunking,https://www.elastic.co/docs/explore-analyze/elastic-inference/inference-api#infer-chunking-config,, +inference-processor,https://www.elastic.co/docs/reference/enrich-processor/inference-processor,, +info-api,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-info,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/info-api.html, +ingest,https://www.elastic.co/docs/manage-data/ingest/transform-enrich/ingest-pipelines,, +ingest-circle-processor,https://www.elastic.co/docs/reference/enrich-processor/ingest-circle-processor,, +ingest-node-set-security-user-processor,https://www.elastic.co/docs/reference/enrich-processor/ingest-node-set-security-user-processor,, +inner-hits,https://www.elastic.co/docs/reference/elasticsearch/rest-apis/retrieve-inner-hits,, +ip-location-delete-database,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ingest-delete-ip-location-database,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/delete-ip-location-database-api.html, +ip-location-get-database,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ingest-get-ip-location-database,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/get-ip-location-database-api.html, +ip-location-put-database,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ingest-put-ip-location-database,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/put-ip-location-database-api.html, +jinaAi-embeddings,https://jina.ai/embeddings/,, +jinaAi-rate-limit,https://jina.ai/contact-sales/#rate-limit,, +join-processor,https://www.elastic.co/docs/reference/enrich-processor/join-processor,, +json-processor,https://www.elastic.co/docs/reference/enrich-processor/json-processor,, +k-precision,https://www.elastic.co/docs/reference/elasticsearch/rest-apis/search-rank-eval#k-precision,, +k-recall,https://www.elastic.co/docs/reference/elasticsearch/rest-apis/search-rank-eval#k-recall,, +kv-processor,https://www.elastic.co/docs/reference/enrich-processor/kv-processor,, +knn-approximate,https://www.elastic.co/docs/solutions/search/vector/knn#approximate-knn,, +knn-inner-hits,https://www.elastic.co/docs/solutions/search/vector/knn#nested-knn-search-inner-hits,, +license-management,https://www.elastic.co/docs/deploy-manage/license/manage-your-license-in-self-managed-cluster,, +list-analytics-collection,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-search-application-get-behavioral-analytics,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/list-analytics-collection.html, +list-synonyms-sets,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-synonyms-get-synonyms-sets,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/list-synonyms-sets.html, +logstash-api-delete-pipeline,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-logstash-delete-pipeline,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/logstash-api-delete-pipeline.html, +logstash-api-get-pipeline,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-logstash-get-pipeline,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/logstash-api-get-pipeline.html, +logstash-api-put-pipeline,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-logstash-put-pipeline,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/logstash-api-put-pipeline.html, +logstash-centralized-pipeline-management,https://www.elastic.co/docs/reference/logstash/logstash-centralized-pipeline-management,, +logstash-configuration-file-structure,https://www.elastic.co/docs/reference/logstash/configuration-file-structure,, +logstash-logstash-settings-file,https://www.elastic.co/docs/reference/logstash/logstash-settings-file,, +lowercase-processor,https://www.elastic.co/docs/reference/enrich-processor/lowercase-processor,, +mapbox-vector-tile,https://github.com/mapbox/vector-tile-spec/blob/master/README.md,, +mapping-date-format,https://www.elastic.co/docs/reference/elasticsearch/mapping-reference/mapping-date-format,, +mapping-meta-field,https://www.elastic.co/docs/reference/elasticsearch/mapping-reference/mapping-meta-field,, +mapping-params,https://www.elastic.co/docs/reference/elasticsearch/mapping-reference/mapping-parameters,, +mapping-metadata,https://www.elastic.co/docs/reference/elasticsearch/mapping-reference/document-metadata-fields,, +mapping-roles,https://www.elastic.co/docs/deploy-manage/users-roles/cluster-or-deployment-auth/mapping-users-groups-to-roles,, +mapping-settings-limit,https://www.elastic.co/docs/reference/elasticsearch/index-settings/mapping-limit,, +mapping-source-field,https://www.elastic.co/docs/reference/elasticsearch/mapping-reference/mapping-source-field,, +mapping,https://www.elastic.co/docs/manage-data/data-store/mapping,, +mean-reciprocal,https://www.elastic.co/docs/reference/elasticsearch/rest-apis/search-rank-eval#_mean_reciprocal_rank,, +migrate,https://www.elastic.co/docs/api/doc/elasticsearch/group/endpoint-migration,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/migration-api.html, +migrate-index-allocation-filters,https://www.elastic.co/docs/manage-data/lifecycle/index-lifecycle-management/migrate-index-allocation-filters-to-node-roles,, +migration-api-cancel,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-cancel-migrate-reindex,, +migration-api-create-from,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-create-from,, +migration-api-deprecation,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-migration-deprecations,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/migration-api-deprecation.html, +migration-api-feature-upgrade,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-migration-get-feature-upgrade-status,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/feature-migration-api.html, +migration-api-reindex,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-migrate-reindex,, +mistral-api-keys,https://console.mistral.ai/api-keys/,, +mistral-api-models,https://docs.mistral.ai/getting-started/models/,, +ml-apis,https://www.elastic.co/docs/api/doc/elasticsearch/group/endpoint-ml,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/ml-apis.html, +ml-classification,https://www.elastic.co/docs/explore-analyze/machine-learning/data-frame-analytics/ml-dfa-classification,, +ml-close-job,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ml-close-job,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/ml-close-job.html, +ml-delete-calendar-event,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ml-delete-calendar-event,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/ml-delete-calendar-event.html, +ml-delete-calendar-job,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ml-delete-calendar-job,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/ml-delete-calendar-job.html, +ml-delete-calendar,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ml-delete-calendar,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/ml-delete-calendar.html, +ml-delete-datafeed,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ml-delete-datafeed,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/ml-delete-datafeed.html, +ml-delete-dfanalytics,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ml-delete-data-frame-analytics,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/delete-dfanalytics.html, +ml-delete-expired-data,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ml-delete-expired-data,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/ml-delete-expired-data.html, +ml-delete-filter,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ml-delete-filter,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/ml-delete-filter.html, +ml-delete-forecast,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ml-delete-forecast,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/ml-delete-forecast.html, +ml-delete-job,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ml-delete-job,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/ml-delete-job.html, +ml-delete-snapshot,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ml-delete-model-snapshot,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/ml-delete-snapshot.html, +ml-estimate-memory,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ml-estimate-model-memory,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/ml-estimate-model-memory.html, +ml-feature-importance,https://www.elastic.co/docs/explore-analyze/machine-learning/data-frame-analytics/ml-feature-importance,, +ml-flush-job,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ml-flush-job,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/ml-flush-job.html, +ml-forecast,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ml-forecast,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/ml-forecast.html, +ml-functions,https://www.elastic.co/docs/explore-analyze/machine-learning/anomaly-detection/ml-functions,, +ml-get-bucket,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ml-get-buckets,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/ml-get-bucket.html, +ml-get-calendar-event,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ml-get-calendar-events,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/ml-get-calendar-event.html, +ml-get-calendar,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ml-get-calendars,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/ml-get-calendar.html, +ml-get-category,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ml-get-categories,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/ml-get-category.html, +ml-get-datafeed-stats,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ml-get-datafeed-stats,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/ml-get-datafeed-stats.html, +ml-get-datafeed,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ml-get-datafeeds,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/ml-get-datafeed.html, +ml-get-filter,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ml-get-filters,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/ml-get-filter.html, +ml-get-influencer,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ml-get-influencers,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/ml-get-influencer.html, +ml-get-job-model-snapshot-upgrade-stats,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ml-get-model-snapshot-upgrade-stats,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/ml-get-job-model-snapshot-upgrade-stats.html, +ml-get-job-stats,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ml-get-job-stats,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/ml-get-job-stats.html, +ml-get-job,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ml-get-jobs,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/ml-get-job.html, +ml-get-memory,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ml-get-memory-stats,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/get-ml-memory.html, +ml-get-overall-buckets,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ml-get-overall-buckets,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/ml-get-overall-buckets.html, +ml-get-record,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ml-get-records,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/ml-get-record.html, +ml-get-snapshot,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ml-get-model-snapshots,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/ml-get-snapshot.html, +ml-jobs,https://www.elastic.co/docs/explore-analyze/machine-learning/anomaly-detection/ml-ad-run-jobs,, +ml-model-snapshots,https://www.elastic.co/docs/explore-analyze/machine-learning/anomaly-detection/ml-ad-run-jobs#ml-ad-model-snapshots,, +ml-open-job,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ml-open-job,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/ml-open-job.html, +ml-post-calendar-event,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ml-post-calendar-events,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/ml-post-calendar-event.html, +ml-post-data,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ml-post-data,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/ml-post-data.html, +ml-preview-datafeed,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ml-preview-datafeed,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/ml-preview-datafeed.html, +ml-put-calendar-job,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ml-put-calendar-job,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/ml-put-calendar-job.html, +ml-put-calendar,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ml-put-calendar,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/ml-put-calendar.html, +ml-put-datafeed,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ml-put-datafeed,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/ml-put-datafeed.html, +ml-put-filter,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ml-put-filter,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/ml-put-filter.html, +ml-put-job,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ml-put-job,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/ml-put-job.html, +ml-regression-loss,https://www.elastic.co/docs/explore-analyze/machine-learning/data-frame-analytics/dfa-regression-lossfunction,, +ml-regression,https://www.elastic.co/docs/explore-analyze/machine-learning/data-frame-analytics/ml-dfa-regression,, +ml-reset-job,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ml-reset-job,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/ml-reset-job.html, +ml-revert-snapshot,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ml-revert-model-snapshot,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/ml-revert-snapshot.html, +ml-set-upgrade-mode,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ml-set-upgrade-mode,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/ml-set-upgrade-mode.html, +ml-settings,https://www.elastic.co/docs/reference/elasticsearch/configuration-reference/machine-learning-settings,, +ml-start-datafeed,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ml-start-datafeed,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/ml-start-datafeed.html, +ml-stop-datafeed,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ml-stop-datafeed,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/ml-stop-datafeed.html, +ml-update-datafeed,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ml-update-datafeed,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/ml-update-datafeed.html, +ml-update-filter,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ml-update-filter,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/ml-update-filter.html, +ml-update-job,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ml-update-job,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/ml-update-job.html, +ml-update-snapshot,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ml-update-model-snapshot,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/ml-update-snapshot.html, +ml-upgrade-job-model-snapshot,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ml-upgrade-job-snapshot,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/ml-upgrade-job-model-snapshot.html, +modules-cluster,https://www.elastic.co/docs/reference/elasticsearch/configuration-reference/cluster-level-shard-allocation-routing-settings,, +modules-cross-cluster-search,https://www.elastic.co/docs/solutions/search/cross-cluster-search,, +modules-discovery-hosts-providers,https://www.elastic.co/docs/deploy-manage/distributed-architecture/discovery-cluster-formation/discovery-hosts-providers,, +modules-fielddata,https://www.elastic.co/docs/reference/elasticsearch/configuration-reference/field-data-cache-settings,, +modules-gateway-dangling-indices,https://www.elastic.co/docs/reference/elasticsearch/configuration-reference/local-gateway,, +modules-node,https://www.elastic.co/docs/reference/elasticsearch/configuration-reference/node-settings,, +modules-remote-clusters,https://www.elastic.co/docs/deploy-manage/remote-clusters/remote-clusters-self-managed,, +modules-scripting,https://www.elastic.co/docs/explore-analyze/scripting,, +modules-snapshots,https://www.elastic.co/docs/deploy-manage/tools/snapshot-and-restore,, +monitor-elasticsearch-cluster,https://www.elastic.co/docs/deploy-manage/monitor/cloud-health-perf,, +multi-fields,https://www.elastic.co/docs/reference/elasticsearch/mapping-reference/multi-fields,, +network-direction-processor,https://www.elastic.co/docs/reference/enrich-processor/network-direction-processor,, +node-roles,https://www.elastic.co/docs/reference/elasticsearch/configuration-reference/node-settings#node-roles,, +nodes-api-shutdown-delete,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-shutdown-delete-node,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/delete-shutdown.html, +nodes-api-shutdown-status,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-shutdown-get-node,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/get-shutdown.html, +nodes-api-shutdown,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-shutdown-put-node,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/put-shutdown.html, +openai-api-keys,https://platform.openai.com/api-keys,, +openai-models,https://platform.openai.com/docs/guides/embeddings/what-are-embeddings,, +optimistic-concurrency,https://www.elastic.co/docs/reference/elasticsearch/rest-apis/optimistic-concurrency-control,, +paginate-search-results,https://www.elastic.co/docs/reference/elasticsearch/rest-apis/paginate-search-results,, +painless-contexts,https://www.elastic.co/docs/reference/scripting-languages/painless/painless-contexts,, +painless-execute-api,https://www.elastic.co/docs/reference/scripting-languages/painless/painless-api-examples,, +pipeline-processor,https://www.elastic.co/docs/reference/enrich-processor/pipeline-processor,, +pki-realm,https://www.elastic.co/docs/deploy-manage/users-roles/cluster-or-deployment-auth/pki,, +point-in-time-api,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-open-point-in-time,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/point-in-time-api.html, +prevalidate-node-removal,https://www.elastic.co/docs/api/doc/elasticsearch/group/endpoint-cluster,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/cluster.html, +preview-dfanalytics,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ml-preview-data-frame-analytics,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/preview-dfanalytics.html, +preview-transform,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-transform-preview-transform,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/preview-transform.html, +put-analytics-collection,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-search-application-put-behavioral-analytics,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/put-analytics-collection.html, +put-dfanalytics,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ml-put-data-frame-analytics,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/put-dfanalytics.html, +put-enrich-policy-api,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-enrich-put-policy,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/put-enrich-policy-api.html, +put-pipeline-api,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ingest-put-pipeline,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/put-pipeline-api.html, +put-synonym-rule,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-synonyms-put-synonym-rule,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/put-synonym-rule.html, +put-synonyms-set,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-synonyms-put-synonym,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/put-synonyms-set.html, +put-trained-model-definition-part,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ml-put-trained-model-definition-part,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/put-trained-model-definition-part.html, +put-trained-model-vocabulary,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ml-put-trained-model-vocabulary,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/put-trained-model-vocabulary.html, +put-trained-models-aliases,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ml-put-trained-model-alias,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/put-trained-models-aliases.html, +put-trained-models,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ml-put-trained-model,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/put-trained-models.html, +put-transform,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-transform-put-transform,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/put-transform.html, +query-dsl-bool-query,https://www.elastic.co/docs/reference/query-languages/query-dsl/query-dsl-bool-query,, +query-dsl-boosting-query,https://www.elastic.co/docs/reference/query-languages/query-dsl/query-dsl-boosting-query,, +query-dsl-combined-fields-query,https://www.elastic.co/docs/reference/query-languages/query-dsl/query-dsl-combined-fields-query,, +query-dsl-constant-score-query,https://www.elastic.co/docs/reference/query-languages/query-dsl/query-dsl-constant-score-query,, +query-dsl-dis-max-query,https://www.elastic.co/docs/reference/query-languages/query-dsl/query-dsl-dis-max-query,, +query-dsl-distance-feature-query,https://www.elastic.co/docs/reference/query-languages/query-dsl/query-dsl-distance-feature-query,, +query-dsl-exists-query,https://www.elastic.co/docs/reference/query-languages/query-dsl/query-dsl-exists-query,, +query-dsl-function-score-query,https://www.elastic.co/docs/reference/query-languages/query-dsl/query-dsl-function-score-query,, +query-dsl-fuzzy-query,https://www.elastic.co/docs/reference/query-languages/query-dsl/query-dsl-fuzzy-query,, +query-dsl-geo-bounding-box-query,https://www.elastic.co/docs/reference/query-languages/query-dsl/query-dsl-geo-bounding-box-query,, +query-dsl-geo-distance-query,https://www.elastic.co/docs/reference/query-languages/query-dsl/query-dsl-geo-distance-query,, +query-dsl-geo-polygon-query,https://www.elastic.co/docs/reference/query-languages/query-dsl/query-dsl-geo-polygon-query,, +query-dsl-geo-shape-query,https://www.elastic.co/docs/reference/query-languages/query-dsl/query-dsl-geo-shape-query,, +query-dsl-has-child-query,https://www.elastic.co/docs/reference/query-languages/query-dsl/query-dsl-has-child-query,, +query-dsl-has-parent-query,https://www.elastic.co/docs/reference/query-languages/query-dsl/query-dsl-has-parent-query,, +query-dsl-ids-query,https://www.elastic.co/docs/reference/query-languages/query-dsl/query-dsl-ids-query,, +query-dsl-intervals-query,https://www.elastic.co/docs/reference/query-languages/query-dsl/query-dsl-intervals-query,, +query-dsl-knn-query,https://www.elastic.co/docs/reference/query-languages/query-dsl/query-dsl-knn-query,, +query-dsl-match-all-query,https://www.elastic.co/docs/reference/query-languages/query-dsl/query-dsl-match-all-query,, +query-dsl-match-bool-prefix-query,https://www.elastic.co/docs/reference/query-languages/query-dsl/query-dsl-match-bool-prefix-query,, +query-dsl-match-none-query,https://www.elastic.co/docs/reference/query-languages/query-dsl/query-dsl-match-all-query#query-dsl-match-none-query,, +query-dsl-match-query-phrase-prefix,https://www.elastic.co/docs/reference/query-languages/query-dsl/query-dsl-match-query-phrase-prefix,, +query-dsl-match-query-phrase,https://www.elastic.co/docs/reference/query-languages/query-dsl/query-dsl-match-query-phrase,, +query-dsl-match-query,https://www.elastic.co/docs/reference/query-languages/query-dsl/query-dsl-match-query,, +query-dsl-minimum-should-match,https://www.elastic.co/docs/reference/query-languages/query-dsl/query-dsl-minimum-should-match,, +query-dsl-minimum-should-match,https://www.elastic.co/docs/reference/query-languages/query-dsl/query-dsl-minimum-should-match,, +query-dsl-mlt-query,https://www.elastic.co/docs/reference/query-languages/query-dsl/query-dsl-mlt-query,, +query-dsl-multi-match-query,https://www.elastic.co/docs/reference/query-languages/query-dsl/query-dsl-multi-match-query,, +query-dsl-multi-term-rewrite,https://www.elastic.co/docs/reference/query-languages/query-dsl/query-dsl-multi-term-rewrite,, +query-dsl-nested-query,https://www.elastic.co/docs/reference/query-languages/query-dsl/query-dsl-nested-query,, +query-dsl-parent-id-query,https://www.elastic.co/docs/reference/query-languages/query-dsl/query-dsl-parent-id-query,, +query-dsl-percolate-query,https://www.elastic.co/docs/reference/query-languages/query-dsl/query-dsl-percolate-query,, +query-dsl-pinned-query,https://www.elastic.co/docs/reference/query-languages/query-dsl/query-dsl-pinned-query,, +query-dsl-prefix-query,https://www.elastic.co/docs/reference/query-languages/query-dsl/query-dsl-prefix-query,, +query-dsl-query-string-query,https://www.elastic.co/docs/reference/query-languages/query-dsl/query-dsl-query-string-query,, +query-dsl-range-query,https://www.elastic.co/docs/reference/query-languages/query-dsl/query-dsl-range-query,, +query-dsl-rank-feature-query,https://www.elastic.co/docs/reference/query-languages/query-dsl/query-dsl-rank-feature-query,, +query-dsl-regexp-query,https://www.elastic.co/docs/reference/query-languages/query-dsl/query-dsl-regexp-query,, +query-dsl-rule-query,https://www.elastic.co/docs/reference/query-languages/query-dsl/query-dsl-rule-query,, +query-dsl-script-query,https://www.elastic.co/docs/reference/query-languages/query-dsl/query-dsl-script-query,, +query-dsl-script-score-query,https://www.elastic.co/docs/reference/query-languages/query-dsl/query-dsl-script-score-query,, +query-dsl-semantic-query,https://www.elastic.co/docs/reference/query-languages/query-dsl/query-dsl-semantic-query,, +query-dsl-shape-query,https://www.elastic.co/docs/reference/query-languages/query-dsl/query-dsl-shape-query,, +query-dsl-simple-query-string-query,https://www.elastic.co/docs/reference/query-languages/query-dsl/query-dsl-simple-query-string-query,, +query-dsl-span-containing-query,https://www.elastic.co/docs/reference/query-languages/query-dsl/query-dsl-span-containing-query,, +query-dsl-span-field-masking-query,https://www.elastic.co/docs/reference/query-languages/query-dsl/query-dsl-span-field-masking-query,, +query-dsl-span-first-query,https://www.elastic.co/docs/reference/query-languages/query-dsl/query-dsl-span-first-query,, +query-dsl-span-multi-term-query,https://www.elastic.co/docs/reference/query-languages/query-dsl/query-dsl-span-multi-term-query,, +query-dsl-span-near-query,https://www.elastic.co/docs/reference/query-languages/query-dsl/query-dsl-span-near-query,, +query-dsl-span-not-query,https://www.elastic.co/docs/reference/query-languages/query-dsl/query-dsl-span-not-query,, +query-dsl-span-or-query,https://www.elastic.co/docs/reference/query-languages/query-dsl/query-dsl-span-query,, +query-dsl-span-term-query,https://www.elastic.co/docs/reference/query-languages/query-dsl/query-dsl-span-term-query,, +query-dsl-span-within-query,https://www.elastic.co/docs/reference/query-languages/query-dsl/query-dsl-span-within-query,, +query-dsl-sparse-vector-query,https://www.elastic.co/docs/reference/query-languages/query-dsl/query-dsl-sparse-vector-query,, +query-dsl-term-query,https://www.elastic.co/docs/reference/query-languages/query-dsl/query-dsl-term-query,, +query-dsl-terms-query,https://www.elastic.co/docs/reference/query-languages/query-dsl/query-dsl-terms-query,, +query-dsl-terms-set-query,https://www.elastic.co/docs/reference/query-languages/query-dsl/query-dsl-terms-set-query,, +query-dsl-text-expansion-query,https://www.elastic.co/docs/reference/query-languages/query-dsl/query-dsl-text-expansion-query,, +query-dsl-weighted-tokens-query,https://www.elastic.co/docs/reference/query-languages/query-dsl/query-dsl-weighted-tokens-query,, +query-dsl-wildcard-query,https://www.elastic.co/docs/reference/query-languages/query-dsl/query-dsl-wildcard-query,, +query-dsl-wrapper-query,https://www.elastic.co/docs/reference/query-languages/query-dsl/query-dsl-wrapper-query,, +query-dsl,https://www.elastic.co/docs/explore-analyze/query-filter/languages/querydsl,, +query-rule,https://www.elastic.co/docs/reference/elasticsearch/rest-apis/searching-with-query-rules,, +query-rule-delete,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-query-rules-delete-rule,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/delete-query-rule.html, +query-rule-get,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-query-rules-get-rule,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/get-query-rule.html, +query-rule-put,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-query-rules-put-rule,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/put-query-rule.html, +query-ruleset-delete,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-query-rules-delete-ruleset,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/delete-query-ruleset.html, +query-ruleset-get,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-query-rules-get-ruleset,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/get-query-ruleset.html, +query-ruleset-list,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-query-rules-list-rulesets,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/list-query-rulesets.html, +query-ruleset-put,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-query-rules-put-ruleset,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/put-query-ruleset.html, +query-ruleset-test,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-query-rules-test,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/test-query-ruleset.html, +realtime,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-get,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/docs-get.html, +redact-processor,https://www.elastic.co/docs/reference/enrich-processor/redact-processor,, +regexp-syntax,https://www.elastic.co/docs/reference/query-languages/query-dsl/regexp-syntax,, +register-repository,https://www.elastic.co/docs/deploy-manage/tools/snapshot-and-restore/self-managed,, +registered-domain-processor,https://www.elastic.co/docs/reference/enrich-processor/registered-domain-processor,, +reindex-indices,https://www.elastic.co/docs/reference/elasticsearch/rest-apis/reindex-indices,, +relevance-scores,https://www.elastic.co/docs/explore-analyze/query-filter/languages/querydsl#relevance-scores,, +remove-processor,https://www.elastic.co/docs/reference/enrich-processor/remove-processor,, +remote-clusters-api-key,https://www.elastic.co/docs/deploy-manage/remote-clusters/remote-clusters-api-key,, +rename-processor,https://www.elastic.co/docs/reference/enrich-processor/rename-processor,, +repository-azure,https://www.elastic.co/docs/deploy-manage/tools/snapshot-and-restore/azure-repository,, +repository-gcs,https://www.elastic.co/docs/deploy-manage/tools/snapshot-and-restore/google-cloud-storage-repository,, +repository-read-only,https://www.elastic.co/docs/deploy-manage/tools/snapshot-and-restore/read-only-url-repository,, +repository-s3,https://www.elastic.co/docs/deploy-manage/tools/snapshot-and-restore/s3-repository,, +repository-s3-canned-acl,https://docs.aws.amazon.com/AmazonS3/latest/userguide/acl-overview.html#canned-acl,, +repository-s3-delete-objects,https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteObjects.html,, +repository-s3-list-multipart,https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListMultipartUploads.html,, +repository-s3-naming,https://docs.aws.amazon.com/AmazonS3/latest/userguide/BucketRestrictions.html#bucketnamingrules,, +repository-s3-storage-classes,https://www.elastic.co/docs/deploy-manage/tools/snapshot-and-restore/s3-repository#repository-s3-storage-classes,, +repository-shared-fs,https://www.elastic.co/docs/deploy-manage/tools/snapshot-and-restore/shared-file-system-repository,, +repository-source-only,https://www.elastic.co/docs/deploy-manage/tools/snapshot-and-restore/source-only-repository,, +reroute-processor,https://www.elastic.co/docs/reference/enrich-processor/reroute-processor,, +render-search-template-api,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-render-search-template,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/render-search-template-api.html, +reset-transform,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-transform-reset-transform,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/reset-transform.html, +restore-snapshot,https://www.elastic.co/docs/deploy-manage/tools/snapshot-and-restore/restore-snapshot,, +retrieve-stored-fields,https://www.elastic.co/docs/reference/elasticsearch/rest-apis/retrieve-stored-fields, +role-restriction,https://www.elastic.co/docs/deploy-manage/users-roles/cluster-or-deployment-auth/role-restriction,, +rollup-agg-limitations,https://www.elastic.co/docs/manage-data/lifecycle/rollup/rollup-aggregation-limitations,, +rollup-delete-job,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-rollup-delete-job,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/rollup-delete-job.html, +rollup-examples,https://www.elastic.co/docs/manage-data/lifecycle/rollup/getting-started-api#historical-only-search-example,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/rollup-search.html#rollup-search-example, +rollup-get-job,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-rollup-get-jobs,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/rollup-get-job.html, +rollup-get-rollup-caps,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-rollup-get-rollup-caps,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/rollup-get-rollup-caps.html, +rollup-get-rollup-index-caps,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-rollup-get-rollup-index-caps,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/rollup-get-rollup-index-caps.html, +rollup-put-job,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-rollup-put-job,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/rollup-put-job.html, +rollup-search,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-rollup-rollup-search,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/rollup-search.html, +rollup-search-limitations,https://www.elastic.co/docs/manage-data/lifecycle/rollup/rollup-search-limitations,, +rollup-start-job,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-rollup-start-job,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/rollup-start-job.html, +rollup-stop-job,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-rollup-stop-job,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/rollup-stop-job.html, +routing,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-get#get-routing,, +run-as-privilege,https://www.elastic.co/docs/deploy-manage/users-roles/cluster-or-deployment-auth/submitting-requests-on-behalf-of-other-users,, +runtime-search-request,https://www.elastic.co/docs/manage-data/data-store/mapping/define-runtime-fields-in-search-request,, +schedule-now-transform,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-transform-schedule-now-transform,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/schedule-now-transform.html, +script-contexts,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-get-script-context,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/get-script-contexts-api.html, +script-delete,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-delete-script,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/delete-stored-script-api.html, +script-get,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-get-script,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/get-stored-script-api.html, +script-languages,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-get-script-languages,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/get-script-languages-api.html, +script-processor,https://www.elastic.co/docs/reference/enrich-processor/script-processor,, +script-put,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-put-script,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/create-stored-script-api.html, +scroll-api,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-scroll,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/scroll-api.html, +scroll-search-results,https://www.elastic.co/docs/reference/elasticsearch/rest-apis/paginate-search-results#scroll-search-results,, +search-after,https://www.elastic.co/docs/reference/elasticsearch/rest-apis/paginate-search-results#search-after,, +search-aggregations,https://www.elastic.co/docs/explore-analyze/query-filter/aggregations,, +search-aggregations-bucket-adjacency-matrix-aggregation,https://www.elastic.co/docs/reference/aggregations/search-aggregations-bucket-adjacency-matrix-aggregation,, +search-aggregations-bucket-autodatehistogram-aggregation,https://www.elastic.co/docs/reference/aggregations/search-aggregations-bucket-autodatehistogram-aggregation,, +search-aggregations-bucket-categorize-text-aggregation,https://www.elastic.co/docs/reference/aggregations/search-aggregations-bucket-categorize-text-aggregation,, +search-aggregations-bucket-children-aggregation,https://www.elastic.co/docs/reference/aggregations/search-aggregations-bucket-children-aggregation,, +search-aggregations-bucket-correlation-aggregation,https://www.elastic.co/docs/reference/aggregations/search-aggregations-bucket-correlation-aggregation,, +search-aggregations-bucket-count-ks-test-aggregation,https://www.elastic.co/docs/reference/aggregations/search-aggregations-bucket-count-ks-test-aggregation,, +search-aggregations-bucket-datehistogram-aggregation,https://www.elastic.co/docs/reference/aggregations/search-aggregations-bucket-datehistogram-aggregation,, +search-aggregations-bucket-daterange-aggregation,https://www.elastic.co/docs/reference/aggregations/search-aggregations-bucket-daterange-aggregation,, +search-aggregations-bucket-diversified-sampler-aggregation,https://www.elastic.co/docs/reference/aggregations/search-aggregations-bucket-diversified-sampler-aggregation,, +search-aggregations-bucket-filter-aggregation,https://www.elastic.co/docs/reference/aggregations/search-aggregations-bucket-filter-aggregation,, +search-aggregations-bucket-frequent-item-sets-aggregation,https://www.elastic.co/docs/reference/aggregations/search-aggregations-bucket-frequent-item-sets-aggregation,, +search-aggregations-bucket-significantterms-aggregation,https://www.elastic.co/docs/reference/aggregations/search-aggregations-bucket-significantterms-aggregation,, +search-aggregations-metrics-avg-aggregation,https://www.elastic.co/docs/reference/aggregations/search-aggregations-metrics-avg-aggregation,, +search-aggregations-metrics-boxplot-aggregation,https://www.elastic.co/docs/reference/aggregations/search-aggregations-metrics-boxplot-aggregation,, +search-aggregations-metrics-cardinality-aggregation,https://www.elastic.co/docs/reference/aggregations/search-aggregations-metrics-cardinality-aggregation,, +search-aggregations-metrics-extendedstats-aggregation,https://www.elastic.co/docs/reference/aggregations/search-aggregations-metrics-extendedstats-aggregation,, +search-aggregations-pipeline-avg-bucket-aggregation,https://www.elastic.co/docs/reference/aggregations/search-aggregations-pipeline-avg-bucket-aggregation,, +search-aggregations-pipeline-bucket-path,https://www.elastic.co/docs/reference/aggregations/pipeline#buckets-path-syntax,, +search-aggregations-pipeline-bucket-script-aggregation,https://www.elastic.co/docs/reference/aggregations/search-aggregations-pipeline-bucket-script-aggregation,, +search-aggregations-pipeline-bucket-selector-aggregation,https://www.elastic.co/docs/reference/aggregations/search-aggregations-pipeline-bucket-selector-aggregation,, +search-aggregations-pipeline-bucket-sort-aggregation,https://www.elastic.co/docs/reference/aggregations/search-aggregations-pipeline-bucket-sort-aggregation,, +search-aggregations-bucket-composite-aggregation,https://www.elastic.co/docs/reference/aggregations/search-aggregations-bucket-composite-aggregation,, +search-aggregations-pipeline-cumulative-cardinality-aggregation,https://www.elastic.co/docs/reference/aggregations/search-aggregations-pipeline-cumulative-cardinality-aggregation,, +search-aggregations-pipeline-cumulative-sum-aggregation,https://www.elastic.co/docs/reference/aggregations/search-aggregations-pipeline-cumulative-sum-aggregation,, +search-aggregations-pipeline-derivative-aggregation,https://www.elastic.co/docs/reference/aggregations/search-aggregations-pipeline-derivative-aggregation,, +search-aggregations-pipeline-extended-stats-bucket-aggregation,https://www.elastic.co/docs/reference/aggregations/search-aggregations-pipeline-extended-stats-bucket-aggregation,, +search-aggregations-bucket-frequent-item-sets-aggregation,https://www.elastic.co/docs/reference/aggregations/search-aggregations-bucket-frequent-item-sets-aggregation,, +search-aggregations-bucket-filter-aggregation,https://www.elastic.co/docs/reference/aggregations/search-aggregations-bucket-filter-aggregation,, +search-aggregations-bucket-filters-aggregation,https://www.elastic.co/docs/reference/aggregations/search-aggregations-bucket-filters-aggregation,, +search-aggregations-metrics-geobounds-aggregation,https://www.elastic.co/docs/reference/aggregations/search-aggregations-metrics-geobounds-aggregation,, +search-aggregations-metrics-geocentroid-aggregation,https://www.elastic.co/docs/reference/aggregations/search-aggregations-metrics-geocentroid-aggregation,, +search-aggregations-bucket-geodistance-aggregation,https://www.elastic.co/docs/reference/aggregations/search-aggregations-bucket-geodistance-aggregation,, +search-aggregations-bucket-geohashgrid-aggregation,https://www.elastic.co/docs/reference/aggregations/search-aggregations-bucket-geohashgrid-aggregation,, +search-aggregations-metrics-geo-line,https://www.elastic.co/docs/reference/aggregations/search-aggregations-metrics-geo-line,, +search-aggregations-bucket-geotilegrid-aggregation,https://www.elastic.co/docs/reference/aggregations/search-aggregations-bucket-geotilegrid-aggregation,, +search-aggregations-bucket-geohexgrid-aggregation,https://www.elastic.co/docs/reference/aggregations/search-aggregations-bucket-geohexgrid-aggregation,, +search-aggregations-bucket-global-aggregation,https://www.elastic.co/docs/reference/aggregations/search-aggregations-bucket-global-aggregation,, +search-aggregations-bucket-histogram-aggregation,https://www.elastic.co/docs/reference/aggregations/search-aggregations-bucket-histogram-aggregation,, +search-aggregations-bucket-iprange-aggregation,https://www.elastic.co/docs/reference/aggregations/search-aggregations-bucket-iprange-aggregation,, +search-aggregations-bucket-ipprefix-aggregation,https://www.elastic.co/docs/reference/aggregations/search-aggregations-bucket-ipprefix-aggregation,, +search-aggregations-pipeline-inference-bucket-aggregation,https://www.elastic.co/docs/reference/aggregations/search-aggregations-pipeline-inference-bucket-aggregation,, +search-aggregations-matrix-stats-aggregation,https://www.elastic.co/docs/reference/aggregations/search-aggregations-matrix-stats-aggregation,, +search-aggregations-metrics-max-aggregation,https://www.elastic.co/docs/reference/aggregations/search-aggregations-metrics-max-aggregation,, +search-aggregations-pipeline-max-bucket-aggregation,https://www.elastic.co/docs/reference/aggregations/search-aggregations-pipeline-max-bucket-aggregation,, +search-aggregations-metrics-median-absolute-deviation-aggregation,https://www.elastic.co/docs/reference/aggregations/search-aggregations-metrics-median-absolute-deviation-aggregation,, +search-aggregations-metrics-min-aggregation,https://www.elastic.co/docs/reference/aggregations/search-aggregations-metrics-min-aggregation,, +search-aggregations-pipeline-min-bucket-aggregation,https://www.elastic.co/docs/reference/aggregations/search-aggregations-pipeline-min-bucket-aggregation,, +search-aggregations-bucket-missing-aggregation,https://www.elastic.co/docs/reference/aggregations/search-aggregations-bucket-missing-aggregation,, +search-aggregations-pipeline-moving-percentiles-aggregation,https://www.elastic.co/docs/reference/aggregations/search-aggregations-pipeline-moving-percentiles-aggregation,, +search-aggregations-pipeline-movfn-aggregation,https://www.elastic.co/docs/reference/aggregations/search-aggregations-pipeline-movfn-aggregation,, +search-aggregations-bucket-multi-terms-aggregation,https://www.elastic.co/docs/reference/aggregations/search-aggregations-bucket-multi-terms-aggregation,, +search-aggregations-bucket-nested-aggregation,https://www.elastic.co/docs/reference/aggregations/search-aggregations-bucket-nested-aggregation,, +search-aggregations-pipeline-normalize-aggregation,https://www.elastic.co/docs/reference/aggregations/search-aggregations-pipeline-normalize-aggregation,, +search-aggregations-bucket-parent-aggregation,https://www.elastic.co/docs/reference/aggregations/search-aggregations-bucket-parent-aggregation,, +search-aggregations-metrics-percentile-rank-aggregation,https://www.elastic.co/docs/reference/aggregations/search-aggregations-metrics-percentile-rank-aggregation,, +search-aggregations-metrics-percentile-aggregation,https://www.elastic.co/docs/reference/aggregations/search-aggregations-metrics-percentile-aggregation,, +search-aggregations-pipeline-percentiles-bucket-aggregation,https://www.elastic.co/docs/reference/aggregations/search-aggregations-pipeline-percentiles-bucket-aggregation,, +search-aggregations-bucket-range-aggregation,https://www.elastic.co/docs/reference/aggregations/search-aggregations-bucket-range-aggregation,, +search-aggregations-bucket-rare-terms-aggregation,https://www.elastic.co/docs/reference/aggregations/search-aggregations-bucket-rare-terms-aggregation,, +search-aggregations-metrics-rate-aggregation,https://www.elastic.co/docs/reference/aggregations/search-aggregations-metrics-rate-aggregation,, +search-aggregations-bucket-reverse-nested-aggregation,https://www.elastic.co/docs/reference/aggregations/search-aggregations-bucket-reverse-nested-aggregation,, +search-aggregations-bucket-sampler-aggregation,https://www.elastic.co/docs/reference/aggregations/search-aggregations-bucket-sampler-aggregation,, +search-aggregations-random-sampler-aggregation,https://www.elastic.co/docs/reference/aggregations/search-aggregations-random-sampler-aggregation,, +search-aggregations-metrics-scripted-metric-aggregation,https://www.elastic.co/docs/reference/aggregations/search-aggregations-metrics-scripted-metric-aggregation,, +search-aggregations-pipeline-serialdiff-aggregation,https://www.elastic.co/docs/reference/aggregations/search-aggregations-pipeline-serialdiff-aggregation,, +search-aggregations-bucket-significantterms-aggregation,https://www.elastic.co/docs/reference/aggregations/search-aggregations-bucket-significantterms-aggregation,, +search-aggregations-bucket-significanttext-aggregation,https://www.elastic.co/docs/reference/aggregations/search-aggregations-bucket-significanttext-aggregation,, +search-aggregations-metrics-stats-aggregation,https://www.elastic.co/docs/reference/aggregations/search-aggregations-metrics-stats-aggregation,, +search-aggregations-pipeline-stats-bucket-aggregation,https://www.elastic.co/docs/reference/aggregations/search-aggregations-pipeline-stats-bucket-aggregation,, +search-aggregations-metrics-string-stats-aggregation,https://www.elastic.co/docs/reference/aggregations/search-aggregations-metrics-string-stats-aggregation,, +search-aggregations-metrics-sum-aggregation,https://www.elastic.co/docs/reference/aggregations/search-aggregations-metrics-sum-aggregation,, +search-aggregations-pipeline-sum-bucket-aggregation,https://www.elastic.co/docs/reference/aggregations/search-aggregations-pipeline-sum-bucket-aggregation,, +search-aggregations-bucket-terms-aggregation,https://www.elastic.co/docs/reference/aggregations/search-aggregations-bucket-terms-aggregation,, +search-aggregations-bucket-time-series-aggregation,https://www.elastic.co/docs/reference/aggregations/search-aggregations-bucket-time-series-aggregation,, +search-aggregations-metrics-top-hits-aggregation,https://www.elastic.co/docs/reference/aggregations/search-aggregations-metrics-top-hits-aggregation,, +search-aggregations-metrics-ttest-aggregation,https://www.elastic.co/docs/reference/aggregations/search-aggregations-metrics-ttest-aggregation,, +search-aggregations-metrics-top-metrics,https://www.elastic.co/docs/reference/aggregations/search-aggregations-metrics-top-metrics,, +search-aggregations-metrics-valuecount-aggregation,https://www.elastic.co/docs/reference/aggregations/search-aggregations-metrics-valuecount-aggregation,, +search-aggregations-metrics-weight-avg-aggregation,https://www.elastic.co/docs/reference/aggregations/search-aggregations-metrics-weight-avg-aggregation,, +search-aggregations-bucket-variablewidthhistogram-aggregation,https://www.elastic.co/docs/reference/aggregations/search-aggregations-bucket-variablewidthhistogram-aggregation,, +search-analyzer,https://www.elastic.co/docs/reference/elasticsearch/mapping-reference/search-analyzer,, +search-application-delete,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-search-application-delete,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/delete-search-application.html, +search-application-get,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-search-application-get,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/get-search-application.html, +search-application-put,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-search-application-put,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/put-search-application.html, +search-application-search,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-search-application-search,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/search-application-search.html, +search-render-query,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-search-application-render-query,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/search-application-render-query.html, +search-retrievers,https://www.elastic.co/docs/reference/elasticsearch/rest-apis/retrievers,, +search-count,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-count,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/search-count.html, +search-explain,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-explain,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/search-explain.html, +search-field-caps,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-field-caps,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/search-field-caps.html, +search-highlight,https://www.elastic.co/docs/reference/elasticsearch/rest-apis/highlighting,, +search-knn,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-knn-search,, +search-multi-search,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-msearch,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/search-multi-search.html, +search-multi-search-template,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-msearch-template,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/multi-search-template.html, +search-rank-eval,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-rank-eval,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/search-rank-eval.html, +search-search,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-search,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/search-search.html, +search-shards,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-search-shards,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/search-shards.html, +search-template,https://www.elastic.co/docs/solutions/search/search-templates,, +search-template-api,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-search-template,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/search-template-api.html, +search-terms-enum,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-terms-enum,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/search-terms-enum.html, +search-validate,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-validate-query,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/search-validate.html, +search-vector-tile-api,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-search-mvt,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/search-vector-tile-api.html, +searchable-snapshots,https://www.elastic.co/docs/deploy-manage/tools/snapshot-and-restore/searchable-snapshots,, +searchable-snapshots-api-cache-stats,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-searchable-snapshots-cache-stats,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/searchable-snapshots-api-cache-stats.html, +searchable-snapshots-api-clear-cache,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-searchable-snapshots-clear-cache,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/searchable-snapshots-api-clear-cache.html, +searchable-snapshots-api-mount-snapshot,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-searchable-snapshots-mount,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/searchable-snapshots-api-mount-snapshot.html, +searchable-snapshots-api-stats,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-searchable-snapshots-stats,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/searchable-snapshots-api-stats.html, +searchable-snapshots-apis,https://www.elastic.co/docs/api/doc/elasticsearch/group/endpoint-searchable_snapshots,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/searchable-snapshots-apis.html, +search-templates,https://www.elastic.co/docs/solutions/search/search-templates,, +secure-settings,https://www.elastic.co/docs/deploy-manage/security/secure-settings,, +security-api-activate-user-profile,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-security-activate-user-profile,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/security-api-activate-user-profile.html, +security-api-authenticate,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-security-authenticate,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/security-api-authenticate.html, +security-api-bulk-delete-role,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-security-bulk-delete-role,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/security-api-bulk-delete-role.html, +security-api-bulk-put-role,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-security-bulk-put-role,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/security-api-bulk-put-role.html, +security-api-bulk-update-key,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-security-bulk-update-api-keys,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/security-api-bulk-update-api-keys.html, +security-api-change-password,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-security-change-password,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/security-api-change-password.html, +security-api-clear-api-key-cache,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-security-clear-api-key-cache,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/security-api-clear-api-key-cache.html, +security-api-clear-cache,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-security-clear-cached-realms,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/security-api-clear-cache.html, +security-api-clear-privilege-cache,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-security-clear-cached-privileges,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/security-api-clear-privilege-cache.html, +security-api-clear-role-cache,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-security-clear-cached-roles,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/security-api-clear-role-cache.html, +security-api-clear-service-token-caches,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-security-clear-cached-service-tokens,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/security-api-clear-service-token-caches.html, +security-api-create-api-key,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-security-create-api-key,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/security-api-create-api-key.html, +security-api-create-service-token,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-security-create-service-token,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/security-api-create-service-token.html, +security-api-cross-cluster-key,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-security-create-cross-cluster-api-key,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/security-api-create-cross-cluster-api-key.html, +security-api-delegate-pki,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-security-delegate-pki,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/security-api-delegate-pki-authentication.html, +security-api-delete-privilege,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-security-delete-privileges,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/security-api-delete-privilege.html, +security-api-delete-role-mapping,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-security-delete-role-mapping,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/security-api-delete-role-mapping.html, +security-api-delete-role,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-security-delete-role,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/security-api-delete-role.html, +security-api-delete-service-token,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-security-delete-service-token,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/security-api-delete-service-token.html, +security-api-delete-user,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-security-delete-user,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/security-api-delete-user.html, +security-api-disable-user,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-security-disable-user,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/security-api-disable-user.html, +security-api-disable-user-profile,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-security-disable-user-profile,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/security-api-disable-user-profile.html, +security-api-enable-user,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-security-enable-user,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/security-api-enable-user.html, +security-api-enable-user-profile,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-security-enable-user-profile,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/security-api-enable-user-profile.html, +security-api-get-api-key,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-security-get-api-key,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/security-api-get-api-key.html, +security-api-get-builtin-privileges,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-security-get-builtin-privileges,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/security-api-get-builtin-privileges.html, +security-api-get-privileges,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-security-get-privileges,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/security-api-get-privileges.html, +security-api-get-role-mapping,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-security-get-role-mapping,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/security-api-get-role-mapping.html, +security-api-get-role,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-security-get-role,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/security-api-get-role.html, +security-api-get-service-accounts,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-security-get-service-accounts,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/security-api-get-service-accounts.html, +security-api-get-service-credentials,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-security-get-service-credentials,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/security-api-get-service-credentials.html, +security-api-get-settings,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-security-get-settings,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/security-api-get-settings.html, +security-api-get-token,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-security-get-token,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/security-api-get-token.html, +security-api-get-user-privileges,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-security-get-user-privileges,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/security-api-get-user-privileges.html, +security-api-get-user-profile,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-security-get-user-profile,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/security-api-get-user-profile.html, +security-api-get-user,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-security-get-user,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/security-api-get-user.html, +security-api-grant-api-key,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-security-grant-api-key,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/security-api-grant-api-key.html, +security-api-has-privileges,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-security-has-privileges,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/security-api-has-privileges.html, +security-api-has-privileges-profile,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-security-has-privileges-user-profile,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/security-api-has-privileges-user-profile.html, +security-api-invalidate-api-key,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-security-invalidate-api-key,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/security-api-invalidate-api-key.html, +security-api-invalidate-token,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-security-invalidate-token,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/security-api-invalidate-token.html, +security-api-kibana-enrollment,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-security-enroll-kibana,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/security-api-kibana-enrollment.html, +security-api-node-enrollment,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-security-enroll-node,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/security-api-node-enrollment.html, +security-api-oidc-authenticate,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-security-oidc-authenticate,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/security-api-oidc-authenticate.html, +security-api-oidc-logout,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-security-oidc-logout,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/security-api-oidc-logout.html, +security-api-oidc-prepare,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-security-oidc-prepare-authentication,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/security-api-oidc-prepare-authentication.html, +security-api-put-privileges,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-security-put-privileges,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/security-api-put-privileges.html, +security-api-put-role-mapping,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-security-put-role-mapping,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/security-api-put-role-mapping.html, +security-api-put-role,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-security-put-role,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/security-api-put-role.html, +security-api-put-user,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-security-put-user,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/security-api-put-user.html, +security-api-query-api-key,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-security-query-api-keys,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/security-api-query-api-key.html, +security-api-query-role,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-security-query-role,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/security-api-query-role.html, +security-api-query-user,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-security-query-user,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/security-api-query-user.html, +security-api-saml-authenticate,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-security-saml-authenticate,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/security-api-saml-authenticate.html, +security-api-saml-complete-logout,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-security-saml-complete-logout,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/security-api-saml-complete-logout.html, +security-api-saml-invalidate,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-security-saml-invalidate,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/security-api-saml-invalidate.html, +security-api-saml-logout,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-security-saml-logout,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/security-api-saml-logout.html, +security-api-saml-prepare-authentication,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-security-saml-prepare-authentication,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/security-api-saml-prepare-authentication.html, +security-api-saml-sp-metadata,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-security-saml-service-provider-metadata,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/security-api-saml-sp-metadata.html, +security-api-ssl,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ssl-certificates,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/security-api-ssl.html, +security-api-suggest,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-security-suggest-user-profiles,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/security-api-suggest-user-profile.html, +security-api-cross-cluster-key-update,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-security-update-cross-cluster-api-key,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/security-api-update-cross-cluster-api-key.html, +security-api-update-key,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-security-update-api-key,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/security-api-update-api-key.html, +security-api-update-user-data,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-security-update-user-profile-data,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/security-api-update-user-profile-data.html, +security-api-update-settings,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-security-update-settings,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/security-api-update-settings.html, +security-application-privileges,https://www.elastic.co/docs/reference/elasticsearch/security-privileges#application-privileges,, +security-encrypt-http,https://www.elastic.co/docs/deploy-manage/security/set-up-basic-security-plus-https#encrypt-http-communication,, +security-encrypt-internode,https://www.elastic.co/docs/deploy-manage/security/set-up-basic-security#encrypt-internode-communication,, +security-privileges,https://www.elastic.co/docs/reference/elasticsearch/security-privileges,, +security-query-api-keys,https://www.elastic.co/docs/reference/elasticsearch/rest-apis/query-api-keys,, +security-saml-guide,https://www.elastic.co/docs/deploy-manage/users-roles/cluster-or-deployment-auth/saml,, +security-settings-api-keys,https://www.elastic.co/docs/reference/elasticsearch/configuration-reference/security-settings#api-key-service-settings,, +security-settings-hashing,https://www.elastic.co/docs/reference/elasticsearch/configuration-reference/security-settings#hashing-settings,, +security-user-cache,https://www.elastic.co/docs/deploy-manage/users-roles/cluster-or-deployment-auth/controlling-user-cache,, +service-accounts,https://www.elastic.co/docs/deploy-manage/users-roles/cluster-or-deployment-auth/service-accounts,, +set-processor,https://www.elastic.co/docs/reference/enrich-processor/set-processor,, +shape,https://www.elastic.co/docs/reference/elasticsearch/mapping-reference/shape,, +shard-request-cache,https://www.elastic.co/docs/reference/elasticsearch/rest-apis/shard-request-cache,, +simulate-ingest-api,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-simulate-ingest,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/simulate-ingest-api.html, +simulate-pipeline-api,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ingest-simulate,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/simulate-pipeline-api.html, +slice-scroll,https://www.elastic.co/docs/reference/elasticsearch/rest-apis/paginate-search-results#slice-scroll,, +slm-api-delete-policy,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-slm-delete-lifecycle,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/slm-api-delete-policy.html, +slm-api-execute-lifecycle,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-slm-execute-lifecycle,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/slm-api-execute-lifecycle.html, +slm-api-execute-retention,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-slm-execute-retention,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/slm-api-execute-retention.html, +slm-api-get-policy,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-slm-get-lifecycle,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/slm-api-get-policy.html, +slm-api-get-stats,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-slm-get-stats,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/slm-api-get-stats.html, +slm-api-get-status,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-slm-get-status,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/slm-api-get-status.html, +slm-api-put-policy,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-slm-put-lifecycle,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/slm-api-put-policy.html, +slm-api-start,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-slm-start,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/slm-api-start.html, +slm-api-stop,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-slm-stop,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/slm-api-stop.html, +snapshot-clone,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-snapshot-clone,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/clone-snapshot-api.html, +snapshot-create,https://www.elastic.co/docs/deploy-manage/tools/snapshot-and-restore/create-snapshots,, +snapshot-create-api,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-snapshot-create,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/create-snapshot-api.html, +snapshot-delete,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-snapshot-delete,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/delete-snapshot-api.html, +snapshot-get,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-snapshot-get,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/get-snapshot-api.html, +snapshot-restore-api,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-snapshot-restore,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/restore-snapshot-api.html, +snapshot-status,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-snapshot-status,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/get-snapshot-status-api.html, +snapshot-repo-cleanup,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-snapshot-cleanup-repository,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/clean-up-snapshot-repo-api.html, +snapshot-repo-create,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-snapshot-create-repository,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/put-snapshot-repo-api.html, +snapshot-repo-delete,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-snapshot-delete-repository,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/delete-snapshot-repo-api.html, +snapshot-repo-get,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-snapshot-get-repository,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/get-snapshot-repo-api.html, +snapshot-repo-verify,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-snapshot-verify-repository,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/verify-snapshot-repo-api.html, +snapshot-repo-verify-integrity,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-snapshot-repository-verify-integrity,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/verify-repo-integrity-api.html, +snapshot-restore-amend-replacement,https://docs.oracle.com/javase/8/docs/api/java/util/regex/Matcher.html#appendReplacement-java.lang.StringBuffer-java.lang.String-,, +snapshot-restore-feature-state,https://www.elastic.co/docs/deploy-manage/tools/snapshot-and-restore#feature-state,, +sort-processor,https://www.elastic.co/docs/reference/enrich-processor/sort-processor,, +sort-search-results,https://www.elastic.co/docs/reference/elasticsearch/rest-apis/sort-search-results,, +sort-tiebreaker,https://www.elastic.co/docs/explore-analyze/query-filter/languages/eql#eql-search-specify-a-sort-tiebreaker,, +source-filtering,https://www.elastic.co/docs/reference/elasticsearch/rest-apis/retrieve-selected-fields#source-filtering,, +split-processor,https://www.elastic.co/docs/reference/enrich-processor/split-processor,, +sql-async-search-api,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-sql-get-async,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/get-async-sql-search-api.html, +sql-async-status-api,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-sql-get-async-status,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/get-async-sql-search-status-api.html, +sql-clear-cursor-api,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-sql-clear-cursor,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/clear-sql-cursor-api.html, +sql-delete-async-api,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-sql-delete-async,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/delete-async-sql-search-api.html, +sql-rest-columnar,https://www.elastic.co/docs/explore-analyze/query-filter/languages/sql-rest-columnar,, +sql-rest-filtering,https://www.elastic.co/docs/explore-analyze/query-filter/languages/sql-rest-filtering,, +sql-rest-format,https://www.elastic.co/docs/explore-analyze/query-filter/languages/sql-rest-format,, +sql-search-api,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-sql-query,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/sql-search-api.html, +sql-spec,https://www.elastic.co/docs/reference/query-languages/sql/sql-spec,, +sql-translate-api,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-sql-translate,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/sql-translate-api.html, +stack-settings,https://www.elastic.co/docs/deploy-manage/stack-settings,, +start-basic,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-license-post-start-basic,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/start-basic.html, +start-dfanalytics,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ml-start-data-frame-analytics,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/start-dfanalytics.html, +start-trained-model-deployment,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ml-start-trained-model-deployment,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/start-trained-model-deployment.html, +start-transform,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-transform-start-transform,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/start-transform.html, +start-trial,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-license-post-start-trial,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/start-trial.html, +stop-dfanalytics,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ml-stop-data-frame-analytics,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/stop-dfanalytics.html, +stop-trained-model-deployment,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ml-stop-trained-model-deployment,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/stop-trained-model-deployment.html, +stop-transform,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-transform-stop-transform,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/stop-transform.html, +stored-fields,https://www.elastic.co/docs/reference/elasticsearch/rest-apis/retrieve-selected-fields#stored-fields,, +synonym-api-examples,https://www.elastic.co/docs/solutions/search/full-text/create-update-synonyms-api-example,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/put-synonyms-set.html, +synonym-rule-create,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-synonyms-put-synonym-rule,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/put-synonym-rule.html, +synonym-rule-delete,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-synonyms-delete-synonym-rule,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/delete-synonym-rule.html, +synonym-rule-get,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-synonyms-get-synonym-rule,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/get-synonym-rule.html, +synonym-set-create,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-synonyms-put-synonym,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/put-synonyms-set.html, +synonym-set-define,https://www.elastic.co/docs/reference/text-analysis/analysis-synonym-graph-tokenfilter#analysis-synonym-graph-define-synonyms,, +synonym-set-delete,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-synonyms-delete-synonym,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/delete-synonyms-set.html, +synonym-set-get,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-synonyms-get-synonym,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/get-synonyms-set.html, +synonym-set-list,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-synonyms-get-synonym,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/get-synonyms-set.html, +synonym-solr,https://www.elastic.co/docs/reference/text-analysis/analysis-synonym-graph-tokenfilter#_solr_format_2,, +supported-flags,https://www.elastic.co/docs/reference/query-languages/query-dsl/query-dsl-simple-query-string-query#supported-flags,, +tasks,https://www.elastic.co/docs/api/doc/elasticsearch/group/endpoint-tasks,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/tasks.html, +templating-role-query,https://www.elastic.co/docs/deploy-manage/users-roles/cluster-or-deployment-auth/controlling-access-at-document-field-level#templating-role-query,, +term-vectors-examples,https://www.elastic.co/docs/reference/elasticsearch/rest-apis/term-vectors-examples,, +terminate-processor,https://www.elastic.co/docs/reference/enrich-processor/terminate-processor,, +test-grok-pattern,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-text-structure-test-grok-pattern,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/test-grok-pattern.html, +time-value,https://github.com/elastic/elasticsearch/blob/current/libs/core/src/main/java/org/elasticsearch/core/TimeValue.java,, +time-zone-id,https://docs.oracle.com/javase/8/docs/api/java/time/ZoneId.html,, +trim-processor,https://www.elastic.co/docs/reference/enrich-processor/trim-processor,, +update-by-query,https://www.elastic.co/docs/reference/elasticsearch/rest-apis/update-by-query-api,, +update-dfanalytics,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ml-update-data-frame-analytics,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/update-dfanalytics.html, +update-desired-nodes,https://www.elastic.co/docs/api/doc/elasticsearch/group/endpoint-cluster,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/cluster.html, +update-document,https://www.elastic.co/docs/reference/elasticsearch/rest-apis/update-document,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/docs-update.html#update-api-example, +update-license,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-license-post,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/update-license.html, +update-trained-model-deployment,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ml-update-trained-model-deployment,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/update-trained-model-deployment.html, +update-transform,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-transform-update-transform,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/update-transform.html, +upgrade-transforms,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-transform-upgrade-transforms,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/upgrade-transforms.html, +uppercase-processor,https://www.elastic.co/docs/reference/enrich-processor/uppercase-processor,, +urldecode-processor,https://www.elastic.co/docs/reference/enrich-processor/urldecode-processor,, +usage-api,https://www.elastic.co/docs/api/doc/elasticsearch/group/endpoint-xpack,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/usage-api.html, +user-agent-processor,https://www.elastic.co/docs/reference/enrich-processor/user-agent-processor,, +user-profile,https://www.elastic.co/docs/deploy-manage/users-roles/cluster-or-deployment-auth/user-profiles,, +verify-repository,https://www.elastic.co/docs/deploy-manage/tools/snapshot-and-restore/self-managed#snapshots-repository-verification,, +voting-config-exclusions,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-cluster-post-voting-config-exclusions,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/voting-config-exclusions.html, +voyageai-embeddings,https://docs.voyageai.com/docs/embeddings,, +voyageai-rerank,https://docs.voyageai.com/docs/reranker,, +watcher-works,https://www.elastic.co/docs/explore-analyze/alerts-cases/watcher/how-watcher-works,, +watcher-api-ack-watch,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-watcher-ack-watch,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/watcher-api-ack-watch.html, +watcher-api-activate-watch,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-watcher-activate-watch,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/watcher-api-activate-watch.html, +watcher-api-deactivate-watch,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-watcher-deactivate-watch,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/watcher-api-deactivate-watch.html, +watcher-api-delete-watch,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-watcher-delete-watch,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/watcher-api-delete-watch.html, +watcher-api-execute-watch,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-watcher-execute-watch,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/watcher-api-execute-watch.html, +watcher-api-get-settings,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-watcher-get-settings,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/watcher-api-get-settings.html, +watcher-api-get-watch,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-watcher-get-watch,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/watcher-api-get-watch.html, +watcher-api-put-watch,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-watcher-put-watch,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/watcher-api-put-watch.html, +watcher-api-query-watches,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-watcher-query-watches,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/watcher-api-query-watches.html, +watcher-api-start,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-watcher-start,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/watcher-api-start.html, +watcher-api-stats,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-watcher-stats,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/watcher-api-stats.html, +watcher-api-stop,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-watcher-stop,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/watcher-api-stop.html, +watcher-api-update-settings,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-watcher-update-settings,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/watcher-api-update-settings.html, +watsonx-api-keys,https://cloud.ibm.com/iam/apikeys,, +watsonx-api-models,https://www.ibm.com/products/watsonx-ai/foundation-models,, +watsonx-api-version,https://cloud.ibm.com/apidocs/watsonx-ai#active-version-dates,, +xpack-rollup,https://www.elastic.co/docs/manage-data/lifecycle/rollup,, diff --git a/specification/_global/bulk/examples/request/BulkRequestExample1.yaml b/specification/_global/bulk/examples/request/BulkRequestExample1.yaml index 47da76d1f9..9e7b8d46f4 100644 --- a/specification/_global/bulk/examples/request/BulkRequestExample1.yaml +++ b/specification/_global/bulk/examples/request/BulkRequestExample1.yaml @@ -15,174 +15,3 @@ value: '{ "index" : { "_index" : "test", "_id" : "1" } } { "update" : {"_id" : "1", "_index" : "test"} } { "doc" : {"field2" : "value2"} }' -alternatives: - - language: Python - code: |- - resp = client.bulk( - operations=[ - { - "index": { - "_index": "test", - "_id": "1" - } - }, - { - "field1": "value1" - }, - { - "delete": { - "_index": "test", - "_id": "2" - } - }, - { - "create": { - "_index": "test", - "_id": "3" - } - }, - { - "field1": "value3" - }, - { - "update": { - "_id": "1", - "_index": "test" - } - }, - { - "doc": { - "field2": "value2" - } - } - ], - ) - - language: JavaScript - code: |- - const response = await client.bulk({ - operations: [ - { - index: { - _index: "test", - _id: "1", - }, - }, - { - field1: "value1", - }, - { - delete: { - _index: "test", - _id: "2", - }, - }, - { - create: { - _index: "test", - _id: "3", - }, - }, - { - field1: "value3", - }, - { - update: { - _id: "1", - _index: "test", - }, - }, - { - doc: { - field2: "value2", - }, - }, - ], - }); - - language: Ruby - code: |- - response = client.bulk( - body: [ - { - "index": { - "_index": "test", - "_id": "1" - } - }, - { - "field1": "value1" - }, - { - "delete": { - "_index": "test", - "_id": "2" - } - }, - { - "create": { - "_index": "test", - "_id": "3" - } - }, - { - "field1": "value3" - }, - { - "update": { - "_id": "1", - "_index": "test" - } - }, - { - "doc": { - "field2": "value2" - } - } - ] - ) - - language: PHP - code: |- - $resp = $client->bulk([ - "body" => array( - [ - "index" => [ - "_index" => "test", - "_id" => "1", - ], - ], - [ - "field1" => "value1", - ], - [ - "delete" => [ - "_index" => "test", - "_id" => "2", - ], - ], - [ - "create" => [ - "_index" => "test", - "_id" => "3", - ], - ], - [ - "field1" => "value3", - ], - [ - "update" => [ - "_id" => "1", - "_index" => "test", - ], - ], - [ - "doc" => [ - "field2" => "value2", - ], - ], - ), - ]); - - language: curl - code: - "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d - '[{\"index\":{\"_index\":\"test\",\"_id\":\"1\"}},{\"field1\":\"value1\"},{\"delete\":{\"_index\":\"test\",\"_id\":\"2\"}},{\ - \"create\":{\"_index\":\"test\",\"_id\":\"3\"}},{\"field1\":\"value3\"},{\"update\":{\"_id\":\"1\",\"_index\":\"test\"}},{\"d\ - oc\":{\"field2\":\"value2\"}}]' \"$ELASTICSEARCH_URL/_bulk\"" diff --git a/specification/_global/bulk/examples/request/BulkRequestExample2.yaml b/specification/_global/bulk/examples/request/BulkRequestExample2.yaml index 804a7660ce..21a50ef6c8 100644 --- a/specification/_global/bulk/examples/request/BulkRequestExample2.yaml +++ b/specification/_global/bulk/examples/request/BulkRequestExample2.yaml @@ -25,309 +25,3 @@ value: { "update" : {"_id" : "4", "_index" : "index1"} } { "doc" : {"field" : "value"}, "_source": true}' -alternatives: - - language: Python - code: |- - resp = client.bulk( - operations=[ - { - "update": { - "_id": "1", - "_index": "index1", - "retry_on_conflict": 3 - } - }, - { - "doc": { - "field": "value" - } - }, - { - "update": { - "_id": "0", - "_index": "index1", - "retry_on_conflict": 3 - } - }, - { - "script": { - "source": "ctx._source.counter += params.param1", - "lang": "painless", - "params": { - "param1": 1 - } - }, - "upsert": { - "counter": 1 - } - }, - { - "update": { - "_id": "2", - "_index": "index1", - "retry_on_conflict": 3 - } - }, - { - "doc": { - "field": "value" - }, - "doc_as_upsert": True - }, - { - "update": { - "_id": "3", - "_index": "index1", - "_source": True - } - }, - { - "doc": { - "field": "value" - } - }, - { - "update": { - "_id": "4", - "_index": "index1" - } - }, - { - "doc": { - "field": "value" - }, - "_source": True - } - ], - ) - - language: JavaScript - code: |- - const response = await client.bulk({ - operations: [ - { - update: { - _id: "1", - _index: "index1", - retry_on_conflict: 3, - }, - }, - { - doc: { - field: "value", - }, - }, - { - update: { - _id: "0", - _index: "index1", - retry_on_conflict: 3, - }, - }, - { - script: { - source: "ctx._source.counter += params.param1", - lang: "painless", - params: { - param1: 1, - }, - }, - upsert: { - counter: 1, - }, - }, - { - update: { - _id: "2", - _index: "index1", - retry_on_conflict: 3, - }, - }, - { - doc: { - field: "value", - }, - doc_as_upsert: true, - }, - { - update: { - _id: "3", - _index: "index1", - _source: true, - }, - }, - { - doc: { - field: "value", - }, - }, - { - update: { - _id: "4", - _index: "index1", - }, - }, - { - doc: { - field: "value", - }, - _source: true, - }, - ], - }); - - language: Ruby - code: |- - response = client.bulk( - body: [ - { - "update": { - "_id": "1", - "_index": "index1", - "retry_on_conflict": 3 - } - }, - { - "doc": { - "field": "value" - } - }, - { - "update": { - "_id": "0", - "_index": "index1", - "retry_on_conflict": 3 - } - }, - { - "script": { - "source": "ctx._source.counter += params.param1", - "lang": "painless", - "params": { - "param1": 1 - } - }, - "upsert": { - "counter": 1 - } - }, - { - "update": { - "_id": "2", - "_index": "index1", - "retry_on_conflict": 3 - } - }, - { - "doc": { - "field": "value" - }, - "doc_as_upsert": true - }, - { - "update": { - "_id": "3", - "_index": "index1", - "_source": true - } - }, - { - "doc": { - "field": "value" - } - }, - { - "update": { - "_id": "4", - "_index": "index1" - } - }, - { - "doc": { - "field": "value" - }, - "_source": true - } - ] - ) - - language: PHP - code: |- - $resp = $client->bulk([ - "body" => array( - [ - "update" => [ - "_id" => "1", - "_index" => "index1", - "retry_on_conflict" => 3, - ], - ], - [ - "doc" => [ - "field" => "value", - ], - ], - [ - "update" => [ - "_id" => "0", - "_index" => "index1", - "retry_on_conflict" => 3, - ], - ], - [ - "script" => [ - "source" => "ctx._source.counter += params.param1", - "lang" => "painless", - "params" => [ - "param1" => 1, - ], - ], - "upsert" => [ - "counter" => 1, - ], - ], - [ - "update" => [ - "_id" => "2", - "_index" => "index1", - "retry_on_conflict" => 3, - ], - ], - [ - "doc" => [ - "field" => "value", - ], - "doc_as_upsert" => true, - ], - [ - "update" => [ - "_id" => "3", - "_index" => "index1", - "_source" => true, - ], - ], - [ - "doc" => [ - "field" => "value", - ], - ], - [ - "update" => [ - "_id" => "4", - "_index" => "index1", - ], - ], - [ - "doc" => [ - "field" => "value", - ], - "_source" => true, - ], - ), - ]); - - language: curl - code: - "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d - '[{\"update\":{\"_id\":\"1\",\"_index\":\"index1\",\"retry_on_conflict\":3}},{\"doc\":{\"field\":\"value\"}},{\"update\":{\"_\ - id\":\"0\",\"_index\":\"index1\",\"retry_on_conflict\":3}},{\"script\":{\"source\":\"ctx._source.counter += - params.param1\",\"lang\":\"painless\",\"params\":{\"param1\":1}},\"upsert\":{\"counter\":1}},{\"update\":{\"_id\":\"2\",\"_in\ - dex\":\"index1\",\"retry_on_conflict\":3}},{\"doc\":{\"field\":\"value\"},\"doc_as_upsert\":true},{\"update\":{\"_id\":\"3\",\ - \"_index\":\"index1\",\"_source\":true}},{\"doc\":{\"field\":\"value\"}},{\"update\":{\"_id\":\"4\",\"_index\":\"index1\"}},{\ - \"doc\":{\"field\":\"value\"},\"_source\":true}]' \"$ELASTICSEARCH_URL/_bulk\"" diff --git a/specification/_global/bulk/examples/request/BulkRequestExample3.yaml b/specification/_global/bulk/examples/request/BulkRequestExample3.yaml index f8bbcb0027..bd9961f252 100644 --- a/specification/_global/bulk/examples/request/BulkRequestExample3.yaml +++ b/specification/_global/bulk/examples/request/BulkRequestExample3.yaml @@ -14,158 +14,3 @@ value: '{ "update": {"_id": "5", "_index": "index1"} } { "create": {"_id": "7", "_index": "index1"} } { "my_field": "foo" }' -alternatives: - - language: Python - code: |- - resp = client.bulk( - operations=[ - { - "update": { - "_id": "5", - "_index": "index1" - } - }, - { - "doc": { - "my_field": "foo" - } - }, - { - "update": { - "_id": "6", - "_index": "index1" - } - }, - { - "doc": { - "my_field": "foo" - } - }, - { - "create": { - "_id": "7", - "_index": "index1" - } - }, - { - "my_field": "foo" - } - ], - ) - - language: JavaScript - code: |- - const response = await client.bulk({ - operations: [ - { - update: { - _id: "5", - _index: "index1", - }, - }, - { - doc: { - my_field: "foo", - }, - }, - { - update: { - _id: "6", - _index: "index1", - }, - }, - { - doc: { - my_field: "foo", - }, - }, - { - create: { - _id: "7", - _index: "index1", - }, - }, - { - my_field: "foo", - }, - ], - }); - - language: Ruby - code: |- - response = client.bulk( - body: [ - { - "update": { - "_id": "5", - "_index": "index1" - } - }, - { - "doc": { - "my_field": "foo" - } - }, - { - "update": { - "_id": "6", - "_index": "index1" - } - }, - { - "doc": { - "my_field": "foo" - } - }, - { - "create": { - "_id": "7", - "_index": "index1" - } - }, - { - "my_field": "foo" - } - ] - ) - - language: PHP - code: |- - $resp = $client->bulk([ - "body" => array( - [ - "update" => [ - "_id" => "5", - "_index" => "index1", - ], - ], - [ - "doc" => [ - "my_field" => "foo", - ], - ], - [ - "update" => [ - "_id" => "6", - "_index" => "index1", - ], - ], - [ - "doc" => [ - "my_field" => "foo", - ], - ], - [ - "create" => [ - "_id" => "7", - "_index" => "index1", - ], - ], - [ - "my_field" => "foo", - ], - ), - ]); - - language: curl - code: - "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d - '[{\"update\":{\"_id\":\"5\",\"_index\":\"index1\"}},{\"doc\":{\"my_field\":\"foo\"}},{\"update\":{\"_id\":\"6\",\"_index\":\ - \"index1\"}},{\"doc\":{\"my_field\":\"foo\"}},{\"create\":{\"_id\":\"7\",\"_index\":\"index1\"}},{\"my_field\":\"foo\"}]' - \"$ELASTICSEARCH_URL/_bulk\"" diff --git a/specification/_global/bulk/examples/request/BulkRequestExample4.yaml b/specification/_global/bulk/examples/request/BulkRequestExample4.yaml index c48b2791ab..7514b67bfe 100644 --- a/specification/_global/bulk/examples/request/BulkRequestExample4.yaml +++ b/specification/_global/bulk/examples/request/BulkRequestExample4.yaml @@ -14,143 +14,3 @@ value: { "create" : { "_index" : "my_index", "_id" : "2", "dynamic_templates": {"home_location": "geo_point"}} } { "field" : "value2", "home_location": "41.12,-71.34"}' -alternatives: - - language: Python - code: |- - resp = client.bulk( - operations=[ - { - "index": { - "_index": "my_index", - "_id": "1", - "dynamic_templates": { - "work_location": "geo_point" - } - } - }, - { - "field": "value1", - "work_location": "41.12,-71.34", - "raw_location": "41.12,-71.34" - }, - { - "create": { - "_index": "my_index", - "_id": "2", - "dynamic_templates": { - "home_location": "geo_point" - } - } - }, - { - "field": "value2", - "home_location": "41.12,-71.34" - } - ], - ) - - language: JavaScript - code: |- - const response = await client.bulk({ - operations: [ - { - index: { - _index: "my_index", - _id: "1", - dynamic_templates: { - work_location: "geo_point", - }, - }, - }, - { - field: "value1", - work_location: "41.12,-71.34", - raw_location: "41.12,-71.34", - }, - { - create: { - _index: "my_index", - _id: "2", - dynamic_templates: { - home_location: "geo_point", - }, - }, - }, - { - field: "value2", - home_location: "41.12,-71.34", - }, - ], - }); - - language: Ruby - code: |- - response = client.bulk( - body: [ - { - "index": { - "_index": "my_index", - "_id": "1", - "dynamic_templates": { - "work_location": "geo_point" - } - } - }, - { - "field": "value1", - "work_location": "41.12,-71.34", - "raw_location": "41.12,-71.34" - }, - { - "create": { - "_index": "my_index", - "_id": "2", - "dynamic_templates": { - "home_location": "geo_point" - } - } - }, - { - "field": "value2", - "home_location": "41.12,-71.34" - } - ] - ) - - language: PHP - code: |- - $resp = $client->bulk([ - "body" => array( - [ - "index" => [ - "_index" => "my_index", - "_id" => "1", - "dynamic_templates" => [ - "work_location" => "geo_point", - ], - ], - ], - [ - "field" => "value1", - "work_location" => "41.12,-71.34", - "raw_location" => "41.12,-71.34", - ], - [ - "create" => [ - "_index" => "my_index", - "_id" => "2", - "dynamic_templates" => [ - "home_location" => "geo_point", - ], - ], - ], - [ - "field" => "value2", - "home_location" => "41.12,-71.34", - ], - ), - ]); - - language: curl - code: - "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d - '[{\"index\":{\"_index\":\"my_index\",\"_id\":\"1\",\"dynamic_templates\":{\"work_location\":\"geo_point\"}}},{\"field\":\"va\ - lue1\",\"work_location\":\"41.12,-71.34\",\"raw_location\":\"41.12,-71.34\"},{\"create\":{\"_index\":\"my_index\",\"_id\":\"2\ - \",\"dynamic_templates\":{\"home_location\":\"geo_point\"}}},{\"field\":\"value2\",\"home_location\":\"41.12,-71.34\"}]' - \"$ELASTICSEARCH_URL/_bulk\"" diff --git a/specification/_global/clear_scroll/examples/request/ClearScrollRequestExample1.yaml b/specification/_global/clear_scroll/examples/request/ClearScrollRequestExample1.yaml index eb61339204..7991e9565d 100644 --- a/specification/_global/clear_scroll/examples/request/ClearScrollRequestExample1.yaml +++ b/specification/_global/clear_scroll/examples/request/ClearScrollRequestExample1.yaml @@ -6,37 +6,3 @@ value: |- { "scroll_id": "DXF1ZXJ5QW5kRmV0Y2gBAAAAAAAAAD4WYm9laVYtZndUQlNsdDcwakFMNjU1QQ==" } -alternatives: - - language: Python - code: |- - resp = client.clear_scroll( - scroll_id="DXF1ZXJ5QW5kRmV0Y2gBAAAAAAAAAD4WYm9laVYtZndUQlNsdDcwakFMNjU1QQ==", - ) - - language: JavaScript - code: |- - const response = await client.clearScroll({ - scroll_id: "DXF1ZXJ5QW5kRmV0Y2gBAAAAAAAAAD4WYm9laVYtZndUQlNsdDcwakFMNjU1QQ==", - }); - - language: Ruby - code: |- - response = client.clear_scroll( - body: { - "scroll_id": "DXF1ZXJ5QW5kRmV0Y2gBAAAAAAAAAD4WYm9laVYtZndUQlNsdDcwakFMNjU1QQ==" - } - ) - - language: PHP - code: |- - $resp = $client->clearScroll([ - "body" => [ - "scroll_id" => "DXF1ZXJ5QW5kRmV0Y2gBAAAAAAAAAD4WYm9laVYtZndUQlNsdDcwakFMNjU1QQ==", - ], - ]); - - language: curl - code: - 'curl -X DELETE -H "Authorization: ApiKey $ELASTIC_API_KEY" -H "Content-Type: application/json" -d - ''{"scroll_id":"DXF1ZXJ5QW5kRmV0Y2gBAAAAAAAAAD4WYm9laVYtZndUQlNsdDcwakFMNjU1QQ=="}'' "$ELASTICSEARCH_URL/_search/scroll"' - - language: Java - code: | - client.clearScroll(c -> c - .scrollId("DXF1ZXJ5QW5kRmV0Y2gBAAAAAAAAAD4WYm9laVYtZndUQlNsdDcwakFMNjU1QQ==") - ); diff --git a/specification/_global/close_point_in_time/examples/request/ClosePointInTimeRequestExample1.yaml b/specification/_global/close_point_in_time/examples/request/ClosePointInTimeRequestExample1.yaml index cc0a4eb39c..0ecd43ce36 100644 --- a/specification/_global/close_point_in_time/examples/request/ClosePointInTimeRequestExample1.yaml +++ b/specification/_global/close_point_in_time/examples/request/ClosePointInTimeRequestExample1.yaml @@ -6,38 +6,3 @@ value: |- { "id": "46ToAwMDaWR5BXV1aWQyKwZub2RlXzMAAAAAAAAAACoBYwADaWR4BXV1aWQxAgZub2RlXzEAAAAAAAAAAAEBYQADaWR5BXV1aWQyKgZub2RlXzIAAAAAAAAAAAwBYgACBXV1aWQyAAAFdXVpZDEAAQltYXRjaF9hbGw_gAAAAA==" } -alternatives: - - language: Python - code: >- - resp = client.close_point_in_time( - id="46ToAwMDaWR5BXV1aWQyKwZub2RlXzMAAAAAAAAAACoBYwADaWR4BXV1aWQxAgZub2RlXzEAAAAAAAAAAAEBYQADaWR5BXV1aWQyKgZub2RlXzIAAAAAAAAAAAwBYgACBXV1aWQyAAAFdXVpZDEAAQltYXRjaF9hbGw_gAAAAA==", - ) - - language: JavaScript - code: >- - const response = await client.closePointInTime({ - id: "46ToAwMDaWR5BXV1aWQyKwZub2RlXzMAAAAAAAAAACoBYwADaWR4BXV1aWQxAgZub2RlXzEAAAAAAAAAAAEBYQADaWR5BXV1aWQyKgZub2RlXzIAAAAAAAAAAAwBYgACBXV1aWQyAAAFdXVpZDEAAQltYXRjaF9hbGw_gAAAAA==", - }); - - language: Ruby - code: >- - response = client.close_point_in_time( - body: { - "id": "46ToAwMDaWR5BXV1aWQyKwZub2RlXzMAAAAAAAAAACoBYwADaWR4BXV1aWQxAgZub2RlXzEAAAAAAAAAAAEBYQADaWR5BXV1aWQyKgZub2RlXzIAAAAAAAAAAAwBYgACBXV1aWQyAAAFdXVpZDEAAQltYXRjaF9hbGw_gAAAAA==" - } - ) - - language: PHP - code: >- - $resp = $client->closePointInTime([ - "body" => [ - "id" => "46ToAwMDaWR5BXV1aWQyKwZub2RlXzMAAAAAAAAAACoBYwADaWR4BXV1aWQxAgZub2RlXzEAAAAAAAAAAAEBYQADaWR5BXV1aWQyKgZub2RlXzIAAAAAAAAAAAwBYgACBXV1aWQyAAAFdXVpZDEAAQltYXRjaF9hbGw_gAAAAA==", - ], - ]); - - language: curl - code: - "curl -X DELETE -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d - '{\"id\":\"46ToAwMDaWR5BXV1aWQyKwZub2RlXzMAAAAAAAAAACoBYwADaWR4BXV1aWQxAgZub2RlXzEAAAAAAAAAAAEBYQADaWR5BXV1aWQyKgZub2RlXzIAAA\ - AAAAAAAAwBYgACBXV1aWQyAAAFdXVpZDEAAQltYXRjaF9hbGw_gAAAAA==\"}' \"$ELASTICSEARCH_URL/_pit\"" - - language: Java - code: > - client.closePointInTime(c -> c - .id("46ToAwMDaWR5BXV1aWQyKwZub2RlXzMAAAAAAAAAACoBYwADaWR4BXV1aWQxAgZub2RlXzEAAAAAAAAAAAEBYQADaWR5BXV1aWQyKgZub2RlXzIAAAAAAAAAAAwBYgACBXV1aWQyAAAFdXVpZDEAAQltYXRjaF9hbGw_gAAAAA==") - ); diff --git a/specification/_global/count/examples/request/CountRequestExample1.yaml b/specification/_global/count/examples/request/CountRequestExample1.yaml index 857e40f5b4..390a86af46 100644 --- a/specification/_global/count/examples/request/CountRequestExample1.yaml +++ b/specification/_global/count/examples/request/CountRequestExample1.yaml @@ -10,63 +10,3 @@ value: |- "term" : { "user.id" : "kimchy" } } } -alternatives: - - language: Python - code: |- - resp = client.count( - index="my-index-000001", - query={ - "term": { - "user.id": "kimchy" - } - }, - ) - - language: JavaScript - code: |- - const response = await client.count({ - index: "my-index-000001", - query: { - term: { - "user.id": "kimchy", - }, - }, - }); - - language: Ruby - code: |- - response = client.count( - index: "my-index-000001", - body: { - "query": { - "term": { - "user.id": "kimchy" - } - } - } - ) - - language: PHP - code: |- - $resp = $client->count([ - "index" => "my-index-000001", - "body" => [ - "query" => [ - "term" => [ - "user.id" => "kimchy", - ], - ], - ], - ]); - - language: curl - code: - 'curl -X GET -H "Authorization: ApiKey $ELASTIC_API_KEY" -H "Content-Type: application/json" -d - ''{"query":{"term":{"user.id":"kimchy"}}}'' "$ELASTICSEARCH_URL/my-index-000001/_count"' - - language: Java - code: | - client.count(c -> c - .index("my-index-000001") - .query(q -> q - .term(t -> t - .field("user.id") - .value(FieldValue.of("kimchy")) - ) - ) - ); diff --git a/specification/_global/create/CreateRequest.ts b/specification/_global/create/CreateRequest.ts index 35dcdcb72d..06e19ff024 100644 --- a/specification/_global/create/CreateRequest.ts +++ b/specification/_global/create/CreateRequest.ts @@ -21,15 +21,12 @@ import { RequestBase } from '@_types/Base' import { Id, IndexName, - OpType, Refresh, Routing, - SequenceNumber, VersionNumber, VersionType, WaitForActiveShards } from '@_types/common' -import { long } from '@_types/Numeric' import { Duration } from '@_types/Time' /** @@ -134,30 +131,11 @@ export interface Request extends RequestBase { index: IndexName } query_parameters: { - /** - * Only perform the operation if the document has this primary term. - * @ext_doc_id optimistic-concurrency - */ - if_primary_term?: long - /** - * Only perform the operation if the document has this sequence number. - * @ext_doc_id optimistic-concurrency - */ - if_seq_no?: SequenceNumber /** * True or false if to include the document source in the error message in case of parsing errors. * @server_default true */ include_source_on_error?: boolean - /** - * Set to `create` to only index the document if it does not already exist (put if absent). - * If a document with the specified `_id` already exists, the indexing operation will fail. - * The behavior is the same as using the `/_create` endpoint. - * If a document ID is specified, this paramater defaults to `index`. - * Otherwise, it defaults to `create`. - * If the request targets a data stream, an `op_type` of `create` is required. - */ - op_type?: OpType /** * The ID of the pipeline to use to preprocess incoming documents. * If the index has a default ingest pipeline specified, setting the value to `_none` turns off the default ingest pipeline for this request. diff --git a/specification/_global/create/examples/request/CreateRequestExample1.yaml b/specification/_global/create/examples/request/CreateRequestExample1.yaml index dfde37d20a..ea371cb4ba 100644 --- a/specification/_global/create/examples/request/CreateRequestExample1.yaml +++ b/specification/_global/create/examples/request/CreateRequestExample1.yaml @@ -11,68 +11,3 @@ value: |- "id": "kimchy" } } -alternatives: - - language: Python - code: |- - resp = client.create( - index="my-index-000001", - id="1", - document={ - "@timestamp": "2099-11-15T13:12:00", - "message": "GET /search HTTP/1.1 200 1070000", - "user": { - "id": "kimchy" - } - }, - ) - - language: JavaScript - code: |- - const response = await client.create({ - index: "my-index-000001", - id: 1, - document: { - "@timestamp": "2099-11-15T13:12:00", - message: "GET /search HTTP/1.1 200 1070000", - user: { - id: "kimchy", - }, - }, - }); - - language: Ruby - code: |- - response = client.create( - index: "my-index-000001", - id: "1", - body: { - "@timestamp": "2099-11-15T13:12:00", - "message": "GET /search HTTP/1.1 200 1070000", - "user": { - "id": "kimchy" - } - } - ) - - language: PHP - code: |- - $resp = $client->create([ - "index" => "my-index-000001", - "id" => "1", - "body" => [ - "@timestamp" => "2099-11-15T13:12:00", - "message" => "GET /search HTTP/1.1 200 1070000", - "user" => [ - "id" => "kimchy", - ], - ], - ]); - - language: curl - code: - 'curl -X PUT -H "Authorization: ApiKey $ELASTIC_API_KEY" -H "Content-Type: application/json" -d - ''{"@timestamp":"2099-11-15T13:12:00","message":"GET /search HTTP/1.1 200 1070000","user":{"id":"kimchy"}}'' - "$ELASTICSEARCH_URL/my-index-000001/_create/1"' - - language: Java - code: > - client.create(c -> c - .id("1") - .index("my-index-000001") - .document(JsonData.fromJson("{\"@timestamp\":\"2099-11-15T13:12:00\",\"message\":\"GET /search HTTP/1.1 200 1070000\",\"user\":{\"id\":\"kimchy\"}}")) - ); diff --git a/specification/_global/create/examples/response/CreateResponseExample1.yaml b/specification/_global/create/examples/response/CreateResponseExample1.yaml new file mode 100644 index 0000000000..f9fbc1ae40 --- /dev/null +++ b/specification/_global/create/examples/response/CreateResponseExample1.yaml @@ -0,0 +1,18 @@ +# summary: '' +description: A successful response from `PUT my-index-000001/_create/1` which indexes a document. +# type: response +# response_code: 200 +value: |- + { + "_index": "my-index-000001", + "_id": "1", + "_version": 1, + "result": "created", + "_shards": { + "total": 1, + "successful": 1, + "failed": 0 + }, + "_seq_no": 0, + "_primary_term": 1 + } diff --git a/specification/_global/delete/examples/request/DeleteRequestExample1.yaml b/specification/_global/delete/examples/request/DeleteRequestExample1.yaml index b0ab79db88..2b4da466ae 100644 --- a/specification/_global/delete/examples/request/DeleteRequestExample1.yaml +++ b/specification/_global/delete/examples/request/DeleteRequestExample1.yaml @@ -1,34 +1 @@ method_request: DELETE /my-index-000001/_doc/1 -alternatives: - - language: Python - code: |- - resp = client.delete( - index="my-index-000001", - id="1", - ) - - language: JavaScript - code: |- - const response = await client.delete({ - index: "my-index-000001", - id: 1, - }); - - language: Ruby - code: |- - response = client.delete( - index: "my-index-000001", - id: "1" - ) - - language: PHP - code: |- - $resp = $client->delete([ - "index" => "my-index-000001", - "id" => "1", - ]); - - language: curl - code: 'curl -X DELETE -H "Authorization: ApiKey $ELASTIC_API_KEY" "$ELASTICSEARCH_URL/my-index-000001/_doc/1"' - - language: Java - code: | - client.delete(d -> d - .id("1") - .index("my-index-000001") - ); diff --git a/specification/_global/delete_by_query/examples/request/DeleteByQueryRequestExample1.yaml b/specification/_global/delete_by_query/examples/request/DeleteByQueryRequestExample1.yaml index c250ea4e0f..24be0c7559 100644 --- a/specification/_global/delete_by_query/examples/request/DeleteByQueryRequestExample1.yaml +++ b/specification/_global/delete_by_query/examples/request/DeleteByQueryRequestExample1.yaml @@ -8,52 +8,3 @@ value: |- "match_all": {} } } -alternatives: - - language: Python - code: |- - resp = client.delete_by_query( - index="my-index-000001,my-index-000002", - query={ - "match_all": {} - }, - ) - - language: JavaScript - code: |- - const response = await client.deleteByQuery({ - index: "my-index-000001,my-index-000002", - query: { - match_all: {}, - }, - }); - - language: Ruby - code: |- - response = client.delete_by_query( - index: "my-index-000001,my-index-000002", - body: { - "query": { - "match_all": {} - } - } - ) - - language: PHP - code: |- - $resp = $client->deleteByQuery([ - "index" => "my-index-000001,my-index-000002", - "body" => [ - "query" => [ - "match_all" => new ArrayObject([]), - ], - ], - ]); - - language: curl - code: - 'curl -X POST -H "Authorization: ApiKey $ELASTIC_API_KEY" -H "Content-Type: application/json" -d - ''{"query":{"match_all":{}}}'' "$ELASTICSEARCH_URL/my-index-000001,my-index-000002/_delete_by_query"' - - language: Java - code: | - client.deleteByQuery(d -> d - .index(List.of("my-index-000001","my-index-000002")) - .query(q -> q - .matchAll(m -> m) - ) - ); diff --git a/specification/_global/delete_by_query/examples/request/DeleteByQueryRequestExample2.yaml b/specification/_global/delete_by_query/examples/request/DeleteByQueryRequestExample2.yaml index fd9b0117ca..8a90734e19 100644 --- a/specification/_global/delete_by_query/examples/request/DeleteByQueryRequestExample2.yaml +++ b/specification/_global/delete_by_query/examples/request/DeleteByQueryRequestExample2.yaml @@ -11,68 +11,3 @@ value: |- }, "max_docs": 1 } -alternatives: - - language: Python - code: |- - resp = client.delete_by_query( - index="my-index-000001", - query={ - "term": { - "user.id": "kimchy" - } - }, - max_docs=1, - ) - - language: JavaScript - code: |- - const response = await client.deleteByQuery({ - index: "my-index-000001", - query: { - term: { - "user.id": "kimchy", - }, - }, - max_docs: 1, - }); - - language: Ruby - code: |- - response = client.delete_by_query( - index: "my-index-000001", - body: { - "query": { - "term": { - "user.id": "kimchy" - } - }, - "max_docs": 1 - } - ) - - language: PHP - code: |- - $resp = $client->deleteByQuery([ - "index" => "my-index-000001", - "body" => [ - "query" => [ - "term" => [ - "user.id" => "kimchy", - ], - ], - "max_docs" => 1, - ], - ]); - - language: curl - code: - 'curl -X POST -H "Authorization: ApiKey $ELASTIC_API_KEY" -H "Content-Type: application/json" -d - ''{"query":{"term":{"user.id":"kimchy"}},"max_docs":1}'' "$ELASTICSEARCH_URL/my-index-000001/_delete_by_query"' - - language: Java - code: | - client.deleteByQuery(d -> d - .index("my-index-000001") - .maxDocs(1L) - .query(q -> q - .term(t -> t - .field("user.id") - .value(FieldValue.of("kimchy")) - ) - ) - ); diff --git a/specification/_global/delete_by_query/examples/request/DeleteByQueryRequestExample3.yaml b/specification/_global/delete_by_query/examples/request/DeleteByQueryRequestExample3.yaml index 14d9a2e78c..f1b1f48a55 100644 --- a/specification/_global/delete_by_query/examples/request/DeleteByQueryRequestExample3.yaml +++ b/specification/_global/delete_by_query/examples/request/DeleteByQueryRequestExample3.yaml @@ -17,94 +17,3 @@ value: |- } } } -alternatives: - - language: Python - code: |- - resp = client.delete_by_query( - index="my-index-000001", - slice={ - "id": 0, - "max": 2 - }, - query={ - "range": { - "http.response.bytes": { - "lt": 2000000 - } - } - }, - ) - - language: JavaScript - code: |- - const response = await client.deleteByQuery({ - index: "my-index-000001", - slice: { - id: 0, - max: 2, - }, - query: { - range: { - "http.response.bytes": { - lt: 2000000, - }, - }, - }, - }); - - language: Ruby - code: |- - response = client.delete_by_query( - index: "my-index-000001", - body: { - "slice": { - "id": 0, - "max": 2 - }, - "query": { - "range": { - "http.response.bytes": { - "lt": 2000000 - } - } - } - } - ) - - language: PHP - code: |- - $resp = $client->deleteByQuery([ - "index" => "my-index-000001", - "body" => [ - "slice" => [ - "id" => 0, - "max" => 2, - ], - "query" => [ - "range" => [ - "http.response.bytes" => [ - "lt" => 2000000, - ], - ], - ], - ], - ]); - - language: curl - code: - 'curl -X POST -H "Authorization: ApiKey $ELASTIC_API_KEY" -H "Content-Type: application/json" -d - ''{"slice":{"id":0,"max":2},"query":{"range":{"http.response.bytes":{"lt":2000000}}}}'' - "$ELASTICSEARCH_URL/my-index-000001/_delete_by_query"' - - language: Java - code: | - client.deleteByQuery(d -> d - .index("my-index-000001") - .query(q -> q - .range(r -> r - .untyped(u -> u - .field("http.response.bytes") - .lt(JsonData.fromJson("2000000")) - ) - ) - ) - .slice(s -> s - .id("0") - .max(2) - ) - ); diff --git a/specification/_global/delete_by_query/examples/request/DeleteByQueryRequestExample4.yaml b/specification/_global/delete_by_query/examples/request/DeleteByQueryRequestExample4.yaml index 3515eee83d..f579a4b761 100644 --- a/specification/_global/delete_by_query/examples/request/DeleteByQueryRequestExample4.yaml +++ b/specification/_global/delete_by_query/examples/request/DeleteByQueryRequestExample4.yaml @@ -14,86 +14,3 @@ value: |- } } } -alternatives: - - language: Python - code: |- - resp = client.delete_by_query( - index="my-index-000001", - refresh=True, - slices="5", - query={ - "range": { - "http.response.bytes": { - "lt": 2000000 - } - } - }, - ) - - language: JavaScript - code: |- - const response = await client.deleteByQuery({ - index: "my-index-000001", - refresh: "true", - slices: 5, - query: { - range: { - "http.response.bytes": { - lt: 2000000, - }, - }, - }, - }); - - language: Ruby - code: |- - response = client.delete_by_query( - index: "my-index-000001", - refresh: "true", - slices: "5", - body: { - "query": { - "range": { - "http.response.bytes": { - "lt": 2000000 - } - } - } - } - ) - - language: PHP - code: |- - $resp = $client->deleteByQuery([ - "index" => "my-index-000001", - "refresh" => "true", - "slices" => "5", - "body" => [ - "query" => [ - "range" => [ - "http.response.bytes" => [ - "lt" => 2000000, - ], - ], - ], - ], - ]); - - language: curl - code: - 'curl -X POST -H "Authorization: ApiKey $ELASTIC_API_KEY" -H "Content-Type: application/json" -d - ''{"query":{"range":{"http.response.bytes":{"lt":2000000}}}}'' - "$ELASTICSEARCH_URL/my-index-000001/_delete_by_query?refresh&slices=5"' - - language: Java - code: | - client.deleteByQuery(d -> d - .index("my-index-000001") - .query(q -> q - .range(r -> r - .untyped(u -> u - .field("http.response.bytes") - .lt(JsonData.fromJson("2000000")) - ) - ) - ) - .refresh(true) - .slices(s -> s - .value(5) - ) - ); diff --git a/specification/_global/delete_by_query_rethrottle/examples/request/DeleteByQueryRethrottleRequestExample1.yaml b/specification/_global/delete_by_query_rethrottle/examples/request/DeleteByQueryRethrottleRequestExample1.yaml index eda73fba47..8de0dd841e 100644 --- a/specification/_global/delete_by_query_rethrottle/examples/request/DeleteByQueryRethrottleRequestExample1.yaml +++ b/specification/_global/delete_by_query_rethrottle/examples/request/DeleteByQueryRethrottleRequestExample1.yaml @@ -1,35 +1 @@ method_request: POST _delete_by_query/r1A2WoRbTwKZ516z6NEs5A:36619/_rethrottle?requests_per_second=-1 -alternatives: - - language: Python - code: |- - resp = client.delete_by_query_rethrottle( - task_id="r1A2WoRbTwKZ516z6NEs5A:36619", - requests_per_second="-1", - ) - - language: JavaScript - code: |- - const response = await client.deleteByQueryRethrottle({ - task_id: "r1A2WoRbTwKZ516z6NEs5A:36619", - requests_per_second: "-1", - }); - - language: Ruby - code: |- - response = client.delete_by_query_rethrottle( - task_id: "r1A2WoRbTwKZ516z6NEs5A:36619", - requests_per_second: "-1" - ) - - language: PHP - code: |- - $resp = $client->deleteByQueryRethrottle([ - "task_id" => "r1A2WoRbTwKZ516z6NEs5A:36619", - "requests_per_second" => "-1", - ]); - - language: curl - code: 'curl -X POST -H "Authorization: ApiKey $ELASTIC_API_KEY" - "$ELASTICSEARCH_URL/_delete_by_query/r1A2WoRbTwKZ516z6NEs5A:36619/_rethrottle?requests_per_second=-1"' - - language: Java - code: | - client.deleteByQueryRethrottle(d -> d - .requestsPerSecond(-1.0F) - .taskId("r1A2WoRbTwKZ516z6NEs5A:36619") - ); diff --git a/specification/_global/delete_script/examples/request/DeleteScriptRequestExample1.yaml b/specification/_global/delete_script/examples/request/DeleteScriptRequestExample1.yaml index b3c9e105cf..ac34bada0e 100644 --- a/specification/_global/delete_script/examples/request/DeleteScriptRequestExample1.yaml +++ b/specification/_global/delete_script/examples/request/DeleteScriptRequestExample1.yaml @@ -1,29 +1 @@ method_request: DELETE _scripts/my-search-template -alternatives: - - language: Python - code: |- - resp = client.delete_script( - id="my-search-template", - ) - - language: JavaScript - code: |- - const response = await client.deleteScript({ - id: "my-search-template", - }); - - language: Ruby - code: |- - response = client.delete_script( - id: "my-search-template" - ) - - language: PHP - code: |- - $resp = $client->deleteScript([ - "id" => "my-search-template", - ]); - - language: curl - code: 'curl -X DELETE -H "Authorization: ApiKey $ELASTIC_API_KEY" "$ELASTICSEARCH_URL/_scripts/my-search-template"' - - language: Java - code: | - client.deleteScript(d -> d - .id("my-search-template") - ); diff --git a/specification/_global/exists/examples/request/DocumentExistsRequestExample1.yaml b/specification/_global/exists/examples/request/DocumentExistsRequestExample1.yaml index dd2cca32d4..78295be42a 100644 --- a/specification/_global/exists/examples/request/DocumentExistsRequestExample1.yaml +++ b/specification/_global/exists/examples/request/DocumentExistsRequestExample1.yaml @@ -1,34 +1 @@ method_request: HEAD my-index-000001/_doc/0 -alternatives: - - language: Python - code: |- - resp = client.exists( - index="my-index-000001", - id="0", - ) - - language: JavaScript - code: |- - const response = await client.exists({ - index: "my-index-000001", - id: 0, - }); - - language: Ruby - code: |- - response = client.exists( - index: "my-index-000001", - id: "0" - ) - - language: PHP - code: |- - $resp = $client->exists([ - "index" => "my-index-000001", - "id" => "0", - ]); - - language: curl - code: 'curl --head -H "Authorization: ApiKey $ELASTIC_API_KEY" "$ELASTICSEARCH_URL/my-index-000001/_doc/0"' - - language: Java - code: | - client.exists(e -> e - .id("0") - .index("my-index-000001") - ); diff --git a/specification/_global/exists_source/examples/request/ExistsSourceRequestExample1.yaml b/specification/_global/exists_source/examples/request/ExistsSourceRequestExample1.yaml index 5e759ef9d5..3a5a843b8c 100644 --- a/specification/_global/exists_source/examples/request/ExistsSourceRequestExample1.yaml +++ b/specification/_global/exists_source/examples/request/ExistsSourceRequestExample1.yaml @@ -1,34 +1 @@ method_request: HEAD my-index-000001/_source/1 -alternatives: - - language: Python - code: |- - resp = client.exists_source( - index="my-index-000001", - id="1", - ) - - language: JavaScript - code: |- - const response = await client.existsSource({ - index: "my-index-000001", - id: 1, - }); - - language: Ruby - code: |- - response = client.exists_source( - index: "my-index-000001", - id: "1" - ) - - language: PHP - code: |- - $resp = $client->existsSource([ - "index" => "my-index-000001", - "id" => "1", - ]); - - language: curl - code: 'curl --head -H "Authorization: ApiKey $ELASTIC_API_KEY" "$ELASTICSEARCH_URL/my-index-000001/_source/1"' - - language: Java - code: | - client.existsSource(e -> e - .id("1") - .index("my-index-000001") - ); diff --git a/specification/_global/explain/examples/request/ExplainRequestExample1.yaml b/specification/_global/explain/examples/request/ExplainRequestExample1.yaml index 5ffef69b50..1c7991892c 100644 --- a/specification/_global/explain/examples/request/ExplainRequestExample1.yaml +++ b/specification/_global/explain/examples/request/ExplainRequestExample1.yaml @@ -10,68 +10,3 @@ value: |- "match" : { "message" : "elasticsearch" } } } -alternatives: - - language: Python - code: |- - resp = client.explain( - index="my-index-000001", - id="0", - query={ - "match": { - "message": "elasticsearch" - } - }, - ) - - language: JavaScript - code: |- - const response = await client.explain({ - index: "my-index-000001", - id: 0, - query: { - match: { - message: "elasticsearch", - }, - }, - }); - - language: Ruby - code: |- - response = client.explain( - index: "my-index-000001", - id: "0", - body: { - "query": { - "match": { - "message": "elasticsearch" - } - } - } - ) - - language: PHP - code: |- - $resp = $client->explain([ - "index" => "my-index-000001", - "id" => "0", - "body" => [ - "query" => [ - "match" => [ - "message" => "elasticsearch", - ], - ], - ], - ]); - - language: curl - code: - 'curl -X GET -H "Authorization: ApiKey $ELASTIC_API_KEY" -H "Content-Type: application/json" -d - ''{"query":{"match":{"message":"elasticsearch"}}}'' "$ELASTICSEARCH_URL/my-index-000001/_explain/0"' - - language: Java - code: | - client.explain(e -> e - .id("0") - .index("my-index-000001") - .query(q -> q - .match(m -> m - .field("message") - .query(FieldValue.of("elasticsearch")) - ) - ) - ); diff --git a/specification/_global/field_caps/examples/request/FieldCapabilitiesRequestExample1.yaml b/specification/_global/field_caps/examples/request/FieldCapabilitiesRequestExample1.yaml index af2097ff7e..d67e145aea 100644 --- a/specification/_global/field_caps/examples/request/FieldCapabilitiesRequestExample1.yaml +++ b/specification/_global/field_caps/examples/request/FieldCapabilitiesRequestExample1.yaml @@ -14,65 +14,3 @@ value: |- } } } -alternatives: - - language: Python - code: |- - resp = client.field_caps( - index="my-index-*", - fields="rating", - index_filter={ - "range": { - "@timestamp": { - "gte": "2018" - } - } - }, - ) - - language: JavaScript - code: |- - const response = await client.fieldCaps({ - index: "my-index-*", - fields: "rating", - index_filter: { - range: { - "@timestamp": { - gte: "2018", - }, - }, - }, - }); - - language: Ruby - code: |- - response = client.field_caps( - index: "my-index-*", - fields: "rating", - body: { - "index_filter": { - "range": { - "@timestamp": { - "gte": "2018" - } - } - } - } - ) - - language: PHP - code: |- - $resp = $client->fieldCaps([ - "index" => "my-index-*", - "fields" => "rating", - "body" => [ - "index_filter" => [ - "range" => [ - "@timestamp" => [ - "gte" => "2018", - ], - ], - ], - ], - ]); - - language: curl - code: - 'curl -X POST -H "Authorization: ApiKey $ELASTIC_API_KEY" -H "Content-Type: application/json" -d - ''{"index_filter":{"range":{"@timestamp":{"gte":"2018"}}}}'' - "$ELASTICSEARCH_URL/my-index-*/_field_caps?fields=rating"' diff --git a/specification/_global/get/examples/request/GetRequestExample2.yaml b/specification/_global/get/examples/request/GetRequestExample2.yaml index fe75965b61..22ed571367 100644 --- a/specification/_global/get/examples/request/GetRequestExample2.yaml +++ b/specification/_global/get/examples/request/GetRequestExample2.yaml @@ -1,33 +1 @@ method_request: GET my-index-000001/_doc/1?stored_fields=tags,counter -alternatives: - - language: Python - code: |- - resp = client.get( - index="my-index-000001", - id="1", - stored_fields="tags,counter", - ) - - language: JavaScript - code: |- - const response = await client.get({ - index: "my-index-000001", - id: 1, - stored_fields: "tags,counter", - }); - - language: Ruby - code: |- - response = client.get( - index: "my-index-000001", - id: "1", - stored_fields: "tags,counter" - ) - - language: PHP - code: |- - $resp = $client->get([ - "index" => "my-index-000001", - "id" => "1", - "stored_fields" => "tags,counter", - ]); - - language: curl - code: 'curl -X GET -H "Authorization: ApiKey $ELASTIC_API_KEY" - "$ELASTICSEARCH_URL/my-index-000001/_doc/1?stored_fields=tags,counter"' diff --git a/specification/_global/get_script/examples/request/GetScriptRequestExample1.yaml b/specification/_global/get_script/examples/request/GetScriptRequestExample1.yaml index e135beaf68..60d3bb295d 100644 --- a/specification/_global/get_script/examples/request/GetScriptRequestExample1.yaml +++ b/specification/_global/get_script/examples/request/GetScriptRequestExample1.yaml @@ -1,29 +1 @@ method_request: GET _scripts/my-search-template -alternatives: - - language: Python - code: |- - resp = client.get_script( - id="my-search-template", - ) - - language: JavaScript - code: |- - const response = await client.getScript({ - id: "my-search-template", - }); - - language: Ruby - code: |- - response = client.get_script( - id: "my-search-template" - ) - - language: PHP - code: |- - $resp = $client->getScript([ - "id" => "my-search-template", - ]); - - language: curl - code: 'curl -X GET -H "Authorization: ApiKey $ELASTIC_API_KEY" "$ELASTICSEARCH_URL/_scripts/my-search-template"' - - language: Java - code: | - client.getScript(g -> g - .id("my-search-template") - ); diff --git a/specification/_global/get_script_context/examples/request/GetScriptContextRequestExample1.yaml b/specification/_global/get_script_context/examples/request/GetScriptContextRequestExample1.yaml index e141bee6a7..a0715429dd 100644 --- a/specification/_global/get_script_context/examples/request/GetScriptContextRequestExample1.yaml +++ b/specification/_global/get_script_context/examples/request/GetScriptContextRequestExample1.yaml @@ -1,15 +1 @@ method_request: GET _script_context -alternatives: - - language: Python - code: resp = client.get_script_context() - - language: JavaScript - code: const response = await client.getScriptContext(); - - language: Ruby - code: response = client.get_script_context - - language: PHP - code: $resp = $client->getScriptContext(); - - language: curl - code: 'curl -X GET -H "Authorization: ApiKey $ELASTIC_API_KEY" "$ELASTICSEARCH_URL/_script_context"' - - language: Java - code: | - client.getScriptContext(); diff --git a/specification/_global/get_script_languages/examples/request/GetScriptLanguagesRequestExample1.yaml b/specification/_global/get_script_languages/examples/request/GetScriptLanguagesRequestExample1.yaml index a8193bbfb3..3db7b33d30 100644 --- a/specification/_global/get_script_languages/examples/request/GetScriptLanguagesRequestExample1.yaml +++ b/specification/_global/get_script_languages/examples/request/GetScriptLanguagesRequestExample1.yaml @@ -1,15 +1 @@ method_request: GET _script_language -alternatives: - - language: Python - code: resp = client.get_script_languages() - - language: JavaScript - code: const response = await client.getScriptLanguages(); - - language: Ruby - code: response = client.get_script_languages - - language: PHP - code: $resp = $client->getScriptLanguages(); - - language: curl - code: 'curl -X GET -H "Authorization: ApiKey $ELASTIC_API_KEY" "$ELASTICSEARCH_URL/_script_language"' - - language: Java - code: | - client.getScriptLanguages(); diff --git a/specification/_global/get_source/SourceRequest.ts b/specification/_global/get_source/SourceRequest.ts index 75b24cc628..bf8f338273 100644 --- a/specification/_global/get_source/SourceRequest.ts +++ b/specification/_global/get_source/SourceRequest.ts @@ -99,10 +99,6 @@ export interface Request extends RequestBase { * A comma-separated list of source fields to include in the response. */ _source_includes?: Fields - /** - * A comma-separated list of stored fields to return as part of a hit. - */ - stored_fields?: Fields /** * The version number for concurrency control. * It must match the current version of the document for the request to succeed. diff --git a/specification/_global/get_source/examples/request/GetSourceRequestExample1.yaml b/specification/_global/get_source/examples/request/GetSourceRequestExample1.yaml index 6470ad8596..dca7123365 100644 --- a/specification/_global/get_source/examples/request/GetSourceRequestExample1.yaml +++ b/specification/_global/get_source/examples/request/GetSourceRequestExample1.yaml @@ -1,34 +1 @@ method_request: GET my-index-000001/_source/1 -alternatives: - - language: Python - code: |- - resp = client.get_source( - index="my-index-000001", - id="1", - ) - - language: JavaScript - code: |- - const response = await client.getSource({ - index: "my-index-000001", - id: 1, - }); - - language: Ruby - code: |- - response = client.get_source( - index: "my-index-000001", - id: "1" - ) - - language: PHP - code: |- - $resp = $client->getSource([ - "index" => "my-index-000001", - "id" => "1", - ]); - - language: curl - code: 'curl -X GET -H "Authorization: ApiKey $ELASTIC_API_KEY" "$ELASTICSEARCH_URL/my-index-000001/_source/1"' - - language: Java - code: | - client.getSource(g -> g - .id("1") - .index("my-index-000001") - ); diff --git a/specification/_global/health_report/examples/request/HealthReportRequestExample1.yaml b/specification/_global/health_report/examples/request/HealthReportRequestExample1.yaml index e1eac5c51b..a64e53a03b 100644 --- a/specification/_global/health_report/examples/request/HealthReportRequestExample1.yaml +++ b/specification/_global/health_report/examples/request/HealthReportRequestExample1.yaml @@ -1,15 +1 @@ method_request: GET _health_report -alternatives: - - language: Python - code: resp = client.health_report() - - language: JavaScript - code: const response = await client.healthReport(); - - language: Ruby - code: response = client.health_report - - language: PHP - code: $resp = $client->healthReport(); - - language: curl - code: 'curl -X GET -H "Authorization: ApiKey $ELASTIC_API_KEY" "$ELASTICSEARCH_URL/_health_report"' - - language: Java - code: | - client.healthReport(h -> h); diff --git a/specification/_global/health_report/types.ts b/specification/_global/health_report/types.ts index 847dc711a5..76f67d43d5 100644 --- a/specification/_global/health_report/types.ts +++ b/specification/_global/health_report/types.ts @@ -26,7 +26,8 @@ export enum IndicatorHealthStatus { green, yellow, red, - unknown + unknown, + unavailable } export class Indicators { diff --git a/specification/_global/index/IndexRequest.ts b/specification/_global/index/IndexRequest.ts index 644a52e81e..6a4dae61ec 100644 --- a/specification/_global/index/IndexRequest.ts +++ b/specification/_global/index/IndexRequest.ts @@ -259,6 +259,11 @@ export interface Request extends RequestBase { * @server_default false */ require_alias?: boolean + /** + * If `true`, the request's actions must target a data stream (existing or to be created). + * @server_default false + */ + require_data_stream?: boolean } /** @codegen_name document */ /** diff --git a/specification/_global/index/examples/request/IndexRequestExample1.yaml b/specification/_global/index/examples/request/IndexRequestExample1.yaml index 75c40c0d48..8af2d206e0 100644 --- a/specification/_global/index/examples/request/IndexRequestExample1.yaml +++ b/specification/_global/index/examples/request/IndexRequestExample1.yaml @@ -12,63 +12,3 @@ value: |- "id": "kimchy" } } -alternatives: - - language: Python - code: |- - resp = client.index( - index="my-index-000001", - document={ - "@timestamp": "2099-11-15T13:12:00", - "message": "GET /search HTTP/1.1 200 1070000", - "user": { - "id": "kimchy" - } - }, - ) - - language: JavaScript - code: |- - const response = await client.index({ - index: "my-index-000001", - document: { - "@timestamp": "2099-11-15T13:12:00", - message: "GET /search HTTP/1.1 200 1070000", - user: { - id: "kimchy", - }, - }, - }); - - language: Ruby - code: |- - response = client.index( - index: "my-index-000001", - body: { - "@timestamp": "2099-11-15T13:12:00", - "message": "GET /search HTTP/1.1 200 1070000", - "user": { - "id": "kimchy" - } - } - ) - - language: PHP - code: |- - $resp = $client->index([ - "index" => "my-index-000001", - "body" => [ - "@timestamp" => "2099-11-15T13:12:00", - "message" => "GET /search HTTP/1.1 200 1070000", - "user" => [ - "id" => "kimchy", - ], - ], - ]); - - language: curl - code: - 'curl -X POST -H "Authorization: ApiKey $ELASTIC_API_KEY" -H "Content-Type: application/json" -d - ''{"@timestamp":"2099-11-15T13:12:00","message":"GET /search HTTP/1.1 200 1070000","user":{"id":"kimchy"}}'' - "$ELASTICSEARCH_URL/my-index-000001/_doc/"' - - language: Java - code: > - client.index(i -> i - .index("my-index-000001") - .document(JsonData.fromJson("{\"@timestamp\":\"2099-11-15T13:12:00\",\"message\":\"GET /search HTTP/1.1 200 1070000\",\"user\":{\"id\":\"kimchy\"}}")) - ); diff --git a/specification/_global/index/examples/request/IndexRequestExample2.yaml b/specification/_global/index/examples/request/IndexRequestExample2.yaml index dacad5caad..a3a5c9aea9 100644 --- a/specification/_global/index/examples/request/IndexRequestExample2.yaml +++ b/specification/_global/index/examples/request/IndexRequestExample2.yaml @@ -11,68 +11,3 @@ value: |- "id": "kimchy" } } -alternatives: - - language: Python - code: |- - resp = client.index( - index="my-index-000001", - id="1", - document={ - "@timestamp": "2099-11-15T13:12:00", - "message": "GET /search HTTP/1.1 200 1070000", - "user": { - "id": "kimchy" - } - }, - ) - - language: JavaScript - code: |- - const response = await client.index({ - index: "my-index-000001", - id: 1, - document: { - "@timestamp": "2099-11-15T13:12:00", - message: "GET /search HTTP/1.1 200 1070000", - user: { - id: "kimchy", - }, - }, - }); - - language: Ruby - code: |- - response = client.index( - index: "my-index-000001", - id: "1", - body: { - "@timestamp": "2099-11-15T13:12:00", - "message": "GET /search HTTP/1.1 200 1070000", - "user": { - "id": "kimchy" - } - } - ) - - language: PHP - code: |- - $resp = $client->index([ - "index" => "my-index-000001", - "id" => "1", - "body" => [ - "@timestamp" => "2099-11-15T13:12:00", - "message" => "GET /search HTTP/1.1 200 1070000", - "user" => [ - "id" => "kimchy", - ], - ], - ]); - - language: curl - code: - 'curl -X PUT -H "Authorization: ApiKey $ELASTIC_API_KEY" -H "Content-Type: application/json" -d - ''{"@timestamp":"2099-11-15T13:12:00","message":"GET /search HTTP/1.1 200 1070000","user":{"id":"kimchy"}}'' - "$ELASTICSEARCH_URL/my-index-000001/_doc/1"' - - language: Java - code: > - client.index(i -> i - .id("1") - .index("my-index-000001") - .document(JsonData.fromJson("{\"@timestamp\":\"2099-11-15T13:12:00\",\"message\":\"GET /search HTTP/1.1 200 1070000\",\"user\":{\"id\":\"kimchy\"}}")) - ); diff --git a/specification/_global/info/RootNodeInfoRequest.ts b/specification/_global/info/RootNodeInfoRequest.ts index 23ba4478a9..5efb702c84 100644 --- a/specification/_global/info/RootNodeInfoRequest.ts +++ b/specification/_global/info/RootNodeInfoRequest.ts @@ -22,6 +22,7 @@ import { RequestBase } from '@_types/Base' /** * Get cluster info. * Get basic build, version, and cluster information. + * ::: In Serverless, this API is retained for backward compatibility only. Some response fields, such as the version number, should be ignored. * @rest_spec_name info * @availability stack stability=stable * @availability serverless stability=stable visibility=public diff --git a/specification/_global/info/examples/request/RootNodeInfoRequestExample1.yaml b/specification/_global/info/examples/request/RootNodeInfoRequestExample1.yaml index daeaea8b37..54a75d703d 100644 --- a/specification/_global/info/examples/request/RootNodeInfoRequestExample1.yaml +++ b/specification/_global/info/examples/request/RootNodeInfoRequestExample1.yaml @@ -1,15 +1 @@ method_request: GET / -alternatives: - - language: Python - code: resp = client.info() - - language: JavaScript - code: const response = await client.info(); - - language: Ruby - code: response = client.info - - language: PHP - code: $resp = $client->info(); - - language: curl - code: 'curl -X GET -H "Authorization: ApiKey $ELASTIC_API_KEY" "$ELASTICSEARCH_URL/"' - - language: Java - code: | - client.info(); diff --git a/specification/_global/info/examples/response/RootNodeInfoResponseExample1.yaml b/specification/_global/info/examples/response/RootNodeInfoResponseExample1.yaml index f3fa2ba844..025314f23b 100644 --- a/specification/_global/info/examples/response/RootNodeInfoResponseExample1.yaml +++ b/specification/_global/info/examples/response/RootNodeInfoResponseExample1.yaml @@ -1,19 +1,19 @@ -# summary: '' -description: A successful response from `GET /`s. +summary: Stack response +description: A successful response from `GET /`. # type: response # response_code: 200 value: name: instance-0000000000 cluster_name: my_test_cluster - cluster_uuid: 5QaxoN0pRZuOmWSxstBBwQ + cluster_uuid: zk-HjQtYQGyL3NFSSu7InA version: - build_date: '2024-02-01T13:07:13.727175297Z' - minimum_wire_compatibility_version: 7.17.0 - build_hash: 6185ba65d27469afabc9bc951cded6c17c21e3f3 - number: 8.12.1 - lucene_version: 9.9.2 - minimum_index_compatibility_version: 7.0.0 + number: 9.1.0 build_flavor: default - build_snapshot: false build_type: docker + build_hash: 00000000 + build_date: 2025-07-09T22:10:13.578182715Z + build_snapshot: false + lucene_version: 10.2.2 + minimum_wire_compatibility_version: 8.19.0 + minimum_index_compatibility_version: 8.0.0 tagline: 'You Know, for Search' diff --git a/specification/_global/info/examples/response/RootNodeInfoResponseExample2.yaml b/specification/_global/info/examples/response/RootNodeInfoResponseExample2.yaml new file mode 100644 index 0000000000..cd5c4f2fee --- /dev/null +++ b/specification/_global/info/examples/response/RootNodeInfoResponseExample2.yaml @@ -0,0 +1,19 @@ +summary: Serverless response +description: A successful response from `GET /` on Serverless. This API is retained for backward compatibility only. Some fields, such as the version number, return static values and should be ignored. +# type: response +# response_code: 200 +value: + name: serverless + cluster_name: my_test_serverless_cluster + cluster_uuid: 8xx0pi24Squnf4PFDOAtwg + version: + number: 8.11.0 + build_flavor: serverless + build_type: docker + build_hash: 00000000 + build_date: 2023-10-31 + build_snapshot: false + lucene_version: 9.7.0 + minimum_wire_compatibility_version: 8.11.0 + minimum_index_compatibility_version: 8.11.0 + tagline: 'You Know, for Search' diff --git a/specification/_global/mget/examples/request/MultiGetRequestExample1.yaml b/specification/_global/mget/examples/request/MultiGetRequestExample1.yaml index d69aebb34f..92e0eda23f 100644 --- a/specification/_global/mget/examples/request/MultiGetRequestExample1.yaml +++ b/specification/_global/mget/examples/request/MultiGetRequestExample1.yaml @@ -15,72 +15,3 @@ value: |- } ] } -alternatives: - - language: Python - code: |- - resp = client.mget( - index="my-index-000001", - docs=[ - { - "_id": "1" - }, - { - "_id": "2" - } - ], - ) - - language: JavaScript - code: |- - const response = await client.mget({ - index: "my-index-000001", - docs: [ - { - _id: "1", - }, - { - _id: "2", - }, - ], - }); - - language: Ruby - code: |- - response = client.mget( - index: "my-index-000001", - body: { - "docs": [ - { - "_id": "1" - }, - { - "_id": "2" - } - ] - } - ) - - language: PHP - code: |- - $resp = $client->mget([ - "index" => "my-index-000001", - "body" => [ - "docs" => array( - [ - "_id" => "1", - ], - [ - "_id" => "2", - ], - ), - ], - ]); - - language: curl - code: - 'curl -X GET -H "Authorization: ApiKey $ELASTIC_API_KEY" -H "Content-Type: application/json" -d - ''{"docs":[{"_id":"1"},{"_id":"2"}]}'' "$ELASTICSEARCH_URL/my-index-000001/_mget"' - - language: Java - code: | - client.mget(m -> m - .docs(List.of(MultiGetOperation.of(mu -> mu - .id("1")),MultiGetOperation.of(mu -> mu - .id("2")))) - .index("my-index-000001") - ); diff --git a/specification/_global/mget/examples/request/MultiGetRequestExample2.yaml b/specification/_global/mget/examples/request/MultiGetRequestExample2.yaml index f269d68104..b451db0c6e 100644 --- a/specification/_global/mget/examples/request/MultiGetRequestExample2.yaml +++ b/specification/_global/mget/examples/request/MultiGetRequestExample2.yaml @@ -27,131 +27,3 @@ value: |- } ] } -alternatives: - - language: Python - code: |- - resp = client.mget( - docs=[ - { - "_index": "test", - "_id": "1", - "_source": False - }, - { - "_index": "test", - "_id": "2", - "_source": [ - "field3", - "field4" - ] - }, - { - "_index": "test", - "_id": "3", - "_source": { - "include": [ - "user" - ], - "exclude": [ - "user.location" - ] - } - } - ], - ) - - language: JavaScript - code: |- - const response = await client.mget({ - docs: [ - { - _index: "test", - _id: "1", - _source: false, - }, - { - _index: "test", - _id: "2", - _source: ["field3", "field4"], - }, - { - _index: "test", - _id: "3", - _source: { - include: ["user"], - exclude: ["user.location"], - }, - }, - ], - }); - - language: Ruby - code: |- - response = client.mget( - body: { - "docs": [ - { - "_index": "test", - "_id": "1", - "_source": false - }, - { - "_index": "test", - "_id": "2", - "_source": [ - "field3", - "field4" - ] - }, - { - "_index": "test", - "_id": "3", - "_source": { - "include": [ - "user" - ], - "exclude": [ - "user.location" - ] - } - } - ] - } - ) - - language: PHP - code: |- - $resp = $client->mget([ - "body" => [ - "docs" => array( - [ - "_index" => "test", - "_id" => "1", - "_source" => false, - ], - [ - "_index" => "test", - "_id" => "2", - "_source" => array( - "field3", - "field4", - ), - ], - [ - "_index" => "test", - "_id" => "3", - "_source" => [ - "include" => array( - "user", - ), - "exclude" => array( - "user.location", - ), - ], - ], - ), - ], - ]); - - language: curl - code: - "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d - '{\"docs\":[{\"_index\":\"test\",\"_id\":\"1\",\"_source\":false},{\"_index\":\"test\",\"_id\":\"2\",\"_source\":[\"field3\",\ - \"field4\"]},{\"_index\":\"test\",\"_id\":\"3\",\"_source\":{\"include\":[\"user\"],\"exclude\":[\"user.location\"]}}]}' - \"$ELASTICSEARCH_URL/_mget\"" diff --git a/specification/_global/mget/examples/request/MultiGetRequestExample3.yaml b/specification/_global/mget/examples/request/MultiGetRequestExample3.yaml index 142f19c386..ca0669252f 100644 --- a/specification/_global/mget/examples/request/MultiGetRequestExample3.yaml +++ b/specification/_global/mget/examples/request/MultiGetRequestExample3.yaml @@ -18,106 +18,3 @@ value: |- } ] } -alternatives: - - language: Python - code: |- - resp = client.mget( - docs=[ - { - "_index": "test", - "_id": "1", - "stored_fields": [ - "field1", - "field2" - ] - }, - { - "_index": "test", - "_id": "2", - "stored_fields": [ - "field3", - "field4" - ] - } - ], - ) - - language: JavaScript - code: |- - const response = await client.mget({ - docs: [ - { - _index: "test", - _id: "1", - stored_fields: ["field1", "field2"], - }, - { - _index: "test", - _id: "2", - stored_fields: ["field3", "field4"], - }, - ], - }); - - language: Ruby - code: |- - response = client.mget( - body: { - "docs": [ - { - "_index": "test", - "_id": "1", - "stored_fields": [ - "field1", - "field2" - ] - }, - { - "_index": "test", - "_id": "2", - "stored_fields": [ - "field3", - "field4" - ] - } - ] - } - ) - - language: PHP - code: |- - $resp = $client->mget([ - "body" => [ - "docs" => array( - [ - "_index" => "test", - "_id" => "1", - "stored_fields" => array( - "field1", - "field2", - ), - ], - [ - "_index" => "test", - "_id" => "2", - "stored_fields" => array( - "field3", - "field4", - ), - ], - ), - ], - ]); - - language: curl - code: - "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d - '{\"docs\":[{\"_index\":\"test\",\"_id\":\"1\",\"stored_fields\":[\"field1\",\"field2\"]},{\"_index\":\"test\",\"_id\":\"2\",\ - \"stored_fields\":[\"field3\",\"field4\"]}]}' \"$ELASTICSEARCH_URL/_mget\"" - - language: Java - code: | - client.mget(m -> m - .docs(List.of(MultiGetOperation.of(mu -> mu - .id("1") - .index("test") - .storedFields(List.of("field1","field2"))),MultiGetOperation.of(mu -> mu - .id("2") - .index("test") - .storedFields(List.of("field3","field4"))))) - ); diff --git a/specification/_global/mget/examples/request/MultiGetRequestExample4.yaml b/specification/_global/mget/examples/request/MultiGetRequestExample4.yaml index 44e02b0357..0edef6e706 100644 --- a/specification/_global/mget/examples/request/MultiGetRequestExample4.yaml +++ b/specification/_global/mget/examples/request/MultiGetRequestExample4.yaml @@ -19,88 +19,3 @@ value: |- } ] } -alternatives: - - language: Python - code: |- - resp = client.mget( - routing="key1", - docs=[ - { - "_index": "test", - "_id": "1", - "routing": "key2" - }, - { - "_index": "test", - "_id": "2" - } - ], - ) - - language: JavaScript - code: |- - const response = await client.mget({ - routing: "key1", - docs: [ - { - _index: "test", - _id: "1", - routing: "key2", - }, - { - _index: "test", - _id: "2", - }, - ], - }); - - language: Ruby - code: |- - response = client.mget( - routing: "key1", - body: { - "docs": [ - { - "_index": "test", - "_id": "1", - "routing": "key2" - }, - { - "_index": "test", - "_id": "2" - } - ] - } - ) - - language: PHP - code: |- - $resp = $client->mget([ - "routing" => "key1", - "body" => [ - "docs" => array( - [ - "_index" => "test", - "_id" => "1", - "routing" => "key2", - ], - [ - "_index" => "test", - "_id" => "2", - ], - ), - ], - ]); - - language: curl - code: - 'curl -X GET -H "Authorization: ApiKey $ELASTIC_API_KEY" -H "Content-Type: application/json" -d - ''{"docs":[{"_index":"test","_id":"1","routing":"key2"},{"_index":"test","_id":"2"}]}'' - "$ELASTICSEARCH_URL/_mget?routing=key1"' - - language: Java - code: | - client.mget(m -> m - .docs(List.of(MultiGetOperation.of(mu -> mu - .id("1") - .index("test") - .routing("key2")),MultiGetOperation.of(mu -> mu - .id("2") - .index("test")))) - .routing("key1") - ); diff --git a/specification/_global/msearch/MultiSearchRequest.ts b/specification/_global/msearch/MultiSearchRequest.ts index c448fb7181..4888c0666d 100644 --- a/specification/_global/msearch/MultiSearchRequest.ts +++ b/specification/_global/msearch/MultiSearchRequest.ts @@ -99,6 +99,10 @@ export interface Request extends RequestBase { * @server_default false */ include_named_queries_score?: boolean + /** + * Comma-separated list of data streams, indices, and index aliases to use as default + */ + index?: Indices /** * Maximum number of concurrent searches the multi search API can execute. * Defaults to `max(1, (# of data nodes * min(search thread pool size, 10)))`. diff --git a/specification/_global/msearch/examples/request/MsearchRequestExample1.yaml b/specification/_global/msearch/examples/request/MsearchRequestExample1.yaml index 60711ea29d..076400983b 100644 --- a/specification/_global/msearch/examples/request/MsearchRequestExample1.yaml +++ b/specification/_global/msearch/examples/request/MsearchRequestExample1.yaml @@ -5,101 +5,3 @@ value: |- {"query" : {"match" : { "message": "this is a test"}}} {"index": "my-index-000002"} {"query" : {"match_all" : {}}} -alternatives: - - language: Python - code: |- - resp = client.msearch( - index="my-index-000001", - searches=[ - {}, - { - "query": { - "match": { - "message": "this is a test" - } - } - }, - { - "index": "my-index-000002" - }, - { - "query": { - "match_all": {} - } - } - ], - ) - - language: JavaScript - code: |- - const response = await client.msearch({ - index: "my-index-000001", - searches: [ - {}, - { - query: { - match: { - message: "this is a test", - }, - }, - }, - { - index: "my-index-000002", - }, - { - query: { - match_all: {}, - }, - }, - ], - }); - - language: Ruby - code: |- - response = client.msearch( - index: "my-index-000001", - body: [ - {}, - { - "query": { - "match": { - "message": "this is a test" - } - } - }, - { - "index": "my-index-000002" - }, - { - "query": { - "match_all": {} - } - } - ] - ) - - language: PHP - code: |- - $resp = $client->msearch([ - "index" => "my-index-000001", - "body" => array( - new ArrayObject([]), - [ - "query" => [ - "match" => [ - "message" => "this is a test", - ], - ], - ], - [ - "index" => "my-index-000002", - ], - [ - "query" => [ - "match_all" => new ArrayObject([]), - ], - ], - ), - ]); - - language: curl - code: - 'curl -X GET -H "Authorization: ApiKey $ELASTIC_API_KEY" -H "Content-Type: application/json" -d - ''[{},{"query":{"match":{"message":"this is a test"}}},{"index":"my-index-000002"},{"query":{"match_all":{}}}]'' - "$ELASTICSEARCH_URL/my-index-000001/_msearch"' diff --git a/specification/_global/msearch_template/examples/request/MultiSearchTemplateRequestExample1.yaml b/specification/_global/msearch_template/examples/request/MultiSearchTemplateRequestExample1.yaml index ef7f6d6b3a..c033a2f7e3 100644 --- a/specification/_global/msearch_template/examples/request/MultiSearchTemplateRequestExample1.yaml +++ b/specification/_global/msearch_template/examples/request/MultiSearchTemplateRequestExample1.yaml @@ -7,102 +7,3 @@ value: |- { "id": "my-search-template", "params": { "query_string": "hello world", "from": 0, "size": 10 }} { } { "id": "my-other-search-template", "params": { "query_type": "match_all" }} -alternatives: - - language: Python - code: |- - resp = client.msearch_template( - index="my-index", - search_templates=[ - {}, - { - "id": "my-search-template", - "params": { - "query_string": "hello world", - "from": 0, - "size": 10 - } - }, - {}, - { - "id": "my-other-search-template", - "params": { - "query_type": "match_all" - } - } - ], - ) - - language: JavaScript - code: |- - const response = await client.msearchTemplate({ - index: "my-index", - search_templates: [ - {}, - { - id: "my-search-template", - params: { - query_string: "hello world", - from: 0, - size: 10, - }, - }, - {}, - { - id: "my-other-search-template", - params: { - query_type: "match_all", - }, - }, - ], - }); - - language: Ruby - code: |- - response = client.msearch_template( - index: "my-index", - body: [ - {}, - { - "id": "my-search-template", - "params": { - "query_string": "hello world", - "from": 0, - "size": 10 - } - }, - {}, - { - "id": "my-other-search-template", - "params": { - "query_type": "match_all" - } - } - ] - ) - - language: PHP - code: |- - $resp = $client->msearchTemplate([ - "index" => "my-index", - "body" => array( - new ArrayObject([]), - [ - "id" => "my-search-template", - "params" => [ - "query_string" => "hello world", - "from" => 0, - "size" => 10, - ], - ], - new ArrayObject([]), - [ - "id" => "my-other-search-template", - "params" => [ - "query_type" => "match_all", - ], - ], - ), - ]); - - language: curl - code: - 'curl -X GET -H "Authorization: ApiKey $ELASTIC_API_KEY" -H "Content-Type: application/json" -d - ''[{},{"id":"my-search-template","params":{"query_string":"hello - world","from":0,"size":10}},{},{"id":"my-other-search-template","params":{"query_type":"match_all"}}]'' - "$ELASTICSEARCH_URL/my-index/_msearch/template"' diff --git a/specification/_global/mtermvectors/examples/request/MultiTermVectorsRequestExample1.yaml b/specification/_global/mtermvectors/examples/request/MultiTermVectorsRequestExample1.yaml index 6f4b325a4f..489b8f0de5 100644 --- a/specification/_global/mtermvectors/examples/request/MultiTermVectorsRequestExample1.yaml +++ b/specification/_global/mtermvectors/examples/request/MultiTermVectorsRequestExample1.yaml @@ -19,89 +19,3 @@ value: |- } ] } -alternatives: - - language: Python - code: |- - resp = client.mtermvectors( - index="my-index-000001", - docs=[ - { - "_id": "2", - "fields": [ - "message" - ], - "term_statistics": True - }, - { - "_id": "1" - } - ], - ) - - language: JavaScript - code: |- - const response = await client.mtermvectors({ - index: "my-index-000001", - docs: [ - { - _id: "2", - fields: ["message"], - term_statistics: true, - }, - { - _id: "1", - }, - ], - }); - - language: Ruby - code: |- - response = client.mtermvectors( - index: "my-index-000001", - body: { - "docs": [ - { - "_id": "2", - "fields": [ - "message" - ], - "term_statistics": true - }, - { - "_id": "1" - } - ] - } - ) - - language: PHP - code: |- - $resp = $client->mtermvectors([ - "index" => "my-index-000001", - "body" => [ - "docs" => array( - [ - "_id" => "2", - "fields" => array( - "message", - ), - "term_statistics" => true, - ], - [ - "_id" => "1", - ], - ), - ], - ]); - - language: curl - code: - 'curl -X POST -H "Authorization: ApiKey $ELASTIC_API_KEY" -H "Content-Type: application/json" -d - ''{"docs":[{"_id":"2","fields":["message"],"term_statistics":true},{"_id":"1"}]}'' - "$ELASTICSEARCH_URL/my-index-000001/_mtermvectors"' - - language: Java - code: | - client.mtermvectors(m -> m - .docs(List.of(MultiTermVectorsOperation.of(mu -> mu - .id("2") - .fields("message") - .termStatistics(true)),MultiTermVectorsOperation.of(mu -> mu - .id("1")))) - .index("my-index-000001") - ); diff --git a/specification/_global/mtermvectors/examples/request/MultiTermVectorsRequestExample2.yaml b/specification/_global/mtermvectors/examples/request/MultiTermVectorsRequestExample2.yaml index 64eb906f4c..d835a75334 100644 --- a/specification/_global/mtermvectors/examples/request/MultiTermVectorsRequestExample2.yaml +++ b/specification/_global/mtermvectors/examples/request/MultiTermVectorsRequestExample2.yaml @@ -12,66 +12,3 @@ value: |- ], "term_statistics": true } -alternatives: - - language: Python - code: |- - resp = client.mtermvectors( - index="my-index-000001", - ids=[ - "1", - "2" - ], - fields=[ - "message" - ], - term_statistics=True, - ) - - language: JavaScript - code: |- - const response = await client.mtermvectors({ - index: "my-index-000001", - ids: ["1", "2"], - fields: ["message"], - term_statistics: true, - }); - - language: Ruby - code: |- - response = client.mtermvectors( - index: "my-index-000001", - body: { - "ids": [ - "1", - "2" - ], - "fields": [ - "message" - ], - "term_statistics": true - } - ) - - language: PHP - code: |- - $resp = $client->mtermvectors([ - "index" => "my-index-000001", - "body" => [ - "ids" => array( - "1", - "2", - ), - "fields" => array( - "message", - ), - "term_statistics" => true, - ], - ]); - - language: curl - code: - 'curl -X POST -H "Authorization: ApiKey $ELASTIC_API_KEY" -H "Content-Type: application/json" -d - ''{"ids":["1","2"],"fields":["message"],"term_statistics":true}'' - "$ELASTICSEARCH_URL/my-index-000001/_mtermvectors"' - - language: Java - code: | - client.mtermvectors(m -> m - .ids(List.of("1","2")) - .index("my-index-000001") - ); diff --git a/specification/_global/mtermvectors/examples/request/MultiTermVectorsRequestExample3.yaml b/specification/_global/mtermvectors/examples/request/MultiTermVectorsRequestExample3.yaml index 4e3612f7c2..e847939ae2 100644 --- a/specification/_global/mtermvectors/examples/request/MultiTermVectorsRequestExample3.yaml +++ b/specification/_global/mtermvectors/examples/request/MultiTermVectorsRequestExample3.yaml @@ -21,94 +21,3 @@ value: |- } ] } -alternatives: - - language: Python - code: |- - resp = client.mtermvectors( - docs=[ - { - "_index": "my-index-000001", - "doc": { - "message": "test test test" - } - }, - { - "_index": "my-index-000001", - "doc": { - "message": "Another test ..." - } - } - ], - ) - - language: JavaScript - code: |- - const response = await client.mtermvectors({ - docs: [ - { - _index: "my-index-000001", - doc: { - message: "test test test", - }, - }, - { - _index: "my-index-000001", - doc: { - message: "Another test ...", - }, - }, - ], - }); - - language: Ruby - code: |- - response = client.mtermvectors( - body: { - "docs": [ - { - "_index": "my-index-000001", - "doc": { - "message": "test test test" - } - }, - { - "_index": "my-index-000001", - "doc": { - "message": "Another test ..." - } - } - ] - } - ) - - language: PHP - code: |- - $resp = $client->mtermvectors([ - "body" => [ - "docs" => array( - [ - "_index" => "my-index-000001", - "doc" => [ - "message" => "test test test", - ], - ], - [ - "_index" => "my-index-000001", - "doc" => [ - "message" => "Another test ...", - ], - ], - ), - ], - ]); - - language: curl - code: - 'curl -X POST -H "Authorization: ApiKey $ELASTIC_API_KEY" -H "Content-Type: application/json" -d - ''{"docs":[{"_index":"my-index-000001","doc":{"message":"test test - test"}},{"_index":"my-index-000001","doc":{"message":"Another test ..."}}]}'' "$ELASTICSEARCH_URL/_mtermvectors"' - - language: Java - code: | - client.mtermvectors(m -> m - .docs(List.of(MultiTermVectorsOperation.of(mu -> mu - .index("my-index-000001") - .doc(JsonData.fromJson("{\"message\":\"test test test\"}"))),MultiTermVectorsOperation.of(mu -> mu - .index("my-index-000001") - .doc(JsonData.fromJson("{\"message\":\"Another test ...\"}"))))) - ); diff --git a/specification/_global/open_point_in_time/examples/request/OpenPointInTimeRequestExample1.yaml b/specification/_global/open_point_in_time/examples/request/OpenPointInTimeRequestExample1.yaml index f000fffea0..63fef57765 100644 --- a/specification/_global/open_point_in_time/examples/request/OpenPointInTimeRequestExample1.yaml +++ b/specification/_global/open_point_in_time/examples/request/OpenPointInTimeRequestExample1.yaml @@ -1,42 +1 @@ method_request: POST /my-index-000001/_pit?keep_alive=1m&allow_partial_search_results=true -alternatives: - - language: Python - code: |- - resp = client.open_point_in_time( - index="my-index-000001", - keep_alive="1m", - allow_partial_search_results=True, - ) - - language: JavaScript - code: |- - const response = await client.openPointInTime({ - index: "my-index-000001", - keep_alive: "1m", - allow_partial_search_results: "true", - }); - - language: Ruby - code: |- - response = client.open_point_in_time( - index: "my-index-000001", - keep_alive: "1m", - allow_partial_search_results: "true" - ) - - language: PHP - code: |- - $resp = $client->openPointInTime([ - "index" => "my-index-000001", - "keep_alive" => "1m", - "allow_partial_search_results" => "true", - ]); - - language: curl - code: 'curl -X POST -H "Authorization: ApiKey $ELASTIC_API_KEY" - "$ELASTICSEARCH_URL/my-index-000001/_pit?keep_alive=1m&allow_partial_search_results=true"' - - language: Java - code: | - client.openPointInTime(o -> o - .allowPartialSearchResults(true) - .index("my-index-000001") - .keepAlive(k -> k - .offset(1) - ) - ); diff --git a/specification/_global/put_script/examples/request/PutScriptRequestExample1.yaml b/specification/_global/put_script/examples/request/PutScriptRequestExample1.yaml index 3d59b1b3c9..7594d7b27a 100644 --- a/specification/_global/put_script/examples/request/PutScriptRequestExample1.yaml +++ b/specification/_global/put_script/examples/request/PutScriptRequestExample1.yaml @@ -18,81 +18,3 @@ value: |- } } } -alternatives: - - language: Python - code: |- - resp = client.put_script( - id="my-search-template", - script={ - "lang": "mustache", - "source": { - "query": { - "match": { - "message": "{{query_string}}" - } - }, - "from": "{{from}}", - "size": "{{size}}" - } - }, - ) - - language: JavaScript - code: |- - const response = await client.putScript({ - id: "my-search-template", - script: { - lang: "mustache", - source: { - query: { - match: { - message: "{{query_string}}", - }, - }, - from: "{{from}}", - size: "{{size}}", - }, - }, - }); - - language: Ruby - code: |- - response = client.put_script( - id: "my-search-template", - body: { - "script": { - "lang": "mustache", - "source": { - "query": { - "match": { - "message": "{{query_string}}" - } - }, - "from": "{{from}}", - "size": "{{size}}" - } - } - } - ) - - language: PHP - code: |- - $resp = $client->putScript([ - "id" => "my-search-template", - "body" => [ - "script" => [ - "lang" => "mustache", - "source" => [ - "query" => [ - "match" => [ - "message" => "{{query_string}}", - ], - ], - "from" => "{{from}}", - "size" => "{{size}}", - ], - ], - ], - ]); - - language: curl - code: - "curl -X PUT -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d - '{\"script\":{\"lang\":\"mustache\",\"source\":{\"query\":{\"match\":{\"message\":\"{{query_string}}\"}},\"from\":\"{{from}}\ - \",\"size\":\"{{size}}\"}}}' \"$ELASTICSEARCH_URL/_scripts/my-search-template\"" diff --git a/specification/_global/put_script/examples/request/PutScriptRequestExample2.yaml b/specification/_global/put_script/examples/request/PutScriptRequestExample2.yaml index c4d8c7a5d0..9f80712c88 100644 --- a/specification/_global/put_script/examples/request/PutScriptRequestExample2.yaml +++ b/specification/_global/put_script/examples/request/PutScriptRequestExample2.yaml @@ -10,60 +10,3 @@ value: |- "source": "Math.log(_score * 2) + params['my_modifier']" } } -alternatives: - - language: Python - code: |- - resp = client.put_script( - id="my-stored-script", - script={ - "lang": "painless", - "source": "Math.log(_score * 2) + params['my_modifier']" - }, - ) - - language: JavaScript - code: |- - const response = await client.putScript({ - id: "my-stored-script", - script: { - lang: "painless", - source: "Math.log(_score * 2) + params['my_modifier']", - }, - }); - - language: Ruby - code: |- - response = client.put_script( - id: "my-stored-script", - body: { - "script": { - "lang": "painless", - "source": "Math.log(_score * 2) + params['my_modifier']" - } - } - ) - - language: PHP - code: |- - $resp = $client->putScript([ - "id" => "my-stored-script", - "body" => [ - "script" => [ - "lang" => "painless", - "source" => "Math.log(_score * 2) + params['my_modifier']", - ], - ], - ]); - - language: curl - code: - 'curl -X PUT -H "Authorization: ApiKey $ELASTIC_API_KEY" -H "Content-Type: application/json" -d - ''{"script":{"lang":"painless","source":"Math.log(_score * 2) + params[''"''"''my_modifier''"''"'']"}}'' - "$ELASTICSEARCH_URL/_scripts/my-stored-script"' - - language: Java - code: | - client.putScript(p -> p - .id("my-stored-script") - .script(s -> s - .lang("painless") - .source(so -> so - .scriptString("Math.log(_score * 2) + params['my_modifier']") - ) - ) - ); diff --git a/specification/_global/rank_eval/examples/request/RankEvalRequestExample1.yaml b/specification/_global/rank_eval/examples/request/RankEvalRequestExample1.yaml index 8878cb87dc..cf30d4a6fa 100644 --- a/specification/_global/rank_eval/examples/request/RankEvalRequestExample1.yaml +++ b/specification/_global/rank_eval/examples/request/RankEvalRequestExample1.yaml @@ -16,127 +16,3 @@ value: |- } } } -alternatives: - - language: Python - code: |- - resp = client.rank_eval( - index="my-index-000001", - requests=[ - { - "id": "JFK query", - "request": { - "query": { - "match_all": {} - } - }, - "ratings": [] - } - ], - metric={ - "precision": { - "k": 20, - "relevant_rating_threshold": 1, - "ignore_unlabeled": False - } - }, - ) - - language: JavaScript - code: |- - const response = await client.rankEval({ - index: "my-index-000001", - requests: [ - { - id: "JFK query", - request: { - query: { - match_all: {}, - }, - }, - ratings: [], - }, - ], - metric: { - precision: { - k: 20, - relevant_rating_threshold: 1, - ignore_unlabeled: false, - }, - }, - }); - - language: Ruby - code: |- - response = client.rank_eval( - index: "my-index-000001", - body: { - "requests": [ - { - "id": "JFK query", - "request": { - "query": { - "match_all": {} - } - }, - "ratings": [] - } - ], - "metric": { - "precision": { - "k": 20, - "relevant_rating_threshold": 1, - "ignore_unlabeled": false - } - } - } - ) - - language: PHP - code: |- - $resp = $client->rankEval([ - "index" => "my-index-000001", - "body" => [ - "requests" => array( - [ - "id" => "JFK query", - "request" => [ - "query" => [ - "match_all" => new ArrayObject([]), - ], - ], - "ratings" => array( - ), - ], - ), - "metric" => [ - "precision" => [ - "k" => 20, - "relevant_rating_threshold" => 1, - "ignore_unlabeled" => false, - ], - ], - ], - ]); - - language: curl - code: - "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d - '{\"requests\":[{\"id\":\"JFK - query\",\"request\":{\"query\":{\"match_all\":{}}},\"ratings\":[]}],\"metric\":{\"precision\":{\"k\":20,\"relevant_rating_thr\ - eshold\":1,\"ignore_unlabeled\":false}}}' \"$ELASTICSEARCH_URL/my-index-000001/_rank_eval\"" - - language: Java - code: | - client.rankEval(r -> r - .index("my-index-000001") - .metric(m -> m - .precision(p -> p - .ignoreUnlabeled(false) - .relevantRatingThreshold(1) - .k(20) - ) - ) - .requests(re -> re - .id("JFK query") - .request(req -> req - .query(q -> q - .matchAll(m -> m) - ) - ) - ) - ); diff --git a/specification/_global/reindex/ReindexRequest.ts b/specification/_global/reindex/ReindexRequest.ts index af7c37ea7c..228e152168 100644 --- a/specification/_global/reindex/ReindexRequest.ts +++ b/specification/_global/reindex/ReindexRequest.ts @@ -19,7 +19,7 @@ import { RequestBase } from '@_types/Base' import { Conflicts, Slices, WaitForActiveShards } from '@_types/common' -import { float, long } from '@_types/Numeric' +import { float, integer, long } from '@_types/Numeric' import { Script } from '@_types/Scripting' import { Duration } from '@_types/Time' import { Destination, Source } from './types' @@ -114,6 +114,14 @@ export interface Request extends RequestBase { * @ext_doc_id slice-scroll */ slices?: Slices + /** + * The maximum number of documents to reindex. + * By default, all documents are reindexed. + * If it is a value less then or equal to `scroll_size`, a scroll will not be used to retrieve the results for the operation. + * + * If `conflicts` is set to `proceed`, the reindex operation could attempt to reindex more documents from the source than `max_docs` until it has successfully indexed `max_docs` documents into the target or it has gone through every document in the source query. + */ + max_docs?: integer /** * The period each indexing waits for automatic index creation, dynamic mapping updates, and waiting for active shards. * By default, Elasticsearch waits for at least one minute before failing. diff --git a/specification/_global/reindex/examples/request/ReindexRequestExample1.yaml b/specification/_global/reindex/examples/request/ReindexRequestExample1.yaml index bc006d2fa5..4456124cae 100644 --- a/specification/_global/reindex/examples/request/ReindexRequestExample1.yaml +++ b/specification/_global/reindex/examples/request/ReindexRequestExample1.yaml @@ -13,72 +13,3 @@ value: |- "index": "my-new-index-000002" } } -alternatives: - - language: Python - code: |- - resp = client.reindex( - source={ - "index": [ - "my-index-000001", - "my-index-000002" - ] - }, - dest={ - "index": "my-new-index-000002" - }, - ) - - language: JavaScript - code: |- - const response = await client.reindex({ - source: { - index: ["my-index-000001", "my-index-000002"], - }, - dest: { - index: "my-new-index-000002", - }, - }); - - language: Ruby - code: |- - response = client.reindex( - body: { - "source": { - "index": [ - "my-index-000001", - "my-index-000002" - ] - }, - "dest": { - "index": "my-new-index-000002" - } - } - ) - - language: PHP - code: |- - $resp = $client->reindex([ - "body" => [ - "source" => [ - "index" => array( - "my-index-000001", - "my-index-000002", - ), - ], - "dest" => [ - "index" => "my-new-index-000002", - ], - ], - ]); - - language: curl - code: - 'curl -X POST -H "Authorization: ApiKey $ELASTIC_API_KEY" -H "Content-Type: application/json" -d - ''{"source":{"index":["my-index-000001","my-index-000002"]},"dest":{"index":"my-new-index-000002"}}'' - "$ELASTICSEARCH_URL/_reindex"' - - language: Java - code: | - client.reindex(r -> r - .dest(d -> d - .index("my-new-index-000002") - ) - .source(s -> s - .index(List.of("my-index-000001","my-index-000002")) - ) - ); diff --git a/specification/_global/reindex/examples/request/ReindexRequestExample10.yaml b/specification/_global/reindex/examples/request/ReindexRequestExample10.yaml new file mode 100644 index 0000000000..f2e274f0d6 --- /dev/null +++ b/specification/_global/reindex/examples/request/ReindexRequestExample10.yaml @@ -0,0 +1,30 @@ +summary: Reindex with Painless +method_request: POST _reindex +description: > + You can use Painless to reindex daily indices to apply a new template to the existing documents. The script extracts the date from + the index name and creates a new index with `-1` appended. For example, all data from `metricbeat-2016.05.31` will be reindexed + into `metricbeat-2016.05.31-1`. +# type: request +value: "{ + + \ \"source\": { + + \ \"index\": \"metricbeat-*\" + + \ }, + + \ \"dest\": { + + \ \"index\": \"metricbeat\" + + \ }, + + \ \"script\": { + + \ \"lang\": \"painless\", + + \ \"source\": \"ctx._index = 'metricbeat-' + (ctx._index.substring('metricbeat-'.length(), ctx._index.length())) + '-1'\" + + \ } + + }" diff --git a/specification/_global/reindex/examples/request/ReindexRequestExample11.yaml b/specification/_global/reindex/examples/request/ReindexRequestExample11.yaml new file mode 100644 index 0000000000..d08ec8df85 --- /dev/null +++ b/specification/_global/reindex/examples/request/ReindexRequestExample11.yaml @@ -0,0 +1,35 @@ +summary: Reindex a random subset +method_request: POST _reindex +description: > + Run `POST _reindex` to extract a random subset of the source for testing. You might need to adjust the `min_score` value depending + on the relative amount of data extracted from source. +# type: request +value: "{ + + \ \"max_docs\": 10, + + \ \"source\": { + + \ \"index\": \"my-index-000001\", + + \ \"query\": { + + \ \"function_score\" : { + + \ \"random_score\" : {}, + + \ \"min_score\" : 0.9 + + \ } + + \ } + + \ }, + + \ \"dest\": { + + \ \"index\": \"my-new-index-000001\" + + \ } + + }" diff --git a/specification/_global/reindex/examples/request/ReindexRequestExample12.yaml b/specification/_global/reindex/examples/request/ReindexRequestExample12.yaml new file mode 100644 index 0000000000..fd38422ab8 --- /dev/null +++ b/specification/_global/reindex/examples/request/ReindexRequestExample12.yaml @@ -0,0 +1,30 @@ +summary: Reindex modified documents +method_request: POST _reindex +description: > + Run `POST _reindex` to modify documents during reindexing. This example bumps the version of the source document. +# type: request +value: "{ + + \ \"source\": { + + \ \"index\": \"my-index-000001\" + + \ }, + + \ \"dest\": { + + \ \"index\": \"my-new-index-000001\", + + \ \"version_type\": \"external\" + + \ }, + + \ \"script\": { + + \ \"source\": \"if (ctx._source.foo == 'bar') {ctx._version++; ctx._source.remove('foo')}\", + + \ \"lang\": \"painless\" + + \ } + + }" diff --git a/specification/_global/reindex/examples/request/ReindexRequestExample13.yaml b/specification/_global/reindex/examples/request/ReindexRequestExample13.yaml new file mode 100644 index 0000000000..68eb3d7d9d --- /dev/null +++ b/specification/_global/reindex/examples/request/ReindexRequestExample13.yaml @@ -0,0 +1,40 @@ +summary: Reindex from remote on Elastic Cloud +method_request: POST _reindex +description: > + When using Elastic Cloud, you can run `POST _reindex` and authenticate against a remote cluster with an API key. +# type: request +value: "{ + + \ \"source\": { + + \ \"remote\": { + + \ \"host\": \"http://otherhost:9200\", + + \ \"username\": \"user\", + + \ \"password\": \"pass\" + + \ }, + + \ \"index\": \"my-index-000001\", + + \ \"query\": { + + \ \"match\": { + + \ \"test\": \"data\" + + \ } + + \ } + + \ }, + + \ \"dest\": { + + \ \"index\": \"my-new-index-000001\" + + \ } + + }" diff --git a/specification/_global/reindex/examples/request/ReindexRequestExample2.yaml b/specification/_global/reindex/examples/request/ReindexRequestExample2.yaml new file mode 100644 index 0000000000..8cdfdf17ca --- /dev/null +++ b/specification/_global/reindex/examples/request/ReindexRequestExample2.yaml @@ -0,0 +1,18 @@ +summary: Manual slicing +method_request: POST _reindex +description: > + Run `POST _reindex` to slice a reindex request manually. Provide a slice ID and total number of slices to each request. +# type: request +value: |- + { + "source": { + "index": "my-index-000001", + "slice": { + "id": 0, + "max": 2 + } + }, + "dest": { + "index": "my-new-index-000001" + } + } diff --git a/specification/_global/reindex/examples/request/ReindexRequestExample3.yaml b/specification/_global/reindex/examples/request/ReindexRequestExample3.yaml new file mode 100644 index 0000000000..9a2efee58c --- /dev/null +++ b/specification/_global/reindex/examples/request/ReindexRequestExample3.yaml @@ -0,0 +1,21 @@ +summary: Automatic slicing +method_request: POST _reindex?slices=5&refresh +description: > + Run `POST _reindex?slices=5&refresh` to automatically parallelize using sliced scroll to slice on `_id`. The `slices` parameter + specifies the number of slices to use. +# type: request +value: "{ + + \ \"source\": { + + \ \"index\": \"my-index-000001\" + + \ }, + + \ \"dest\": { + + \ \"index\": \"my-new-index-000001\" + + \ } + + }" diff --git a/specification/_global/reindex/examples/request/ReindexRequestExample4.yaml b/specification/_global/reindex/examples/request/ReindexRequestExample4.yaml new file mode 100644 index 0000000000..352a408fcc --- /dev/null +++ b/specification/_global/reindex/examples/request/ReindexRequestExample4.yaml @@ -0,0 +1,34 @@ +summary: Routing +method_request: POST _reindex +description: > + By default if reindex sees a document with routing then the routing is preserved unless it's changed by the script. You can set + `routing` on the `dest` request to change this behavior. In this example, run `POST _reindex` to copy all documents from the + `source` with the company name `cat` into the `dest` with routing set to `cat`. +# type: request +value: "{ + + \ \"source\": { + + \ \"index\": \"source\", + + \ \"query\": { + + \ \"match\": { + + \ \"company\": \"cat\" + + \ } + + \ } + + \ }, + + \ \"dest\": { + + \ \"index\": \"dest\", + + \ \"routing\": \"=cat\" + + \ } + + }" diff --git a/specification/_global/reindex/examples/request/ReindexRequestExample5.yaml b/specification/_global/reindex/examples/request/ReindexRequestExample5.yaml new file mode 100644 index 0000000000..e9771c1851 --- /dev/null +++ b/specification/_global/reindex/examples/request/ReindexRequestExample5.yaml @@ -0,0 +1,21 @@ +summary: Ingest pipelines +method_request: POST _reindex +description: Run `POST _reindex` and use the ingest pipelines feature. +# type: request +value: "{ + + \ \"source\": { + + \ \"index\": \"source\" + + \ }, + + \ \"dest\": { + + \ \"index\": \"dest\", + + \ \"pipeline\": \"some_ingest_pipeline\" + + \ } + + }" diff --git a/specification/_global/reindex/examples/request/ReindexRequestExample6.yaml b/specification/_global/reindex/examples/request/ReindexRequestExample6.yaml new file mode 100644 index 0000000000..04ec93ae90 --- /dev/null +++ b/specification/_global/reindex/examples/request/ReindexRequestExample6.yaml @@ -0,0 +1,31 @@ +summary: Reindex with a query +method_request: POST _reindex +description: > + Run `POST _reindex` and add a query to the `source` to limit the documents to reindex. For example, this request copies documents + into `my-new-index-000001` only if they have a `user.id` of `kimchy`. +# type: request +value: "{ + + \ \"source\": { + + \ \"index\": \"my-index-000001\", + + \ \"query\": { + + \ \"term\": { + + \ \"user.id\": \"kimchy\" + + \ } + + \ } + + \ }, + + \ \"dest\": { + + \ \"index\": \"my-new-index-000001\" + + \ } + + }" diff --git a/specification/_global/reindex/examples/request/ReindexRequestExample7.yaml b/specification/_global/reindex/examples/request/ReindexRequestExample7.yaml new file mode 100644 index 0000000000..f0e0bb4112 --- /dev/null +++ b/specification/_global/reindex/examples/request/ReindexRequestExample7.yaml @@ -0,0 +1,23 @@ +summary: Reindex with max_docs +method_request: POST _reindex +description: > + You can limit the number of processed documents by setting `max_docs`. For example, run `POST _reindex` to copy a single document + from `my-index-000001` to `my-new-index-000001`. +# type: request +value: "{ + + \ \"max_docs\": 1, + + \ \"source\": { + + \ \"index\": \"my-index-000001\" + + \ }, + + \ \"dest\": { + + \ \"index\": \"my-new-index-000001\" + + \ } + + }" diff --git a/specification/_global/reindex/examples/request/ReindexRequestExample8.yaml b/specification/_global/reindex/examples/request/ReindexRequestExample8.yaml new file mode 100644 index 0000000000..5f0f344273 --- /dev/null +++ b/specification/_global/reindex/examples/request/ReindexRequestExample8.yaml @@ -0,0 +1,23 @@ +summary: Reindex selected fields +method_request: POST _reindex +description: > + You can use source filtering to reindex a subset of the fields in the original documents. For example, run `POST _reindex` the + reindex only the `user.id` and `_doc` fields of each document. +# type: request +value: "{ + + \ \"source\": { + + \ \"index\": \"my-index-000001\", + + \ \"_source\": [\"user.id\", \"_doc\"] + + \ }, + + \ \"dest\": { + + \ \"index\": \"my-new-index-000001\" + + \ } + + }" diff --git a/specification/_global/reindex/examples/request/ReindexRequestExample9.yaml b/specification/_global/reindex/examples/request/ReindexRequestExample9.yaml new file mode 100644 index 0000000000..c291005070 --- /dev/null +++ b/specification/_global/reindex/examples/request/ReindexRequestExample9.yaml @@ -0,0 +1,27 @@ +summary: Reindex new field names +method_request: POST _reindex +description: > + A reindex operation can build a copy of an index with renamed fields. If your index has documents with `text` and `flag` fields, + you can change the latter field name to `tag` during the reindex. +# type: request +value: "{ + + \ \"source\": { + + \ \"index\": \"my-index-000001\" + + \ }, + + \ \"dest\": { + + \ \"index\": \"my-new-index-000001\" + + \ }, + + \ \"script\": { + + \ \"source\": \"ctx._source.tag = ctx._source.remove(\\\"flag\\\")\" + + \ } + + }" diff --git a/specification/_global/reindex_rethrottle/examples/request/ReindexRethrottleRequestExample1.yaml b/specification/_global/reindex_rethrottle/examples/request/ReindexRethrottleRequestExample1.yaml index a96d2256a6..c4361e9be7 100644 --- a/specification/_global/reindex_rethrottle/examples/request/ReindexRethrottleRequestExample1.yaml +++ b/specification/_global/reindex_rethrottle/examples/request/ReindexRethrottleRequestExample1.yaml @@ -1,35 +1 @@ method_request: POST _reindex/r1A2WoRbTwKZ516z6NEs5A:36619/_rethrottle?requests_per_second=-1 -alternatives: - - language: Python - code: |- - resp = client.reindex_rethrottle( - task_id="r1A2WoRbTwKZ516z6NEs5A:36619", - requests_per_second="-1", - ) - - language: JavaScript - code: |- - const response = await client.reindexRethrottle({ - task_id: "r1A2WoRbTwKZ516z6NEs5A:36619", - requests_per_second: "-1", - }); - - language: Ruby - code: |- - response = client.reindex_rethrottle( - task_id: "r1A2WoRbTwKZ516z6NEs5A:36619", - requests_per_second: "-1" - ) - - language: PHP - code: |- - $resp = $client->reindexRethrottle([ - "task_id" => "r1A2WoRbTwKZ516z6NEs5A:36619", - "requests_per_second" => "-1", - ]); - - language: curl - code: 'curl -X POST -H "Authorization: ApiKey $ELASTIC_API_KEY" - "$ELASTICSEARCH_URL/_reindex/r1A2WoRbTwKZ516z6NEs5A:36619/_rethrottle?requests_per_second=-1"' - - language: Java - code: | - client.reindexRethrottle(r -> r - .requestsPerSecond(-1.0F) - .taskId("r1A2WoRbTwKZ516z6NEs5A:36619") - ); diff --git a/specification/_global/render_search_template/examples/request/RenderSearchTemplateRequestExample1.yaml b/specification/_global/render_search_template/examples/request/RenderSearchTemplateRequestExample1.yaml index 2bc4fc4563..7c3e4bee47 100644 --- a/specification/_global/render_search_template/examples/request/RenderSearchTemplateRequestExample1.yaml +++ b/specification/_global/render_search_template/examples/request/RenderSearchTemplateRequestExample1.yaml @@ -11,59 +11,3 @@ value: |- "size": 10 } } -alternatives: - - language: Python - code: |- - resp = client.render_search_template( - id="my-search-template", - params={ - "query_string": "hello world", - "from": 20, - "size": 10 - }, - ) - - language: JavaScript - code: |- - const response = await client.renderSearchTemplate({ - id: "my-search-template", - params: { - query_string: "hello world", - from: 20, - size: 10, - }, - }); - - language: Ruby - code: |- - response = client.render_search_template( - body: { - "id": "my-search-template", - "params": { - "query_string": "hello world", - "from": 20, - "size": 10 - } - } - ) - - language: PHP - code: |- - $resp = $client->renderSearchTemplate([ - "body" => [ - "id" => "my-search-template", - "params" => [ - "query_string" => "hello world", - "from" => 20, - "size" => 10, - ], - ], - ]); - - language: curl - code: - 'curl -X POST -H "Authorization: ApiKey $ELASTIC_API_KEY" -H "Content-Type: application/json" -d - ''{"id":"my-search-template","params":{"query_string":"hello world","from":20,"size":10}}'' - "$ELASTICSEARCH_URL/_render/template"' - - language: Java - code: > - client.renderSearchTemplate(r -> r - .id("my-search-template") - .params(Map.of("size", JsonData.fromJson("10"),"from", JsonData.fromJson("20"),"query_string", JsonData.fromJson("\"hello world\""))) - ); diff --git a/specification/_global/scripts_painless_execute/examples/request/ExecutePainlessScriptRequestExample1.yaml b/specification/_global/scripts_painless_execute/examples/request/ExecutePainlessScriptRequestExample1.yaml index e7bf179e06..858e6e8d68 100644 --- a/specification/_global/scripts_painless_execute/examples/request/ExecutePainlessScriptRequestExample1.yaml +++ b/specification/_global/scripts_painless_execute/examples/request/ExecutePainlessScriptRequestExample1.yaml @@ -15,67 +15,3 @@ value: |- } } } -alternatives: - - language: Python - code: |- - resp = client.scripts_painless_execute( - script={ - "source": "params.count / params.total", - "params": { - "count": 100, - "total": 1000 - } - }, - ) - - language: JavaScript - code: |- - const response = await client.scriptsPainlessExecute({ - script: { - source: "params.count / params.total", - params: { - count: 100, - total: 1000, - }, - }, - }); - - language: Ruby - code: |- - response = client.scripts_painless_execute( - body: { - "script": { - "source": "params.count / params.total", - "params": { - "count": 100, - "total": 1000 - } - } - } - ) - - language: PHP - code: |- - $resp = $client->scriptsPainlessExecute([ - "body" => [ - "script" => [ - "source" => "params.count / params.total", - "params" => [ - "count" => 100, - "total" => 1000, - ], - ], - ], - ]); - - language: curl - code: - 'curl -X POST -H "Authorization: ApiKey $ELASTIC_API_KEY" -H "Content-Type: application/json" -d - ''{"script":{"source":"params.count / params.total","params":{"count":100,"total":1000}}}'' - "$ELASTICSEARCH_URL/_scripts/painless/_execute"' - - language: Java - code: | - client.scriptsPainlessExecute(s -> s - .script(sc -> sc - .source(so -> so - .scriptString("params.count / params.total") - ) - .params(Map.of("total", JsonData.fromJson("1000"),"count", JsonData.fromJson("100"))) - ) - ); diff --git a/specification/_global/scripts_painless_execute/examples/request/ExecutePainlessScriptRequestExample2.yaml b/specification/_global/scripts_painless_execute/examples/request/ExecutePainlessScriptRequestExample2.yaml index c4f1b12dca..305555b86a 100644 --- a/specification/_global/scripts_painless_execute/examples/request/ExecutePainlessScriptRequestExample2.yaml +++ b/specification/_global/scripts_painless_execute/examples/request/ExecutePainlessScriptRequestExample2.yaml @@ -21,97 +21,3 @@ value: |- } } } -alternatives: - - language: Python - code: |- - resp = client.scripts_painless_execute( - script={ - "source": "doc['field'].value.length() <= params.max_length", - "params": { - "max_length": 4 - } - }, - context="filter", - context_setup={ - "index": "my-index-000001", - "document": { - "field": "four" - } - }, - ) - - language: JavaScript - code: |- - const response = await client.scriptsPainlessExecute({ - script: { - source: "doc['field'].value.length() <= params.max_length", - params: { - max_length: 4, - }, - }, - context: "filter", - context_setup: { - index: "my-index-000001", - document: { - field: "four", - }, - }, - }); - - language: Ruby - code: |- - response = client.scripts_painless_execute( - body: { - "script": { - "source": "doc['field'].value.length() <= params.max_length", - "params": { - "max_length": 4 - } - }, - "context": "filter", - "context_setup": { - "index": "my-index-000001", - "document": { - "field": "four" - } - } - } - ) - - language: PHP - code: |- - $resp = $client->scriptsPainlessExecute([ - "body" => [ - "script" => [ - "source" => "doc['field'].value.length() <= params.max_length", - "params" => [ - "max_length" => 4, - ], - ], - "context" => "filter", - "context_setup" => [ - "index" => "my-index-000001", - "document" => [ - "field" => "four", - ], - ], - ], - ]); - - language: curl - code: - "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d - '{\"script\":{\"source\":\"doc['\"'\"'field'\"'\"'].value.length() <= - params.max_length\",\"params\":{\"max_length\":4}},\"context\":\"filter\",\"context_setup\":{\"index\":\"my-index-000001\",\"\ - document\":{\"field\":\"four\"}}}' \"$ELASTICSEARCH_URL/_scripts/painless/_execute\"" - - language: Java - code: | - client.scriptsPainlessExecute(s -> s - .context(PainlessContext.Filter) - .contextSetup(c -> c - .document(JsonData.fromJson("{\"field\":\"four\"}")) - .index("my-index-000001") - ) - .script(sc -> sc - .source(so -> so - .scriptString("doc['field'].value.length() <= params.max_length") - ) - .params("max_length", JsonData.fromJson("4")) - ) - ); diff --git a/specification/_global/scripts_painless_execute/examples/request/ExecutePainlessScriptRequestExample3.yaml b/specification/_global/scripts_painless_execute/examples/request/ExecutePainlessScriptRequestExample3.yaml index 1b1b434a86..0d588427df 100644 --- a/specification/_global/scripts_painless_execute/examples/request/ExecutePainlessScriptRequestExample3.yaml +++ b/specification/_global/scripts_painless_execute/examples/request/ExecutePainlessScriptRequestExample3.yaml @@ -20,97 +20,3 @@ value: |- } } } -alternatives: - - language: Python - code: |- - resp = client.scripts_painless_execute( - script={ - "source": "doc['rank'].value / params.max_rank", - "params": { - "max_rank": 5 - } - }, - context="score", - context_setup={ - "index": "my-index-000001", - "document": { - "rank": 4 - } - }, - ) - - language: JavaScript - code: |- - const response = await client.scriptsPainlessExecute({ - script: { - source: "doc['rank'].value / params.max_rank", - params: { - max_rank: 5, - }, - }, - context: "score", - context_setup: { - index: "my-index-000001", - document: { - rank: 4, - }, - }, - }); - - language: Ruby - code: |- - response = client.scripts_painless_execute( - body: { - "script": { - "source": "doc['rank'].value / params.max_rank", - "params": { - "max_rank": 5 - } - }, - "context": "score", - "context_setup": { - "index": "my-index-000001", - "document": { - "rank": 4 - } - } - } - ) - - language: PHP - code: |- - $resp = $client->scriptsPainlessExecute([ - "body" => [ - "script" => [ - "source" => "doc['rank'].value / params.max_rank", - "params" => [ - "max_rank" => 5, - ], - ], - "context" => "score", - "context_setup" => [ - "index" => "my-index-000001", - "document" => [ - "rank" => 4, - ], - ], - ], - ]); - - language: curl - code: - "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d - '{\"script\":{\"source\":\"doc['\"'\"'rank'\"'\"'].value / - params.max_rank\",\"params\":{\"max_rank\":5}},\"context\":\"score\",\"context_setup\":{\"index\":\"my-index-000001\",\"docum\ - ent\":{\"rank\":4}}}' \"$ELASTICSEARCH_URL/_scripts/painless/_execute\"" - - language: Java - code: | - client.scriptsPainlessExecute(s -> s - .context(PainlessContext.Score) - .contextSetup(c -> c - .document(JsonData.fromJson("{\"rank\":4}")) - .index("my-index-000001") - ) - .script(sc -> sc - .source(so -> so - .scriptString("doc['rank'].value / params.max_rank") - ) - .params("max_rank", JsonData.fromJson("5")) - ) - ); diff --git a/specification/_global/scroll/examples/request/ScrollRequestExample1.yaml b/specification/_global/scroll/examples/request/ScrollRequestExample1.yaml index 81f2a228bc..04f3ff98b3 100644 --- a/specification/_global/scroll/examples/request/ScrollRequestExample1.yaml +++ b/specification/_global/scroll/examples/request/ScrollRequestExample1.yaml @@ -6,37 +6,3 @@ value: |- { "scroll_id" : "DXF1ZXJ5QW5kRmV0Y2gBAAAAAAAAAD4WYm9laVYtZndUQlNsdDcwakFMNjU1QQ==" } -alternatives: - - language: Python - code: |- - resp = client.scroll( - scroll_id="DXF1ZXJ5QW5kRmV0Y2gBAAAAAAAAAD4WYm9laVYtZndUQlNsdDcwakFMNjU1QQ==", - ) - - language: JavaScript - code: |- - const response = await client.scroll({ - scroll_id: "DXF1ZXJ5QW5kRmV0Y2gBAAAAAAAAAD4WYm9laVYtZndUQlNsdDcwakFMNjU1QQ==", - }); - - language: Ruby - code: |- - response = client.scroll( - body: { - "scroll_id": "DXF1ZXJ5QW5kRmV0Y2gBAAAAAAAAAD4WYm9laVYtZndUQlNsdDcwakFMNjU1QQ==" - } - ) - - language: PHP - code: |- - $resp = $client->scroll([ - "body" => [ - "scroll_id" => "DXF1ZXJ5QW5kRmV0Y2gBAAAAAAAAAD4WYm9laVYtZndUQlNsdDcwakFMNjU1QQ==", - ], - ]); - - language: curl - code: - 'curl -X GET -H "Authorization: ApiKey $ELASTIC_API_KEY" -H "Content-Type: application/json" -d - ''{"scroll_id":"DXF1ZXJ5QW5kRmV0Y2gBAAAAAAAAAD4WYm9laVYtZndUQlNsdDcwakFMNjU1QQ=="}'' "$ELASTICSEARCH_URL/_search/scroll"' - - language: Java - code: | - client.scroll(s -> s - .scrollId("DXF1ZXJ5QW5kRmV0Y2gBAAAAAAAAAD4WYm9laVYtZndUQlNsdDcwakFMNjU1QQ==") - ); diff --git a/specification/_global/search/examples/request/SearchRequestExample1.yaml b/specification/_global/search/examples/request/SearchRequestExample1.yaml index 5558342c91..f3867f117d 100644 --- a/specification/_global/search/examples/request/SearchRequestExample1.yaml +++ b/specification/_global/search/examples/request/SearchRequestExample1.yaml @@ -11,73 +11,3 @@ value: |- } } } -alternatives: - - language: Python - code: |- - resp = client.search( - index="my-index-000001", - from="40", - size="20", - query={ - "term": { - "user.id": "kimchy" - } - }, - ) - - language: JavaScript - code: |- - const response = await client.search({ - index: "my-index-000001", - from: 40, - size: 20, - query: { - term: { - "user.id": "kimchy", - }, - }, - }); - - language: Ruby - code: |- - response = client.search( - index: "my-index-000001", - from: "40", - size: "20", - body: { - "query": { - "term": { - "user.id": "kimchy" - } - } - } - ) - - language: PHP - code: |- - $resp = $client->search([ - "index" => "my-index-000001", - "from" => "40", - "size" => "20", - "body" => [ - "query" => [ - "term" => [ - "user.id" => "kimchy", - ], - ], - ], - ]); - - language: curl - code: - 'curl -X GET -H "Authorization: ApiKey $ELASTIC_API_KEY" -H "Content-Type: application/json" -d - ''{"query":{"term":{"user.id":"kimchy"}}}'' "$ELASTICSEARCH_URL/my-index-000001/_search?from=40&size=20"' - - language: Java - code: | - client.search(s -> s - .from(40) - .index("my-index-000001") - .query(q -> q - .term(t -> t - .field("user.id") - .value(FieldValue.of("kimchy")) - ) - ) - .size(20) - ,Void.class); diff --git a/specification/_global/search/examples/request/SearchRequestExample2.yaml b/specification/_global/search/examples/request/SearchRequestExample2.yaml index 908f395ec4..0bf1202a6c 100644 --- a/specification/_global/search/examples/request/SearchRequestExample2.yaml +++ b/specification/_global/search/examples/request/SearchRequestExample2.yaml @@ -18,87 +18,3 @@ value: |- "keep_alive": "1m" } } -alternatives: - - language: Python - code: >- - resp = client.search( - size=100, - query={ - "match": { - "title": "elasticsearch" - } - }, - pit={ - "id": "46ToAwMDaWR5BXV1aWQyKwZub2RlXzMAAAAAAAAAACoBYwADaWR4BXV1aWQxAgZub2RlXzEAAAAAAAAAAAEBYQADaWR5BXV1aWQyKgZub2RlXzIAAAAAAAAAAAwBYgACBXV1aWQyAAAFdXVpZDEAAQltYXRjaF9hbGw_gAAAAA==", - "keep_alive": "1m" - }, - ) - - language: JavaScript - code: >- - const response = await client.search({ - size: 100, - query: { - match: { - title: "elasticsearch", - }, - }, - pit: { - id: "46ToAwMDaWR5BXV1aWQyKwZub2RlXzMAAAAAAAAAACoBYwADaWR4BXV1aWQxAgZub2RlXzEAAAAAAAAAAAEBYQADaWR5BXV1aWQyKgZub2RlXzIAAAAAAAAAAAwBYgACBXV1aWQyAAAFdXVpZDEAAQltYXRjaF9hbGw_gAAAAA==", - keep_alive: "1m", - }, - }); - - language: Ruby - code: >- - response = client.search( - body: { - "size": 100, - "query": { - "match": { - "title": "elasticsearch" - } - }, - "pit": { - "id": "46ToAwMDaWR5BXV1aWQyKwZub2RlXzMAAAAAAAAAACoBYwADaWR4BXV1aWQxAgZub2RlXzEAAAAAAAAAAAEBYQADaWR5BXV1aWQyKgZub2RlXzIAAAAAAAAAAAwBYgACBXV1aWQyAAAFdXVpZDEAAQltYXRjaF9hbGw_gAAAAA==", - "keep_alive": "1m" - } - } - ) - - language: PHP - code: >- - $resp = $client->search([ - "body" => [ - "size" => 100, - "query" => [ - "match" => [ - "title" => "elasticsearch", - ], - ], - "pit" => [ - "id" => "46ToAwMDaWR5BXV1aWQyKwZub2RlXzMAAAAAAAAAACoBYwADaWR4BXV1aWQxAgZub2RlXzEAAAAAAAAAAAEBYQADaWR5BXV1aWQyKgZub2RlXzIAAAAAAAAAAAwBYgACBXV1aWQyAAAFdXVpZDEAAQltYXRjaF9hbGw_gAAAAA==", - "keep_alive" => "1m", - ], - ], - ]); - - language: curl - code: - "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d - '{\"size\":100,\"query\":{\"match\":{\"title\":\"elasticsearch\"}},\"pit\":{\"id\":\"46ToAwMDaWR5BXV1aWQyKwZub2RlXzMAAAAAAAAA\ - ACoBYwADaWR4BXV1aWQxAgZub2RlXzEAAAAAAAAAAAEBYQADaWR5BXV1aWQyKgZub2RlXzIAAAAAAAAAAAwBYgACBXV1aWQyAAAFdXVpZDEAAQltYXRjaF9hbGw_g\ - AAAAA==\",\"keep_alive\":\"1m\"}}' \"$ELASTICSEARCH_URL/_search\"" - - language: Java - code: > - client.search(s -> s - .pit(p -> p - .id("46ToAwMDaWR5BXV1aWQyKwZub2RlXzMAAAAAAAAAACoBYwADaWR4BXV1aWQxAgZub2RlXzEAAAAAAAAAAAEBYQADaWR5BXV1aWQyKgZub2RlXzIAAAAAAAAAAAwBYgACBXV1aWQyAAAFdXVpZDEAAQltYXRjaF9hbGw_gAAAAA==") - .keepAlive(k -> k - .time("1m") - ) - ) - .query(q -> q - .match(m -> m - .field("title") - .query(FieldValue.of("elasticsearch")) - ) - ) - .size(100) - ,Void.class); diff --git a/specification/_global/search/examples/request/SearchRequestExample3.yaml b/specification/_global/search/examples/request/SearchRequestExample3.yaml index ea1ad63dff..a01afc41ea 100644 --- a/specification/_global/search/examples/request/SearchRequestExample3.yaml +++ b/specification/_global/search/examples/request/SearchRequestExample3.yaml @@ -21,95 +21,3 @@ value: |- "id": "46ToAwMDaWR5BXV1aWQyKwZub2RlXzMAAAAAAAAAACoBYwADaWR4BXV1aWQxAgZub2RlXzEAAAAAAAAAAAEBYQADaWR5BXV1aWQyKgZub2RlXzIAAAAAAAAAAAwBYgACBXV1aWQyAAAFdXVpZDEAAQltYXRjaF9hbGw_gAAAAA==" } } -alternatives: - - language: Python - code: >- - resp = client.search( - slice={ - "id": 0, - "max": 2 - }, - query={ - "match": { - "message": "foo" - } - }, - pit={ - "id": "46ToAwMDaWR5BXV1aWQyKwZub2RlXzMAAAAAAAAAACoBYwADaWR4BXV1aWQxAgZub2RlXzEAAAAAAAAAAAEBYQADaWR5BXV1aWQyKgZub2RlXzIAAAAAAAAAAAwBYgACBXV1aWQyAAAFdXVpZDEAAQltYXRjaF9hbGw_gAAAAA==" - }, - ) - - language: JavaScript - code: >- - const response = await client.search({ - slice: { - id: 0, - max: 2, - }, - query: { - match: { - message: "foo", - }, - }, - pit: { - id: "46ToAwMDaWR5BXV1aWQyKwZub2RlXzMAAAAAAAAAACoBYwADaWR4BXV1aWQxAgZub2RlXzEAAAAAAAAAAAEBYQADaWR5BXV1aWQyKgZub2RlXzIAAAAAAAAAAAwBYgACBXV1aWQyAAAFdXVpZDEAAQltYXRjaF9hbGw_gAAAAA==", - }, - }); - - language: Ruby - code: >- - response = client.search( - body: { - "slice": { - "id": 0, - "max": 2 - }, - "query": { - "match": { - "message": "foo" - } - }, - "pit": { - "id": "46ToAwMDaWR5BXV1aWQyKwZub2RlXzMAAAAAAAAAACoBYwADaWR4BXV1aWQxAgZub2RlXzEAAAAAAAAAAAEBYQADaWR5BXV1aWQyKgZub2RlXzIAAAAAAAAAAAwBYgACBXV1aWQyAAAFdXVpZDEAAQltYXRjaF9hbGw_gAAAAA==" - } - } - ) - - language: PHP - code: >- - $resp = $client->search([ - "body" => [ - "slice" => [ - "id" => 0, - "max" => 2, - ], - "query" => [ - "match" => [ - "message" => "foo", - ], - ], - "pit" => [ - "id" => "46ToAwMDaWR5BXV1aWQyKwZub2RlXzMAAAAAAAAAACoBYwADaWR4BXV1aWQxAgZub2RlXzEAAAAAAAAAAAEBYQADaWR5BXV1aWQyKgZub2RlXzIAAAAAAAAAAAwBYgACBXV1aWQyAAAFdXVpZDEAAQltYXRjaF9hbGw_gAAAAA==", - ], - ], - ]); - - language: curl - code: - "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d - '{\"slice\":{\"id\":0,\"max\":2},\"query\":{\"match\":{\"message\":\"foo\"}},\"pit\":{\"id\":\"46ToAwMDaWR5BXV1aWQyKwZub2RlXz\ - MAAAAAAAAAACoBYwADaWR4BXV1aWQxAgZub2RlXzEAAAAAAAAAAAEBYQADaWR5BXV1aWQyKgZub2RlXzIAAAAAAAAAAAwBYgACBXV1aWQyAAAFdXVpZDEAAQltYXR\ - jaF9hbGw_gAAAAA==\"}}' \"$ELASTICSEARCH_URL/_search\"" - - language: Java - code: > - client.search(s -> s - .pit(p -> p - .id("46ToAwMDaWR5BXV1aWQyKwZub2RlXzMAAAAAAAAAACoBYwADaWR4BXV1aWQxAgZub2RlXzEAAAAAAAAAAAEBYQADaWR5BXV1aWQyKgZub2RlXzIAAAAAAAAAAAwBYgACBXV1aWQyAAAFdXVpZDEAAQltYXRjaF9hbGw_gAAAAA==") - ) - .query(q -> q - .match(m -> m - .field("message") - .query(FieldValue.of("foo")) - ) - ) - .slice(sl -> sl - .id("0") - .max(2) - ) - ,Void.class); diff --git a/specification/_global/search_mvt/SearchMvtRequest.ts b/specification/_global/search_mvt/SearchMvtRequest.ts index 18a07a0439..a651907389 100644 --- a/specification/_global/search_mvt/SearchMvtRequest.ts +++ b/specification/_global/search_mvt/SearchMvtRequest.ts @@ -200,6 +200,13 @@ export interface Request extends RequestBase { * @server_default 10000 */ size?: integer + /** + * The number of hits matching the query to count accurately. + * If `true`, the exact number of hits is returned at the cost of some performance. + * If `false`, the response does not include the total number of hits matching the query. + * @server_default 10000 + */ + track_total_hits?: TrackHits /** * If `true`, the hits and aggs layers will contain additional point features representing * suggested label positions for the original features. diff --git a/specification/_global/search_mvt/examples/request/SearchMvtRequestExample1.yaml b/specification/_global/search_mvt/examples/request/SearchMvtRequestExample1.yaml index 394cd80465..2a99efde62 100644 --- a/specification/_global/search_mvt/examples/request/SearchMvtRequestExample1.yaml +++ b/specification/_global/search_mvt/examples/request/SearchMvtRequestExample1.yaml @@ -35,159 +35,3 @@ value: |- } } } -alternatives: - - language: Python - code: |- - resp = client.search_mvt( - index="museums", - field="location", - zoom="13", - x="4207", - y="2692", - grid_agg="geotile", - grid_precision=2, - fields=[ - "name", - "price" - ], - query={ - "term": { - "included": True - } - }, - aggs={ - "min_price": { - "min": { - "field": "price" - } - }, - "max_price": { - "max": { - "field": "price" - } - }, - "avg_price": { - "avg": { - "field": "price" - } - } - }, - ) - - language: JavaScript - code: |- - const response = await client.searchMvt({ - index: "museums", - field: "location", - zoom: 13, - x: 4207, - y: 2692, - grid_agg: "geotile", - grid_precision: 2, - fields: ["name", "price"], - query: { - term: { - included: true, - }, - }, - aggs: { - min_price: { - min: { - field: "price", - }, - }, - max_price: { - max: { - field: "price", - }, - }, - avg_price: { - avg: { - field: "price", - }, - }, - }, - }); - - language: Ruby - code: |- - response = client.search_mvt( - index: "museums", - field: "location", - zoom: "13", - x: "4207", - y: "2692", - body: { - "grid_agg": "geotile", - "grid_precision": 2, - "fields": [ - "name", - "price" - ], - "query": { - "term": { - "included": true - } - }, - "aggs": { - "min_price": { - "min": { - "field": "price" - } - }, - "max_price": { - "max": { - "field": "price" - } - }, - "avg_price": { - "avg": { - "field": "price" - } - } - } - } - ) - - language: PHP - code: |- - $resp = $client->searchMvt([ - "index" => "museums", - "field" => "location", - "zoom" => "13", - "x" => "4207", - "y" => "2692", - "body" => [ - "grid_agg" => "geotile", - "grid_precision" => 2, - "fields" => array( - "name", - "price", - ), - "query" => [ - "term" => [ - "included" => true, - ], - ], - "aggs" => [ - "min_price" => [ - "min" => [ - "field" => "price", - ], - ], - "max_price" => [ - "max" => [ - "field" => "price", - ], - ], - "avg_price" => [ - "avg" => [ - "field" => "price", - ], - ], - ], - ], - ]); - - language: curl - code: - "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d - '{\"grid_agg\":\"geotile\",\"grid_precision\":2,\"fields\":[\"name\",\"price\"],\"query\":{\"term\":{\"included\":true}},\"ag\ - gs\":{\"min_price\":{\"min\":{\"field\":\"price\"}},\"max_price\":{\"max\":{\"field\":\"price\"}},\"avg_price\":{\"avg\":{\"f\ - ield\":\"price\"}}}}' \"$ELASTICSEARCH_URL/museums/_mvt/location/13/4207/2692\"" diff --git a/specification/_global/search_shards/examples/request/SearchShardsRequestExample1.yaml b/specification/_global/search_shards/examples/request/SearchShardsRequestExample1.yaml index 2c3ea338f1..efa6600543 100644 --- a/specification/_global/search_shards/examples/request/SearchShardsRequestExample1.yaml +++ b/specification/_global/search_shards/examples/request/SearchShardsRequestExample1.yaml @@ -1,29 +1 @@ method_request: GET /my-index-000001/_search_shards -alternatives: - - language: Python - code: |- - resp = client.search_shards( - index="my-index-000001", - ) - - language: JavaScript - code: |- - const response = await client.searchShards({ - index: "my-index-000001", - }); - - language: Ruby - code: |- - response = client.search_shards( - index: "my-index-000001" - ) - - language: PHP - code: |- - $resp = $client->searchShards([ - "index" => "my-index-000001", - ]); - - language: curl - code: 'curl -X GET -H "Authorization: ApiKey $ELASTIC_API_KEY" "$ELASTICSEARCH_URL/my-index-000001/_search_shards"' - - language: Java - code: | - client.searchShards(s -> s - .index("my-index-000001") - ); diff --git a/specification/_global/search_template/examples/request/SearchTemplateRequestExample1.yaml b/specification/_global/search_template/examples/request/SearchTemplateRequestExample1.yaml index 74894235f6..000c63b523 100644 --- a/specification/_global/search_template/examples/request/SearchTemplateRequestExample1.yaml +++ b/specification/_global/search_template/examples/request/SearchTemplateRequestExample1.yaml @@ -12,64 +12,3 @@ value: |- "size": 10 } } -alternatives: - - language: Python - code: |- - resp = client.search_template( - index="my-index", - id="my-search-template", - params={ - "query_string": "hello world", - "from": 0, - "size": 10 - }, - ) - - language: JavaScript - code: |- - const response = await client.searchTemplate({ - index: "my-index", - id: "my-search-template", - params: { - query_string: "hello world", - from: 0, - size: 10, - }, - }); - - language: Ruby - code: |- - response = client.search_template( - index: "my-index", - body: { - "id": "my-search-template", - "params": { - "query_string": "hello world", - "from": 0, - "size": 10 - } - } - ) - - language: PHP - code: |- - $resp = $client->searchTemplate([ - "index" => "my-index", - "body" => [ - "id" => "my-search-template", - "params" => [ - "query_string" => "hello world", - "from" => 0, - "size" => 10, - ], - ], - ]); - - language: curl - code: - 'curl -X GET -H "Authorization: ApiKey $ELASTIC_API_KEY" -H "Content-Type: application/json" -d - ''{"id":"my-search-template","params":{"query_string":"hello world","from":0,"size":10}}'' - "$ELASTICSEARCH_URL/my-index/_search/template"' - - language: Java - code: > - client.searchTemplate(s -> s - .id("my-search-template") - .index("my-index") - .params(Map.of("size", JsonData.fromJson("10"),"from", JsonData.fromJson("0"),"query_string", JsonData.fromJson("\"hello world\""))) - ); diff --git a/specification/_global/terms_enum/examples/request/TermsEnumRequestExample1.yaml b/specification/_global/terms_enum/examples/request/TermsEnumRequestExample1.yaml index 8172e843c4..9c854e9b29 100644 --- a/specification/_global/terms_enum/examples/request/TermsEnumRequestExample1.yaml +++ b/specification/_global/terms_enum/examples/request/TermsEnumRequestExample1.yaml @@ -7,47 +7,3 @@ value: |- "field" : "tags", "string" : "kiba" } -alternatives: - - language: Python - code: |- - resp = client.terms_enum( - index="stackoverflow", - field="tags", - string="kiba", - ) - - language: JavaScript - code: |- - const response = await client.termsEnum({ - index: "stackoverflow", - field: "tags", - string: "kiba", - }); - - language: Ruby - code: |- - response = client.terms_enum( - index: "stackoverflow", - body: { - "field": "tags", - "string": "kiba" - } - ) - - language: PHP - code: |- - $resp = $client->termsEnum([ - "index" => "stackoverflow", - "body" => [ - "field" => "tags", - "string" => "kiba", - ], - ]); - - language: curl - code: - 'curl -X POST -H "Authorization: ApiKey $ELASTIC_API_KEY" -H "Content-Type: application/json" -d - ''{"field":"tags","string":"kiba"}'' "$ELASTICSEARCH_URL/stackoverflow/_terms_enum"' - - language: Java - code: | - client.termsEnum(t -> t - .field("tags") - .index("stackoverflow") - .string("kiba") - ); diff --git a/specification/_global/termvectors/examples/request/TermVectorsRequestExample1.yaml b/specification/_global/termvectors/examples/request/TermVectorsRequestExample1.yaml index c785494fd4..e5a266c352 100644 --- a/specification/_global/termvectors/examples/request/TermVectorsRequestExample1.yaml +++ b/specification/_global/termvectors/examples/request/TermVectorsRequestExample1.yaml @@ -12,79 +12,3 @@ value: |- "term_statistics" : true, "field_statistics" : true } -alternatives: - - language: Python - code: |- - resp = client.termvectors( - index="my-index-000001", - id="1", - fields=[ - "text" - ], - offsets=True, - payloads=True, - positions=True, - term_statistics=True, - field_statistics=True, - ) - - language: JavaScript - code: |- - const response = await client.termvectors({ - index: "my-index-000001", - id: 1, - fields: ["text"], - offsets: true, - payloads: true, - positions: true, - term_statistics: true, - field_statistics: true, - }); - - language: Ruby - code: |- - response = client.termvectors( - index: "my-index-000001", - id: "1", - body: { - "fields": [ - "text" - ], - "offsets": true, - "payloads": true, - "positions": true, - "term_statistics": true, - "field_statistics": true - } - ) - - language: PHP - code: |- - $resp = $client->termvectors([ - "index" => "my-index-000001", - "id" => "1", - "body" => [ - "fields" => array( - "text", - ), - "offsets" => true, - "payloads" => true, - "positions" => true, - "term_statistics" => true, - "field_statistics" => true, - ], - ]); - - language: curl - code: - "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d - '{\"fields\":[\"text\"],\"offsets\":true,\"payloads\":true,\"positions\":true,\"term_statistics\":true,\"field_statistics\":t\ - rue}' \"$ELASTICSEARCH_URL/my-index-000001/_termvectors/1\"" - - language: Java - code: | - client.termvectors(t -> t - .fieldStatistics(true) - .fields("text") - .id("1") - .index("my-index-000001") - .offsets(true) - .payloads(true) - .positions(true) - .termStatistics(true) - ); diff --git a/specification/_global/termvectors/examples/request/TermVectorsRequestExample2.yaml b/specification/_global/termvectors/examples/request/TermVectorsRequestExample2.yaml index 8476a9163e..3132621d11 100644 --- a/specification/_global/termvectors/examples/request/TermVectorsRequestExample2.yaml +++ b/specification/_global/termvectors/examples/request/TermVectorsRequestExample2.yaml @@ -15,80 +15,3 @@ value: |- "fullname": "keyword" } } -alternatives: - - language: Python - code: |- - resp = client.termvectors( - index="my-index-000001", - doc={ - "fullname": "John Doe", - "text": "test test test" - }, - fields=[ - "fullname" - ], - per_field_analyzer={ - "fullname": "keyword" - }, - ) - - language: JavaScript - code: |- - const response = await client.termvectors({ - index: "my-index-000001", - doc: { - fullname: "John Doe", - text: "test test test", - }, - fields: ["fullname"], - per_field_analyzer: { - fullname: "keyword", - }, - }); - - language: Ruby - code: |- - response = client.termvectors( - index: "my-index-000001", - body: { - "doc": { - "fullname": "John Doe", - "text": "test test test" - }, - "fields": [ - "fullname" - ], - "per_field_analyzer": { - "fullname": "keyword" - } - } - ) - - language: PHP - code: |- - $resp = $client->termvectors([ - "index" => "my-index-000001", - "body" => [ - "doc" => [ - "fullname" => "John Doe", - "text" => "test test test", - ], - "fields" => array( - "fullname", - ), - "per_field_analyzer" => [ - "fullname" => "keyword", - ], - ], - ]); - - language: curl - code: - 'curl -X GET -H "Authorization: ApiKey $ELASTIC_API_KEY" -H "Content-Type: application/json" -d - ''{"doc":{"fullname":"John Doe","text":"test test - test"},"fields":["fullname"],"per_field_analyzer":{"fullname":"keyword"}}'' - "$ELASTICSEARCH_URL/my-index-000001/_termvectors"' - - language: Java - code: | - client.termvectors(t -> t - .doc(JsonData.fromJson("{\"fullname\":\"John Doe\",\"text\":\"test test test\"}")) - .fields("fullname") - .index("my-index-000001") - .perFieldAnalyzer("fullname", "keyword") - ); diff --git a/specification/_global/termvectors/examples/request/TermVectorsRequestExample3.yaml b/specification/_global/termvectors/examples/request/TermVectorsRequestExample3.yaml index 8361494d4c..9b21820f30 100644 --- a/specification/_global/termvectors/examples/request/TermVectorsRequestExample3.yaml +++ b/specification/_global/termvectors/examples/request/TermVectorsRequestExample3.yaml @@ -20,98 +20,3 @@ value: |- "min_doc_freq": 1 } } -alternatives: - - language: Python - code: >- - resp = client.termvectors( - index="imdb", - doc={ - "plot": "When wealthy industrialist Tony Stark is forced to build an armored suit after a life-threatening incident, he ultimately decides to use its technology to fight against evil." - }, - term_statistics=True, - field_statistics=True, - positions=False, - offsets=False, - filter={ - "max_num_terms": 3, - "min_term_freq": 1, - "min_doc_freq": 1 - }, - ) - - language: JavaScript - code: >- - const response = await client.termvectors({ - index: "imdb", - doc: { - plot: "When wealthy industrialist Tony Stark is forced to build an armored suit after a life-threatening incident, he ultimately decides to use its technology to fight against evil.", - }, - term_statistics: true, - field_statistics: true, - positions: false, - offsets: false, - filter: { - max_num_terms: 3, - min_term_freq: 1, - min_doc_freq: 1, - }, - }); - - language: Ruby - code: >- - response = client.termvectors( - index: "imdb", - body: { - "doc": { - "plot": "When wealthy industrialist Tony Stark is forced to build an armored suit after a life-threatening incident, he ultimately decides to use its technology to fight against evil." - }, - "term_statistics": true, - "field_statistics": true, - "positions": false, - "offsets": false, - "filter": { - "max_num_terms": 3, - "min_term_freq": 1, - "min_doc_freq": 1 - } - } - ) - - language: PHP - code: >- - $resp = $client->termvectors([ - "index" => "imdb", - "body" => [ - "doc" => [ - "plot" => "When wealthy industrialist Tony Stark is forced to build an armored suit after a life-threatening incident, he ultimately decides to use its technology to fight against evil.", - ], - "term_statistics" => true, - "field_statistics" => true, - "positions" => false, - "offsets" => false, - "filter" => [ - "max_num_terms" => 3, - "min_term_freq" => 1, - "min_doc_freq" => 1, - ], - ], - ]); - - language: curl - code: - "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"doc\":{\"plot\":\"When - wealthy industrialist Tony Stark is forced to build an armored suit after a life-threatening incident, he ultimately decides - to use its technology to fight against - evil.\"},\"term_statistics\":true,\"field_statistics\":true,\"positions\":false,\"offsets\":false,\"filter\":{\"max_num_terms\ - \":3,\"min_term_freq\":1,\"min_doc_freq\":1}}' \"$ELASTICSEARCH_URL/imdb/_termvectors\"" - - language: Java - code: > - client.termvectors(t -> t - .doc(JsonData.fromJson("{\"plot\":\"When wealthy industrialist Tony Stark is forced to build an armored suit after a life-threatening incident, he ultimately decides to use its technology to fight against evil.\"}")) - .fieldStatistics(true) - .filter(f -> f - .maxNumTerms(3) - .minDocFreq(1) - .minTermFreq(1) - ) - .index("imdb") - .offsets(false) - .positions(false) - .termStatistics(true) - ); diff --git a/specification/_global/termvectors/examples/request/TermVectorsRequestExample4.yaml b/specification/_global/termvectors/examples/request/TermVectorsRequestExample4.yaml index dfb1044ffd..256065d910 100644 --- a/specification/_global/termvectors/examples/request/TermVectorsRequestExample4.yaml +++ b/specification/_global/termvectors/examples/request/TermVectorsRequestExample4.yaml @@ -13,77 +13,3 @@ value: |- "term_statistics" : true, "field_statistics" : true } -alternatives: - - language: Python - code: |- - resp = client.termvectors( - index="my-index-000001", - id="1", - fields=[ - "text", - "some_field_without_term_vectors" - ], - offsets=True, - positions=True, - term_statistics=True, - field_statistics=True, - ) - - language: JavaScript - code: |- - const response = await client.termvectors({ - index: "my-index-000001", - id: 1, - fields: ["text", "some_field_without_term_vectors"], - offsets: true, - positions: true, - term_statistics: true, - field_statistics: true, - }); - - language: Ruby - code: |- - response = client.termvectors( - index: "my-index-000001", - id: "1", - body: { - "fields": [ - "text", - "some_field_without_term_vectors" - ], - "offsets": true, - "positions": true, - "term_statistics": true, - "field_statistics": true - } - ) - - language: PHP - code: |- - $resp = $client->termvectors([ - "index" => "my-index-000001", - "id" => "1", - "body" => [ - "fields" => array( - "text", - "some_field_without_term_vectors", - ), - "offsets" => true, - "positions" => true, - "term_statistics" => true, - "field_statistics" => true, - ], - ]); - - language: curl - code: - "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d - '{\"fields\":[\"text\",\"some_field_without_term_vectors\"],\"offsets\":true,\"positions\":true,\"term_statistics\":true,\"fi\ - eld_statistics\":true}' \"$ELASTICSEARCH_URL/my-index-000001/_termvectors/1\"" - - language: Java - code: | - client.termvectors(t -> t - .fieldStatistics(true) - .fields(List.of("text","some_field_without_term_vectors")) - .id("1") - .index("my-index-000001") - .offsets(true) - .positions(true) - .termStatistics(true) - ); diff --git a/specification/_global/termvectors/examples/request/TermVectorsRequestExample5.yaml b/specification/_global/termvectors/examples/request/TermVectorsRequestExample5.yaml index 6d23fc8c0e..24017d91d4 100644 --- a/specification/_global/termvectors/examples/request/TermVectorsRequestExample5.yaml +++ b/specification/_global/termvectors/examples/request/TermVectorsRequestExample5.yaml @@ -12,54 +12,3 @@ value: |- "text" : "test test test" } } -alternatives: - - language: Python - code: |- - resp = client.termvectors( - index="my-index-000001", - doc={ - "fullname": "John Doe", - "text": "test test test" - }, - ) - - language: JavaScript - code: |- - const response = await client.termvectors({ - index: "my-index-000001", - doc: { - fullname: "John Doe", - text: "test test test", - }, - }); - - language: Ruby - code: |- - response = client.termvectors( - index: "my-index-000001", - body: { - "doc": { - "fullname": "John Doe", - "text": "test test test" - } - } - ) - - language: PHP - code: |- - $resp = $client->termvectors([ - "index" => "my-index-000001", - "body" => [ - "doc" => [ - "fullname" => "John Doe", - "text" => "test test test", - ], - ], - ]); - - language: curl - code: - 'curl -X GET -H "Authorization: ApiKey $ELASTIC_API_KEY" -H "Content-Type: application/json" -d - ''{"doc":{"fullname":"John Doe","text":"test test test"}}'' "$ELASTICSEARCH_URL/my-index-000001/_termvectors"' - - language: Java - code: | - client.termvectors(t -> t - .doc(JsonData.fromJson("{\"fullname\":\"John Doe\",\"text\":\"test test test\"}")) - .index("my-index-000001") - ); diff --git a/specification/_global/update/UpdateRequest.ts b/specification/_global/update/UpdateRequest.ts index 1b961b4362..09ae86859e 100644 --- a/specification/_global/update/UpdateRequest.ts +++ b/specification/_global/update/UpdateRequest.ts @@ -55,11 +55,13 @@ import { * * The `_source` field must be enabled to use this API. * In addition to `_source`, you can access the following variables through the `ctx` map: `_index`, `_type`, `_id`, `_version`, `_routing`, and `_now` (the current timestamp). + * For usage examples such as partial updates, upserts, and scripted updates, see the External documentation. * @rest_spec_name update * @availability stack stability=stable * @availability serverless stability=stable visibility=public * @index_privileges write * @doc_tag document + * @ext_doc_id update-document * @doc_id docs-update */ export interface Request extends RequestBase { diff --git a/specification/_global/update/examples/request/UpdateRequestExample1.yaml b/specification/_global/update/examples/request/UpdateRequestExample1.yaml index eca74d0882..a4f76b600f 100644 --- a/specification/_global/update/examples/request/UpdateRequestExample1.yaml +++ b/specification/_global/update/examples/request/UpdateRequestExample1.yaml @@ -19,78 +19,3 @@ value: "{ \ } }" -alternatives: - - language: Python - code: |- - resp = client.update( - index="test", - id="1", - script={ - "source": "ctx._source.counter += params.count", - "lang": "painless", - "params": { - "count": 4 - } - }, - ) - - language: JavaScript - code: |- - const response = await client.update({ - index: "test", - id: 1, - script: { - source: "ctx._source.counter += params.count", - lang: "painless", - params: { - count: 4, - }, - }, - }); - - language: Ruby - code: |- - response = client.update( - index: "test", - id: "1", - body: { - "script": { - "source": "ctx._source.counter += params.count", - "lang": "painless", - "params": { - "count": 4 - } - } - } - ) - - language: PHP - code: |- - $resp = $client->update([ - "index" => "test", - "id" => "1", - "body" => [ - "script" => [ - "source" => "ctx._source.counter += params.count", - "lang" => "painless", - "params" => [ - "count" => 4, - ], - ], - ], - ]); - - language: curl - code: - 'curl -X POST -H "Authorization: ApiKey $ELASTIC_API_KEY" -H "Content-Type: application/json" -d - ''{"script":{"source":"ctx._source.counter += params.count","lang":"painless","params":{"count":4}}}'' - "$ELASTICSEARCH_URL/test/_update/1"' - - language: Java - code: | - client.update(u -> u - .id("1") - .index("test") - .script(s -> s - .source(so -> so - .scriptString("ctx._source.counter += params.count") - ) - .params("count", JsonData.fromJson("4")) - .lang("painless") - ) - ,Void.class); diff --git a/specification/_global/update/examples/request/UpdateRequestExample10.yaml b/specification/_global/update/examples/request/UpdateRequestExample10.yaml index 2a93bede15..705cfdc982 100644 --- a/specification/_global/update/examples/request/UpdateRequestExample10.yaml +++ b/specification/_global/update/examples/request/UpdateRequestExample10.yaml @@ -35,91 +35,3 @@ value: "{ \ \"upsert\": {} }" -alternatives: - - language: Python - code: >- - resp = client.update( - index="test", - id="1", - scripted_upsert=True, - script={ - "source": "\n if ( ctx.op == 'create' ) {\n ctx._source.counter = params.count\n } else {\n ctx._source.counter += params.count\n }\n ", - "params": { - "count": 4 - } - }, - upsert={}, - ) - - language: JavaScript - code: >- - const response = await client.update({ - index: "test", - id: 1, - scripted_upsert: true, - script: { - source: - "\n if ( ctx.op == 'create' ) {\n ctx._source.counter = params.count\n } else {\n ctx._source.counter += params.count\n }\n ", - params: { - count: 4, - }, - }, - upsert: {}, - }); - - language: Ruby - code: >- - response = client.update( - index: "test", - id: "1", - body: { - "scripted_upsert": true, - "script": { - "source": "\n if ( ctx.op == 'create' ) {\n ctx._source.counter = params.count\n } else {\n ctx._source.counter += params.count\n }\n ", - "params": { - "count": 4 - } - }, - "upsert": {} - } - ) - - language: PHP - code: >- - $resp = $client->update([ - "index" => "test", - "id" => "1", - "body" => [ - "scripted_upsert" => true, - "script" => [ - "source" => "\n if ( ctx.op == 'create' ) {\n ctx._source.counter = params.count\n } else {\n ctx._source.counter += params.count\n }\n ", - "params" => [ - "count" => 4, - ], - ], - "upsert" => new ArrayObject([]), - ], - ]); - - language: curl - code: - "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d - '{\"scripted_upsert\":true,\"script\":{\"source\":\"\\n if ( ctx.op == '\"'\"'create'\"'\"' ) - {\\n ctx._source.counter = params.count\\n } else {\\n ctx._source.counter += - params.count\\n }\\n \",\"params\":{\"count\":4}},\"upsert\":{}}' \"$ELASTICSEARCH_URL/test/_update/1\"" - - language: Java - code: | - client.update(u -> u - .id("1") - .index("test") - .script(s -> s - .source(so -> so - .scriptString(" - if ( ctx.op == 'create' ) { - ctx._source.counter = params.count - } else { - ctx._source.counter += params.count - } - ") - ) - .params("count", JsonData.fromJson("4")) - ) - .scriptedUpsert(true) - .upsert(JsonData.fromJson("{}")) - ,Void.class); diff --git a/specification/_global/update/examples/request/UpdateRequestExample11.yaml b/specification/_global/update/examples/request/UpdateRequestExample11.yaml index d901d30edb..98e3a9d014 100644 --- a/specification/_global/update/examples/request/UpdateRequestExample11.yaml +++ b/specification/_global/update/examples/request/UpdateRequestExample11.yaml @@ -15,60 +15,3 @@ value: "{ \ \"doc_as_upsert\": true }" -alternatives: - - language: Python - code: |- - resp = client.update( - index="test", - id="1", - doc={ - "name": "new_name" - }, - doc_as_upsert=True, - ) - - language: JavaScript - code: |- - const response = await client.update({ - index: "test", - id: 1, - doc: { - name: "new_name", - }, - doc_as_upsert: true, - }); - - language: Ruby - code: |- - response = client.update( - index: "test", - id: "1", - body: { - "doc": { - "name": "new_name" - }, - "doc_as_upsert": true - } - ) - - language: PHP - code: |- - $resp = $client->update([ - "index" => "test", - "id" => "1", - "body" => [ - "doc" => [ - "name" => "new_name", - ], - "doc_as_upsert" => true, - ], - ]); - - language: curl - code: - 'curl -X POST -H "Authorization: ApiKey $ELASTIC_API_KEY" -H "Content-Type: application/json" -d - ''{"doc":{"name":"new_name"},"doc_as_upsert":true}'' "$ELASTICSEARCH_URL/test/_update/1"' - - language: Java - code: | - client.update(u -> u - .doc(JsonData.fromJson("{\"name\":\"new_name\"}")) - .docAsUpsert(true) - .id("1") - .index("test") - ,Void.class); diff --git a/specification/_global/update/examples/request/UpdateRequestExample2.yaml b/specification/_global/update/examples/request/UpdateRequestExample2.yaml index 5d6f23bee4..9b9ec2badf 100644 --- a/specification/_global/update/examples/request/UpdateRequestExample2.yaml +++ b/specification/_global/update/examples/request/UpdateRequestExample2.yaml @@ -21,78 +21,3 @@ value: "{ \ } }" -alternatives: - - language: Python - code: |- - resp = client.update( - index="test", - id="1", - script={ - "source": "ctx._source.tags.add(params.tag)", - "lang": "painless", - "params": { - "tag": "blue" - } - }, - ) - - language: JavaScript - code: |- - const response = await client.update({ - index: "test", - id: 1, - script: { - source: "ctx._source.tags.add(params.tag)", - lang: "painless", - params: { - tag: "blue", - }, - }, - }); - - language: Ruby - code: |- - response = client.update( - index: "test", - id: "1", - body: { - "script": { - "source": "ctx._source.tags.add(params.tag)", - "lang": "painless", - "params": { - "tag": "blue" - } - } - } - ) - - language: PHP - code: |- - $resp = $client->update([ - "index" => "test", - "id" => "1", - "body" => [ - "script" => [ - "source" => "ctx._source.tags.add(params.tag)", - "lang" => "painless", - "params" => [ - "tag" => "blue", - ], - ], - ], - ]); - - language: curl - code: - 'curl -X POST -H "Authorization: ApiKey $ELASTIC_API_KEY" -H "Content-Type: application/json" -d - ''{"script":{"source":"ctx._source.tags.add(params.tag)","lang":"painless","params":{"tag":"blue"}}}'' - "$ELASTICSEARCH_URL/test/_update/1"' - - language: Java - code: | - client.update(u -> u - .id("1") - .index("test") - .script(s -> s - .source(so -> so - .scriptString("ctx._source.tags.add(params.tag)") - ) - .params("tag", JsonData.fromJson("\"blue\"")) - .lang("painless") - ) - ,Void.class); diff --git a/specification/_global/update/examples/request/UpdateRequestExample3.yaml b/specification/_global/update/examples/request/UpdateRequestExample3.yaml index 4c472064d9..efdf66cc84 100644 --- a/specification/_global/update/examples/request/UpdateRequestExample3.yaml +++ b/specification/_global/update/examples/request/UpdateRequestExample3.yaml @@ -22,80 +22,3 @@ value: "{ \ } }" -alternatives: - - language: Python - code: >- - resp = client.update( - index="test", - id="1", - script={ - "source": "if (ctx._source.tags.contains(params.tag)) { ctx._source.tags.remove(ctx._source.tags.indexOf(params.tag)) }", - "lang": "painless", - "params": { - "tag": "blue" - } - }, - ) - - language: JavaScript - code: |- - const response = await client.update({ - index: "test", - id: 1, - script: { - source: - "if (ctx._source.tags.contains(params.tag)) { ctx._source.tags.remove(ctx._source.tags.indexOf(params.tag)) }", - lang: "painless", - params: { - tag: "blue", - }, - }, - }); - - language: Ruby - code: >- - response = client.update( - index: "test", - id: "1", - body: { - "script": { - "source": "if (ctx._source.tags.contains(params.tag)) { ctx._source.tags.remove(ctx._source.tags.indexOf(params.tag)) }", - "lang": "painless", - "params": { - "tag": "blue" - } - } - } - ) - - language: PHP - code: >- - $resp = $client->update([ - "index" => "test", - "id" => "1", - "body" => [ - "script" => [ - "source" => "if (ctx._source.tags.contains(params.tag)) { ctx._source.tags.remove(ctx._source.tags.indexOf(params.tag)) }", - "lang" => "painless", - "params" => [ - "tag" => "blue", - ], - ], - ], - ]); - - language: curl - code: - 'curl -X POST -H "Authorization: ApiKey $ELASTIC_API_KEY" -H "Content-Type: application/json" -d - ''{"script":{"source":"if (ctx._source.tags.contains(params.tag)) { - ctx._source.tags.remove(ctx._source.tags.indexOf(params.tag)) }","lang":"painless","params":{"tag":"blue"}}}'' - "$ELASTICSEARCH_URL/test/_update/1"' - - language: Java - code: > - client.update(u -> u - .id("1") - .index("test") - .script(s -> s - .source(so -> so - .scriptString("if (ctx._source.tags.contains(params.tag)) { ctx._source.tags.remove(ctx._source.tags.indexOf(params.tag)) }") - ) - .params("tag", JsonData.fromJson("\"blue\"")) - .lang("painless") - ) - ,Void.class); diff --git a/specification/_global/update/examples/request/UpdateRequestExample4.yaml b/specification/_global/update/examples/request/UpdateRequestExample4.yaml index 0c165775d7..ccca0de1e5 100644 --- a/specification/_global/update/examples/request/UpdateRequestExample4.yaml +++ b/specification/_global/update/examples/request/UpdateRequestExample4.yaml @@ -8,51 +8,3 @@ value: "{ \ \"script\" : \"ctx._source.new_field = 'value_of_new_field'\" }" -alternatives: - - language: Python - code: |- - resp = client.update( - index="test", - id="1", - script="ctx._source.new_field = 'value_of_new_field'", - ) - - language: JavaScript - code: |- - const response = await client.update({ - index: "test", - id: 1, - script: "ctx._source.new_field = 'value_of_new_field'", - }); - - language: Ruby - code: |- - response = client.update( - index: "test", - id: "1", - body: { - "script": "ctx._source.new_field = 'value_of_new_field'" - } - ) - - language: PHP - code: |- - $resp = $client->update([ - "index" => "test", - "id" => "1", - "body" => [ - "script" => "ctx._source.new_field = 'value_of_new_field'", - ], - ]); - - language: curl - code: - 'curl -X POST -H "Authorization: ApiKey $ELASTIC_API_KEY" -H "Content-Type: application/json" -d - ''{"script":"ctx._source.new_field = ''"''"''value_of_new_field''"''"''"}'' "$ELASTICSEARCH_URL/test/_update/1"' - - language: Java - code: | - client.update(u -> u - .id("1") - .index("test") - .script(s -> s - .source(so -> so - .scriptString("ctx._source.new_field = 'value_of_new_field'") - ) - ) - ,Void.class); diff --git a/specification/_global/update/examples/request/UpdateRequestExample5.yaml b/specification/_global/update/examples/request/UpdateRequestExample5.yaml index 70aa4f8ee4..bc095d458c 100644 --- a/specification/_global/update/examples/request/UpdateRequestExample5.yaml +++ b/specification/_global/update/examples/request/UpdateRequestExample5.yaml @@ -8,51 +8,3 @@ value: "{ \ \"script\" : \"ctx._source.remove('new_field')\" }" -alternatives: - - language: Python - code: |- - resp = client.update( - index="test", - id="1", - script="ctx._source.remove('new_field')", - ) - - language: JavaScript - code: |- - const response = await client.update({ - index: "test", - id: 1, - script: "ctx._source.remove('new_field')", - }); - - language: Ruby - code: |- - response = client.update( - index: "test", - id: "1", - body: { - "script": "ctx._source.remove('new_field')" - } - ) - - language: PHP - code: |- - $resp = $client->update([ - "index" => "test", - "id" => "1", - "body" => [ - "script" => "ctx._source.remove('new_field')", - ], - ]); - - language: curl - code: - 'curl -X POST -H "Authorization: ApiKey $ELASTIC_API_KEY" -H "Content-Type: application/json" -d - ''{"script":"ctx._source.remove(''"''"''new_field''"''"'')"}'' "$ELASTICSEARCH_URL/test/_update/1"' - - language: Java - code: | - client.update(u -> u - .id("1") - .index("test") - .script(s -> s - .source(so -> so - .scriptString("ctx._source.remove('new_field')") - ) - ) - ,Void.class); diff --git a/specification/_global/update/examples/request/UpdateRequestExample6.yaml b/specification/_global/update/examples/request/UpdateRequestExample6.yaml index a727d9890f..288070fb42 100644 --- a/specification/_global/update/examples/request/UpdateRequestExample6.yaml +++ b/specification/_global/update/examples/request/UpdateRequestExample6.yaml @@ -8,52 +8,3 @@ value: "{ \ \"script\": \"ctx._source['my-object'].remove('my-subfield')\" }" -alternatives: - - language: Python - code: |- - resp = client.update( - index="test", - id="1", - script="ctx._source['my-object'].remove('my-subfield')", - ) - - language: JavaScript - code: |- - const response = await client.update({ - index: "test", - id: 1, - script: "ctx._source['my-object'].remove('my-subfield')", - }); - - language: Ruby - code: |- - response = client.update( - index: "test", - id: "1", - body: { - "script": "ctx._source['my-object'].remove('my-subfield')" - } - ) - - language: PHP - code: |- - $resp = $client->update([ - "index" => "test", - "id" => "1", - "body" => [ - "script" => "ctx._source['my-object'].remove('my-subfield')", - ], - ]); - - language: curl - code: - 'curl -X POST -H "Authorization: ApiKey $ELASTIC_API_KEY" -H "Content-Type: application/json" -d - ''{"script":"ctx._source[''"''"''my-object''"''"''].remove(''"''"''my-subfield''"''"'')"}'' - "$ELASTICSEARCH_URL/test/_update/1"' - - language: Java - code: | - client.update(u -> u - .id("1") - .index("test") - .script(s -> s - .source(so -> so - .scriptString("ctx._source['my-object'].remove('my-subfield')") - ) - ) - ,Void.class); diff --git a/specification/_global/update/examples/request/UpdateRequestExample7.yaml b/specification/_global/update/examples/request/UpdateRequestExample7.yaml index a84eec3085..b12298e454 100644 --- a/specification/_global/update/examples/request/UpdateRequestExample7.yaml +++ b/specification/_global/update/examples/request/UpdateRequestExample7.yaml @@ -21,79 +21,3 @@ value: "{ \ } }" -alternatives: - - language: Python - code: |- - resp = client.update( - index="test", - id="1", - script={ - "source": "if (ctx._source.tags.contains(params.tag)) { ctx.op = 'delete' } else { ctx.op = 'noop' }", - "lang": "painless", - "params": { - "tag": "green" - } - }, - ) - - language: JavaScript - code: |- - const response = await client.update({ - index: "test", - id: 1, - script: { - source: - "if (ctx._source.tags.contains(params.tag)) { ctx.op = 'delete' } else { ctx.op = 'noop' }", - lang: "painless", - params: { - tag: "green", - }, - }, - }); - - language: Ruby - code: |- - response = client.update( - index: "test", - id: "1", - body: { - "script": { - "source": "if (ctx._source.tags.contains(params.tag)) { ctx.op = 'delete' } else { ctx.op = 'noop' }", - "lang": "painless", - "params": { - "tag": "green" - } - } - } - ) - - language: PHP - code: |- - $resp = $client->update([ - "index" => "test", - "id" => "1", - "body" => [ - "script" => [ - "source" => "if (ctx._source.tags.contains(params.tag)) { ctx.op = 'delete' } else { ctx.op = 'noop' }", - "lang" => "painless", - "params" => [ - "tag" => "green", - ], - ], - ], - ]); - - language: curl - code: - 'curl -X POST -H "Authorization: ApiKey $ELASTIC_API_KEY" -H "Content-Type: application/json" -d - ''{"script":{"source":"if (ctx._source.tags.contains(params.tag)) { ctx.op = ''"''"''delete''"''"'' } else { ctx.op = - ''"''"''noop''"''"'' }","lang":"painless","params":{"tag":"green"}}}'' "$ELASTICSEARCH_URL/test/_update/1"' - - language: Java - code: | - client.update(u -> u - .id("1") - .index("test") - .script(s -> s - .source(so -> so - .scriptString("if (ctx._source.tags.contains(params.tag)) { ctx.op = 'delete' } else { ctx.op = 'noop' }") - ) - .params("tag", JsonData.fromJson("\"green\"")) - .lang("painless") - ) - ,Void.class); diff --git a/specification/_global/update/examples/request/UpdateRequestExample8.yaml b/specification/_global/update/examples/request/UpdateRequestExample8.yaml index f73a3b61d5..4463caf2ad 100644 --- a/specification/_global/update/examples/request/UpdateRequestExample8.yaml +++ b/specification/_global/update/examples/request/UpdateRequestExample8.yaml @@ -12,55 +12,3 @@ value: "{ \ } }" -alternatives: - - language: Python - code: |- - resp = client.update( - index="test", - id="1", - doc={ - "name": "new_name" - }, - ) - - language: JavaScript - code: |- - const response = await client.update({ - index: "test", - id: 1, - doc: { - name: "new_name", - }, - }); - - language: Ruby - code: |- - response = client.update( - index: "test", - id: "1", - body: { - "doc": { - "name": "new_name" - } - } - ) - - language: PHP - code: |- - $resp = $client->update([ - "index" => "test", - "id" => "1", - "body" => [ - "doc" => [ - "name" => "new_name", - ], - ], - ]); - - language: curl - code: - 'curl -X POST -H "Authorization: ApiKey $ELASTIC_API_KEY" -H "Content-Type: application/json" -d - ''{"doc":{"name":"new_name"}}'' "$ELASTICSEARCH_URL/test/_update/1"' - - language: Java - code: | - client.update(u -> u - .doc(JsonData.fromJson("{\"name\":\"new_name\"}")) - .id("1") - .index("test") - ,Void.class); diff --git a/specification/_global/update/examples/request/UpdateRequestExample9.yaml b/specification/_global/update/examples/request/UpdateRequestExample9.yaml index 88f95caacb..76736b2de3 100644 --- a/specification/_global/update/examples/request/UpdateRequestExample9.yaml +++ b/specification/_global/update/examples/request/UpdateRequestExample9.yaml @@ -27,92 +27,3 @@ value: "{ \ } }" -alternatives: - - language: Python - code: |- - resp = client.update( - index="test", - id="1", - script={ - "source": "ctx._source.counter += params.count", - "lang": "painless", - "params": { - "count": 4 - } - }, - upsert={ - "counter": 1 - }, - ) - - language: JavaScript - code: |- - const response = await client.update({ - index: "test", - id: 1, - script: { - source: "ctx._source.counter += params.count", - lang: "painless", - params: { - count: 4, - }, - }, - upsert: { - counter: 1, - }, - }); - - language: Ruby - code: |- - response = client.update( - index: "test", - id: "1", - body: { - "script": { - "source": "ctx._source.counter += params.count", - "lang": "painless", - "params": { - "count": 4 - } - }, - "upsert": { - "counter": 1 - } - } - ) - - language: PHP - code: |- - $resp = $client->update([ - "index" => "test", - "id" => "1", - "body" => [ - "script" => [ - "source" => "ctx._source.counter += params.count", - "lang" => "painless", - "params" => [ - "count" => 4, - ], - ], - "upsert" => [ - "counter" => 1, - ], - ], - ]); - - language: curl - code: - 'curl -X POST -H "Authorization: ApiKey $ELASTIC_API_KEY" -H "Content-Type: application/json" -d - ''{"script":{"source":"ctx._source.counter += - params.count","lang":"painless","params":{"count":4}},"upsert":{"counter":1}}'' - "$ELASTICSEARCH_URL/test/_update/1"' - - language: Java - code: | - client.update(u -> u - .id("1") - .index("test") - .script(s -> s - .source(so -> so - .scriptString("ctx._source.counter += params.count") - ) - .params("count", JsonData.fromJson("4")) - .lang("painless") - ) - .upsert(JsonData.fromJson("{\"counter\":1}")) - ,Void.class); diff --git a/specification/_global/update_by_query/UpdateByQueryRequest.ts b/specification/_global/update_by_query/UpdateByQueryRequest.ts index 2f24aecf2c..8bfa106785 100644 --- a/specification/_global/update_by_query/UpdateByQueryRequest.ts +++ b/specification/_global/update_by_query/UpdateByQueryRequest.ts @@ -59,6 +59,30 @@ import { Duration } from '@_types/Time' * Any query or update failures cause the update by query request to fail and the failures are shown in the response. * Any update requests that completed successfully still stick, they are not rolled back. * + * **Refreshing shards** + * + * Specifying the `refresh` parameter refreshes all shards once the request completes. + * This is different to the update API's `refresh` parameter, which causes only the shard + * that received the request to be refreshed. Unlike the update API, it does not support + * `wait_for`. + * + * **Running update by query asynchronously** + * + * If the request contains `wait_for_completion=false`, Elasticsearch + * performs some preflight checks, launches the request, and returns a + * [task](https://www.elastic.co/docs/api/doc/elasticsearch/group/endpoint-tasks) you can use to cancel or get the status of the task. + * Elasticsearch creates a record of this task as a document at `.tasks/task/${taskId}`. + * + * **Waiting for active shards** + * + * `wait_for_active_shards` controls how many copies of a shard must be active + * before proceeding with the request. See [`wait_for_active_shards`](https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-create#operation-create-wait_for_active_shards) + * for details. `timeout` controls how long each write request waits for unavailable + * shards to become available. Both work exactly the way they work in the + * [Bulk API](https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-bulk). Update by query uses scrolled searches, so you can also + * specify the `scroll` parameter to control how long it keeps the search context + * alive, for example `?scroll=10m`. The default is 5 minutes. + * * **Throttling update requests** * * To control the rate at which update by query issues batches of update operations, you can set `requests_per_second` to any positive decimal number. @@ -103,28 +127,14 @@ import { Duration } from '@_types/Time' * * Update performance scales linearly across available resources with the number of slices. * * Whether query or update performance dominates the runtime depends on the documents being reindexed and cluster resources. - * - * **Update the document source** - * - * Update by query supports scripts to update the document source. - * As with the update API, you can set `ctx.op` to change the operation that is performed. - * - * Set `ctx.op = "noop"` if your script decides that it doesn't have to make any changes. - * The update by query operation skips updating the document and increments the `noop` counter. - * - * Set `ctx.op = "delete"` if your script decides that the document should be deleted. - * The update by query operation deletes the document and increments the `deleted` counter. - * - * Update by query supports only `index`, `noop`, and `delete`. - * Setting `ctx.op` to anything else is an error. - * Setting any other field in `ctx` is an error. - * This API enables you to only modify the source of matching documents; you cannot move them. + * Refer to the linked documentation for examples of how to update documents using the `_update_by_query` API: * @rest_spec_name update_by_query * @availability stack since=2.4.0 stability=stable * @availability serverless stability=stable visibility=public * @index_privileges read,write * @doc_tag document * @doc_id docs-update-by-query + * @ext_doc_id update-by-query */ export interface Request extends RequestBase { urls: [ diff --git a/specification/_global/update_by_query/examples/request/UpdateByQueryRequestExample1.yaml b/specification/_global/update_by_query/examples/request/UpdateByQueryRequestExample1.yaml index 1bf4b580a8..3d864d1006 100644 --- a/specification/_global/update_by_query/examples/request/UpdateByQueryRequestExample1.yaml +++ b/specification/_global/update_by_query/examples/request/UpdateByQueryRequestExample1.yaml @@ -11,68 +11,3 @@ value: |- } } } -alternatives: - - language: Python - code: |- - resp = client.update_by_query( - index="my-index-000001", - conflicts="proceed", - query={ - "term": { - "user.id": "kimchy" - } - }, - ) - - language: JavaScript - code: |- - const response = await client.updateByQuery({ - index: "my-index-000001", - conflicts: "proceed", - query: { - term: { - "user.id": "kimchy", - }, - }, - }); - - language: Ruby - code: |- - response = client.update_by_query( - index: "my-index-000001", - conflicts: "proceed", - body: { - "query": { - "term": { - "user.id": "kimchy" - } - } - } - ) - - language: PHP - code: |- - $resp = $client->updateByQuery([ - "index" => "my-index-000001", - "conflicts" => "proceed", - "body" => [ - "query" => [ - "term" => [ - "user.id" => "kimchy", - ], - ], - ], - ]); - - language: curl - code: - 'curl -X POST -H "Authorization: ApiKey $ELASTIC_API_KEY" -H "Content-Type: application/json" -d - ''{"query":{"term":{"user.id":"kimchy"}}}'' "$ELASTICSEARCH_URL/my-index-000001/_update_by_query?conflicts=proceed"' - - language: Java - code: | - client.updateByQuery(u -> u - .conflicts(Conflicts.Proceed) - .index("my-index-000001") - .query(q -> q - .term(t -> t - .field("user.id") - .value(FieldValue.of("kimchy")) - ) - ) - ); diff --git a/specification/_global/update_by_query/examples/request/UpdateByQueryRequestExample2.yaml b/specification/_global/update_by_query/examples/request/UpdateByQueryRequestExample2.yaml index 41c70ff5b6..46825511c6 100644 --- a/specification/_global/update_by_query/examples/request/UpdateByQueryRequestExample2.yaml +++ b/specification/_global/update_by_query/examples/request/UpdateByQueryRequestExample2.yaml @@ -16,86 +16,3 @@ value: |- } } } -alternatives: - - language: Python - code: |- - resp = client.update_by_query( - index="my-index-000001", - script={ - "source": "ctx._source.count++", - "lang": "painless" - }, - query={ - "term": { - "user.id": "kimchy" - } - }, - ) - - language: JavaScript - code: |- - const response = await client.updateByQuery({ - index: "my-index-000001", - script: { - source: "ctx._source.count++", - lang: "painless", - }, - query: { - term: { - "user.id": "kimchy", - }, - }, - }); - - language: Ruby - code: |- - response = client.update_by_query( - index: "my-index-000001", - body: { - "script": { - "source": "ctx._source.count++", - "lang": "painless" - }, - "query": { - "term": { - "user.id": "kimchy" - } - } - } - ) - - language: PHP - code: |- - $resp = $client->updateByQuery([ - "index" => "my-index-000001", - "body" => [ - "script" => [ - "source" => "ctx._source.count++", - "lang" => "painless", - ], - "query" => [ - "term" => [ - "user.id" => "kimchy", - ], - ], - ], - ]); - - language: curl - code: - 'curl -X POST -H "Authorization: ApiKey $ELASTIC_API_KEY" -H "Content-Type: application/json" -d - ''{"script":{"source":"ctx._source.count++","lang":"painless"},"query":{"term":{"user.id":"kimchy"}}}'' - "$ELASTICSEARCH_URL/my-index-000001/_update_by_query"' - - language: Java - code: | - client.updateByQuery(u -> u - .index("my-index-000001") - .query(q -> q - .term(t -> t - .field("user.id") - .value(FieldValue.of("kimchy")) - ) - ) - .script(s -> s - .source(so -> so - .scriptString("ctx._source.count++") - ) - .lang("painless") - ) - ); diff --git a/specification/_global/update_by_query/examples/request/UpdateByQueryRequestExample3.yaml b/specification/_global/update_by_query/examples/request/UpdateByQueryRequestExample3.yaml index de1b720510..fd12db2380 100644 --- a/specification/_global/update_by_query/examples/request/UpdateByQueryRequestExample3.yaml +++ b/specification/_global/update_by_query/examples/request/UpdateByQueryRequestExample3.yaml @@ -14,75 +14,3 @@ value: |- "source": "ctx._source['extra'] = 'test'" } } -alternatives: - - language: Python - code: |- - resp = client.update_by_query( - index="my-index-000001", - slice={ - "id": 0, - "max": 2 - }, - script={ - "source": "ctx._source['extra'] = 'test'" - }, - ) - - language: JavaScript - code: |- - const response = await client.updateByQuery({ - index: "my-index-000001", - slice: { - id: 0, - max: 2, - }, - script: { - source: "ctx._source['extra'] = 'test'", - }, - }); - - language: Ruby - code: |- - response = client.update_by_query( - index: "my-index-000001", - body: { - "slice": { - "id": 0, - "max": 2 - }, - "script": { - "source": "ctx._source['extra'] = 'test'" - } - } - ) - - language: PHP - code: |- - $resp = $client->updateByQuery([ - "index" => "my-index-000001", - "body" => [ - "slice" => [ - "id" => 0, - "max" => 2, - ], - "script" => [ - "source" => "ctx._source['extra'] = 'test'", - ], - ], - ]); - - language: curl - code: - 'curl -X POST -H "Authorization: ApiKey $ELASTIC_API_KEY" -H "Content-Type: application/json" -d - ''{"slice":{"id":0,"max":2},"script":{"source":"ctx._source[''"''"''extra''"''"''] = ''"''"''test''"''"''"}}'' - "$ELASTICSEARCH_URL/my-index-000001/_update_by_query"' - - language: Java - code: | - client.updateByQuery(u -> u - .index("my-index-000001") - .script(s -> s - .source(so -> so - .scriptString("ctx._source['extra'] = 'test'") - ) - ) - .slice(sl -> sl - .id("0") - .max(2) - ) - ); diff --git a/specification/_global/update_by_query/examples/request/UpdateByQueryRequestExample4.yaml b/specification/_global/update_by_query/examples/request/UpdateByQueryRequestExample4.yaml index 04df2d56e6..13224609f3 100644 --- a/specification/_global/update_by_query/examples/request/UpdateByQueryRequestExample4.yaml +++ b/specification/_global/update_by_query/examples/request/UpdateByQueryRequestExample4.yaml @@ -10,67 +10,3 @@ value: |- "source": "ctx._source['extra'] = 'test'" } } -alternatives: - - language: Python - code: |- - resp = client.update_by_query( - index="my-index-000001", - refresh=True, - slices="5", - script={ - "source": "ctx._source['extra'] = 'test'" - }, - ) - - language: JavaScript - code: |- - const response = await client.updateByQuery({ - index: "my-index-000001", - refresh: "true", - slices: 5, - script: { - source: "ctx._source['extra'] = 'test'", - }, - }); - - language: Ruby - code: |- - response = client.update_by_query( - index: "my-index-000001", - refresh: "true", - slices: "5", - body: { - "script": { - "source": "ctx._source['extra'] = 'test'" - } - } - ) - - language: PHP - code: |- - $resp = $client->updateByQuery([ - "index" => "my-index-000001", - "refresh" => "true", - "slices" => "5", - "body" => [ - "script" => [ - "source" => "ctx._source['extra'] = 'test'", - ], - ], - ]); - - language: curl - code: - 'curl -X POST -H "Authorization: ApiKey $ELASTIC_API_KEY" -H "Content-Type: application/json" -d - ''{"script":{"source":"ctx._source[''"''"''extra''"''"''] = ''"''"''test''"''"''"}}'' - "$ELASTICSEARCH_URL/my-index-000001/_update_by_query?refresh&slices=5"' - - language: Java - code: | - client.updateByQuery(u -> u - .index("my-index-000001") - .refresh(true) - .script(s -> s - .source(so -> so - .scriptString("ctx._source['extra'] = 'test'") - ) - ) - .slices(sl -> sl - .value(5) - ) - ); diff --git a/specification/_global/update_by_query_rethrottle/examples/request/UpdateByQueryRethrottleRequestExample1.yaml b/specification/_global/update_by_query_rethrottle/examples/request/UpdateByQueryRethrottleRequestExample1.yaml index 41401d5e45..aaddc459f9 100644 --- a/specification/_global/update_by_query_rethrottle/examples/request/UpdateByQueryRethrottleRequestExample1.yaml +++ b/specification/_global/update_by_query_rethrottle/examples/request/UpdateByQueryRethrottleRequestExample1.yaml @@ -1,35 +1 @@ method_request: POST _update_by_query/r1A2WoRbTwKZ516z6NEs5A:36619/_rethrottle?requests_per_second=-1 -alternatives: - - language: Python - code: |- - resp = client.update_by_query_rethrottle( - task_id="r1A2WoRbTwKZ516z6NEs5A:36619", - requests_per_second="-1", - ) - - language: JavaScript - code: |- - const response = await client.updateByQueryRethrottle({ - task_id: "r1A2WoRbTwKZ516z6NEs5A:36619", - requests_per_second: "-1", - }); - - language: Ruby - code: |- - response = client.update_by_query_rethrottle( - task_id: "r1A2WoRbTwKZ516z6NEs5A:36619", - requests_per_second: "-1" - ) - - language: PHP - code: |- - $resp = $client->updateByQueryRethrottle([ - "task_id" => "r1A2WoRbTwKZ516z6NEs5A:36619", - "requests_per_second" => "-1", - ]); - - language: curl - code: 'curl -X POST -H "Authorization: ApiKey $ELASTIC_API_KEY" - "$ELASTICSEARCH_URL/_update_by_query/r1A2WoRbTwKZ516z6NEs5A:36619/_rethrottle?requests_per_second=-1"' - - language: Java - code: | - client.updateByQueryRethrottle(u -> u - .requestsPerSecond(-1.0F) - .taskId("r1A2WoRbTwKZ516z6NEs5A:36619") - ); diff --git a/specification/_json_spec/cluster.get_component_template.json b/specification/_json_spec/cluster.get_component_template.json index d2d243120d..99f2611c81 100644 --- a/specification/_json_spec/cluster.get_component_template.json +++ b/specification/_json_spec/cluster.get_component_template.json @@ -40,6 +40,14 @@ "include_defaults": { "type": "boolean", "description": "Return all default configurations for the component template (default: false)" + }, + "flat_settings": { + "type": "boolean", + "description": "Return settings in flat format (default: false)" + }, + "settings_filter": { + "type": "string", + "description": "Filter out results, for example to filter out sensitive information. Supports wildcards or full settings keys" } } } diff --git a/specification/_json_spec/cluster.put_component_template.json b/specification/_json_spec/cluster.put_component_template.json index eed8da7344..a6ed996756 100644 --- a/specification/_json_spec/cluster.put_component_template.json +++ b/specification/_json_spec/cluster.put_component_template.json @@ -30,9 +30,10 @@ "description": "Whether the index template should only be added if new or can also replace an existing one", "default": false }, - "timeout": { - "type": "time", - "description": "Explicit operation timeout" + "cause": { + "type": "string", + "description": "User defined reason for create the component template", + "default": "api" }, "master_timeout": { "type": "time", diff --git a/specification/_json_spec/create.json b/specification/_json_spec/create.json index ffa5e0f26e..03038a9366 100644 --- a/specification/_json_spec/create.json +++ b/specification/_json_spec/create.json @@ -62,6 +62,14 @@ "include_source_on_error": { "type": "boolean", "description": "True or false if to include the document source in the error message in case of parsing errors. Defaults to true." + }, + "require_alias": { + "type": "boolean", + "description": "When true, requires destination to be an alias. Default is false" + }, + "require_data_stream": { + "type": "boolean", + "description": "When true, requires destination to be a data stream (existing or to be created). Default is false" } }, "body": { diff --git a/specification/_json_spec/eql.search.json b/specification/_json_spec/eql.search.json index 1d9831a6e8..92568e69b1 100644 --- a/specification/_json_spec/eql.search.json +++ b/specification/_json_spec/eql.search.json @@ -48,6 +48,25 @@ "type": "boolean", "description": "Control whether a sequence query should return partial results or no results at all in case of shard failures. This option has effect only if [allow_partial_search_results] is true.", "default": false + }, + "ccs_minimize_roundtrips": { + "type": "boolean", + "description": "Indicates whether network round-trips should be minimized as part of cross-cluster search requests execution", + "default": true + }, + "ignore_unavailable": { + "type": "boolean", + "description": "Whether specified concrete indices should be ignored when unavailable (missing or closed)" + }, + "allow_no_indices": { + "type": "boolean", + "description": "Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)" + }, + "expand_wildcards": { + "type": "enum", + "options": ["open", "closed", "hidden", "none", "all"], + "default": "open", + "description": "Whether to expand wildcard expression to concrete indices that are open, closed or both." } }, "body": { diff --git a/specification/_json_spec/esql.async_query_get.json b/specification/_json_spec/esql.async_query_get.json index b2b4b17ccc..f92bce11c9 100644 --- a/specification/_json_spec/esql.async_query_get.json +++ b/specification/_json_spec/esql.async_query_get.json @@ -24,6 +24,10 @@ ] }, "params": { + "format": { + "type": "string", + "description": "a short version of the Accept header, e.g. json, yaml" + }, "wait_for_completion_timeout": { "type": "time", "description": "Specify the time that the request should block waiting for the final response" diff --git a/specification/_json_spec/esql.get_query.json b/specification/_json_spec/esql.get_query.json index f0a2085495..3d5542e7ff 100644 --- a/specification/_json_spec/esql.get_query.json +++ b/specification/_json_spec/esql.get_query.json @@ -7,7 +7,7 @@ "stability": "experimental", "visibility": "public", "headers": { - "accept": [], + "accept": ["application/json"], "content_type": ["application/json"] }, "url": { diff --git a/specification/_json_spec/indices.recovery.json b/specification/_json_spec/indices.recovery.json index ada2fcb075..f3a858647c 100644 --- a/specification/_json_spec/indices.recovery.json +++ b/specification/_json_spec/indices.recovery.json @@ -37,6 +37,22 @@ "type": "boolean", "description": "Display only those recoveries that are currently on-going", "default": false + }, + "ignore_unavailable": { + "type": "boolean", + "description": "Whether specified concrete indices should be ignored when unavailable (missing or closed)", + "default": false + }, + "allow_no_indices": { + "type": "boolean", + "description": "Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)", + "default": true + }, + "expand_wildcards": { + "type": "enum", + "options": ["open", "closed", "hidden", "none", "all"], + "default": "open", + "description": "Whether to expand wildcard expression to concrete indices that are open, closed or both." } } } diff --git a/specification/_json_spec/inference.put_amazonsagemaker.json b/specification/_json_spec/inference.put_amazonsagemaker.json new file mode 100644 index 0000000000..e2cdb3ad25 --- /dev/null +++ b/specification/_json_spec/inference.put_amazonsagemaker.json @@ -0,0 +1,35 @@ +{ + "inference.put_amazonsagemaker": { + "documentation": { + "url": "https://www.elastic.co/guide/en/elasticsearch/reference/current/infer-service-amazon-sagemaker.html", + "description": "Configure a Amazon SageMaker inference endpoint" + }, + "stability": "stable", + "visibility": "public", + "headers": { + "accept": ["application/json"], + "content_type": ["application/json"] + }, + "url": { + "paths": [ + { + "path": "/_inference/{task_type}/{amazonsagemaker_inference_id}", + "methods": ["PUT"], + "parts": { + "task_type": { + "type": "string", + "description": "The task type" + }, + "amazonsagemaker_inference_id": { + "type": "string", + "description": "The inference Id" + } + } + } + ] + }, + "body": { + "description": "The inference endpoint's task and service settings" + } + } +} diff --git a/specification/_json_spec/inference.put_custom.json b/specification/_json_spec/inference.put_custom.json new file mode 100644 index 0000000000..c12108683d --- /dev/null +++ b/specification/_json_spec/inference.put_custom.json @@ -0,0 +1,35 @@ +{ + "inference.put_custom": { + "documentation": { + "url": "https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-inference-put-custom", + "description": "Configure a custom inference endpoint" + }, + "stability": "stable", + "visibility": "public", + "headers": { + "accept": ["application/json"], + "content_type": ["application/json"] + }, + "url": { + "paths": [ + { + "path": "/_inference/{task_type}/{custom_inference_id}", + "methods": ["PUT"], + "parts": { + "task_type": { + "type": "string", + "description": "The task type" + }, + "custom_inference_id": { + "type": "string", + "description": "The inference Id" + } + } + } + ] + }, + "body": { + "description": "The inference endpoint's task and service settings" + } + } +} diff --git a/specification/_json_spec/inference.put_deepseek.json b/specification/_json_spec/inference.put_deepseek.json new file mode 100644 index 0000000000..e30b6bb8a7 --- /dev/null +++ b/specification/_json_spec/inference.put_deepseek.json @@ -0,0 +1,35 @@ +{ + "inference.put_deepseek": { + "documentation": { + "url": "https://www.elastic.co/guide/en/elasticsearch/reference/current/infer-service-deepseek.html", + "description": "Configure a DeepSeek inference endpoint" + }, + "stability": "stable", + "visibility": "public", + "headers": { + "accept": ["application/json"], + "content_type": ["application/json"] + }, + "url": { + "paths": [ + { + "path": "/_inference/{task_type}/{deepseek_inference_id}", + "methods": ["PUT"], + "parts": { + "task_type": { + "type": "string", + "description": "The task type" + }, + "deepseek_inference_id": { + "type": "string", + "description": "The inference Id" + } + } + } + ] + }, + "body": { + "description": "The inference endpoint's task and service settings" + } + } +} diff --git a/specification/_json_spec/msearch.json b/specification/_json_spec/msearch.json index e083dabb31..7ffa546d0c 100644 --- a/specification/_json_spec/msearch.json +++ b/specification/_json_spec/msearch.json @@ -60,6 +60,38 @@ "type": "boolean", "description": "Indicates whether network round-trips should be minimized as part of cross-cluster search requests execution", "default": "true" + }, + "index": { + "type": "list", + "description": "A comma-separated list of index names to use as default" + }, + "ignore_unavailable": { + "type": "boolean", + "description": "Whether specified concrete indices should be ignored when unavailable (missing or closed)" + }, + "ignore_throttled": { + "type": "boolean", + "description": "Whether specified concrete, expanded or aliased indices should be ignored when throttled", + "deprecated": true + }, + "allow_no_indices": { + "type": "boolean", + "description": "Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)" + }, + "expand_wildcards": { + "type": "enum", + "options": ["open", "closed", "hidden", "none", "all"], + "default": "open", + "description": "Whether to expand wildcard expression to concrete indices that are open, closed or both." + }, + "routing": { + "type": "list", + "description": "A comma-separated list of specific routing values" + }, + "include_named_queries_score": { + "type": "boolean", + "description": "Indicates whether hit.matched_queries should be rendered as a map that includes the name of the matched query associated with its score (true) or as an array containing the name of the matched queries (false)", + "default": false } }, "body": { diff --git a/specification/_json_spec/open_point_in_time.json b/specification/_json_spec/open_point_in_time.json index 3870c1f95f..b16d67286b 100644 --- a/specification/_json_spec/open_point_in_time.json +++ b/specification/_json_spec/open_point_in_time.json @@ -51,6 +51,11 @@ "allow_partial_search_results": { "type": "boolean", "description": "Specify whether to tolerate shards missing when creating the point-in-time, or otherwise throw an exception. (default: false)" + }, + "max_concurrent_shard_requests": { + "type": "number", + "description": "The number of concurrent shard requests per node executed concurrently when opening this point-in-time. This value should be used to limit the impact of opening the point-in-time on the cluster", + "default": 5 } }, "body": { diff --git a/specification/_json_spec/reindex.json b/specification/_json_spec/reindex.json index 097d1e9c04..4ab3cd6254 100644 --- a/specification/_json_spec/reindex.json +++ b/specification/_json_spec/reindex.json @@ -55,6 +55,11 @@ "max_docs": { "type": "number", "description": "Maximum number of documents to process (default: all documents)" + }, + "require_alias": { + "type": "boolean", + "default": false, + "description": "When true, requires destination to be an alias." } }, "body": { diff --git a/specification/_json_spec/search_mvt.json b/specification/_json_spec/search_mvt.json index 9dc7676d73..36a98c3fd3 100644 --- a/specification/_json_spec/search_mvt.json +++ b/specification/_json_spec/search_mvt.json @@ -62,6 +62,12 @@ "description": "Determines the geometry type for features in the aggs layer.", "default": "grid" }, + "grid_agg": { + "type": "enum", + "options": ["geotile", "geohex"], + "description": "Aggregation used to create a grid for `field`.", + "default": "geotile" + }, "size": { "type": "int", "description": "Maximum number of features to return in the hits layer. Accepts 0-10000.", diff --git a/specification/_json_spec/searchable_snapshots.clear_cache.json b/specification/_json_spec/searchable_snapshots.clear_cache.json index 311bd1b829..7841bcfc12 100644 --- a/specification/_json_spec/searchable_snapshots.clear_cache.json +++ b/specification/_json_spec/searchable_snapshots.clear_cache.json @@ -41,10 +41,6 @@ "options": ["open", "closed", "none", "all"], "default": "open", "description": "Whether to expand wildcard expression to concrete indices that are open, closed or both." - }, - "index": { - "type": "list", - "description": "A comma-separated list of index name to limit the operation" } } } diff --git a/specification/_json_spec/snapshot.repository_analyze.json b/specification/_json_spec/snapshot.repository_analyze.json index d80c4bc122..2967e427be 100644 --- a/specification/_json_spec/snapshot.repository_analyze.json +++ b/specification/_json_spec/snapshot.repository_analyze.json @@ -32,6 +32,10 @@ "type": "number", "description": "Number of operations to run concurrently during the test. Defaults to 10." }, + "register_operation_count": { + "type": "number", + "description": "The minimum number of linearizable register operations to perform in total. Defaults to 10." + }, "read_node_count": { "type": "number", "description": "Number of nodes on which to read a blob after writing. Defaults to 10." diff --git a/specification/_types/Base.ts b/specification/_types/Base.ts index 8bb72f17e4..fd67514614 100644 --- a/specification/_types/Base.ts +++ b/specification/_types/Base.ts @@ -110,6 +110,9 @@ export class ElasticsearchVersionInfo { minimum_wire_compatibility_version: VersionString /** * The Elasticsearch version number. + * + * ::: IMPORTANT: For Serverless deployments, this static value is always `8.11.0` and is used solely for backward compatibility with legacy clients. + * Serverless environments are versionless and automatically upgraded, so this value can be safely ignored. */ number: string } diff --git a/specification/_types/Retriever.ts b/specification/_types/Retriever.ts index c051178750..0e4f4f4294 100644 --- a/specification/_types/Retriever.ts +++ b/specification/_types/Retriever.ts @@ -69,6 +69,9 @@ export class LinearRetriever extends RetrieverBase { /** Inner retrievers. */ retrievers?: InnerRetriever[] rank_window_size?: integer + query?: string + fields?: string[] + normalizer?: ScoreNormalizer } export class PinnedRetriever extends RetrieverBase { @@ -136,6 +139,8 @@ export class RRFRetriever extends RetrieverBase { rank_constant?: integer /** This value determines the size of the individual result sets per query. */ rank_window_size?: integer + query?: string + fields?: string[] } export class TextSimilarityReranker extends RetrieverBase { diff --git a/specification/_types/Stats.ts b/specification/_types/Stats.ts index 56d8cd631f..19454dbab1 100644 --- a/specification/_types/Stats.ts +++ b/specification/_types/Stats.ts @@ -109,6 +109,15 @@ export class DocStats { * Elasticsearch reclaims the disk space of deleted Lucene documents when a segment is merged. */ deleted?: long + /** + * Returns the total size in bytes of all documents in this stats. + * This value may be more reliable than store_stats.size_in_bytes in estimating the index size. + */ + total_size_in_bytes: long + /** + * Human readable total_size_in_bytes + */ + total_size?: ByteSize } export class FielddataStats { @@ -116,6 +125,19 @@ export class FielddataStats { memory_size?: ByteSize memory_size_in_bytes: long fields?: Dictionary + global_ordinals: GlobalOrdinalsStats +} + +export class GlobalOrdinalsStats { + build_time_in_millis: UnitMillis + build_time?: string + fields?: Dictionary +} + +export class GlobalOrdinalFieldStats { + build_time_in_millis: UnitMillis + build_time?: string + shard_max_value_count: long } export class FieldMemoryUsage { @@ -272,6 +294,7 @@ export class SearchStats { suggest_time?: Duration suggest_time_in_millis: DurationValue suggest_total: long + recent_search_load?: double groups?: Dictionary } @@ -306,7 +329,6 @@ export class SegmentsStats { * Total amount of memory used by all index writers across all shards assigned to selected nodes. */ index_writer_memory?: ByteSize - index_writer_max_memory_in_bytes?: long /** * Total amount, in bytes, of memory used by all index writers across all shards assigned to selected nodes. */ @@ -339,11 +361,14 @@ export class SegmentsStats { * Total amount, in bytes, of memory used for points across all shards assigned to selected nodes. */ points_memory_in_bytes: long - stored_memory?: ByteSize /** * Total amount, in bytes, of memory used for stored fields across all shards assigned to selected nodes. */ stored_fields_memory_in_bytes: long + /** + * Total amount of memory used for stored fields across all shards assigned to selected nodes. + */ + stored_fields_memory?: ByteSize /** * Total amount, in bytes, of memory used for terms across all shards assigned to selected nodes. */ @@ -355,7 +380,7 @@ export class SegmentsStats { /** * Total amount of memory used for term vectors across all shards assigned to selected nodes. */ - term_vectory_memory?: ByteSize + term_vectors_memory?: ByteSize /** * Total amount, in bytes, of memory used for term vectors across all shards assigned to selected nodes. */ diff --git a/specification/_types/query_dsl/TokenPruningConfig.ts b/specification/_types/TokenPruningConfig.ts similarity index 100% rename from specification/_types/query_dsl/TokenPruningConfig.ts rename to specification/_types/TokenPruningConfig.ts diff --git a/specification/_types/aggregations/Aggregate.ts b/specification/_types/aggregations/Aggregate.ts index ed1e685bb6..764c880cd7 100644 --- a/specification/_types/aggregations/Aggregate.ts +++ b/specification/_types/aggregations/Aggregate.ts @@ -642,7 +642,9 @@ export class IpRangeBucket extends MultiBucketBase { */ export class FiltersAggregate extends MultiBucketAggregateBase {} -export class FiltersBucket extends MultiBucketBase {} +export class FiltersBucket extends MultiBucketBase { + key?: string +} /** * @variant name=adjacency_matrix diff --git a/specification/_types/analysis/icu-plugin.ts b/specification/_types/analysis/icu-plugin.ts index 92659e58b0..9f0ed47802 100644 --- a/specification/_types/analysis/icu-plugin.ts +++ b/specification/_types/analysis/icu-plugin.ts @@ -52,16 +52,16 @@ export class IcuFoldingTokenFilter extends TokenFilterBase { export class IcuCollationTokenFilter extends TokenFilterBase { type: 'icu_collation' alternate?: IcuCollationAlternate - case_first?: IcuCollationCaseFirst - case_level?: boolean + caseFirst?: IcuCollationCaseFirst + caseLevel?: boolean country?: string decomposition?: IcuCollationDecomposition - hiragana_quaternary_mode?: boolean + hiraganaQuaternaryMode?: boolean language?: string numeric?: boolean rules?: string strength?: IcuCollationStrength - variable_top?: string + variableTop?: string variant?: string } diff --git a/specification/_types/analysis/token_filters.ts b/specification/_types/analysis/token_filters.ts index 6265537816..fc34cac69d 100644 --- a/specification/_types/analysis/token_filters.ts +++ b/specification/_types/analysis/token_filters.ts @@ -383,6 +383,7 @@ export class PatternReplaceTokenFilter extends TokenFilterBase { type: 'pattern_replace' /** If `true`, all substrings matching the pattern parameter’s regular expression are replaced. If `false`, the filter replaces only the first matching substring in each token. Defaults to `true`. */ all?: boolean + flags?: string /** Regular expression, written in Java’s regular expression syntax. The filter replaces token substrings matching this pattern with the substring in the `replacement` parameter. */ pattern: string /** Replacement substring. Defaults to an empty substring (`""`). */ @@ -486,6 +487,14 @@ export class FlattenGraphTokenFilter extends TokenFilterBase { type: 'flatten_graph' } +export class BengaliNormalizationTokenFilter extends TokenFilterBase { + type: 'bengali_normalization' +} + +export class BrazilianStemTokenFilter extends TokenFilterBase { + type: 'brazilian_stem' +} + export class GermanNormalizationTokenFilter extends TokenFilterBase { type: 'german_normalization' } @@ -535,6 +544,34 @@ export class SoraniNormalizationTokenFilter extends TokenFilterBase { type: 'sorani_normalization' } +export class ArabicStemTokenFilter extends TokenFilterBase { + type: 'arabic_stem' +} + +export class CzechStemTokenFilter extends TokenFilterBase { + type: 'czech_stem' +} + +export class FrenchStemTokenFilter extends TokenFilterBase { + type: 'french_stem' +} + +export class DutchStemTokenFilter extends TokenFilterBase { + type: 'dutch_stem' +} + +export class GermanStemTokenFilter extends TokenFilterBase { + type: 'german_stem' +} + +export class RussianStemTokenFilter extends TokenFilterBase { + type: 'russian_stem' +} + +export class PersianStemTokenFilter extends TokenFilterBase { + type: 'persian_stem' +} + /** * @codegen_names name, definition * @ext_doc_id analysis-tokenfilters @@ -548,20 +585,27 @@ export type TokenFilter = string | TokenFilterDefinition */ export type TokenFilterDefinition = | ApostropheTokenFilter + | ArabicStemTokenFilter | ArabicNormalizationTokenFilter | AsciiFoldingTokenFilter + | BengaliNormalizationTokenFilter + | BrazilianStemTokenFilter | CjkBigramTokenFilter | CjkWidthTokenFilter | ClassicTokenFilter | CommonGramsTokenFilter | ConditionTokenFilter + | CzechStemTokenFilter | DecimalDigitTokenFilter | DelimitedPayloadTokenFilter + | DutchStemTokenFilter | EdgeNGramTokenFilter | ElisionTokenFilter | FingerprintTokenFilter | FlattenGraphTokenFilter + | FrenchStemTokenFilter | GermanNormalizationTokenFilter + | GermanStemTokenFilter | HindiNormalizationTokenFilter | HunspellTokenFilter | HyphenationDecompounderTokenFilter @@ -581,10 +625,12 @@ export type TokenFilterDefinition = | PatternCaptureTokenFilter | PatternReplaceTokenFilter | PersianNormalizationTokenFilter + | PersianStemTokenFilter | PorterStemTokenFilter | PredicateTokenFilter | RemoveDuplicatesTokenFilter | ReverseTokenFilter + | RussianStemTokenFilter | ScandinavianFoldingTokenFilter | ScandinavianNormalizationTokenFilter | SerbianNormalizationTokenFilter diff --git a/specification/_types/analysis/tokenizers.ts b/specification/_types/analysis/tokenizers.ts index a7f53675fe..591e5c357f 100644 --- a/specification/_types/analysis/tokenizers.ts +++ b/specification/_types/analysis/tokenizers.ts @@ -51,6 +51,7 @@ export class EdgeNGramTokenizer extends TokenizerBase { max_gram?: integer min_gram?: integer /** + * @es_quirk A comma-separated string is also accepted but the enum array is enough * @server_default [] */ token_chars?: TokenChar[] @@ -87,6 +88,7 @@ export class NGramTokenizer extends TokenizerBase { max_gram?: integer min_gram?: integer /** + * @es_quirk A comma-separated string is also accepted but the enum array is enough * @server_default [] */ token_chars?: TokenChar[] diff --git a/specification/_types/common.ts b/specification/_types/common.ts index 00343529a8..829996095b 100644 --- a/specification/_types/common.ts +++ b/specification/_types/common.ts @@ -232,7 +232,9 @@ export enum HealthStatus { * One or more primary shards are unassigned, so some data is unavailable. This can occur briefly during cluster startup as primary shards are assigned. * @aliases RED */ - red + red, + unknown, + unavailable } export enum HttpMethod { diff --git a/specification/_types/mapping/ChunkingSettings.ts b/specification/_types/mapping/ChunkingSettings.ts index c5aed850e2..8e942c898e 100644 --- a/specification/_types/mapping/ChunkingSettings.ts +++ b/specification/_types/mapping/ChunkingSettings.ts @@ -24,6 +24,10 @@ import { OverloadOf } from '@spec_utils/behaviors' export class ChunkingSettings implements OverloadOf { strategy: string + separator_group: string + + separators: string[] + max_chunk_size: integer overlap?: integer diff --git a/specification/_types/mapping/Property.ts b/specification/_types/mapping/Property.ts index bc34cf66d9..55f53b92d5 100644 --- a/specification/_types/mapping/Property.ts +++ b/specification/_types/mapping/Property.ts @@ -59,6 +59,7 @@ import { PercolatorProperty, RankFeatureProperty, RankFeaturesProperty, + RankVectorProperty, ScaledFloatNumberProperty, SearchAsYouTypeProperty, SemanticTextProperty, @@ -147,6 +148,7 @@ export type Property = | NestedProperty | ObjectProperty | PassthroughObjectProperty + | RankVectorProperty | SemanticTextProperty | SparseVectorProperty diff --git a/specification/_types/mapping/SparseVectorIndexOptions.ts b/specification/_types/mapping/SparseVectorIndexOptions.ts new file mode 100644 index 0000000000..e7a650a3a2 --- /dev/null +++ b/specification/_types/mapping/SparseVectorIndexOptions.ts @@ -0,0 +1,42 @@ +/* + * 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. + */ + +import { TokenPruningConfig } from '@_types/TokenPruningConfig' + +export class SparseVectorIndexOptions { + /** + * Whether to perform pruning, omitting the non-significant tokens from the query to improve query performance. + * If prune is true but the pruning_config is not specified, pruning will occur but default values will be used. + * Default: false + * @availability stack since=8.19.0 + * @availability serverless + * @variant container_property + */ + prune?: boolean + /** + * Optional pruning configuration. + * If enabled, this will omit non-significant tokens from the query in order to improve query performance. + * This is only used if prune is set to true. + * If prune is set to true but pruning_config is not specified, default values will be used. + * @availability stack since=8.19.0 + * @availability serverless + * @variant container_property + */ + pruning_config?: TokenPruningConfig +} diff --git a/specification/_types/mapping/complex.ts b/specification/_types/mapping/complex.ts index 3f83b38aae..4de0ba1a85 100644 --- a/specification/_types/mapping/complex.ts +++ b/specification/_types/mapping/complex.ts @@ -33,6 +33,7 @@ export class FlattenedProperty extends PropertyBase { null_value?: string similarity?: string split_queries_on_whitespace?: boolean + time_series_dimensions?: string[] type: 'flattened' } @@ -59,6 +60,7 @@ export class PassthroughObjectProperty extends CorePropertyBase { export class AggregateMetricDoubleProperty extends PropertyBase { type: 'aggregate_metric_double' default_metric: string + ignore_malformed?: boolean metrics: string[] time_series_metric?: TimeSeriesMetricType } diff --git a/specification/_types/mapping/core.ts b/specification/_types/mapping/core.ts index 01a2f6400b..33377fce93 100644 --- a/specification/_types/mapping/core.ts +++ b/specification/_types/mapping/core.ts @@ -40,6 +40,7 @@ import { NumericFielddata } from '@indices/_types/NumericFielddata' import { Dictionary } from '@spec_utils/Dictionary' import { ChunkingSettings } from './ChunkingSettings' import { Property, PropertyBase } from './Property' +import { SparseVectorIndexOptions } from './SparseVectorIndexOptions' import { TermVectorOption } from './TermVectorOption' import { TimeSeriesMetricType } from './TimeSeriesMetricType' @@ -213,8 +214,25 @@ export class RankFeaturesProperty extends PropertyBase { type: 'rank_features' } +/** + * Technical preview + */ +export class RankVectorProperty extends PropertyBase { + type: 'rank_vectors' + element_type?: RankVectorElementType + dims?: integer +} + export class SparseVectorProperty extends PropertyBase { + store?: boolean type: 'sparse_vector' + /** + * Additional index options for the sparse vector field that controls the + * token pruning behavior of the sparse vector field. + * @availability stack since=8.19.0 + * @availability serverless + */ + index_options?: SparseVectorIndexOptions } export class SemanticTextProperty { @@ -364,3 +382,9 @@ export class DynamicProperty extends DocValuesPropertyBase { precision_step?: integer locale?: string } + +export enum RankVectorElementType { + byte, + float, + bit +} diff --git a/specification/_types/mapping/geo.ts b/specification/_types/mapping/geo.ts index 86f14f4aa0..f0471115f1 100644 --- a/specification/_types/mapping/geo.ts +++ b/specification/_types/mapping/geo.ts @@ -29,6 +29,13 @@ export class GeoPointProperty extends DocValuesPropertyBase { on_script_error?: OnScriptError script?: Script type: 'geo_point' + time_series_metric?: GeoPointMetricType +} + +export enum GeoPointMetricType { + gauge, + counter, + position } export enum GeoOrientation { diff --git a/specification/_types/query_dsl/SparseVectorQuery.ts b/specification/_types/query_dsl/SparseVectorQuery.ts index c2164bb3db..b1a6129754 100644 --- a/specification/_types/query_dsl/SparseVectorQuery.ts +++ b/specification/_types/query_dsl/SparseVectorQuery.ts @@ -20,8 +20,8 @@ import { Field, Id } from '@_types/common' import { float } from '@_types/Numeric' import { Dictionary } from '@spec_utils/Dictionary' +import { TokenPruningConfig } from '../TokenPruningConfig' import { QueryBase } from './abstractions' -import { TokenPruningConfig } from './TokenPruningConfig' /** * @variants container diff --git a/specification/_types/query_dsl/TextExpansionQuery.ts b/specification/_types/query_dsl/TextExpansionQuery.ts index 238c079349..7d55520c5e 100644 --- a/specification/_types/query_dsl/TextExpansionQuery.ts +++ b/specification/_types/query_dsl/TextExpansionQuery.ts @@ -17,8 +17,8 @@ * under the License. */ +import { TokenPruningConfig } from '../TokenPruningConfig' import { QueryBase } from './abstractions' -import { TokenPruningConfig } from './TokenPruningConfig' /** * @ext_doc_id query-dsl-text-expansion-query diff --git a/specification/_types/query_dsl/WeightedTokensQuery.ts b/specification/_types/query_dsl/WeightedTokensQuery.ts index 17f965510f..42fc4ab205 100644 --- a/specification/_types/query_dsl/WeightedTokensQuery.ts +++ b/specification/_types/query_dsl/WeightedTokensQuery.ts @@ -19,8 +19,8 @@ import { float } from '@_types/Numeric' import { Dictionary } from '@spec_utils/Dictionary' +import { TokenPruningConfig } from '../TokenPruningConfig' import { QueryBase } from './abstractions' -import { TokenPruningConfig } from './TokenPruningConfig' /** * @ext_doc_id query-dsl-weighted-tokens-query diff --git a/specification/async_search/delete/examples/request/AsyncSearchDeleteExample1.yaml b/specification/async_search/delete/examples/request/AsyncSearchDeleteExample1.yaml index 4e3da24646..3ff283d560 100644 --- a/specification/async_search/delete/examples/request/AsyncSearchDeleteExample1.yaml +++ b/specification/async_search/delete/examples/request/AsyncSearchDeleteExample1.yaml @@ -1,30 +1 @@ method_request: DELETE /_async_search/FmRldE8zREVEUzA2ZVpUeGs2ejJFUFEaMkZ5QTVrSTZSaVN3WlNFVmtlWHJsdzoxMDc= -alternatives: - - language: Python - code: |- - resp = client.async_search.delete( - id="FmRldE8zREVEUzA2ZVpUeGs2ejJFUFEaMkZ5QTVrSTZSaVN3WlNFVmtlWHJsdzoxMDc=", - ) - - language: JavaScript - code: |- - const response = await client.asyncSearch.delete({ - id: "FmRldE8zREVEUzA2ZVpUeGs2ejJFUFEaMkZ5QTVrSTZSaVN3WlNFVmtlWHJsdzoxMDc=", - }); - - language: Ruby - code: |- - response = client.async_search.delete( - id: "FmRldE8zREVEUzA2ZVpUeGs2ejJFUFEaMkZ5QTVrSTZSaVN3WlNFVmtlWHJsdzoxMDc=" - ) - - language: PHP - code: |- - $resp = $client->asyncSearch()->delete([ - "id" => "FmRldE8zREVEUzA2ZVpUeGs2ejJFUFEaMkZ5QTVrSTZSaVN3WlNFVmtlWHJsdzoxMDc=", - ]); - - language: curl - code: 'curl -X DELETE -H "Authorization: ApiKey $ELASTIC_API_KEY" - "$ELASTICSEARCH_URL/_async_search/FmRldE8zREVEUzA2ZVpUeGs2ejJFUFEaMkZ5QTVrSTZSaVN3WlNFVmtlWHJsdzoxMDc="' - - language: Java - code: | - client.asyncSearch().delete(d -> d - .id("FmRldE8zREVEUzA2ZVpUeGs2ejJFUFEaMkZ5QTVrSTZSaVN3WlNFVmtlWHJsdzoxMDc=") - ); diff --git a/specification/async_search/get/examples/request/AsyncSearchGetRequestExample1.yaml b/specification/async_search/get/examples/request/AsyncSearchGetRequestExample1.yaml index d4a63fb3cf..89b9287b68 100644 --- a/specification/async_search/get/examples/request/AsyncSearchGetRequestExample1.yaml +++ b/specification/async_search/get/examples/request/AsyncSearchGetRequestExample1.yaml @@ -1,30 +1 @@ method_request: GET /_async_search/FmRldE8zREVEUzA2ZVpUeGs2ejJFUFEaMkZ5QTVrSTZSaVN3WlNFVmtlWHJsdzoxMDc= -alternatives: - - language: Python - code: |- - resp = client.async_search.get( - id="FmRldE8zREVEUzA2ZVpUeGs2ejJFUFEaMkZ5QTVrSTZSaVN3WlNFVmtlWHJsdzoxMDc=", - ) - - language: JavaScript - code: |- - const response = await client.asyncSearch.get({ - id: "FmRldE8zREVEUzA2ZVpUeGs2ejJFUFEaMkZ5QTVrSTZSaVN3WlNFVmtlWHJsdzoxMDc=", - }); - - language: Ruby - code: |- - response = client.async_search.get( - id: "FmRldE8zREVEUzA2ZVpUeGs2ejJFUFEaMkZ5QTVrSTZSaVN3WlNFVmtlWHJsdzoxMDc=" - ) - - language: PHP - code: |- - $resp = $client->asyncSearch()->get([ - "id" => "FmRldE8zREVEUzA2ZVpUeGs2ejJFUFEaMkZ5QTVrSTZSaVN3WlNFVmtlWHJsdzoxMDc=", - ]); - - language: curl - code: 'curl -X GET -H "Authorization: ApiKey $ELASTIC_API_KEY" - "$ELASTICSEARCH_URL/_async_search/FmRldE8zREVEUzA2ZVpUeGs2ejJFUFEaMkZ5QTVrSTZSaVN3WlNFVmtlWHJsdzoxMDc="' - - language: Java - code: | - client.asyncSearch().get(g -> g - .id("FmRldE8zREVEUzA2ZVpUeGs2ejJFUFEaMkZ5QTVrSTZSaVN3WlNFVmtlWHJsdzoxMDc=") - ); diff --git a/specification/async_search/status/examples/request/AsyncSearchStatusRequestExample1.yaml b/specification/async_search/status/examples/request/AsyncSearchStatusRequestExample1.yaml index 7e57391a4e..d62c737ab6 100644 --- a/specification/async_search/status/examples/request/AsyncSearchStatusRequestExample1.yaml +++ b/specification/async_search/status/examples/request/AsyncSearchStatusRequestExample1.yaml @@ -1,30 +1 @@ method_request: GET /_async_search/status/FmRldE8zREVEUzA2ZVpUeGs2ejJFUFEaMkZ5QTVrSTZSaVN3WlNFVmtlWHJsdzoxMDc= -alternatives: - - language: Python - code: |- - resp = client.async_search.status( - id="FmRldE8zREVEUzA2ZVpUeGs2ejJFUFEaMkZ5QTVrSTZSaVN3WlNFVmtlWHJsdzoxMDc=", - ) - - language: JavaScript - code: |- - const response = await client.asyncSearch.status({ - id: "FmRldE8zREVEUzA2ZVpUeGs2ejJFUFEaMkZ5QTVrSTZSaVN3WlNFVmtlWHJsdzoxMDc=", - }); - - language: Ruby - code: |- - response = client.async_search.status( - id: "FmRldE8zREVEUzA2ZVpUeGs2ejJFUFEaMkZ5QTVrSTZSaVN3WlNFVmtlWHJsdzoxMDc=" - ) - - language: PHP - code: |- - $resp = $client->asyncSearch()->status([ - "id" => "FmRldE8zREVEUzA2ZVpUeGs2ejJFUFEaMkZ5QTVrSTZSaVN3WlNFVmtlWHJsdzoxMDc=", - ]); - - language: curl - code: 'curl -X GET -H "Authorization: ApiKey $ELASTIC_API_KEY" - "$ELASTICSEARCH_URL/_async_search/status/FmRldE8zREVEUzA2ZVpUeGs2ejJFUFEaMkZ5QTVrSTZSaVN3WlNFVmtlWHJsdzoxMDc="' - - language: Java - code: | - client.asyncSearch().status(s -> s - .id("FmRldE8zREVEUzA2ZVpUeGs2ejJFUFEaMkZ5QTVrSTZSaVN3WlNFVmtlWHJsdzoxMDc=") - ); diff --git a/specification/async_search/submit/examples/request/AsyncSearchSubmitRequestExample1.yaml b/specification/async_search/submit/examples/request/AsyncSearchSubmitRequestExample1.yaml index 1555e90d1c..cc9da45f2a 100644 --- a/specification/async_search/submit/examples/request/AsyncSearchSubmitRequestExample1.yaml +++ b/specification/async_search/submit/examples/request/AsyncSearchSubmitRequestExample1.yaml @@ -29,115 +29,3 @@ value: "{ \ } }" -alternatives: - - language: Python - code: |- - resp = client.async_search.submit( - index="sales*", - size="0", - sort=[ - { - "date": { - "order": "asc" - } - } - ], - aggs={ - "sale_date": { - "date_histogram": { - "field": "date", - "calendar_interval": "1d" - } - } - }, - ) - - language: JavaScript - code: |- - const response = await client.asyncSearch.submit({ - index: "sales*", - size: 0, - sort: [ - { - date: { - order: "asc", - }, - }, - ], - aggs: { - sale_date: { - date_histogram: { - field: "date", - calendar_interval: "1d", - }, - }, - }, - }); - - language: Ruby - code: |- - response = client.async_search.submit( - index: "sales*", - size: "0", - body: { - "sort": [ - { - "date": { - "order": "asc" - } - } - ], - "aggs": { - "sale_date": { - "date_histogram": { - "field": "date", - "calendar_interval": "1d" - } - } - } - } - ) - - language: PHP - code: |- - $resp = $client->asyncSearch()->submit([ - "index" => "sales*", - "size" => "0", - "body" => [ - "sort" => array( - [ - "date" => [ - "order" => "asc", - ], - ], - ), - "aggs" => [ - "sale_date" => [ - "date_histogram" => [ - "field" => "date", - "calendar_interval" => "1d", - ], - ], - ], - ], - ]); - - language: curl - code: - "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d - '{\"sort\":[{\"date\":{\"order\":\"asc\"}}],\"aggs\":{\"sale_date\":{\"date_histogram\":{\"field\":\"date\",\"calendar_interv\ - al\":\"1d\"}}}}' \"$ELASTICSEARCH_URL/sales*/_async_search?size=0\"" - - language: Java - code: | - client.asyncSearch().submit(s -> s - .aggregations("sale_date", a -> a - .dateHistogram(d -> d - .calendarInterval(CalendarInterval.Day) - .field("date") - ) - ) - .index("sales*") - .size(0) - .sort(so -> so - .field(f -> f - .field("date") - .order(SortOrder.Asc) - ) - ) - ,Void.class); diff --git a/specification/autoscaling/delete_autoscaling_policy/examples/request/DeleteAutoscalingPolicyRequestExample1.yaml b/specification/autoscaling/delete_autoscaling_policy/examples/request/DeleteAutoscalingPolicyRequestExample1.yaml index 6f094d8737..ad73243750 100644 --- a/specification/autoscaling/delete_autoscaling_policy/examples/request/DeleteAutoscalingPolicyRequestExample1.yaml +++ b/specification/autoscaling/delete_autoscaling_policy/examples/request/DeleteAutoscalingPolicyRequestExample1.yaml @@ -1,29 +1 @@ method_request: DELETE /_autoscaling/policy/* -alternatives: - - language: Python - code: |- - resp = client.autoscaling.delete_autoscaling_policy( - name="*", - ) - - language: JavaScript - code: |- - const response = await client.autoscaling.deleteAutoscalingPolicy({ - name: "*", - }); - - language: Ruby - code: |- - response = client.autoscaling.delete_autoscaling_policy( - name: "*" - ) - - language: PHP - code: |- - $resp = $client->autoscaling()->deleteAutoscalingPolicy([ - "name" => "*", - ]); - - language: curl - code: 'curl -X DELETE -H "Authorization: ApiKey $ELASTIC_API_KEY" "$ELASTICSEARCH_URL/_autoscaling/policy/*"' - - language: Java - code: | - client.autoscaling().deleteAutoscalingPolicy(d -> d - .name("*") - ); diff --git a/specification/autoscaling/get_autoscaling_capacity/examples/request/GetAutoscalingCapacityRequestExample1.yaml b/specification/autoscaling/get_autoscaling_capacity/examples/request/GetAutoscalingCapacityRequestExample1.yaml index f15ffe3e92..3abcc14ffe 100644 --- a/specification/autoscaling/get_autoscaling_capacity/examples/request/GetAutoscalingCapacityRequestExample1.yaml +++ b/specification/autoscaling/get_autoscaling_capacity/examples/request/GetAutoscalingCapacityRequestExample1.yaml @@ -1,15 +1 @@ method_request: GET /_autoscaling/capacity -alternatives: - - language: Python - code: resp = client.autoscaling.get_autoscaling_capacity() - - language: JavaScript - code: const response = await client.autoscaling.getAutoscalingCapacity(); - - language: Ruby - code: response = client.autoscaling.get_autoscaling_capacity - - language: PHP - code: $resp = $client->autoscaling()->getAutoscalingCapacity(); - - language: curl - code: 'curl -X GET -H "Authorization: ApiKey $ELASTIC_API_KEY" "$ELASTICSEARCH_URL/_autoscaling/capacity"' - - language: Java - code: | - client.autoscaling().getAutoscalingCapacity(g -> g); diff --git a/specification/autoscaling/get_autoscaling_policy/examples/request/GetAutoscalingPolicyRequestExample1.yaml b/specification/autoscaling/get_autoscaling_policy/examples/request/GetAutoscalingPolicyRequestExample1.yaml index 87d4d76fbb..83b137b46d 100644 --- a/specification/autoscaling/get_autoscaling_policy/examples/request/GetAutoscalingPolicyRequestExample1.yaml +++ b/specification/autoscaling/get_autoscaling_policy/examples/request/GetAutoscalingPolicyRequestExample1.yaml @@ -1,29 +1 @@ method_request: GET /_autoscaling/policy/my_autoscaling_policy -alternatives: - - language: Python - code: |- - resp = client.autoscaling.get_autoscaling_policy( - name="my_autoscaling_policy", - ) - - language: JavaScript - code: |- - const response = await client.autoscaling.getAutoscalingPolicy({ - name: "my_autoscaling_policy", - }); - - language: Ruby - code: |- - response = client.autoscaling.get_autoscaling_policy( - name: "my_autoscaling_policy" - ) - - language: PHP - code: |- - $resp = $client->autoscaling()->getAutoscalingPolicy([ - "name" => "my_autoscaling_policy", - ]); - - language: curl - code: 'curl -X GET -H "Authorization: ApiKey $ELASTIC_API_KEY" "$ELASTICSEARCH_URL/_autoscaling/policy/my_autoscaling_policy"' - - language: Java - code: | - client.autoscaling().getAutoscalingPolicy(g -> g - .name("my_autoscaling_policy") - ); diff --git a/specification/autoscaling/put_autoscaling_policy/examples/request/PutAutoscalingPolicyRequestExample1.yaml b/specification/autoscaling/put_autoscaling_policy/examples/request/PutAutoscalingPolicyRequestExample1.yaml index cdf73773cf..7e5828a7af 100644 --- a/specification/autoscaling/put_autoscaling_policy/examples/request/PutAutoscalingPolicyRequestExample1.yaml +++ b/specification/autoscaling/put_autoscaling_policy/examples/request/PutAutoscalingPolicyRequestExample1.yaml @@ -15,61 +15,3 @@ value: "{ \ } }" -alternatives: - - language: Python - code: |- - resp = client.autoscaling.put_autoscaling_policy( - name="", - policy={ - "roles": [], - "deciders": { - "fixed": {} - } - }, - ) - - language: JavaScript - code: |- - const response = await client.autoscaling.putAutoscalingPolicy({ - name: "", - policy: { - roles: [], - deciders: { - fixed: {}, - }, - }, - }); - - language: Ruby - code: |- - response = client.autoscaling.put_autoscaling_policy( - name: "", - body: { - "roles": [], - "deciders": { - "fixed": {} - } - } - ) - - language: PHP - code: |- - $resp = $client->autoscaling()->putAutoscalingPolicy([ - "name" => "", - "body" => [ - "roles" => array( - ), - "deciders" => [ - "fixed" => new ArrayObject([]), - ], - ], - ]); - - language: curl - code: - 'curl -X PUT -H "Authorization: ApiKey $ELASTIC_API_KEY" -H "Content-Type: application/json" -d - ''{"roles":[],"deciders":{"fixed":{}}}'' "$ELASTICSEARCH_URL/_autoscaling/policy/"' - - language: Java - code: | - client.autoscaling().putAutoscalingPolicy(p -> p - .name("") - .policy(po -> po - .deciders("fixed", JsonData.fromJson("{}")) - ) - ); diff --git a/specification/autoscaling/put_autoscaling_policy/examples/request/PutAutoscalingPolicyRequestExample2.yaml b/specification/autoscaling/put_autoscaling_policy/examples/request/PutAutoscalingPolicyRequestExample2.yaml index 307246008a..745fe40d27 100644 --- a/specification/autoscaling/put_autoscaling_policy/examples/request/PutAutoscalingPolicyRequestExample2.yaml +++ b/specification/autoscaling/put_autoscaling_policy/examples/request/PutAutoscalingPolicyRequestExample2.yaml @@ -17,67 +17,3 @@ value: "{ \ } }" -alternatives: - - language: Python - code: |- - resp = client.autoscaling.put_autoscaling_policy( - name="my_autoscaling_policy", - policy={ - "roles": [ - "data_hot" - ], - "deciders": { - "fixed": {} - } - }, - ) - - language: JavaScript - code: |- - const response = await client.autoscaling.putAutoscalingPolicy({ - name: "my_autoscaling_policy", - policy: { - roles: ["data_hot"], - deciders: { - fixed: {}, - }, - }, - }); - - language: Ruby - code: |- - response = client.autoscaling.put_autoscaling_policy( - name: "my_autoscaling_policy", - body: { - "roles": [ - "data_hot" - ], - "deciders": { - "fixed": {} - } - } - ) - - language: PHP - code: |- - $resp = $client->autoscaling()->putAutoscalingPolicy([ - "name" => "my_autoscaling_policy", - "body" => [ - "roles" => array( - "data_hot", - ), - "deciders" => [ - "fixed" => new ArrayObject([]), - ], - ], - ]); - - language: curl - code: - 'curl -X PUT -H "Authorization: ApiKey $ELASTIC_API_KEY" -H "Content-Type: application/json" -d - ''{"roles":["data_hot"],"deciders":{"fixed":{}}}'' "$ELASTICSEARCH_URL/_autoscaling/policy/my_autoscaling_policy"' - - language: Java - code: | - client.autoscaling().putAutoscalingPolicy(p -> p - .name("my_autoscaling_policy") - .policy(po -> po - .roles("data_hot") - .deciders("fixed", JsonData.fromJson("{}")) - ) - ); diff --git a/specification/cat/_types/CatBase.ts b/specification/cat/_types/CatBase.ts index f27441f593..8c3860b5a0 100644 --- a/specification/cat/_types/CatBase.ts +++ b/specification/cat/_types/CatBase.ts @@ -1011,9 +1011,281 @@ export enum CatNodeColumn { version } +/** @non_exhaustive */ +export enum CatRecoveryColumn { + /** + * The name of the index. + * @aliases i, idx + */ + index, + /** + * The name of the shard. + * @aliases s, sh + */ + shard, + /** + * The recovery time elasped. + * @aliases t, ti, primaryOrReplica + */ + time, + /** + * The type of recovery, from a peer or a snapshot. + */ + type, + /** + * The stage of the recovery. Returned values are: `INIT`, `INDEX`: recovery of lucene files, either reusing local ones are copying new ones, `VERIFY_INDEX`: potentially running check index, `TRANSLOG`: starting up the engine, replaying the translog, `FINALIZE`: performing final task after all translog ops have been done, `DONE` + * @aliases st + */ + stage, + /** + * The host address the index is moving from. + * @aliases shost + */ + 'source_host', + /** + * The node name the index is moving from. + * @aliases snode + */ + 'source_node', + /** + * The host address the index is moving to. + * @aliases thost + */ + 'target_host', + /** + * The node name the index is moving to. + * @aliases tnode + */ + 'target_node', + /** + * The name of the repository being used. if not relevant 'n/a'. + * @aliases tnode + */ + 'repository', + /** + * The name of the snapshot being used. if not relevant 'n/a'. + * @aliases snap + */ + snapshot, + /** + * The total number of files to recover. + * @aliases f + */ + files, + /** + * The number of files currently recovered. + * @aliases fr + */ + 'files_recovered', + /** + * The percentage of files currently recovered. + * @aliases fp + */ + 'files_percent', + /** + * The total number of files. + * @aliases tf + */ + 'files_total', + /** + * The total number of bytes to recover. + * @aliases b + */ + bytes, + /** + * Total number of bytes currently recovered. + * @aliases br + */ + 'bytes_recovered', + /** + * The percentage of bytes currently recovered. + * @aliases bp + */ + 'bytes_percent', + /** + * The total number of bytes. + * @aliases tb + */ + 'bytes_total', + /** + * The total number of translog ops to recover. + * @aliases to + */ + 'translog_ops', + /** + * The total number of translog ops currently recovered. + * @aliases tor + */ + 'translog_ops_recovered', + /** + * The percentage of translog ops currently recovered. + * @aliases top + */ + 'translog_ops_percent', + /** + * The start time of the recovery operation. + * @aliases start + */ + 'start_time', + /** + * The start time of the recovery operation in eopch milliseconds. + * @aliases start_millis + */ + 'start_time_millis', + /** + * The end time of the recovery operation. If ongoing '1970-01-01T00:00:00.000Z' + * @aliases stop + */ + 'stop_time', + /** + * The end time of the recovery operation in eopch milliseconds. If ongoing '0' + * @aliases stop_millis + */ + 'stop_time_millis' +} + +/** @non_exhaustive */ +export enum CatSegmentsColumn { + /** + * The name of the index. + * @aliases i, idx + */ + index, + /** + * The name of the shard. + * @aliases s, sh + */ + shard, + /** + * The shard type. Returned values are 'primary' or 'replica'. + * @aliases p, pr, primaryOrReplica + */ + prirep, + /** + * IP address of the segment’s shard, such as '127.0.1.1'. + */ + ip, + /** + * The name of the segment, such as '_0'. The segment name is derived from the segment generation and used internally to create file names in the directory of the shard. + */ + segment, + /** + * Generation number, such as '0'. Elasticsearch increments this generation number for each segment written. Elasticsearch then uses this number to derive the segment name. + */ + generation, + /** + * The number of documents as reported by Lucene. This excludes deleted documents and counts any [nested documents](https://www.elastic.co/docs/reference/elasticsearch/mapping-reference/nested) separately from their parents. It also excludes documents which were indexed recently and do not yet belong to a segment. + */ + 'docs.count', + /** + * The number of deleted documents as reported by Lucene, which may be higher or lower than the number of delete operations you have performed. This number excludes deletes that were performed recently and do not yet belong to a segment. Deleted documents are cleaned up by the [automatic merge process](https://www.elastic.co/docs/reference/elasticsearch/index-settings/merge) if it makes sense to do so. Also, Elasticsearch creates extra deleted documents to internally track the recent history of operations on a shard. + */ + 'docs.deleted', + /** + * The disk space used by the segment, such as '50kb'. + */ + size, + /** + * The bytes of segment data stored in memory for efficient search, such as '1264'. A value of '-1' indicates Elasticsearch was unable to compute this number. + */ + 'size.memory', + /** + * If 'true', the segments is synced to disk. Segments that are synced can survive a hard reboot. If 'false', the data from uncommitted segments is also stored in the transaction log so that Elasticsearch is able to replay changes on the next start. + */ + committed, + /** + * If 'true', the segment is searchable. If 'false', the segment has most likely been written to disk but needs a [refresh](https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-refresh) to be searchable. + */ + searchable, + /** + * The version of Lucene used to write the segment. + */ + version, + /** + * If 'true', the segment is stored in a compound file. This means Lucene merged all files from the segment in a single file to save file descriptors. + */ + compound, + /** + * The ID of the node, such as 'k0zy'. + */ + id +} + +/** @non_exhaustive */ +export enum CatSnapshotsColumn { + /** + * The ID of the snapshot, such as 'snap1'. + * @aliases snapshot + */ + id, + /** + * The name of the repository, such as 'repo1'. + * @aliases re, repo + */ + repository, + /** + * State of the snapshot process. Returned values are: 'FAILED': The snapshot process failed. 'INCOMPATIBLE': The snapshot process is incompatible with the current cluster version. 'IN_PROGRESS': The snapshot process started but has not completed. 'PARTIAL': The snapshot process completed with a partial success. 'SUCCESS': The snapshot process completed with a full success. + * @aliases s + */ + status, + /** + * The [unix epoch time](https://en.wikipedia.org/wiki/Unix_time) at which the snapshot process started. + * @aliases ste, startEpoch + */ + 'start_epoch', + /** + * 'HH:MM:SS' time at which the snapshot process started. + * @aliases sti, startTime + */ + 'start_time', + /** + * The [unix epoch time](https://en.wikipedia.org/wiki/Unix_time) at which the snapshot process ended. + * @aliases ete, endEpoch + */ + 'end_epoch', + /** + * 'HH:MM:SS' time at which the snapshot process ended. + * @aliases eti, endTime + */ + 'end_time', + /** + * The time it took the snapshot process to complete in [time units](https://www.elastic.co/docs/reference/elasticsearch/rest-apis/api-conventions#time-units). + * @aliases dur + */ + duration, + /** + * The number of indices in the snapshot. + * @aliases i + */ + indices, + /** + * The number of successful shards in the snapshot. + * @aliases ss + */ + 'successful_shards', + /** + * The number of failed shards in the snapshot. + * @aliases fs + */ + 'failed_shards', + /** + * The total number of shards in the snapshot. + * @aliases ts + */ + 'total_shards', + /** + * The reason for any snapshot failures. + * @aliases r + */ + reason +} + export type CatDfaColumns = CatDfaColumn | CatDfaColumn[] export type CatDatafeedColumns = CatDatafeedColumn | CatDatafeedColumn[] export type CatNodeColumns = CatNodeColumn | CatNodeColumn[] +export type CatRecoveryColumns = CatRecoveryColumn | CatRecoveryColumn[] +export type CatSegmentsColumns = CatSegmentsColumn | CatSegmentsColumn[] +export type CatSnapshotsColumns = CatSnapshotsColumn | CatSnapshotsColumn[] export enum CatTrainedModelsColumn { /** @@ -1300,3 +1572,482 @@ export enum CatTransformColumn { version } export type CatTransformColumns = CatTransformColumn | CatTransformColumn[] + +/** @non_exhaustive */ +export enum CatShardColumn { + /** + * Size of completion. For example: `0b`. + * @aliases cs, completionSize + */ + 'completion.size', + /** + * Disk space used by the shard’s dataset, which may or may not be the size on + * disk, but includes space used by the shard on object storage. Reported as a size value for example: `5kb`. + */ + 'dataset.size', + /** + * Number of indexed dense vectors. + * @aliases dvc, denseVectorCount + */ + 'dense_vector.value_count', + /** + * Number of documents in shard, for example: `25`. + * @aliases d, dc + */ + 'docs', + /** + * Fielddata cache evictions, for example: `0`. + * @aliases fe, fielddataEvictions + */ + 'fielddata.evictions', + /** + * Used fielddata cache memory, for example: `0b`. + * @aliases fm, fielddataMemory + */ + 'fielddata.memory_size', + /** + * Number of flushes, for example: `1`. + * @aliases ft, flushTotal + */ + 'flush.total', + /** + * Time spent in flush, for example: `1`. + * @aliases ftt, flushTotalTime + */ + 'flush.total_time', + /** + * Number of current get operations, for example: `0`. + * @aliases gc, getCurrent + */ + 'get.current', + /** + * Time spent in successful gets, for example: `14ms`. + * @aliases geti, getExistsTime + */ + 'get.exists_time', + /** + * Number of successful get operations, for example: `2`. + * @aliases geto, getExistsTotal + */ + 'get.exists_total', + /** + * Time spent in failed gets, for example: `0s`. + * @aliases gmti, getMissingTime + */ + 'get.missing_time', + /** + * Number of failed get operations, for example: `1`. + * @aliases gmto, getMissingTotal + */ + 'get.missing_total', + /** + * Time spent in get, for example: `14ms`. + * @aliases gti, getTime + */ + 'get.time', + /** + * Number of get operations, for example: `2`. + * @aliases gto, getTotal + */ + 'get.total', + /** + * ID of the node, for example: `k0zy`. + */ + id, + /** + * Name of the index. + * @aliases i, idx + */ + index, + /** + * Number of current deletion operations, for example: `0`. + * @aliases idc, indexingDeleteCurrent + */ + 'indexing.delete_current', + /** + * Time spent in deletions, for example: `2ms`. + * @aliases idti, indexingDeleteTime + */ + 'indexing.delete_time', + /** + * Number of deletion operations, for example: `2`. + * @aliases idto, indexingDeleteTotal + */ + 'indexing.delete_total', + /** + * Number of current indexing operations, for example: `0`. + * @aliases iic, indexingIndexCurrent + */ + 'indexing.index_current', + /** + * Number of failed indexing operations due to version conflict, for example: `0`. + * @aliases iifvc, indexingIndexFailedDueToVersionConflict + */ + 'indexing.index_failed_due_to_version_conflict', + /** + * Number of failed indexing operations, for example: `0`. + * @aliases iif, indexingIndexFailed + */ + 'indexing.index_failed', + /** + * Time spent in indexing, such as for example: `134ms`. + * @aliases iiti, indexingIndexTime + */ + 'indexing.index_time', + /** + * Number of indexing operations, for example: `1`. + * @aliases iito, indexingIndexTotal + */ + 'indexing.index_total', + /** + * IP address of the node, for example: `127.0.1.1`. + */ + ip, + /** + * Number of current merge operations, for example: `0`. + * @aliases mc, mergesCurrent + */ + 'merges.current', + /** + * Number of current merging documents, for example: `0`. + * @aliases mcd, mergesCurrentDocs + */ + 'merges.current_docs', + /** + * Size of current merges, for example: `0b`. + * @aliases mcs, mergesCurrentSize + */ + 'merges.current_size', + /** + * Number of completed merge operations, for example: `0`. + * @aliases mt, mergesTotal + */ + 'merges.total', + /** + * Number of merged documents, for example: `0`. + * @aliases mtd, mergesTotalDocs + */ + 'merges.total_docs', + /** + * Size of current merges, for example: `0b`. + * @aliases mts, mergesTotalSize + */ + 'merges.total_size', + /** + * Time spent merging documents, for example: `0s`. + * @aliases mtt, mergesTotalTime + */ + 'merges.total_time', + /** + * Node name, for example: `I8hydUG`. + * @aliases n + */ + node, + /** + * Shard type. Returned values are `primary` or `replica`. + * @aliases p, pr, primaryOrReplica + */ + prirep, + /** + * Query cache evictions, for example: `0`. + * @aliases qce, queryCacheEvictions + */ + 'query_cache.evictions', + /** + * Used query cache memory, for example: `0b`. + * @aliases qcm, queryCacheMemory + */ + 'query_cache.memory_size', + /** + * Type of recovery source. + * @aliases rs + */ + 'recoverysource.type', + /** + * Time spent in refreshes, for example: `91ms`. + * @aliases rti, refreshTime + */ + 'refresh.time', + /** + * Number of refreshes, for example: `16`. + * @aliases rto, refreshTotal + */ + 'refresh.total', + /** + * Current fetch phase operations, for example: `0`. + * @aliases sfc, searchFetchCurrent + */ + 'search.fetch_current', + /** + * Time spent in fetch phase, for example: `37ms`. + * @aliases sfti, searchFetchTime + */ + 'search.fetch_time', + /** + * Number of fetch operations, for example: `7`. + * @aliases sfto, searchFetchTotal + */ + 'search.fetch_total', + /** + * Open search contexts, for example: `0`. + * @aliases so, searchOpenContexts + */ + 'search.open_contexts', + /** + * Current query phase operations, for example: `0`. + * @aliases sqc, searchQueryCurrent + */ + 'search.query_current', + /** + * Time spent in query phase, for example: `43ms`. + * @aliases sqti, searchQueryTime + */ + 'search.query_time', + /** + * Number of query operations, for example: `9`. + * @aliases sqto, searchQueryTotal + */ + 'search.query_total', + /** + * Open scroll contexts, for example: `2`. + * @aliases scc, searchScrollCurrent + */ + 'search.scroll_current', + /** + * Time scroll contexts held open, for example: `2m`. + * @aliases scti, searchScrollTime + */ + 'search.scroll_time', + /** + * Completed scroll contexts, for example: `1`. + * @aliases scto, searchScrollTotal + */ + 'search.scroll_total', + /** + * Number of segments, for example: `4`. + * @aliases sc, segmentsCount + */ + 'segments.count', + /** + * Memory used by fixed bit sets for nested object field types and type filters for types referred in join fields, for example: `1.0kb`. + * @aliases sfbm, fixedBitsetMemory + */ + 'segments.fixed_bitset_memory', + /** + * Memory used by index writer, for example: `18mb`. + * @aliases siwm, segmentsIndexWriterMemory + */ + 'segments.index_writer_memory', + /** + * Memory used by segments, for example: `1.4kb`. + * @aliases sm, segmentsMemory + */ + 'segments.memory', + /** + * Memory used by version map, for example: `1.0kb`. + * @aliases svmm, segmentsVersionMapMemory + */ + 'segments.version_map_memory', + /** + * Global checkpoint. + * @aliases sqg, globalCheckpoint + */ + 'seq_no.global_checkpoint', + /** + * Local checkpoint. + * @aliases sql, localCheckpoint + */ + 'seq_no.local_checkpoint', + /** + * Maximum sequence number. + * @aliases sqm, maxSeqNo + */ + 'seq_no.max', + /** + * Name of the shard. + * @aliases s, sh + */ + 'shard', + /** + * Number of indexed [sparse vectors](https://www.elastic.co/docs/reference/elasticsearch/mapping-reference/sparse-vector). + * @aliases svc, sparseVectorCount + */ + 'dsparse_vector.value_count', + /** + * State of the shard. Returned values are: + * * `INITIALIZING`: The shard is recovering from a peer shard or gateway. + * * `RELOCATING`: The shard is relocating. + * * `STARTED`: The shard has started. + * * `UNASSIGNED`: The shard is not assigned to any node. + * @aliases st + */ + 'state', + /** + * Disk space used by the shard, for example: `5kb`. + * @aliases sto + */ + 'store', + /** + * Number of current suggest operations, for example: `0`. + * @aliases suc, suggestCurrent + */ + 'suggest.current', + /** + * Time spent in suggest, for example: `0`. + * @aliases suti, suggestTime + */ + 'suggest.time', + /** + * Number of suggest operations, for example: `0`. + * @aliases suto, suggestTotal + */ + 'suggest.total', + /** + * Sync ID of the shard. + */ + sync_id, + /** + * Time at which the shard became unassigned in [Coordinated Universal Time (UTC)](https://en.wikipedia.org/wiki/List_of_UTC_offsets). + * @aliases ua + */ + 'unassigned.at', + /** + * Details about why the shard became unassigned. This does not explain why the shard is currently unassigned. To understand why a shard + * is not assigned, use the [Cluster allocation explain](https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-cluster-allocation-explain) API. + * @aliases ud + */ + 'unassigned.details', + /** + * Time at which the shard was requested to be unassigned in [Coordinated Universal Time (UTC)](https://en.wikipedia.org/wiki/List_of_UTC_offsets). + * @aliases uf + */ + 'unassigned.for', + /** + * Indicates the reason for the last change to the state of this unassigned shard. This does not explain why the shard is currently unassigned. + * To understand why a shard is not assigned, use the [Cluster allocation explain](https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-cluster-allocation-explain) API. Returned values include: + * + * * `ALLOCATION_FAILED`: Unassigned as a result of a failed allocation of the shard. + * * `CLUSTER_RECOVERED`: Unassigned as a result of a full cluster recovery. + * * `DANGLING_INDEX_IMPORTED`: Unassigned as a result of importing a dangling index. + * * `EXISTING_INDEX_RESTORED`: Unassigned as a result of restoring into a closed index. + * * `FORCED_EMPTY_PRIMARY`: The shard’s allocation was last modified by forcing an empty primary using the Cluster reroute API. + * * `INDEX_CLOSED`: Unassigned because the index was closed. + * * `INDEX_CREATED`: Unassigned as a result of an API creation of an index. + * * `INDEX_REOPENED`: Unassigned as a result of opening a closed index. + * * `MANUAL_ALLOCATION`: The shard’s allocation was last modified by the Cluster reroute API. + * * `NEW_INDEX_RESTORED`: Unassigned as a result of restoring into a new index. + * * `NODE_LEFT`: Unassigned as a result of the node hosting it leaving the cluster. + * * `NODE_RESTARTING`: Similar to `NODE_LEFT`, except that the node was registered as restarting using the Node shutdown API. + * * `PRIMARY_FAILED`: The shard was initializing as a replica, but the primary shard failed before the initialization completed. + * * `REALLOCATED_REPLICA`: A better replica location is identified and causes the existing replica allocation to be cancelled. + * * `REINITIALIZED`: When a shard moves from started back to initializing. + * * `REPLICA_ADDED`: Unassigned as a result of explicit addition of a replica. + * * `REROUTE_CANCELLED`: Unassigned as a result of explicit cancel reroute command. + * @aliases ur + */ + 'unassigned.reason' +} +export type CatShardColumns = CatShardColumn | CatShardColumn[] + +/** @non_exhaustive */ +export enum CatThreadPoolColumn { + /** + * Number of active threads in the current thread pool. + * @aliases a + */ + active, + /** + * Number of tasks completed by the thread pool executor. + * @aliases c + */ + completed, + /** + * Configured core number of active threads allowed in the current thread pool. + * @aliases cr + */ + core, + /** + * Ephemeral node ID. + * @aliases eid + */ + ephemeral_id, + /** + * Hostname for the current node. + * @aliases h + */ + host, + /** + * IP address for the current node. + * @aliases i + */ + ip, + /** + * Configured keep alive time for threads. + * @aliases k + */ + keep_alive, + /** + * Highest number of active threads in the current thread pool. + * @aliases l + */ + largest, + /** + * Configured maximum number of active threads allowed in the current thread pool. + * @aliases mx + */ + max, + /** + * Name of the thread pool, such as `analyze` or `generic`. + */ + name, + /** + * ID of the node, such as `k0zy`. + * @aliases id + */ + node_id, + /** + * Node name, such as `I8hydUG`. + */ + node_name, + /** + * Process ID of the running node. + * @aliases p + */ + pid, + /** + * Number of threads in the current thread pool. + * @aliases psz + */ + pool_size, + /** + * Bound transport port for the current node. + * @aliases po + */ + port, + /** + * Number of tasks in the queue for the current thread pool. + * @aliases q + */ + queue, + /** + * Maximum number of tasks permitted in the queue for the current thread pool. + * @aliases qs + */ + queue_size, + /** + * Number of tasks rejected by the thread pool executor. + * @aliases r + */ + rejected, + /** + * Configured fixed number of active threads allowed in the current thread pool. + * @aliases sz + */ + size, + /** + * Type of thread pool. Returned values are `fixed`, `fixed_auto_queue_size`, `direct`, or `scaling`. + * @aliases t + */ + type +} +export type CatThreadPoolColumns = CatThreadPoolColumn | CatThreadPoolColumn[] diff --git a/specification/cat/aliases/examples/request/CatAliasesRequestExample1.yaml b/specification/cat/aliases/examples/request/CatAliasesRequestExample1.yaml index c2644b3287..e74bd1e9f8 100644 --- a/specification/cat/aliases/examples/request/CatAliasesRequestExample1.yaml +++ b/specification/cat/aliases/examples/request/CatAliasesRequestExample1.yaml @@ -1,31 +1 @@ method_request: GET _cat/aliases?format=json&v=true -alternatives: - - language: Python - code: |- - resp = client.cat.aliases( - format="json", - v=True, - ) - - language: JavaScript - code: |- - const response = await client.cat.aliases({ - format: "json", - v: "true", - }); - - language: Ruby - code: |- - response = client.cat.aliases( - format: "json", - v: "true" - ) - - language: PHP - code: |- - $resp = $client->cat()->aliases([ - "format" => "json", - "v" => "true", - ]); - - language: curl - code: 'curl -X GET -H "Authorization: ApiKey $ELASTIC_API_KEY" "$ELASTICSEARCH_URL/_cat/aliases?format=json&v=true"' - - language: Java - code: | - client.cat().aliases(); diff --git a/specification/cat/allocation/examples/request/CatAllocationRequestExample1.yaml b/specification/cat/allocation/examples/request/CatAllocationRequestExample1.yaml index efa0210977..aaa367a7da 100644 --- a/specification/cat/allocation/examples/request/CatAllocationRequestExample1.yaml +++ b/specification/cat/allocation/examples/request/CatAllocationRequestExample1.yaml @@ -1,31 +1 @@ method_request: GET /_cat/allocation?v=true&format=json -alternatives: - - language: Python - code: |- - resp = client.cat.allocation( - v=True, - format="json", - ) - - language: JavaScript - code: |- - const response = await client.cat.allocation({ - v: "true", - format: "json", - }); - - language: Ruby - code: |- - response = client.cat.allocation( - v: "true", - format: "json" - ) - - language: PHP - code: |- - $resp = $client->cat()->allocation([ - "v" => "true", - "format" => "json", - ]); - - language: curl - code: 'curl -X GET -H "Authorization: ApiKey $ELASTIC_API_KEY" "$ELASTICSEARCH_URL/_cat/allocation?v=true&format=json"' - - language: Java - code: | - client.cat().allocation(); diff --git a/specification/cat/component_templates/examples/request/CatComponentTemplatesRequestExample1.yaml b/specification/cat/component_templates/examples/request/CatComponentTemplatesRequestExample1.yaml index 5c915001b0..495d410df0 100644 --- a/specification/cat/component_templates/examples/request/CatComponentTemplatesRequestExample1.yaml +++ b/specification/cat/component_templates/examples/request/CatComponentTemplatesRequestExample1.yaml @@ -1,40 +1 @@ method_request: GET _cat/component_templates/my-template-*?v=true&s=name&format=json -alternatives: - - language: Python - code: |- - resp = client.cat.component_templates( - name="my-template-*", - v=True, - s="name", - format="json", - ) - - language: JavaScript - code: |- - const response = await client.cat.componentTemplates({ - name: "my-template-*", - v: "true", - s: "name", - format: "json", - }); - - language: Ruby - code: |- - response = client.cat.component_templates( - name: "my-template-*", - v: "true", - s: "name", - format: "json" - ) - - language: PHP - code: |- - $resp = $client->cat()->componentTemplates([ - "name" => "my-template-*", - "v" => "true", - "s" => "name", - "format" => "json", - ]); - - language: curl - code: 'curl -X GET -H "Authorization: ApiKey $ELASTIC_API_KEY" - "$ELASTICSEARCH_URL/_cat/component_templates/my-template-*?v=true&s=name&format=json"' - - language: Java - code: | - client.cat().componentTemplates(); diff --git a/specification/cat/count/examples/request/CatCountRequestExample1.yaml b/specification/cat/count/examples/request/CatCountRequestExample1.yaml index 4b9417aefd..60f5075a99 100644 --- a/specification/cat/count/examples/request/CatCountRequestExample1.yaml +++ b/specification/cat/count/examples/request/CatCountRequestExample1.yaml @@ -1,35 +1 @@ method_request: GET /_cat/count/my-index-000001?v=true&format=json -alternatives: - - language: Python - code: |- - resp = client.cat.count( - index="my-index-000001", - v=True, - format="json", - ) - - language: JavaScript - code: |- - const response = await client.cat.count({ - index: "my-index-000001", - v: "true", - format: "json", - }); - - language: Ruby - code: |- - response = client.cat.count( - index: "my-index-000001", - v: "true", - format: "json" - ) - - language: PHP - code: |- - $resp = $client->cat()->count([ - "index" => "my-index-000001", - "v" => "true", - "format" => "json", - ]); - - language: curl - code: 'curl -X GET -H "Authorization: ApiKey $ELASTIC_API_KEY" "$ELASTICSEARCH_URL/_cat/count/my-index-000001?v=true&format=json"' - - language: Java - code: | - client.cat().count(); diff --git a/specification/cat/fielddata/examples/request/CatFielddataRequestExample1.yaml b/specification/cat/fielddata/examples/request/CatFielddataRequestExample1.yaml index 81ae892ce5..5394203473 100644 --- a/specification/cat/fielddata/examples/request/CatFielddataRequestExample1.yaml +++ b/specification/cat/fielddata/examples/request/CatFielddataRequestExample1.yaml @@ -1,35 +1 @@ method_request: GET /_cat/fielddata?v=true&fields=body&format=json -alternatives: - - language: Python - code: |- - resp = client.cat.fielddata( - v=True, - fields="body", - format="json", - ) - - language: JavaScript - code: |- - const response = await client.cat.fielddata({ - v: "true", - fields: "body", - format: "json", - }); - - language: Ruby - code: |- - response = client.cat.fielddata( - v: "true", - fields: "body", - format: "json" - ) - - language: PHP - code: |- - $resp = $client->cat()->fielddata([ - "v" => "true", - "fields" => "body", - "format" => "json", - ]); - - language: curl - code: 'curl -X GET -H "Authorization: ApiKey $ELASTIC_API_KEY" "$ELASTICSEARCH_URL/_cat/fielddata?v=true&fields=body&format=json"' - - language: Java - code: | - client.cat().fielddata(); diff --git a/specification/cat/health/examples/request/CatHealthRequestExample1.yaml b/specification/cat/health/examples/request/CatHealthRequestExample1.yaml index 3f54cd484f..2c6c0610a6 100644 --- a/specification/cat/health/examples/request/CatHealthRequestExample1.yaml +++ b/specification/cat/health/examples/request/CatHealthRequestExample1.yaml @@ -1,31 +1 @@ method_request: GET /_cat/health?v=true&format=json -alternatives: - - language: Python - code: |- - resp = client.cat.health( - v=True, - format="json", - ) - - language: JavaScript - code: |- - const response = await client.cat.health({ - v: "true", - format: "json", - }); - - language: Ruby - code: |- - response = client.cat.health( - v: "true", - format: "json" - ) - - language: PHP - code: |- - $resp = $client->cat()->health([ - "v" => "true", - "format" => "json", - ]); - - language: curl - code: 'curl -X GET -H "Authorization: ApiKey $ELASTIC_API_KEY" "$ELASTICSEARCH_URL/_cat/health?v=true&format=json"' - - language: Java - code: | - client.cat().health(); diff --git a/specification/cat/indices/examples/request/CatIndicesRequestExample1.yaml b/specification/cat/indices/examples/request/CatIndicesRequestExample1.yaml index 5934f98f58..523656aac9 100644 --- a/specification/cat/indices/examples/request/CatIndicesRequestExample1.yaml +++ b/specification/cat/indices/examples/request/CatIndicesRequestExample1.yaml @@ -1,40 +1 @@ method_request: GET /_cat/indices/my-index-*?v=true&s=index&format=json -alternatives: - - language: Python - code: |- - resp = client.cat.indices( - index="my-index-*", - v=True, - s="index", - format="json", - ) - - language: JavaScript - code: |- - const response = await client.cat.indices({ - index: "my-index-*", - v: "true", - s: "index", - format: "json", - }); - - language: Ruby - code: |- - response = client.cat.indices( - index: "my-index-*", - v: "true", - s: "index", - format: "json" - ) - - language: PHP - code: |- - $resp = $client->cat()->indices([ - "index" => "my-index-*", - "v" => "true", - "s" => "index", - "format" => "json", - ]); - - language: curl - code: 'curl -X GET -H "Authorization: ApiKey $ELASTIC_API_KEY" - "$ELASTICSEARCH_URL/_cat/indices/my-index-*?v=true&s=index&format=json"' - - language: Java - code: | - client.cat().indices(); diff --git a/specification/cat/master/examples/request/CatMasterRequestExample1.yaml b/specification/cat/master/examples/request/CatMasterRequestExample1.yaml index 8b2bba5afe..acbdcbf9b2 100644 --- a/specification/cat/master/examples/request/CatMasterRequestExample1.yaml +++ b/specification/cat/master/examples/request/CatMasterRequestExample1.yaml @@ -1,31 +1 @@ method_request: GET /_cat/master?v=true&format=json -alternatives: - - language: Python - code: |- - resp = client.cat.master( - v=True, - format="json", - ) - - language: JavaScript - code: |- - const response = await client.cat.master({ - v: "true", - format: "json", - }); - - language: Ruby - code: |- - response = client.cat.master( - v: "true", - format: "json" - ) - - language: PHP - code: |- - $resp = $client->cat()->master([ - "v" => "true", - "format" => "json", - ]); - - language: curl - code: 'curl -X GET -H "Authorization: ApiKey $ELASTIC_API_KEY" "$ELASTICSEARCH_URL/_cat/master?v=true&format=json"' - - language: Java - code: | - client.cat().master(); diff --git a/specification/cat/ml_data_frame_analytics/examples/request/CatDataframeanalyticsRequestExample1.yaml b/specification/cat/ml_data_frame_analytics/examples/request/CatDataframeanalyticsRequestExample1.yaml index b1a41228f4..9ea5e61f8b 100644 --- a/specification/cat/ml_data_frame_analytics/examples/request/CatDataframeanalyticsRequestExample1.yaml +++ b/specification/cat/ml_data_frame_analytics/examples/request/CatDataframeanalyticsRequestExample1.yaml @@ -1,31 +1 @@ method_request: GET _cat/ml/data_frame/analytics?v=true&format=json -alternatives: - - language: Python - code: |- - resp = client.cat.ml_data_frame_analytics( - v=True, - format="json", - ) - - language: JavaScript - code: |- - const response = await client.cat.mlDataFrameAnalytics({ - v: "true", - format: "json", - }); - - language: Ruby - code: |- - response = client.cat.ml_data_frame_analytics( - v: "true", - format: "json" - ) - - language: PHP - code: |- - $resp = $client->cat()->mlDataFrameAnalytics([ - "v" => "true", - "format" => "json", - ]); - - language: curl - code: 'curl -X GET -H "Authorization: ApiKey $ELASTIC_API_KEY" "$ELASTICSEARCH_URL/_cat/ml/data_frame/analytics?v=true&format=json"' - - language: Java - code: | - client.cat().mlDataFrameAnalytics(); diff --git a/specification/cat/ml_datafeeds/examples/request/CatDatafeedsRequestExample1.yaml b/specification/cat/ml_datafeeds/examples/request/CatDatafeedsRequestExample1.yaml index 3196d11788..33cc34fb9f 100644 --- a/specification/cat/ml_datafeeds/examples/request/CatDatafeedsRequestExample1.yaml +++ b/specification/cat/ml_datafeeds/examples/request/CatDatafeedsRequestExample1.yaml @@ -1,31 +1 @@ method_request: GET _cat/ml/datafeeds?v=true&format=json -alternatives: - - language: Python - code: |- - resp = client.cat.ml_datafeeds( - v=True, - format="json", - ) - - language: JavaScript - code: |- - const response = await client.cat.mlDatafeeds({ - v: "true", - format: "json", - }); - - language: Ruby - code: |- - response = client.cat.ml_datafeeds( - v: "true", - format: "json" - ) - - language: PHP - code: |- - $resp = $client->cat()->mlDatafeeds([ - "v" => "true", - "format" => "json", - ]); - - language: curl - code: 'curl -X GET -H "Authorization: ApiKey $ELASTIC_API_KEY" "$ELASTICSEARCH_URL/_cat/ml/datafeeds?v=true&format=json"' - - language: Java - code: | - client.cat().mlDatafeeds(); diff --git a/specification/cat/ml_jobs/examples/request/CatJobsRequestExample1.yaml b/specification/cat/ml_jobs/examples/request/CatJobsRequestExample1.yaml index 2ccf72d1c5..3b72c00db8 100644 --- a/specification/cat/ml_jobs/examples/request/CatJobsRequestExample1.yaml +++ b/specification/cat/ml_jobs/examples/request/CatJobsRequestExample1.yaml @@ -1,36 +1 @@ method_request: GET _cat/ml/anomaly_detectors?h=id,s,dpr,mb&v=true&format=json -alternatives: - - language: Python - code: |- - resp = client.cat.ml_jobs( - h="id,s,dpr,mb", - v=True, - format="json", - ) - - language: JavaScript - code: |- - const response = await client.cat.mlJobs({ - h: "id,s,dpr,mb", - v: "true", - format: "json", - }); - - language: Ruby - code: |- - response = client.cat.ml_jobs( - h: "id,s,dpr,mb", - v: "true", - format: "json" - ) - - language: PHP - code: |- - $resp = $client->cat()->mlJobs([ - "h" => "id,s,dpr,mb", - "v" => "true", - "format" => "json", - ]); - - language: curl - code: 'curl -X GET -H "Authorization: ApiKey $ELASTIC_API_KEY" - "$ELASTICSEARCH_URL/_cat/ml/anomaly_detectors?h=id,s,dpr,mb&v=true&format=json"' - - language: Java - code: | - client.cat().mlJobs(); diff --git a/specification/cat/ml_trained_models/examples/request/CatTrainedModelsRequestExample1.yaml b/specification/cat/ml_trained_models/examples/request/CatTrainedModelsRequestExample1.yaml index 092023b08e..8c8e3cd670 100644 --- a/specification/cat/ml_trained_models/examples/request/CatTrainedModelsRequestExample1.yaml +++ b/specification/cat/ml_trained_models/examples/request/CatTrainedModelsRequestExample1.yaml @@ -1,31 +1 @@ method_request: GET _cat/ml/trained_models?v=true&format=json -alternatives: - - language: Python - code: |- - resp = client.cat.ml_trained_models( - v=True, - format="json", - ) - - language: JavaScript - code: |- - const response = await client.cat.mlTrainedModels({ - v: "true", - format: "json", - }); - - language: Ruby - code: |- - response = client.cat.ml_trained_models( - v: "true", - format: "json" - ) - - language: PHP - code: |- - $resp = $client->cat()->mlTrainedModels([ - "v" => "true", - "format" => "json", - ]); - - language: curl - code: 'curl -X GET -H "Authorization: ApiKey $ELASTIC_API_KEY" "$ELASTICSEARCH_URL/_cat/ml/trained_models?v=true&format=json"' - - language: Java - code: | - client.cat().mlTrainedModels(); diff --git a/specification/cat/nodeattrs/examples/request/CatNodeAttributesRequestExample1.yaml b/specification/cat/nodeattrs/examples/request/CatNodeAttributesRequestExample1.yaml index 2ce5d90458..2b5cf70c7a 100644 --- a/specification/cat/nodeattrs/examples/request/CatNodeAttributesRequestExample1.yaml +++ b/specification/cat/nodeattrs/examples/request/CatNodeAttributesRequestExample1.yaml @@ -1,31 +1 @@ method_request: GET /_cat/nodeattrs?v=true&format=json -alternatives: - - language: Python - code: |- - resp = client.cat.nodeattrs( - v=True, - format="json", - ) - - language: JavaScript - code: |- - const response = await client.cat.nodeattrs({ - v: "true", - format: "json", - }); - - language: Ruby - code: |- - response = client.cat.nodeattrs( - v: "true", - format: "json" - ) - - language: PHP - code: |- - $resp = $client->cat()->nodeattrs([ - "v" => "true", - "format" => "json", - ]); - - language: curl - code: 'curl -X GET -H "Authorization: ApiKey $ELASTIC_API_KEY" "$ELASTICSEARCH_URL/_cat/nodeattrs?v=true&format=json"' - - language: Java - code: | - client.cat().nodeattrs(); diff --git a/specification/cat/nodes/examples/request/CatNodesRequestExample2.yaml b/specification/cat/nodes/examples/request/CatNodesRequestExample2.yaml index 5c436967da..d3f9a54521 100644 --- a/specification/cat/nodes/examples/request/CatNodesRequestExample2.yaml +++ b/specification/cat/nodes/examples/request/CatNodesRequestExample2.yaml @@ -1,35 +1 @@ method_request: GET /_cat/nodes?v=true&h=id,ip,port,v,m&format=json -alternatives: - - language: Python - code: |- - resp = client.cat.nodes( - v=True, - h="id,ip,port,v,m", - format="json", - ) - - language: JavaScript - code: |- - const response = await client.cat.nodes({ - v: "true", - h: "id,ip,port,v,m", - format: "json", - }); - - language: Ruby - code: |- - response = client.cat.nodes( - v: "true", - h: "id,ip,port,v,m", - format: "json" - ) - - language: PHP - code: |- - $resp = $client->cat()->nodes([ - "v" => "true", - "h" => "id,ip,port,v,m", - "format" => "json", - ]); - - language: curl - code: 'curl -X GET -H "Authorization: ApiKey $ELASTIC_API_KEY" "$ELASTICSEARCH_URL/_cat/nodes?v=true&h=id,ip,port,v,m&format=json"' - - language: Java - code: | - client.cat().nodes(); diff --git a/specification/cat/pending_tasks/examples/request/CatPendingTasksRequestExample1.yaml b/specification/cat/pending_tasks/examples/request/CatPendingTasksRequestExample1.yaml index 609fc1fd30..74c11769eb 100644 --- a/specification/cat/pending_tasks/examples/request/CatPendingTasksRequestExample1.yaml +++ b/specification/cat/pending_tasks/examples/request/CatPendingTasksRequestExample1.yaml @@ -1,32 +1 @@ method_request: GET /_cat/pending_tasks?v=trueh=insertOrder,timeInQueue,priority,source&format=json -alternatives: - - language: Python - code: |- - resp = client.cat.pending_tasks( - v="trueh=insertOrder,timeInQueue,priority,source", - format="json", - ) - - language: JavaScript - code: |- - const response = await client.cat.pendingTasks({ - v: "trueh=insertOrder,timeInQueue,priority,source", - format: "json", - }); - - language: Ruby - code: |- - response = client.cat.pending_tasks( - v: "trueh=insertOrder,timeInQueue,priority,source", - format: "json" - ) - - language: PHP - code: |- - $resp = $client->cat()->pendingTasks([ - "v" => "trueh=insertOrder,timeInQueue,priority,source", - "format" => "json", - ]); - - language: curl - code: 'curl -X GET -H "Authorization: ApiKey $ELASTIC_API_KEY" - "$ELASTICSEARCH_URL/_cat/pending_tasks?v=trueh=insertOrder,timeInQueue,priority,source&format=json"' - - language: Java - code: | - client.cat().pendingTasks(); diff --git a/specification/cat/plugins/examples/request/CatPluginsRequestExample1.yaml b/specification/cat/plugins/examples/request/CatPluginsRequestExample1.yaml index d9ea551db5..92f220096b 100644 --- a/specification/cat/plugins/examples/request/CatPluginsRequestExample1.yaml +++ b/specification/cat/plugins/examples/request/CatPluginsRequestExample1.yaml @@ -1,40 +1 @@ method_request: GET /_cat/plugins?v=true&s=component&h=name,component,version,description&format=json -alternatives: - - language: Python - code: |- - resp = client.cat.plugins( - v=True, - s="component", - h="name,component,version,description", - format="json", - ) - - language: JavaScript - code: |- - const response = await client.cat.plugins({ - v: "true", - s: "component", - h: "name,component,version,description", - format: "json", - }); - - language: Ruby - code: |- - response = client.cat.plugins( - v: "true", - s: "component", - h: "name,component,version,description", - format: "json" - ) - - language: PHP - code: |- - $resp = $client->cat()->plugins([ - "v" => "true", - "s" => "component", - "h" => "name,component,version,description", - "format" => "json", - ]); - - language: curl - code: 'curl -X GET -H "Authorization: ApiKey $ELASTIC_API_KEY" - "$ELASTICSEARCH_URL/_cat/plugins?v=true&s=component&h=name,component,version,description&format=json"' - - language: Java - code: | - client.cat().plugins(); diff --git a/specification/cat/recovery/CatRecoveryRequest.ts b/specification/cat/recovery/CatRecoveryRequest.ts index 368bfdb969..6ee0ebb8c5 100644 --- a/specification/cat/recovery/CatRecoveryRequest.ts +++ b/specification/cat/recovery/CatRecoveryRequest.ts @@ -19,7 +19,7 @@ import { Bytes, Indices, Names } from '@_types/common' import { TimeUnit } from '@_types/Time' -import { CatRequestBase } from '@cat/_types/CatBase' +import { CatRecoveryColumns, CatRequestBase } from '@cat/_types/CatBase' /** * Get shard recovery information. @@ -73,17 +73,19 @@ export interface Request extends CatRequestBase { */ index?: Indices /** - * List of columns to appear in the response. Supports simple wildcards. + * A comma-separated list of columns names to display. + * It supports simple wildcards. + * @server_default ip,hp,rp,r,m,n,cpu,l */ - h?: Names + h?: CatRecoveryColumns /** - * List of columns that determine how the table should be sorted. + * A comma-separated list of column names or aliases that determines the sort order. * Sorting defaults to ascending and can be changed by setting `:asc` * or `:desc` as a suffix to the column name. */ s?: Names /** - * Unit used to display time values. + * The unit used to display time values. */ time?: TimeUnit } diff --git a/specification/cat/recovery/examples/request/CatRecoveryRequestExample1.yaml b/specification/cat/recovery/examples/request/CatRecoveryRequestExample1.yaml index 5e0826bffb..f2294cb1bd 100644 --- a/specification/cat/recovery/examples/request/CatRecoveryRequestExample1.yaml +++ b/specification/cat/recovery/examples/request/CatRecoveryRequestExample1.yaml @@ -1,31 +1 @@ method_request: GET _cat/recovery?v=true&format=json -alternatives: - - language: Python - code: |- - resp = client.cat.recovery( - v=True, - format="json", - ) - - language: JavaScript - code: |- - const response = await client.cat.recovery({ - v: "true", - format: "json", - }); - - language: Ruby - code: |- - response = client.cat.recovery( - v: "true", - format: "json" - ) - - language: PHP - code: |- - $resp = $client->cat()->recovery([ - "v" => "true", - "format" => "json", - ]); - - language: curl - code: 'curl -X GET -H "Authorization: ApiKey $ELASTIC_API_KEY" "$ELASTICSEARCH_URL/_cat/recovery?v=true&format=json"' - - language: Java - code: | - client.cat().recovery(); diff --git a/specification/cat/repositories/examples/request/CatRepositoriesRequestExample1.yaml b/specification/cat/repositories/examples/request/CatRepositoriesRequestExample1.yaml index 72ea6d7560..7ed353b671 100644 --- a/specification/cat/repositories/examples/request/CatRepositoriesRequestExample1.yaml +++ b/specification/cat/repositories/examples/request/CatRepositoriesRequestExample1.yaml @@ -1,31 +1 @@ method_request: GET /_cat/repositories?v=true&format=json -alternatives: - - language: Python - code: |- - resp = client.cat.repositories( - v=True, - format="json", - ) - - language: JavaScript - code: |- - const response = await client.cat.repositories({ - v: "true", - format: "json", - }); - - language: Ruby - code: |- - response = client.cat.repositories( - v: "true", - format: "json" - ) - - language: PHP - code: |- - $resp = $client->cat()->repositories([ - "v" => "true", - "format" => "json", - ]); - - language: curl - code: 'curl -X GET -H "Authorization: ApiKey $ELASTIC_API_KEY" "$ELASTICSEARCH_URL/_cat/repositories?v=true&format=json"' - - language: Java - code: | - client.cat().repositories(); diff --git a/specification/cat/segments/CatSegmentsRequest.ts b/specification/cat/segments/CatSegmentsRequest.ts index 1a2987901c..9bdb64e5c0 100644 --- a/specification/cat/segments/CatSegmentsRequest.ts +++ b/specification/cat/segments/CatSegmentsRequest.ts @@ -19,7 +19,7 @@ import { Bytes, Indices, Names } from '@_types/common' import { Duration } from '@_types/Time' -import { CatRequestBase } from '@cat/_types/CatBase' +import { CatRequestBase, CatSegmentsColumns } from '@cat/_types/CatBase' /** * Get segment information. @@ -59,11 +59,13 @@ export interface Request extends CatRequestBase { */ bytes?: Bytes /** - * List of columns to appear in the response. Supports simple wildcards. + * A comma-separated list of columns names to display. + * It supports simple wildcards. + * @server_default ip,hp,rp,r,m,n,cpu,l */ - h?: Names + h?: CatSegmentsColumns /** - * List of columns that determine how the table should be sorted. + * A comma-separated list of column names or aliases that determines the sort order. * Sorting defaults to ascending and can be changed by setting `:asc` * or `:desc` as a suffix to the column name. */ diff --git a/specification/cat/segments/examples/request/CatSegmentsRequestExample1.yaml b/specification/cat/segments/examples/request/CatSegmentsRequestExample1.yaml index ad082cb170..36610bf7fe 100644 --- a/specification/cat/segments/examples/request/CatSegmentsRequestExample1.yaml +++ b/specification/cat/segments/examples/request/CatSegmentsRequestExample1.yaml @@ -1,31 +1 @@ method_request: GET /_cat/segments?v=true&format=json -alternatives: - - language: Python - code: |- - resp = client.cat.segments( - v=True, - format="json", - ) - - language: JavaScript - code: |- - const response = await client.cat.segments({ - v: "true", - format: "json", - }); - - language: Ruby - code: |- - response = client.cat.segments( - v: "true", - format: "json" - ) - - language: PHP - code: |- - $resp = $client->cat()->segments([ - "v" => "true", - "format" => "json", - ]); - - language: curl - code: 'curl -X GET -H "Authorization: ApiKey $ELASTIC_API_KEY" "$ELASTICSEARCH_URL/_cat/segments?v=true&format=json"' - - language: Java - code: | - client.cat().segments(); diff --git a/specification/cat/shards/CatShardsRequest.ts b/specification/cat/shards/CatShardsRequest.ts index 487575d7c5..dd3aa69801 100644 --- a/specification/cat/shards/CatShardsRequest.ts +++ b/specification/cat/shards/CatShardsRequest.ts @@ -19,7 +19,7 @@ import { Bytes, Indices, Names } from '@_types/common' import { Duration, TimeUnit } from '@_types/Time' -import { CatRequestBase } from '@cat/_types/CatBase' +import { CatRequestBase, CatShardColumns } from '@cat/_types/CatBase' /** * Get shard information. @@ -61,20 +61,20 @@ export interface Request extends CatRequestBase { /** * List of columns to appear in the response. Supports simple wildcards. */ - h?: Names + h?: CatShardColumns /** - * List of columns that determine how the table should be sorted. + * A comma-separated list of column names or aliases that determines the sort order. * Sorting defaults to ascending and can be changed by setting `:asc` * or `:desc` as a suffix to the column name. */ s?: Names /** - * Period to wait for a connection to the master node. + * The period to wait for a connection to the master node. * @server_default 30s */ master_timeout?: Duration /** - * Unit used to display time values. + * The unit used to display time values. */ time?: TimeUnit } diff --git a/specification/cat/shards/examples/request/CatShardsRequestExample1.yaml b/specification/cat/shards/examples/request/CatShardsRequestExample1.yaml index 8f2e6d0b31..a4c20ed991 100644 --- a/specification/cat/shards/examples/request/CatShardsRequestExample1.yaml +++ b/specification/cat/shards/examples/request/CatShardsRequestExample1.yaml @@ -1,27 +1 @@ method_request: GET _cat/shards?format=json -alternatives: - - language: Python - code: |- - resp = client.cat.shards( - format="json", - ) - - language: JavaScript - code: |- - const response = await client.cat.shards({ - format: "json", - }); - - language: Ruby - code: |- - response = client.cat.shards( - format: "json" - ) - - language: PHP - code: |- - $resp = $client->cat()->shards([ - "format" => "json", - ]); - - language: curl - code: 'curl -X GET -H "Authorization: ApiKey $ELASTIC_API_KEY" "$ELASTICSEARCH_URL/_cat/shards?format=json"' - - language: Java - code: | - client.cat().shards(); diff --git a/specification/cat/snapshots/CatSnapshotsRequest.ts b/specification/cat/snapshots/CatSnapshotsRequest.ts index e077b39ecc..7d0461353e 100644 --- a/specification/cat/snapshots/CatSnapshotsRequest.ts +++ b/specification/cat/snapshots/CatSnapshotsRequest.ts @@ -19,7 +19,7 @@ import { Names } from '@_types/common' import { Duration, TimeUnit } from '@_types/Time' -import { CatRequestBase } from '@cat/_types/CatBase' +import { CatRequestBase, CatSnapshotsColumns } from '@cat/_types/CatBase' /** * Get snapshot information. @@ -60,9 +60,11 @@ export interface Request extends CatRequestBase { */ ignore_unavailable?: boolean /** - * List of columns to appear in the response. Supports simple wildcards. + * A comma-separated list of columns names to display. + * It supports simple wildcards. + * @server_default ip,hp,rp,r,m,n,cpu,l */ - h?: Names + h?: CatSnapshotsColumns /** * List of columns that determine how the table should be sorted. * Sorting defaults to ascending and can be changed by setting `:asc` diff --git a/specification/cat/snapshots/examples/request/CatSnapshotsRequestExample1.yaml b/specification/cat/snapshots/examples/request/CatSnapshotsRequestExample1.yaml index dae40f5b60..94228f6cc8 100644 --- a/specification/cat/snapshots/examples/request/CatSnapshotsRequestExample1.yaml +++ b/specification/cat/snapshots/examples/request/CatSnapshotsRequestExample1.yaml @@ -1,39 +1 @@ method_request: GET /_cat/snapshots/repo1?v=true&s=id&format=json -alternatives: - - language: Python - code: |- - resp = client.cat.snapshots( - repository="repo1", - v=True, - s="id", - format="json", - ) - - language: JavaScript - code: |- - const response = await client.cat.snapshots({ - repository: "repo1", - v: "true", - s: "id", - format: "json", - }); - - language: Ruby - code: |- - response = client.cat.snapshots( - repository: "repo1", - v: "true", - s: "id", - format: "json" - ) - - language: PHP - code: |- - $resp = $client->cat()->snapshots([ - "repository" => "repo1", - "v" => "true", - "s" => "id", - "format" => "json", - ]); - - language: curl - code: 'curl -X GET -H "Authorization: ApiKey $ELASTIC_API_KEY" "$ELASTICSEARCH_URL/_cat/snapshots/repo1?v=true&s=id&format=json"' - - language: Java - code: | - client.cat().snapshots(); diff --git a/specification/cat/tasks/examples/request/CatTasksRequestExample1.yaml b/specification/cat/tasks/examples/request/CatTasksRequestExample1.yaml index 793bc61b23..83f20212f5 100644 --- a/specification/cat/tasks/examples/request/CatTasksRequestExample1.yaml +++ b/specification/cat/tasks/examples/request/CatTasksRequestExample1.yaml @@ -1,31 +1 @@ method_request: GET _cat/tasks?v=true&format=json -alternatives: - - language: Python - code: |- - resp = client.cat.tasks( - v=True, - format="json", - ) - - language: JavaScript - code: |- - const response = await client.cat.tasks({ - v: "true", - format: "json", - }); - - language: Ruby - code: |- - response = client.cat.tasks( - v: "true", - format: "json" - ) - - language: PHP - code: |- - $resp = $client->cat()->tasks([ - "v" => "true", - "format" => "json", - ]); - - language: curl - code: 'curl -X GET -H "Authorization: ApiKey $ELASTIC_API_KEY" "$ELASTICSEARCH_URL/_cat/tasks?v=true&format=json"' - - language: Java - code: | - client.cat().tasks(); diff --git a/specification/cat/templates/examples/request/CatTemplatesRequestExample1.yaml b/specification/cat/templates/examples/request/CatTemplatesRequestExample1.yaml index 98986a03be..3a7fdc9a20 100644 --- a/specification/cat/templates/examples/request/CatTemplatesRequestExample1.yaml +++ b/specification/cat/templates/examples/request/CatTemplatesRequestExample1.yaml @@ -1,40 +1 @@ method_request: GET _cat/templates/my-template-*?v=true&s=name&format=json -alternatives: - - language: Python - code: |- - resp = client.cat.templates( - name="my-template-*", - v=True, - s="name", - format="json", - ) - - language: JavaScript - code: |- - const response = await client.cat.templates({ - name: "my-template-*", - v: "true", - s: "name", - format: "json", - }); - - language: Ruby - code: |- - response = client.cat.templates( - name: "my-template-*", - v: "true", - s: "name", - format: "json" - ) - - language: PHP - code: |- - $resp = $client->cat()->templates([ - "name" => "my-template-*", - "v" => "true", - "s" => "name", - "format" => "json", - ]); - - language: curl - code: 'curl -X GET -H "Authorization: ApiKey $ELASTIC_API_KEY" - "$ELASTICSEARCH_URL/_cat/templates/my-template-*?v=true&s=name&format=json"' - - language: Java - code: | - client.cat().templates(); diff --git a/specification/cat/thread_pool/CatThreadPoolRequest.ts b/specification/cat/thread_pool/CatThreadPoolRequest.ts index 77f4091d91..6acf6b5f3d 100644 --- a/specification/cat/thread_pool/CatThreadPoolRequest.ts +++ b/specification/cat/thread_pool/CatThreadPoolRequest.ts @@ -19,7 +19,7 @@ import { Names } from '@_types/common' import { Duration, TimeUnit } from '@_types/Time' -import { CatRequestBase } from '@cat/_types/CatBase' +import { CatRequestBase, CatThreadPoolColumns } from '@cat/_types/CatBase' /** * Get thread pool statistics. @@ -55,9 +55,9 @@ export interface Request extends CatRequestBase { /** * List of columns to appear in the response. Supports simple wildcards. */ - h?: Names + h?: CatThreadPoolColumns /** - * List of columns that determine how the table should be sorted. + * A comma-separated list of column names or aliases that determines the sort order. * Sorting defaults to ascending and can be changed by setting `:asc` * or `:desc` as a suffix to the column name. */ @@ -75,7 +75,7 @@ export interface Request extends CatRequestBase { */ local?: boolean /** - * Period to wait for a connection to the master node. + * The period to wait for a connection to the master node. * @server_default 30s */ master_timeout?: Duration diff --git a/specification/cat/thread_pool/examples/request/CatThreadPoolRequestExample1.yaml b/specification/cat/thread_pool/examples/request/CatThreadPoolRequestExample1.yaml index 6dd9fb57cd..385f4f68ac 100644 --- a/specification/cat/thread_pool/examples/request/CatThreadPoolRequestExample1.yaml +++ b/specification/cat/thread_pool/examples/request/CatThreadPoolRequestExample1.yaml @@ -1,27 +1 @@ method_request: GET /_cat/thread_pool?format=json -alternatives: - - language: Python - code: |- - resp = client.cat.thread_pool( - format="json", - ) - - language: JavaScript - code: |- - const response = await client.cat.threadPool({ - format: "json", - }); - - language: Ruby - code: |- - response = client.cat.thread_pool( - format: "json" - ) - - language: PHP - code: |- - $resp = $client->cat()->threadPool([ - "format" => "json", - ]); - - language: curl - code: 'curl -X GET -H "Authorization: ApiKey $ELASTIC_API_KEY" "$ELASTICSEARCH_URL/_cat/thread_pool?format=json"' - - language: Java - code: | - client.cat().threadPool(); diff --git a/specification/cat/transforms/examples/request/CatTransformsRequestExample1.yaml b/specification/cat/transforms/examples/request/CatTransformsRequestExample1.yaml index c5cb85163d..f71dc917dd 100644 --- a/specification/cat/transforms/examples/request/CatTransformsRequestExample1.yaml +++ b/specification/cat/transforms/examples/request/CatTransformsRequestExample1.yaml @@ -1,31 +1 @@ method_request: GET /_cat/transforms?v=true&format=json -alternatives: - - language: Python - code: |- - resp = client.cat.transforms( - v=True, - format="json", - ) - - language: JavaScript - code: |- - const response = await client.cat.transforms({ - v: "true", - format: "json", - }); - - language: Ruby - code: |- - response = client.cat.transforms( - v: "true", - format: "json" - ) - - language: PHP - code: |- - $resp = $client->cat()->transforms([ - "v" => "true", - "format" => "json", - ]); - - language: curl - code: 'curl -X GET -H "Authorization: ApiKey $ELASTIC_API_KEY" "$ELASTICSEARCH_URL/_cat/transforms?v=true&format=json"' - - language: Java - code: | - client.cat().transforms(); diff --git a/specification/ccr/delete_auto_follow_pattern/examples/request/DeleteAutoFollowPatternRequestExample1.yaml b/specification/ccr/delete_auto_follow_pattern/examples/request/DeleteAutoFollowPatternRequestExample1.yaml index a2fe3a0052..186e1b5ebb 100644 --- a/specification/ccr/delete_auto_follow_pattern/examples/request/DeleteAutoFollowPatternRequestExample1.yaml +++ b/specification/ccr/delete_auto_follow_pattern/examples/request/DeleteAutoFollowPatternRequestExample1.yaml @@ -1,29 +1 @@ method_request: DELETE /_ccr/auto_follow/my_auto_follow_pattern -alternatives: - - language: Python - code: |- - resp = client.ccr.delete_auto_follow_pattern( - name="my_auto_follow_pattern", - ) - - language: JavaScript - code: |- - const response = await client.ccr.deleteAutoFollowPattern({ - name: "my_auto_follow_pattern", - }); - - language: Ruby - code: |- - response = client.ccr.delete_auto_follow_pattern( - name: "my_auto_follow_pattern" - ) - - language: PHP - code: |- - $resp = $client->ccr()->deleteAutoFollowPattern([ - "name" => "my_auto_follow_pattern", - ]); - - language: curl - code: 'curl -X DELETE -H "Authorization: ApiKey $ELASTIC_API_KEY" "$ELASTICSEARCH_URL/_ccr/auto_follow/my_auto_follow_pattern"' - - language: Java - code: | - client.ccr().deleteAutoFollowPattern(d -> d - .name("my_auto_follow_pattern") - ); diff --git a/specification/ccr/follow/examples/request/CreateFollowIndexRequestExample1.yaml b/specification/ccr/follow/examples/request/CreateFollowIndexRequestExample1.yaml index 3b29670ab6..a1ff270865 100644 --- a/specification/ccr/follow/examples/request/CreateFollowIndexRequestExample1.yaml +++ b/specification/ccr/follow/examples/request/CreateFollowIndexRequestExample1.yaml @@ -20,127 +20,3 @@ value: |- "max_retry_delay" : "10s", "read_poll_timeout" : "30s" } -alternatives: - - language: Python - code: |- - resp = client.ccr.follow( - index="follower_index", - wait_for_active_shards="1", - remote_cluster="remote_cluster", - leader_index="leader_index", - settings={ - "index.number_of_replicas": 0 - }, - max_read_request_operation_count=1024, - max_outstanding_read_requests=16, - max_read_request_size="1024k", - max_write_request_operation_count=32768, - max_write_request_size="16k", - max_outstanding_write_requests=8, - max_write_buffer_count=512, - max_write_buffer_size="512k", - max_retry_delay="10s", - read_poll_timeout="30s", - ) - - language: JavaScript - code: |- - const response = await client.ccr.follow({ - index: "follower_index", - wait_for_active_shards: 1, - remote_cluster: "remote_cluster", - leader_index: "leader_index", - settings: { - "index.number_of_replicas": 0, - }, - max_read_request_operation_count: 1024, - max_outstanding_read_requests: 16, - max_read_request_size: "1024k", - max_write_request_operation_count: 32768, - max_write_request_size: "16k", - max_outstanding_write_requests: 8, - max_write_buffer_count: 512, - max_write_buffer_size: "512k", - max_retry_delay: "10s", - read_poll_timeout: "30s", - }); - - language: Ruby - code: |- - response = client.ccr.follow( - index: "follower_index", - wait_for_active_shards: "1", - body: { - "remote_cluster": "remote_cluster", - "leader_index": "leader_index", - "settings": { - "index.number_of_replicas": 0 - }, - "max_read_request_operation_count": 1024, - "max_outstanding_read_requests": 16, - "max_read_request_size": "1024k", - "max_write_request_operation_count": 32768, - "max_write_request_size": "16k", - "max_outstanding_write_requests": 8, - "max_write_buffer_count": 512, - "max_write_buffer_size": "512k", - "max_retry_delay": "10s", - "read_poll_timeout": "30s" - } - ) - - language: PHP - code: |- - $resp = $client->ccr()->follow([ - "index" => "follower_index", - "wait_for_active_shards" => "1", - "body" => [ - "remote_cluster" => "remote_cluster", - "leader_index" => "leader_index", - "settings" => [ - "index.number_of_replicas" => 0, - ], - "max_read_request_operation_count" => 1024, - "max_outstanding_read_requests" => 16, - "max_read_request_size" => "1024k", - "max_write_request_operation_count" => 32768, - "max_write_request_size" => "16k", - "max_outstanding_write_requests" => 8, - "max_write_buffer_count" => 512, - "max_write_buffer_size" => "512k", - "max_retry_delay" => "10s", - "read_poll_timeout" => "30s", - ], - ]); - - language: curl - code: - "curl -X PUT -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d - '{\"remote_cluster\":\"remote_cluster\",\"leader_index\":\"leader_index\",\"settings\":{\"index.number_of_replicas\":0},\"max\ - _read_request_operation_count\":1024,\"max_outstanding_read_requests\":16,\"max_read_request_size\":\"1024k\",\"max_write_req\ - uest_operation_count\":32768,\"max_write_request_size\":\"16k\",\"max_outstanding_write_requests\":8,\"max_write_buffer_count\ - \":512,\"max_write_buffer_size\":\"512k\",\"max_retry_delay\":\"10s\",\"read_poll_timeout\":\"30s\"}' - \"$ELASTICSEARCH_URL/follower_index/_ccr/follow?wait_for_active_shards=1\"" - - language: Java - code: | - client.ccr().follow(f -> f - .index("follower_index") - .leaderIndex("leader_index") - .maxOutstandingReadRequests(16L) - .maxOutstandingWriteRequests(8) - .maxReadRequestOperationCount(1024) - .maxReadRequestSize("1024k") - .maxRetryDelay(m -> m - .time("10s") - ) - .maxWriteBufferCount(512) - .maxWriteBufferSize("512k") - .maxWriteRequestOperationCount(32768) - .maxWriteRequestSize("16k") - .readPollTimeout(r -> r - .time("30s") - ) - .remoteCluster("remote_cluster") - .settings(s -> s - .otherSettings("index.number_of_replicas", JsonData.fromJson("0")) - ) - .waitForActiveShards(w -> w - .count(1) - ) - ); diff --git a/specification/ccr/follow_info/examples/request/FollowInfoRequestExample1.yaml b/specification/ccr/follow_info/examples/request/FollowInfoRequestExample1.yaml index 80b7896018..6df3adb0f3 100644 --- a/specification/ccr/follow_info/examples/request/FollowInfoRequestExample1.yaml +++ b/specification/ccr/follow_info/examples/request/FollowInfoRequestExample1.yaml @@ -1,29 +1 @@ method_request: GET /follower_index/_ccr/info -alternatives: - - language: Python - code: |- - resp = client.ccr.follow_info( - index="follower_index", - ) - - language: JavaScript - code: |- - const response = await client.ccr.followInfo({ - index: "follower_index", - }); - - language: Ruby - code: |- - response = client.ccr.follow_info( - index: "follower_index" - ) - - language: PHP - code: |- - $resp = $client->ccr()->followInfo([ - "index" => "follower_index", - ]); - - language: curl - code: 'curl -X GET -H "Authorization: ApiKey $ELASTIC_API_KEY" "$ELASTICSEARCH_URL/follower_index/_ccr/info"' - - language: Java - code: | - client.ccr().followInfo(f -> f - .index("follower_index") - ); diff --git a/specification/ccr/follow_stats/examples/request/FollowIndexStatsRequestExample1.yaml b/specification/ccr/follow_stats/examples/request/FollowIndexStatsRequestExample1.yaml index 8db1dc74a7..adb3832fb4 100644 --- a/specification/ccr/follow_stats/examples/request/FollowIndexStatsRequestExample1.yaml +++ b/specification/ccr/follow_stats/examples/request/FollowIndexStatsRequestExample1.yaml @@ -1,29 +1 @@ method_request: GET /follower_index/_ccr/stats -alternatives: - - language: Python - code: |- - resp = client.ccr.follow_stats( - index="follower_index", - ) - - language: JavaScript - code: |- - const response = await client.ccr.followStats({ - index: "follower_index", - }); - - language: Ruby - code: |- - response = client.ccr.follow_stats( - index: "follower_index" - ) - - language: PHP - code: |- - $resp = $client->ccr()->followStats([ - "index" => "follower_index", - ]); - - language: curl - code: 'curl -X GET -H "Authorization: ApiKey $ELASTIC_API_KEY" "$ELASTICSEARCH_URL/follower_index/_ccr/stats"' - - language: Java - code: | - client.ccr().followStats(f -> f - .index("follower_index") - ); diff --git a/specification/ccr/forget_follower/examples/request/ForgetFollowerIndexRequestExample1.yaml b/specification/ccr/forget_follower/examples/request/ForgetFollowerIndexRequestExample1.yaml index 7d61cd79e5..ccd31d30c2 100644 --- a/specification/ccr/forget_follower/examples/request/ForgetFollowerIndexRequestExample1.yaml +++ b/specification/ccr/forget_follower/examples/request/ForgetFollowerIndexRequestExample1.yaml @@ -13,58 +13,3 @@ value: "{ \ \"leader_remote_cluster\" : \"\" }" -alternatives: - - language: Python - code: |- - resp = client.ccr.forget_follower( - index="", - follower_cluster="", - follower_index="", - follower_index_uuid="", - leader_remote_cluster="", - ) - - language: JavaScript - code: |- - const response = await client.ccr.forgetFollower({ - index: "", - follower_cluster: "", - follower_index: "", - follower_index_uuid: "", - leader_remote_cluster: "", - }); - - language: Ruby - code: |- - response = client.ccr.forget_follower( - index: "", - body: { - "follower_cluster": "", - "follower_index": "", - "follower_index_uuid": "", - "leader_remote_cluster": "" - } - ) - - language: PHP - code: |- - $resp = $client->ccr()->forgetFollower([ - "index" => "", - "body" => [ - "follower_cluster" => "", - "follower_index" => "", - "follower_index_uuid" => "", - "leader_remote_cluster" => "", - ], - ]); - - language: curl - code: - "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d - '{\"follower_cluster\":\"\",\"follower_index\":\"\",\"follower_index_uuid\":\"\",\"leader_remote_cluster\":\"\"}' \"$ELASTICSEARCH_URL//_ccr/forget_follower\"" - - language: Java - code: | - client.ccr().forgetFollower(f -> f - .followerCluster("") - .followerIndex("") - .followerIndexUuid("") - .index("") - .leaderRemoteCluster("") - ); diff --git a/specification/ccr/get_auto_follow_pattern/examples/request/GetAutoFollowPatternRequestExample1.yaml b/specification/ccr/get_auto_follow_pattern/examples/request/GetAutoFollowPatternRequestExample1.yaml index d126f18128..caaaa7c13d 100644 --- a/specification/ccr/get_auto_follow_pattern/examples/request/GetAutoFollowPatternRequestExample1.yaml +++ b/specification/ccr/get_auto_follow_pattern/examples/request/GetAutoFollowPatternRequestExample1.yaml @@ -1,29 +1 @@ method_request: GET /_ccr/auto_follow/my_auto_follow_pattern -alternatives: - - language: Python - code: |- - resp = client.ccr.get_auto_follow_pattern( - name="my_auto_follow_pattern", - ) - - language: JavaScript - code: |- - const response = await client.ccr.getAutoFollowPattern({ - name: "my_auto_follow_pattern", - }); - - language: Ruby - code: |- - response = client.ccr.get_auto_follow_pattern( - name: "my_auto_follow_pattern" - ) - - language: PHP - code: |- - $resp = $client->ccr()->getAutoFollowPattern([ - "name" => "my_auto_follow_pattern", - ]); - - language: curl - code: 'curl -X GET -H "Authorization: ApiKey $ELASTIC_API_KEY" "$ELASTICSEARCH_URL/_ccr/auto_follow/my_auto_follow_pattern"' - - language: Java - code: | - client.ccr().getAutoFollowPattern(g -> g - .name("my_auto_follow_pattern") - ); diff --git a/specification/ccr/pause_auto_follow_pattern/examples/request/PauseAutoFollowPatternRequestExample1.yaml b/specification/ccr/pause_auto_follow_pattern/examples/request/PauseAutoFollowPatternRequestExample1.yaml index 82db91f81c..b820410932 100644 --- a/specification/ccr/pause_auto_follow_pattern/examples/request/PauseAutoFollowPatternRequestExample1.yaml +++ b/specification/ccr/pause_auto_follow_pattern/examples/request/PauseAutoFollowPatternRequestExample1.yaml @@ -1,29 +1 @@ method_request: POST /_ccr/auto_follow/my_auto_follow_pattern/pause -alternatives: - - language: Python - code: |- - resp = client.ccr.pause_auto_follow_pattern( - name="my_auto_follow_pattern", - ) - - language: JavaScript - code: |- - const response = await client.ccr.pauseAutoFollowPattern({ - name: "my_auto_follow_pattern", - }); - - language: Ruby - code: |- - response = client.ccr.pause_auto_follow_pattern( - name: "my_auto_follow_pattern" - ) - - language: PHP - code: |- - $resp = $client->ccr()->pauseAutoFollowPattern([ - "name" => "my_auto_follow_pattern", - ]); - - language: curl - code: 'curl -X POST -H "Authorization: ApiKey $ELASTIC_API_KEY" "$ELASTICSEARCH_URL/_ccr/auto_follow/my_auto_follow_pattern/pause"' - - language: Java - code: | - client.ccr().pauseAutoFollowPattern(p -> p - .name("my_auto_follow_pattern") - ); diff --git a/specification/ccr/pause_follow/examples/request/PauseFollowIndexRequestExample1.yaml b/specification/ccr/pause_follow/examples/request/PauseFollowIndexRequestExample1.yaml index 5decf80b2e..b072e5ee6a 100644 --- a/specification/ccr/pause_follow/examples/request/PauseFollowIndexRequestExample1.yaml +++ b/specification/ccr/pause_follow/examples/request/PauseFollowIndexRequestExample1.yaml @@ -1,29 +1 @@ method_request: POST /follower_index/_ccr/pause_follow -alternatives: - - language: Python - code: |- - resp = client.ccr.pause_follow( - index="follower_index", - ) - - language: JavaScript - code: |- - const response = await client.ccr.pauseFollow({ - index: "follower_index", - }); - - language: Ruby - code: |- - response = client.ccr.pause_follow( - index: "follower_index" - ) - - language: PHP - code: |- - $resp = $client->ccr()->pauseFollow([ - "index" => "follower_index", - ]); - - language: curl - code: 'curl -X POST -H "Authorization: ApiKey $ELASTIC_API_KEY" "$ELASTICSEARCH_URL/follower_index/_ccr/pause_follow"' - - language: Java - code: | - client.ccr().pauseFollow(p -> p - .index("follower_index") - ); diff --git a/specification/ccr/put_auto_follow_pattern/examples/request/PutAutoFollowPatternRequestExample1.yaml b/specification/ccr/put_auto_follow_pattern/examples/request/PutAutoFollowPatternRequestExample1.yaml index f36dc32b60..6d5cb8e09d 100644 --- a/specification/ccr/put_auto_follow_pattern/examples/request/PutAutoFollowPatternRequestExample1.yaml +++ b/specification/ccr/put_auto_follow_pattern/examples/request/PutAutoFollowPatternRequestExample1.yaml @@ -44,129 +44,3 @@ value: "{ \ \"read_poll_timeout\" : \"30s\" }" -alternatives: - - language: Python - code: |- - resp = client.ccr.put_auto_follow_pattern( - name="my_auto_follow_pattern", - remote_cluster="remote_cluster", - leader_index_patterns=[ - "leader_index*" - ], - follow_index_pattern="{{leader_index}}-follower", - settings={ - "index.number_of_replicas": 0 - }, - max_read_request_operation_count=1024, - max_outstanding_read_requests=16, - max_read_request_size="1024k", - max_write_request_operation_count=32768, - max_write_request_size="16k", - max_outstanding_write_requests=8, - max_write_buffer_count=512, - max_write_buffer_size="512k", - max_retry_delay="10s", - read_poll_timeout="30s", - ) - - language: JavaScript - code: |- - const response = await client.ccr.putAutoFollowPattern({ - name: "my_auto_follow_pattern", - remote_cluster: "remote_cluster", - leader_index_patterns: ["leader_index*"], - follow_index_pattern: "{{leader_index}}-follower", - settings: { - "index.number_of_replicas": 0, - }, - max_read_request_operation_count: 1024, - max_outstanding_read_requests: 16, - max_read_request_size: "1024k", - max_write_request_operation_count: 32768, - max_write_request_size: "16k", - max_outstanding_write_requests: 8, - max_write_buffer_count: 512, - max_write_buffer_size: "512k", - max_retry_delay: "10s", - read_poll_timeout: "30s", - }); - - language: Ruby - code: |- - response = client.ccr.put_auto_follow_pattern( - name: "my_auto_follow_pattern", - body: { - "remote_cluster": "remote_cluster", - "leader_index_patterns": [ - "leader_index*" - ], - "follow_index_pattern": "{{leader_index}}-follower", - "settings": { - "index.number_of_replicas": 0 - }, - "max_read_request_operation_count": 1024, - "max_outstanding_read_requests": 16, - "max_read_request_size": "1024k", - "max_write_request_operation_count": 32768, - "max_write_request_size": "16k", - "max_outstanding_write_requests": 8, - "max_write_buffer_count": 512, - "max_write_buffer_size": "512k", - "max_retry_delay": "10s", - "read_poll_timeout": "30s" - } - ) - - language: PHP - code: |- - $resp = $client->ccr()->putAutoFollowPattern([ - "name" => "my_auto_follow_pattern", - "body" => [ - "remote_cluster" => "remote_cluster", - "leader_index_patterns" => array( - "leader_index*", - ), - "follow_index_pattern" => "{{leader_index}}-follower", - "settings" => [ - "index.number_of_replicas" => 0, - ], - "max_read_request_operation_count" => 1024, - "max_outstanding_read_requests" => 16, - "max_read_request_size" => "1024k", - "max_write_request_operation_count" => 32768, - "max_write_request_size" => "16k", - "max_outstanding_write_requests" => 8, - "max_write_buffer_count" => 512, - "max_write_buffer_size" => "512k", - "max_retry_delay" => "10s", - "read_poll_timeout" => "30s", - ], - ]); - - language: curl - code: - "curl -X PUT -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d - '{\"remote_cluster\":\"remote_cluster\",\"leader_index_patterns\":[\"leader_index*\"],\"follow_index_pattern\":\"{{leader_ind\ - ex}}-follower\",\"settings\":{\"index.number_of_replicas\":0},\"max_read_request_operation_count\":1024,\"max_outstanding_rea\ - d_requests\":16,\"max_read_request_size\":\"1024k\",\"max_write_request_operation_count\":32768,\"max_write_request_size\":\"\ - 16k\",\"max_outstanding_write_requests\":8,\"max_write_buffer_count\":512,\"max_write_buffer_size\":\"512k\",\"max_retry_delay\ - \":\"10s\",\"read_poll_timeout\":\"30s\"}' \"$ELASTICSEARCH_URL/_ccr/auto_follow/my_auto_follow_pattern\"" - - language: Java - code: | - client.ccr().putAutoFollowPattern(p -> p - .followIndexPattern("{{leader_index}}-follower") - .leaderIndexPatterns("leader_index*") - .maxOutstandingReadRequests(16) - .maxOutstandingWriteRequests(8) - .maxReadRequestOperationCount(1024) - .maxReadRequestSize("1024k") - .maxRetryDelay(m -> m - .time("10s") - ) - .maxWriteBufferCount(512) - .maxWriteBufferSize("512k") - .maxWriteRequestOperationCount(32768) - .maxWriteRequestSize("16k") - .name("my_auto_follow_pattern") - .readPollTimeout(r -> r - .time("30s") - ) - .remoteCluster("remote_cluster") - .settings("index.number_of_replicas", JsonData.fromJson("0")) - ); diff --git a/specification/ccr/resume_auto_follow_pattern/examples/request/ResumeAutoFollowPatternRequestExample1.yaml b/specification/ccr/resume_auto_follow_pattern/examples/request/ResumeAutoFollowPatternRequestExample1.yaml index 0997854418..9a06b480ab 100644 --- a/specification/ccr/resume_auto_follow_pattern/examples/request/ResumeAutoFollowPatternRequestExample1.yaml +++ b/specification/ccr/resume_auto_follow_pattern/examples/request/ResumeAutoFollowPatternRequestExample1.yaml @@ -1,29 +1 @@ method_request: POST /_ccr/auto_follow/my_auto_follow_pattern/resume -alternatives: - - language: Python - code: |- - resp = client.ccr.resume_auto_follow_pattern( - name="my_auto_follow_pattern", - ) - - language: JavaScript - code: |- - const response = await client.ccr.resumeAutoFollowPattern({ - name: "my_auto_follow_pattern", - }); - - language: Ruby - code: |- - response = client.ccr.resume_auto_follow_pattern( - name: "my_auto_follow_pattern" - ) - - language: PHP - code: |- - $resp = $client->ccr()->resumeAutoFollowPattern([ - "name" => "my_auto_follow_pattern", - ]); - - language: curl - code: 'curl -X POST -H "Authorization: ApiKey $ELASTIC_API_KEY" "$ELASTICSEARCH_URL/_ccr/auto_follow/my_auto_follow_pattern/resume"' - - language: Java - code: | - client.ccr().resumeAutoFollowPattern(r -> r - .name("my_auto_follow_pattern") - ); diff --git a/specification/ccr/resume_follow/examples/request/ResumeFollowIndexRequestExample1.yaml b/specification/ccr/resume_follow/examples/request/ResumeFollowIndexRequestExample1.yaml index e936715283..2af6e225b5 100644 --- a/specification/ccr/resume_follow/examples/request/ResumeFollowIndexRequestExample1.yaml +++ b/specification/ccr/resume_follow/examples/request/ResumeFollowIndexRequestExample1.yaml @@ -15,94 +15,3 @@ value: |- "max_retry_delay" : "10s", "read_poll_timeout" : "30s" } -alternatives: - - language: Python - code: |- - resp = client.ccr.resume_follow( - index="follower_index", - max_read_request_operation_count=1024, - max_outstanding_read_requests=16, - max_read_request_size="1024k", - max_write_request_operation_count=32768, - max_write_request_size="16k", - max_outstanding_write_requests=8, - max_write_buffer_count=512, - max_write_buffer_size="512k", - max_retry_delay="10s", - read_poll_timeout="30s", - ) - - language: JavaScript - code: |- - const response = await client.ccr.resumeFollow({ - index: "follower_index", - max_read_request_operation_count: 1024, - max_outstanding_read_requests: 16, - max_read_request_size: "1024k", - max_write_request_operation_count: 32768, - max_write_request_size: "16k", - max_outstanding_write_requests: 8, - max_write_buffer_count: 512, - max_write_buffer_size: "512k", - max_retry_delay: "10s", - read_poll_timeout: "30s", - }); - - language: Ruby - code: |- - response = client.ccr.resume_follow( - index: "follower_index", - body: { - "max_read_request_operation_count": 1024, - "max_outstanding_read_requests": 16, - "max_read_request_size": "1024k", - "max_write_request_operation_count": 32768, - "max_write_request_size": "16k", - "max_outstanding_write_requests": 8, - "max_write_buffer_count": 512, - "max_write_buffer_size": "512k", - "max_retry_delay": "10s", - "read_poll_timeout": "30s" - } - ) - - language: PHP - code: |- - $resp = $client->ccr()->resumeFollow([ - "index" => "follower_index", - "body" => [ - "max_read_request_operation_count" => 1024, - "max_outstanding_read_requests" => 16, - "max_read_request_size" => "1024k", - "max_write_request_operation_count" => 32768, - "max_write_request_size" => "16k", - "max_outstanding_write_requests" => 8, - "max_write_buffer_count" => 512, - "max_write_buffer_size" => "512k", - "max_retry_delay" => "10s", - "read_poll_timeout" => "30s", - ], - ]); - - language: curl - code: - "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d - '{\"max_read_request_operation_count\":1024,\"max_outstanding_read_requests\":16,\"max_read_request_size\":\"1024k\",\"max_wr\ - ite_request_operation_count\":32768,\"max_write_request_size\":\"16k\",\"max_outstanding_write_requests\":8,\"max_write_buffe\ - r_count\":512,\"max_write_buffer_size\":\"512k\",\"max_retry_delay\":\"10s\",\"read_poll_timeout\":\"30s\"}' - \"$ELASTICSEARCH_URL/follower_index/_ccr/resume_follow\"" - - language: Java - code: | - client.ccr().resumeFollow(r -> r - .index("follower_index") - .maxOutstandingReadRequests(16L) - .maxOutstandingWriteRequests(8L) - .maxReadRequestOperationCount(1024L) - .maxReadRequestSize("1024k") - .maxRetryDelay(m -> m - .time("10s") - ) - .maxWriteBufferCount(512L) - .maxWriteBufferSize("512k") - .maxWriteRequestOperationCount(32768L) - .maxWriteRequestSize("16k") - .readPollTimeout(re -> re - .time("30s") - ) - ); diff --git a/specification/ccr/stats/examples/request/CcrStatsRequestExample1.yaml b/specification/ccr/stats/examples/request/CcrStatsRequestExample1.yaml index 86e1e570fe..b046eaf51b 100644 --- a/specification/ccr/stats/examples/request/CcrStatsRequestExample1.yaml +++ b/specification/ccr/stats/examples/request/CcrStatsRequestExample1.yaml @@ -1,15 +1 @@ method_request: GET /_ccr/stats -alternatives: - - language: Python - code: resp = client.ccr.stats() - - language: JavaScript - code: const response = await client.ccr.stats(); - - language: Ruby - code: response = client.ccr.stats - - language: PHP - code: $resp = $client->ccr()->stats(); - - language: curl - code: 'curl -X GET -H "Authorization: ApiKey $ELASTIC_API_KEY" "$ELASTICSEARCH_URL/_ccr/stats"' - - language: Java - code: | - client.ccr().stats(s -> s); diff --git a/specification/ccr/unfollow/examples/request/UnfollowIndexRequestExample1.yaml b/specification/ccr/unfollow/examples/request/UnfollowIndexRequestExample1.yaml index f18fb1b572..6258df4485 100644 --- a/specification/ccr/unfollow/examples/request/UnfollowIndexRequestExample1.yaml +++ b/specification/ccr/unfollow/examples/request/UnfollowIndexRequestExample1.yaml @@ -1,29 +1 @@ method_request: POST /follower_index/_ccr/unfollow -alternatives: - - language: Python - code: |- - resp = client.ccr.unfollow( - index="follower_index", - ) - - language: JavaScript - code: |- - const response = await client.ccr.unfollow({ - index: "follower_index", - }); - - language: Ruby - code: |- - response = client.ccr.unfollow( - index: "follower_index" - ) - - language: PHP - code: |- - $resp = $client->ccr()->unfollow([ - "index" => "follower_index", - ]); - - language: curl - code: 'curl -X POST -H "Authorization: ApiKey $ELASTIC_API_KEY" "$ELASTICSEARCH_URL/follower_index/_ccr/unfollow"' - - language: Java - code: | - client.ccr().unfollow(u -> u - .index("follower_index") - ); diff --git a/specification/cluster/allocation_explain/examples/request/ClusterAllocationExplainRequestExample1.yaml b/specification/cluster/allocation_explain/examples/request/ClusterAllocationExplainRequestExample1.yaml index ef53821360..c3ef492eb9 100644 --- a/specification/cluster/allocation_explain/examples/request/ClusterAllocationExplainRequestExample1.yaml +++ b/specification/cluster/allocation_explain/examples/request/ClusterAllocationExplainRequestExample1.yaml @@ -9,53 +9,3 @@ value: |- "primary": false, "current_node": "my-node" } -alternatives: - - language: Python - code: |- - resp = client.cluster.allocation_explain( - index="my-index-000001", - shard=0, - primary=False, - current_node="my-node", - ) - - language: JavaScript - code: |- - const response = await client.cluster.allocationExplain({ - index: "my-index-000001", - shard: 0, - primary: false, - current_node: "my-node", - }); - - language: Ruby - code: |- - response = client.cluster.allocation_explain( - body: { - "index": "my-index-000001", - "shard": 0, - "primary": false, - "current_node": "my-node" - } - ) - - language: PHP - code: |- - $resp = $client->cluster()->allocationExplain([ - "body" => [ - "index" => "my-index-000001", - "shard" => 0, - "primary" => false, - "current_node" => "my-node", - ], - ]); - - language: curl - code: - 'curl -X GET -H "Authorization: ApiKey $ELASTIC_API_KEY" -H "Content-Type: application/json" -d - ''{"index":"my-index-000001","shard":0,"primary":false,"current_node":"my-node"}'' - "$ELASTICSEARCH_URL/_cluster/allocation/explain"' - - language: Java - code: | - client.cluster().allocationExplain(a -> a - .currentNode("my-node") - .index("my-index-000001") - .primary(false) - .shard(0) - ); diff --git a/specification/cluster/delete_component_template/examples/request/ClusterDeleteComponentTemplateExample1.yaml b/specification/cluster/delete_component_template/examples/request/ClusterDeleteComponentTemplateExample1.yaml index f91d8553cd..c8910cf9f2 100644 --- a/specification/cluster/delete_component_template/examples/request/ClusterDeleteComponentTemplateExample1.yaml +++ b/specification/cluster/delete_component_template/examples/request/ClusterDeleteComponentTemplateExample1.yaml @@ -1,29 +1 @@ method_request: DELETE _component_template/template_1 -alternatives: - - language: Python - code: |- - resp = client.cluster.delete_component_template( - name="template_1", - ) - - language: JavaScript - code: |- - const response = await client.cluster.deleteComponentTemplate({ - name: "template_1", - }); - - language: Ruby - code: |- - response = client.cluster.delete_component_template( - name: "template_1" - ) - - language: PHP - code: |- - $resp = $client->cluster()->deleteComponentTemplate([ - "name" => "template_1", - ]); - - language: curl - code: 'curl -X DELETE -H "Authorization: ApiKey $ELASTIC_API_KEY" "$ELASTICSEARCH_URL/_component_template/template_1"' - - language: Java - code: | - client.cluster().deleteComponentTemplate(d -> d - .name("template_1") - ); diff --git a/specification/cluster/get_component_template/ClusterGetComponentTemplateRequest.ts b/specification/cluster/get_component_template/ClusterGetComponentTemplateRequest.ts index cef948d618..4cb810c3d7 100644 --- a/specification/cluster/get_component_template/ClusterGetComponentTemplateRequest.ts +++ b/specification/cluster/get_component_template/ClusterGetComponentTemplateRequest.ts @@ -55,6 +55,10 @@ export interface Request extends RequestBase { * @server_default false */ flat_settings?: boolean + /** + * Filter out results, for example to filter out sensitive information. Supports wildcards or full settings keys + */ + settings_filter?: string | string[] /** * @server_default false * @availability stack since=8.11.0 stability=stable diff --git a/specification/cluster/get_component_template/examples/request/ClusterGetComponentTemplateExample1.yaml b/specification/cluster/get_component_template/examples/request/ClusterGetComponentTemplateExample1.yaml index 1a1d3b2a26..e02a3625a8 100644 --- a/specification/cluster/get_component_template/examples/request/ClusterGetComponentTemplateExample1.yaml +++ b/specification/cluster/get_component_template/examples/request/ClusterGetComponentTemplateExample1.yaml @@ -1,29 +1 @@ method_request: GET /_component_template/template_1 -alternatives: - - language: Python - code: |- - resp = client.cluster.get_component_template( - name="template_1", - ) - - language: JavaScript - code: |- - const response = await client.cluster.getComponentTemplate({ - name: "template_1", - }); - - language: Ruby - code: |- - response = client.cluster.get_component_template( - name: "template_1" - ) - - language: PHP - code: |- - $resp = $client->cluster()->getComponentTemplate([ - "name" => "template_1", - ]); - - language: curl - code: 'curl -X GET -H "Authorization: ApiKey $ELASTIC_API_KEY" "$ELASTICSEARCH_URL/_component_template/template_1"' - - language: Java - code: | - client.cluster().getComponentTemplate(g -> g - .name("template_1") - ); diff --git a/specification/cluster/get_settings/examples/request/ClusterGetSettingsExample1.yaml b/specification/cluster/get_settings/examples/request/ClusterGetSettingsExample1.yaml index 1eb833d002..8b8cd59ecc 100644 --- a/specification/cluster/get_settings/examples/request/ClusterGetSettingsExample1.yaml +++ b/specification/cluster/get_settings/examples/request/ClusterGetSettingsExample1.yaml @@ -1,27 +1 @@ method_request: GET /_cluster/settings?filter_path=persistent.cluster.remote -alternatives: - - language: Python - code: |- - resp = client.cluster.get_settings( - filter_path="persistent.cluster.remote", - ) - - language: JavaScript - code: |- - const response = await client.cluster.getSettings({ - filter_path: "persistent.cluster.remote", - }); - - language: Ruby - code: |- - response = client.cluster.get_settings( - filter_path: "persistent.cluster.remote" - ) - - language: PHP - code: |- - $resp = $client->cluster()->getSettings([ - "filter_path" => "persistent.cluster.remote", - ]); - - language: curl - code: 'curl -X GET -H "Authorization: ApiKey $ELASTIC_API_KEY" - "$ELASTICSEARCH_URL/_cluster/settings?filter_path=persistent.cluster.remote"' - - language: Java - code: "\n" diff --git a/specification/cluster/health/examples/request/ClusterHealthRequestExample1.yaml b/specification/cluster/health/examples/request/ClusterHealthRequestExample1.yaml index 41f150af6f..4852a044ab 100644 --- a/specification/cluster/health/examples/request/ClusterHealthRequestExample1.yaml +++ b/specification/cluster/health/examples/request/ClusterHealthRequestExample1.yaml @@ -1,15 +1 @@ method_request: GET _cluster/health -alternatives: - - language: Python - code: resp = client.cluster.health() - - language: JavaScript - code: const response = await client.cluster.health(); - - language: Ruby - code: response = client.cluster.health - - language: PHP - code: $resp = $client->cluster()->health(); - - language: curl - code: 'curl -X GET -H "Authorization: ApiKey $ELASTIC_API_KEY" "$ELASTICSEARCH_URL/_cluster/health"' - - language: Java - code: | - client.cluster().health(h -> h); diff --git a/specification/cluster/info/examples/request/ClusterInfoExample1.yaml b/specification/cluster/info/examples/request/ClusterInfoExample1.yaml index 3a1743a778..c2742b05e4 100644 --- a/specification/cluster/info/examples/request/ClusterInfoExample1.yaml +++ b/specification/cluster/info/examples/request/ClusterInfoExample1.yaml @@ -1,29 +1 @@ method_request: GET /_info/_all -alternatives: - - language: Python - code: |- - resp = client.cluster.info( - target="_all", - ) - - language: JavaScript - code: |- - const response = await client.cluster.info({ - target: "_all", - }); - - language: Ruby - code: |- - response = client.cluster.info( - target: "_all" - ) - - language: PHP - code: |- - $resp = $client->cluster()->info([ - "target" => "_all", - ]); - - language: curl - code: 'curl -X GET -H "Authorization: ApiKey $ELASTIC_API_KEY" "$ELASTICSEARCH_URL/_info/_all"' - - language: Java - code: | - client.cluster().info(i -> i - .target("_all") - ); diff --git a/specification/cluster/pending_tasks/examples/request/ClusterPendingTasksExample1.yaml b/specification/cluster/pending_tasks/examples/request/ClusterPendingTasksExample1.yaml index 2f04fc1aa5..1217dc2640 100644 --- a/specification/cluster/pending_tasks/examples/request/ClusterPendingTasksExample1.yaml +++ b/specification/cluster/pending_tasks/examples/request/ClusterPendingTasksExample1.yaml @@ -1,15 +1 @@ method_request: GET /_cluster/pending_tasks -alternatives: - - language: Python - code: resp = client.cluster.pending_tasks() - - language: JavaScript - code: const response = await client.cluster.pendingTasks(); - - language: Ruby - code: response = client.cluster.pending_tasks - - language: PHP - code: $resp = $client->cluster()->pendingTasks(); - - language: curl - code: 'curl -X GET -H "Authorization: ApiKey $ELASTIC_API_KEY" "$ELASTICSEARCH_URL/_cluster/pending_tasks"' - - language: Java - code: | - client.cluster().pendingTasks(p -> p); diff --git a/specification/cluster/put_component_template/ClusterPutComponentTemplateRequest.ts b/specification/cluster/put_component_template/ClusterPutComponentTemplateRequest.ts index cf84753855..4701e5cadb 100644 --- a/specification/cluster/put_component_template/ClusterPutComponentTemplateRequest.ts +++ b/specification/cluster/put_component_template/ClusterPutComponentTemplateRequest.ts @@ -72,6 +72,11 @@ export interface Request extends RequestBase { * If `true`, this request cannot replace or update existing component templates. * @server_default false */ create?: boolean + /** + * User defined reason for create the component template. + * @server_default api + */ + cause?: string /** * Period to wait for a connection to the master node. * If no response is received before the timeout expires, the request fails and returns an error. diff --git a/specification/cluster/put_component_template/examples/request/ClusterPutComponentTemplateRequestExample1.yaml b/specification/cluster/put_component_template/examples/request/ClusterPutComponentTemplateRequestExample1.yaml index 99b8ee65d7..1e8407935b 100644 --- a/specification/cluster/put_component_template/examples/request/ClusterPutComponentTemplateRequestExample1.yaml +++ b/specification/cluster/put_component_template/examples/request/ClusterPutComponentTemplateRequestExample1.yaml @@ -15,106 +15,3 @@ value: created_at: type: date format: 'EEE MMM dd HH:mm:ss Z yyyy' -alternatives: - - language: Python - code: |- - resp = client.cluster.put_component_template( - name="template_1", - template=None, - settings={ - "number_of_shards": 1 - }, - mappings={ - "_source": { - "enabled": False - }, - "properties": { - "host_name": { - "type": "keyword" - }, - "created_at": { - "type": "date", - "format": "EEE MMM dd HH:mm:ss Z yyyy" - } - } - }, - ) - - language: JavaScript - code: |- - const response = await client.cluster.putComponentTemplate({ - name: "template_1", - template: null, - settings: { - number_of_shards: 1, - }, - mappings: { - _source: { - enabled: false, - }, - properties: { - host_name: { - type: "keyword", - }, - created_at: { - type: "date", - format: "EEE MMM dd HH:mm:ss Z yyyy", - }, - }, - }, - }); - - language: Ruby - code: |- - response = client.cluster.put_component_template( - name: "template_1", - body: { - "template": nil, - "settings": { - "number_of_shards": 1 - }, - "mappings": { - "_source": { - "enabled": false - }, - "properties": { - "host_name": { - "type": "keyword" - }, - "created_at": { - "type": "date", - "format": "EEE MMM dd HH:mm:ss Z yyyy" - } - } - } - } - ) - - language: PHP - code: |- - $resp = $client->cluster()->putComponentTemplate([ - "name" => "template_1", - "body" => [ - "template" => null, - "settings" => [ - "number_of_shards" => 1, - ], - "mappings" => [ - "_source" => [ - "enabled" => false, - ], - "properties" => [ - "host_name" => [ - "type" => "keyword", - ], - "created_at" => [ - "type" => "date", - "format" => "EEE MMM dd HH:mm:ss Z yyyy", - ], - ], - ], - ], - ]); - - language: curl - code: - "curl -X PUT -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d - '{\"template\":null,\"settings\":{\"number_of_shards\":1},\"mappings\":{\"_source\":{\"enabled\":false},\"properties\":{\"hos\ - t_name\":{\"type\":\"keyword\"},\"created_at\":{\"type\":\"date\",\"format\":\"EEE MMM dd HH:mm:ss Z yyyy\"}}}}' - \"$ELASTICSEARCH_URL/_component_template/template_1\"" diff --git a/specification/cluster/put_component_template/examples/request/ClusterPutComponentTemplateRequestExample2.yaml b/specification/cluster/put_component_template/examples/request/ClusterPutComponentTemplateRequestExample2.yaml index e7371f5c64..7a07b27bf7 100644 --- a/specification/cluster/put_component_template/examples/request/ClusterPutComponentTemplateRequestExample2.yaml +++ b/specification/cluster/put_component_template/examples/request/ClusterPutComponentTemplateRequestExample2.yaml @@ -16,97 +16,3 @@ value: user.id: kimchy routing: shard-1 '{index}-alias': {} -alternatives: - - language: Python - code: |- - resp = client.cluster.put_component_template( - name="template_1", - template=None, - settings={ - "number_of_shards": 1 - }, - aliases={ - "alias1": {}, - "alias2": { - "filter": { - "term": { - "user.id": "kimchy" - } - }, - "routing": "shard-1" - }, - "{index}-alias": {} - }, - ) - - language: JavaScript - code: |- - const response = await client.cluster.putComponentTemplate({ - name: "template_1", - template: null, - settings: { - number_of_shards: 1, - }, - aliases: { - alias1: {}, - alias2: { - filter: { - term: { - "user.id": "kimchy", - }, - }, - routing: "shard-1", - }, - "{index}-alias": {}, - }, - }); - - language: Ruby - code: |- - response = client.cluster.put_component_template( - name: "template_1", - body: { - "template": nil, - "settings": { - "number_of_shards": 1 - }, - "aliases": { - "alias1": {}, - "alias2": { - "filter": { - "term": { - "user.id": "kimchy" - } - }, - "routing": "shard-1" - }, - "{index}-alias": {} - } - } - ) - - language: PHP - code: |- - $resp = $client->cluster()->putComponentTemplate([ - "name" => "template_1", - "body" => [ - "template" => null, - "settings" => [ - "number_of_shards" => 1, - ], - "aliases" => [ - "alias1" => new ArrayObject([]), - "alias2" => [ - "filter" => [ - "term" => [ - "user.id" => "kimchy", - ], - ], - "routing" => "shard-1", - ], - "{index}-alias" => new ArrayObject([]), - ], - ], - ]); - - language: curl - code: - "curl -X PUT -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d - '{\"template\":null,\"settings\":{\"number_of_shards\":1},\"aliases\":{\"alias1\":{},\"alias2\":{\"filter\":{\"term\":{\"user\ - .id\":\"kimchy\"}},\"routing\":\"shard-1\"},\"{index}-alias\":{}}}' \"$ELASTICSEARCH_URL/_component_template/template_1\"" diff --git a/specification/cluster/put_settings/examples/request/ClusterPutSettingsRequestExample1.yaml b/specification/cluster/put_settings/examples/request/ClusterPutSettingsRequestExample1.yaml index f8e67f57e5..fe855ff11d 100644 --- a/specification/cluster/put_settings/examples/request/ClusterPutSettingsRequestExample1.yaml +++ b/specification/cluster/put_settings/examples/request/ClusterPutSettingsRequestExample1.yaml @@ -8,45 +8,3 @@ value: |- "indices.recovery.max_bytes_per_sec" : "50mb" } } -alternatives: - - language: Python - code: |- - resp = client.cluster.put_settings( - persistent={ - "indices.recovery.max_bytes_per_sec": "50mb" - }, - ) - - language: JavaScript - code: |- - const response = await client.cluster.putSettings({ - persistent: { - "indices.recovery.max_bytes_per_sec": "50mb", - }, - }); - - language: Ruby - code: |- - response = client.cluster.put_settings( - body: { - "persistent": { - "indices.recovery.max_bytes_per_sec": "50mb" - } - } - ) - - language: PHP - code: |- - $resp = $client->cluster()->putSettings([ - "body" => [ - "persistent" => [ - "indices.recovery.max_bytes_per_sec" => "50mb", - ], - ], - ]); - - language: curl - code: - 'curl -X PUT -H "Authorization: ApiKey $ELASTIC_API_KEY" -H "Content-Type: application/json" -d - ''{"persistent":{"indices.recovery.max_bytes_per_sec":"50mb"}}'' "$ELASTICSEARCH_URL/_cluster/settings"' - - language: Java - code: | - client.cluster().putSettings(p -> p - .persistent("indices.recovery.max_bytes_per_sec", JsonData.fromJson("\"50mb\"")) - ); diff --git a/specification/cluster/put_settings/examples/request/ClusterPutSettingsRequestExample2.yaml b/specification/cluster/put_settings/examples/request/ClusterPutSettingsRequestExample2.yaml index 425860b2fb..c76d67ba7d 100644 --- a/specification/cluster/put_settings/examples/request/ClusterPutSettingsRequestExample2.yaml +++ b/specification/cluster/put_settings/examples/request/ClusterPutSettingsRequestExample2.yaml @@ -13,46 +13,3 @@ value: |- "action.auto_create_index": "my-index-000001,index10,-index1*,+ind*" } } -alternatives: - - language: Python - code: |- - resp = client.cluster.put_settings( - persistent={ - "action.auto_create_index": "my-index-000001,index10,-index1*,+ind*" - }, - ) - - language: JavaScript - code: |- - const response = await client.cluster.putSettings({ - persistent: { - "action.auto_create_index": "my-index-000001,index10,-index1*,+ind*", - }, - }); - - language: Ruby - code: |- - response = client.cluster.put_settings( - body: { - "persistent": { - "action.auto_create_index": "my-index-000001,index10,-index1*,+ind*" - } - } - ) - - language: PHP - code: |- - $resp = $client->cluster()->putSettings([ - "body" => [ - "persistent" => [ - "action.auto_create_index" => "my-index-000001,index10,-index1*,+ind*", - ], - ], - ]); - - language: curl - code: - 'curl -X PUT -H "Authorization: ApiKey $ELASTIC_API_KEY" -H "Content-Type: application/json" -d - ''{"persistent":{"action.auto_create_index":"my-index-000001,index10,-index1*,+ind*"}}'' - "$ELASTICSEARCH_URL/_cluster/settings"' - - language: Java - code: | - client.cluster().putSettings(p -> p - .persistent("action.auto_create_index", JsonData.fromJson("\"my-index-000001,index10,-index1*,+ind*\"")) - ); diff --git a/specification/cluster/remote_info/examples/request/ClusterRemoteInfoExample1.yaml b/specification/cluster/remote_info/examples/request/ClusterRemoteInfoExample1.yaml index 8512892d65..989596ba8f 100644 --- a/specification/cluster/remote_info/examples/request/ClusterRemoteInfoExample1.yaml +++ b/specification/cluster/remote_info/examples/request/ClusterRemoteInfoExample1.yaml @@ -1,15 +1 @@ method_request: GET /_remote/info -alternatives: - - language: Python - code: resp = client.cluster.remote_info() - - language: JavaScript - code: const response = await client.cluster.remoteInfo(); - - language: Ruby - code: response = client.cluster.remote_info - - language: PHP - code: $resp = $client->cluster()->remoteInfo(); - - language: curl - code: 'curl -X GET -H "Authorization: ApiKey $ELASTIC_API_KEY" "$ELASTICSEARCH_URL/_remote/info"' - - language: Java - code: | - client.cluster().remoteInfo(); diff --git a/specification/cluster/reroute/examples/request/ClusterRerouteRequestExample1.yaml b/specification/cluster/reroute/examples/request/ClusterRerouteRequestExample1.yaml index fcbc8a511d..1d9b402115 100644 --- a/specification/cluster/reroute/examples/request/ClusterRerouteRequestExample1.yaml +++ b/specification/cluster/reroute/examples/request/ClusterRerouteRequestExample1.yaml @@ -19,101 +19,3 @@ value: |- } ] } -alternatives: - - language: Python - code: |- - resp = client.cluster.reroute( - metric="none", - commands=[ - { - "move": { - "index": "test", - "shard": 0, - "from_node": "node1", - "to_node": "node2" - } - }, - { - "allocate_replica": { - "index": "test", - "shard": 1, - "node": "node3" - } - } - ], - ) - - language: JavaScript - code: |- - const response = await client.cluster.reroute({ - metric: "none", - commands: [ - { - move: { - index: "test", - shard: 0, - from_node: "node1", - to_node: "node2", - }, - }, - { - allocate_replica: { - index: "test", - shard: 1, - node: "node3", - }, - }, - ], - }); - - language: Ruby - code: |- - response = client.cluster.reroute( - metric: "none", - body: { - "commands": [ - { - "move": { - "index": "test", - "shard": 0, - "from_node": "node1", - "to_node": "node2" - } - }, - { - "allocate_replica": { - "index": "test", - "shard": 1, - "node": "node3" - } - } - ] - } - ) - - language: PHP - code: |- - $resp = $client->cluster()->reroute([ - "metric" => "none", - "body" => [ - "commands" => array( - [ - "move" => [ - "index" => "test", - "shard" => 0, - "from_node" => "node1", - "to_node" => "node2", - ], - ], - [ - "allocate_replica" => [ - "index" => "test", - "shard" => 1, - "node" => "node3", - ], - ], - ), - ], - ]); - - language: curl - code: - "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d - '{\"commands\":[{\"move\":{\"index\":\"test\",\"shard\":0,\"from_node\":\"node1\",\"to_node\":\"node2\"}},{\"allocate_replica\ - \":{\"index\":\"test\",\"shard\":1,\"node\":\"node3\"}}]}' \"$ELASTICSEARCH_URL/_cluster/reroute?metric=none\"" diff --git a/specification/cluster/state/examples/request/ClusterStateExample1.yaml b/specification/cluster/state/examples/request/ClusterStateExample1.yaml index 07e1a52727..51c4ecac5f 100644 --- a/specification/cluster/state/examples/request/ClusterStateExample1.yaml +++ b/specification/cluster/state/examples/request/ClusterStateExample1.yaml @@ -1,27 +1 @@ method_request: GET /_cluster/state?filter_path=metadata.cluster_coordination.last_committed_config -alternatives: - - language: Python - code: |- - resp = client.cluster.state( - filter_path="metadata.cluster_coordination.last_committed_config", - ) - - language: JavaScript - code: |- - const response = await client.cluster.state({ - filter_path: "metadata.cluster_coordination.last_committed_config", - }); - - language: Ruby - code: |- - response = client.cluster.state( - filter_path: "metadata.cluster_coordination.last_committed_config" - ) - - language: PHP - code: |- - $resp = $client->cluster()->state([ - "filter_path" => "metadata.cluster_coordination.last_committed_config", - ]); - - language: curl - code: 'curl -X GET -H "Authorization: ApiKey $ELASTIC_API_KEY" - "$ELASTICSEARCH_URL/_cluster/state?filter_path=metadata.cluster_coordination.last_committed_config"' - - language: Java - code: "\n" diff --git a/specification/cluster/stats/ClusterStatsResponse.ts b/specification/cluster/stats/ClusterStatsResponse.ts index 9f7f68166d..14f582297f 100644 --- a/specification/cluster/stats/ClusterStatsResponse.ts +++ b/specification/cluster/stats/ClusterStatsResponse.ts @@ -20,7 +20,13 @@ import { HealthStatus, Name, Uuid } from '@_types/common' import { long } from '@_types/Numeric' import { NodesResponseBase } from '@nodes/_types/NodesResponseBase' -import { CCSStats, ClusterIndices, ClusterNodes } from './types' +import { Dictionary } from '@spec_utils/Dictionary' +import { + CCSStats, + ClusterIndices, + ClusterNodes, + ClusterSnapshotStats +} from './types' export class StatsResponseBase extends NodesResponseBase { /** @@ -40,10 +46,18 @@ export class StatsResponseBase extends NodesResponseBase { * @doc_id cluster-nodes */ nodes: ClusterNodes + /** + * Contains stats on repository feature usage exposed in cluster stats for telemetry. + */ + repositories: Dictionary> + /** + * Contains stats cluster snapshots. + */ + snapshots: ClusterSnapshotStats /** * Health status of the cluster, based on the state of its primary and replica shards. */ - status: HealthStatus + status?: HealthStatus /** * Unix timestamp, in milliseconds, for the last time the cluster statistics were refreshed. */ diff --git a/specification/cluster/stats/examples/request/ClusterStatsExample1.yaml b/specification/cluster/stats/examples/request/ClusterStatsExample1.yaml index ecac7caa71..94af04f32c 100644 --- a/specification/cluster/stats/examples/request/ClusterStatsExample1.yaml +++ b/specification/cluster/stats/examples/request/ClusterStatsExample1.yaml @@ -1,31 +1 @@ method_request: GET _cluster/stats?human&filter_path=indices.mappings.total_deduplicated_mapping_size* -alternatives: - - language: Python - code: |- - resp = client.cluster.stats( - human=True, - filter_path="indices.mappings.total_deduplicated_mapping_size*", - ) - - language: JavaScript - code: |- - const response = await client.cluster.stats({ - human: "true", - filter_path: "indices.mappings.total_deduplicated_mapping_size*", - }); - - language: Ruby - code: |- - response = client.cluster.stats( - human: "true", - filter_path: "indices.mappings.total_deduplicated_mapping_size*" - ) - - language: PHP - code: |- - $resp = $client->cluster()->stats([ - "human" => "true", - "filter_path" => "indices.mappings.total_deduplicated_mapping_size*", - ]); - - language: curl - code: 'curl -X GET -H "Authorization: ApiKey $ELASTIC_API_KEY" - "$ELASTICSEARCH_URL/_cluster/stats?human&filter_path=indices.mappings.total_deduplicated_mapping_size*"' - - language: Java - code: "\n" diff --git a/specification/cluster/stats/types.ts b/specification/cluster/stats/types.ts index 670e291f0e..f4383ae99c 100644 --- a/specification/cluster/stats/types.ts +++ b/specification/cluster/stats/types.ts @@ -28,24 +28,50 @@ import { SegmentsStats, StoreStats } from '@_types/Stats' -import { Duration, DurationValue, UnitMillis } from '@_types/Time' +import { DateFormat, Duration, DurationValue, UnitMillis } from '@_types/Time' +import { IndexingPressureMemory } from '@nodes/_types/Stats' import { Dictionary } from '@spec_utils/Dictionary' export class ClusterFileSystem { + path?: string + mount?: string + type?: string /** * Total number of bytes available to JVM in file stores across all selected nodes. * Depending on operating system or process-level restrictions, this number may be less than `nodes.fs.free_in_byes`. * This is the actual amount of free disk space the selected Elasticsearch nodes can use. */ - available_in_bytes: long + available_in_bytes?: long + /** + * Total number of bytes available to JVM in file stores across all selected nodes. + * Depending on operating system or process-level restrictions, this number may be less than `nodes.fs.free_in_byes`. + * This is the actual amount of free disk space the selected Elasticsearch nodes can use. + */ + available?: ByteSize + /** + * Total number, in bytes, of unallocated bytes in file stores across all selected nodes. + */ + free_in_bytes?: long /** * Total number of unallocated bytes in file stores across all selected nodes. */ - free_in_bytes: long + free?: ByteSize /** * Total size, in bytes, of all file stores across all selected nodes. */ - total_in_bytes: long + total_in_bytes?: long + /** + * Total size of all file stores across all selected nodes. + */ + total?: ByteSize + low_watermark_free_space?: ByteSize + low_watermark_free_space_in_bytes?: long + high_watermark_free_space?: ByteSize + high_watermark_free_space_in_bytes?: long + flood_stage_free_space?: ByteSize + flood_stage_free_space_in_bytes?: long + frozen_flood_stage_free_space?: ByteSize + frozen_flood_stage_free_space_in_bytes?: long } export class ClusterIndicesShardsIndex { @@ -75,7 +101,7 @@ export class ClusterIndices { /** * Contains statistics about analyzers and analyzer components used in selected nodes. */ - analysis: CharFilterTypes + analysis?: CharFilterTypes /** Contains statistics about memory used for completion in selected nodes. */ completion: CompletionStats /** Total number of indices with shards assigned to selected nodes. */ @@ -89,6 +115,12 @@ export class ClusterIndices { fielddata: FielddataStats /** Contains statistics about the query cache of selected nodes. */ query_cache: QueryCacheStats + /** + * Holds a snapshot of the search usage statistics. + * Used to hold the stats for a single node that's part of a ClusterStatsNodeResponse, as well as to + * accumulate stats for the entire cluster and return them as part of the ClusterStatsResponse. + */ + search: SearchUsageStats /** Contains statistics about segments in selected nodes. */ segments: SegmentsStats /** Contains statistics about indices with shards assigned to selected nodes. */ @@ -98,12 +130,51 @@ export class ClusterIndices { /** * Contains statistics about field mappings in selected nodes. */ - mappings: FieldTypesMappings + mappings?: FieldTypesMappings /** * Contains statistics about analyzers and analyzer components used in selected nodes. * @doc_id analyzer-anatomy */ versions?: IndicesVersions[] + /** + * Contains statistics about indexed dense vector + */ + dense_vector: DenseVectorStats + /** + * Contains statistics about indexed sparse vector + */ + sparse_vector: SparseVectorStats +} + +export class SearchUsageStats { + total: long + queries: Dictionary + rescorers: Dictionary + sections: Dictionary + retrievers: Dictionary +} + +export class DenseVectorStats { + value_count: long + off_heap?: DenseVectorOffHeapStats +} + +export class SparseVectorStats { + value_count: long +} + +export class DenseVectorOffHeapStats { + total_size_bytes: long + total_size?: ByteSize + total_veb_size_bytes: long + total_veb_size?: ByteSize + total_vec_size_bytes: long + total_vec_size?: ByteSize + total_veq_size_bytes: long + total_veq_size?: ByteSize + total_vex_size_bytes: long + total_vex_size?: ByteSize + fielddata?: Dictionary> } export class FieldTypesMappings { @@ -114,15 +185,15 @@ export class FieldTypesMappings { /** * Contains statistics about runtime field data types used in selected nodes. */ - runtime_field_types?: RuntimeFieldTypes[] + runtime_field_types: RuntimeFieldTypes[] /** * Total number of fields in all non-system indices. */ - total_field_count?: integer + total_field_count?: long /** * Total number of fields in all non-system indices, accounting for mapping deduplication. */ - total_deduplicated_field_count?: integer + total_deduplicated_field_count?: long /** * Total size of all mappings after deduplication and compression. */ @@ -131,6 +202,10 @@ export class FieldTypesMappings { * Total size of all mappings, in bytes, after deduplication and compression. */ total_deduplicated_mapping_size_in_bytes?: long + /** + * Source mode usage count. + */ + source_modes: Dictionary } export class FieldTypes { @@ -149,21 +224,33 @@ export class FieldTypes { /** * For dense_vector field types, number of indexed vector types in selected nodes. */ - indexed_vector_count?: long + indexed_vector_count?: integer /** * For dense_vector field types, the maximum dimension of all indexed vector types in selected nodes. */ - indexed_vector_dim_max?: long + indexed_vector_dim_max?: integer /** * For dense_vector field types, the minimum dimension of all indexed vector types in selected nodes. */ - indexed_vector_dim_min?: long + indexed_vector_dim_min?: integer /** * The number of fields that declare a script. * @availability stack since=7.13.0 * @availability serverless */ script_count?: integer + /** + * For dense_vector field types, count of mappings by index type + */ + vector_index_type_count?: Dictionary + /** + * For dense_vector field types, count of mappings by similarity + */ + vector_similarity_type_count?: Dictionary + /** + * For dense_vector field types, count of mappings by element type + */ + vector_element_type_count?: Dictionary } export class RuntimeFieldTypes { @@ -258,12 +345,22 @@ export class CharFilterTypes { * Contains statistics about tokenizer types used in selected nodes. */ tokenizer_types: FieldTypes[] + /** + * Contains statistics about synonyms types used in selected nodes. + */ + synonyms: Dictionary +} + +export class SynonymsStats { + count: integer + index_count: integer } export class IndicesVersions { index_count: integer primary_shard_count: integer total_primary_bytes: long + total_primary_size?: ByteSize version: VersionString } @@ -277,6 +374,10 @@ export class ClusterJvm { * Uptime duration, in milliseconds, since JVM last started. */ max_uptime_in_millis: DurationValue + /** + * Uptime duration since JVM last started. + */ + max_uptime?: Duration /** * Contains statistics about memory used by selected nodes. */ @@ -296,10 +397,18 @@ export class ClusterJvmMemory { * Maximum amount of memory, in bytes, available for use by the heap across all selected nodes. */ heap_max_in_bytes: long + /** + * Maximum amount of memory available for use by the heap across all selected nodes. + */ + heap_max?: ByteSize /** * Memory, in bytes, currently in use by the heap across all selected nodes. */ heap_used_in_bytes: long + /** + * Memory currently in use by the heap across all selected nodes. + */ + heap_used?: ByteSize } export class ClusterJvmVersion { @@ -346,24 +455,26 @@ export class ClusterNetworkTypes { } export class ClusterNodeCount { - coordinating_only: integer - data: integer - data_cold: integer - data_content: integer + total: integer + coordinating_only?: integer + data?: integer + data_cold?: integer + data_content?: integer /** * @availability stack since=7.13.0 * @availability serverless */ data_frozen?: integer - data_hot: integer - data_warm: integer - ingest: integer - master: integer - ml: integer - remote_cluster_client: integer - total: integer - transform: integer - voting_only: integer + data_hot?: integer + data_warm?: integer + index?: integer + ingest?: integer + master?: integer + ml?: integer + remote_cluster_client?: integer + search?: integer + transform?: integer + voting_only?: integer } export class ClusterNodes { @@ -523,6 +634,69 @@ export class ClusterShardMetrics { min: double } +export class ClusterSnapshotStats { + current_counts: SnapshotCurrentCounts + repositories: Dictionary +} + +export class SnapshotCurrentCounts { + /** + * Snapshots currently in progress + */ + snapshots: integer + /** + * Incomplete shard snapshots + */ + shard_snapshots: integer + /** + * Snapshots deletions in progress + */ + snapshot_deletions: integer + /** + * Sum of snapshots and snapshot_deletions + */ + concurrent_operations: integer + /** + * Cleanups in progress, not counted in concurrent_operations as they are not concurrent + */ + cleanups: integer +} + +export class PerRepositoryStats { + type: string + oldest_start_time_millis: UnitMillis + oldest_start_time?: DateFormat + current_counts: RepositoryStatsCurrentCounts +} + +export class RepositoryStatsCurrentCounts { + snapshots: integer + clones: integer + finalizations: integer + deletions: integer + snapshot_deletions: integer + active_deletions: integer + shards: RepositoryStatsShards +} + +export class RepositoryStatsShards { + total: integer + complete: integer + incomplete: integer + states: Dictionary +} + +export enum ShardState { + INIT, + SUCCESS, + FAILED, + ABORTED, + MISSING, + WAITING, + QUEUED, + PAUSED_FOR_NODE_REMOVAL +} + export class NodePackagingType { /** * Number of selected nodes using the distribution flavor and file type. @@ -545,10 +719,22 @@ export class OperatingSystemMemoryInfo { * @availability serverless */ adjusted_total_in_bytes?: long + /** + * Total amount of memory across all selected nodes, but using the value specified using the `es.total_memory_bytes` system property instead of measured total memory for those nodes where that system property was set. + * @availability stack since=7.16.0 + * @availability serverless + */ + adjusted_total?: ByteSize + /** * Amount, in bytes, of free physical memory across all selected nodes. */ free_in_bytes: long + /** + * Amount of free physical memory across all selected nodes. + */ + free?: ByteSize + /** * Percentage of free physical memory across all selected nodes. */ @@ -557,10 +743,19 @@ export class OperatingSystemMemoryInfo { * Total amount, in bytes, of physical memory across all selected nodes. */ total_in_bytes: long + /** + * Total amount of physical memory across all selected nodes. + */ + total?: ByteSize + /** * Amount, in bytes, of physical memory in use across all selected nodes. */ used_in_bytes: long + /** + * Amount of physical memory in use across all selected nodes. + */ + used?: ByteSize /** * Percentage of physical memory in use across all selected nodes. */ @@ -571,23 +766,6 @@ export class IndexingPressure { memory: IndexingPressureMemory } -export class IndexingPressureMemory { - current: IndexingPressureMemorySummary - limit_in_bytes: long - total: IndexingPressureMemorySummary -} - -export class IndexingPressureMemorySummary { - all_in_bytes: long - combined_coordinating_and_primary_in_bytes: long - coordinating_in_bytes: long - coordinating_rejections?: long - primary_in_bytes: long - primary_rejections?: long - replica_in_bytes: long - replica_rejections?: long -} - export class CCSStats { /** * Contains remote cluster settings and metrics collected from them. @@ -613,7 +791,7 @@ export class RemoteClusterInfo { /** The `skip_unavailable` setting used for this remote cluster. */ skip_unavailable: boolean /** Transport compression setting used for this remote cluster. */ - transport_compress: string + 'transport.compress': string /** Health status of the cluster, based on the state of its primary and replica shards. */ status: HealthStatus /** The list of Elasticsearch versions used by the nodes on the remote cluster. */ diff --git a/specification/connector/check_in/examples/request/ConnectorCheckInExample1.yaml b/specification/connector/check_in/examples/request/ConnectorCheckInExample1.yaml index d59b290297..2f97b859fb 100644 --- a/specification/connector/check_in/examples/request/ConnectorCheckInExample1.yaml +++ b/specification/connector/check_in/examples/request/ConnectorCheckInExample1.yaml @@ -1,29 +1 @@ method_request: PUT _connector/my-connector/_check_in -alternatives: - - language: Python - code: |- - resp = client.connector.check_in( - connector_id="my-connector", - ) - - language: JavaScript - code: |- - const response = await client.connector.checkIn({ - connector_id: "my-connector", - }); - - language: Ruby - code: |- - response = client.connector.check_in( - connector_id: "my-connector" - ) - - language: PHP - code: |- - $resp = $client->connector()->checkIn([ - "connector_id" => "my-connector", - ]); - - language: curl - code: 'curl -X PUT -H "Authorization: ApiKey $ELASTIC_API_KEY" "$ELASTICSEARCH_URL/_connector/my-connector/_check_in"' - - language: Java - code: | - client.connector().checkIn(c -> c - .connectorId("my-connector") - ); diff --git a/specification/connector/delete/examples/request/ConnectorDeleteExample1.yaml b/specification/connector/delete/examples/request/ConnectorDeleteExample1.yaml index dd538cd532..bc8099b358 100644 --- a/specification/connector/delete/examples/request/ConnectorDeleteExample1.yaml +++ b/specification/connector/delete/examples/request/ConnectorDeleteExample1.yaml @@ -1,30 +1 @@ method_request: DELETE _connector/my-connector-id&delete_sync_jobs=true -alternatives: - - language: Python - code: |- - resp = client.connector.delete( - connector_id="my-connector-id&delete_sync_jobs=true", - ) - - language: JavaScript - code: |- - const response = await client.connector.delete({ - connector_id: "my-connector-id&delete_sync_jobs=true", - }); - - language: Ruby - code: |- - response = client.connector.delete( - connector_id: "my-connector-id&delete_sync_jobs=true" - ) - - language: PHP - code: |- - $resp = $client->connector()->delete([ - "connector_id" => "my-connector-id&delete_sync_jobs=true", - ]); - - language: curl - code: 'curl -X DELETE -H "Authorization: ApiKey $ELASTIC_API_KEY" - "$ELASTICSEARCH_URL/_connector/my-connector-id&delete_sync_jobs=true"' - - language: Java - code: | - client.connector().delete(d -> d - .connectorId("my-connector-id&delete_sync_jobs=true") - ); diff --git a/specification/connector/get/examples/request/ConnectorGetExample1.yaml b/specification/connector/get/examples/request/ConnectorGetExample1.yaml index 0544a4d028..74c3c41c26 100644 --- a/specification/connector/get/examples/request/ConnectorGetExample1.yaml +++ b/specification/connector/get/examples/request/ConnectorGetExample1.yaml @@ -1,29 +1 @@ method_request: GET _connector/my-connector-id -alternatives: - - language: Python - code: |- - resp = client.connector.get( - connector_id="my-connector-id", - ) - - language: JavaScript - code: |- - const response = await client.connector.get({ - connector_id: "my-connector-id", - }); - - language: Ruby - code: |- - response = client.connector.get( - connector_id: "my-connector-id" - ) - - language: PHP - code: |- - $resp = $client->connector()->get([ - "connector_id" => "my-connector-id", - ]); - - language: curl - code: 'curl -X GET -H "Authorization: ApiKey $ELASTIC_API_KEY" "$ELASTICSEARCH_URL/_connector/my-connector-id"' - - language: Java - code: | - client.connector().get(g -> g - .connectorId("my-connector-id") - ); diff --git a/specification/connector/last_sync/examples/request/ConnectorUpdateLastSyncRequestExample1.yaml b/specification/connector/last_sync/examples/request/ConnectorUpdateLastSyncRequestExample1.yaml index 611f461feb..030bc2c34f 100644 --- a/specification/connector/last_sync/examples/request/ConnectorUpdateLastSyncRequestExample1.yaml +++ b/specification/connector/last_sync/examples/request/ConnectorUpdateLastSyncRequestExample1.yaml @@ -25,94 +25,3 @@ value: "{ \ \"last_synced\": \"2024-11-09T15:13:08.231Z\" }" -alternatives: - - language: Python - code: |- - resp = client.perform_request( - "PUT", - "/_connector/my-connector/_last_sync", - headers={"Content-Type": "application/json"}, - body={ - "last_access_control_sync_error": "Houston, we have a problem!", - "last_access_control_sync_scheduled_at": "2023-11-09T15:13:08.231Z", - "last_access_control_sync_status": "pending", - "last_deleted_document_count": 42, - "last_incremental_sync_scheduled_at": "2023-11-09T15:13:08.231Z", - "last_indexed_document_count": 42, - "last_sync_error": "Houston, we have a problem!", - "last_sync_scheduled_at": "2024-11-09T15:13:08.231Z", - "last_sync_status": "completed", - "last_synced": "2024-11-09T15:13:08.231Z" - }, - ) - - language: JavaScript - code: |- - const response = await client.transport.request({ - method: "PUT", - path: "/_connector/my-connector/_last_sync", - body: { - last_access_control_sync_error: "Houston, we have a problem!", - last_access_control_sync_scheduled_at: "2023-11-09T15:13:08.231Z", - last_access_control_sync_status: "pending", - last_deleted_document_count: 42, - last_incremental_sync_scheduled_at: "2023-11-09T15:13:08.231Z", - last_indexed_document_count: 42, - last_sync_error: "Houston, we have a problem!", - last_sync_scheduled_at: "2024-11-09T15:13:08.231Z", - last_sync_status: "completed", - last_synced: "2024-11-09T15:13:08.231Z", - }, - }); - - language: Ruby - code: |- - response = client.perform_request( - "PUT", - "/_connector/my-connector/_last_sync", - {}, - { - "last_access_control_sync_error": "Houston, we have a problem!", - "last_access_control_sync_scheduled_at": "2023-11-09T15:13:08.231Z", - "last_access_control_sync_status": "pending", - "last_deleted_document_count": 42, - "last_incremental_sync_scheduled_at": "2023-11-09T15:13:08.231Z", - "last_indexed_document_count": 42, - "last_sync_error": "Houston, we have a problem!", - "last_sync_scheduled_at": "2024-11-09T15:13:08.231Z", - "last_sync_status": "completed", - "last_synced": "2024-11-09T15:13:08.231Z" - }, - { "Content-Type": "application/json" }, - ) - - language: PHP - code: |- - $requestFactory = Psr17FactoryDiscovery::findRequestFactory(); - $streamFactory = Psr17FactoryDiscovery::findStreamFactory(); - $request = $requestFactory->createRequest( - "PUT", - "/_connector/my-connector/_last_sync", - ); - $request = $request->withHeader("Content-Type", "application/json"); - $request = $request->withBody($streamFactory->createStream( - json_encode([ - "last_access_control_sync_error" => "Houston, we have a problem!", - "last_access_control_sync_scheduled_at" => "2023-11-09T15:13:08.231Z", - "last_access_control_sync_status" => "pending", - "last_deleted_document_count" => 42, - "last_incremental_sync_scheduled_at" => "2023-11-09T15:13:08.231Z", - "last_indexed_document_count" => 42, - "last_sync_error" => "Houston, we have a problem!", - "last_sync_scheduled_at" => "2024-11-09T15:13:08.231Z", - "last_sync_status" => "completed", - "last_synced" => "2024-11-09T15:13:08.231Z", - ]), - )); - $resp = $client->sendRequest($request); - - language: curl - code: - "curl -X PUT -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d - '{\"last_access_control_sync_error\":\"Houston, we have a - problem!\",\"last_access_control_sync_scheduled_at\":\"2023-11-09T15:13:08.231Z\",\"last_access_control_sync_status\":\"pendi\ - ng\",\"last_deleted_document_count\":42,\"last_incremental_sync_scheduled_at\":\"2023-11-09T15:13:08.231Z\",\"last_indexed_do\ - cument_count\":42,\"last_sync_error\":\"Houston, we have a - problem!\",\"last_sync_scheduled_at\":\"2024-11-09T15:13:08.231Z\",\"last_sync_status\":\"completed\",\"last_synced\":\"2024-\ - 11-09T15:13:08.231Z\"}' \"$ELASTICSEARCH_URL/_connector/my-connector/_last_sync\"" diff --git a/specification/connector/list/examples/request/ConnectorListExample1.yaml b/specification/connector/list/examples/request/ConnectorListExample1.yaml index 3225fec5b4..322ca96846 100644 --- a/specification/connector/list/examples/request/ConnectorListExample1.yaml +++ b/specification/connector/list/examples/request/ConnectorListExample1.yaml @@ -1,15 +1 @@ method_request: GET _connector -alternatives: - - language: Python - code: resp = client.connector.list() - - language: JavaScript - code: const response = await client.connector.list(); - - language: Ruby - code: response = client.connector.list - - language: PHP - code: $resp = $client->connector()->list(); - - language: curl - code: 'curl -X GET -H "Authorization: ApiKey $ELASTIC_API_KEY" "$ELASTICSEARCH_URL/_connector"' - - language: Java - code: | - client.connector().list(l -> l); diff --git a/specification/connector/put/examples/request/ConnectorPutRequestExample1.yaml b/specification/connector/put/examples/request/ConnectorPutRequestExample1.yaml index 79b38e6aee..beecca0fdf 100644 --- a/specification/connector/put/examples/request/ConnectorPutRequestExample1.yaml +++ b/specification/connector/put/examples/request/ConnectorPutRequestExample1.yaml @@ -11,53 +11,3 @@ value: "{ \ \"service_type\": \"google_drive\" }" -alternatives: - - language: Python - code: |- - resp = client.connector.put( - connector_id="my-connector", - index_name="search-google-drive", - name="My Connector", - service_type="google_drive", - ) - - language: JavaScript - code: |- - const response = await client.connector.put({ - connector_id: "my-connector", - index_name: "search-google-drive", - name: "My Connector", - service_type: "google_drive", - }); - - language: Ruby - code: |- - response = client.connector.put( - connector_id: "my-connector", - body: { - "index_name": "search-google-drive", - "name": "My Connector", - "service_type": "google_drive" - } - ) - - language: PHP - code: |- - $resp = $client->connector()->put([ - "connector_id" => "my-connector", - "body" => [ - "index_name" => "search-google-drive", - "name" => "My Connector", - "service_type" => "google_drive", - ], - ]); - - language: curl - code: - 'curl -X PUT -H "Authorization: ApiKey $ELASTIC_API_KEY" -H "Content-Type: application/json" -d - ''{"index_name":"search-google-drive","name":"My Connector","service_type":"google_drive"}'' - "$ELASTICSEARCH_URL/_connector/my-connector"' - - language: Java - code: | - client.connector().put(p -> p - .connectorId("my-connector") - .indexName("search-google-drive") - .name("My Connector") - .serviceType("google_drive") - ); diff --git a/specification/connector/put/examples/request/ConnectorPutRequestExample2.yaml b/specification/connector/put/examples/request/ConnectorPutRequestExample2.yaml index fa4d100138..d79b7a545d 100644 --- a/specification/connector/put/examples/request/ConnectorPutRequestExample2.yaml +++ b/specification/connector/put/examples/request/ConnectorPutRequestExample2.yaml @@ -15,64 +15,3 @@ value: "{ \ \"language\": \"english\" }" -alternatives: - - language: Python - code: |- - resp = client.connector.put( - connector_id="my-connector", - index_name="search-google-drive", - name="My Connector", - description="My Connector to sync data to Elastic index from Google Drive", - service_type="google_drive", - language="english", - ) - - language: JavaScript - code: |- - const response = await client.connector.put({ - connector_id: "my-connector", - index_name: "search-google-drive", - name: "My Connector", - description: "My Connector to sync data to Elastic index from Google Drive", - service_type: "google_drive", - language: "english", - }); - - language: Ruby - code: |- - response = client.connector.put( - connector_id: "my-connector", - body: { - "index_name": "search-google-drive", - "name": "My Connector", - "description": "My Connector to sync data to Elastic index from Google Drive", - "service_type": "google_drive", - "language": "english" - } - ) - - language: PHP - code: |- - $resp = $client->connector()->put([ - "connector_id" => "my-connector", - "body" => [ - "index_name" => "search-google-drive", - "name" => "My Connector", - "description" => "My Connector to sync data to Elastic index from Google Drive", - "service_type" => "google_drive", - "language" => "english", - ], - ]); - - language: curl - code: - 'curl -X PUT -H "Authorization: ApiKey $ELASTIC_API_KEY" -H "Content-Type: application/json" -d - ''{"index_name":"search-google-drive","name":"My Connector","description":"My Connector to sync data to Elastic - index from Google Drive","service_type":"google_drive","language":"english"}'' - "$ELASTICSEARCH_URL/_connector/my-connector"' - - language: Java - code: | - client.connector().put(p -> p - .connectorId("my-connector") - .description("My Connector to sync data to Elastic index from Google Drive") - .indexName("search-google-drive") - .language("english") - .name("My Connector") - .serviceType("google_drive") - ); diff --git a/specification/connector/sync_job_cancel/examples/request/ConnectorSyncJobCancelExample1.yaml b/specification/connector/sync_job_cancel/examples/request/ConnectorSyncJobCancelExample1.yaml index 269b148b8d..37099d856b 100644 --- a/specification/connector/sync_job_cancel/examples/request/ConnectorSyncJobCancelExample1.yaml +++ b/specification/connector/sync_job_cancel/examples/request/ConnectorSyncJobCancelExample1.yaml @@ -1,30 +1 @@ method_request: PUT _connector/_sync_job/my-connector-sync-job-id/_cancel -alternatives: - - language: Python - code: |- - resp = client.connector.sync_job_cancel( - connector_sync_job_id="my-connector-sync-job-id", - ) - - language: JavaScript - code: |- - const response = await client.connector.syncJobCancel({ - connector_sync_job_id: "my-connector-sync-job-id", - }); - - language: Ruby - code: |- - response = client.connector.sync_job_cancel( - connector_sync_job_id: "my-connector-sync-job-id" - ) - - language: PHP - code: |- - $resp = $client->connector()->syncJobCancel([ - "connector_sync_job_id" => "my-connector-sync-job-id", - ]); - - language: curl - code: 'curl -X PUT -H "Authorization: ApiKey $ELASTIC_API_KEY" - "$ELASTICSEARCH_URL/_connector/_sync_job/my-connector-sync-job-id/_cancel"' - - language: Java - code: | - client.connector().syncJobCancel(s -> s - .connectorSyncJobId("my-connector-sync-job-id") - ); diff --git a/specification/connector/sync_job_check_in/examples/request/ConnectorSyncJobCheckInExample1.yaml b/specification/connector/sync_job_check_in/examples/request/ConnectorSyncJobCheckInExample1.yaml index a456522b3d..7400453c39 100644 --- a/specification/connector/sync_job_check_in/examples/request/ConnectorSyncJobCheckInExample1.yaml +++ b/specification/connector/sync_job_check_in/examples/request/ConnectorSyncJobCheckInExample1.yaml @@ -1,30 +1 @@ method_request: PUT _connector/_sync_job/my-connector-sync-job/_check_in -alternatives: - - language: Python - code: |- - resp = client.connector.sync_job_check_in( - connector_sync_job_id="my-connector-sync-job", - ) - - language: JavaScript - code: |- - const response = await client.connector.syncJobCheckIn({ - connector_sync_job_id: "my-connector-sync-job", - }); - - language: Ruby - code: |- - response = client.connector.sync_job_check_in( - connector_sync_job_id: "my-connector-sync-job" - ) - - language: PHP - code: |- - $resp = $client->connector()->syncJobCheckIn([ - "connector_sync_job_id" => "my-connector-sync-job", - ]); - - language: curl - code: 'curl -X PUT -H "Authorization: ApiKey $ELASTIC_API_KEY" - "$ELASTICSEARCH_URL/_connector/_sync_job/my-connector-sync-job/_check_in"' - - language: Java - code: | - client.connector().syncJobCheckIn(s -> s - .connectorSyncJobId("my-connector-sync-job") - ); diff --git a/specification/connector/sync_job_claim/examples/request/ConnectorSyncJobClaimExample1.yaml b/specification/connector/sync_job_claim/examples/request/ConnectorSyncJobClaimExample1.yaml index 531af2b4c5..f5d51efb6d 100644 --- a/specification/connector/sync_job_claim/examples/request/ConnectorSyncJobClaimExample1.yaml +++ b/specification/connector/sync_job_claim/examples/request/ConnectorSyncJobClaimExample1.yaml @@ -4,42 +4,3 @@ value: |- { "worker_hostname": "some-machine" } -alternatives: - - language: Python - code: |- - resp = client.connector.sync_job_claim( - connector_sync_job_id="my-connector-sync-job-id", - worker_hostname="some-machine", - ) - - language: JavaScript - code: |- - const response = await client.connector.syncJobClaim({ - connector_sync_job_id: "my-connector-sync-job-id", - worker_hostname: "some-machine", - }); - - language: Ruby - code: |- - response = client.connector.sync_job_claim( - connector_sync_job_id: "my-connector-sync-job-id", - body: { - "worker_hostname": "some-machine" - } - ) - - language: PHP - code: |- - $resp = $client->connector()->syncJobClaim([ - "connector_sync_job_id" => "my-connector-sync-job-id", - "body" => [ - "worker_hostname" => "some-machine", - ], - ]); - - language: curl - code: - 'curl -X PUT -H "Authorization: ApiKey $ELASTIC_API_KEY" -H "Content-Type: application/json" -d - ''{"worker_hostname":"some-machine"}'' "$ELASTICSEARCH_URL/_connector/_sync_job/my-connector-sync-job-id/_claim"' - - language: Java - code: | - client.connector().syncJobClaim(s -> s - .connectorSyncJobId("my-connector-sync-job-id") - .workerHostname("some-machine") - ); diff --git a/specification/connector/sync_job_delete/examples/request/ConnectorSyncJobDeleteExample1.yaml b/specification/connector/sync_job_delete/examples/request/ConnectorSyncJobDeleteExample1.yaml index 952eb3e2c7..f4e670b918 100644 --- a/specification/connector/sync_job_delete/examples/request/ConnectorSyncJobDeleteExample1.yaml +++ b/specification/connector/sync_job_delete/examples/request/ConnectorSyncJobDeleteExample1.yaml @@ -1,29 +1 @@ method_request: DELETE _connector/_sync_job/my-connector-sync-job-id -alternatives: - - language: Python - code: |- - resp = client.connector.sync_job_delete( - connector_sync_job_id="my-connector-sync-job-id", - ) - - language: JavaScript - code: |- - const response = await client.connector.syncJobDelete({ - connector_sync_job_id: "my-connector-sync-job-id", - }); - - language: Ruby - code: |- - response = client.connector.sync_job_delete( - connector_sync_job_id: "my-connector-sync-job-id" - ) - - language: PHP - code: |- - $resp = $client->connector()->syncJobDelete([ - "connector_sync_job_id" => "my-connector-sync-job-id", - ]); - - language: curl - code: 'curl -X DELETE -H "Authorization: ApiKey $ELASTIC_API_KEY" "$ELASTICSEARCH_URL/_connector/_sync_job/my-connector-sync-job-id"' - - language: Java - code: | - client.connector().syncJobDelete(s -> s - .connectorSyncJobId("my-connector-sync-job-id") - ); diff --git a/specification/connector/sync_job_error/examples/request/SyncJobErrorRequestExample1.yaml b/specification/connector/sync_job_error/examples/request/SyncJobErrorRequestExample1.yaml index 65530cbcdd..6af2adb0c0 100644 --- a/specification/connector/sync_job_error/examples/request/SyncJobErrorRequestExample1.yaml +++ b/specification/connector/sync_job_error/examples/request/SyncJobErrorRequestExample1.yaml @@ -3,42 +3,3 @@ method_request: PUT _connector/_sync_job/my-connector-sync-job/_error # description: '' # type: request value: "{\n \"error\": \"some-error\"\n}" -alternatives: - - language: Python - code: |- - resp = client.connector.sync_job_error( - connector_sync_job_id="my-connector-sync-job", - error="some-error", - ) - - language: JavaScript - code: |- - const response = await client.connector.syncJobError({ - connector_sync_job_id: "my-connector-sync-job", - error: "some-error", - }); - - language: Ruby - code: |- - response = client.connector.sync_job_error( - connector_sync_job_id: "my-connector-sync-job", - body: { - "error": "some-error" - } - ) - - language: PHP - code: |- - $resp = $client->connector()->syncJobError([ - "connector_sync_job_id" => "my-connector-sync-job", - "body" => [ - "error" => "some-error", - ], - ]); - - language: curl - code: - 'curl -X PUT -H "Authorization: ApiKey $ELASTIC_API_KEY" -H "Content-Type: application/json" -d - ''{"error":"some-error"}'' "$ELASTICSEARCH_URL/_connector/_sync_job/my-connector-sync-job/_error"' - - language: Java - code: | - client.connector().syncJobError(s -> s - .connectorSyncJobId("my-connector-sync-job") - .error("some-error") - ); diff --git a/specification/connector/sync_job_get/examples/request/ConnectorSyncJobGetExample1.yaml b/specification/connector/sync_job_get/examples/request/ConnectorSyncJobGetExample1.yaml index 7084d0c930..f6a2b86568 100644 --- a/specification/connector/sync_job_get/examples/request/ConnectorSyncJobGetExample1.yaml +++ b/specification/connector/sync_job_get/examples/request/ConnectorSyncJobGetExample1.yaml @@ -1,29 +1 @@ method_request: GET _connector/_sync_job/my-connector-sync-job -alternatives: - - language: Python - code: |- - resp = client.connector.sync_job_get( - connector_sync_job_id="my-connector-sync-job", - ) - - language: JavaScript - code: |- - const response = await client.connector.syncJobGet({ - connector_sync_job_id: "my-connector-sync-job", - }); - - language: Ruby - code: |- - response = client.connector.sync_job_get( - connector_sync_job_id: "my-connector-sync-job" - ) - - language: PHP - code: |- - $resp = $client->connector()->syncJobGet([ - "connector_sync_job_id" => "my-connector-sync-job", - ]); - - language: curl - code: 'curl -X GET -H "Authorization: ApiKey $ELASTIC_API_KEY" "$ELASTICSEARCH_URL/_connector/_sync_job/my-connector-sync-job"' - - language: Java - code: | - client.connector().syncJobGet(s -> s - .connectorSyncJobId("my-connector-sync-job") - ); diff --git a/specification/connector/sync_job_list/examples/request/ConnectorSyncJobListExample1.yaml b/specification/connector/sync_job_list/examples/request/ConnectorSyncJobListExample1.yaml index 6fcca5322d..6be6de9fff 100644 --- a/specification/connector/sync_job_list/examples/request/ConnectorSyncJobListExample1.yaml +++ b/specification/connector/sync_job_list/examples/request/ConnectorSyncJobListExample1.yaml @@ -1,35 +1 @@ method_request: GET _connector/_sync_job?connector_id=my-connector-id&size=1 -alternatives: - - language: Python - code: |- - resp = client.connector.sync_job_list( - connector_id="my-connector-id", - size="1", - ) - - language: JavaScript - code: |- - const response = await client.connector.syncJobList({ - connector_id: "my-connector-id", - size: 1, - }); - - language: Ruby - code: |- - response = client.connector.sync_job_list( - connector_id: "my-connector-id", - size: "1" - ) - - language: PHP - code: |- - $resp = $client->connector()->syncJobList([ - "connector_id" => "my-connector-id", - "size" => "1", - ]); - - language: curl - code: 'curl -X GET -H "Authorization: ApiKey $ELASTIC_API_KEY" - "$ELASTICSEARCH_URL/_connector/_sync_job?connector_id=my-connector-id&size=1"' - - language: Java - code: | - client.connector().syncJobList(s -> s - .connectorId("my-connector-id") - .size(1) - ); diff --git a/specification/connector/sync_job_post/examples/request/SyncJobPostRequestExample1.yaml b/specification/connector/sync_job_post/examples/request/SyncJobPostRequestExample1.yaml index 3a0b1e24f2..ad93bfe751 100644 --- a/specification/connector/sync_job_post/examples/request/SyncJobPostRequestExample1.yaml +++ b/specification/connector/sync_job_post/examples/request/SyncJobPostRequestExample1.yaml @@ -11,48 +11,3 @@ value: "{ \ \"trigger_method\": \"on_demand\" }" -alternatives: - - language: Python - code: |- - resp = client.connector.sync_job_post( - id="connector-id", - job_type="full", - trigger_method="on_demand", - ) - - language: JavaScript - code: |- - const response = await client.connector.syncJobPost({ - id: "connector-id", - job_type: "full", - trigger_method: "on_demand", - }); - - language: Ruby - code: |- - response = client.connector.sync_job_post( - body: { - "id": "connector-id", - "job_type": "full", - "trigger_method": "on_demand" - } - ) - - language: PHP - code: |- - $resp = $client->connector()->syncJobPost([ - "body" => [ - "id" => "connector-id", - "job_type" => "full", - "trigger_method" => "on_demand", - ], - ]); - - language: curl - code: - 'curl -X POST -H "Authorization: ApiKey $ELASTIC_API_KEY" -H "Content-Type: application/json" -d - ''{"id":"connector-id","job_type":"full","trigger_method":"on_demand"}'' - "$ELASTICSEARCH_URL/_connector/_sync_job"' - - language: Java - code: | - client.connector().syncJobPost(s -> s - .id("connector-id") - .jobType(SyncJobType.Full) - .triggerMethod(SyncJobTriggerMethod.OnDemand) - ); diff --git a/specification/connector/sync_job_update_stats/examples/request/ConnectorSyncJobUpdateStatsExample1.yaml b/specification/connector/sync_job_update_stats/examples/request/ConnectorSyncJobUpdateStatsExample1.yaml index 1aeb2cc7cf..f7b467b6fc 100644 --- a/specification/connector/sync_job_update_stats/examples/request/ConnectorSyncJobUpdateStatsExample1.yaml +++ b/specification/connector/sync_job_update_stats/examples/request/ConnectorSyncJobUpdateStatsExample1.yaml @@ -8,65 +8,3 @@ value: |- "total_document_count": 2000, "last_seen": "2023-01-02T10:00:00Z" } -alternatives: - - language: Python - code: |- - resp = client.connector.sync_job_update_stats( - connector_sync_job_id="my-connector-sync-job", - deleted_document_count=10, - indexed_document_count=20, - indexed_document_volume=1000, - total_document_count=2000, - last_seen="2023-01-02T10:00:00Z", - ) - - language: JavaScript - code: |- - const response = await client.connector.syncJobUpdateStats({ - connector_sync_job_id: "my-connector-sync-job", - deleted_document_count: 10, - indexed_document_count: 20, - indexed_document_volume: 1000, - total_document_count: 2000, - last_seen: "2023-01-02T10:00:00Z", - }); - - language: Ruby - code: |- - response = client.connector.sync_job_update_stats( - connector_sync_job_id: "my-connector-sync-job", - body: { - "deleted_document_count": 10, - "indexed_document_count": 20, - "indexed_document_volume": 1000, - "total_document_count": 2000, - "last_seen": "2023-01-02T10:00:00Z" - } - ) - - language: PHP - code: |- - $resp = $client->connector()->syncJobUpdateStats([ - "connector_sync_job_id" => "my-connector-sync-job", - "body" => [ - "deleted_document_count" => 10, - "indexed_document_count" => 20, - "indexed_document_volume" => 1000, - "total_document_count" => 2000, - "last_seen" => "2023-01-02T10:00:00Z", - ], - ]); - - language: curl - code: - "curl -X PUT -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d - '{\"deleted_document_count\":10,\"indexed_document_count\":20,\"indexed_document_volume\":1000,\"total_document_count\":2000,\ - \"last_seen\":\"2023-01-02T10:00:00Z\"}' \"$ELASTICSEARCH_URL/_connector/_sync_job/my-connector-sync-job/_stats\"" - - language: Java - code: | - client.connector().syncJobUpdateStats(s -> s - .connectorSyncJobId("my-connector-sync-job") - .deletedDocumentCount(10L) - .indexedDocumentCount(20L) - .indexedDocumentVolume(1000L) - .lastSeen(l -> l - .time("2023-01-02T10:00:00Z") - ) - .totalDocumentCount(2000) - ); diff --git a/specification/connector/update_api_key_id/examples/request/ConnectorUpdateApiKeyIDRequestExample1.yaml b/specification/connector/update_api_key_id/examples/request/ConnectorUpdateApiKeyIDRequestExample1.yaml index cf7e344ccd..1c2e32039e 100644 --- a/specification/connector/update_api_key_id/examples/request/ConnectorUpdateApiKeyIDRequestExample1.yaml +++ b/specification/connector/update_api_key_id/examples/request/ConnectorUpdateApiKeyIDRequestExample1.yaml @@ -9,48 +9,3 @@ value: "{ \ \"api_key_secret_id\": \"my-connector-secret-id\" }" -alternatives: - - language: Python - code: |- - resp = client.connector.update_api_key_id( - connector_id="my-connector", - api_key_id="my-api-key-id", - api_key_secret_id="my-connector-secret-id", - ) - - language: JavaScript - code: |- - const response = await client.connector.updateApiKeyId({ - connector_id: "my-connector", - api_key_id: "my-api-key-id", - api_key_secret_id: "my-connector-secret-id", - }); - - language: Ruby - code: |- - response = client.connector.update_api_key_id( - connector_id: "my-connector", - body: { - "api_key_id": "my-api-key-id", - "api_key_secret_id": "my-connector-secret-id" - } - ) - - language: PHP - code: |- - $resp = $client->connector()->updateApiKeyId([ - "connector_id" => "my-connector", - "body" => [ - "api_key_id" => "my-api-key-id", - "api_key_secret_id" => "my-connector-secret-id", - ], - ]); - - language: curl - code: - 'curl -X PUT -H "Authorization: ApiKey $ELASTIC_API_KEY" -H "Content-Type: application/json" -d - ''{"api_key_id":"my-api-key-id","api_key_secret_id":"my-connector-secret-id"}'' - "$ELASTICSEARCH_URL/_connector/my-connector/_api_key_id"' - - language: Java - code: | - client.connector().updateApiKeyId(u -> u - .apiKeyId("my-api-key-id") - .apiKeySecretId("my-connector-secret-id") - .connectorId("my-connector") - ); diff --git a/specification/connector/update_configuration/examples/request/ConnectorUpdateConfigurationRequestExample1.yaml b/specification/connector/update_configuration/examples/request/ConnectorUpdateConfigurationRequestExample1.yaml index e1007a7bc3..42bbdd5f8e 100644 --- a/specification/connector/update_configuration/examples/request/ConnectorUpdateConfigurationRequestExample1.yaml +++ b/specification/connector/update_configuration/examples/request/ConnectorUpdateConfigurationRequestExample1.yaml @@ -19,67 +19,3 @@ value: "{ \ } }" -alternatives: - - language: Python - code: |- - resp = client.connector.update_configuration( - connector_id="my-spo-connector", - values={ - "tenant_id": "my-tenant-id", - "tenant_name": "my-sharepoint-site", - "client_id": "foo", - "secret_value": "bar", - "site_collections": "*" - }, - ) - - language: JavaScript - code: |- - const response = await client.connector.updateConfiguration({ - connector_id: "my-spo-connector", - values: { - tenant_id: "my-tenant-id", - tenant_name: "my-sharepoint-site", - client_id: "foo", - secret_value: "bar", - site_collections: "*", - }, - }); - - language: Ruby - code: |- - response = client.connector.update_configuration( - connector_id: "my-spo-connector", - body: { - "values": { - "tenant_id": "my-tenant-id", - "tenant_name": "my-sharepoint-site", - "client_id": "foo", - "secret_value": "bar", - "site_collections": "*" - } - } - ) - - language: PHP - code: |- - $resp = $client->connector()->updateConfiguration([ - "connector_id" => "my-spo-connector", - "body" => [ - "values" => [ - "tenant_id" => "my-tenant-id", - "tenant_name" => "my-sharepoint-site", - "client_id" => "foo", - "secret_value" => "bar", - "site_collections" => "*", - ], - ], - ]); - - language: curl - code: - "curl -X PUT -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d - '{\"values\":{\"tenant_id\":\"my-tenant-id\",\"tenant_name\":\"my-sharepoint-site\",\"client_id\":\"foo\",\"secret_value\":\"\ - bar\",\"site_collections\":\"*\"}}' \"$ELASTICSEARCH_URL/_connector/my-spo-connector/_configuration\"" - - language: Java - code: > - client.connector().updateConfiguration(u -> u - .connectorId("my-spo-connector") - .values(Map.of("tenant_id", JsonData.fromJson("\"my-tenant-id\""),"tenant_name", JsonData.fromJson("\"my-sharepoint-site\""),"secret_value", JsonData.fromJson("\"bar\""),"client_id", JsonData.fromJson("\"foo\""),"site_collections", JsonData.fromJson("\"*\""))) - ); diff --git a/specification/connector/update_configuration/examples/request/ConnectorUpdateConfigurationRequestExample2.yaml b/specification/connector/update_configuration/examples/request/ConnectorUpdateConfigurationRequestExample2.yaml index 9adf886424..f1aa1cc874 100644 --- a/specification/connector/update_configuration/examples/request/ConnectorUpdateConfigurationRequestExample2.yaml +++ b/specification/connector/update_configuration/examples/request/ConnectorUpdateConfigurationRequestExample2.yaml @@ -11,50 +11,3 @@ value: "{ \ } }" -alternatives: - - language: Python - code: |- - resp = client.connector.update_configuration( - connector_id="my-spo-connector", - values={ - "secret_value": "foo-bar" - }, - ) - - language: JavaScript - code: |- - const response = await client.connector.updateConfiguration({ - connector_id: "my-spo-connector", - values: { - secret_value: "foo-bar", - }, - }); - - language: Ruby - code: |- - response = client.connector.update_configuration( - connector_id: "my-spo-connector", - body: { - "values": { - "secret_value": "foo-bar" - } - } - ) - - language: PHP - code: |- - $resp = $client->connector()->updateConfiguration([ - "connector_id" => "my-spo-connector", - "body" => [ - "values" => [ - "secret_value" => "foo-bar", - ], - ], - ]); - - language: curl - code: - 'curl -X PUT -H "Authorization: ApiKey $ELASTIC_API_KEY" -H "Content-Type: application/json" -d - ''{"values":{"secret_value":"foo-bar"}}'' "$ELASTICSEARCH_URL/_connector/my-spo-connector/_configuration"' - - language: Java - code: | - client.connector().updateConfiguration(u -> u - .connectorId("my-spo-connector") - .values("secret_value", JsonData.fromJson("\"foo-bar\"")) - ); diff --git a/specification/connector/update_error/examples/request/ConnectorUpdateErrorRequestExample1.yaml b/specification/connector/update_error/examples/request/ConnectorUpdateErrorRequestExample1.yaml index 19e5e83857..ae0718fea7 100644 --- a/specification/connector/update_error/examples/request/ConnectorUpdateErrorRequestExample1.yaml +++ b/specification/connector/update_error/examples/request/ConnectorUpdateErrorRequestExample1.yaml @@ -7,42 +7,3 @@ value: "{ \ \"error\": \"Houston, we have a problem!\" }" -alternatives: - - language: Python - code: |- - resp = client.connector.update_error( - connector_id="my-connector", - error="Houston, we have a problem!", - ) - - language: JavaScript - code: |- - const response = await client.connector.updateError({ - connector_id: "my-connector", - error: "Houston, we have a problem!", - }); - - language: Ruby - code: |- - response = client.connector.update_error( - connector_id: "my-connector", - body: { - "error": "Houston, we have a problem!" - } - ) - - language: PHP - code: |- - $resp = $client->connector()->updateError([ - "connector_id" => "my-connector", - "body" => [ - "error" => "Houston, we have a problem!", - ], - ]); - - language: curl - code: - 'curl -X PUT -H "Authorization: ApiKey $ELASTIC_API_KEY" -H "Content-Type: application/json" -d ''{"error":"Houston, we - have a problem!"}'' "$ELASTICSEARCH_URL/_connector/my-connector/_error"' - - language: Java - code: | - client.connector().updateError(u -> u - .connectorId("my-connector") - .error("Houston, we have a problem!") - ); diff --git a/specification/connector/update_features/examples/request/ConnectorUpdateFeaturesRequestExample1.yaml b/specification/connector/update_features/examples/request/ConnectorUpdateFeaturesRequestExample1.yaml index fafb30cb3c..d113aaef53 100644 --- a/specification/connector/update_features/examples/request/ConnectorUpdateFeaturesRequestExample1.yaml +++ b/specification/connector/update_features/examples/request/ConnectorUpdateFeaturesRequestExample1.yaml @@ -37,118 +37,3 @@ value: "{ \ } }" -alternatives: - - language: Python - code: |- - resp = client.connector.update_features( - connector_id="my-connector", - features={ - "document_level_security": { - "enabled": True - }, - "incremental_sync": { - "enabled": True - }, - "sync_rules": { - "advanced": { - "enabled": False - }, - "basic": { - "enabled": True - } - } - }, - ) - - language: JavaScript - code: |- - const response = await client.connector.updateFeatures({ - connector_id: "my-connector", - features: { - document_level_security: { - enabled: true, - }, - incremental_sync: { - enabled: true, - }, - sync_rules: { - advanced: { - enabled: false, - }, - basic: { - enabled: true, - }, - }, - }, - }); - - language: Ruby - code: |- - response = client.connector.update_features( - connector_id: "my-connector", - body: { - "features": { - "document_level_security": { - "enabled": true - }, - "incremental_sync": { - "enabled": true - }, - "sync_rules": { - "advanced": { - "enabled": false - }, - "basic": { - "enabled": true - } - } - } - } - ) - - language: PHP - code: |- - $resp = $client->connector()->updateFeatures([ - "connector_id" => "my-connector", - "body" => [ - "features" => [ - "document_level_security" => [ - "enabled" => true, - ], - "incremental_sync" => [ - "enabled" => true, - ], - "sync_rules" => [ - "advanced" => [ - "enabled" => false, - ], - "basic" => [ - "enabled" => true, - ], - ], - ], - ], - ]); - - language: curl - code: - "curl -X PUT -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d - '{\"features\":{\"document_level_security\":{\"enabled\":true},\"incremental_sync\":{\"enabled\":true},\"sync_rules\":{\"adva\ - nced\":{\"enabled\":false},\"basic\":{\"enabled\":true}}}}' \"$ELASTICSEARCH_URL/_connector/my-connector/_features\"" - - language: Java - code: | - client.connector().updateFeatures(u -> u - .connectorId("my-connector") - .features(f -> f - .documentLevelSecurity(d -> d - .enabled(true) - ) - .incrementalSync(i -> i - .enabled(true) - ) - .syncRules(s -> s - .advanced(a -> a - .enabled(false) - ) - .basic(b -> b - .enabled(true) - ) - ) - ) - ); diff --git a/specification/connector/update_features/examples/request/ConnectorUpdateFeaturesRequestExample2.yaml b/specification/connector/update_features/examples/request/ConnectorUpdateFeaturesRequestExample2.yaml index 66f2e9c3a7..117720576b 100644 --- a/specification/connector/update_features/examples/request/ConnectorUpdateFeaturesRequestExample2.yaml +++ b/specification/connector/update_features/examples/request/ConnectorUpdateFeaturesRequestExample2.yaml @@ -15,62 +15,3 @@ value: "{ \ } }" -alternatives: - - language: Python - code: |- - resp = client.connector.update_features( - connector_id="my-connector", - features={ - "document_level_security": { - "enabled": True - } - }, - ) - - language: JavaScript - code: |- - const response = await client.connector.updateFeatures({ - connector_id: "my-connector", - features: { - document_level_security: { - enabled: true, - }, - }, - }); - - language: Ruby - code: |- - response = client.connector.update_features( - connector_id: "my-connector", - body: { - "features": { - "document_level_security": { - "enabled": true - } - } - } - ) - - language: PHP - code: |- - $resp = $client->connector()->updateFeatures([ - "connector_id" => "my-connector", - "body" => [ - "features" => [ - "document_level_security" => [ - "enabled" => true, - ], - ], - ], - ]); - - language: curl - code: - 'curl -X PUT -H "Authorization: ApiKey $ELASTIC_API_KEY" -H "Content-Type: application/json" -d - ''{"features":{"document_level_security":{"enabled":true}}}'' "$ELASTICSEARCH_URL/_connector/my-connector/_features"' - - language: Java - code: | - client.connector().updateFeatures(u -> u - .connectorId("my-connector") - .features(f -> f - .documentLevelSecurity(d -> d - .enabled(true) - ) - ) - ); diff --git a/specification/connector/update_filtering/examples/request/ConnectorUpdateFilteringRequestExample1.yaml b/specification/connector/update_filtering/examples/request/ConnectorUpdateFilteringRequestExample1.yaml index 1bb11f2ef6..862ee33f84 100644 --- a/specification/connector/update_filtering/examples/request/ConnectorUpdateFilteringRequestExample1.yaml +++ b/specification/connector/update_filtering/examples/request/ConnectorUpdateFilteringRequestExample1.yaml @@ -41,124 +41,3 @@ value: "{ \ ] }" -alternatives: - - language: Python - code: |- - resp = client.connector.update_filtering( - connector_id="my-g-drive-connector", - rules=[ - { - "field": "file_extension", - "id": "exclude-txt-files", - "order": 0, - "policy": "exclude", - "rule": "equals", - "value": "txt" - }, - { - "field": "_", - "id": "DEFAULT", - "order": 1, - "policy": "include", - "rule": "regex", - "value": ".*" - } - ], - ) - - language: JavaScript - code: |- - const response = await client.connector.updateFiltering({ - connector_id: "my-g-drive-connector", - rules: [ - { - field: "file_extension", - id: "exclude-txt-files", - order: 0, - policy: "exclude", - rule: "equals", - value: "txt", - }, - { - field: "_", - id: "DEFAULT", - order: 1, - policy: "include", - rule: "regex", - value: ".*", - }, - ], - }); - - language: Ruby - code: |- - response = client.connector.update_filtering( - connector_id: "my-g-drive-connector", - body: { - "rules": [ - { - "field": "file_extension", - "id": "exclude-txt-files", - "order": 0, - "policy": "exclude", - "rule": "equals", - "value": "txt" - }, - { - "field": "_", - "id": "DEFAULT", - "order": 1, - "policy": "include", - "rule": "regex", - "value": ".*" - } - ] - } - ) - - language: PHP - code: |- - $resp = $client->connector()->updateFiltering([ - "connector_id" => "my-g-drive-connector", - "body" => [ - "rules" => array( - [ - "field" => "file_extension", - "id" => "exclude-txt-files", - "order" => 0, - "policy" => "exclude", - "rule" => "equals", - "value" => "txt", - ], - [ - "field" => "_", - "id" => "DEFAULT", - "order" => 1, - "policy" => "include", - "rule" => "regex", - "value" => ".*", - ], - ), - ], - ]); - - language: curl - code: - "curl -X PUT -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d - '{\"rules\":[{\"field\":\"file_extension\",\"id\":\"exclude-txt-files\",\"order\":0,\"policy\":\"exclude\",\"rule\":\"equals\ - \",\"value\":\"txt\"},{\"field\":\"_\",\"id\":\"DEFAULT\",\"order\":1,\"policy\":\"include\",\"rule\":\"regex\",\"value\":\".*\ - \"}]}' \"$ELASTICSEARCH_URL/_connector/my-g-drive-connector/_filtering\"" - - language: Java - code: | - client.connector().updateFiltering(u -> u - .connectorId("my-g-drive-connector") - .rules(List.of(FilteringRule.of(f -> f - .field("file_extension") - .id("exclude-txt-files") - .order(0) - .policy(FilteringPolicy.Exclude) - .rule(FilteringRuleRule.Equals) - .value("txt")),FilteringRule.of(f -> f - .field("_") - .id("DEFAULT") - .order(1) - .policy(FilteringPolicy.Include) - .rule(FilteringRuleRule.Regex) - .value(".*")))) - ); diff --git a/specification/connector/update_filtering/examples/request/ConnectorUpdateFilteringRequestExample2.yaml b/specification/connector/update_filtering/examples/request/ConnectorUpdateFilteringRequestExample2.yaml index b2bd1f3e60..1fe3089778 100644 --- a/specification/connector/update_filtering/examples/request/ConnectorUpdateFilteringRequestExample2.yaml +++ b/specification/connector/update_filtering/examples/request/ConnectorUpdateFilteringRequestExample2.yaml @@ -23,84 +23,3 @@ value: "{ \ } }" -alternatives: - - language: Python - code: >- - resp = client.connector.update_filtering( - connector_id="my-sql-connector", - advanced_snippet={ - "value": [ - { - "tables": [ - "users", - "orders" - ], - "query": "SELECT users.id AS id, orders.order_id AS order_id FROM users JOIN orders ON users.id = orders.user_id" - } - ] - }, - ) - - language: JavaScript - code: |- - const response = await client.connector.updateFiltering({ - connector_id: "my-sql-connector", - advanced_snippet: { - value: [ - { - tables: ["users", "orders"], - query: - "SELECT users.id AS id, orders.order_id AS order_id FROM users JOIN orders ON users.id = orders.user_id", - }, - ], - }, - }); - - language: Ruby - code: |- - response = client.connector.update_filtering( - connector_id: "my-sql-connector", - body: { - "advanced_snippet": { - "value": [ - { - "tables": [ - "users", - "orders" - ], - "query": "SELECT users.id AS id, orders.order_id AS order_id FROM users JOIN orders ON users.id = orders.user_id" - } - ] - } - } - ) - - language: PHP - code: >- - $resp = $client->connector()->updateFiltering([ - "connector_id" => "my-sql-connector", - "body" => [ - "advanced_snippet" => [ - "value" => array( - [ - "tables" => array( - "users", - "orders", - ), - "query" => "SELECT users.id AS id, orders.order_id AS order_id FROM users JOIN orders ON users.id = orders.user_id", - ], - ), - ], - ], - ]); - - language: curl - code: - 'curl -X PUT -H "Authorization: ApiKey $ELASTIC_API_KEY" -H "Content-Type: application/json" -d - ''{"advanced_snippet":{"value":[{"tables":["users","orders"],"query":"SELECT users.id AS id, orders.order_id AS - order_id FROM users JOIN orders ON users.id = orders.user_id"}]}}'' - "$ELASTICSEARCH_URL/_connector/my-sql-connector/_filtering"' - - language: Java - code: > - client.connector().updateFiltering(u -> u - .advancedSnippet(a -> a - .value(JsonData.fromJson("[{\"tables\":[\"users\",\"orders\"],\"query\":\"SELECT users.id AS id, orders.order_id AS order_id FROM users JOIN orders ON users.id = orders.user_id\"}]")) - ) - .connectorId("my-sql-connector") - ); diff --git a/specification/connector/update_index_name/examples/request/ConnectorUpdateIndexNameRequestExample1.yaml b/specification/connector/update_index_name/examples/request/ConnectorUpdateIndexNameRequestExample1.yaml index fc72b4dbc4..797ea0b786 100644 --- a/specification/connector/update_index_name/examples/request/ConnectorUpdateIndexNameRequestExample1.yaml +++ b/specification/connector/update_index_name/examples/request/ConnectorUpdateIndexNameRequestExample1.yaml @@ -7,42 +7,3 @@ value: "{ \ \"index_name\": \"data-from-my-google-drive\" }" -alternatives: - - language: Python - code: |- - resp = client.connector.update_index_name( - connector_id="my-connector", - index_name="data-from-my-google-drive", - ) - - language: JavaScript - code: |- - const response = await client.connector.updateIndexName({ - connector_id: "my-connector", - index_name: "data-from-my-google-drive", - }); - - language: Ruby - code: |- - response = client.connector.update_index_name( - connector_id: "my-connector", - body: { - "index_name": "data-from-my-google-drive" - } - ) - - language: PHP - code: |- - $resp = $client->connector()->updateIndexName([ - "connector_id" => "my-connector", - "body" => [ - "index_name" => "data-from-my-google-drive", - ], - ]); - - language: curl - code: - 'curl -X PUT -H "Authorization: ApiKey $ELASTIC_API_KEY" -H "Content-Type: application/json" -d - ''{"index_name":"data-from-my-google-drive"}'' "$ELASTICSEARCH_URL/_connector/my-connector/_index_name"' - - language: Java - code: | - client.connector().updateIndexName(u -> u - .connectorId("my-connector") - .indexName("data-from-my-google-drive") - ); diff --git a/specification/connector/update_name/examples/request/ConnectorUpdateNameRequestExample1.yaml b/specification/connector/update_name/examples/request/ConnectorUpdateNameRequestExample1.yaml index eeca2c6fe7..d3656fc5f8 100644 --- a/specification/connector/update_name/examples/request/ConnectorUpdateNameRequestExample1.yaml +++ b/specification/connector/update_name/examples/request/ConnectorUpdateNameRequestExample1.yaml @@ -9,47 +9,3 @@ value: "{ \ \"description\": \"This is my customized connector\" }" -alternatives: - - language: Python - code: |- - resp = client.connector.update_name( - connector_id="my-connector", - name="Custom connector", - description="This is my customized connector", - ) - - language: JavaScript - code: |- - const response = await client.connector.updateName({ - connector_id: "my-connector", - name: "Custom connector", - description: "This is my customized connector", - }); - - language: Ruby - code: |- - response = client.connector.update_name( - connector_id: "my-connector", - body: { - "name": "Custom connector", - "description": "This is my customized connector" - } - ) - - language: PHP - code: |- - $resp = $client->connector()->updateName([ - "connector_id" => "my-connector", - "body" => [ - "name" => "Custom connector", - "description" => "This is my customized connector", - ], - ]); - - language: curl - code: - 'curl -X PUT -H "Authorization: ApiKey $ELASTIC_API_KEY" -H "Content-Type: application/json" -d ''{"name":"Custom - connector","description":"This is my customized connector"}'' "$ELASTICSEARCH_URL/_connector/my-connector/_name"' - - language: Java - code: | - client.connector().updateName(u -> u - .connectorId("my-connector") - .description("This is my customized connector") - .name("Custom connector") - ); diff --git a/specification/connector/update_pipeline/examples/request/ConnectorUpdatePipelineRequestExample1.yaml b/specification/connector/update_pipeline/examples/request/ConnectorUpdatePipelineRequestExample1.yaml index 75c4242316..550d2e016d 100644 --- a/specification/connector/update_pipeline/examples/request/ConnectorUpdatePipelineRequestExample1.yaml +++ b/specification/connector/update_pipeline/examples/request/ConnectorUpdatePipelineRequestExample1.yaml @@ -17,68 +17,3 @@ value: "{ \ } }" -alternatives: - - language: Python - code: |- - resp = client.connector.update_pipeline( - connector_id="my-connector", - pipeline={ - "extract_binary_content": True, - "name": "my-connector-pipeline", - "reduce_whitespace": True, - "run_ml_inference": True - }, - ) - - language: JavaScript - code: |- - const response = await client.connector.updatePipeline({ - connector_id: "my-connector", - pipeline: { - extract_binary_content: true, - name: "my-connector-pipeline", - reduce_whitespace: true, - run_ml_inference: true, - }, - }); - - language: Ruby - code: |- - response = client.connector.update_pipeline( - connector_id: "my-connector", - body: { - "pipeline": { - "extract_binary_content": true, - "name": "my-connector-pipeline", - "reduce_whitespace": true, - "run_ml_inference": true - } - } - ) - - language: PHP - code: |- - $resp = $client->connector()->updatePipeline([ - "connector_id" => "my-connector", - "body" => [ - "pipeline" => [ - "extract_binary_content" => true, - "name" => "my-connector-pipeline", - "reduce_whitespace" => true, - "run_ml_inference" => true, - ], - ], - ]); - - language: curl - code: - "curl -X PUT -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d - '{\"pipeline\":{\"extract_binary_content\":true,\"name\":\"my-connector-pipeline\",\"reduce_whitespace\":true,\"run_ml_infere\ - nce\":true}}' \"$ELASTICSEARCH_URL/_connector/my-connector/_pipeline\"" - - language: Java - code: | - client.connector().updatePipeline(u -> u - .connectorId("my-connector") - .pipeline(p -> p - .extractBinaryContent(true) - .name("my-connector-pipeline") - .reduceWhitespace(true) - .runMlInference(true) - ) - ); diff --git a/specification/connector/update_scheduling/examples/request/ConnectorUpdateSchedulingRequestExample1.yaml b/specification/connector/update_scheduling/examples/request/ConnectorUpdateSchedulingRequestExample1.yaml index 952fc05f55..42be05152e 100644 --- a/specification/connector/update_scheduling/examples/request/ConnectorUpdateSchedulingRequestExample1.yaml +++ b/specification/connector/update_scheduling/examples/request/ConnectorUpdateSchedulingRequestExample1.yaml @@ -33,109 +33,3 @@ value: "{ \ } }" -alternatives: - - language: Python - code: |- - resp = client.connector.update_scheduling( - connector_id="my-connector", - scheduling={ - "access_control": { - "enabled": True, - "interval": "0 10 0 * * ?" - }, - "full": { - "enabled": True, - "interval": "0 20 0 * * ?" - }, - "incremental": { - "enabled": False, - "interval": "0 30 0 * * ?" - } - }, - ) - - language: JavaScript - code: |- - const response = await client.connector.updateScheduling({ - connector_id: "my-connector", - scheduling: { - access_control: { - enabled: true, - interval: "0 10 0 * * ?", - }, - full: { - enabled: true, - interval: "0 20 0 * * ?", - }, - incremental: { - enabled: false, - interval: "0 30 0 * * ?", - }, - }, - }); - - language: Ruby - code: |- - response = client.connector.update_scheduling( - connector_id: "my-connector", - body: { - "scheduling": { - "access_control": { - "enabled": true, - "interval": "0 10 0 * * ?" - }, - "full": { - "enabled": true, - "interval": "0 20 0 * * ?" - }, - "incremental": { - "enabled": false, - "interval": "0 30 0 * * ?" - } - } - } - ) - - language: PHP - code: |- - $resp = $client->connector()->updateScheduling([ - "connector_id" => "my-connector", - "body" => [ - "scheduling" => [ - "access_control" => [ - "enabled" => true, - "interval" => "0 10 0 * * ?", - ], - "full" => [ - "enabled" => true, - "interval" => "0 20 0 * * ?", - ], - "incremental" => [ - "enabled" => false, - "interval" => "0 30 0 * * ?", - ], - ], - ], - ]); - - language: curl - code: - 'curl -X PUT -H "Authorization: ApiKey $ELASTIC_API_KEY" -H "Content-Type: application/json" -d - ''{"scheduling":{"access_control":{"enabled":true,"interval":"0 10 0 * * - ?"},"full":{"enabled":true,"interval":"0 20 0 * * ?"},"incremental":{"enabled":false,"interval":"0 30 0 * * - ?"}}}'' "$ELASTICSEARCH_URL/_connector/my-connector/_scheduling"' - - language: Java - code: | - client.connector().updateScheduling(u -> u - .connectorId("my-connector") - .scheduling(s -> s - .accessControl(a -> a - .enabled(true) - .interval("0 10 0 * * ?") - ) - .full(f -> f - .enabled(true) - .interval("0 20 0 * * ?") - ) - .incremental(i -> i - .enabled(false) - .interval("0 30 0 * * ?") - ) - ) - ); diff --git a/specification/connector/update_scheduling/examples/request/ConnectorUpdateSchedulingRequestExample2.yaml b/specification/connector/update_scheduling/examples/request/ConnectorUpdateSchedulingRequestExample2.yaml index 5a50723d02..26967d5089 100644 --- a/specification/connector/update_scheduling/examples/request/ConnectorUpdateSchedulingRequestExample2.yaml +++ b/specification/connector/update_scheduling/examples/request/ConnectorUpdateSchedulingRequestExample2.yaml @@ -17,68 +17,3 @@ value: "{ \ } }" -alternatives: - - language: Python - code: |- - resp = client.connector.update_scheduling( - connector_id="my-connector", - scheduling={ - "full": { - "enabled": True, - "interval": "0 10 0 * * ?" - } - }, - ) - - language: JavaScript - code: |- - const response = await client.connector.updateScheduling({ - connector_id: "my-connector", - scheduling: { - full: { - enabled: true, - interval: "0 10 0 * * ?", - }, - }, - }); - - language: Ruby - code: |- - response = client.connector.update_scheduling( - connector_id: "my-connector", - body: { - "scheduling": { - "full": { - "enabled": true, - "interval": "0 10 0 * * ?" - } - } - } - ) - - language: PHP - code: |- - $resp = $client->connector()->updateScheduling([ - "connector_id" => "my-connector", - "body" => [ - "scheduling" => [ - "full" => [ - "enabled" => true, - "interval" => "0 10 0 * * ?", - ], - ], - ], - ]); - - language: curl - code: - 'curl -X PUT -H "Authorization: ApiKey $ELASTIC_API_KEY" -H "Content-Type: application/json" -d - ''{"scheduling":{"full":{"enabled":true,"interval":"0 10 0 * * ?"}}}'' - "$ELASTICSEARCH_URL/_connector/my-connector/_scheduling"' - - language: Java - code: | - client.connector().updateScheduling(u -> u - .connectorId("my-connector") - .scheduling(s -> s - .full(f -> f - .enabled(true) - .interval("0 10 0 * * ?") - ) - ) - ); diff --git a/specification/connector/update_service_type/examples/request/ConnectorUpdateServiceTypeRequestExample1.yaml b/specification/connector/update_service_type/examples/request/ConnectorUpdateServiceTypeRequestExample1.yaml index d741fb57a2..9a5e065f56 100644 --- a/specification/connector/update_service_type/examples/request/ConnectorUpdateServiceTypeRequestExample1.yaml +++ b/specification/connector/update_service_type/examples/request/ConnectorUpdateServiceTypeRequestExample1.yaml @@ -7,42 +7,3 @@ value: "{ \ \"service_type\": \"sharepoint_online\" }" -alternatives: - - language: Python - code: |- - resp = client.connector.update_service_type( - connector_id="my-connector", - service_type="sharepoint_online", - ) - - language: JavaScript - code: |- - const response = await client.connector.updateServiceType({ - connector_id: "my-connector", - service_type: "sharepoint_online", - }); - - language: Ruby - code: |- - response = client.connector.update_service_type( - connector_id: "my-connector", - body: { - "service_type": "sharepoint_online" - } - ) - - language: PHP - code: |- - $resp = $client->connector()->updateServiceType([ - "connector_id" => "my-connector", - "body" => [ - "service_type" => "sharepoint_online", - ], - ]); - - language: curl - code: - 'curl -X PUT -H "Authorization: ApiKey $ELASTIC_API_KEY" -H "Content-Type: application/json" -d - ''{"service_type":"sharepoint_online"}'' "$ELASTICSEARCH_URL/_connector/my-connector/_service_type"' - - language: Java - code: | - client.connector().updateServiceType(u -> u - .connectorId("my-connector") - .serviceType("sharepoint_online") - ); diff --git a/specification/connector/update_status/examples/request/ConnectorUpdateStatusRequestExample1.yaml b/specification/connector/update_status/examples/request/ConnectorUpdateStatusRequestExample1.yaml index cffd08e00e..8f119c15f5 100644 --- a/specification/connector/update_status/examples/request/ConnectorUpdateStatusRequestExample1.yaml +++ b/specification/connector/update_status/examples/request/ConnectorUpdateStatusRequestExample1.yaml @@ -7,42 +7,3 @@ value: "{ \ \"status\": \"needs_configuration\" }" -alternatives: - - language: Python - code: |- - resp = client.connector.update_status( - connector_id="my-connector", - status="needs_configuration", - ) - - language: JavaScript - code: |- - const response = await client.connector.updateStatus({ - connector_id: "my-connector", - status: "needs_configuration", - }); - - language: Ruby - code: |- - response = client.connector.update_status( - connector_id: "my-connector", - body: { - "status": "needs_configuration" - } - ) - - language: PHP - code: |- - $resp = $client->connector()->updateStatus([ - "connector_id" => "my-connector", - "body" => [ - "status" => "needs_configuration", - ], - ]); - - language: curl - code: - 'curl -X PUT -H "Authorization: ApiKey $ELASTIC_API_KEY" -H "Content-Type: application/json" -d - ''{"status":"needs_configuration"}'' "$ELASTICSEARCH_URL/_connector/my-connector/_status"' - - language: Java - code: | - client.connector().updateStatus(u -> u - .connectorId("my-connector") - .status(ConnectorStatus.NeedsConfiguration) - ); diff --git a/specification/dangling_indices/delete_dangling_index/examples/request/DanglingIndicesDeleteDanglingIndexExample1.yaml b/specification/dangling_indices/delete_dangling_index/examples/request/DanglingIndicesDeleteDanglingIndexExample1.yaml index 7eed98bdd5..5458a595a5 100644 --- a/specification/dangling_indices/delete_dangling_index/examples/request/DanglingIndicesDeleteDanglingIndexExample1.yaml +++ b/specification/dangling_indices/delete_dangling_index/examples/request/DanglingIndicesDeleteDanglingIndexExample1.yaml @@ -1,34 +1 @@ method_request: DELETE /_dangling/?accept_data_loss=true -alternatives: - - language: Python - code: |- - resp = client.dangling_indices.delete_dangling_index( - index_uuid="", - accept_data_loss=True, - ) - - language: JavaScript - code: |- - const response = await client.danglingIndices.deleteDanglingIndex({ - index_uuid: "", - accept_data_loss: "true", - }); - - language: Ruby - code: |- - response = client.dangling_indices.delete_dangling_index( - index_uuid: "", - accept_data_loss: "true" - ) - - language: PHP - code: |- - $resp = $client->danglingIndices()->deleteDanglingIndex([ - "index_uuid" => "", - "accept_data_loss" => "true", - ]); - - language: curl - code: 'curl -X DELETE -H "Authorization: ApiKey $ELASTIC_API_KEY" "$ELASTICSEARCH_URL/_dangling/?accept_data_loss=true"' - - language: Java - code: | - client.danglingIndices().deleteDanglingIndex(d -> d - .acceptDataLoss(true) - .indexUuid("") - ); diff --git a/specification/dangling_indices/import_dangling_index/examples/request/ImportDanglingIndexRequestExample1.yaml b/specification/dangling_indices/import_dangling_index/examples/request/ImportDanglingIndexRequestExample1.yaml index 73a0e80570..51333864c2 100644 --- a/specification/dangling_indices/import_dangling_index/examples/request/ImportDanglingIndexRequestExample1.yaml +++ b/specification/dangling_indices/import_dangling_index/examples/request/ImportDanglingIndexRequestExample1.yaml @@ -1,35 +1 @@ method_request: POST /_dangling/zmM4e0JtBkeUjiHD-MihPQ?accept_data_loss=true -alternatives: - - language: Python - code: |- - resp = client.dangling_indices.import_dangling_index( - index_uuid="zmM4e0JtBkeUjiHD-MihPQ", - accept_data_loss=True, - ) - - language: JavaScript - code: |- - const response = await client.danglingIndices.importDanglingIndex({ - index_uuid: "zmM4e0JtBkeUjiHD-MihPQ", - accept_data_loss: "true", - }); - - language: Ruby - code: |- - response = client.dangling_indices.import_dangling_index( - index_uuid: "zmM4e0JtBkeUjiHD-MihPQ", - accept_data_loss: "true" - ) - - language: PHP - code: |- - $resp = $client->danglingIndices()->importDanglingIndex([ - "index_uuid" => "zmM4e0JtBkeUjiHD-MihPQ", - "accept_data_loss" => "true", - ]); - - language: curl - code: 'curl -X POST -H "Authorization: ApiKey $ELASTIC_API_KEY" - "$ELASTICSEARCH_URL/_dangling/zmM4e0JtBkeUjiHD-MihPQ?accept_data_loss=true"' - - language: Java - code: | - client.danglingIndices().importDanglingIndex(i -> i - .acceptDataLoss(true) - .indexUuid("zmM4e0JtBkeUjiHD-MihPQ") - ); diff --git a/specification/dangling_indices/list_dangling_indices/examples/request/DanglingIndicesListDanglingIndicesExample1.yaml b/specification/dangling_indices/list_dangling_indices/examples/request/DanglingIndicesListDanglingIndicesExample1.yaml index 58e266cc48..ec6b553ed9 100644 --- a/specification/dangling_indices/list_dangling_indices/examples/request/DanglingIndicesListDanglingIndicesExample1.yaml +++ b/specification/dangling_indices/list_dangling_indices/examples/request/DanglingIndicesListDanglingIndicesExample1.yaml @@ -1,15 +1 @@ method_request: GET /_dangling -alternatives: - - language: Python - code: resp = client.dangling_indices.list_dangling_indices() - - language: JavaScript - code: const response = await client.danglingIndices.listDanglingIndices(); - - language: Ruby - code: response = client.dangling_indices.list_dangling_indices - - language: PHP - code: $resp = $client->danglingIndices()->listDanglingIndices(); - - language: curl - code: 'curl -X GET -H "Authorization: ApiKey $ELASTIC_API_KEY" "$ELASTICSEARCH_URL/_dangling"' - - language: Java - code: | - client.danglingIndices().listDanglingIndices(); diff --git a/specification/enrich/delete_policy/examples/request/EnrichDeletePolicyExample1.yaml b/specification/enrich/delete_policy/examples/request/EnrichDeletePolicyExample1.yaml index 9e4c2bd34d..f34d633b31 100644 --- a/specification/enrich/delete_policy/examples/request/EnrichDeletePolicyExample1.yaml +++ b/specification/enrich/delete_policy/examples/request/EnrichDeletePolicyExample1.yaml @@ -1,29 +1 @@ method_request: DELETE /_enrich/policy/my-policy -alternatives: - - language: Python - code: |- - resp = client.enrich.delete_policy( - name="my-policy", - ) - - language: JavaScript - code: |- - const response = await client.enrich.deletePolicy({ - name: "my-policy", - }); - - language: Ruby - code: |- - response = client.enrich.delete_policy( - name: "my-policy" - ) - - language: PHP - code: |- - $resp = $client->enrich()->deletePolicy([ - "name" => "my-policy", - ]); - - language: curl - code: 'curl -X DELETE -H "Authorization: ApiKey $ELASTIC_API_KEY" "$ELASTICSEARCH_URL/_enrich/policy/my-policy"' - - language: Java - code: | - client.enrich().deletePolicy(d -> d - .name("my-policy") - ); diff --git a/specification/enrich/execute_policy/examples/request/EnrichExecutePolicyExample1.yaml b/specification/enrich/execute_policy/examples/request/EnrichExecutePolicyExample1.yaml index f40627c600..f811b235f4 100644 --- a/specification/enrich/execute_policy/examples/request/EnrichExecutePolicyExample1.yaml +++ b/specification/enrich/execute_policy/examples/request/EnrichExecutePolicyExample1.yaml @@ -1,35 +1 @@ method_request: PUT /_enrich/policy/my-policy/_execute?wait_for_completion=false -alternatives: - - language: Python - code: |- - resp = client.enrich.execute_policy( - name="my-policy", - wait_for_completion=False, - ) - - language: JavaScript - code: |- - const response = await client.enrich.executePolicy({ - name: "my-policy", - wait_for_completion: "false", - }); - - language: Ruby - code: |- - response = client.enrich.execute_policy( - name: "my-policy", - wait_for_completion: "false" - ) - - language: PHP - code: |- - $resp = $client->enrich()->executePolicy([ - "name" => "my-policy", - "wait_for_completion" => "false", - ]); - - language: curl - code: 'curl -X PUT -H "Authorization: ApiKey $ELASTIC_API_KEY" - "$ELASTICSEARCH_URL/_enrich/policy/my-policy/_execute?wait_for_completion=false"' - - language: Java - code: | - client.enrich().executePolicy(e -> e - .name("my-policy") - .waitForCompletion(false) - ); diff --git a/specification/enrich/get_policy/examples/request/EnrichGetPolicyExample1.yaml b/specification/enrich/get_policy/examples/request/EnrichGetPolicyExample1.yaml index 6b65081130..7ecb3d3281 100644 --- a/specification/enrich/get_policy/examples/request/EnrichGetPolicyExample1.yaml +++ b/specification/enrich/get_policy/examples/request/EnrichGetPolicyExample1.yaml @@ -1,29 +1 @@ method_request: GET /_enrich/policy/my-policy -alternatives: - - language: Python - code: |- - resp = client.enrich.get_policy( - name="my-policy", - ) - - language: JavaScript - code: |- - const response = await client.enrich.getPolicy({ - name: "my-policy", - }); - - language: Ruby - code: |- - response = client.enrich.get_policy( - name: "my-policy" - ) - - language: PHP - code: |- - $resp = $client->enrich()->getPolicy([ - "name" => "my-policy", - ]); - - language: curl - code: 'curl -X GET -H "Authorization: ApiKey $ELASTIC_API_KEY" "$ELASTICSEARCH_URL/_enrich/policy/my-policy"' - - language: Java - code: | - client.enrich().getPolicy(g -> g - .name("my-policy") - ); diff --git a/specification/enrich/put_policy/examples/request/EnrichPutPolicyExample1.yaml b/specification/enrich/put_policy/examples/request/EnrichPutPolicyExample1.yaml index ff7e6174e3..fc117616b3 100644 --- a/specification/enrich/put_policy/examples/request/EnrichPutPolicyExample1.yaml +++ b/specification/enrich/put_policy/examples/request/EnrichPutPolicyExample1.yaml @@ -8,72 +8,3 @@ value: |- "enrich_fields": [ "location", "postal_code" ] } } -alternatives: - - language: Python - code: |- - resp = client.enrich.put_policy( - name="postal_policy", - geo_match={ - "indices": "postal_codes", - "match_field": "location", - "enrich_fields": [ - "location", - "postal_code" - ] - }, - ) - - language: JavaScript - code: |- - const response = await client.enrich.putPolicy({ - name: "postal_policy", - geo_match: { - indices: "postal_codes", - match_field: "location", - enrich_fields: ["location", "postal_code"], - }, - }); - - language: Ruby - code: |- - response = client.enrich.put_policy( - name: "postal_policy", - body: { - "geo_match": { - "indices": "postal_codes", - "match_field": "location", - "enrich_fields": [ - "location", - "postal_code" - ] - } - } - ) - - language: PHP - code: |- - $resp = $client->enrich()->putPolicy([ - "name" => "postal_policy", - "body" => [ - "geo_match" => [ - "indices" => "postal_codes", - "match_field" => "location", - "enrich_fields" => array( - "location", - "postal_code", - ), - ], - ], - ]); - - language: curl - code: - 'curl -X PUT -H "Authorization: ApiKey $ELASTIC_API_KEY" -H "Content-Type: application/json" -d - ''{"geo_match":{"indices":"postal_codes","match_field":"location","enrich_fields":["location","postal_code"]}}'' - "$ELASTICSEARCH_URL/_enrich/policy/postal_policy"' - - language: Java - code: | - client.enrich().putPolicy(p -> p - .geoMatch(g -> g - .enrichFields(List.of("location","postal_code")) - .indices("postal_codes") - .matchField("location") - ) - .name("postal_policy") - ); diff --git a/specification/enrich/stats/examples/request/EnrichStatsExample1.yaml b/specification/enrich/stats/examples/request/EnrichStatsExample1.yaml index 2140bee357..a6b11becca 100644 --- a/specification/enrich/stats/examples/request/EnrichStatsExample1.yaml +++ b/specification/enrich/stats/examples/request/EnrichStatsExample1.yaml @@ -1,15 +1 @@ method_request: GET /_enrich/_stats -alternatives: - - language: Python - code: resp = client.enrich.stats() - - language: JavaScript - code: const response = await client.enrich.stats(); - - language: Ruby - code: response = client.enrich.stats - - language: PHP - code: $resp = $client->enrich()->stats(); - - language: curl - code: 'curl -X GET -H "Authorization: ApiKey $ELASTIC_API_KEY" "$ELASTICSEARCH_URL/_enrich/_stats"' - - language: Java - code: | - client.enrich().stats(s -> s); diff --git a/specification/eql/delete/examples/request/EqlDeleteExample1.yaml b/specification/eql/delete/examples/request/EqlDeleteExample1.yaml index f5ca2d035c..6e3e4941c1 100644 --- a/specification/eql/delete/examples/request/EqlDeleteExample1.yaml +++ b/specification/eql/delete/examples/request/EqlDeleteExample1.yaml @@ -1,30 +1 @@ method_request: DELETE /_eql/search/FmNJRUZ1YWZCU3dHY1BIOUhaenVSRkEaaXFlZ3h4c1RTWFNocDdnY2FSaERnUTozNDE= -alternatives: - - language: Python - code: |- - resp = client.eql.delete( - id="FmNJRUZ1YWZCU3dHY1BIOUhaenVSRkEaaXFlZ3h4c1RTWFNocDdnY2FSaERnUTozNDE=", - ) - - language: JavaScript - code: |- - const response = await client.eql.delete({ - id: "FmNJRUZ1YWZCU3dHY1BIOUhaenVSRkEaaXFlZ3h4c1RTWFNocDdnY2FSaERnUTozNDE=", - }); - - language: Ruby - code: |- - response = client.eql.delete( - id: "FmNJRUZ1YWZCU3dHY1BIOUhaenVSRkEaaXFlZ3h4c1RTWFNocDdnY2FSaERnUTozNDE=" - ) - - language: PHP - code: |- - $resp = $client->eql()->delete([ - "id" => "FmNJRUZ1YWZCU3dHY1BIOUhaenVSRkEaaXFlZ3h4c1RTWFNocDdnY2FSaERnUTozNDE=", - ]); - - language: curl - code: 'curl -X DELETE -H "Authorization: ApiKey $ELASTIC_API_KEY" - "$ELASTICSEARCH_URL/_eql/search/FmNJRUZ1YWZCU3dHY1BIOUhaenVSRkEaaXFlZ3h4c1RTWFNocDdnY2FSaERnUTozNDE="' - - language: Java - code: | - client.eql().delete(d -> d - .id("FmNJRUZ1YWZCU3dHY1BIOUhaenVSRkEaaXFlZ3h4c1RTWFNocDdnY2FSaERnUTozNDE=") - ); diff --git a/specification/eql/get/examples/request/EqlGetExample1.yaml b/specification/eql/get/examples/request/EqlGetExample1.yaml index 05c5ee4fa7..64c2684d90 100644 --- a/specification/eql/get/examples/request/EqlGetExample1.yaml +++ b/specification/eql/get/examples/request/EqlGetExample1.yaml @@ -1,37 +1 @@ method_request: GET /_eql/search/FmNJRUZ1YWZCU3dHY1BIOUhaenVSRkEaaXFlZ3h4c1RTWFNocDdnY2FSaERnUTozNDE=?wait_for_completion_timeout=2s -alternatives: - - language: Python - code: |- - resp = client.eql.get( - id="FmNJRUZ1YWZCU3dHY1BIOUhaenVSRkEaaXFlZ3h4c1RTWFNocDdnY2FSaERnUTozNDE=", - wait_for_completion_timeout="2s", - ) - - language: JavaScript - code: |- - const response = await client.eql.get({ - id: "FmNJRUZ1YWZCU3dHY1BIOUhaenVSRkEaaXFlZ3h4c1RTWFNocDdnY2FSaERnUTozNDE=", - wait_for_completion_timeout: "2s", - }); - - language: Ruby - code: |- - response = client.eql.get( - id: "FmNJRUZ1YWZCU3dHY1BIOUhaenVSRkEaaXFlZ3h4c1RTWFNocDdnY2FSaERnUTozNDE=", - wait_for_completion_timeout: "2s" - ) - - language: PHP - code: |- - $resp = $client->eql()->get([ - "id" => "FmNJRUZ1YWZCU3dHY1BIOUhaenVSRkEaaXFlZ3h4c1RTWFNocDdnY2FSaERnUTozNDE=", - "wait_for_completion_timeout" => "2s", - ]); - - language: curl - code: 'curl -X GET -H "Authorization: ApiKey $ELASTIC_API_KEY" - "$ELASTICSEARCH_URL/_eql/search/FmNJRUZ1YWZCU3dHY1BIOUhaenVSRkEaaXFlZ3h4c1RTWFNocDdnY2FSaERnUTozNDE=?wait_for_completion_timeout=2s"' - - language: Java - code: | - client.eql().get(g -> g - .id("FmNJRUZ1YWZCU3dHY1BIOUhaenVSRkEaaXFlZ3h4c1RTWFNocDdnY2FSaERnUTozNDE=") - .waitForCompletionTimeout(w -> w - .offset(2) - ) - ); diff --git a/specification/eql/get_status/examples/request/EqlGetStatusExample1.yaml b/specification/eql/get_status/examples/request/EqlGetStatusExample1.yaml index fdb02017f1..05d571aa8c 100644 --- a/specification/eql/get_status/examples/request/EqlGetStatusExample1.yaml +++ b/specification/eql/get_status/examples/request/EqlGetStatusExample1.yaml @@ -1,30 +1 @@ method_request: GET /_eql/search/status/FmNJRUZ1YWZCU3dHY1BIOUhaenVSRkEaaXFlZ3h4c1RTWFNocDdnY2FSaERnUTozNDE= -alternatives: - - language: Python - code: |- - resp = client.eql.get_status( - id="FmNJRUZ1YWZCU3dHY1BIOUhaenVSRkEaaXFlZ3h4c1RTWFNocDdnY2FSaERnUTozNDE=", - ) - - language: JavaScript - code: |- - const response = await client.eql.getStatus({ - id: "FmNJRUZ1YWZCU3dHY1BIOUhaenVSRkEaaXFlZ3h4c1RTWFNocDdnY2FSaERnUTozNDE=", - }); - - language: Ruby - code: |- - response = client.eql.get_status( - id: "FmNJRUZ1YWZCU3dHY1BIOUhaenVSRkEaaXFlZ3h4c1RTWFNocDdnY2FSaERnUTozNDE=" - ) - - language: PHP - code: |- - $resp = $client->eql()->getStatus([ - "id" => "FmNJRUZ1YWZCU3dHY1BIOUhaenVSRkEaaXFlZ3h4c1RTWFNocDdnY2FSaERnUTozNDE=", - ]); - - language: curl - code: 'curl -X GET -H "Authorization: ApiKey $ELASTIC_API_KEY" - "$ELASTICSEARCH_URL/_eql/search/status/FmNJRUZ1YWZCU3dHY1BIOUhaenVSRkEaaXFlZ3h4c1RTWFNocDdnY2FSaERnUTozNDE="' - - language: Java - code: | - client.eql().getStatus(g -> g - .id("FmNJRUZ1YWZCU3dHY1BIOUhaenVSRkEaaXFlZ3h4c1RTWFNocDdnY2FSaERnUTozNDE=") - ); diff --git a/specification/eql/search/EqlSearchRequest.ts b/specification/eql/search/EqlSearchRequest.ts index bea2938a0b..7365746f20 100644 --- a/specification/eql/search/EqlSearchRequest.ts +++ b/specification/eql/search/EqlSearchRequest.ts @@ -65,6 +65,11 @@ export interface Request extends RequestBase { * @server_default open */ expand_wildcards?: ExpandWildcards + /** + * Indicates whether network round-trips should be minimized as part of cross-cluster search requests execution + * @server_default true + */ + ccs_minimize_roundtrips?: boolean /** * If true, missing or closed indices are not included in the response. * @server_default true diff --git a/specification/eql/search/examples/request/EqlSearchRequestExample1.yaml b/specification/eql/search/examples/request/EqlSearchRequestExample1.yaml index 88b92c515e..3650b8fb95 100644 --- a/specification/eql/search/examples/request/EqlSearchRequestExample1.yaml +++ b/specification/eql/search/examples/request/EqlSearchRequestExample1.yaml @@ -10,44 +10,3 @@ value: |- process where (process.name == "cmd.exe" and process.pid != 2013) """ } -alternatives: - - language: Python - code: |- - resp = client.eql.search( - index="my-data-stream", - query="\n process where (process.name == \"cmd.exe\" and process.pid != 2013)\n ", - ) - - language: JavaScript - code: |- - const response = await client.eql.search({ - index: "my-data-stream", - query: - '\n process where (process.name == "cmd.exe" and process.pid != 2013)\n ', - }); - - language: Ruby - code: |- - response = client.eql.search( - index: "my-data-stream", - body: { - "query": "\n process where (process.name == \"cmd.exe\" and process.pid != 2013)\n " - } - ) - - language: PHP - code: |- - $resp = $client->eql()->search([ - "index" => "my-data-stream", - "body" => [ - "query" => "\n process where (process.name == \"cmd.exe\" and process.pid != 2013)\n ", - ], - ]); - - language: curl - code: - "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d - '{\"query\":\"\\n process where (process.name == \\\"cmd.exe\\\" and process.pid != 2013)\\n \"}' - \"$ELASTICSEARCH_URL/my-data-stream/_eql/search\"" - - language: Java - code: | - client.eql().search(s -> s - .index("my-data-stream") - .query(" process where (process.name == \"cmd.exe\" and process.pid != 2013) ") - ); diff --git a/specification/eql/search/examples/request/EqlSearchRequestExample2.yaml b/specification/eql/search/examples/request/EqlSearchRequestExample2.yaml index 15b73338c5..cf9c74778c 100644 --- a/specification/eql/search/examples/request/EqlSearchRequestExample2.yaml +++ b/specification/eql/search/examples/request/EqlSearchRequestExample2.yaml @@ -14,45 +14,3 @@ value: |- [ process where stringContains(process.executable, "regsvr32") ] """ } -alternatives: - - language: Python - code: >- - resp = client.eql.search( - index="my-data-stream", - query="\n sequence by process.pid\n [ file where file.name == \"cmd.exe\" and process.pid != 2013 ]\n [ process where stringContains(process.executable, \"regsvr32\") ]\n ", - ) - - language: JavaScript - code: >- - const response = await client.eql.search({ - index: "my-data-stream", - query: - '\n sequence by process.pid\n [ file where file.name == "cmd.exe" and process.pid != 2013 ]\n [ process where stringContains(process.executable, "regsvr32") ]\n ', - }); - - language: Ruby - code: >- - response = client.eql.search( - index: "my-data-stream", - body: { - "query": "\n sequence by process.pid\n [ file where file.name == \"cmd.exe\" and process.pid != 2013 ]\n [ process where stringContains(process.executable, \"regsvr32\") ]\n " - } - ) - - language: PHP - code: >- - $resp = $client->eql()->search([ - "index" => "my-data-stream", - "body" => [ - "query" => "\n sequence by process.pid\n [ file where file.name == \"cmd.exe\" and process.pid != 2013 ]\n [ process where stringContains(process.executable, \"regsvr32\") ]\n ", - ], - ]); - - language: curl - code: - "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d - '{\"query\":\"\\n sequence by process.pid\\n [ file where file.name == \\\"cmd.exe\\\" and process.pid != 2013 - ]\\n [ process where stringContains(process.executable, \\\"regsvr32\\\") ]\\n \"}' - \"$ELASTICSEARCH_URL/my-data-stream/_eql/search\"" - - language: Java - code: | - client.eql().search(s -> s - .index("my-data-stream") - .query(" sequence by process.pid [ file where file.name == \"cmd.exe\" and process.pid != 2013 ][ process where stringContains(process.executable, \"regsvr32\") ] ") - ); diff --git a/specification/esql/_types/EsqlResult.ts b/specification/esql/_types/EsqlResult.ts index 649e323d2b..b3d37ed3f9 100644 --- a/specification/esql/_types/EsqlResult.ts +++ b/specification/esql/_types/EsqlResult.ts @@ -43,7 +43,17 @@ export class EsqlResult { } export class AsyncEsqlResult extends EsqlResult { + /** + * The ID of the async query, to be used in subsequent requests to check the status or retrieve results. + * + * Also available in the `X-Elasticsearch-Async-Id` HTTP header. + */ id?: string + /** + * Indicates whether the async query is still running or has completed. + * + * Also available in the `X-Elasticsearch-Async-Is-Running` HTTP header. + */ is_running: boolean } diff --git a/specification/esql/async_query/AsyncQueryRequest.ts b/specification/esql/async_query/AsyncQueryRequest.ts index f14574f1c4..87709cef94 100644 --- a/specification/esql/async_query/AsyncQueryRequest.ts +++ b/specification/esql/async_query/AsyncQueryRequest.ts @@ -58,7 +58,12 @@ export interface Request extends RequestBase { */ drop_null_columns?: boolean /** - * A short version of the Accept header, for example `json` or `yaml`. + * A short version of the Accept header, e.g. json, yaml. + * + * `csv`, `tsv`, and `txt` formats will return results in a tabular format, excluding other metadata fields from the response. + * + * For async requests, nothing will be returned if the async query doesn't finish within the timeout. + * The query ID and running status are available in the `X-Elasticsearch-Async-Id` and `X-Elasticsearch-Async-Is-Running` HTTP headers of the response, respectively. */ format?: EsqlFormat } diff --git a/specification/esql/async_query/examples/request/AsyncQueryRequestExample1.yaml b/specification/esql/async_query/examples/request/AsyncQueryRequestExample1.yaml index c36096a74a..263114a0b4 100644 --- a/specification/esql/async_query/examples/request/AsyncQueryRequestExample1.yaml +++ b/specification/esql/async_query/examples/request/AsyncQueryRequestExample1.yaml @@ -14,43 +14,3 @@ value: |- "wait_for_completion_timeout": "2s", "include_ccs_metadata": true } -alternatives: - - language: Python - code: >- - resp = client.esql.async_query( - query="\n FROM library,remote-*:library\n | EVAL year = DATE_TRUNC(1 YEARS, release_date)\n | STATS MAX(page_count) BY year\n | SORT year\n | LIMIT 5\n ", - wait_for_completion_timeout="2s", - include_ccs_metadata=True, - ) - - language: JavaScript - code: >- - const response = await client.esql.asyncQuery({ - query: - "\n FROM library,remote-*:library\n | EVAL year = DATE_TRUNC(1 YEARS, release_date)\n | STATS MAX(page_count) BY year\n | SORT year\n | LIMIT 5\n ", - wait_for_completion_timeout: "2s", - include_ccs_metadata: true, - }); - - language: Ruby - code: >- - response = client.esql.async_query( - body: { - "query": "\n FROM library,remote-*:library\n | EVAL year = DATE_TRUNC(1 YEARS, release_date)\n | STATS MAX(page_count) BY year\n | SORT year\n | LIMIT 5\n ", - "wait_for_completion_timeout": "2s", - "include_ccs_metadata": true - } - ) - - language: PHP - code: >- - $resp = $client->esql()->asyncQuery([ - "body" => [ - "query" => "\n FROM library,remote-*:library\n | EVAL year = DATE_TRUNC(1 YEARS, release_date)\n | STATS MAX(page_count) BY year\n | SORT year\n | LIMIT 5\n ", - "wait_for_completion_timeout" => "2s", - "include_ccs_metadata" => true, - ], - ]); - - language: curl - code: - "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"query\":\"\\n FROM - library,remote-*:library\\n | EVAL year = DATE_TRUNC(1 YEARS, release_date)\\n | STATS MAX(page_count) BY year\\n | - SORT year\\n | LIMIT 5\\n \",\"wait_for_completion_timeout\":\"2s\",\"include_ccs_metadata\":true}' - \"$ELASTICSEARCH_URL/_query/async\"" diff --git a/specification/esql/async_query_delete/examples/request/EsqlAsyncQueryDeleteExample1.yaml b/specification/esql/async_query_delete/examples/request/EsqlAsyncQueryDeleteExample1.yaml index 45f05b8bdd..0c630eee05 100644 --- a/specification/esql/async_query_delete/examples/request/EsqlAsyncQueryDeleteExample1.yaml +++ b/specification/esql/async_query_delete/examples/request/EsqlAsyncQueryDeleteExample1.yaml @@ -1,25 +1 @@ method_request: DELETE /_query/async/FmdMX2pIang3UWhLRU5QS0lqdlppYncaMUpYQ05oSkpTc3kwZ21EdC1tbFJXQToxOTI= -alternatives: - - language: Python - code: |- - resp = client.esql.async_query_delete( - id="FmdMX2pIang3UWhLRU5QS0lqdlppYncaMUpYQ05oSkpTc3kwZ21EdC1tbFJXQToxOTI=", - ) - - language: JavaScript - code: |- - const response = await client.esql.asyncQueryDelete({ - id: "FmdMX2pIang3UWhLRU5QS0lqdlppYncaMUpYQ05oSkpTc3kwZ21EdC1tbFJXQToxOTI=", - }); - - language: Ruby - code: |- - response = client.esql.async_query_delete( - id: "FmdMX2pIang3UWhLRU5QS0lqdlppYncaMUpYQ05oSkpTc3kwZ21EdC1tbFJXQToxOTI=" - ) - - language: PHP - code: |- - $resp = $client->esql()->asyncQueryDelete([ - "id" => "FmdMX2pIang3UWhLRU5QS0lqdlppYncaMUpYQ05oSkpTc3kwZ21EdC1tbFJXQToxOTI=", - ]); - - language: curl - code: 'curl -X DELETE -H "Authorization: ApiKey $ELASTIC_API_KEY" - "$ELASTICSEARCH_URL/_query/async/FmdMX2pIang3UWhLRU5QS0lqdlppYncaMUpYQ05oSkpTc3kwZ21EdC1tbFJXQToxOTI="' diff --git a/specification/esql/async_query_get/examples/request/EsqlAsyncQueryGetExample1.yaml b/specification/esql/async_query_get/examples/request/EsqlAsyncQueryGetExample1.yaml index 85b1c99547..7a69a2399a 100644 --- a/specification/esql/async_query_get/examples/request/EsqlAsyncQueryGetExample1.yaml +++ b/specification/esql/async_query_get/examples/request/EsqlAsyncQueryGetExample1.yaml @@ -1,29 +1 @@ method_request: GET /_query/async/FmNJRUZ1YWZCU3dHY1BIOUhaenVSRkEaaXFlZ3h4c1RTWFNocDdnY2FSaERnUTozNDE=?wait_for_completion_timeout=30s -alternatives: - - language: Python - code: |- - resp = client.esql.async_query_get( - id="FmNJRUZ1YWZCU3dHY1BIOUhaenVSRkEaaXFlZ3h4c1RTWFNocDdnY2FSaERnUTozNDE=", - wait_for_completion_timeout="30s", - ) - - language: JavaScript - code: |- - const response = await client.esql.asyncQueryGet({ - id: "FmNJRUZ1YWZCU3dHY1BIOUhaenVSRkEaaXFlZ3h4c1RTWFNocDdnY2FSaERnUTozNDE=", - wait_for_completion_timeout: "30s", - }); - - language: Ruby - code: |- - response = client.esql.async_query_get( - id: "FmNJRUZ1YWZCU3dHY1BIOUhaenVSRkEaaXFlZ3h4c1RTWFNocDdnY2FSaERnUTozNDE=", - wait_for_completion_timeout: "30s" - ) - - language: PHP - code: |- - $resp = $client->esql()->asyncQueryGet([ - "id" => "FmNJRUZ1YWZCU3dHY1BIOUhaenVSRkEaaXFlZ3h4c1RTWFNocDdnY2FSaERnUTozNDE=", - "wait_for_completion_timeout" => "30s", - ]); - - language: curl - code: 'curl -X GET -H "Authorization: ApiKey $ELASTIC_API_KEY" - "$ELASTICSEARCH_URL/_query/async/FmNJRUZ1YWZCU3dHY1BIOUhaenVSRkEaaXFlZ3h4c1RTWFNocDdnY2FSaERnUTozNDE=?wait_for_completion_timeout=30s"' diff --git a/specification/esql/async_query_stop/examples/request/EsqlAsyncQueryStopExample1.yaml b/specification/esql/async_query_stop/examples/request/EsqlAsyncQueryStopExample1.yaml index ee66b7e73b..775da781ae 100644 --- a/specification/esql/async_query_stop/examples/request/EsqlAsyncQueryStopExample1.yaml +++ b/specification/esql/async_query_stop/examples/request/EsqlAsyncQueryStopExample1.yaml @@ -1,25 +1 @@ method_request: POST /_query/async/FkpMRkJGS1gzVDRlM3g4ZzMyRGlLbkEaTXlJZHdNT09TU2VTZVBoNDM3cFZMUToxMDM=/stop -alternatives: - - language: Python - code: |- - resp = client.esql.async_query_stop( - id="FkpMRkJGS1gzVDRlM3g4ZzMyRGlLbkEaTXlJZHdNT09TU2VTZVBoNDM3cFZMUToxMDM=", - ) - - language: JavaScript - code: |- - const response = await client.esql.asyncQueryStop({ - id: "FkpMRkJGS1gzVDRlM3g4ZzMyRGlLbkEaTXlJZHdNT09TU2VTZVBoNDM3cFZMUToxMDM=", - }); - - language: Ruby - code: |- - response = client.esql.async_query_stop( - id: "FkpMRkJGS1gzVDRlM3g4ZzMyRGlLbkEaTXlJZHdNT09TU2VTZVBoNDM3cFZMUToxMDM=" - ) - - language: PHP - code: |- - $resp = $client->esql()->asyncQueryStop([ - "id" => "FkpMRkJGS1gzVDRlM3g4ZzMyRGlLbkEaTXlJZHdNT09TU2VTZVBoNDM3cFZMUToxMDM=", - ]); - - language: curl - code: 'curl -X POST -H "Authorization: ApiKey $ELASTIC_API_KEY" - "$ELASTICSEARCH_URL/_query/async/FkpMRkJGS1gzVDRlM3g4ZzMyRGlLbkEaTXlJZHdNT09TU2VTZVBoNDM3cFZMUToxMDM=/stop"' diff --git a/specification/esql/query/QueryRequest.ts b/specification/esql/query/QueryRequest.ts index 735974d5e1..91004d2312 100644 --- a/specification/esql/query/QueryRequest.ts +++ b/specification/esql/query/QueryRequest.ts @@ -43,6 +43,8 @@ export interface Request extends RequestBase { query_parameters: { /** * A short version of the Accept header, e.g. json, yaml. + * + * `csv`, `tsv`, and `txt` formats will return results in a tabular format, excluding other metadata fields from the response. */ format?: EsqlFormat /** diff --git a/specification/esql/query/examples/request/QueryRequestExample1.yaml b/specification/esql/query/examples/request/QueryRequestExample1.yaml index 158720686b..be5b71f199 100644 --- a/specification/esql/query/examples/request/QueryRequestExample1.yaml +++ b/specification/esql/query/examples/request/QueryRequestExample1.yaml @@ -13,44 +13,3 @@ value: |- """, "include_ccs_metadata": true } -alternatives: - - language: Python - code: >- - resp = client.esql.query( - query="\n FROM library,remote-*:library\n | EVAL year = DATE_TRUNC(1 YEARS, release_date)\n | STATS MAX(page_count) BY year\n | SORT year\n | LIMIT 5\n ", - include_ccs_metadata=True, - ) - - language: JavaScript - code: >- - const response = await client.esql.query({ - query: - "\n FROM library,remote-*:library\n | EVAL year = DATE_TRUNC(1 YEARS, release_date)\n | STATS MAX(page_count) BY year\n | SORT year\n | LIMIT 5\n ", - include_ccs_metadata: true, - }); - - language: Ruby - code: >- - response = client.esql.query( - body: { - "query": "\n FROM library,remote-*:library\n | EVAL year = DATE_TRUNC(1 YEARS, release_date)\n | STATS MAX(page_count) BY year\n | SORT year\n | LIMIT 5\n ", - "include_ccs_metadata": true - } - ) - - language: PHP - code: >- - $resp = $client->esql()->query([ - "body" => [ - "query" => "\n FROM library,remote-*:library\n | EVAL year = DATE_TRUNC(1 YEARS, release_date)\n | STATS MAX(page_count) BY year\n | SORT year\n | LIMIT 5\n ", - "include_ccs_metadata" => true, - ], - ]); - - language: curl - code: - "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"query\":\"\\n FROM - library,remote-*:library\\n | EVAL year = DATE_TRUNC(1 YEARS, release_date)\\n | STATS MAX(page_count) BY year\\n | - SORT year\\n | LIMIT 5\\n \",\"include_ccs_metadata\":true}' \"$ELASTICSEARCH_URL/_query\"" - - language: Java - code: | - client.esql().query(q -> q - .includeCcsMetadata(true) - .query(" FROM library,remote-*:library | EVAL year = DATE_TRUNC(1 YEARS, release_date) | STATS MAX(page_count) BY year | SORT year | LIMIT 5 ") - ); diff --git a/specification/features/get_features/examples/request/FeaturesGetFeaturesExample1.yaml b/specification/features/get_features/examples/request/FeaturesGetFeaturesExample1.yaml index 889bca2126..509f354389 100644 --- a/specification/features/get_features/examples/request/FeaturesGetFeaturesExample1.yaml +++ b/specification/features/get_features/examples/request/FeaturesGetFeaturesExample1.yaml @@ -1,15 +1 @@ method_request: GET _features -alternatives: - - language: Python - code: resp = client.features.get_features() - - language: JavaScript - code: const response = await client.features.getFeatures(); - - language: Ruby - code: response = client.features.get_features - - language: PHP - code: $resp = $client->features()->getFeatures(); - - language: curl - code: 'curl -X GET -H "Authorization: ApiKey $ELASTIC_API_KEY" "$ELASTICSEARCH_URL/_features"' - - language: Java - code: | - client.features().getFeatures(g -> g); diff --git a/specification/features/reset_features/examples/request/FeaturesResetFeaturesExample1.yaml b/specification/features/reset_features/examples/request/FeaturesResetFeaturesExample1.yaml index a3d904d097..0d7baa04ab 100644 --- a/specification/features/reset_features/examples/request/FeaturesResetFeaturesExample1.yaml +++ b/specification/features/reset_features/examples/request/FeaturesResetFeaturesExample1.yaml @@ -1,15 +1 @@ method_request: POST /_features/_reset -alternatives: - - language: Python - code: resp = client.features.reset_features() - - language: JavaScript - code: const response = await client.features.resetFeatures(); - - language: Ruby - code: response = client.features.reset_features - - language: PHP - code: $resp = $client->features()->resetFeatures(); - - language: curl - code: 'curl -X POST -H "Authorization: ApiKey $ELASTIC_API_KEY" "$ELASTICSEARCH_URL/_features/_reset"' - - language: Java - code: | - client.features().resetFeatures(r -> r); diff --git a/specification/graph/explore/examples/request/GraphExploreRequestExample1.yaml b/specification/graph/explore/examples/request/GraphExploreRequestExample1.yaml index d1a020261a..fbe1ccabda 100644 --- a/specification/graph/explore/examples/request/GraphExploreRequestExample1.yaml +++ b/specification/graph/explore/examples/request/GraphExploreRequestExample1.yaml @@ -27,120 +27,3 @@ value: |- ] } } -alternatives: - - language: Python - code: |- - resp = client.graph.explore( - index="clicklogs", - query={ - "match": { - "query.raw": "midi" - } - }, - vertices=[ - { - "field": "product" - } - ], - connections={ - "vertices": [ - { - "field": "query.raw" - } - ] - }, - ) - - language: JavaScript - code: |- - const response = await client.graph.explore({ - index: "clicklogs", - query: { - match: { - "query.raw": "midi", - }, - }, - vertices: [ - { - field: "product", - }, - ], - connections: { - vertices: [ - { - field: "query.raw", - }, - ], - }, - }); - - language: Ruby - code: |- - response = client.graph.explore( - index: "clicklogs", - body: { - "query": { - "match": { - "query.raw": "midi" - } - }, - "vertices": [ - { - "field": "product" - } - ], - "connections": { - "vertices": [ - { - "field": "query.raw" - } - ] - } - } - ) - - language: PHP - code: |- - $resp = $client->graph()->explore([ - "index" => "clicklogs", - "body" => [ - "query" => [ - "match" => [ - "query.raw" => "midi", - ], - ], - "vertices" => array( - [ - "field" => "product", - ], - ), - "connections" => [ - "vertices" => array( - [ - "field" => "query.raw", - ], - ), - ], - ], - ]); - - language: curl - code: - "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d - '{\"query\":{\"match\":{\"query.raw\":\"midi\"}},\"vertices\":[{\"field\":\"product\"}],\"connections\":{\"vertices\":[{\"fie\ - ld\":\"query.raw\"}]}}' \"$ELASTICSEARCH_URL/clicklogs/_graph/explore\"" - - language: Java - code: | - client.graph().explore(e -> e - .connections(c -> c - .vertices(v -> v - .field("query.raw") - ) - ) - .index("clicklogs") - .query(q -> q - .match(m -> m - .field("query.raw") - .query(FieldValue.of("midi")) - ) - ) - .vertices(v -> v - .field("product") - ) - ); diff --git a/specification/ilm/delete_lifecycle/examples/request/IlmDeleteLifecycleExample1.yaml b/specification/ilm/delete_lifecycle/examples/request/IlmDeleteLifecycleExample1.yaml index 4b9972d511..2e2a308346 100644 --- a/specification/ilm/delete_lifecycle/examples/request/IlmDeleteLifecycleExample1.yaml +++ b/specification/ilm/delete_lifecycle/examples/request/IlmDeleteLifecycleExample1.yaml @@ -1,29 +1 @@ method_request: DELETE _ilm/policy/my_policy -alternatives: - - language: Python - code: |- - resp = client.ilm.delete_lifecycle( - name="my_policy", - ) - - language: JavaScript - code: |- - const response = await client.ilm.deleteLifecycle({ - name: "my_policy", - }); - - language: Ruby - code: |- - response = client.ilm.delete_lifecycle( - policy: "my_policy" - ) - - language: PHP - code: |- - $resp = $client->ilm()->deleteLifecycle([ - "policy" => "my_policy", - ]); - - language: curl - code: 'curl -X DELETE -H "Authorization: ApiKey $ELASTIC_API_KEY" "$ELASTICSEARCH_URL/_ilm/policy/my_policy"' - - language: Java - code: | - client.ilm().deleteLifecycle(d -> d - .name("my_policy") - ); diff --git a/specification/ilm/explain_lifecycle/examples/request/IlmExplainLifecycleExample1.yaml b/specification/ilm/explain_lifecycle/examples/request/IlmExplainLifecycleExample1.yaml index 557b998508..e695acaecd 100644 --- a/specification/ilm/explain_lifecycle/examples/request/IlmExplainLifecycleExample1.yaml +++ b/specification/ilm/explain_lifecycle/examples/request/IlmExplainLifecycleExample1.yaml @@ -1,29 +1 @@ method_request: GET .ds-timeseries-*/_ilm/explain -alternatives: - - language: Python - code: |- - resp = client.ilm.explain_lifecycle( - index=".ds-timeseries-*", - ) - - language: JavaScript - code: |- - const response = await client.ilm.explainLifecycle({ - index: ".ds-timeseries-*", - }); - - language: Ruby - code: |- - response = client.ilm.explain_lifecycle( - index: ".ds-timeseries-*" - ) - - language: PHP - code: |- - $resp = $client->ilm()->explainLifecycle([ - "index" => ".ds-timeseries-*", - ]); - - language: curl - code: 'curl -X GET -H "Authorization: ApiKey $ELASTIC_API_KEY" "$ELASTICSEARCH_URL/.ds-timeseries-*/_ilm/explain"' - - language: Java - code: | - client.ilm().explainLifecycle(e -> e - .index(".ds-timeseries-*") - ); diff --git a/specification/ilm/get_lifecycle/examples/request/IlmGetLifecycleExample1.yaml b/specification/ilm/get_lifecycle/examples/request/IlmGetLifecycleExample1.yaml index 3edcdf6b96..cebf89a7ab 100644 --- a/specification/ilm/get_lifecycle/examples/request/IlmGetLifecycleExample1.yaml +++ b/specification/ilm/get_lifecycle/examples/request/IlmGetLifecycleExample1.yaml @@ -1,29 +1 @@ method_request: GET _ilm/policy/my_policy -alternatives: - - language: Python - code: |- - resp = client.ilm.get_lifecycle( - name="my_policy", - ) - - language: JavaScript - code: |- - const response = await client.ilm.getLifecycle({ - name: "my_policy", - }); - - language: Ruby - code: |- - response = client.ilm.get_lifecycle( - policy: "my_policy" - ) - - language: PHP - code: |- - $resp = $client->ilm()->getLifecycle([ - "policy" => "my_policy", - ]); - - language: curl - code: 'curl -X GET -H "Authorization: ApiKey $ELASTIC_API_KEY" "$ELASTICSEARCH_URL/_ilm/policy/my_policy"' - - language: Java - code: | - client.ilm().getLifecycle(g -> g - .name("my_policy") - ); diff --git a/specification/ilm/get_status/examples/request/IlmGetStatusExample1.yaml b/specification/ilm/get_status/examples/request/IlmGetStatusExample1.yaml index 1ac252a399..04047c6804 100644 --- a/specification/ilm/get_status/examples/request/IlmGetStatusExample1.yaml +++ b/specification/ilm/get_status/examples/request/IlmGetStatusExample1.yaml @@ -1,15 +1 @@ method_request: GET _ilm/status -alternatives: - - language: Python - code: resp = client.ilm.get_status() - - language: JavaScript - code: const response = await client.ilm.getStatus(); - - language: Ruby - code: response = client.ilm.get_status - - language: PHP - code: $resp = $client->ilm()->getStatus(); - - language: curl - code: 'curl -X GET -H "Authorization: ApiKey $ELASTIC_API_KEY" "$ELASTICSEARCH_URL/_ilm/status"' - - language: Java - code: | - client.ilm().getStatus(); diff --git a/specification/ilm/migrate_to_data_tiers/examples/request/MigrateToDataTiersRequestExample1.yaml b/specification/ilm/migrate_to_data_tiers/examples/request/MigrateToDataTiersRequestExample1.yaml index ae0c5ca0af..73933ef884 100644 --- a/specification/ilm/migrate_to_data_tiers/examples/request/MigrateToDataTiersRequestExample1.yaml +++ b/specification/ilm/migrate_to_data_tiers/examples/request/MigrateToDataTiersRequestExample1.yaml @@ -10,43 +10,3 @@ value: |- "legacy_template_to_delete": "global-template", "node_attribute": "custom_attribute_name" } -alternatives: - - language: Python - code: |- - resp = client.ilm.migrate_to_data_tiers( - legacy_template_to_delete="global-template", - node_attribute="custom_attribute_name", - ) - - language: JavaScript - code: |- - const response = await client.ilm.migrateToDataTiers({ - legacy_template_to_delete: "global-template", - node_attribute: "custom_attribute_name", - }); - - language: Ruby - code: |- - response = client.ilm.migrate_to_data_tiers( - body: { - "legacy_template_to_delete": "global-template", - "node_attribute": "custom_attribute_name" - } - ) - - language: PHP - code: |- - $resp = $client->ilm()->migrateToDataTiers([ - "body" => [ - "legacy_template_to_delete" => "global-template", - "node_attribute" => "custom_attribute_name", - ], - ]); - - language: curl - code: - 'curl -X POST -H "Authorization: ApiKey $ELASTIC_API_KEY" -H "Content-Type: application/json" -d - ''{"legacy_template_to_delete":"global-template","node_attribute":"custom_attribute_name"}'' - "$ELASTICSEARCH_URL/_ilm/migrate_to_data_tiers"' - - language: Java - code: | - client.ilm().migrateToDataTiers(m -> m - .legacyTemplateToDelete("global-template") - .nodeAttribute("custom_attribute_name") - ); diff --git a/specification/ilm/move_to_step/examples/request/MoveToStepRequestExample1.yaml b/specification/ilm/move_to_step/examples/request/MoveToStepRequestExample1.yaml index c6e2d4a9dc..b45cfd721e 100644 --- a/specification/ilm/move_to_step/examples/request/MoveToStepRequestExample1.yaml +++ b/specification/ilm/move_to_step/examples/request/MoveToStepRequestExample1.yaml @@ -16,88 +16,3 @@ value: |- "name": "forcemerge" } } -alternatives: - - language: Python - code: |- - resp = client.ilm.move_to_step( - index="my-index-000001", - current_step={ - "phase": "new", - "action": "complete", - "name": "complete" - }, - next_step={ - "phase": "warm", - "action": "forcemerge", - "name": "forcemerge" - }, - ) - - language: JavaScript - code: |- - const response = await client.ilm.moveToStep({ - index: "my-index-000001", - current_step: { - phase: "new", - action: "complete", - name: "complete", - }, - next_step: { - phase: "warm", - action: "forcemerge", - name: "forcemerge", - }, - }); - - language: Ruby - code: |- - response = client.ilm.move_to_step( - index: "my-index-000001", - body: { - "current_step": { - "phase": "new", - "action": "complete", - "name": "complete" - }, - "next_step": { - "phase": "warm", - "action": "forcemerge", - "name": "forcemerge" - } - } - ) - - language: PHP - code: |- - $resp = $client->ilm()->moveToStep([ - "index" => "my-index-000001", - "body" => [ - "current_step" => [ - "phase" => "new", - "action" => "complete", - "name" => "complete", - ], - "next_step" => [ - "phase" => "warm", - "action" => "forcemerge", - "name" => "forcemerge", - ], - ], - ]); - - language: curl - code: - "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d - '{\"current_step\":{\"phase\":\"new\",\"action\":\"complete\",\"name\":\"complete\"},\"next_step\":{\"phase\":\"warm\",\"acti\ - on\":\"forcemerge\",\"name\":\"forcemerge\"}}' \"$ELASTICSEARCH_URL/_ilm/move/my-index-000001\"" - - language: Java - code: | - client.ilm().moveToStep(m -> m - .currentStep(c -> c - .action("complete") - .name("complete") - .phase("new") - ) - .index("my-index-000001") - .nextStep(n -> n - .action("forcemerge") - .name("forcemerge") - .phase("warm") - ) - ); diff --git a/specification/ilm/move_to_step/examples/request/MoveToStepRequestExample2.yaml b/specification/ilm/move_to_step/examples/request/MoveToStepRequestExample2.yaml index faee76fbf0..a2f6b5c1ab 100644 --- a/specification/ilm/move_to_step/examples/request/MoveToStepRequestExample2.yaml +++ b/specification/ilm/move_to_step/examples/request/MoveToStepRequestExample2.yaml @@ -14,78 +14,3 @@ value: |- "phase": "warm" } } -alternatives: - - language: Python - code: |- - resp = client.ilm.move_to_step( - index="my-index-000001", - current_step={ - "phase": "hot", - "action": "complete", - "name": "complete" - }, - next_step={ - "phase": "warm" - }, - ) - - language: JavaScript - code: |- - const response = await client.ilm.moveToStep({ - index: "my-index-000001", - current_step: { - phase: "hot", - action: "complete", - name: "complete", - }, - next_step: { - phase: "warm", - }, - }); - - language: Ruby - code: |- - response = client.ilm.move_to_step( - index: "my-index-000001", - body: { - "current_step": { - "phase": "hot", - "action": "complete", - "name": "complete" - }, - "next_step": { - "phase": "warm" - } - } - ) - - language: PHP - code: |- - $resp = $client->ilm()->moveToStep([ - "index" => "my-index-000001", - "body" => [ - "current_step" => [ - "phase" => "hot", - "action" => "complete", - "name" => "complete", - ], - "next_step" => [ - "phase" => "warm", - ], - ], - ]); - - language: curl - code: - 'curl -X POST -H "Authorization: ApiKey $ELASTIC_API_KEY" -H "Content-Type: application/json" -d - ''{"current_step":{"phase":"hot","action":"complete","name":"complete"},"next_step":{"phase":"warm"}}'' - "$ELASTICSEARCH_URL/_ilm/move/my-index-000001"' - - language: Java - code: | - client.ilm().moveToStep(m -> m - .currentStep(c -> c - .action("complete") - .name("complete") - .phase("hot") - ) - .index("my-index-000001") - .nextStep(n -> n - .phase("warm") - ) - ); diff --git a/specification/ilm/put_lifecycle/examples/request/PutLifecycleRequestExample1.yaml b/specification/ilm/put_lifecycle/examples/request/PutLifecycleRequestExample1.yaml index 644db6fda3..b703c86d37 100644 --- a/specification/ilm/put_lifecycle/examples/request/PutLifecycleRequestExample1.yaml +++ b/specification/ilm/put_lifecycle/examples/request/PutLifecycleRequestExample1.yaml @@ -31,163 +31,3 @@ value: |- } } } -alternatives: - - language: Python - code: |- - resp = client.ilm.put_lifecycle( - name="my_policy", - policy={ - "_meta": { - "description": "used for nginx log", - "project": { - "name": "myProject", - "department": "myDepartment" - } - }, - "phases": { - "warm": { - "min_age": "10d", - "actions": { - "forcemerge": { - "max_num_segments": 1 - } - } - }, - "delete": { - "min_age": "30d", - "actions": { - "delete": {} - } - } - } - }, - ) - - language: JavaScript - code: |- - const response = await client.ilm.putLifecycle({ - name: "my_policy", - policy: { - _meta: { - description: "used for nginx log", - project: { - name: "myProject", - department: "myDepartment", - }, - }, - phases: { - warm: { - min_age: "10d", - actions: { - forcemerge: { - max_num_segments: 1, - }, - }, - }, - delete: { - min_age: "30d", - actions: { - delete: {}, - }, - }, - }, - }, - }); - - language: Ruby - code: |- - response = client.ilm.put_lifecycle( - policy: "my_policy", - body: { - "policy": { - "_meta": { - "description": "used for nginx log", - "project": { - "name": "myProject", - "department": "myDepartment" - } - }, - "phases": { - "warm": { - "min_age": "10d", - "actions": { - "forcemerge": { - "max_num_segments": 1 - } - } - }, - "delete": { - "min_age": "30d", - "actions": { - "delete": {} - } - } - } - } - } - ) - - language: PHP - code: |- - $resp = $client->ilm()->putLifecycle([ - "policy" => "my_policy", - "body" => [ - "policy" => [ - "_meta" => [ - "description" => "used for nginx log", - "project" => [ - "name" => "myProject", - "department" => "myDepartment", - ], - ], - "phases" => [ - "warm" => [ - "min_age" => "10d", - "actions" => [ - "forcemerge" => [ - "max_num_segments" => 1, - ], - ], - ], - "delete" => [ - "min_age" => "30d", - "actions" => [ - "delete" => new ArrayObject([]), - ], - ], - ], - ], - ], - ]); - - language: curl - code: - "curl -X PUT -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d - '{\"policy\":{\"_meta\":{\"description\":\"used for nginx - log\",\"project\":{\"name\":\"myProject\",\"department\":\"myDepartment\"}},\"phases\":{\"warm\":{\"min_age\":\"10d\",\"actio\ - ns\":{\"forcemerge\":{\"max_num_segments\":1}}},\"delete\":{\"min_age\":\"30d\",\"actions\":{\"delete\":{}}}}}}' - \"$ELASTICSEARCH_URL/_ilm/policy/my_policy\"" - - language: Java - code: > - client.ilm().putLifecycle(p -> p - .name("my_policy") - .policy(po -> po - .phases(ph -> ph - .delete(d -> d - .actions(a -> a - .delete(de -> de) - ) - .minAge(m -> m - .time("30d") - ) - ) - .warm(w -> w - .actions(a -> a - .forcemerge(f -> f - .maxNumSegments(1) - ) - ) - .minAge(m -> m - .time("10d") - ) - ) - ) - .meta(Map.of("description", JsonData.fromJson("\"used for nginx log\""),"project", JsonData.fromJson("{\"name\":\"myProject\",\"department\":\"myDepartment\"}"))) - ) - ); diff --git a/specification/ilm/remove_policy/examples/request/IlmRemovePolicyExample1.yaml b/specification/ilm/remove_policy/examples/request/IlmRemovePolicyExample1.yaml index 0b11ffa213..360fb2c26e 100644 --- a/specification/ilm/remove_policy/examples/request/IlmRemovePolicyExample1.yaml +++ b/specification/ilm/remove_policy/examples/request/IlmRemovePolicyExample1.yaml @@ -1,29 +1 @@ method_request: POST logs-my_app-default/_ilm/remove -alternatives: - - language: Python - code: |- - resp = client.ilm.remove_policy( - index="logs-my_app-default", - ) - - language: JavaScript - code: |- - const response = await client.ilm.removePolicy({ - index: "logs-my_app-default", - }); - - language: Ruby - code: |- - response = client.ilm.remove_policy( - index: "logs-my_app-default" - ) - - language: PHP - code: |- - $resp = $client->ilm()->removePolicy([ - "index" => "logs-my_app-default", - ]); - - language: curl - code: 'curl -X POST -H "Authorization: ApiKey $ELASTIC_API_KEY" "$ELASTICSEARCH_URL/logs-my_app-default/_ilm/remove"' - - language: Java - code: | - client.ilm().removePolicy(r -> r - .index("logs-my_app-default") - ); diff --git a/specification/ilm/retry/examples/request/IlmRetryExample1.yaml b/specification/ilm/retry/examples/request/IlmRetryExample1.yaml index 29d2f46f7f..103ab9f387 100644 --- a/specification/ilm/retry/examples/request/IlmRetryExample1.yaml +++ b/specification/ilm/retry/examples/request/IlmRetryExample1.yaml @@ -1,29 +1 @@ method_request: POST /my-index-000001/_ilm/retry -alternatives: - - language: Python - code: |- - resp = client.ilm.retry( - index="my-index-000001", - ) - - language: JavaScript - code: |- - const response = await client.ilm.retry({ - index: "my-index-000001", - }); - - language: Ruby - code: |- - response = client.ilm.retry( - index: "my-index-000001" - ) - - language: PHP - code: |- - $resp = $client->ilm()->retry([ - "index" => "my-index-000001", - ]); - - language: curl - code: 'curl -X POST -H "Authorization: ApiKey $ELASTIC_API_KEY" "$ELASTICSEARCH_URL/my-index-000001/_ilm/retry"' - - language: Java - code: | - client.ilm().retry(r -> r - .index("my-index-000001") - ); diff --git a/specification/ilm/start/examples/request/IlmStartExample1.yaml b/specification/ilm/start/examples/request/IlmStartExample1.yaml index 6d60168689..2a48463c8a 100644 --- a/specification/ilm/start/examples/request/IlmStartExample1.yaml +++ b/specification/ilm/start/examples/request/IlmStartExample1.yaml @@ -1,15 +1 @@ method_request: POST _ilm/start -alternatives: - - language: Python - code: resp = client.ilm.start() - - language: JavaScript - code: const response = await client.ilm.start(); - - language: Ruby - code: response = client.ilm.start - - language: PHP - code: $resp = $client->ilm()->start(); - - language: curl - code: 'curl -X POST -H "Authorization: ApiKey $ELASTIC_API_KEY" "$ELASTICSEARCH_URL/_ilm/start"' - - language: Java - code: | - client.ilm().start(s -> s); diff --git a/specification/ilm/stop/examples/request/IlmStopExample1.yaml b/specification/ilm/stop/examples/request/IlmStopExample1.yaml index a6e9d761ea..b3476798bb 100644 --- a/specification/ilm/stop/examples/request/IlmStopExample1.yaml +++ b/specification/ilm/stop/examples/request/IlmStopExample1.yaml @@ -1,15 +1 @@ method_request: POST _ilm/stop -alternatives: - - language: Python - code: resp = client.ilm.stop() - - language: JavaScript - code: const response = await client.ilm.stop(); - - language: Ruby - code: response = client.ilm.stop - - language: PHP - code: $resp = $client->ilm()->stop(); - - language: curl - code: 'curl -X POST -H "Authorization: ApiKey $ELASTIC_API_KEY" "$ELASTICSEARCH_URL/_ilm/stop"' - - language: Java - code: | - client.ilm().stop(s -> s); diff --git a/specification/indices/_types/IndexSettings.ts b/specification/indices/_types/IndexSettings.ts index c416167cce..9705a7c786 100644 --- a/specification/indices/_types/IndexSettings.ts +++ b/specification/indices/_types/IndexSettings.ts @@ -269,6 +269,17 @@ export class IndexSettingBlocks { metadata?: Stringified } +export enum IndicesBlockOptions { + /** Disable metadata changes, such as closing the index. */ + metadata, + /** Disable read operations. */ + read, + /** Disable write operations and metadata changes. */ + read_only, + /** Disable write operations. However, metadata changes are still allowed. */ + write +} + /** * @es_quirk This is a boolean that evolved into an enum. ES also accepts plain booleans for true and false. */ @@ -542,6 +553,8 @@ export class Storage { * of memory maps so you need disable the ability to use memory-mapping. */ allow_mmap?: boolean + /** How often store statistics are refreshed */ + stats_refresh_interval?: Duration } /** diff --git a/specification/indices/add_block/IndicesAddBlockRequest.ts b/specification/indices/add_block/IndicesAddBlockRequest.ts index 4e553ccb3e..8b4768931d 100644 --- a/specification/indices/add_block/IndicesAddBlockRequest.ts +++ b/specification/indices/add_block/IndicesAddBlockRequest.ts @@ -20,6 +20,7 @@ import { RequestBase } from '@_types/Base' import { ExpandWildcards, IndexName } from '@_types/common' import { Duration } from '@_types/Time' +import { IndicesBlockOptions } from '@indices/_types/IndexSettings' /** * Add an index block. @@ -87,14 +88,3 @@ export interface Request extends RequestBase { timeout?: Duration // default: 30s } } - -export enum IndicesBlockOptions { - /** Disable metadata changes, such as closing the index. */ - metadata, - /** Disable read operations. */ - read, - /** Disable write operations and metadata changes. */ - read_only, - /** Disable write operations. However, metadata changes are still allowed. */ - write -} diff --git a/specification/indices/add_block/IndicesAddBlockResponse.ts b/specification/indices/add_block/IndicesAddBlockResponse.ts index b6b89b827f..35caca4736 100644 --- a/specification/indices/add_block/IndicesAddBlockResponse.ts +++ b/specification/indices/add_block/IndicesAddBlockResponse.ts @@ -23,11 +23,11 @@ export class Response { body: { acknowledged: boolean shards_acknowledged: boolean - indices: IndicesBlockStatus[] + indices: AddIndicesBlockStatus[] } } -export class IndicesBlockStatus { +export class AddIndicesBlockStatus { name: IndexName blocked: boolean } diff --git a/specification/indices/add_block/examples/request/IndicesAddBlockRequestExample1.yaml b/specification/indices/add_block/examples/request/IndicesAddBlockRequestExample1.yaml index 36d131f1c3..7cda8f1073 100644 --- a/specification/indices/add_block/examples/request/IndicesAddBlockRequestExample1.yaml +++ b/specification/indices/add_block/examples/request/IndicesAddBlockRequestExample1.yaml @@ -1,34 +1 @@ method_request: PUT /my-index-000001/_block/write -alternatives: - - language: Python - code: |- - resp = client.indices.add_block( - index="my-index-000001", - block="write", - ) - - language: JavaScript - code: |- - const response = await client.indices.addBlock({ - index: "my-index-000001", - block: "write", - }); - - language: Ruby - code: |- - response = client.indices.add_block( - index: "my-index-000001", - block: "write" - ) - - language: PHP - code: |- - $resp = $client->indices()->addBlock([ - "index" => "my-index-000001", - "block" => "write", - ]); - - language: curl - code: 'curl -X PUT -H "Authorization: ApiKey $ELASTIC_API_KEY" "$ELASTICSEARCH_URL/my-index-000001/_block/write"' - - language: Java - code: | - client.indices().addBlock(a -> a - .block(IndicesBlockOptions.Write) - .index("my-index-000001") - ); diff --git a/specification/indices/analyze/examples/request/indicesAnalyzeRequestExample1.yaml b/specification/indices/analyze/examples/request/indicesAnalyzeRequestExample1.yaml index bce311aa10..c2fca2f8db 100644 --- a/specification/indices/analyze/examples/request/indicesAnalyzeRequestExample1.yaml +++ b/specification/indices/analyze/examples/request/indicesAnalyzeRequestExample1.yaml @@ -5,42 +5,3 @@ description: You can apply any of the built-in analyzers to the text string with value: analyzer: standard text: this is a test -alternatives: - - language: Python - code: |- - resp = client.indices.analyze( - analyzer="standard", - text="this is a test", - ) - - language: JavaScript - code: |- - const response = await client.indices.analyze({ - analyzer: "standard", - text: "this is a test", - }); - - language: Ruby - code: |- - response = client.indices.analyze( - body: { - "analyzer": "standard", - "text": "this is a test" - } - ) - - language: PHP - code: |- - $resp = $client->indices()->analyze([ - "body" => [ - "analyzer" => "standard", - "text" => "this is a test", - ], - ]); - - language: curl - code: - 'curl -X GET -H "Authorization: ApiKey $ELASTIC_API_KEY" -H "Content-Type: application/json" -d - ''{"analyzer":"standard","text":"this is a test"}'' "$ELASTICSEARCH_URL/_analyze"' - - language: Java - code: | - client.indices().analyze(a -> a - .analyzer("standard") - .text("this is a test") - ); diff --git a/specification/indices/analyze/examples/request/indicesAnalyzeRequestExample2.yaml b/specification/indices/analyze/examples/request/indicesAnalyzeRequestExample2.yaml index ba3a163205..06a2afc3a7 100644 --- a/specification/indices/analyze/examples/request/indicesAnalyzeRequestExample2.yaml +++ b/specification/indices/analyze/examples/request/indicesAnalyzeRequestExample2.yaml @@ -7,51 +7,3 @@ value: text: - this is a test - the second text -alternatives: - - language: Python - code: |- - resp = client.indices.analyze( - analyzer="standard", - text=[ - "this is a test", - "the second text" - ], - ) - - language: JavaScript - code: |- - const response = await client.indices.analyze({ - analyzer: "standard", - text: ["this is a test", "the second text"], - }); - - language: Ruby - code: |- - response = client.indices.analyze( - body: { - "analyzer": "standard", - "text": [ - "this is a test", - "the second text" - ] - } - ) - - language: PHP - code: |- - $resp = $client->indices()->analyze([ - "body" => [ - "analyzer" => "standard", - "text" => array( - "this is a test", - "the second text", - ), - ], - ]); - - language: curl - code: - 'curl -X GET -H "Authorization: ApiKey $ELASTIC_API_KEY" -H "Content-Type: application/json" -d - ''{"analyzer":"standard","text":["this is a test","the second text"]}'' "$ELASTICSEARCH_URL/_analyze"' - - language: Java - code: | - client.indices().analyze(a -> a - .analyzer("standard") - .text(List.of("this is a test","the second text")) - ); diff --git a/specification/indices/analyze/examples/request/indicesAnalyzeRequestExample3.yaml b/specification/indices/analyze/examples/request/indicesAnalyzeRequestExample3.yaml index f354394e81..1baa348d90 100644 --- a/specification/indices/analyze/examples/request/indicesAnalyzeRequestExample3.yaml +++ b/specification/indices/analyze/examples/request/indicesAnalyzeRequestExample3.yaml @@ -11,71 +11,3 @@ value: char_filter: - html_strip text: 'this is a test' -alternatives: - - language: Python - code: |- - resp = client.indices.analyze( - tokenizer="keyword", - filter=[ - "lowercase" - ], - char_filter=[ - "html_strip" - ], - text="this is a test", - ) - - language: JavaScript - code: |- - const response = await client.indices.analyze({ - tokenizer: "keyword", - filter: ["lowercase"], - char_filter: ["html_strip"], - text: "this is a test", - }); - - language: Ruby - code: |- - response = client.indices.analyze( - body: { - "tokenizer": "keyword", - "filter": [ - "lowercase" - ], - "char_filter": [ - "html_strip" - ], - "text": "this is a test" - } - ) - - language: PHP - code: |- - $resp = $client->indices()->analyze([ - "body" => [ - "tokenizer" => "keyword", - "filter" => array( - "lowercase", - ), - "char_filter" => array( - "html_strip", - ), - "text" => "this is a test", - ], - ]); - - language: curl - code: - 'curl -X GET -H "Authorization: ApiKey $ELASTIC_API_KEY" -H "Content-Type: application/json" -d - ''{"tokenizer":"keyword","filter":["lowercase"],"char_filter":["html_strip"],"text":"this is a test"}'' - "$ELASTICSEARCH_URL/_analyze"' - - language: Java - code: | - client.indices().analyze(a -> a - .charFilter(c -> c - .name("html_strip") - ) - .filter(f -> f - .name("lowercase") - ) - .text("this is a test") - .tokenizer(t -> t - .name("keyword") - ) - ); diff --git a/specification/indices/analyze/examples/request/indicesAnalyzeRequestExample4.yaml b/specification/indices/analyze/examples/request/indicesAnalyzeRequestExample4.yaml index 12f0104485..ecbe8c8886 100644 --- a/specification/indices/analyze/examples/request/indicesAnalyzeRequestExample4.yaml +++ b/specification/indices/analyze/examples/request/indicesAnalyzeRequestExample4.yaml @@ -12,93 +12,3 @@ value: - is - this text: this is a test -alternatives: - - language: Python - code: |- - resp = client.indices.analyze( - tokenizer="whitespace", - filter=[ - "lowercase", - { - "type": "stop", - "stopwords": [ - "a", - "is", - "this" - ] - } - ], - text="this is a test", - ) - - language: JavaScript - code: |- - const response = await client.indices.analyze({ - tokenizer: "whitespace", - filter: [ - "lowercase", - { - type: "stop", - stopwords: ["a", "is", "this"], - }, - ], - text: "this is a test", - }); - - language: Ruby - code: |- - response = client.indices.analyze( - body: { - "tokenizer": "whitespace", - "filter": [ - "lowercase", - { - "type": "stop", - "stopwords": [ - "a", - "is", - "this" - ] - } - ], - "text": "this is a test" - } - ) - - language: PHP - code: |- - $resp = $client->indices()->analyze([ - "body" => [ - "tokenizer" => "whitespace", - "filter" => array( - "lowercase", - [ - "type" => "stop", - "stopwords" => array( - "a", - "is", - "this", - ), - ], - ), - "text" => "this is a test", - ], - ]); - - language: curl - code: - "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d - '{\"tokenizer\":\"whitespace\",\"filter\":[\"lowercase\",{\"type\":\"stop\",\"stopwords\":[\"a\",\"is\",\"this\"]}],\"text\":\ - \"this is a test\"}' \"$ELASTICSEARCH_URL/_analyze\"" - - language: Java - code: | - client.indices().analyze(a -> a - .filter(List.of(TokenFilter.of(t -> t - .name("lowercase" - )),TokenFilter.of(to -> to - .definition(d -> d - .stop(s -> s - .stopwords(List.of("a","is","this")) - ) - )))) - .text("this is a test") - .tokenizer(tok -> tok - .name("whitespace") - ) - ); diff --git a/specification/indices/analyze/examples/request/indicesAnalyzeRequestExample5.yaml b/specification/indices/analyze/examples/request/indicesAnalyzeRequestExample5.yaml index d07ecda06b..369f01379b 100644 --- a/specification/indices/analyze/examples/request/indicesAnalyzeRequestExample5.yaml +++ b/specification/indices/analyze/examples/request/indicesAnalyzeRequestExample5.yaml @@ -7,47 +7,3 @@ description: value: field: obj1.field1 text: this is a test -alternatives: - - language: Python - code: |- - resp = client.indices.analyze( - index="analyze_sample", - field="obj1.field1", - text="this is a test", - ) - - language: JavaScript - code: |- - const response = await client.indices.analyze({ - index: "analyze_sample", - field: "obj1.field1", - text: "this is a test", - }); - - language: Ruby - code: |- - response = client.indices.analyze( - index: "analyze_sample", - body: { - "field": "obj1.field1", - "text": "this is a test" - } - ) - - language: PHP - code: |- - $resp = $client->indices()->analyze([ - "index" => "analyze_sample", - "body" => [ - "field" => "obj1.field1", - "text" => "this is a test", - ], - ]); - - language: curl - code: - 'curl -X GET -H "Authorization: ApiKey $ELASTIC_API_KEY" -H "Content-Type: application/json" -d - ''{"field":"obj1.field1","text":"this is a test"}'' "$ELASTICSEARCH_URL/analyze_sample/_analyze"' - - language: Java - code: | - client.indices().analyze(a -> a - .field("obj1.field1") - .index("analyze_sample") - .text("this is a test") - ); diff --git a/specification/indices/analyze/examples/request/indicesAnalyzeRequestExample6.yaml b/specification/indices/analyze/examples/request/indicesAnalyzeRequestExample6.yaml index 97b79a4021..496be085dc 100644 --- a/specification/indices/analyze/examples/request/indicesAnalyzeRequestExample6.yaml +++ b/specification/indices/analyze/examples/request/indicesAnalyzeRequestExample6.yaml @@ -7,47 +7,3 @@ description: value: normalizer: my_normalizer text: BaR -alternatives: - - language: Python - code: |- - resp = client.indices.analyze( - index="analyze_sample", - normalizer="my_normalizer", - text="BaR", - ) - - language: JavaScript - code: |- - const response = await client.indices.analyze({ - index: "analyze_sample", - normalizer: "my_normalizer", - text: "BaR", - }); - - language: Ruby - code: |- - response = client.indices.analyze( - index: "analyze_sample", - body: { - "normalizer": "my_normalizer", - "text": "BaR" - } - ) - - language: PHP - code: |- - $resp = $client->indices()->analyze([ - "index" => "analyze_sample", - "body" => [ - "normalizer" => "my_normalizer", - "text" => "BaR", - ], - ]); - - language: curl - code: - 'curl -X GET -H "Authorization: ApiKey $ELASTIC_API_KEY" -H "Content-Type: application/json" -d - ''{"normalizer":"my_normalizer","text":"BaR"}'' "$ELASTICSEARCH_URL/analyze_sample/_analyze"' - - language: Java - code: | - client.indices().analyze(a -> a - .index("analyze_sample") - .normalizer("my_normalizer") - .text("BaR") - ); diff --git a/specification/indices/analyze/examples/request/indicesAnalyzeRequestExample7.yaml b/specification/indices/analyze/examples/request/indicesAnalyzeRequestExample7.yaml index e84e9134f2..22230dedaa 100644 --- a/specification/indices/analyze/examples/request/indicesAnalyzeRequestExample7.yaml +++ b/specification/indices/analyze/examples/request/indicesAnalyzeRequestExample7.yaml @@ -13,74 +13,3 @@ value: explain: true attributes: - keyword -alternatives: - - language: Python - code: |- - resp = client.indices.analyze( - tokenizer="standard", - filter=[ - "snowball" - ], - text="detailed output", - explain=True, - attributes=[ - "keyword" - ], - ) - - language: JavaScript - code: |- - const response = await client.indices.analyze({ - tokenizer: "standard", - filter: ["snowball"], - text: "detailed output", - explain: true, - attributes: ["keyword"], - }); - - language: Ruby - code: |- - response = client.indices.analyze( - body: { - "tokenizer": "standard", - "filter": [ - "snowball" - ], - "text": "detailed output", - "explain": true, - "attributes": [ - "keyword" - ] - } - ) - - language: PHP - code: |- - $resp = $client->indices()->analyze([ - "body" => [ - "tokenizer" => "standard", - "filter" => array( - "snowball", - ), - "text" => "detailed output", - "explain" => true, - "attributes" => array( - "keyword", - ), - ], - ]); - - language: curl - code: - 'curl -X GET -H "Authorization: ApiKey $ELASTIC_API_KEY" -H "Content-Type: application/json" -d - ''{"tokenizer":"standard","filter":["snowball"],"text":"detailed - output","explain":true,"attributes":["keyword"]}'' "$ELASTICSEARCH_URL/_analyze"' - - language: Java - code: | - client.indices().analyze(a -> a - .attributes("keyword") - .explain(true) - .filter(f -> f - .name("snowball") - ) - .text("detailed output") - .tokenizer(t -> t - .name("standard") - ) - ); diff --git a/specification/indices/cancel_migrate_reindex/examples/request/IndicesCancelMigrateReindexExample1.yaml b/specification/indices/cancel_migrate_reindex/examples/request/IndicesCancelMigrateReindexExample1.yaml index 82ff4ca99a..fa90c32d41 100644 --- a/specification/indices/cancel_migrate_reindex/examples/request/IndicesCancelMigrateReindexExample1.yaml +++ b/specification/indices/cancel_migrate_reindex/examples/request/IndicesCancelMigrateReindexExample1.yaml @@ -1,36 +1 @@ method_request: POST /_migration/reindex/my-data-stream/_cancel -alternatives: - - language: Python - code: |- - resp = client.perform_request( - "POST", - "/_migration/reindex/my-data-stream/_cancel", - ) - - language: JavaScript - code: |- - const response = await client.transport.request({ - method: "POST", - path: "/_migration/reindex/my-data-stream/_cancel", - }); - - language: Ruby - code: |- - response = client.perform_request( - "POST", - "/_migration/reindex/my-data-stream/_cancel", - {}, - ) - - language: PHP - code: |- - $requestFactory = Psr17FactoryDiscovery::findRequestFactory(); - $request = $requestFactory->createRequest( - "POST", - "/_migration/reindex/my-data-stream/_cancel", - ); - $resp = $client->sendRequest($request); - - language: curl - code: 'curl -X POST -H "Authorization: ApiKey $ELASTIC_API_KEY" "$ELASTICSEARCH_URL/_migration/reindex/my-data-stream/_cancel"' - - language: Java - code: | - client.indices().cancelMigrateReindex(c -> c - .index("my-data-stream") - ); diff --git a/specification/indices/clear_cache/examples/request/IndicesClearCacheExample1.yaml b/specification/indices/clear_cache/examples/request/IndicesClearCacheExample1.yaml index d89adee41d..6248e9eaea 100644 --- a/specification/indices/clear_cache/examples/request/IndicesClearCacheExample1.yaml +++ b/specification/indices/clear_cache/examples/request/IndicesClearCacheExample1.yaml @@ -1,35 +1 @@ method_request: POST /my-index-000001,my-index-000002/_cache/clear?request=true -alternatives: - - language: Python - code: |- - resp = client.indices.clear_cache( - index="my-index-000001,my-index-000002", - request=True, - ) - - language: JavaScript - code: |- - const response = await client.indices.clearCache({ - index: "my-index-000001,my-index-000002", - request: "true", - }); - - language: Ruby - code: |- - response = client.indices.clear_cache( - index: "my-index-000001,my-index-000002", - request: "true" - ) - - language: PHP - code: |- - $resp = $client->indices()->clearCache([ - "index" => "my-index-000001,my-index-000002", - "request" => "true", - ]); - - language: curl - code: 'curl -X POST -H "Authorization: ApiKey $ELASTIC_API_KEY" - "$ELASTICSEARCH_URL/my-index-000001,my-index-000002/_cache/clear?request=true"' - - language: Java - code: | - client.indices().clearCache(c -> c - .index(List.of("my-index-000001","my-index-000002")) - .request(true) - ); diff --git a/specification/indices/clone/examples/request/indicesCloneRequestExample1.yaml b/specification/indices/clone/examples/request/indicesCloneRequestExample1.yaml index dbc22b29cf..69aac20311 100644 --- a/specification/indices/clone/examples/request/indicesCloneRequestExample1.yaml +++ b/specification/indices/clone/examples/request/indicesCloneRequestExample1.yaml @@ -19,69 +19,3 @@ value: "{ \ } }" -alternatives: - - language: Python - code: |- - resp = client.indices.clone( - index="my_source_index", - target="my_target_index", - settings={ - "index.number_of_shards": 5 - }, - aliases={ - "my_search_indices": {} - }, - ) - - language: JavaScript - code: |- - const response = await client.indices.clone({ - index: "my_source_index", - target: "my_target_index", - settings: { - "index.number_of_shards": 5, - }, - aliases: { - my_search_indices: {}, - }, - }); - - language: Ruby - code: |- - response = client.indices.clone( - index: "my_source_index", - target: "my_target_index", - body: { - "settings": { - "index.number_of_shards": 5 - }, - "aliases": { - "my_search_indices": {} - } - } - ) - - language: PHP - code: |- - $resp = $client->indices()->clone([ - "index" => "my_source_index", - "target" => "my_target_index", - "body" => [ - "settings" => [ - "index.number_of_shards" => 5, - ], - "aliases" => [ - "my_search_indices" => new ArrayObject([]), - ], - ], - ]); - - language: curl - code: - 'curl -X POST -H "Authorization: ApiKey $ELASTIC_API_KEY" -H "Content-Type: application/json" -d - ''{"settings":{"index.number_of_shards":5},"aliases":{"my_search_indices":{}}}'' - "$ELASTICSEARCH_URL/my_source_index/_clone/my_target_index"' - - language: Java - code: | - client.indices().clone(c -> c - .aliases("my_search_indices", a -> a) - .index("my_source_index") - .settings("index.number_of_shards", JsonData.fromJson("5")) - .target("my_target_index") - ); diff --git a/specification/indices/close/examples/request/CloseIndexRequestExample1.yaml b/specification/indices/close/examples/request/CloseIndexRequestExample1.yaml index b5a6c3af96..aad5f50445 100644 --- a/specification/indices/close/examples/request/CloseIndexRequestExample1.yaml +++ b/specification/indices/close/examples/request/CloseIndexRequestExample1.yaml @@ -1,29 +1 @@ method_request: POST /my-index-00001/_close -alternatives: - - language: Python - code: |- - resp = client.indices.close( - index="my-index-00001", - ) - - language: JavaScript - code: |- - const response = await client.indices.close({ - index: "my-index-00001", - }); - - language: Ruby - code: |- - response = client.indices.close( - index: "my-index-00001" - ) - - language: PHP - code: |- - $resp = $client->indices()->close([ - "index" => "my-index-00001", - ]); - - language: curl - code: 'curl -X POST -H "Authorization: ApiKey $ELASTIC_API_KEY" "$ELASTICSEARCH_URL/my-index-00001/_close"' - - language: Java - code: | - client.indices().close(c -> c - .index("my-index-00001") - ); diff --git a/specification/indices/create/examples/request/indicesCreateRequestExample1.yaml b/specification/indices/create/examples/request/indicesCreateRequestExample1.yaml index daea57ccd7..e479499a52 100644 --- a/specification/indices/create/examples/request/indicesCreateRequestExample1.yaml +++ b/specification/indices/create/examples/request/indicesCreateRequestExample1.yaml @@ -13,57 +13,3 @@ value: "{ \ } }" -alternatives: - - language: Python - code: |- - resp = client.indices.create( - index="my-index-000001", - settings={ - "number_of_shards": 3, - "number_of_replicas": 2 - }, - ) - - language: JavaScript - code: |- - const response = await client.indices.create({ - index: "my-index-000001", - settings: { - number_of_shards: 3, - number_of_replicas: 2, - }, - }); - - language: Ruby - code: |- - response = client.indices.create( - index: "my-index-000001", - body: { - "settings": { - "number_of_shards": 3, - "number_of_replicas": 2 - } - } - ) - - language: PHP - code: |- - $resp = $client->indices()->create([ - "index" => "my-index-000001", - "body" => [ - "settings" => [ - "number_of_shards" => 3, - "number_of_replicas" => 2, - ], - ], - ]); - - language: curl - code: - 'curl -X PUT -H "Authorization: ApiKey $ELASTIC_API_KEY" -H "Content-Type: application/json" -d - ''{"settings":{"number_of_shards":3,"number_of_replicas":2}}'' "$ELASTICSEARCH_URL/my-index-000001"' - - language: Java - code: | - client.indices().create(c -> c - .index("my-index-000001") - .settings(s -> s - .numberOfShards("3") - .numberOfReplicas("2") - ) - ); diff --git a/specification/indices/create/examples/request/indicesCreateRequestExample2.yaml b/specification/indices/create/examples/request/indicesCreateRequestExample2.yaml index 685dafdca4..e8cd838108 100644 --- a/specification/indices/create/examples/request/indicesCreateRequestExample2.yaml +++ b/specification/indices/create/examples/request/indicesCreateRequestExample2.yaml @@ -21,86 +21,3 @@ value: "{ \ } }" -alternatives: - - language: Python - code: |- - resp = client.indices.create( - index="test", - settings={ - "number_of_shards": 1 - }, - mappings={ - "properties": { - "field1": { - "type": "text" - } - } - }, - ) - - language: JavaScript - code: |- - const response = await client.indices.create({ - index: "test", - settings: { - number_of_shards: 1, - }, - mappings: { - properties: { - field1: { - type: "text", - }, - }, - }, - }); - - language: Ruby - code: |- - response = client.indices.create( - index: "test", - body: { - "settings": { - "number_of_shards": 1 - }, - "mappings": { - "properties": { - "field1": { - "type": "text" - } - } - } - } - ) - - language: PHP - code: |- - $resp = $client->indices()->create([ - "index" => "test", - "body" => [ - "settings" => [ - "number_of_shards" => 1, - ], - "mappings" => [ - "properties" => [ - "field1" => [ - "type" => "text", - ], - ], - ], - ], - ]); - - language: curl - code: - 'curl -X PUT -H "Authorization: ApiKey $ELASTIC_API_KEY" -H "Content-Type: application/json" -d - ''{"settings":{"number_of_shards":1},"mappings":{"properties":{"field1":{"type":"text"}}}}'' - "$ELASTICSEARCH_URL/test"' - - language: Java - code: | - client.indices().create(c -> c - .index("test") - .mappings(m -> m - .properties("field1", p -> p - .text(t -> t) - ) - ) - .settings(s -> s - .numberOfShards("1") - ) - ); diff --git a/specification/indices/create/examples/request/indicesCreateRequestExample3.yaml b/specification/indices/create/examples/request/indicesCreateRequestExample3.yaml index a94e8e9f7d..3d588cf227 100644 --- a/specification/indices/create/examples/request/indicesCreateRequestExample3.yaml +++ b/specification/indices/create/examples/request/indicesCreateRequestExample3.yaml @@ -11,90 +11,3 @@ value: term: 'user.id': 'kimchy' routing: shard-1 -alternatives: - - language: Python - code: |- - resp = client.indices.create( - index="test", - aliases={ - "alias_1": {}, - "alias_2": { - "filter": { - "term": { - "user.id": "kimchy" - } - }, - "routing": "shard-1" - } - }, - ) - - language: JavaScript - code: |- - const response = await client.indices.create({ - index: "test", - aliases: { - alias_1: {}, - alias_2: { - filter: { - term: { - "user.id": "kimchy", - }, - }, - routing: "shard-1", - }, - }, - }); - - language: Ruby - code: |- - response = client.indices.create( - index: "test", - body: { - "aliases": { - "alias_1": {}, - "alias_2": { - "filter": { - "term": { - "user.id": "kimchy" - } - }, - "routing": "shard-1" - } - } - } - ) - - language: PHP - code: |- - $resp = $client->indices()->create([ - "index" => "test", - "body" => [ - "aliases" => [ - "alias_1" => new ArrayObject([]), - "alias_2" => [ - "filter" => [ - "term" => [ - "user.id" => "kimchy", - ], - ], - "routing" => "shard-1", - ], - ], - ], - ]); - - language: curl - code: - 'curl -X PUT -H "Authorization: ApiKey $ELASTIC_API_KEY" -H "Content-Type: application/json" -d - ''{"aliases":{"alias_1":{},"alias_2":{"filter":{"term":{"user.id":"kimchy"}},"routing":"shard-1"}}}'' - "$ELASTICSEARCH_URL/test"' - - language: Java - code: | - client.indices().create(c -> c - .aliases(Map.of("alias_2", Alias.of(a -> a - .filter(f -> f - .term(t -> t - .field("user.id") - .value(FieldValue.of("kimchy")) - ) - ) - .routing("shard-1")),"alias_1", Alias.of(al -> al))) - .index("test") - ); diff --git a/specification/indices/create_data_stream/examples/request/IndicesCreateDataStreamExample1.yaml b/specification/indices/create_data_stream/examples/request/IndicesCreateDataStreamExample1.yaml index 362a407597..581ceabf98 100644 --- a/specification/indices/create_data_stream/examples/request/IndicesCreateDataStreamExample1.yaml +++ b/specification/indices/create_data_stream/examples/request/IndicesCreateDataStreamExample1.yaml @@ -1,29 +1 @@ method_request: PUT _data_stream/logs-foo-bar -alternatives: - - language: Python - code: |- - resp = client.indices.create_data_stream( - name="logs-foo-bar", - ) - - language: JavaScript - code: |- - const response = await client.indices.createDataStream({ - name: "logs-foo-bar", - }); - - language: Ruby - code: |- - response = client.indices.create_data_stream( - name: "logs-foo-bar" - ) - - language: PHP - code: |- - $resp = $client->indices()->createDataStream([ - "name" => "logs-foo-bar", - ]); - - language: curl - code: 'curl -X PUT -H "Authorization: ApiKey $ELASTIC_API_KEY" "$ELASTICSEARCH_URL/_data_stream/logs-foo-bar"' - - language: Java - code: | - client.indices().createDataStream(c -> c - .name("logs-foo-bar") - ); diff --git a/specification/indices/create_from/examples/request/IndicesCreateFromExample1.yaml b/specification/indices/create_from/examples/request/IndicesCreateFromExample1.yaml index 9c5b8594fd..b8785032b0 100644 --- a/specification/indices/create_from/examples/request/IndicesCreateFromExample1.yaml +++ b/specification/indices/create_from/examples/request/IndicesCreateFromExample1.yaml @@ -1,38 +1 @@ method_request: POST _create_from/my-index/my-new-index -alternatives: - - language: Python - code: |- - resp = client.perform_request( - "POST", - "/_create_from/my-index/my-new-index", - ) - - language: JavaScript - code: |- - const response = await client.transport.request({ - method: "POST", - path: "/_create_from/my-index/my-new-index", - }); - - language: Ruby - code: |- - response = client.perform_request( - "POST", - "/_create_from/my-index/my-new-index", - {}, - ) - - language: PHP - code: |- - $requestFactory = Psr17FactoryDiscovery::findRequestFactory(); - $request = $requestFactory->createRequest( - "POST", - "/_create_from/my-index/my-new-index", - ); - $resp = $client->sendRequest($request); - - language: curl - code: 'curl -X POST -H "Authorization: ApiKey $ELASTIC_API_KEY" "$ELASTICSEARCH_URL/_create_from/my-index/my-new-index"' - - language: Java - code: | - client.indices().createFrom(c -> c - .dest("my-new-index") - .source("my-index") - .createFrom(cr -> cr) - ); diff --git a/specification/indices/data_streams_stats/examples/request/indicesDataStreamStatsExampleRequest1.yaml b/specification/indices/data_streams_stats/examples/request/indicesDataStreamStatsExampleRequest1.yaml index cfb4c81934..70600dc850 100644 --- a/specification/indices/data_streams_stats/examples/request/indicesDataStreamStatsExampleRequest1.yaml +++ b/specification/indices/data_streams_stats/examples/request/indicesDataStreamStatsExampleRequest1.yaml @@ -1,29 +1 @@ method_request: GET /_data_stream/my-index-000001/_stats -alternatives: - - language: Python - code: |- - resp = client.indices.data_streams_stats( - name="my-index-000001", - ) - - language: JavaScript - code: |- - const response = await client.indices.dataStreamsStats({ - name: "my-index-000001", - }); - - language: Ruby - code: |- - response = client.indices.data_streams_stats( - name: "my-index-000001" - ) - - language: PHP - code: |- - $resp = $client->indices()->dataStreamsStats([ - "name" => "my-index-000001", - ]); - - language: curl - code: 'curl -X GET -H "Authorization: ApiKey $ELASTIC_API_KEY" "$ELASTICSEARCH_URL/_data_stream/my-index-000001/_stats"' - - language: Java - code: | - client.indices().dataStreamsStats(d -> d - .name("my-index-000001") - ); diff --git a/specification/indices/delete/examples/request/IndicesDeleteExample1.yaml b/specification/indices/delete/examples/request/IndicesDeleteExample1.yaml index 2efde91aea..10949f3df6 100644 --- a/specification/indices/delete/examples/request/IndicesDeleteExample1.yaml +++ b/specification/indices/delete/examples/request/IndicesDeleteExample1.yaml @@ -1,29 +1 @@ method_request: DELETE /books -alternatives: - - language: Python - code: |- - resp = client.indices.delete( - index="books", - ) - - language: JavaScript - code: |- - const response = await client.indices.delete({ - index: "books", - }); - - language: Ruby - code: |- - response = client.indices.delete( - index: "books" - ) - - language: PHP - code: |- - $resp = $client->indices()->delete([ - "index" => "books", - ]); - - language: curl - code: 'curl -X DELETE -H "Authorization: ApiKey $ELASTIC_API_KEY" "$ELASTICSEARCH_URL/books"' - - language: Java - code: | - client.indices().delete(d -> d - .index("books") - ); diff --git a/specification/indices/delete_alias/IndicesDeleteAliasResponse.ts b/specification/indices/delete_alias/IndicesDeleteAliasResponse.ts index 9e7bdb91cd..6f5fe31dcd 100644 --- a/specification/indices/delete_alias/IndicesDeleteAliasResponse.ts +++ b/specification/indices/delete_alias/IndicesDeleteAliasResponse.ts @@ -21,5 +21,9 @@ import { AcknowledgedResponseBase } from '@_types/Base' export class Response { /** @codegen_name result */ - body: AcknowledgedResponseBase + body: IndicesAliasesResponseBody +} + +export class IndicesAliasesResponseBody extends AcknowledgedResponseBase { + errors?: boolean } diff --git a/specification/indices/delete_alias/examples/request/IndicesDeleteAliasExample1.yaml b/specification/indices/delete_alias/examples/request/IndicesDeleteAliasExample1.yaml index 324267982c..09bcefe59f 100644 --- a/specification/indices/delete_alias/examples/request/IndicesDeleteAliasExample1.yaml +++ b/specification/indices/delete_alias/examples/request/IndicesDeleteAliasExample1.yaml @@ -1,34 +1 @@ method_request: DELETE my-data-stream/_alias/my-alias -alternatives: - - language: Python - code: |- - resp = client.indices.delete_alias( - index="my-data-stream", - name="my-alias", - ) - - language: JavaScript - code: |- - const response = await client.indices.deleteAlias({ - index: "my-data-stream", - name: "my-alias", - }); - - language: Ruby - code: |- - response = client.indices.delete_alias( - index: "my-data-stream", - name: "my-alias" - ) - - language: PHP - code: |- - $resp = $client->indices()->deleteAlias([ - "index" => "my-data-stream", - "name" => "my-alias", - ]); - - language: curl - code: 'curl -X DELETE -H "Authorization: ApiKey $ELASTIC_API_KEY" "$ELASTICSEARCH_URL/my-data-stream/_alias/my-alias"' - - language: Java - code: | - client.indices().deleteAlias(d -> d - .index("my-data-stream") - .name("my-alias") - ); diff --git a/specification/indices/delete_data_lifecycle/examples/request/IndicesDeleteDataLifecycleExample1.yaml b/specification/indices/delete_data_lifecycle/examples/request/IndicesDeleteDataLifecycleExample1.yaml index 214e4d8f28..8674ec5b56 100644 --- a/specification/indices/delete_data_lifecycle/examples/request/IndicesDeleteDataLifecycleExample1.yaml +++ b/specification/indices/delete_data_lifecycle/examples/request/IndicesDeleteDataLifecycleExample1.yaml @@ -1,29 +1 @@ method_request: DELETE _data_stream/my-data-stream/_lifecycle -alternatives: - - language: Python - code: |- - resp = client.indices.delete_data_lifecycle( - name="my-data-stream", - ) - - language: JavaScript - code: |- - const response = await client.indices.deleteDataLifecycle({ - name: "my-data-stream", - }); - - language: Ruby - code: |- - response = client.indices.delete_data_lifecycle( - name: "my-data-stream" - ) - - language: PHP - code: |- - $resp = $client->indices()->deleteDataLifecycle([ - "name" => "my-data-stream", - ]); - - language: curl - code: 'curl -X DELETE -H "Authorization: ApiKey $ELASTIC_API_KEY" "$ELASTICSEARCH_URL/_data_stream/my-data-stream/_lifecycle"' - - language: Java - code: | - client.indices().deleteDataLifecycle(d -> d - .name("my-data-stream") - ); diff --git a/specification/indices/delete_data_stream/examples/request/IndicesDeleteDataStreamExample1.yaml b/specification/indices/delete_data_stream/examples/request/IndicesDeleteDataStreamExample1.yaml index 4f0ec82e65..67ee24ecc2 100644 --- a/specification/indices/delete_data_stream/examples/request/IndicesDeleteDataStreamExample1.yaml +++ b/specification/indices/delete_data_stream/examples/request/IndicesDeleteDataStreamExample1.yaml @@ -1,29 +1 @@ method_request: DELETE _data_stream/my-data-stream -alternatives: - - language: Python - code: |- - resp = client.indices.delete_data_stream( - name="my-data-stream", - ) - - language: JavaScript - code: |- - const response = await client.indices.deleteDataStream({ - name: "my-data-stream", - }); - - language: Ruby - code: |- - response = client.indices.delete_data_stream( - name: "my-data-stream" - ) - - language: PHP - code: |- - $resp = $client->indices()->deleteDataStream([ - "name" => "my-data-stream", - ]); - - language: curl - code: 'curl -X DELETE -H "Authorization: ApiKey $ELASTIC_API_KEY" "$ELASTICSEARCH_URL/_data_stream/my-data-stream"' - - language: Java - code: | - client.indices().deleteDataStream(d -> d - .name("my-data-stream") - ); diff --git a/specification/indices/delete_index_template/examples/request/IndicesDeleteIndexTemplateExample1.yaml b/specification/indices/delete_index_template/examples/request/IndicesDeleteIndexTemplateExample1.yaml index 06e38bf583..06c8075f21 100644 --- a/specification/indices/delete_index_template/examples/request/IndicesDeleteIndexTemplateExample1.yaml +++ b/specification/indices/delete_index_template/examples/request/IndicesDeleteIndexTemplateExample1.yaml @@ -1,29 +1 @@ method_request: DELETE /_index_template/my-index-template -alternatives: - - language: Python - code: |- - resp = client.indices.delete_index_template( - name="my-index-template", - ) - - language: JavaScript - code: |- - const response = await client.indices.deleteIndexTemplate({ - name: "my-index-template", - }); - - language: Ruby - code: |- - response = client.indices.delete_index_template( - name: "my-index-template" - ) - - language: PHP - code: |- - $resp = $client->indices()->deleteIndexTemplate([ - "name" => "my-index-template", - ]); - - language: curl - code: 'curl -X DELETE -H "Authorization: ApiKey $ELASTIC_API_KEY" "$ELASTICSEARCH_URL/_index_template/my-index-template"' - - language: Java - code: | - client.indices().deleteIndexTemplate(d -> d - .name("my-index-template") - ); diff --git a/specification/indices/delete_template/examples/request/IndicesDeleteTemplateExample1.yaml b/specification/indices/delete_template/examples/request/IndicesDeleteTemplateExample1.yaml index 5c8c54e4c2..70d02b2038 100644 --- a/specification/indices/delete_template/examples/request/IndicesDeleteTemplateExample1.yaml +++ b/specification/indices/delete_template/examples/request/IndicesDeleteTemplateExample1.yaml @@ -1,29 +1 @@ method_request: DELETE _template/.cloud-hot-warm-allocation-0 -alternatives: - - language: Python - code: |- - resp = client.indices.delete_template( - name=".cloud-hot-warm-allocation-0", - ) - - language: JavaScript - code: |- - const response = await client.indices.deleteTemplate({ - name: ".cloud-hot-warm-allocation-0", - }); - - language: Ruby - code: |- - response = client.indices.delete_template( - name: ".cloud-hot-warm-allocation-0" - ) - - language: PHP - code: |- - $resp = $client->indices()->deleteTemplate([ - "name" => ".cloud-hot-warm-allocation-0", - ]); - - language: curl - code: 'curl -X DELETE -H "Authorization: ApiKey $ELASTIC_API_KEY" "$ELASTICSEARCH_URL/_template/.cloud-hot-warm-allocation-0"' - - language: Java - code: | - client.indices().deleteTemplate(d -> d - .name(".cloud-hot-warm-allocation-0") - ); diff --git a/specification/indices/disk_usage/examples/request/IndicesDiskUsageExample1.yaml b/specification/indices/disk_usage/examples/request/IndicesDiskUsageExample1.yaml index ced06c4ac5..acfe6b7fc1 100644 --- a/specification/indices/disk_usage/examples/request/IndicesDiskUsageExample1.yaml +++ b/specification/indices/disk_usage/examples/request/IndicesDiskUsageExample1.yaml @@ -1,35 +1 @@ method_request: POST /my-index-000001/_disk_usage?run_expensive_tasks=true -alternatives: - - language: Python - code: |- - resp = client.indices.disk_usage( - index="my-index-000001", - run_expensive_tasks=True, - ) - - language: JavaScript - code: |- - const response = await client.indices.diskUsage({ - index: "my-index-000001", - run_expensive_tasks: "true", - }); - - language: Ruby - code: |- - response = client.indices.disk_usage( - index: "my-index-000001", - run_expensive_tasks: "true" - ) - - language: PHP - code: |- - $resp = $client->indices()->diskUsage([ - "index" => "my-index-000001", - "run_expensive_tasks" => "true", - ]); - - language: curl - code: 'curl -X POST -H "Authorization: ApiKey $ELASTIC_API_KEY" - "$ELASTICSEARCH_URL/my-index-000001/_disk_usage?run_expensive_tasks=true"' - - language: Java - code: | - client.indices().diskUsage(d -> d - .index("my-index-000001") - .runExpensiveTasks(true) - ); diff --git a/specification/indices/downsample/examples/request/DownsampleRequestExample1.yaml b/specification/indices/downsample/examples/request/DownsampleRequestExample1.yaml index 68faedbe78..dd2031ab8d 100644 --- a/specification/indices/downsample/examples/request/DownsampleRequestExample1.yaml +++ b/specification/indices/downsample/examples/request/DownsampleRequestExample1.yaml @@ -4,55 +4,3 @@ method_request: POST /my-time-series-index/_downsample/my-downsampled-time-serie # type: request value: fixed_interval: 1d -alternatives: - - language: Python - code: |- - resp = client.indices.downsample( - index="my-time-series-index", - target_index="my-downsampled-time-series-index", - config={ - "fixed_interval": "1d" - }, - ) - - language: JavaScript - code: |- - const response = await client.indices.downsample({ - index: "my-time-series-index", - target_index: "my-downsampled-time-series-index", - config: { - fixed_interval: "1d", - }, - }); - - language: Ruby - code: |- - response = client.indices.downsample( - index: "my-time-series-index", - target_index: "my-downsampled-time-series-index", - body: { - "fixed_interval": "1d" - } - ) - - language: PHP - code: |- - $resp = $client->indices()->downsample([ - "index" => "my-time-series-index", - "target_index" => "my-downsampled-time-series-index", - "body" => [ - "fixed_interval" => "1d", - ], - ]); - - language: curl - code: - 'curl -X POST -H "Authorization: ApiKey $ELASTIC_API_KEY" -H "Content-Type: application/json" -d - ''{"fixed_interval":"1d"}'' "$ELASTICSEARCH_URL/my-time-series-index/_downsample/my-downsampled-time-series-index"' - - language: Java - code: | - client.indices().downsample(d -> d - .index("my-time-series-index") - .targetIndex("my-downsampled-time-series-index") - .config(c -> c - .fixedInterval(f -> f - .time("1d") - ) - ) - ); diff --git a/specification/indices/exists/examples/request/IndicesExistsExample1.yaml b/specification/indices/exists/examples/request/IndicesExistsExample1.yaml index 3057e6e4ef..9e86eecb0d 100644 --- a/specification/indices/exists/examples/request/IndicesExistsExample1.yaml +++ b/specification/indices/exists/examples/request/IndicesExistsExample1.yaml @@ -1,29 +1 @@ method_request: HEAD my-data-stream -alternatives: - - language: Python - code: |- - resp = client.indices.exists( - index="my-data-stream", - ) - - language: JavaScript - code: |- - const response = await client.indices.exists({ - index: "my-data-stream", - }); - - language: Ruby - code: |- - response = client.indices.exists( - index: "my-data-stream" - ) - - language: PHP - code: |- - $resp = $client->indices()->exists([ - "index" => "my-data-stream", - ]); - - language: curl - code: 'curl --head -H "Authorization: ApiKey $ELASTIC_API_KEY" "$ELASTICSEARCH_URL/my-data-stream"' - - language: Java - code: | - client.indices().exists(e -> e - .index("my-data-stream") - ); diff --git a/specification/indices/exists_alias/examples/request/IndicesExistsAliasExample1.yaml b/specification/indices/exists_alias/examples/request/IndicesExistsAliasExample1.yaml index 588a651b36..f12774b2bc 100644 --- a/specification/indices/exists_alias/examples/request/IndicesExistsAliasExample1.yaml +++ b/specification/indices/exists_alias/examples/request/IndicesExistsAliasExample1.yaml @@ -1,29 +1 @@ method_request: HEAD _alias/my-alias -alternatives: - - language: Python - code: |- - resp = client.indices.exists_alias( - name="my-alias", - ) - - language: JavaScript - code: |- - const response = await client.indices.existsAlias({ - name: "my-alias", - }); - - language: Ruby - code: |- - response = client.indices.exists_alias( - name: "my-alias" - ) - - language: PHP - code: |- - $resp = $client->indices()->existsAlias([ - "name" => "my-alias", - ]); - - language: curl - code: 'curl --head -H "Authorization: ApiKey $ELASTIC_API_KEY" "$ELASTICSEARCH_URL/_alias/my-alias"' - - language: Java - code: | - client.indices().existsAlias(e -> e - .name("my-alias") - ); diff --git a/specification/indices/exists_index_template/IndicesExistsIndexTemplateRequest.ts b/specification/indices/exists_index_template/IndicesExistsIndexTemplateRequest.ts index 1df448e482..eed0fbcca3 100644 --- a/specification/indices/exists_index_template/IndicesExistsIndexTemplateRequest.ts +++ b/specification/indices/exists_index_template/IndicesExistsIndexTemplateRequest.ts @@ -29,6 +29,7 @@ import { Duration } from '@_types/Time' * @availability stack stability=stable * @availability serverless stability=stable visibility=public * @doc_id index-templates-exist + * @cluster_privileges manage_index_templates */ export interface Request extends RequestBase { urls: [ diff --git a/specification/indices/exists_template/examples/request/IndicesExistsTemplateExample1.yaml b/specification/indices/exists_template/examples/request/IndicesExistsTemplateExample1.yaml index d6e6c4ec97..43c13cd1f2 100644 --- a/specification/indices/exists_template/examples/request/IndicesExistsTemplateExample1.yaml +++ b/specification/indices/exists_template/examples/request/IndicesExistsTemplateExample1.yaml @@ -1,29 +1 @@ method_request: HEAD /_template/template_1 -alternatives: - - language: Python - code: |- - resp = client.indices.exists_template( - name="template_1", - ) - - language: JavaScript - code: |- - const response = await client.indices.existsTemplate({ - name: "template_1", - }); - - language: Ruby - code: |- - response = client.indices.exists_template( - name: "template_1" - ) - - language: PHP - code: |- - $resp = $client->indices()->existsTemplate([ - "name" => "template_1", - ]); - - language: curl - code: 'curl --head -H "Authorization: ApiKey $ELASTIC_API_KEY" "$ELASTICSEARCH_URL/_template/template_1"' - - language: Java - code: | - client.indices().existsTemplate(e -> e - .name("template_1") - ); diff --git a/specification/indices/explain_data_lifecycle/examples/request/IndicesExplainDataLifecycleRequestExample1.yaml b/specification/indices/explain_data_lifecycle/examples/request/IndicesExplainDataLifecycleRequestExample1.yaml index 70edef69ba..06607d1df9 100644 --- a/specification/indices/explain_data_lifecycle/examples/request/IndicesExplainDataLifecycleRequestExample1.yaml +++ b/specification/indices/explain_data_lifecycle/examples/request/IndicesExplainDataLifecycleRequestExample1.yaml @@ -1,29 +1 @@ method_request: GET .ds-metrics-2023.03.22-000001/_lifecycle/explain -alternatives: - - language: Python - code: |- - resp = client.indices.explain_data_lifecycle( - index=".ds-metrics-2023.03.22-000001", - ) - - language: JavaScript - code: |- - const response = await client.indices.explainDataLifecycle({ - index: ".ds-metrics-2023.03.22-000001", - }); - - language: Ruby - code: |- - response = client.indices.explain_data_lifecycle( - index: ".ds-metrics-2023.03.22-000001" - ) - - language: PHP - code: |- - $resp = $client->indices()->explainDataLifecycle([ - "index" => ".ds-metrics-2023.03.22-000001", - ]); - - language: curl - code: 'curl -X GET -H "Authorization: ApiKey $ELASTIC_API_KEY" "$ELASTICSEARCH_URL/.ds-metrics-2023.03.22-000001/_lifecycle/explain"' - - language: Java - code: | - client.indices().explainDataLifecycle(e -> e - .index(".ds-metrics-2023.03.22-000001") - ); diff --git a/specification/indices/field_usage_stats/examples/request/indicesFieldUsageStatsRequestExample1.yaml b/specification/indices/field_usage_stats/examples/request/indicesFieldUsageStatsRequestExample1.yaml index c78280cf5d..d12dd51252 100644 --- a/specification/indices/field_usage_stats/examples/request/indicesFieldUsageStatsRequestExample1.yaml +++ b/specification/indices/field_usage_stats/examples/request/indicesFieldUsageStatsRequestExample1.yaml @@ -1,29 +1 @@ method_request: GET /my-index-000001/_field_usage_stats -alternatives: - - language: Python - code: |- - resp = client.indices.field_usage_stats( - index="my-index-000001", - ) - - language: JavaScript - code: |- - const response = await client.indices.fieldUsageStats({ - index: "my-index-000001", - }); - - language: Ruby - code: |- - response = client.indices.field_usage_stats( - index: "my-index-000001" - ) - - language: PHP - code: |- - $resp = $client->indices()->fieldUsageStats([ - "index" => "my-index-000001", - ]); - - language: curl - code: 'curl -X GET -H "Authorization: ApiKey $ELASTIC_API_KEY" "$ELASTICSEARCH_URL/my-index-000001/_field_usage_stats"' - - language: Java - code: | - client.indices().fieldUsageStats(f -> f - .index("my-index-000001") - ); diff --git a/specification/indices/flush/examples/request/IndicesFlushExample1.yaml b/specification/indices/flush/examples/request/IndicesFlushExample1.yaml index 940efa87b2..b468f6de6a 100644 --- a/specification/indices/flush/examples/request/IndicesFlushExample1.yaml +++ b/specification/indices/flush/examples/request/IndicesFlushExample1.yaml @@ -1,15 +1 @@ method_request: POST /_flush -alternatives: - - language: Python - code: resp = client.indices.flush() - - language: JavaScript - code: const response = await client.indices.flush(); - - language: Ruby - code: response = client.indices.flush - - language: PHP - code: $resp = $client->indices()->flush(); - - language: curl - code: 'curl -X POST -H "Authorization: ApiKey $ELASTIC_API_KEY" "$ELASTICSEARCH_URL/_flush"' - - language: Java - code: | - client.indices().flush(f -> f); diff --git a/specification/indices/forcemerge/examples/request/IndicesForcemergeExample1.yaml b/specification/indices/forcemerge/examples/request/IndicesForcemergeExample1.yaml index 71d8738284..e98db0f9f9 100644 --- a/specification/indices/forcemerge/examples/request/IndicesForcemergeExample1.yaml +++ b/specification/indices/forcemerge/examples/request/IndicesForcemergeExample1.yaml @@ -1,29 +1 @@ method_request: POST my-index-000001/_forcemerge -alternatives: - - language: Python - code: |- - resp = client.indices.forcemerge( - index="my-index-000001", - ) - - language: JavaScript - code: |- - const response = await client.indices.forcemerge({ - index: "my-index-000001", - }); - - language: Ruby - code: |- - response = client.indices.forcemerge( - index: "my-index-000001" - ) - - language: PHP - code: |- - $resp = $client->indices()->forcemerge([ - "index" => "my-index-000001", - ]); - - language: curl - code: 'curl -X POST -H "Authorization: ApiKey $ELASTIC_API_KEY" "$ELASTICSEARCH_URL/my-index-000001/_forcemerge"' - - language: Java - code: | - client.indices().forcemerge(f -> f - .index("my-index-000001") - ); diff --git a/specification/indices/get/examples/request/IndicesGetExample1.yaml b/specification/indices/get/examples/request/IndicesGetExample1.yaml index b8ba008109..c39e42ebae 100644 --- a/specification/indices/get/examples/request/IndicesGetExample1.yaml +++ b/specification/indices/get/examples/request/IndicesGetExample1.yaml @@ -1,29 +1 @@ method_request: GET /my-index-000001 -alternatives: - - language: Python - code: |- - resp = client.indices.get( - index="my-index-000001", - ) - - language: JavaScript - code: |- - const response = await client.indices.get({ - index: "my-index-000001", - }); - - language: Ruby - code: |- - response = client.indices.get( - index: "my-index-000001" - ) - - language: PHP - code: |- - $resp = $client->indices()->get([ - "index" => "my-index-000001", - ]); - - language: curl - code: 'curl -X GET -H "Authorization: ApiKey $ELASTIC_API_KEY" "$ELASTICSEARCH_URL/my-index-000001"' - - language: Java - code: | - client.indices().get(g -> g - .index("my-index-000001") - ); diff --git a/specification/indices/get_alias/IndicesGetAliasResponse.ts b/specification/indices/get_alias/IndicesGetAliasResponse.ts index ddc1676942..0c3831e196 100644 --- a/specification/indices/get_alias/IndicesGetAliasResponse.ts +++ b/specification/indices/get_alias/IndicesGetAliasResponse.ts @@ -19,8 +19,10 @@ import { ErrorResponseBase } from '@_types/Base' import { IndexName } from '@_types/common' -import { AliasDefinition } from '@indices/_types/AliasDefinition' -import { AdditionalProperties } from '@spec_utils/behaviors' +import { + IndexAliases, + NotFoundAliases +} from '@indices/get_alias/_types/response' import { Dictionary } from '@spec_utils/Dictionary' export class Response { @@ -33,12 +35,3 @@ export class Response { } ] } - -export class IndexAliases { - aliases: Dictionary -} - -class NotFoundAliases implements AdditionalProperties { - error: string - status: number -} diff --git a/specification/indices/get_alias/_types/response.ts b/specification/indices/get_alias/_types/response.ts new file mode 100644 index 0000000000..99ba788fe7 --- /dev/null +++ b/specification/indices/get_alias/_types/response.ts @@ -0,0 +1,36 @@ +/* + * 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. + */ + +import { AliasDefinition } from '@indices/_types/AliasDefinition' +import { AdditionalProperties } from '@spec_utils/behaviors' +import { Dictionary } from '@spec_utils/Dictionary' + +export class IndexAliases { + aliases: Dictionary +} + +/** + * @behavior_meta AdditionalProperties fieldname=aliases description="The index aliases" + */ +export class NotFoundAliases + implements AdditionalProperties +{ + error: string + status: number +} diff --git a/specification/indices/get_alias/examples/request/IndicesGetAliasExample1.yaml b/specification/indices/get_alias/examples/request/IndicesGetAliasExample1.yaml index 9cca21eb0a..b66ab2688d 100644 --- a/specification/indices/get_alias/examples/request/IndicesGetAliasExample1.yaml +++ b/specification/indices/get_alias/examples/request/IndicesGetAliasExample1.yaml @@ -1,15 +1 @@ method_request: GET _alias -alternatives: - - language: Python - code: resp = client.indices.get_alias() - - language: JavaScript - code: const response = await client.indices.getAlias(); - - language: Ruby - code: response = client.indices.get_alias - - language: PHP - code: $resp = $client->indices()->getAlias(); - - language: curl - code: 'curl -X GET -H "Authorization: ApiKey $ELASTIC_API_KEY" "$ELASTICSEARCH_URL/_alias"' - - language: Java - code: | - client.indices().getAlias(g -> g); diff --git a/specification/indices/get_data_lifecycle/examples/request/IndicesGetDataLifecycleRequestExample1.yaml b/specification/indices/get_data_lifecycle/examples/request/IndicesGetDataLifecycleRequestExample1.yaml index 14e2e03e9b..042401e844 100644 --- a/specification/indices/get_data_lifecycle/examples/request/IndicesGetDataLifecycleRequestExample1.yaml +++ b/specification/indices/get_data_lifecycle/examples/request/IndicesGetDataLifecycleRequestExample1.yaml @@ -1,34 +1 @@ method_request: GET /_data_stream/{name}/_lifecycle?human&pretty -alternatives: - - language: Python - code: |- - resp = client.indices.get_data_lifecycle( - name="{name}", - human=True, - pretty=True, - ) - - language: JavaScript - code: |- - const response = await client.indices.getDataLifecycle({ - name: "{name}", - human: "true", - pretty: "true", - }); - - language: Ruby - code: |- - response = client.indices.get_data_lifecycle( - name: "{name}", - human: "true", - pretty: "true" - ) - - language: PHP - code: |- - $resp = $client->indices()->getDataLifecycle([ - "name" => "{name}", - "human" => "true", - "pretty" => "true", - ]); - - language: curl - code: 'curl -X GET -H "Authorization: ApiKey $ELASTIC_API_KEY" "$ELASTICSEARCH_URL/_data_stream/%7Bname%7D/_lifecycle?human&pretty"' - - language: Java - code: "\n" diff --git a/specification/indices/get_data_lifecycle_stats/examples/request/IndicesGetDataLifecycleStatsRequestExample1.yaml b/specification/indices/get_data_lifecycle_stats/examples/request/IndicesGetDataLifecycleStatsRequestExample1.yaml index afda1ba46b..b88c7221f5 100644 --- a/specification/indices/get_data_lifecycle_stats/examples/request/IndicesGetDataLifecycleStatsRequestExample1.yaml +++ b/specification/indices/get_data_lifecycle_stats/examples/request/IndicesGetDataLifecycleStatsRequestExample1.yaml @@ -1,31 +1 @@ method_request: GET _lifecycle/stats?human&pretty -alternatives: - - language: Python - code: |- - resp = client.indices.get_data_lifecycle_stats( - human=True, - pretty=True, - ) - - language: JavaScript - code: |- - const response = await client.indices.getDataLifecycleStats({ - human: "true", - pretty: "true", - }); - - language: Ruby - code: |- - response = client.indices.get_data_lifecycle_stats( - human: "true", - pretty: "true" - ) - - language: PHP - code: |- - $resp = $client->indices()->getDataLifecycleStats([ - "human" => "true", - "pretty" => "true", - ]); - - language: curl - code: 'curl -X GET -H "Authorization: ApiKey $ELASTIC_API_KEY" "$ELASTICSEARCH_URL/_lifecycle/stats?human&pretty"' - - language: Java - code: | - client.indices().getDataLifecycleStats(); diff --git a/specification/indices/get_data_stream/examples/request/IndicesGetDataStreamExample1.yaml b/specification/indices/get_data_stream/examples/request/IndicesGetDataStreamExample1.yaml index b916d55d00..495dc0a360 100644 --- a/specification/indices/get_data_stream/examples/request/IndicesGetDataStreamExample1.yaml +++ b/specification/indices/get_data_stream/examples/request/IndicesGetDataStreamExample1.yaml @@ -1,29 +1 @@ method_request: GET _data_stream/my-data-stream -alternatives: - - language: Python - code: |- - resp = client.indices.get_data_stream( - name="my-data-stream", - ) - - language: JavaScript - code: |- - const response = await client.indices.getDataStream({ - name: "my-data-stream", - }); - - language: Ruby - code: |- - response = client.indices.get_data_stream( - name: "my-data-stream" - ) - - language: PHP - code: |- - $resp = $client->indices()->getDataStream([ - "name" => "my-data-stream", - ]); - - language: curl - code: 'curl -X GET -H "Authorization: ApiKey $ELASTIC_API_KEY" "$ELASTICSEARCH_URL/_data_stream/my-data-stream"' - - language: Java - code: | - client.indices().getDataStream(g -> g - .name("my-data-stream") - ); diff --git a/specification/indices/get_data_stream_settings/examples/request/IndicesGetDataStreamSettingsRequestExample1.yaml b/specification/indices/get_data_stream_settings/examples/request/IndicesGetDataStreamSettingsRequestExample1.yaml index dc73154c8f..851227fe07 100644 --- a/specification/indices/get_data_stream_settings/examples/request/IndicesGetDataStreamSettingsRequestExample1.yaml +++ b/specification/indices/get_data_stream_settings/examples/request/IndicesGetDataStreamSettingsRequestExample1.yaml @@ -1,24 +1 @@ method_request: GET /_data_stream/my-data-stream/_settings -alternatives: - - language: Python - code: |- - resp = client.indices.get_data_stream_settings( - name="my-data-stream", - ) - - language: JavaScript - code: |- - const response = await client.indices.getDataStreamSettings({ - name: "my-data-stream", - }); - - language: Ruby - code: |- - response = client.indices.get_data_stream_settings( - name: "my-data-stream" - ) - - language: PHP - code: |- - $resp = $client->indices()->getDataStreamSettings([ - "name" => "my-data-stream", - ]); - - language: curl - code: 'curl -X GET -H "Authorization: ApiKey $ELASTIC_API_KEY" "$ELASTICSEARCH_URL/_data_stream/my-data-stream/_settings"' diff --git a/specification/indices/get_field_mapping/examples/request/indicesGetFieldMappingRequestExample1.yaml b/specification/indices/get_field_mapping/examples/request/indicesGetFieldMappingRequestExample1.yaml index a32f9f8faa..0b53a8f71e 100644 --- a/specification/indices/get_field_mapping/examples/request/indicesGetFieldMappingRequestExample1.yaml +++ b/specification/indices/get_field_mapping/examples/request/indicesGetFieldMappingRequestExample1.yaml @@ -1,34 +1 @@ method_request: GET publications/_mapping/field/title -alternatives: - - language: Python - code: |- - resp = client.indices.get_field_mapping( - index="publications", - fields="title", - ) - - language: JavaScript - code: |- - const response = await client.indices.getFieldMapping({ - index: "publications", - fields: "title", - }); - - language: Ruby - code: |- - response = client.indices.get_field_mapping( - index: "publications", - fields: "title" - ) - - language: PHP - code: |- - $resp = $client->indices()->getFieldMapping([ - "index" => "publications", - "fields" => "title", - ]); - - language: curl - code: 'curl -X GET -H "Authorization: ApiKey $ELASTIC_API_KEY" "$ELASTICSEARCH_URL/publications/_mapping/field/title"' - - language: Java - code: | - client.indices().getFieldMapping(g -> g - .fields("title") - .index("publications") - ); diff --git a/specification/indices/get_index_template/examples/request/IndicesGetIndexTemplateExample1.yaml b/specification/indices/get_index_template/examples/request/IndicesGetIndexTemplateExample1.yaml index efa291e026..7da08c271e 100644 --- a/specification/indices/get_index_template/examples/request/IndicesGetIndexTemplateExample1.yaml +++ b/specification/indices/get_index_template/examples/request/IndicesGetIndexTemplateExample1.yaml @@ -1,33 +1,2 @@ method_request: GET _index_template/*?filter_path=index_templates.name,index_templates.index_template.index_patterns,index_templates.index_template.data_stream -alternatives: - - language: Python - code: >- - resp = client.indices.get_index_template( - name="*", - filter_path="index_templates.name,index_templates.index_template.index_patterns,index_templates.index_template.data_stream", - ) - - language: JavaScript - code: |- - const response = await client.indices.getIndexTemplate({ - name: "*", - filter_path: - "index_templates.name,index_templates.index_template.index_patterns,index_templates.index_template.data_stream", - }); - - language: Ruby - code: |- - response = client.indices.get_index_template( - name: "*", - filter_path: "index_templates.name,index_templates.index_template.index_patterns,index_templates.index_template.data_stream" - ) - - language: PHP - code: >- - $resp = $client->indices()->getIndexTemplate([ - "name" => "*", - "filter_path" => "index_templates.name,index_templates.index_template.index_patterns,index_templates.index_template.data_stream", - ]); - - language: curl - code: 'curl -X GET -H "Authorization: ApiKey $ELASTIC_API_KEY" - "$ELASTICSEARCH_URL/_index_template/*?filter_path=index_templates.name,index_templates.index_template.index_patterns,index_templates.index_template.data_stream"' - - language: Java - code: "\n" diff --git a/specification/indices/get_mapping/examples/request/IndicesGetMappingExample1.yaml b/specification/indices/get_mapping/examples/request/IndicesGetMappingExample1.yaml index 358862d9dd..11e3f68060 100644 --- a/specification/indices/get_mapping/examples/request/IndicesGetMappingExample1.yaml +++ b/specification/indices/get_mapping/examples/request/IndicesGetMappingExample1.yaml @@ -1,29 +1 @@ method_request: GET /books/_mapping -alternatives: - - language: Python - code: |- - resp = client.indices.get_mapping( - index="books", - ) - - language: JavaScript - code: |- - const response = await client.indices.getMapping({ - index: "books", - }); - - language: Ruby - code: |- - response = client.indices.get_mapping( - index: "books" - ) - - language: PHP - code: |- - $resp = $client->indices()->getMapping([ - "index" => "books", - ]); - - language: curl - code: 'curl -X GET -H "Authorization: ApiKey $ELASTIC_API_KEY" "$ELASTICSEARCH_URL/books/_mapping"' - - language: Java - code: | - client.indices().getMapping(g -> g - .index("books") - ); diff --git a/specification/indices/get_migrate_reindex_status/examples/request/IndicesGetMigrateReindexStatusExample1.yaml b/specification/indices/get_migrate_reindex_status/examples/request/IndicesGetMigrateReindexStatusExample1.yaml index 6448a60755..49dec01b92 100644 --- a/specification/indices/get_migrate_reindex_status/examples/request/IndicesGetMigrateReindexStatusExample1.yaml +++ b/specification/indices/get_migrate_reindex_status/examples/request/IndicesGetMigrateReindexStatusExample1.yaml @@ -1,36 +1 @@ method_request: GET /_migration/reindex/my-data-stream/_status -alternatives: - - language: Python - code: |- - resp = client.perform_request( - "GET", - "/_migration/reindex/my-data-stream/_status", - ) - - language: JavaScript - code: |- - const response = await client.transport.request({ - method: "GET", - path: "/_migration/reindex/my-data-stream/_status", - }); - - language: Ruby - code: |- - response = client.perform_request( - "GET", - "/_migration/reindex/my-data-stream/_status", - {}, - ) - - language: PHP - code: |- - $requestFactory = Psr17FactoryDiscovery::findRequestFactory(); - $request = $requestFactory->createRequest( - "GET", - "/_migration/reindex/my-data-stream/_status", - ); - $resp = $client->sendRequest($request); - - language: curl - code: 'curl -X GET -H "Authorization: ApiKey $ELASTIC_API_KEY" "$ELASTICSEARCH_URL/_migration/reindex/my-data-stream/_status"' - - language: Java - code: | - client.indices().getMigrateReindexStatus(g -> g - .index("my-data-stream") - ); diff --git a/specification/indices/get_settings/examples/request/IndicesGetSettingsExample1.yaml b/specification/indices/get_settings/examples/request/IndicesGetSettingsExample1.yaml index 3dcc2c10fd..758c778a74 100644 --- a/specification/indices/get_settings/examples/request/IndicesGetSettingsExample1.yaml +++ b/specification/indices/get_settings/examples/request/IndicesGetSettingsExample1.yaml @@ -1,33 +1 @@ method_request: GET _all/_settings?expand_wildcards=all&filter_path=*.settings.index.*.slowlog -alternatives: - - language: Python - code: |- - resp = client.indices.get_settings( - index="_all", - expand_wildcards="all", - filter_path="*.settings.index.*.slowlog", - ) - - language: JavaScript - code: |- - const response = await client.indices.getSettings({ - index: "_all", - expand_wildcards: "all", - filter_path: "*.settings.index.*.slowlog", - }); - - language: Ruby - code: |- - response = client.indices.get_settings( - index: "_all", - expand_wildcards: "all", - filter_path: "*.settings.index.*.slowlog" - ) - - language: PHP - code: |- - $resp = $client->indices()->getSettings([ - "index" => "_all", - "expand_wildcards" => "all", - "filter_path" => "*.settings.index.*.slowlog", - ]); - - language: curl - code: 'curl -X GET -H "Authorization: ApiKey $ELASTIC_API_KEY" - "$ELASTICSEARCH_URL/_all/_settings?expand_wildcards=all&filter_path=*.settings.index.*.slowlog"' diff --git a/specification/indices/get_template/examples/request/IndicesGetTemplateExample1.yaml b/specification/indices/get_template/examples/request/IndicesGetTemplateExample1.yaml index 2c322ad186..56ea37d583 100644 --- a/specification/indices/get_template/examples/request/IndicesGetTemplateExample1.yaml +++ b/specification/indices/get_template/examples/request/IndicesGetTemplateExample1.yaml @@ -1,29 +1 @@ method_request: GET /_template/.monitoring-* -alternatives: - - language: Python - code: |- - resp = client.indices.get_template( - name=".monitoring-*", - ) - - language: JavaScript - code: |- - const response = await client.indices.getTemplate({ - name: ".monitoring-*", - }); - - language: Ruby - code: |- - response = client.indices.get_template( - name: ".monitoring-*" - ) - - language: PHP - code: |- - $resp = $client->indices()->getTemplate([ - "name" => ".monitoring-*", - ]); - - language: curl - code: 'curl -X GET -H "Authorization: ApiKey $ELASTIC_API_KEY" "$ELASTICSEARCH_URL/_template/.monitoring-*"' - - language: Java - code: | - client.indices().getTemplate(g -> g - .name(".monitoring-*") - ); diff --git a/specification/indices/migrate_reindex/examples/request/IndicesMigrateReindexExample1.yaml b/specification/indices/migrate_reindex/examples/request/IndicesMigrateReindexExample1.yaml index 7de2544472..348eb287e2 100644 --- a/specification/indices/migrate_reindex/examples/request/IndicesMigrateReindexExample1.yaml +++ b/specification/indices/migrate_reindex/examples/request/IndicesMigrateReindexExample1.yaml @@ -7,75 +7,3 @@ value: |- }, "mode": "upgrade" } -alternatives: - - language: Python - code: |- - resp = client.perform_request( - "POST", - "/_migration/reindex", - headers={"Content-Type": "application/json"}, - body={ - "source": { - "index": "my-data-stream" - }, - "mode": "upgrade" - }, - ) - - language: JavaScript - code: |- - const response = await client.transport.request({ - method: "POST", - path: "/_migration/reindex", - body: { - source: { - index: "my-data-stream", - }, - mode: "upgrade", - }, - }); - - language: Ruby - code: |- - response = client.perform_request( - "POST", - "/_migration/reindex", - {}, - { - "source": { - "index": "my-data-stream" - }, - "mode": "upgrade" - }, - { "Content-Type": "application/json" }, - ) - - language: PHP - code: |- - $requestFactory = Psr17FactoryDiscovery::findRequestFactory(); - $streamFactory = Psr17FactoryDiscovery::findStreamFactory(); - $request = $requestFactory->createRequest( - "POST", - "/_migration/reindex", - ); - $request = $request->withHeader("Content-Type", "application/json"); - $request = $request->withBody($streamFactory->createStream( - json_encode([ - "source" => [ - "index" => "my-data-stream", - ], - "mode" => "upgrade", - ]), - )); - $resp = $client->sendRequest($request); - - language: curl - code: - 'curl -X POST -H "Authorization: ApiKey $ELASTIC_API_KEY" -H "Content-Type: application/json" -d - ''{"source":{"index":"my-data-stream"},"mode":"upgrade"}'' "$ELASTICSEARCH_URL/_migration/reindex"' - - language: Java - code: | - client.indices().migrateReindex(m -> m - .reindex(r -> r - .mode(ModeEnum.Upgrade) - .source(s -> s - .index("my-data-stream") - ) - ) - ); diff --git a/specification/indices/migrate_to_data_stream/examples/request/IndicesMigrateToDataStreamExample1.yaml b/specification/indices/migrate_to_data_stream/examples/request/IndicesMigrateToDataStreamExample1.yaml index 1a3c470182..27260c12a3 100644 --- a/specification/indices/migrate_to_data_stream/examples/request/IndicesMigrateToDataStreamExample1.yaml +++ b/specification/indices/migrate_to_data_stream/examples/request/IndicesMigrateToDataStreamExample1.yaml @@ -1,29 +1 @@ method_request: POST _data_stream/_migrate/my-time-series-data -alternatives: - - language: Python - code: |- - resp = client.indices.migrate_to_data_stream( - name="my-time-series-data", - ) - - language: JavaScript - code: |- - const response = await client.indices.migrateToDataStream({ - name: "my-time-series-data", - }); - - language: Ruby - code: |- - response = client.indices.migrate_to_data_stream( - name: "my-time-series-data" - ) - - language: PHP - code: |- - $resp = $client->indices()->migrateToDataStream([ - "name" => "my-time-series-data", - ]); - - language: curl - code: 'curl -X POST -H "Authorization: ApiKey $ELASTIC_API_KEY" "$ELASTICSEARCH_URL/_data_stream/_migrate/my-time-series-data"' - - language: Java - code: | - client.indices().migrateToDataStream(m -> m - .name("my-time-series-data") - ); diff --git a/specification/indices/modify_data_stream/examples/request/IndicesModifyDataStreamExample1.yaml b/specification/indices/modify_data_stream/examples/request/IndicesModifyDataStreamExample1.yaml index 85ff71c813..d8778d8f14 100644 --- a/specification/indices/modify_data_stream/examples/request/IndicesModifyDataStreamExample1.yaml +++ b/specification/indices/modify_data_stream/examples/request/IndicesModifyDataStreamExample1.yaml @@ -17,99 +17,3 @@ value: |- } ] } -alternatives: - - language: Python - code: |- - resp = client.indices.modify_data_stream( - actions=[ - { - "remove_backing_index": { - "data_stream": "my-data-stream", - "index": ".ds-my-data-stream-2023.07.26-000001" - } - }, - { - "add_backing_index": { - "data_stream": "my-data-stream", - "index": ".ds-my-data-stream-2023.07.26-000001-downsample" - } - } - ], - ) - - language: JavaScript - code: |- - const response = await client.indices.modifyDataStream({ - actions: [ - { - remove_backing_index: { - data_stream: "my-data-stream", - index: ".ds-my-data-stream-2023.07.26-000001", - }, - }, - { - add_backing_index: { - data_stream: "my-data-stream", - index: ".ds-my-data-stream-2023.07.26-000001-downsample", - }, - }, - ], - }); - - language: Ruby - code: |- - response = client.indices.modify_data_stream( - body: { - "actions": [ - { - "remove_backing_index": { - "data_stream": "my-data-stream", - "index": ".ds-my-data-stream-2023.07.26-000001" - } - }, - { - "add_backing_index": { - "data_stream": "my-data-stream", - "index": ".ds-my-data-stream-2023.07.26-000001-downsample" - } - } - ] - } - ) - - language: PHP - code: |- - $resp = $client->indices()->modifyDataStream([ - "body" => [ - "actions" => array( - [ - "remove_backing_index" => [ - "data_stream" => "my-data-stream", - "index" => ".ds-my-data-stream-2023.07.26-000001", - ], - ], - [ - "add_backing_index" => [ - "data_stream" => "my-data-stream", - "index" => ".ds-my-data-stream-2023.07.26-000001-downsample", - ], - ], - ), - ], - ]); - - language: curl - code: - "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d - '{\"actions\":[{\"remove_backing_index\":{\"data_stream\":\"my-data-stream\",\"index\":\".ds-my-data-stream-2023.07.26-000001\ - \"}},{\"add_backing_index\":{\"data_stream\":\"my-data-stream\",\"index\":\".ds-my-data-stream-2023.07.26-000001-downsample\"\ - }}]}' \"$ELASTICSEARCH_URL/_data_stream/_modify\"" - - language: Java - code: | - client.indices().modifyDataStream(m -> m - .actions(List.of(Action.of(a -> a - .removeBackingIndex(r -> r - .dataStream("my-data-stream") - .index(".ds-my-data-stream-2023.07.26-000001") - )),Action.of(ac -> ac - .addBackingIndex(ad -> ad - .dataStream("my-data-stream") - .index(".ds-my-data-stream-2023.07.26-000001-downsample") - )))) - ); diff --git a/specification/indices/open/examples/request/IndicesOpenExample1.yaml b/specification/indices/open/examples/request/IndicesOpenExample1.yaml index 059e3e98d9..d201e97a27 100644 --- a/specification/indices/open/examples/request/IndicesOpenExample1.yaml +++ b/specification/indices/open/examples/request/IndicesOpenExample1.yaml @@ -1,29 +1 @@ method_request: POST /.ds-my-data-stream-2099.03.07-000001/_open/ -alternatives: - - language: Python - code: |- - resp = client.indices.open( - index=".ds-my-data-stream-2099.03.07-000001", - ) - - language: JavaScript - code: |- - const response = await client.indices.open({ - index: ".ds-my-data-stream-2099.03.07-000001", - }); - - language: Ruby - code: |- - response = client.indices.open( - index: ".ds-my-data-stream-2099.03.07-000001" - ) - - language: PHP - code: |- - $resp = $client->indices()->open([ - "index" => ".ds-my-data-stream-2099.03.07-000001", - ]); - - language: curl - code: 'curl -X POST -H "Authorization: ApiKey $ELASTIC_API_KEY" "$ELASTICSEARCH_URL/.ds-my-data-stream-2099.03.07-000001/_open/"' - - language: Java - code: | - client.indices().open(o -> o - .index(".ds-my-data-stream-2099.03.07-000001") - ); diff --git a/specification/indices/promote_data_stream/examples/request/IndicesPromoteDataStreamExample1.yaml b/specification/indices/promote_data_stream/examples/request/IndicesPromoteDataStreamExample1.yaml index bc45cf8e8c..dc8d38ea6c 100644 --- a/specification/indices/promote_data_stream/examples/request/IndicesPromoteDataStreamExample1.yaml +++ b/specification/indices/promote_data_stream/examples/request/IndicesPromoteDataStreamExample1.yaml @@ -1,29 +1 @@ method_request: POST /_data_stream/_promote/my-data-stream -alternatives: - - language: Python - code: |- - resp = client.indices.promote_data_stream( - name="my-data-stream", - ) - - language: JavaScript - code: |- - const response = await client.indices.promoteDataStream({ - name: "my-data-stream", - }); - - language: Ruby - code: |- - response = client.indices.promote_data_stream( - name: "my-data-stream" - ) - - language: PHP - code: |- - $resp = $client->indices()->promoteDataStream([ - "name" => "my-data-stream", - ]); - - language: curl - code: 'curl -X POST -H "Authorization: ApiKey $ELASTIC_API_KEY" "$ELASTICSEARCH_URL/_data_stream/_promote/my-data-stream"' - - language: Java - code: | - client.indices().promoteDataStream(p -> p - .name("my-data-stream") - ); diff --git a/specification/indices/put_alias/examples/request/indicesPutAliasRequestExample1.yaml b/specification/indices/put_alias/examples/request/indicesPutAliasRequestExample1.yaml index 3f56492043..0fb6621d7c 100644 --- a/specification/indices/put_alias/examples/request/indicesPutAliasRequestExample1.yaml +++ b/specification/indices/put_alias/examples/request/indicesPutAliasRequestExample1.yaml @@ -21,70 +21,3 @@ value: "{ \ ] }" -alternatives: - - language: Python - code: |- - resp = client.indices.update_aliases( - actions=[ - { - "add": { - "index": "my-data-stream", - "alias": "my-alias" - } - } - ], - ) - - language: JavaScript - code: |- - const response = await client.indices.updateAliases({ - actions: [ - { - add: { - index: "my-data-stream", - alias: "my-alias", - }, - }, - ], - }); - - language: Ruby - code: |- - response = client.indices.update_aliases( - body: { - "actions": [ - { - "add": { - "index": "my-data-stream", - "alias": "my-alias" - } - } - ] - } - ) - - language: PHP - code: |- - $resp = $client->indices()->updateAliases([ - "body" => [ - "actions" => array( - [ - "add" => [ - "index" => "my-data-stream", - "alias" => "my-alias", - ], - ], - ), - ], - ]); - - language: curl - code: - 'curl -X POST -H "Authorization: ApiKey $ELASTIC_API_KEY" -H "Content-Type: application/json" -d - ''{"actions":[{"add":{"index":"my-data-stream","alias":"my-alias"}}]}'' "$ELASTICSEARCH_URL/_aliases"' - - language: Java - code: | - client.indices().updateAliases(u -> u - .actions(a -> a - .add(ad -> ad - .alias("my-alias") - .index("my-data-stream") - ) - ) - ); diff --git a/specification/indices/put_data_lifecycle/examples/request/IndicesPutDataLifecycleRequestExample1.yaml b/specification/indices/put_data_lifecycle/examples/request/IndicesPutDataLifecycleRequestExample1.yaml index bafd45e7bf..19c498df7d 100644 --- a/specification/indices/put_data_lifecycle/examples/request/IndicesPutDataLifecycleRequestExample1.yaml +++ b/specification/indices/put_data_lifecycle/examples/request/IndicesPutDataLifecycleRequestExample1.yaml @@ -3,44 +3,3 @@ method_request: PUT _data_stream/my-data-stream/_lifecycle # description: Sets the lifecycle of a data stream. # type: request value: "{\n \"data_retention\": \"7d\"\n}" -alternatives: - - language: Python - code: |- - resp = client.indices.put_data_lifecycle( - name="my-data-stream", - data_retention="7d", - ) - - language: JavaScript - code: |- - const response = await client.indices.putDataLifecycle({ - name: "my-data-stream", - data_retention: "7d", - }); - - language: Ruby - code: |- - response = client.indices.put_data_lifecycle( - name: "my-data-stream", - body: { - "data_retention": "7d" - } - ) - - language: PHP - code: |- - $resp = $client->indices()->putDataLifecycle([ - "name" => "my-data-stream", - "body" => [ - "data_retention" => "7d", - ], - ]); - - language: curl - code: - 'curl -X PUT -H "Authorization: ApiKey $ELASTIC_API_KEY" -H "Content-Type: application/json" -d - ''{"data_retention":"7d"}'' "$ELASTICSEARCH_URL/_data_stream/my-data-stream/_lifecycle"' - - language: Java - code: | - client.indices().putDataLifecycle(p -> p - .dataRetention(d -> d - .time("7d") - ) - .name("my-data-stream") - ); diff --git a/specification/indices/put_data_lifecycle/examples/request/IndicesPutDataLifecycleRequestExample2.yaml b/specification/indices/put_data_lifecycle/examples/request/IndicesPutDataLifecycleRequestExample2.yaml index c3b5d682de..2eeba4ab5d 100644 --- a/specification/indices/put_data_lifecycle/examples/request/IndicesPutDataLifecycleRequestExample2.yaml +++ b/specification/indices/put_data_lifecycle/examples/request/IndicesPutDataLifecycleRequestExample2.yaml @@ -25,73 +25,3 @@ value: "{ \ ] }" -alternatives: - - language: Python - code: |- - resp = client.indices.put_data_lifecycle( - name="my-weather-sensor-data-stream", - downsampling=[ - { - "after": "1d", - "fixed_interval": "10m" - }, - { - "after": "7d", - "fixed_interval": "1d" - } - ], - ) - - language: JavaScript - code: |- - const response = await client.indices.putDataLifecycle({ - name: "my-weather-sensor-data-stream", - downsampling: [ - { - after: "1d", - fixed_interval: "10m", - }, - { - after: "7d", - fixed_interval: "1d", - }, - ], - }); - - language: Ruby - code: |- - response = client.indices.put_data_lifecycle( - name: "my-weather-sensor-data-stream", - body: { - "downsampling": [ - { - "after": "1d", - "fixed_interval": "10m" - }, - { - "after": "7d", - "fixed_interval": "1d" - } - ] - } - ) - - language: PHP - code: |- - $resp = $client->indices()->putDataLifecycle([ - "name" => "my-weather-sensor-data-stream", - "body" => [ - "downsampling" => array( - [ - "after" => "1d", - "fixed_interval" => "10m", - ], - [ - "after" => "7d", - "fixed_interval" => "1d", - ], - ), - ], - ]); - - language: curl - code: - 'curl -X PUT -H "Authorization: ApiKey $ELASTIC_API_KEY" -H "Content-Type: application/json" -d - ''{"downsampling":[{"after":"1d","fixed_interval":"10m"},{"after":"7d","fixed_interval":"1d"}]}'' - "$ELASTICSEARCH_URL/_data_stream/my-weather-sensor-data-stream/_lifecycle"' diff --git a/specification/indices/put_data_stream_settings/examples/request/IndicesPutDataStreamSettingsRequestExample1.yaml b/specification/indices/put_data_stream_settings/examples/request/IndicesPutDataStreamSettingsRequestExample1.yaml index c562b355b5..cb15d12db5 100644 --- a/specification/indices/put_data_stream_settings/examples/request/IndicesPutDataStreamSettingsRequestExample1.yaml +++ b/specification/indices/put_data_stream_settings/examples/request/IndicesPutDataStreamSettingsRequestExample1.yaml @@ -8,45 +8,3 @@ value: |- "index.lifecycle.name" : "new-test-policy", "index.number_of_shards": 11 } -alternatives: - - language: Python - code: |- - resp = client.indices.put_data_stream_settings( - name="my-data-stream", - settings={ - "index.lifecycle.name": "new-test-policy", - "index.number_of_shards": 11 - }, - ) - - language: JavaScript - code: |- - const response = await client.indices.putDataStreamSettings({ - name: "my-data-stream", - settings: { - "index.lifecycle.name": "new-test-policy", - "index.number_of_shards": 11, - }, - }); - - language: Ruby - code: |- - response = client.indices.put_data_stream_settings( - name: "my-data-stream", - body: { - "index.lifecycle.name": "new-test-policy", - "index.number_of_shards": 11 - } - ) - - language: PHP - code: |- - $resp = $client->indices()->putDataStreamSettings([ - "name" => "my-data-stream", - "body" => [ - "index.lifecycle.name" => "new-test-policy", - "index.number_of_shards" => 11, - ], - ]); - - language: curl - code: - 'curl -X PUT -H "Authorization: ApiKey $ELASTIC_API_KEY" -H "Content-Type: application/json" -d - ''{"index.lifecycle.name":"new-test-policy","index.number_of_shards":11}'' - "$ELASTICSEARCH_URL/_data_stream/my-data-stream/_settings"' diff --git a/specification/indices/put_index_template/examples/request/IndicesPutIndexTemplateRequestExample1.yaml b/specification/indices/put_index_template/examples/request/IndicesPutIndexTemplateRequestExample1.yaml index 8984b78c2d..6001213aa8 100644 --- a/specification/indices/put_index_template/examples/request/IndicesPutIndexTemplateRequestExample1.yaml +++ b/specification/indices/put_index_template/examples/request/IndicesPutIndexTemplateRequestExample1.yaml @@ -19,79 +19,3 @@ value: "{ \ } }" -alternatives: - - language: Python - code: |- - resp = client.indices.put_index_template( - name="template_1", - index_patterns=[ - "template*" - ], - priority=1, - template={ - "settings": { - "number_of_shards": 2 - } - }, - ) - - language: JavaScript - code: |- - const response = await client.indices.putIndexTemplate({ - name: "template_1", - index_patterns: ["template*"], - priority: 1, - template: { - settings: { - number_of_shards: 2, - }, - }, - }); - - language: Ruby - code: |- - response = client.indices.put_index_template( - name: "template_1", - body: { - "index_patterns": [ - "template*" - ], - "priority": 1, - "template": { - "settings": { - "number_of_shards": 2 - } - } - } - ) - - language: PHP - code: |- - $resp = $client->indices()->putIndexTemplate([ - "name" => "template_1", - "body" => [ - "index_patterns" => array( - "template*", - ), - "priority" => 1, - "template" => [ - "settings" => [ - "number_of_shards" => 2, - ], - ], - ], - ]); - - language: curl - code: - 'curl -X PUT -H "Authorization: ApiKey $ELASTIC_API_KEY" -H "Content-Type: application/json" -d - ''{"index_patterns":["template*"],"priority":1,"template":{"settings":{"number_of_shards":2}}}'' - "$ELASTICSEARCH_URL/_index_template/template_1"' - - language: Java - code: | - client.indices().putIndexTemplate(p -> p - .indexPatterns("template*") - .name("template_1") - .priority(1L) - .template(t -> t - .settings(s -> s - .numberOfShards("2") - ) - ) - ); diff --git a/specification/indices/put_index_template/examples/request/IndicesPutIndexTemplateRequestExample2.yaml b/specification/indices/put_index_template/examples/request/IndicesPutIndexTemplateRequestExample2.yaml index c23468d3b8..74589b4026 100644 --- a/specification/indices/put_index_template/examples/request/IndicesPutIndexTemplateRequestExample2.yaml +++ b/specification/indices/put_index_template/examples/request/IndicesPutIndexTemplateRequestExample2.yaml @@ -18,131 +18,3 @@ value: user.id: kimchy routing: shard-1 '{index}-alias': {} -alternatives: - - language: Python - code: |- - resp = client.indices.put_index_template( - name="template_1", - index_patterns=[ - "template*" - ], - template={ - "settings": { - "number_of_shards": 1 - }, - "aliases": { - "alias1": {}, - "alias2": { - "filter": { - "term": { - "user.id": "kimchy" - } - }, - "routing": "shard-1" - }, - "{index}-alias": {} - } - }, - ) - - language: JavaScript - code: |- - const response = await client.indices.putIndexTemplate({ - name: "template_1", - index_patterns: ["template*"], - template: { - settings: { - number_of_shards: 1, - }, - aliases: { - alias1: {}, - alias2: { - filter: { - term: { - "user.id": "kimchy", - }, - }, - routing: "shard-1", - }, - "{index}-alias": {}, - }, - }, - }); - - language: Ruby - code: |- - response = client.indices.put_index_template( - name: "template_1", - body: { - "index_patterns": [ - "template*" - ], - "template": { - "settings": { - "number_of_shards": 1 - }, - "aliases": { - "alias1": {}, - "alias2": { - "filter": { - "term": { - "user.id": "kimchy" - } - }, - "routing": "shard-1" - }, - "{index}-alias": {} - } - } - } - ) - - language: PHP - code: |- - $resp = $client->indices()->putIndexTemplate([ - "name" => "template_1", - "body" => [ - "index_patterns" => array( - "template*", - ), - "template" => [ - "settings" => [ - "number_of_shards" => 1, - ], - "aliases" => [ - "alias1" => new ArrayObject([]), - "alias2" => [ - "filter" => [ - "term" => [ - "user.id" => "kimchy", - ], - ], - "routing" => "shard-1", - ], - "{index}-alias" => new ArrayObject([]), - ], - ], - ], - ]); - - language: curl - code: - "curl -X PUT -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d - '{\"index_patterns\":[\"template*\"],\"template\":{\"settings\":{\"number_of_shards\":1},\"aliases\":{\"alias1\":{},\"alias2\ - \":{\"filter\":{\"term\":{\"user.id\":\"kimchy\"}},\"routing\":\"shard-1\"},\"{index}-alias\":{}}}}' - \"$ELASTICSEARCH_URL/_index_template/template_1\"" - - language: Java - code: | - client.indices().putIndexTemplate(p -> p - .indexPatterns("template*") - .name("template_1") - .template(t -> t - .aliases(Map.of("alias1", Alias.of(a -> a),"{index}-alias", Alias.of(a -> a),"alias2", Alias.of(a -> a - .filter(f -> f - .term(te -> te - .field("user.id") - .value(FieldValue.of("kimchy")) - ) - ) - .routing("shard-1")))) - .settings(s -> s - .numberOfShards("1") - ) - ) - ); diff --git a/specification/indices/put_mapping/examples/request/indicesPutMappingRequestExample1.yaml b/specification/indices/put_mapping/examples/request/indicesPutMappingRequestExample1.yaml index 1b239296ca..ca5fd1863f 100644 --- a/specification/indices/put_mapping/examples/request/indicesPutMappingRequestExample1.yaml +++ b/specification/indices/put_mapping/examples/request/indicesPutMappingRequestExample1.yaml @@ -11,81 +11,3 @@ value: properties: name: type: keyword -alternatives: - - language: Python - code: |- - resp = client.indices.put_mapping( - index="my-index-000001", - properties={ - "user": { - "properties": { - "name": { - "type": "keyword" - } - } - } - }, - ) - - language: JavaScript - code: |- - const response = await client.indices.putMapping({ - index: "my-index-000001", - properties: { - user: { - properties: { - name: { - type: "keyword", - }, - }, - }, - }, - }); - - language: Ruby - code: |- - response = client.indices.put_mapping( - index: "my-index-000001", - body: { - "properties": { - "user": { - "properties": { - "name": { - "type": "keyword" - } - } - } - } - } - ) - - language: PHP - code: |- - $resp = $client->indices()->putMapping([ - "index" => "my-index-000001", - "body" => [ - "properties" => [ - "user" => [ - "properties" => [ - "name" => [ - "type" => "keyword", - ], - ], - ], - ], - ], - ]); - - language: curl - code: - 'curl -X PUT -H "Authorization: ApiKey $ELASTIC_API_KEY" -H "Content-Type: application/json" -d - ''{"properties":{"user":{"properties":{"name":{"type":"keyword"}}}}}'' - "$ELASTICSEARCH_URL/my-index-000001/_mapping"' - - language: Java - code: | - client.indices().putMapping(p -> p - .index("my-index-000001") - .properties("user", pr -> pr - .object(o -> o - .properties("name", pro -> pro - .keyword(k -> k) - ) - ) - ) - ); diff --git a/specification/indices/put_settings/examples/request/IndicesPutSettingsRequestExample1.yaml b/specification/indices/put_settings/examples/request/IndicesPutSettingsRequestExample1.yaml index 082ca28c1e..26e5716f40 100644 --- a/specification/indices/put_settings/examples/request/IndicesPutSettingsRequestExample1.yaml +++ b/specification/indices/put_settings/examples/request/IndicesPutSettingsRequestExample1.yaml @@ -11,58 +11,3 @@ value: "{ \ } }" -alternatives: - - language: Python - code: |- - resp = client.indices.put_settings( - index="my-index-000001", - settings={ - "index": { - "number_of_replicas": 2 - } - }, - ) - - language: JavaScript - code: |- - const response = await client.indices.putSettings({ - index: "my-index-000001", - settings: { - index: { - number_of_replicas: 2, - }, - }, - }); - - language: Ruby - code: |- - response = client.indices.put_settings( - index: "my-index-000001", - body: { - "index": { - "number_of_replicas": 2 - } - } - ) - - language: PHP - code: |- - $resp = $client->indices()->putSettings([ - "index" => "my-index-000001", - "body" => [ - "index" => [ - "number_of_replicas" => 2, - ], - ], - ]); - - language: curl - code: - 'curl -X PUT -H "Authorization: ApiKey $ELASTIC_API_KEY" -H "Content-Type: application/json" -d - ''{"index":{"number_of_replicas":2}}'' "$ELASTICSEARCH_URL/my-index-000001/_settings"' - - language: Java - code: | - client.indices().putSettings(p -> p - .index("my-index-000001") - .settings(s -> s - .index(i -> i - .numberOfReplicas("2") - ) - ) - ); diff --git a/specification/indices/put_settings/examples/request/indicesPutSettingsRequestExample2.yaml b/specification/indices/put_settings/examples/request/indicesPutSettingsRequestExample2.yaml index d97da57d14..60eb2cf50b 100644 --- a/specification/indices/put_settings/examples/request/indicesPutSettingsRequestExample2.yaml +++ b/specification/indices/put_settings/examples/request/indicesPutSettingsRequestExample2.yaml @@ -11,48 +11,3 @@ value: "{ \ } }" -alternatives: - - language: Python - code: |- - resp = client.indices.put_settings( - index="my-index-000001", - settings={ - "index": { - "refresh_interval": None - } - }, - ) - - language: JavaScript - code: |- - const response = await client.indices.putSettings({ - index: "my-index-000001", - settings: { - index: { - refresh_interval: null, - }, - }, - }); - - language: Ruby - code: |- - response = client.indices.put_settings( - index: "my-index-000001", - body: { - "index": { - "refresh_interval": nil - } - } - ) - - language: PHP - code: |- - $resp = $client->indices()->putSettings([ - "index" => "my-index-000001", - "body" => [ - "index" => [ - "refresh_interval" => null, - ], - ], - ]); - - language: curl - code: - 'curl -X PUT -H "Authorization: ApiKey $ELASTIC_API_KEY" -H "Content-Type: application/json" -d - ''{"index":{"refresh_interval":null}}'' "$ELASTICSEARCH_URL/my-index-000001/_settings"' diff --git a/specification/indices/put_settings/examples/request/indicesPutSettingsRequestExample3.yaml b/specification/indices/put_settings/examples/request/indicesPutSettingsRequestExample3.yaml index a4b1c52b5e..5932ae38a2 100644 --- a/specification/indices/put_settings/examples/request/indicesPutSettingsRequestExample3.yaml +++ b/specification/indices/put_settings/examples/request/indicesPutSettingsRequestExample3.yaml @@ -1,89 +1,17 @@ summary: Update index analysis -method_request: POST /my-index-000001/_close -description: To add an analyzer, you must close the index, define the analyzer, then reopen the index. +method_request: PUT /my-index-000001/_settings +description: + To add an analyzer, you must close the index (`POST /my-index-000001/_close`), define the analyzer, then reopen the + index (`POST /my-index-000001/_open`). # type: request -value: "{ - - \ \"analysis\" : { - - \ \"analyzer\":{ - - \ \"content\":{ - - \ \"type\":\"custom\", - - \ \"tokenizer\":\"whitespace\" - - \ } - - \ } - - \ } - - } - - - POST /my-index-000001/_open" -alternatives: - - language: Python - code: |- - resp = client.indices.close( - index="my-index-000001", - ) - - resp1 = client.indices.open( - index="my-index-000001", - ) - - language: JavaScript - code: |- - const response = await client.indices.close({ - index: "my-index-000001", - }); - - const response1 = await client.indices.open({ - index: "my-index-000001", - }); - - language: Ruby - code: |- - response = client.indices.close( - index: "my-index-000001", - body: { - "analysis": { - "analyzer": { - "content": { - "type": "custom", - "tokenizer": "whitespace" - } - } - } +value: |- + { + "analysis": { + "analyzer": { + "content": { + "type": "custom", + "tokenizer": "whitespace" } - ) - - response1 = client.indices.open( - index: "my-index-000001" - ) - - language: PHP - code: |- - $resp = $client->indices()->close([ - "index" => "my-index-000001", - "body" => [ - "analysis" => [ - "analyzer" => [ - "content" => [ - "type" => "custom", - "tokenizer" => "whitespace", - ], - ], - ], - ], - ]); - - $resp1 = $client->indices()->open([ - "index" => "my-index-000001", - ]); - - language: curl - code: >- - curl -X POST -H "Authorization: ApiKey $ELASTIC_API_KEY" -H "Content-Type: application/json" -d - '{"analysis":{"analyzer":{"content":{"type":"custom","tokenizer":"whitespace"}}}}' "$ELASTICSEARCH_URL/my-index-000001/_close" - - curl -X POST -H "Authorization: ApiKey $ELASTIC_API_KEY" "$ELASTICSEARCH_URL/my-index-000001/_open" + } + } + } diff --git a/specification/indices/put_template/examples/request/indicesPutTemplateRequestExample1.yaml b/specification/indices/put_template/examples/request/indicesPutTemplateRequestExample1.yaml index 1f62c97126..227c451388 100644 --- a/specification/indices/put_template/examples/request/indicesPutTemplateRequestExample1.yaml +++ b/specification/indices/put_template/examples/request/indicesPutTemplateRequestExample1.yaml @@ -17,129 +17,3 @@ value: created_at: type: date format: 'EEE MMM dd HH:mm:ss Z yyyy' -alternatives: - - language: Python - code: |- - resp = client.indices.put_template( - name="template_1", - index_patterns=[ - "te*", - "bar*" - ], - settings={ - "number_of_shards": 1 - }, - mappings={ - "_source": { - "enabled": False - } - }, - properties={ - "host_name": { - "type": "keyword" - }, - "created_at": { - "type": "date", - "format": "EEE MMM dd HH:mm:ss Z yyyy" - } - }, - ) - - language: JavaScript - code: |- - const response = await client.indices.putTemplate({ - name: "template_1", - index_patterns: ["te*", "bar*"], - settings: { - number_of_shards: 1, - }, - mappings: { - _source: { - enabled: false, - }, - }, - properties: { - host_name: { - type: "keyword", - }, - created_at: { - type: "date", - format: "EEE MMM dd HH:mm:ss Z yyyy", - }, - }, - }); - - language: Ruby - code: |- - response = client.indices.put_template( - name: "template_1", - body: { - "index_patterns": [ - "te*", - "bar*" - ], - "settings": { - "number_of_shards": 1 - }, - "mappings": { - "_source": { - "enabled": false - } - }, - "properties": { - "host_name": { - "type": "keyword" - }, - "created_at": { - "type": "date", - "format": "EEE MMM dd HH:mm:ss Z yyyy" - } - } - } - ) - - language: PHP - code: |- - $resp = $client->indices()->putTemplate([ - "name" => "template_1", - "body" => [ - "index_patterns" => array( - "te*", - "bar*", - ), - "settings" => [ - "number_of_shards" => 1, - ], - "mappings" => [ - "_source" => [ - "enabled" => false, - ], - ], - "properties" => [ - "host_name" => [ - "type" => "keyword", - ], - "created_at" => [ - "type" => "date", - "format" => "EEE MMM dd HH:mm:ss Z yyyy", - ], - ], - ], - ]); - - language: curl - code: - "curl -X PUT -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d - '{\"index_patterns\":[\"te*\",\"bar*\"],\"settings\":{\"number_of_shards\":1},\"mappings\":{\"_source\":{\"enabled\":false}},\ - \"properties\":{\"host_name\":{\"type\":\"keyword\"},\"created_at\":{\"type\":\"date\",\"format\":\"EEE MMM dd HH:mm:ss Z - yyyy\"}}}' \"$ELASTICSEARCH_URL/_template/template_1\"" - - language: Java - code: | - client.indices().putTemplate(p -> p - .indexPatterns(List.of("te*","bar*")) - .mappings(m -> m - .source(s -> s - .enabled(false) - ) - ) - .name("template_1") - .settings(s -> s - .numberOfShards("1") - ) - ); diff --git a/specification/indices/put_template/examples/request/indicesPutTemplateRequestExample2.yaml b/specification/indices/put_template/examples/request/indicesPutTemplateRequestExample2.yaml index d94b4e4df4..6c474d894d 100644 --- a/specification/indices/put_template/examples/request/indicesPutTemplateRequestExample2.yaml +++ b/specification/indices/put_template/examples/request/indicesPutTemplateRequestExample2.yaml @@ -17,120 +17,3 @@ value: user.id: kimchy routing: shard-1 '{index}-alias': {} -alternatives: - - language: Python - code: |- - resp = client.indices.put_template( - name="template_1", - index_patterns=[ - "te*" - ], - settings={ - "number_of_shards": 1 - }, - aliases={ - "alias1": {}, - "alias2": { - "filter": { - "term": { - "user.id": "kimchy" - } - }, - "routing": "shard-1" - }, - "{index}-alias": {} - }, - ) - - language: JavaScript - code: |- - const response = await client.indices.putTemplate({ - name: "template_1", - index_patterns: ["te*"], - settings: { - number_of_shards: 1, - }, - aliases: { - alias1: {}, - alias2: { - filter: { - term: { - "user.id": "kimchy", - }, - }, - routing: "shard-1", - }, - "{index}-alias": {}, - }, - }); - - language: Ruby - code: |- - response = client.indices.put_template( - name: "template_1", - body: { - "index_patterns": [ - "te*" - ], - "settings": { - "number_of_shards": 1 - }, - "aliases": { - "alias1": {}, - "alias2": { - "filter": { - "term": { - "user.id": "kimchy" - } - }, - "routing": "shard-1" - }, - "{index}-alias": {} - } - } - ) - - language: PHP - code: |- - $resp = $client->indices()->putTemplate([ - "name" => "template_1", - "body" => [ - "index_patterns" => array( - "te*", - ), - "settings" => [ - "number_of_shards" => 1, - ], - "aliases" => [ - "alias1" => new ArrayObject([]), - "alias2" => [ - "filter" => [ - "term" => [ - "user.id" => "kimchy", - ], - ], - "routing" => "shard-1", - ], - "{index}-alias" => new ArrayObject([]), - ], - ], - ]); - - language: curl - code: - "curl -X PUT -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d - '{\"index_patterns\":[\"te*\"],\"settings\":{\"number_of_shards\":1},\"aliases\":{\"alias1\":{},\"alias2\":{\"filter\":{\"term\ - \":{\"user.id\":\"kimchy\"}},\"routing\":\"shard-1\"},\"{index}-alias\":{}}}' \"$ELASTICSEARCH_URL/_template/template_1\"" - - language: Java - code: | - client.indices().putTemplate(p -> p - .aliases(Map.of("alias1", Alias.of(a -> a),"{index}-alias", Alias.of(a -> a),"alias2", Alias.of(a -> a - .filter(f -> f - .term(t -> t - .field("user.id") - .value(FieldValue.of("kimchy")) - ) - ) - .routing("shard-1")))) - .indexPatterns("te*") - .name("template_1") - .settings(s -> s - .numberOfShards("1") - ) - ); diff --git a/specification/indices/recovery/IndicesRecoveryRequest.ts b/specification/indices/recovery/IndicesRecoveryRequest.ts index fc3b3b8c32..61153a3568 100644 --- a/specification/indices/recovery/IndicesRecoveryRequest.ts +++ b/specification/indices/recovery/IndicesRecoveryRequest.ts @@ -18,7 +18,7 @@ */ import { RequestBase } from '@_types/Base' -import { Indices } from '@_types/common' +import { ExpandWildcards, Indices } from '@_types/common' /** * Get index recovery information. @@ -80,5 +80,23 @@ export interface Request extends RequestBase { * @server_default false */ detailed?: boolean + /** + * If `false`, the request returns an error if any wildcard expression, index alias, or `_all` value targets only missing or closed indices. + * This behavior applies even if the request targets other open indices. + * @server_default true + */ + allow_no_indices?: boolean + /** + * Type of index that wildcard patterns can match. + * If the request can target data streams, this argument determines whether wildcard expressions match hidden data streams. + * Supports comma-separated values, such as `open,hidden`. + * @server_default open + */ + expand_wildcards?: ExpandWildcards + /** + * If `false`, the request returns an error if it targets a missing or closed index. + * @server_default false + */ + ignore_unavailable?: boolean } } diff --git a/specification/indices/recovery/examples/request/indicesRecoveryRequestExample1.yaml b/specification/indices/recovery/examples/request/indicesRecoveryRequestExample1.yaml index 65a02b3976..f615441005 100644 --- a/specification/indices/recovery/examples/request/indicesRecoveryRequestExample1.yaml +++ b/specification/indices/recovery/examples/request/indicesRecoveryRequestExample1.yaml @@ -1,26 +1 @@ method_request: GET /_recovery?human -alternatives: - - language: Python - code: |- - resp = client.indices.recovery( - human=True, - ) - - language: JavaScript - code: |- - const response = await client.indices.recovery({ - human: "true", - }); - - language: Ruby - code: |- - response = client.indices.recovery( - human: "true" - ) - - language: PHP - code: |- - $resp = $client->indices()->recovery([ - "human" => "true", - ]); - - language: curl - code: 'curl -X GET -H "Authorization: ApiKey $ELASTIC_API_KEY" "$ELASTICSEARCH_URL/_recovery?human"' - - language: Java - code: "\n" diff --git a/specification/indices/refresh/examples/request/IndicesRefreshExample1.yaml b/specification/indices/refresh/examples/request/IndicesRefreshExample1.yaml index 6bf8e51e55..6a13bc240a 100644 --- a/specification/indices/refresh/examples/request/IndicesRefreshExample1.yaml +++ b/specification/indices/refresh/examples/request/IndicesRefreshExample1.yaml @@ -1,15 +1 @@ method_request: GET _refresh -alternatives: - - language: Python - code: resp = client.indices.refresh() - - language: JavaScript - code: const response = await client.indices.refresh(); - - language: Ruby - code: response = client.indices.refresh - - language: PHP - code: $resp = $client->indices()->refresh(); - - language: curl - code: 'curl -X GET -H "Authorization: ApiKey $ELASTIC_API_KEY" "$ELASTICSEARCH_URL/_refresh"' - - language: Java - code: | - client.indices().refresh(r -> r); diff --git a/specification/indices/reload_search_analyzers/examples/request/ReloadSearchAnalyzersRequestExample1.yaml b/specification/indices/reload_search_analyzers/examples/request/ReloadSearchAnalyzersRequestExample1.yaml index 5221f4b7de..0c9fb35bf3 100644 --- a/specification/indices/reload_search_analyzers/examples/request/ReloadSearchAnalyzersRequestExample1.yaml +++ b/specification/indices/reload_search_analyzers/examples/request/ReloadSearchAnalyzersRequestExample1.yaml @@ -13,66 +13,3 @@ value: - my_synonyms reloaded_node_ids: - mfdqTXn_T7SGr2Ho2KT8uw -alternatives: - - language: Python - code: |- - resp = client.indices.reload_search_analyzers( - index="my-index-000001", - ) - - language: JavaScript - code: |- - const response = await client.indices.reloadSearchAnalyzers({ - index: "my-index-000001", - }); - - language: Ruby - code: |- - response = client.indices.reload_search_analyzers( - index: "my-index-000001", - body: { - "_shards": { - "total": 2, - "successful": 2, - "failed": 0 - }, - "reload_details": [ - { - "index": "my-index-000001", - "reloaded_analyzers": [ - "my_synonyms" - ], - "reloaded_node_ids": [ - "mfdqTXn_T7SGr2Ho2KT8uw" - ] - } - ] - } - ) - - language: PHP - code: |- - $resp = $client->indices()->reloadSearchAnalyzers([ - "index" => "my-index-000001", - "body" => [ - "_shards" => [ - "total" => 2, - "successful" => 2, - "failed" => 0, - ], - "reload_details" => array( - [ - "index" => "my-index-000001", - "reloaded_analyzers" => array( - "my_synonyms", - ), - "reloaded_node_ids" => array( - "mfdqTXn_T7SGr2Ho2KT8uw", - ), - ], - ), - ], - ]); - - language: curl - code: - "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d - '{\"_shards\":{\"total\":2,\"successful\":2,\"failed\":0},\"reload_details\":[{\"index\":\"my-index-000001\",\"reloaded_analy\ - zers\":[\"my_synonyms\"],\"reloaded_node_ids\":[\"mfdqTXn_T7SGr2Ho2KT8uw\"]}]}' - \"$ELASTICSEARCH_URL/my-index-000001/_reload_search_analyzers\"" diff --git a/specification/indices/remove_block/IndicesRemoveBlockRequest.ts b/specification/indices/remove_block/IndicesRemoveBlockRequest.ts new file mode 100644 index 0000000000..027c3aa75d --- /dev/null +++ b/specification/indices/remove_block/IndicesRemoveBlockRequest.ts @@ -0,0 +1,91 @@ +/* + * 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. + */ + +import { RequestBase } from '@_types/Base' +import { ExpandWildcards, IndexName } from '@_types/common' +import { Duration } from '@_types/Time' +import { IndicesBlockOptions } from '@indices/_types/IndexSettings' + +/** + * Remove an index block. + * + * Remove an index block from an index. + * Index blocks limit the operations allowed on an index by blocking specific operation types. + * @rest_spec_name indices.remove_block + * @availability stack since=9.1.0 stability=stable + * @availability serverless stability=stable visibility=public + * @doc_id index-block-remove + * @index_privileges manage + */ +export interface Request extends RequestBase { + urls: [ + { + path: '/{index}/_block/{block}' + methods: ['DELETE'] + } + ] + path_parts: { + /** + * A comma-separated list or wildcard expression of index names used to limit the request. + * By default, you must explicitly name the indices you are removing blocks from. + * To allow the removal of blocks from indices with `_all`, `*`, or other wildcard expressions, change the `action.destructive_requires_name` setting to `false`. + * You can update this setting in the `elasticsearch.yml` file or by using the cluster update settings API. + */ + index: IndexName + /** + * The block type to remove from the index. + */ + block: IndicesBlockOptions + } + query_parameters: { + /** + * If `false`, the request returns an error if any wildcard expression, index alias, or `_all` value targets only missing or closed indices. + * This behavior applies even if the request targets other open indices. + * For example, a request targeting `foo*,bar*` returns an error if an index starts with `foo` but no index starts with `bar`. + * @server_default true + */ + allow_no_indices?: boolean // default: true + /** + * The type of index that wildcard patterns can match. + * If the request can target data streams, this argument determines whether wildcard expressions match hidden data streams. + * It supports comma-separated values, such as `open,hidden`. + * @server_default open + */ + expand_wildcards?: ExpandWildcards // default: open + /** + * If `false`, the request returns an error if it targets a missing or closed index. + * @server_default false + */ + ignore_unavailable?: boolean // default: false + /** + * The period to wait for the master node. + * If the master node is not available before the timeout expires, the request fails and returns an error. + * It can also be set to `-1` to indicate that the request should never timeout. + * @server_default 30s + */ + master_timeout?: Duration // default: 30s + /** + * The period to wait for a response from all relevant nodes in the cluster after updating the cluster metadata. + * If no response is received before the timeout expires, the cluster metadata update still applies but the response will indicate that it was not completely acknowledged. + * It can also be set to `-1` to indicate that the request should never timeout. + * @server_default 30s + */ + timeout?: Duration // default: 30s + } +} diff --git a/specification/indices/remove_block/IndicesRemoveBlockResponse.ts b/specification/indices/remove_block/IndicesRemoveBlockResponse.ts new file mode 100644 index 0000000000..48777e175e --- /dev/null +++ b/specification/indices/remove_block/IndicesRemoveBlockResponse.ts @@ -0,0 +1,34 @@ +/* + * 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. + */ + +import { IndexName } from '@_types/common' +import { ErrorCause } from '@_types/Errors' + +export class Response { + body: { + acknowledged: boolean + indices: RemoveIndicesBlockStatus[] + } +} + +export class RemoveIndicesBlockStatus { + name: IndexName + unblocked?: boolean + exception?: ErrorCause +} diff --git a/specification/indices/remove_block/examples/request/IndicesRemoveBlockRequestExample1.yaml b/specification/indices/remove_block/examples/request/IndicesRemoveBlockRequestExample1.yaml new file mode 100644 index 0000000000..84ce6ae400 --- /dev/null +++ b/specification/indices/remove_block/examples/request/IndicesRemoveBlockRequestExample1.yaml @@ -0,0 +1 @@ +method_request: DELETE /my-index-000001/_block/write diff --git a/specification/indices/remove_block/examples/response/IndicesRemoveBlockResponseExample1.yaml b/specification/indices/remove_block/examples/response/IndicesRemoveBlockResponseExample1.yaml new file mode 100644 index 0000000000..ddedd83f48 --- /dev/null +++ b/specification/indices/remove_block/examples/response/IndicesRemoveBlockResponseExample1.yaml @@ -0,0 +1,12 @@ +# summary: '' +description: A successful response from `DELETE /my-index-000001/_block/write`, which removes an index block from an index.' +# type: response +# response_code: 200 +value: |- + { + "acknowledged" : true, + "indices" : [ { + "name" : "my-index-000001", + "unblocked" : true + } ] + } diff --git a/specification/indices/resolve_cluster/examples/request/ResolveClusterRequestExample2.yaml b/specification/indices/resolve_cluster/examples/request/ResolveClusterRequestExample2.yaml index cc59dab2b7..510c17feda 100644 --- a/specification/indices/resolve_cluster/examples/request/ResolveClusterRequestExample2.yaml +++ b/specification/indices/resolve_cluster/examples/request/ResolveClusterRequestExample2.yaml @@ -1,42 +1 @@ method_request: GET /_resolve/cluster/not-present,clust*:my-index*,oldcluster:*?ignore_unavailable=false&timeout=5s -alternatives: - - language: Python - code: |- - resp = client.indices.resolve_cluster( - name="not-present,clust*:my-index*,oldcluster:*", - ignore_unavailable=False, - timeout="5s", - ) - - language: JavaScript - code: |- - const response = await client.indices.resolveCluster({ - name: "not-present,clust*:my-index*,oldcluster:*", - ignore_unavailable: "false", - timeout: "5s", - }); - - language: Ruby - code: |- - response = client.indices.resolve_cluster( - name: "not-present,clust*:my-index*,oldcluster:*", - ignore_unavailable: "false", - timeout: "5s" - ) - - language: PHP - code: |- - $resp = $client->indices()->resolveCluster([ - "name" => "not-present,clust*:my-index*,oldcluster:*", - "ignore_unavailable" => "false", - "timeout" => "5s", - ]); - - language: curl - code: 'curl -X GET -H "Authorization: ApiKey $ELASTIC_API_KEY" - "$ELASTICSEARCH_URL/_resolve/cluster/not-present,clust*:my-index*,oldcluster:*?ignore_unavailable=false&timeout=5s"' - - language: Java - code: | - client.indices().resolveCluster(r -> r - .ignoreUnavailable(false) - .name(List.of("not-present","clust*:my-index*","oldcluster:*")) - .timeout(t -> t - .offset(5) - ) - ); diff --git a/specification/indices/resolve_index/examples/request/ResolveIndexRequestExample1.yaml b/specification/indices/resolve_index/examples/request/ResolveIndexRequestExample1.yaml index 146550944a..1e0f7249b7 100644 --- a/specification/indices/resolve_index/examples/request/ResolveIndexRequestExample1.yaml +++ b/specification/indices/resolve_index/examples/request/ResolveIndexRequestExample1.yaml @@ -1,29 +1 @@ method_request: GET /_resolve/index/f*,remoteCluster1:bar*?expand_wildcards=all -alternatives: - - language: Python - code: |- - resp = client.indices.resolve_index( - name="f*,remoteCluster1:bar*", - expand_wildcards="all", - ) - - language: JavaScript - code: |- - const response = await client.indices.resolveIndex({ - name: "f*,remoteCluster1:bar*", - expand_wildcards: "all", - }); - - language: Ruby - code: |- - response = client.indices.resolve_index( - name: "f*,remoteCluster1:bar*", - expand_wildcards: "all" - ) - - language: PHP - code: |- - $resp = $client->indices()->resolveIndex([ - "name" => "f*,remoteCluster1:bar*", - "expand_wildcards" => "all", - ]); - - language: curl - code: 'curl -X GET -H "Authorization: ApiKey $ELASTIC_API_KEY" - "$ELASTICSEARCH_URL/_resolve/index/f*,remoteCluster1:bar*?expand_wildcards=all"' diff --git a/specification/indices/rollover/examples/request/indicesRolloverRequestExample1.yaml b/specification/indices/rollover/examples/request/indicesRolloverRequestExample1.yaml index 33cdf9e178..2c639926b2 100644 --- a/specification/indices/rollover/examples/request/indicesRolloverRequestExample1.yaml +++ b/specification/indices/rollover/examples/request/indicesRolloverRequestExample1.yaml @@ -17,70 +17,3 @@ value: "{ \ } }" -alternatives: - - language: Python - code: |- - resp = client.indices.rollover( - alias="my-data-stream", - conditions={ - "max_age": "7d", - "max_docs": 1000, - "max_primary_shard_size": "50gb", - "max_primary_shard_docs": "2000" - }, - ) - - language: JavaScript - code: |- - const response = await client.indices.rollover({ - alias: "my-data-stream", - conditions: { - max_age: "7d", - max_docs: 1000, - max_primary_shard_size: "50gb", - max_primary_shard_docs: "2000", - }, - }); - - language: Ruby - code: |- - response = client.indices.rollover( - alias: "my-data-stream", - body: { - "conditions": { - "max_age": "7d", - "max_docs": 1000, - "max_primary_shard_size": "50gb", - "max_primary_shard_docs": "2000" - } - } - ) - - language: PHP - code: |- - $resp = $client->indices()->rollover([ - "alias" => "my-data-stream", - "body" => [ - "conditions" => [ - "max_age" => "7d", - "max_docs" => 1000, - "max_primary_shard_size" => "50gb", - "max_primary_shard_docs" => "2000", - ], - ], - ]); - - language: curl - code: - "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d - '{\"conditions\":{\"max_age\":\"7d\",\"max_docs\":1000,\"max_primary_shard_size\":\"50gb\",\"max_primary_shard_docs\":\"2000\ - \"}}' \"$ELASTICSEARCH_URL/my-data-stream/_rollover\"" - - language: Java - code: | - client.indices().rollover(r -> r - .alias("my-data-stream") - .conditions(c -> c - .maxAge(m -> m - .time("7d") - ) - .maxDocs(1000L) - .maxPrimaryShardSize("50gb") - .maxPrimaryShardDocs(2000L) - ) - ); diff --git a/specification/indices/segments/examples/request/IndicesSegmentsExample1.yaml b/specification/indices/segments/examples/request/IndicesSegmentsExample1.yaml index e5db498865..9e791d430d 100644 --- a/specification/indices/segments/examples/request/IndicesSegmentsExample1.yaml +++ b/specification/indices/segments/examples/request/IndicesSegmentsExample1.yaml @@ -1,29 +1 @@ method_request: GET /my-index-000001/_segments -alternatives: - - language: Python - code: |- - resp = client.indices.segments( - index="my-index-000001", - ) - - language: JavaScript - code: |- - const response = await client.indices.segments({ - index: "my-index-000001", - }); - - language: Ruby - code: |- - response = client.indices.segments( - index: "my-index-000001" - ) - - language: PHP - code: |- - $resp = $client->indices()->segments([ - "index" => "my-index-000001", - ]); - - language: curl - code: 'curl -X GET -H "Authorization: ApiKey $ELASTIC_API_KEY" "$ELASTICSEARCH_URL/my-index-000001/_segments"' - - language: Java - code: | - client.indices().segments(s -> s - .index("my-index-000001") - ); diff --git a/specification/indices/shard_stores/examples/request/indicesShardStoresRequestExample1.yaml b/specification/indices/shard_stores/examples/request/indicesShardStoresRequestExample1.yaml index 700f9a8c25..7a44a1977f 100644 --- a/specification/indices/shard_stores/examples/request/indicesShardStoresRequestExample1.yaml +++ b/specification/indices/shard_stores/examples/request/indicesShardStoresRequestExample1.yaml @@ -1,24 +1 @@ method_request: GET /_shard_stores?status=green -alternatives: - - language: Python - code: |- - resp = client.indices.shard_stores( - status="green", - ) - - language: JavaScript - code: |- - const response = await client.indices.shardStores({ - status: "green", - }); - - language: Ruby - code: |- - response = client.indices.shard_stores( - status: "green" - ) - - language: PHP - code: |- - $resp = $client->indices()->shardStores([ - "status" => "green", - ]); - - language: curl - code: 'curl -X GET -H "Authorization: ApiKey $ELASTIC_API_KEY" "$ELASTICSEARCH_URL/_shard_stores?status=green"' diff --git a/specification/indices/shrink/examples/request/indicesShrinkRequestExample1.yaml b/specification/indices/shrink/examples/request/indicesShrinkRequestExample1.yaml index dfe39fe6c3..8d07911972 100644 --- a/specification/indices/shrink/examples/request/indicesShrinkRequestExample1.yaml +++ b/specification/indices/shrink/examples/request/indicesShrinkRequestExample1.yaml @@ -13,60 +13,3 @@ value: "{ \ } }" -alternatives: - - language: Python - code: |- - resp = client.indices.shrink( - index="my_source_index", - target="my_target_index", - settings={ - "index.routing.allocation.require._name": None, - "index.blocks.write": None - }, - ) - - language: JavaScript - code: |- - const response = await client.indices.shrink({ - index: "my_source_index", - target: "my_target_index", - settings: { - "index.routing.allocation.require._name": null, - "index.blocks.write": null, - }, - }); - - language: Ruby - code: |- - response = client.indices.shrink( - index: "my_source_index", - target: "my_target_index", - body: { - "settings": { - "index.routing.allocation.require._name": nil, - "index.blocks.write": nil - } - } - ) - - language: PHP - code: |- - $resp = $client->indices()->shrink([ - "index" => "my_source_index", - "target" => "my_target_index", - "body" => [ - "settings" => [ - "index.routing.allocation.require._name" => null, - "index.blocks.write" => null, - ], - ], - ]); - - language: curl - code: - 'curl -X POST -H "Authorization: ApiKey $ELASTIC_API_KEY" -H "Content-Type: application/json" -d - ''{"settings":{"index.routing.allocation.require._name":null,"index.blocks.write":null}}'' - "$ELASTICSEARCH_URL/my_source_index/_shrink/my_target_index"' - - language: Java - code: > - client.indices().shrink(s -> s - .index("my_source_index") - .settings(Map.of("index.blocks.write", JsonData.fromJson("null"),"index.routing.allocation.require._name", JsonData.fromJson("null"))) - .target("my_target_index") - ); diff --git a/specification/indices/simulate_index_template/examples/request/indicesSimulateIndexTemplateRequestExample1.yaml b/specification/indices/simulate_index_template/examples/request/indicesSimulateIndexTemplateRequestExample1.yaml index 3fa8a53a8f..4f244ee05b 100644 --- a/specification/indices/simulate_index_template/examples/request/indicesSimulateIndexTemplateRequestExample1.yaml +++ b/specification/indices/simulate_index_template/examples/request/indicesSimulateIndexTemplateRequestExample1.yaml @@ -1,29 +1 @@ method_request: POST /_index_template/_simulate_index/my-index-000001 -alternatives: - - language: Python - code: |- - resp = client.indices.simulate_index_template( - name="my-index-000001", - ) - - language: JavaScript - code: |- - const response = await client.indices.simulateIndexTemplate({ - name: "my-index-000001", - }); - - language: Ruby - code: |- - response = client.indices.simulate_index_template( - name: "my-index-000001" - ) - - language: PHP - code: |- - $resp = $client->indices()->simulateIndexTemplate([ - "name" => "my-index-000001", - ]); - - language: curl - code: 'curl -X POST -H "Authorization: ApiKey $ELASTIC_API_KEY" "$ELASTICSEARCH_URL/_index_template/_simulate_index/my-index-000001"' - - language: Java - code: | - client.indices().simulateIndexTemplate(s -> s - .name("my-index-000001") - ); diff --git a/specification/indices/simulate_template/examples/request/indicesSimulateTemplateRequestExample1.yaml b/specification/indices/simulate_template/examples/request/indicesSimulateTemplateRequestExample1.yaml index ac154b1942..65784c41f3 100644 --- a/specification/indices/simulate_template/examples/request/indicesSimulateTemplateRequestExample1.yaml +++ b/specification/indices/simulate_template/examples/request/indicesSimulateTemplateRequestExample1.yaml @@ -23,85 +23,3 @@ value: "{ \ } }" -alternatives: - - language: Python - code: |- - resp = client.indices.simulate_template( - index_patterns=[ - "my-index-*" - ], - composed_of=[ - "ct2" - ], - priority=10, - template={ - "settings": { - "index.number_of_replicas": 1 - } - }, - ) - - language: JavaScript - code: |- - const response = await client.indices.simulateTemplate({ - index_patterns: ["my-index-*"], - composed_of: ["ct2"], - priority: 10, - template: { - settings: { - "index.number_of_replicas": 1, - }, - }, - }); - - language: Ruby - code: |- - response = client.indices.simulate_template( - body: { - "index_patterns": [ - "my-index-*" - ], - "composed_of": [ - "ct2" - ], - "priority": 10, - "template": { - "settings": { - "index.number_of_replicas": 1 - } - } - } - ) - - language: PHP - code: |- - $resp = $client->indices()->simulateTemplate([ - "body" => [ - "index_patterns" => array( - "my-index-*", - ), - "composed_of" => array( - "ct2", - ), - "priority" => 10, - "template" => [ - "settings" => [ - "index.number_of_replicas" => 1, - ], - ], - ], - ]); - - language: curl - code: - "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d - '{\"index_patterns\":[\"my-index-*\"],\"composed_of\":[\"ct2\"],\"priority\":10,\"template\":{\"settings\":{\"index.number_of\ - _replicas\":1}}}' \"$ELASTICSEARCH_URL/_index_template/_simulate\"" - - language: Java - code: | - client.indices().simulateTemplate(s -> s - .composedOf("ct2") - .indexPatterns("my-index-*") - .priority(10L) - .template(t -> t - .settings(se -> se - .otherSettings("index.number_of_replicas", JsonData.fromJson("1")) - ) - ) - ); diff --git a/specification/indices/split/examples/request/indicesSplitRequestExample1.yaml b/specification/indices/split/examples/request/indicesSplitRequestExample1.yaml index 61d97c6294..9689f1b5cc 100644 --- a/specification/indices/split/examples/request/indicesSplitRequestExample1.yaml +++ b/specification/indices/split/examples/request/indicesSplitRequestExample1.yaml @@ -11,55 +11,3 @@ value: "{ \ } }" -alternatives: - - language: Python - code: |- - resp = client.indices.split( - index="my-index-000001", - target="split-my-index-000001", - settings={ - "index.number_of_shards": 2 - }, - ) - - language: JavaScript - code: |- - const response = await client.indices.split({ - index: "my-index-000001", - target: "split-my-index-000001", - settings: { - "index.number_of_shards": 2, - }, - }); - - language: Ruby - code: |- - response = client.indices.split( - index: "my-index-000001", - target: "split-my-index-000001", - body: { - "settings": { - "index.number_of_shards": 2 - } - } - ) - - language: PHP - code: |- - $resp = $client->indices()->split([ - "index" => "my-index-000001", - "target" => "split-my-index-000001", - "body" => [ - "settings" => [ - "index.number_of_shards" => 2, - ], - ], - ]); - - language: curl - code: - 'curl -X POST -H "Authorization: ApiKey $ELASTIC_API_KEY" -H "Content-Type: application/json" -d - ''{"settings":{"index.number_of_shards":2}}'' "$ELASTICSEARCH_URL/my-index-000001/_split/split-my-index-000001"' - - language: Java - code: | - client.indices().split(s -> s - .index("my-index-000001") - .settings("index.number_of_shards", JsonData.fromJson("2")) - .target("split-my-index-000001") - ); diff --git a/specification/indices/stats/examples/request/IndicesStatsExample1.yaml b/specification/indices/stats/examples/request/IndicesStatsExample1.yaml index f76ab1df78..da2206189b 100644 --- a/specification/indices/stats/examples/request/IndicesStatsExample1.yaml +++ b/specification/indices/stats/examples/request/IndicesStatsExample1.yaml @@ -1,35 +1 @@ method_request: GET _stats/fielddata?human&fields=my_join_field#question -alternatives: - - language: Python - code: |- - resp = client.indices.stats( - metric="fielddata", - human=True, - fields="my_join_field", - ) - - language: JavaScript - code: |- - const response = await client.indices.stats({ - metric: "fielddata", - human: "true", - fields: "my_join_field", - }); - - language: Ruby - code: |- - response = client.indices.stats( - metric: "fielddata", - human: "true", - fields: "my_join_field" - ) - - language: PHP - code: |- - $resp = $client->indices()->stats([ - "metric" => "fielddata", - "human" => "true", - "fields" => "my_join_field", - ]); - - language: curl - code: 'curl -X GET -H "Authorization: ApiKey $ELASTIC_API_KEY" - "$ELASTICSEARCH_URL/_stats/fielddata?human&fields=my_join_field#question"' - - language: Java - code: "\n" diff --git a/specification/indices/update_aliases/examples/request/IndicesUpdateAliasesExample1.yaml b/specification/indices/update_aliases/examples/request/IndicesUpdateAliasesExample1.yaml index c559e5c57b..05f25dd467 100644 --- a/specification/indices/update_aliases/examples/request/IndicesUpdateAliasesExample1.yaml +++ b/specification/indices/update_aliases/examples/request/IndicesUpdateAliasesExample1.yaml @@ -11,70 +11,3 @@ value: |- } ] } -alternatives: - - language: Python - code: |- - resp = client.indices.update_aliases( - actions=[ - { - "add": { - "index": "logs-nginx.access-prod", - "alias": "logs" - } - } - ], - ) - - language: JavaScript - code: |- - const response = await client.indices.updateAliases({ - actions: [ - { - add: { - index: "logs-nginx.access-prod", - alias: "logs", - }, - }, - ], - }); - - language: Ruby - code: |- - response = client.indices.update_aliases( - body: { - "actions": [ - { - "add": { - "index": "logs-nginx.access-prod", - "alias": "logs" - } - } - ] - } - ) - - language: PHP - code: |- - $resp = $client->indices()->updateAliases([ - "body" => [ - "actions" => array( - [ - "add" => [ - "index" => "logs-nginx.access-prod", - "alias" => "logs", - ], - ], - ), - ], - ]); - - language: curl - code: - 'curl -X POST -H "Authorization: ApiKey $ELASTIC_API_KEY" -H "Content-Type: application/json" -d - ''{"actions":[{"add":{"index":"logs-nginx.access-prod","alias":"logs"}}]}'' "$ELASTICSEARCH_URL/_aliases"' - - language: Java - code: | - client.indices().updateAliases(u -> u - .actions(a -> a - .add(ad -> ad - .alias("logs") - .index("logs-nginx.access-prod") - ) - ) - ); diff --git a/specification/indices/validate_query/examples/request/IndicesValidateQueryExample1.yaml b/specification/indices/validate_query/examples/request/IndicesValidateQueryExample1.yaml index 5a543b84ea..54accf2b70 100644 --- a/specification/indices/validate_query/examples/request/IndicesValidateQueryExample1.yaml +++ b/specification/indices/validate_query/examples/request/IndicesValidateQueryExample1.yaml @@ -1,34 +1 @@ method_request: GET my-index-000001/_validate/query?q=user.id:kimchy -alternatives: - - language: Python - code: |- - resp = client.indices.validate_query( - index="my-index-000001", - q="user.id:kimchy", - ) - - language: JavaScript - code: |- - const response = await client.indices.validateQuery({ - index: "my-index-000001", - q: "user.id:kimchy", - }); - - language: Ruby - code: |- - response = client.indices.validate_query( - index: "my-index-000001", - q: "user.id:kimchy" - ) - - language: PHP - code: |- - $resp = $client->indices()->validateQuery([ - "index" => "my-index-000001", - "q" => "user.id:kimchy", - ]); - - language: curl - code: 'curl -X GET -H "Authorization: ApiKey $ELASTIC_API_KEY" "$ELASTICSEARCH_URL/my-index-000001/_validate/query?q=user.id:kimchy"' - - language: Java - code: | - client.indices().validateQuery(v -> v - .index("my-index-000001") - .q("user.id:kimchy") - ); diff --git a/specification/inference/_types/CommonTypes.ts b/specification/inference/_types/CommonTypes.ts index 454be45c19..79976f5d88 100644 --- a/specification/inference/_types/CommonTypes.ts +++ b/specification/inference/_types/CommonTypes.ts @@ -442,6 +442,149 @@ export enum AmazonBedrockServiceType { amazonbedrock } +export class AmazonSageMakerServiceSettings { + /** + * A valid AWS access key that has permissions to use Amazon SageMaker and access to models for invoking requests. + */ + access_key: string + /** + * The name of the SageMaker endpoint. + * @ext_doc_id amazonsagemaker-invoke + */ + endpoint_name: string + /** + * The API format to use when calling SageMaker. + * Elasticsearch will convert the POST _inference request to this data format when invoking the SageMaker endpoint. + */ + api: AmazonSageMakerApi + /** + * The region that your endpoint or Amazon Resource Name (ARN) is deployed in. + * The list of available regions per model can be found in the Amazon SageMaker documentation. + * @ext_doc_id amazonsagemaker-invoke + */ + region: string + /** + * A valid AWS secret key that is paired with the `access_key`. + * For information about creating and managing access and secret keys, refer to the AWS documentation. + * @ext_doc_id amazonsagemaker-secret-keys + */ + secret_key: string + /** + * The model ID when calling a multi-model endpoint. + * @ext_doc_id amazonsagemaker-invoke + */ + target_model?: string + /** + * The container to directly invoke when calling a multi-container endpoint. + * @ext_doc_id amazonsagemaker-invoke + */ + target_container_hostname?: string + /** + * The inference component to directly invoke when calling a multi-component endpoint. + * @ext_doc_id amazonsagemaker-invoke + */ + inference_component_name?: string + /** + * The maximum number of inputs in each batch. This value is used by inference ingestion pipelines + * when processing semantic values. It correlates to the number of times the SageMaker endpoint is + * invoked (one per batch of input). + * @server_default 256 + */ + batch_size?: integer + /** + * The number of dimensions returned by the text embedding models. If this value is not provided, then + * it is guessed by making invoking the endpoint for the `text_embedding` task. + */ + dimensions?: integer +} + +export enum AmazonSageMakerApi { + openai, + elastic +} + +/** + * Service settings specific to the Elastic API for the Amazon SageMaker service. + */ +export class AmazonSageMakerElasticServiceSettings extends AmazonSageMakerServiceSettings { + /** + * Similarity measure used when invoking the `text_embedding` task type. + */ + similarity?: AmazonSageMakerSimilarity + + /** + * The data type returned by the text embedding model. + * This value must be set when `task_type` is `text_embedding` and is used when parsing the response + * back to Elasticsearch data structures. + */ + element_type: AmazonSageMakerElementType +} + +export enum AmazonSageMakerSimilarity { + cosine, + dot_product, + l2_norm +} + +export enum AmazonSageMakerElementType { + byte, + float, + bit +} + +export interface AmazonSageMakerTaskSettings { + /** + * The AWS custom attributes passed verbatim through to the model running in the SageMaker Endpoint. + * Values will be returned in the `X-elastic-sagemaker-custom-attributes` header. + * @ext_doc_id amazonsagemaker-invoke + */ + custom_attributes?: string + /** + * The optional JMESPath expression used to override the EnableExplanations provided during endpoint creation. + * @ext_doc_id amazonsagemaker-invoke + */ + enable_explanations?: string + /** + * The capture data ID when enabled in the endpoint. + * @ext_doc_id amazonsagemaker-invoke + */ + inference_id?: string + /** + * The stateful session identifier for a new or existing session. + * New sessions will be returned in the `X-elastic-sagemaker-new-session-id` header. + * Closed sessions will be returned in the `X-elastic-sagemaker-closed-session-id` header. + * @ext_doc_id amazonsagemaker-invoke + */ + session_id?: string + /** + * Specifies the variant when running with multi-variant Endpoints. + * @ext_doc_id amazonsagemaker-invoke + */ + target_variant?: string +} + +/** + * `elastic` API allows any key value pair in the task settings when calling the inference endpoint, but it cannot + * be used when creating the inference endpoint. + */ +export class AmazonSageMakerElasticTaskSettings + implements AmazonSageMakerTaskSettings +{ + [key: string]: unknown +} + +/** + * `openai` API-specific task settings for Amazon SageMaker. + */ +export interface AmazonSageMakerOpenAiTaskSettings + extends AmazonSageMakerTaskSettings { + user?: string +} + +export enum AmazonSageMakerServiceType { + amazon_sagemaker +} + export class AnthropicServiceSettings { /** * A valid API key for the Anthropic API. @@ -670,10 +813,8 @@ export class CohereServiceSettings { * * For the available `completion` models, refer to the [Cohere command docs](https://docs.cohere.com/docs/models#command). * * For the available `rerank` models, refer to the [Cohere rerank docs](https://docs.cohere.com/reference/rerank-1). * * For the available `text_embedding` models, refer to [Cohere embed docs](https://docs.cohere.com/reference/embed). - * - * The default value for a text embedding task is `embed-english-v2.0`. */ - model_id?: string + model_id: string /** * This setting helps to minimize the number of rate limit errors returned from Cohere. * By default, the `cohere` service sets the number of requests allowed per minute to 10000. @@ -736,7 +877,7 @@ export class CohereTaskSettings { * * IMPORTANT: The `input_type` field is required when using embedding models `v3` and higher. */ - input_type?: CohereInputType + input_type: CohereInputType /** * For a `rerank` task, return doc text within the results. */ @@ -758,6 +899,256 @@ export class CohereTaskSettings { truncate?: CohereTruncateType } +export class CustomServiceSettings { + /** + * Specifies the HTTPS header parameters – such as `Authentication` or `Contet-Type` – that are required to access the custom service. + * For example: + * ``` + * "headers":{ + * "Authorization": "Bearer ${api_key}", + * "Content-Type": "application/json;charset=utf-8" + * } + * ``` + */ + headers?: UserDefinedValue + /** + * Specifies the input type translation values that are used to replace the `${input_type}` template in the request body. + * For example: + * ``` + * "input_type": { + * "translation": { + * "ingest": "do_ingest", + * "search": "do_search" + * }, + * "default": "a_default" + * }, + * ``` + * If the subsequent inference requests come from a search context, the `search` key will be used and the template will be replaced with `do_search`. + * If it comes from the ingest context `do_ingest` is used. If it's a different context that is not specified, the default value will be used. If no default is specified an empty string is used. + * `translation` can be: + * * `classification` + * * `clustering` + * * `ingest` + * * `search` + */ + input_type?: UserDefinedValue + /** + * Specifies the query parameters as a list of tuples. The arrays inside the `query_parameters` must have two items, a key and a value. + * For example: + * ``` + * "query_parameters":[ + * ["param_key", "some_value"], + * ["param_key", "another_value"], + * ["other_key", "other_value"] + * ] + * ``` + * If the base url is `https://www.elastic.co` it results in: `https://www.elastic.co?param_key=some_value¶m_key=another_value&other_key=other_value`. + */ + query_parameters?: UserDefinedValue + /** + * The request configuration object. + */ + request: CustomRequestParams + /** + * The response configuration object. + */ + response: CustomResponseParams + /** + * Specifies secret parameters, like `api_key` or `api_token`, that are required to access the custom service. + * For example: + * ``` + * "secret_parameters":{ + * "api_key":"" + * } + * ``` + */ + secret_parameters: UserDefinedValue + /** + * The URL endpoint to use for the requests. + */ + url?: string +} + +export class CustomRequestParams { + /** + * The body structure of the request. It requires passing in the string-escaped result of the JSON format HTTP request body. + * For example: + * ``` + * "request": "{\"input\":${input}}" + * ``` + * > info + * > The content string needs to be a single line except when using the Kibana console. + */ + content: string +} + +export class CustomResponseParams { + /** + * Specifies the JSON parser that is used to parse the response from the custom service. + * Different task types require different json_parser parameters. + * For example: + * ``` + * # text_embedding + * # For a response like this: + * + * { + * "object": "list", + * "data": [ + * { + * "object": "embedding", + * "index": 0, + * "embedding": [ + * 0.014539449, + * -0.015288644 + * ] + * } + * ], + * "model": "text-embedding-ada-002-v2", + * "usage": { + * "prompt_tokens": 8, + * "total_tokens": 8 + * } + * } + * + * # the json_parser definition should look like this: + * + * "response":{ + * "json_parser":{ + * "text_embeddings":"$.data[*].embedding[*]" + * } + * } + * + * # sparse_embedding + * # For a response like this: + * + * { + * "request_id": "75C50B5B-E79E-4930-****-F48DBB392231", + * "latency": 22, + * "usage": { + * "token_count": 11 + * }, + * "result": { + * "sparse_embeddings": [ + * { + * "index": 0, + * "embedding": [ + * { + * "token_id": 6, + * "weight": 0.101 + * }, + * { + * "token_id": 163040, + * "weight": 0.28417 + * } + * ] + * } + * ] + * } + * } + * + * # the json_parser definition should look like this: + * + * "response":{ + * "json_parser":{ + * "token_path":"$.result.sparse_embeddings[*].embedding[*].token_id", + * "weight_path":"$.result.sparse_embeddings[*].embedding[*].weight" + * } + * } + * + * # rerank + * # For a response like this: + * + * { + * "results": [ + * { + * "index": 3, + * "relevance_score": 0.999071, + * "document": "abc" + * }, + * { + * "index": 4, + * "relevance_score": 0.7867867, + * "document": "123" + * }, + * { + * "index": 0, + * "relevance_score": 0.32713068, + * "document": "super" + * } + * ], + * } + * + * # the json_parser definition should look like this: + * + * "response":{ + * "json_parser":{ + * "reranked_index":"$.result.scores[*].index", // optional + * "relevance_score":"$.result.scores[*].score", + * "document_text":"xxx" // optional + * } + * } + * + * # completion + * # For a response like this: + * + * { + * "id": "chatcmpl-B9MBs8CjcvOU2jLn4n570S5qMJKcT", + * "object": "chat.completion", + * "created": 1741569952, + * "model": "gpt-4.1-2025-04-14", + * "choices": [ + * { + * "index": 0, + * "message": { + * "role": "assistant", + * "content": "Hello! How can I assist you today?", + * "refusal": null, + * "annotations": [] + * }, + * "logprobs": null, + * "finish_reason": "stop" + * } + * ] + * } + * + * # the json_parser definition should look like this: + * + * "response":{ + * "json_parser":{ + * "completion_result":"$.choices[*].message.content" + * } + * } + */ + json_parser: UserDefinedValue +} + +export enum CustomTaskType { + text_embedding, + sparse_embedding, + rerank, + completion +} + +export enum CustomServiceType { + custom +} + +export class CustomTaskSettings { + /** + * Specifies parameters that are required to run the custom service. The parameters depend on the model your custom service uses. + * For example: + * ``` + * "task_settings":{ + * "parameters":{ + * "input_type":"query", + * "return_token":true + * } + * } + * ``` + */ + parameters?: UserDefinedValue +} + export class EisServiceSettings { /** * The name of the model to use for the inference task. @@ -770,14 +1161,55 @@ export class EisServiceSettings { rate_limit?: RateLimitSetting } +export class DeepSeekServiceSettings { + /** + * A valid API key for your DeepSeek account. + * You can find or create your DeepSeek API keys on the DeepSeek API key page. + * + * IMPORTANT: You need to provide the API key only once, during the inference model creation. + * The get inference endpoint API does not retrieve your API key. + * After creating the inference model, you cannot change the associated API key. + * If you want to use a different API key, delete the inference model and recreate it with the same name and the updated API key. + * @ext_doc_id deepseek-api-keys + */ + api_key: string + /** + * For a `completion` or `chat_completion` task, the name of the model to use for the inference task. + * + * For the available `completion` and `chat_completion` models, refer to the [DeepSeek Models & Pricing docs](https://api-docs.deepseek.com/quick_start/pricing). + */ + model_id: string + /** + * The URL endpoint to use for the requests. Defaults to `https://api.deepseek.com/chat/completions`. + */ + url?: string +} + +export enum DeepSeekServiceType { + deepseek +} + export enum EisTaskType { - chat_completion + chat_completion, + rerank } export enum EisServiceType { elastic } +export class EisTaskSettings { + /** + * For a `rerank` task, return doc text within the results. + */ + return_documents?: boolean + + /** + * For a `rerank` task, the number of the top N documents that should be returned. + */ + top_n?: integer +} + export class ElasticsearchServiceSettings { /** * Adaptive allocations configuration details. diff --git a/specification/inference/_types/Services.ts b/specification/inference/_types/Services.ts index 23003780cc..69b084d63d 100644 --- a/specification/inference/_types/Services.ts +++ b/specification/inference/_types/Services.ts @@ -23,10 +23,13 @@ import { TaskType, TaskTypeAlibabaCloudAI, TaskTypeAmazonBedrock, + TaskTypeAmazonSageMaker, TaskTypeAnthropic, TaskTypeAzureAIStudio, TaskTypeAzureOpenAI, TaskTypeCohere, + TaskTypeCustom, + TaskTypeDeepSeek, TaskTypeElasticsearch, TaskTypeELSER, TaskTypeGoogleAIStudio, @@ -74,8 +77,7 @@ export class InferenceEndpointInfo extends InferenceEndpoint { */ task_type: TaskType } - -export class InferenceEndpointInfoJinaAi extends InferenceEndpoint { +export class InferenceEndpointInfoAlibabaCloudAI extends InferenceEndpoint { /** * The inference Id */ @@ -83,10 +85,10 @@ export class InferenceEndpointInfoJinaAi extends InferenceEndpoint { /** * The task type */ - task_type: TaskTypeJinaAi + task_type: TaskTypeAlibabaCloudAI } -export class InferenceEndpointInfoAlibabaCloudAI extends InferenceEndpoint { +export class InferenceEndpointInfoAmazonBedrock extends InferenceEndpoint { /** * The inference Id */ @@ -94,10 +96,10 @@ export class InferenceEndpointInfoAlibabaCloudAI extends InferenceEndpoint { /** * The task type */ - task_type: TaskTypeAlibabaCloudAI + task_type: TaskTypeAmazonBedrock } -export class InferenceEndpointInfoAmazonBedrock extends InferenceEndpoint { +export class InferenceEndpointInfoAmazonSageMaker extends InferenceEndpoint { /** * The inference Id */ @@ -105,7 +107,7 @@ export class InferenceEndpointInfoAmazonBedrock extends InferenceEndpoint { /** * The task type */ - task_type: TaskTypeAmazonBedrock + task_type: TaskTypeAmazonSageMaker } export class InferenceEndpointInfoAnthropic extends InferenceEndpoint { @@ -152,6 +154,27 @@ export class InferenceEndpointInfoCohere extends InferenceEndpoint { task_type: TaskTypeCohere } +export class InferenceEndpointInfoCustom extends InferenceEndpoint { + /** + * The inference Id + */ + inference_id: string + /** + * The task type + */ + task_type: TaskTypeCustom +} +export class InferenceEndpointInfoDeepSeek extends InferenceEndpoint { + /** + * The inference Id + */ + inference_id: string + /** + * The task type + */ + task_type: TaskTypeDeepSeek +} + export class InferenceEndpointInfoElasticsearch extends InferenceEndpoint { /** * The inference Id @@ -207,6 +230,17 @@ export class InferenceEndpointInfoHuggingFace extends InferenceEndpoint { task_type: TaskTypeHuggingFace } +export class InferenceEndpointInfoJinaAi extends InferenceEndpoint { + /** + * The inference Id + */ + inference_id: string + /** + * The task type + */ + task_type: TaskTypeJinaAi +} + export class InferenceEndpointInfoMistral extends InferenceEndpoint { /** * The inference Id @@ -276,8 +310,35 @@ export class InferenceChunkingSettings { */ sentence_overlap?: integer /** - * The chunking strategy: `sentence` or `word`. + * This parameter is only applicable when using the `recursive` chunking strategy. + * + * Sets a predefined list of separators in the saved chunking settings based on the selected text type. + * Values can be `markdown` or `plaintext`. + * + * Using this parameter is an alternative to manually specifying a custom `separators` list. + */ + separator_group: string + /** + * A list of strings used as possible split points when chunking text with the `recursive` strategy. + * + * Each string can be a plain string or a regular expression (regex) pattern. + * The system tries each separator in order to split the text, starting from the first item in the list. + * + * After splitting, it attempts to recombine smaller pieces into larger chunks that stay within + * the `max_chunk_size` limit, to reduce the total number of chunks generated. + */ + separators: string[] + /** + * The chunking strategy: `sentence`, `word`, `none` or `recursive`. + * + * * If `strategy` is set to `recursive`, you must also specify: + * + * - `max_chunk_size` + * - either `separators` or`separator_group` + * + * Learn more about different chunking strategies in the linked documentation. * @server_default sentence + * @ext_doc_id chunking-strategies */ strategy?: string } diff --git a/specification/inference/_types/TaskType.ts b/specification/inference/_types/TaskType.ts index 3b8721049c..3906aad50e 100644 --- a/specification/inference/_types/TaskType.ts +++ b/specification/inference/_types/TaskType.ts @@ -45,6 +45,14 @@ export enum TaskTypeAmazonBedrock { completion } +export enum TaskTypeAmazonSageMaker { + text_embedding, + completion, + chat_completion, + sparse_embedding, + rerank +} + export enum TaskTypeAnthropic { completion } @@ -65,6 +73,18 @@ export enum TaskTypeCohere { completion } +export enum TaskTypeCustom { + text_embedding, + sparse_embedding, + rerank, + completion +} + +export enum TaskTypeDeepSeek { + completion, + chat_completion +} + export enum TaskTypeElasticsearch { sparse_embedding, text_embedding, diff --git a/specification/inference/chat_completion_unified/examples/request/PostChatCompletionRequestExample1.yaml b/specification/inference/chat_completion_unified/examples/request/PostChatCompletionRequestExample1.yaml index a123173746..a7261b2f4a 100644 --- a/specification/inference/chat_completion_unified/examples/request/PostChatCompletionRequestExample1.yaml +++ b/specification/inference/chat_completion_unified/examples/request/PostChatCompletionRequestExample1.yaml @@ -14,79 +14,3 @@ value: |- } ] } -alternatives: - - language: Python - code: |- - resp = client.inference.chat_completion_unified( - inference_id="openai-completion", - chat_completion_request={ - "model": "gpt-4o", - "messages": [ - { - "role": "user", - "content": "What is Elastic?" - } - ] - }, - ) - - language: JavaScript - code: |- - const response = await client.inference.chatCompletionUnified({ - inference_id: "openai-completion", - chat_completion_request: { - model: "gpt-4o", - messages: [ - { - role: "user", - content: "What is Elastic?", - }, - ], - }, - }); - - language: Ruby - code: |- - response = client.inference.chat_completion_unified( - inference_id: "openai-completion", - body: { - "model": "gpt-4o", - "messages": [ - { - "role": "user", - "content": "What is Elastic?" - } - ] - } - ) - - language: PHP - code: |- - $resp = $client->inference()->chatCompletionUnified([ - "inference_id" => "openai-completion", - "body" => [ - "model" => "gpt-4o", - "messages" => array( - [ - "role" => "user", - "content" => "What is Elastic?", - ], - ), - ], - ]); - - language: curl - code: - 'curl -X POST -H "Authorization: ApiKey $ELASTIC_API_KEY" -H "Content-Type: application/json" -d - ''{"model":"gpt-4o","messages":[{"role":"user","content":"What is Elastic?"}]}'' - "$ELASTICSEARCH_URL/_inference/chat_completion/openai-completion/_stream"' - - language: Java - code: | - client.inference().chatCompletionUnified(c -> c - .inferenceId("openai-completion") - .chatCompletionRequest(ch -> ch - .messages(m -> m - .content(co -> co - .string("What is Elastic?") - ) - .role("user") - ) - .model("gpt-4o") - ) - ); diff --git a/specification/inference/chat_completion_unified/examples/request/PostChatCompletionRequestExample2.yaml b/specification/inference/chat_completion_unified/examples/request/PostChatCompletionRequestExample2.yaml index 2f2fe48817..c41702003e 100644 --- a/specification/inference/chat_completion_unified/examples/request/PostChatCompletionRequestExample2.yaml +++ b/specification/inference/chat_completion_unified/examples/request/PostChatCompletionRequestExample2.yaml @@ -28,149 +28,3 @@ value: |- } ] } -alternatives: - - language: Python - code: |- - resp = client.inference.chat_completion_unified( - inference_id="openai-completion", - chat_completion_request={ - "messages": [ - { - "role": "assistant", - "content": "Let's find out what the weather is", - "tool_calls": [ - { - "id": "call_KcAjWtAww20AihPHphUh46Gd", - "type": "function", - "function": { - "name": "get_current_weather", - "arguments": "{\"location\":\"Boston, MA\"}" - } - } - ] - }, - { - "role": "tool", - "content": "The weather is cold", - "tool_call_id": "call_KcAjWtAww20AihPHphUh46Gd" - } - ] - }, - ) - - language: JavaScript - code: |- - const response = await client.inference.chatCompletionUnified({ - inference_id: "openai-completion", - chat_completion_request: { - messages: [ - { - role: "assistant", - content: "Let's find out what the weather is", - tool_calls: [ - { - id: "call_KcAjWtAww20AihPHphUh46Gd", - type: "function", - function: { - name: "get_current_weather", - arguments: '{"location":"Boston, MA"}', - }, - }, - ], - }, - { - role: "tool", - content: "The weather is cold", - tool_call_id: "call_KcAjWtAww20AihPHphUh46Gd", - }, - ], - }, - }); - - language: Ruby - code: |- - response = client.inference.chat_completion_unified( - inference_id: "openai-completion", - body: { - "messages": [ - { - "role": "assistant", - "content": "Let's find out what the weather is", - "tool_calls": [ - { - "id": "call_KcAjWtAww20AihPHphUh46Gd", - "type": "function", - "function": { - "name": "get_current_weather", - "arguments": "{\"location\":\"Boston, MA\"}" - } - } - ] - }, - { - "role": "tool", - "content": "The weather is cold", - "tool_call_id": "call_KcAjWtAww20AihPHphUh46Gd" - } - ] - } - ) - - language: PHP - code: |- - $resp = $client->inference()->chatCompletionUnified([ - "inference_id" => "openai-completion", - "body" => [ - "messages" => array( - [ - "role" => "assistant", - "content" => "Let's find out what the weather is", - "tool_calls" => array( - [ - "id" => "call_KcAjWtAww20AihPHphUh46Gd", - "type" => "function", - "function" => [ - "name" => "get_current_weather", - "arguments" => "{\"location\":\"Boston, MA\"}", - ], - ], - ), - ], - [ - "role" => "tool", - "content" => "The weather is cold", - "tool_call_id" => "call_KcAjWtAww20AihPHphUh46Gd", - ], - ), - ], - ]); - - language: curl - code: - "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d - '{\"messages\":[{\"role\":\"assistant\",\"content\":\"Let'\"'\"'s find out what the weather - is\",\"tool_calls\":[{\"id\":\"call_KcAjWtAww20AihPHphUh46Gd\",\"type\":\"function\",\"function\":{\"name\":\"get_current_wea\ - ther\",\"arguments\":\"{\\\"location\\\":\\\"Boston, MA\\\"}\"}}]},{\"role\":\"tool\",\"content\":\"The weather is - cold\",\"tool_call_id\":\"call_KcAjWtAww20AihPHphUh46Gd\"}]}' - \"$ELASTICSEARCH_URL/_inference/chat_completion/openai-completion/_stream\"" - - language: Java - code: | - client.inference().chatCompletionUnified(c -> c - .inferenceId("openai-completion") - .chatCompletionRequest(ch -> ch - .messages(List.of(Message.of(m -> m - .content(co -> co - .string("Let's find out what the weather is") - ) - .role("assistant") - .toolCalls(t -> t - .id("call_KcAjWtAww20AihPHphUh46Gd") - .function(f -> f - .arguments("{\"location\":\"Boston, MA\"}") - .name("get_current_weather") - ) - .type("function") - )),Message.of(me -> me - .content(co -> co - .string("The weather is cold") - ) - .role("tool") - .toolCallId("call_KcAjWtAww20AihPHphUh46Gd")))) - ) - ); diff --git a/specification/inference/chat_completion_unified/examples/request/PostChatCompletionRequestExample3.yaml b/specification/inference/chat_completion_unified/examples/request/PostChatCompletionRequestExample3.yaml index 67aa38cd50..6e429ddd75 100644 --- a/specification/inference/chat_completion_unified/examples/request/PostChatCompletionRequestExample3.yaml +++ b/specification/inference/chat_completion_unified/examples/request/PostChatCompletionRequestExample3.yaml @@ -41,206 +41,3 @@ value: |- } } } -alternatives: - - language: Python - code: |- - resp = client.inference.chat_completion_unified( - inference_id="openai-completion", - chat_completion_request={ - "messages": [ - { - "role": "user", - "content": [ - { - "type": "text", - "text": "What's the price of a scarf?" - } - ] - } - ], - "tools": [ - { - "type": "function", - "function": { - "name": "get_current_price", - "description": "Get the current price of a item", - "parameters": { - "type": "object", - "properties": { - "item": { - "id": "123" - } - } - } - } - } - ], - "tool_choice": { - "type": "function", - "function": { - "name": "get_current_price" - } - } - }, - ) - - language: JavaScript - code: |- - const response = await client.inference.chatCompletionUnified({ - inference_id: "openai-completion", - chat_completion_request: { - messages: [ - { - role: "user", - content: [ - { - type: "text", - text: "What's the price of a scarf?", - }, - ], - }, - ], - tools: [ - { - type: "function", - function: { - name: "get_current_price", - description: "Get the current price of a item", - parameters: { - type: "object", - properties: { - item: { - id: "123", - }, - }, - }, - }, - }, - ], - tool_choice: { - type: "function", - function: { - name: "get_current_price", - }, - }, - }, - }); - - language: Ruby - code: |- - response = client.inference.chat_completion_unified( - inference_id: "openai-completion", - body: { - "messages": [ - { - "role": "user", - "content": [ - { - "type": "text", - "text": "What's the price of a scarf?" - } - ] - } - ], - "tools": [ - { - "type": "function", - "function": { - "name": "get_current_price", - "description": "Get the current price of a item", - "parameters": { - "type": "object", - "properties": { - "item": { - "id": "123" - } - } - } - } - } - ], - "tool_choice": { - "type": "function", - "function": { - "name": "get_current_price" - } - } - } - ) - - language: PHP - code: |- - $resp = $client->inference()->chatCompletionUnified([ - "inference_id" => "openai-completion", - "body" => [ - "messages" => array( - [ - "role" => "user", - "content" => array( - [ - "type" => "text", - "text" => "What's the price of a scarf?", - ], - ), - ], - ), - "tools" => array( - [ - "type" => "function", - "function" => [ - "name" => "get_current_price", - "description" => "Get the current price of a item", - "parameters" => [ - "type" => "object", - "properties" => [ - "item" => [ - "id" => "123", - ], - ], - ], - ], - ], - ), - "tool_choice" => [ - "type" => "function", - "function" => [ - "name" => "get_current_price", - ], - ], - ], - ]); - - language: curl - code: - "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d - '{\"messages\":[{\"role\":\"user\",\"content\":[{\"type\":\"text\",\"text\":\"What'\"'\"'s the price of a - scarf?\"}]}],\"tools\":[{\"type\":\"function\",\"function\":{\"name\":\"get_current_price\",\"description\":\"Get the current - price of a - item\",\"parameters\":{\"type\":\"object\",\"properties\":{\"item\":{\"id\":\"123\"}}}}}],\"tool_choice\":{\"type\":\"function\ - \",\"function\":{\"name\":\"get_current_price\"}}}' - \"$ELASTICSEARCH_URL/_inference/chat_completion/openai-completion/_stream\"" - - language: Java - code: | - client.inference().chatCompletionUnified(c -> c - .inferenceId("openai-completion") - .chatCompletionRequest(ch -> ch - .messages(m -> m - .content(co -> co - .string("What's the price of a scarf?") - ) - .role("user") - ) - .toolChoice(t -> t - .object(o -> o - .type("function") - .function(f -> f - .name("get_current_price") - ) - ) - ) - .tools(to -> to - .type("function") - .function(f -> f - .description("Get the current price of a item") - .name("get_current_price") - .parameters(JsonData.fromJson("{\"type\":\"object\",\"properties\":{\"item\":{\"id\":\"123\"}}}")) - ) - ) - ) - ); diff --git a/specification/inference/completion/examples/request/CompletionRequestExample1.yaml b/specification/inference/completion/examples/request/CompletionRequestExample1.yaml index 2b001f3cb3..ac5dd76499 100644 --- a/specification/inference/completion/examples/request/CompletionRequestExample1.yaml +++ b/specification/inference/completion/examples/request/CompletionRequestExample1.yaml @@ -6,42 +6,3 @@ value: |- { "input": "What is Elastic?" } -alternatives: - - language: Python - code: |- - resp = client.inference.completion( - inference_id="openai_chat_completions", - input="What is Elastic?", - ) - - language: JavaScript - code: |- - const response = await client.inference.completion({ - inference_id: "openai_chat_completions", - input: "What is Elastic?", - }); - - language: Ruby - code: |- - response = client.inference.completion( - inference_id: "openai_chat_completions", - body: { - "input": "What is Elastic?" - } - ) - - language: PHP - code: |- - $resp = $client->inference()->completion([ - "inference_id" => "openai_chat_completions", - "body" => [ - "input" => "What is Elastic?", - ], - ]); - - language: curl - code: - 'curl -X POST -H "Authorization: ApiKey $ELASTIC_API_KEY" -H "Content-Type: application/json" -d ''{"input":"What is - Elastic?"}'' "$ELASTICSEARCH_URL/_inference/completion/openai_chat_completions"' - - language: Java - code: | - client.inference().completion(c -> c - .inferenceId("openai_chat_completions") - .input("What is Elastic?") - ); diff --git a/specification/inference/delete/examples/request/InferenceDeleteExample1.yaml b/specification/inference/delete/examples/request/InferenceDeleteExample1.yaml index d564f5d781..862899b533 100644 --- a/specification/inference/delete/examples/request/InferenceDeleteExample1.yaml +++ b/specification/inference/delete/examples/request/InferenceDeleteExample1.yaml @@ -1,34 +1 @@ method_request: DELETE /_inference/sparse_embedding/my-elser-model -alternatives: - - language: Python - code: |- - resp = client.inference.delete( - task_type="sparse_embedding", - inference_id="my-elser-model", - ) - - language: JavaScript - code: |- - const response = await client.inference.delete({ - task_type: "sparse_embedding", - inference_id: "my-elser-model", - }); - - language: Ruby - code: |- - response = client.inference.delete( - task_type: "sparse_embedding", - inference_id: "my-elser-model" - ) - - language: PHP - code: |- - $resp = $client->inference()->delete([ - "task_type" => "sparse_embedding", - "inference_id" => "my-elser-model", - ]); - - language: curl - code: 'curl -X DELETE -H "Authorization: ApiKey $ELASTIC_API_KEY" "$ELASTICSEARCH_URL/_inference/sparse_embedding/my-elser-model"' - - language: Java - code: | - client.inference().delete(d -> d - .inferenceId("my-elser-model") - .taskType(TaskType.SparseEmbedding) - ); diff --git a/specification/inference/get/examples/request/InferenceGetExample1.yaml b/specification/inference/get/examples/request/InferenceGetExample1.yaml index 119fddbce6..de31182d50 100644 --- a/specification/inference/get/examples/request/InferenceGetExample1.yaml +++ b/specification/inference/get/examples/request/InferenceGetExample1.yaml @@ -1,34 +1 @@ method_request: GET _inference/sparse_embedding/my-elser-model -alternatives: - - language: Python - code: |- - resp = client.inference.get( - task_type="sparse_embedding", - inference_id="my-elser-model", - ) - - language: JavaScript - code: |- - const response = await client.inference.get({ - task_type: "sparse_embedding", - inference_id: "my-elser-model", - }); - - language: Ruby - code: |- - response = client.inference.get( - task_type: "sparse_embedding", - inference_id: "my-elser-model" - ) - - language: PHP - code: |- - $resp = $client->inference()->get([ - "task_type" => "sparse_embedding", - "inference_id" => "my-elser-model", - ]); - - language: curl - code: 'curl -X GET -H "Authorization: ApiKey $ELASTIC_API_KEY" "$ELASTICSEARCH_URL/_inference/sparse_embedding/my-elser-model"' - - language: Java - code: | - client.inference().get(g -> g - .inferenceId("my-elser-model") - .taskType(TaskType.SparseEmbedding) - ); diff --git a/specification/inference/inference/InferenceRequest.ts b/specification/inference/inference/InferenceRequest.ts index 32a39b548f..cb9e9487f3 100644 --- a/specification/inference/inference/InferenceRequest.ts +++ b/specification/inference/inference/InferenceRequest.ts @@ -82,6 +82,19 @@ export interface Request extends RequestBase { * > Inference endpoints for the `completion` task type currently only support a single string as input. */ input: string | Array + /** + * Specifies the input data type for the text embedding model. The `input_type` parameter only applies to Inference Endpoints with the `text_embedding` task type. Possible values include: + * * `SEARCH` + * * `INGEST` + * * `CLASSIFICATION` + * * `CLUSTERING` + * Not all services support all values. Unsupported values will trigger a validation exception. + * Accepted values depend on the configured inference service, refer to the relevant service-specific documentation for more info. + * + * > info + * > The `input_type` parameter specified on the root level of the request body will take precedence over the `input_type` parameter specified in `task_settings`. + */ + input_type?: string /** * Task settings for the individual inference request. * These settings are specific to the task type you specified and override the task settings specified when initializing the service. diff --git a/specification/inference/put/PutRequest.ts b/specification/inference/put/PutRequest.ts index f62d6c4e14..8343da108e 100644 --- a/specification/inference/put/PutRequest.ts +++ b/specification/inference/put/PutRequest.ts @@ -19,6 +19,7 @@ import { RequestBase } from '@_types/Base' import { Id } from '@_types/common' +import { Duration } from '@_types/Time' import { InferenceEndpoint } from '@inference/_types/Services' import { TaskType } from '@inference/_types/TaskType' @@ -32,20 +33,23 @@ import { TaskType } from '@inference/_types/TaskType' * The following integrations are available through the inference API. You can find the available task types next to the integration name: * * AlibabaCloud AI Search (`completion`, `rerank`, `sparse_embedding`, `text_embedding`) * * Amazon Bedrock (`completion`, `text_embedding`) + * * Amazon SageMaker (`chat_completion`, `completion`, `rerank`, `sparse_embedding`, `text_embedding`) * * Anthropic (`completion`) * * Azure AI Studio (`completion`, `text_embedding`) * * Azure OpenAI (`completion`, `text_embedding`) * * Cohere (`completion`, `rerank`, `text_embedding`) + * * DeepSeek (`chat_completion`, `completion`) * * Elasticsearch (`rerank`, `sparse_embedding`, `text_embedding` - this service is for built-in models and models uploaded through Eland) * * ELSER (`sparse_embedding`) * * Google AI Studio (`completion`, `text_embedding`) - * * Google Vertex AI (`rerank`, `text_embedding`) + * * Google Vertex AI (`chat_completion`, `completion`, `rerank`, `text_embedding`) * * Hugging Face (`chat_completion`, `completion`, `rerank`, `text_embedding`) + * * JinaAI (`rerank`, `text_embedding`) + * * Llama (`chat_completion`, `completion`, `text_embedding`) * * Mistral (`chat_completion`, `completion`, `text_embedding`) * * OpenAI (`chat_completion`, `completion`, `text_embedding`) - * * VoyageAI (`text_embedding`, `rerank`) + * * VoyageAI (`rerank`, `text_embedding`) * * Watsonx inference integration (`text_embedding`) - * * JinaAI (`text_embedding`, `rerank`) * @rest_spec_name inference.put * @availability stack since=8.11.0 stability=stable visibility=public * @availability serverless stability=stable visibility=public @@ -73,6 +77,13 @@ export interface Request extends RequestBase { */ inference_id: Id } + query_parameters: { + /** + * Specifies the amount of time to wait for the inference endpoint to be created. + * @server_default 30s + */ + timeout?: Duration + } /** @codegen_name inference_config */ body: InferenceEndpoint } diff --git a/specification/inference/put/examples/request/InferencePutExample1.yaml b/specification/inference/put/examples/request/InferencePutExample1.yaml index 5b6236368e..68d00bdca9 100644 --- a/specification/inference/put/examples/request/InferencePutExample1.yaml +++ b/specification/inference/put/examples/request/InferencePutExample1.yaml @@ -7,72 +7,8 @@ value: |- "model_id": "rerank-english-v3.0", "api_key": "{{COHERE_API_KEY}}" } + "chunking_settings": { + "strategy": "recursive", + "max_chunk_size": 200, + "separator_group": "markdown" } -alternatives: - - language: Python - code: |- - resp = client.inference.put( - task_type="rerank", - inference_id="my-rerank-model", - inference_config={ - "service": "cohere", - "service_settings": { - "model_id": "rerank-english-v3.0", - "api_key": "{{COHERE_API_KEY}}" - } - }, - ) - - language: JavaScript - code: |- - const response = await client.inference.put({ - task_type: "rerank", - inference_id: "my-rerank-model", - inference_config: { - service: "cohere", - service_settings: { - model_id: "rerank-english-v3.0", - api_key: "{{COHERE_API_KEY}}", - }, - }, - }); - - language: Ruby - code: |- - response = client.inference.put( - task_type: "rerank", - inference_id: "my-rerank-model", - body: { - "service": "cohere", - "service_settings": { - "model_id": "rerank-english-v3.0", - "api_key": "{{COHERE_API_KEY}}" - } - } - ) - - language: PHP - code: |- - $resp = $client->inference()->put([ - "task_type" => "rerank", - "inference_id" => "my-rerank-model", - "body" => [ - "service" => "cohere", - "service_settings" => [ - "model_id" => "rerank-english-v3.0", - "api_key" => "{{COHERE_API_KEY}}", - ], - ], - ]); - - language: curl - code: - 'curl -X PUT -H "Authorization: ApiKey $ELASTIC_API_KEY" -H "Content-Type: application/json" -d - ''{"service":"cohere","service_settings":{"model_id":"rerank-english-v3.0","api_key":"{{COHERE_API_KEY}}"}}'' - "$ELASTICSEARCH_URL/_inference/rerank/my-rerank-model"' - - language: Java - code: | - client.inference().put(p -> p - .inferenceId("my-rerank-model") - .taskType(TaskType.Rerank) - .inferenceConfig(i -> i - .service("cohere") - .serviceSettings(JsonData.fromJson("{\"model_id\":\"rerank-english-v3.0\",\"api_key\":\"{{COHERE_API_KEY}}\"}")) - ) - ); diff --git a/specification/inference/put_alibabacloud/PutAlibabaCloudRequest.ts b/specification/inference/put_alibabacloud/PutAlibabaCloudRequest.ts index f390250bbd..c725397056 100644 --- a/specification/inference/put_alibabacloud/PutAlibabaCloudRequest.ts +++ b/specification/inference/put_alibabacloud/PutAlibabaCloudRequest.ts @@ -19,6 +19,7 @@ import { RequestBase } from '@_types/Base' import { Id } from '@_types/common' +import { Duration } from '@_types/Time' import { AlibabaCloudServiceSettings, AlibabaCloudServiceType, @@ -54,6 +55,13 @@ export interface Request extends RequestBase { */ alibabacloud_inference_id: Id } + query_parameters: { + /** + * Specifies the amount of time to wait for the inference endpoint to be created. + * @server_default 30s + */ + timeout?: Duration + } body: { /** * The chunking configuration object. diff --git a/specification/inference/put_alibabacloud/examples/request/PutAlibabaCloudRequestExample1.yaml b/specification/inference/put_alibabacloud/examples/request/PutAlibabaCloudRequestExample1.yaml index 5685eae079..4017d885b7 100644 --- a/specification/inference/put_alibabacloud/examples/request/PutAlibabaCloudRequestExample1.yaml +++ b/specification/inference/put_alibabacloud/examples/request/PutAlibabaCloudRequestExample1.yaml @@ -12,80 +12,3 @@ value: |- "workspace" : "default" } } -alternatives: - - language: Python - code: |- - resp = client.inference.put( - task_type="completion", - inference_id="alibabacloud_ai_search_completion", - inference_config={ - "service": "alibabacloud-ai-search", - "service_settings": { - "host": "default-j01.platform-cn-shanghai.opensearch.aliyuncs.com", - "api_key": "AlibabaCloud-API-Key", - "service_id": "ops-qwen-turbo", - "workspace": "default" - } - }, - ) - - language: JavaScript - code: |- - const response = await client.inference.put({ - task_type: "completion", - inference_id: "alibabacloud_ai_search_completion", - inference_config: { - service: "alibabacloud-ai-search", - service_settings: { - host: "default-j01.platform-cn-shanghai.opensearch.aliyuncs.com", - api_key: "AlibabaCloud-API-Key", - service_id: "ops-qwen-turbo", - workspace: "default", - }, - }, - }); - - language: Ruby - code: |- - response = client.inference.put( - task_type: "completion", - inference_id: "alibabacloud_ai_search_completion", - body: { - "service": "alibabacloud-ai-search", - "service_settings": { - "host": "default-j01.platform-cn-shanghai.opensearch.aliyuncs.com", - "api_key": "AlibabaCloud-API-Key", - "service_id": "ops-qwen-turbo", - "workspace": "default" - } - } - ) - - language: PHP - code: |- - $resp = $client->inference()->put([ - "task_type" => "completion", - "inference_id" => "alibabacloud_ai_search_completion", - "body" => [ - "service" => "alibabacloud-ai-search", - "service_settings" => [ - "host" => "default-j01.platform-cn-shanghai.opensearch.aliyuncs.com", - "api_key" => "AlibabaCloud-API-Key", - "service_id" => "ops-qwen-turbo", - "workspace" => "default", - ], - ], - ]); - - language: curl - code: - "curl -X PUT -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d - '{\"service\":\"alibabacloud-ai-search\",\"service_settings\":{\"host\":\"default-j01.platform-cn-shanghai.opensearch.aliyunc\ - s.com\",\"api_key\":\"AlibabaCloud-API-Key\",\"service_id\":\"ops-qwen-turbo\",\"workspace\":\"default\"}}' - \"$ELASTICSEARCH_URL/_inference/completion/alibabacloud_ai_search_completion\"" - - language: Java - code: > - client.inference().put(p -> p - .inferenceId("alibabacloud_ai_search_completion") - .taskType(TaskType.Completion) - .inferenceConfig(i -> i - .service("alibabacloud-ai-search") - .serviceSettings(JsonData.fromJson("{\"host\":\"default-j01.platform-cn-shanghai.opensearch.aliyuncs.com\",\"api_key\":\"AlibabaCloud-API-Key\",\"service_id\":\"ops-qwen-turbo\",\"workspace\":\"default\"}")) - ) - ); diff --git a/specification/inference/put_alibabacloud/examples/request/PutAlibabaCloudRequestExample2.yaml b/specification/inference/put_alibabacloud/examples/request/PutAlibabaCloudRequestExample2.yaml index 583471ff3c..d18f3f263c 100644 --- a/specification/inference/put_alibabacloud/examples/request/PutAlibabaCloudRequestExample2.yaml +++ b/specification/inference/put_alibabacloud/examples/request/PutAlibabaCloudRequestExample2.yaml @@ -12,80 +12,3 @@ value: |- "workspace": "default" } } -alternatives: - - language: Python - code: |- - resp = client.inference.put( - task_type="rerank", - inference_id="alibabacloud_ai_search_rerank", - inference_config={ - "service": "alibabacloud-ai-search", - "service_settings": { - "api_key": "AlibabaCloud-API-Key", - "service_id": "ops-bge-reranker-larger", - "host": "default-j01.platform-cn-shanghai.opensearch.aliyuncs.com", - "workspace": "default" - } - }, - ) - - language: JavaScript - code: |- - const response = await client.inference.put({ - task_type: "rerank", - inference_id: "alibabacloud_ai_search_rerank", - inference_config: { - service: "alibabacloud-ai-search", - service_settings: { - api_key: "AlibabaCloud-API-Key", - service_id: "ops-bge-reranker-larger", - host: "default-j01.platform-cn-shanghai.opensearch.aliyuncs.com", - workspace: "default", - }, - }, - }); - - language: Ruby - code: |- - response = client.inference.put( - task_type: "rerank", - inference_id: "alibabacloud_ai_search_rerank", - body: { - "service": "alibabacloud-ai-search", - "service_settings": { - "api_key": "AlibabaCloud-API-Key", - "service_id": "ops-bge-reranker-larger", - "host": "default-j01.platform-cn-shanghai.opensearch.aliyuncs.com", - "workspace": "default" - } - } - ) - - language: PHP - code: |- - $resp = $client->inference()->put([ - "task_type" => "rerank", - "inference_id" => "alibabacloud_ai_search_rerank", - "body" => [ - "service" => "alibabacloud-ai-search", - "service_settings" => [ - "api_key" => "AlibabaCloud-API-Key", - "service_id" => "ops-bge-reranker-larger", - "host" => "default-j01.platform-cn-shanghai.opensearch.aliyuncs.com", - "workspace" => "default", - ], - ], - ]); - - language: curl - code: - "curl -X PUT -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d - '{\"service\":\"alibabacloud-ai-search\",\"service_settings\":{\"api_key\":\"AlibabaCloud-API-Key\",\"service_id\":\"ops-bge-\ - reranker-larger\",\"host\":\"default-j01.platform-cn-shanghai.opensearch.aliyuncs.com\",\"workspace\":\"default\"}}' - \"$ELASTICSEARCH_URL/_inference/rerank/alibabacloud_ai_search_rerank\"" - - language: Java - code: > - client.inference().put(p -> p - .inferenceId("alibabacloud_ai_search_rerank") - .taskType(TaskType.Rerank) - .inferenceConfig(i -> i - .service("alibabacloud-ai-search") - .serviceSettings(JsonData.fromJson("{\"api_key\":\"AlibabaCloud-API-Key\",\"service_id\":\"ops-bge-reranker-larger\",\"host\":\"default-j01.platform-cn-shanghai.opensearch.aliyuncs.com\",\"workspace\":\"default\"}")) - ) - ); diff --git a/specification/inference/put_alibabacloud/examples/request/PutAlibabaCloudRequestExample3.yaml b/specification/inference/put_alibabacloud/examples/request/PutAlibabaCloudRequestExample3.yaml index 8a1d027bb5..9a19ef8fa1 100644 --- a/specification/inference/put_alibabacloud/examples/request/PutAlibabaCloudRequestExample3.yaml +++ b/specification/inference/put_alibabacloud/examples/request/PutAlibabaCloudRequestExample3.yaml @@ -14,80 +14,3 @@ value: |- "workspace": "default" } } -alternatives: - - language: Python - code: |- - resp = client.inference.put( - task_type="sparse_embedding", - inference_id="alibabacloud_ai_search_sparse", - inference_config={ - "service": "alibabacloud-ai-search", - "service_settings": { - "api_key": "AlibabaCloud-API-Key", - "service_id": "ops-text-sparse-embedding-001", - "host": "default-j01.platform-cn-shanghai.opensearch.aliyuncs.com", - "workspace": "default" - } - }, - ) - - language: JavaScript - code: |- - const response = await client.inference.put({ - task_type: "sparse_embedding", - inference_id: "alibabacloud_ai_search_sparse", - inference_config: { - service: "alibabacloud-ai-search", - service_settings: { - api_key: "AlibabaCloud-API-Key", - service_id: "ops-text-sparse-embedding-001", - host: "default-j01.platform-cn-shanghai.opensearch.aliyuncs.com", - workspace: "default", - }, - }, - }); - - language: Ruby - code: |- - response = client.inference.put( - task_type: "sparse_embedding", - inference_id: "alibabacloud_ai_search_sparse", - body: { - "service": "alibabacloud-ai-search", - "service_settings": { - "api_key": "AlibabaCloud-API-Key", - "service_id": "ops-text-sparse-embedding-001", - "host": "default-j01.platform-cn-shanghai.opensearch.aliyuncs.com", - "workspace": "default" - } - } - ) - - language: PHP - code: |- - $resp = $client->inference()->put([ - "task_type" => "sparse_embedding", - "inference_id" => "alibabacloud_ai_search_sparse", - "body" => [ - "service" => "alibabacloud-ai-search", - "service_settings" => [ - "api_key" => "AlibabaCloud-API-Key", - "service_id" => "ops-text-sparse-embedding-001", - "host" => "default-j01.platform-cn-shanghai.opensearch.aliyuncs.com", - "workspace" => "default", - ], - ], - ]); - - language: curl - code: - "curl -X PUT -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d - '{\"service\":\"alibabacloud-ai-search\",\"service_settings\":{\"api_key\":\"AlibabaCloud-API-Key\",\"service_id\":\"ops-text\ - -sparse-embedding-001\",\"host\":\"default-j01.platform-cn-shanghai.opensearch.aliyuncs.com\",\"workspace\":\"default\"}}' - \"$ELASTICSEARCH_URL/_inference/sparse_embedding/alibabacloud_ai_search_sparse\"" - - language: Java - code: > - client.inference().put(p -> p - .inferenceId("alibabacloud_ai_search_sparse") - .taskType(TaskType.SparseEmbedding) - .inferenceConfig(i -> i - .service("alibabacloud-ai-search") - .serviceSettings(JsonData.fromJson("{\"api_key\":\"AlibabaCloud-API-Key\",\"service_id\":\"ops-text-sparse-embedding-001\",\"host\":\"default-j01.platform-cn-shanghai.opensearch.aliyuncs.com\",\"workspace\":\"default\"}")) - ) - ); diff --git a/specification/inference/put_alibabacloud/examples/request/PutAlibabaCloudRequestExample4.yaml b/specification/inference/put_alibabacloud/examples/request/PutAlibabaCloudRequestExample4.yaml index c0ee46957e..9e8710a7c7 100644 --- a/specification/inference/put_alibabacloud/examples/request/PutAlibabaCloudRequestExample4.yaml +++ b/specification/inference/put_alibabacloud/examples/request/PutAlibabaCloudRequestExample4.yaml @@ -14,80 +14,3 @@ value: |- "workspace": "default" } } -alternatives: - - language: Python - code: |- - resp = client.inference.put( - task_type="text_embedding", - inference_id="alibabacloud_ai_search_embeddings", - inference_config={ - "service": "alibabacloud-ai-search", - "service_settings": { - "api_key": "AlibabaCloud-API-Key", - "service_id": "ops-text-embedding-001", - "host": "default-j01.platform-cn-shanghai.opensearch.aliyuncs.com", - "workspace": "default" - } - }, - ) - - language: JavaScript - code: |- - const response = await client.inference.put({ - task_type: "text_embedding", - inference_id: "alibabacloud_ai_search_embeddings", - inference_config: { - service: "alibabacloud-ai-search", - service_settings: { - api_key: "AlibabaCloud-API-Key", - service_id: "ops-text-embedding-001", - host: "default-j01.platform-cn-shanghai.opensearch.aliyuncs.com", - workspace: "default", - }, - }, - }); - - language: Ruby - code: |- - response = client.inference.put( - task_type: "text_embedding", - inference_id: "alibabacloud_ai_search_embeddings", - body: { - "service": "alibabacloud-ai-search", - "service_settings": { - "api_key": "AlibabaCloud-API-Key", - "service_id": "ops-text-embedding-001", - "host": "default-j01.platform-cn-shanghai.opensearch.aliyuncs.com", - "workspace": "default" - } - } - ) - - language: PHP - code: |- - $resp = $client->inference()->put([ - "task_type" => "text_embedding", - "inference_id" => "alibabacloud_ai_search_embeddings", - "body" => [ - "service" => "alibabacloud-ai-search", - "service_settings" => [ - "api_key" => "AlibabaCloud-API-Key", - "service_id" => "ops-text-embedding-001", - "host" => "default-j01.platform-cn-shanghai.opensearch.aliyuncs.com", - "workspace" => "default", - ], - ], - ]); - - language: curl - code: - "curl -X PUT -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d - '{\"service\":\"alibabacloud-ai-search\",\"service_settings\":{\"api_key\":\"AlibabaCloud-API-Key\",\"service_id\":\"ops-text\ - -embedding-001\",\"host\":\"default-j01.platform-cn-shanghai.opensearch.aliyuncs.com\",\"workspace\":\"default\"}}' - \"$ELASTICSEARCH_URL/_inference/text_embedding/alibabacloud_ai_search_embeddings\"" - - language: Java - code: > - client.inference().put(p -> p - .inferenceId("alibabacloud_ai_search_embeddings") - .taskType(TaskType.TextEmbedding) - .inferenceConfig(i -> i - .service("alibabacloud-ai-search") - .serviceSettings(JsonData.fromJson("{\"api_key\":\"AlibabaCloud-API-Key\",\"service_id\":\"ops-text-embedding-001\",\"host\":\"default-j01.platform-cn-shanghai.opensearch.aliyuncs.com\",\"workspace\":\"default\"}")) - ) - ); diff --git a/specification/inference/put_amazonbedrock/PutAmazonBedrockRequest.ts b/specification/inference/put_amazonbedrock/PutAmazonBedrockRequest.ts index 0420c26263..61927ce3bf 100644 --- a/specification/inference/put_amazonbedrock/PutAmazonBedrockRequest.ts +++ b/specification/inference/put_amazonbedrock/PutAmazonBedrockRequest.ts @@ -19,6 +19,7 @@ import { RequestBase } from '@_types/Base' import { Id } from '@_types/common' +import { Duration } from '@_types/Time' import { AmazonBedrockServiceSettings, AmazonBedrockServiceType, @@ -57,6 +58,13 @@ export interface Request extends RequestBase { */ amazonbedrock_inference_id: Id } + query_parameters: { + /** + * Specifies the amount of time to wait for the inference endpoint to be created. + * @server_default 30s + */ + timeout?: Duration + } body: { /** * The chunking configuration object. diff --git a/specification/inference/put_amazonbedrock/examples/request/PutAmazonBedrockRequestExample1.yaml b/specification/inference/put_amazonbedrock/examples/request/PutAmazonBedrockRequestExample1.yaml index 6a335421df..ee1b144b94 100644 --- a/specification/inference/put_amazonbedrock/examples/request/PutAmazonBedrockRequestExample1.yaml +++ b/specification/inference/put_amazonbedrock/examples/request/PutAmazonBedrockRequestExample1.yaml @@ -13,84 +13,3 @@ value: |- "model": "amazon.titan-embed-text-v2:0" } } -alternatives: - - language: Python - code: |- - resp = client.inference.put( - task_type="text_embedding", - inference_id="amazon_bedrock_embeddings", - inference_config={ - "service": "amazonbedrock", - "service_settings": { - "access_key": "AWS-access-key", - "secret_key": "AWS-secret-key", - "region": "us-east-1", - "provider": "amazontitan", - "model": "amazon.titan-embed-text-v2:0" - } - }, - ) - - language: JavaScript - code: |- - const response = await client.inference.put({ - task_type: "text_embedding", - inference_id: "amazon_bedrock_embeddings", - inference_config: { - service: "amazonbedrock", - service_settings: { - access_key: "AWS-access-key", - secret_key: "AWS-secret-key", - region: "us-east-1", - provider: "amazontitan", - model: "amazon.titan-embed-text-v2:0", - }, - }, - }); - - language: Ruby - code: |- - response = client.inference.put( - task_type: "text_embedding", - inference_id: "amazon_bedrock_embeddings", - body: { - "service": "amazonbedrock", - "service_settings": { - "access_key": "AWS-access-key", - "secret_key": "AWS-secret-key", - "region": "us-east-1", - "provider": "amazontitan", - "model": "amazon.titan-embed-text-v2:0" - } - } - ) - - language: PHP - code: |- - $resp = $client->inference()->put([ - "task_type" => "text_embedding", - "inference_id" => "amazon_bedrock_embeddings", - "body" => [ - "service" => "amazonbedrock", - "service_settings" => [ - "access_key" => "AWS-access-key", - "secret_key" => "AWS-secret-key", - "region" => "us-east-1", - "provider" => "amazontitan", - "model" => "amazon.titan-embed-text-v2:0", - ], - ], - ]); - - language: curl - code: - "curl -X PUT -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d - '{\"service\":\"amazonbedrock\",\"service_settings\":{\"access_key\":\"AWS-access-key\",\"secret_key\":\"AWS-secret-key\",\"r\ - egion\":\"us-east-1\",\"provider\":\"amazontitan\",\"model\":\"amazon.titan-embed-text-v2:0\"}}' - \"$ELASTICSEARCH_URL/_inference/text_embedding/amazon_bedrock_embeddings\"" - - language: Java - code: > - client.inference().put(p -> p - .inferenceId("amazon_bedrock_embeddings") - .taskType(TaskType.TextEmbedding) - .inferenceConfig(i -> i - .service("amazonbedrock") - .serviceSettings(JsonData.fromJson("{\"access_key\":\"AWS-access-key\",\"secret_key\":\"AWS-secret-key\",\"region\":\"us-east-1\",\"provider\":\"amazontitan\",\"model\":\"amazon.titan-embed-text-v2:0\"}")) - ) - ); diff --git a/specification/inference/put_amazonbedrock/examples/request/PutAmazonBedrockRequestExample2.yaml b/specification/inference/put_amazonbedrock/examples/request/PutAmazonBedrockRequestExample2.yaml index 75cc653d9d..336aa336c4 100644 --- a/specification/inference/put_amazonbedrock/examples/request/PutAmazonBedrockRequestExample2.yaml +++ b/specification/inference/put_amazonbedrock/examples/request/PutAmazonBedrockRequestExample2.yaml @@ -10,71 +10,3 @@ value: |- "model_id": "gpt-3.5-turbo" } } -alternatives: - - language: Python - code: |- - resp = client.inference.put( - task_type="completion", - inference_id="openai-completion", - inference_config={ - "service": "openai", - "service_settings": { - "api_key": "OpenAI-API-Key", - "model_id": "gpt-3.5-turbo" - } - }, - ) - - language: JavaScript - code: |- - const response = await client.inference.put({ - task_type: "completion", - inference_id: "openai-completion", - inference_config: { - service: "openai", - service_settings: { - api_key: "OpenAI-API-Key", - model_id: "gpt-3.5-turbo", - }, - }, - }); - - language: Ruby - code: |- - response = client.inference.put( - task_type: "completion", - inference_id: "openai-completion", - body: { - "service": "openai", - "service_settings": { - "api_key": "OpenAI-API-Key", - "model_id": "gpt-3.5-turbo" - } - } - ) - - language: PHP - code: |- - $resp = $client->inference()->put([ - "task_type" => "completion", - "inference_id" => "openai-completion", - "body" => [ - "service" => "openai", - "service_settings" => [ - "api_key" => "OpenAI-API-Key", - "model_id" => "gpt-3.5-turbo", - ], - ], - ]); - - language: curl - code: - 'curl -X PUT -H "Authorization: ApiKey $ELASTIC_API_KEY" -H "Content-Type: application/json" -d - ''{"service":"openai","service_settings":{"api_key":"OpenAI-API-Key","model_id":"gpt-3.5-turbo"}}'' - "$ELASTICSEARCH_URL/_inference/completion/openai-completion"' - - language: Java - code: | - client.inference().put(p -> p - .inferenceId("openai-completion") - .taskType(TaskType.Completion) - .inferenceConfig(i -> i - .service("openai") - .serviceSettings(JsonData.fromJson("{\"api_key\":\"OpenAI-API-Key\",\"model_id\":\"gpt-3.5-turbo\"}")) - ) - ); diff --git a/specification/inference/put_amazonsagemaker/PutAmazonSageMakerRequest.ts b/specification/inference/put_amazonsagemaker/PutAmazonSageMakerRequest.ts new file mode 100644 index 0000000000..1b020e5fc8 --- /dev/null +++ b/specification/inference/put_amazonsagemaker/PutAmazonSageMakerRequest.ts @@ -0,0 +1,86 @@ +/* + * 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. + */ + +import { RequestBase } from '@_types/Base' +import { Id } from '@_types/common' +import { Duration } from '@_types/Time' +import { + AmazonSageMakerServiceSettings, + AmazonSageMakerServiceType, + AmazonSageMakerTaskSettings +} from '@inference/_types/CommonTypes' +import { InferenceChunkingSettings } from '@inference/_types/Services' +import { TaskTypeAmazonSageMaker } from '@inference/_types/TaskType' + +/** + * Create an Amazon SageMaker inference endpoint. + * + * Create an inference endpoint to perform an inference task with the `amazon_sagemaker` service. + * @rest_spec_name inference.put_amazonsagemaker + * @availability stack since=9.1.0 stability=stable visibility=public + * @availability serverless stability=stable visibility=public + * @cluster_privileges manage_inference + * @doc_id inference-api-put-amazonsagemaker + */ +export interface Request extends RequestBase { + urls: [ + { + path: '/_inference/{task_type}/{amazonsagemaker_inference_id}' + methods: ['PUT'] + } + ] + path_parts: { + /** + * The type of the inference task that the model will perform. + */ + task_type: TaskTypeAmazonSageMaker + /** + * The unique identifier of the inference endpoint. + */ + amazonsagemaker_inference_id: Id + } + query_parameters: { + /** + * Specifies the amount of time to wait for the inference endpoint to be created. + * @server_default 30s + */ + timeout?: Duration + } + body: { + /** + * The chunking configuration object. + * @ext_doc_id inference-chunking + */ + chunking_settings?: InferenceChunkingSettings + /** + * The type of service supported for the specified task type. In this case, `amazon_sagemaker`. + */ + service: AmazonSageMakerServiceType + /** + * Settings used to install the inference model. + * These settings are specific to the `amazon_sagemaker` service and `service_settings.api` you specified. + */ + service_settings: AmazonSageMakerServiceSettings + /** + * Settings to configure the inference task. + * These settings are specific to the task type and `service_settings.api` you specified. + */ + task_settings?: AmazonSageMakerTaskSettings + } +} diff --git a/specification/inference/put_amazonsagemaker/PutAmazonSageMakerResponse.ts b/specification/inference/put_amazonsagemaker/PutAmazonSageMakerResponse.ts new file mode 100644 index 0000000000..fe0aa373f5 --- /dev/null +++ b/specification/inference/put_amazonsagemaker/PutAmazonSageMakerResponse.ts @@ -0,0 +1,25 @@ +/* + * 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. + */ + +import { InferenceEndpointInfoAmazonSageMaker } from '@inference/_types/Services' + +export class Response { + /** @codegen_name endpoint_info */ + body: InferenceEndpointInfoAmazonSageMaker +} diff --git a/specification/inference/put_amazonsagemaker/example/request/PutAmazonSageMakerRequestExample1.yaml b/specification/inference/put_amazonsagemaker/example/request/PutAmazonSageMakerRequestExample1.yaml new file mode 100644 index 0000000000..006249bbd1 --- /dev/null +++ b/specification/inference/put_amazonsagemaker/example/request/PutAmazonSageMakerRequestExample1.yaml @@ -0,0 +1,17 @@ +summary: A text embedding task +description: Run `PUT _inference/text_embedding/amazon_sagemaker_embeddings` to create an inference endpoint that performs a text embedding task. +method_request: 'PUT _inference/text_embedding/amazon_sagemaker_embeddings' +# type: "request" +value: |- + { + "service": "amazon_sagemaker", + "service_settings": { + "access_key": "AWS-access-key", + "secret_key": "AWS-secret-key", + "region": "us-east-1", + "api": "elastic", + "endpoint_name": "my-endpoint", + "dimensions": 384, + "element_type": "float" + } + } diff --git a/specification/inference/put_amazonsagemaker/example/request/PutAmazonSageMakerRequestExample2.yaml b/specification/inference/put_amazonsagemaker/example/request/PutAmazonSageMakerRequestExample2.yaml new file mode 100644 index 0000000000..0d71127688 --- /dev/null +++ b/specification/inference/put_amazonsagemaker/example/request/PutAmazonSageMakerRequestExample2.yaml @@ -0,0 +1,15 @@ +summary: A completion task +description: Run `PUT _inference/completion/amazon_sagemaker_completion` to create an inference endpoint that performs a completion task. +method_request: 'PUT _inference/completion/amazon_sagemaker_completion' +# type: "request" +value: |- + { + "service": "amazon_sagemaker", + "service_settings": { + "access_key": "AWS-access-key", + "secret_key": "AWS-secret-key", + "region": "us-east-1", + "api": "elastic", + "endpoint_name": "my-endpoint" + } + } diff --git a/specification/inference/put_amazonsagemaker/example/request/PutAmazonSageMakerRequestExample3.yaml b/specification/inference/put_amazonsagemaker/example/request/PutAmazonSageMakerRequestExample3.yaml new file mode 100644 index 0000000000..ab12f559a3 --- /dev/null +++ b/specification/inference/put_amazonsagemaker/example/request/PutAmazonSageMakerRequestExample3.yaml @@ -0,0 +1,15 @@ +summary: A chat completion task +description: Run `PUT _inference/chat_completion/amazon_sagemaker_chat_completion` to create an inference endpoint that performs a chat completion task. +method_request: 'PUT _inference/chat_completion/amazon_sagemaker_chat_completion' +# type: "request" +value: |- + { + "service": "amazon_sagemaker", + "service_settings": { + "access_key": "AWS-access-key", + "secret_key": "AWS-secret-key", + "region": "us-east-1", + "api": "elastic", + "endpoint_name": "my-endpoint" + } + } diff --git a/specification/inference/put_amazonsagemaker/example/request/PutAmazonSageMakerRequestExample4.yaml b/specification/inference/put_amazonsagemaker/example/request/PutAmazonSageMakerRequestExample4.yaml new file mode 100644 index 0000000000..afac438c22 --- /dev/null +++ b/specification/inference/put_amazonsagemaker/example/request/PutAmazonSageMakerRequestExample4.yaml @@ -0,0 +1,15 @@ +summary: A sparse embedding task +description: Run `PUT _inference/sparse_embedding/amazon_sagemaker_sparse_embedding` to create an inference endpoint that performs a sparse embedding task. +method_request: 'PUT _inference/sparse_embedding/amazon_sagemaker_sparse_embedding' +# type: "request" +value: |- + { + "service": "amazon_sagemaker", + "service_settings": { + "access_key": "AWS-access-key", + "secret_key": "AWS-secret-key", + "region": "us-east-1", + "api": "elastic", + "endpoint_name": "my-endpoint" + } + } diff --git a/specification/inference/put_amazonsagemaker/example/request/PutAmazonSageMakerRequestExample5.yaml b/specification/inference/put_amazonsagemaker/example/request/PutAmazonSageMakerRequestExample5.yaml new file mode 100644 index 0000000000..861579eaaa --- /dev/null +++ b/specification/inference/put_amazonsagemaker/example/request/PutAmazonSageMakerRequestExample5.yaml @@ -0,0 +1,15 @@ +summary: A rerank task +description: Run `PUT _inference/rerank/amazon_sagemaker_rerank` to create an inference endpoint that performs a rerank task. +method_request: 'PUT _inference/rerank/amazon_sagemaker_rerank' +# type: "request" +value: |- + { + "service": "amazon_sagemaker", + "service_settings": { + "access_key": "AWS-access-key", + "secret_key": "AWS-secret-key", + "region": "us-east-1", + "api": "elastic", + "endpoint_name": "my-endpoint" + } + } diff --git a/specification/inference/put_anthropic/PutAnthropicRequest.ts b/specification/inference/put_anthropic/PutAnthropicRequest.ts index d0e0b87ed3..d7942495c3 100644 --- a/specification/inference/put_anthropic/PutAnthropicRequest.ts +++ b/specification/inference/put_anthropic/PutAnthropicRequest.ts @@ -19,6 +19,7 @@ import { RequestBase } from '@_types/Base' import { Id } from '@_types/common' +import { Duration } from '@_types/Time' import { AnthropicServiceSettings, AnthropicServiceType, @@ -55,6 +56,13 @@ export interface Request extends RequestBase { */ anthropic_inference_id: Id } + query_parameters: { + /** + * Specifies the amount of time to wait for the inference endpoint to be created. + * @server_default 30s + */ + timeout?: Duration + } body: { /** * The chunking configuration object. diff --git a/specification/inference/put_anthropic/examples/request/PutAnthropicRequestExample1.yaml b/specification/inference/put_anthropic/examples/request/PutAnthropicRequestExample1.yaml index c043af4ba3..a5dad49066 100644 --- a/specification/inference/put_anthropic/examples/request/PutAnthropicRequestExample1.yaml +++ b/specification/inference/put_anthropic/examples/request/PutAnthropicRequestExample1.yaml @@ -13,84 +13,3 @@ value: |- "max_tokens": 1024 } } -alternatives: - - language: Python - code: |- - resp = client.inference.put( - task_type="completion", - inference_id="anthropic_completion", - inference_config={ - "service": "anthropic", - "service_settings": { - "api_key": "Anthropic-Api-Key", - "model_id": "Model-ID" - }, - "task_settings": { - "max_tokens": 1024 - } - }, - ) - - language: JavaScript - code: |- - const response = await client.inference.put({ - task_type: "completion", - inference_id: "anthropic_completion", - inference_config: { - service: "anthropic", - service_settings: { - api_key: "Anthropic-Api-Key", - model_id: "Model-ID", - }, - task_settings: { - max_tokens: 1024, - }, - }, - }); - - language: Ruby - code: |- - response = client.inference.put( - task_type: "completion", - inference_id: "anthropic_completion", - body: { - "service": "anthropic", - "service_settings": { - "api_key": "Anthropic-Api-Key", - "model_id": "Model-ID" - }, - "task_settings": { - "max_tokens": 1024 - } - } - ) - - language: PHP - code: |- - $resp = $client->inference()->put([ - "task_type" => "completion", - "inference_id" => "anthropic_completion", - "body" => [ - "service" => "anthropic", - "service_settings" => [ - "api_key" => "Anthropic-Api-Key", - "model_id" => "Model-ID", - ], - "task_settings" => [ - "max_tokens" => 1024, - ], - ], - ]); - - language: curl - code: - "curl -X PUT -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d - '{\"service\":\"anthropic\",\"service_settings\":{\"api_key\":\"Anthropic-Api-Key\",\"model_id\":\"Model-ID\"},\"task_settings\ - \":{\"max_tokens\":1024}}' \"$ELASTICSEARCH_URL/_inference/completion/anthropic_completion\"" - - language: Java - code: | - client.inference().put(p -> p - .inferenceId("anthropic_completion") - .taskType(TaskType.Completion) - .inferenceConfig(i -> i - .service("anthropic") - .serviceSettings(JsonData.fromJson("{\"api_key\":\"Anthropic-Api-Key\",\"model_id\":\"Model-ID\"}")) - .taskSettings(JsonData.fromJson("{\"max_tokens\":1024}")) - ) - ); diff --git a/specification/inference/put_azureaistudio/PutAzureAiStudioRequest.ts b/specification/inference/put_azureaistudio/PutAzureAiStudioRequest.ts index d09f31b75c..6ab0d8b029 100644 --- a/specification/inference/put_azureaistudio/PutAzureAiStudioRequest.ts +++ b/specification/inference/put_azureaistudio/PutAzureAiStudioRequest.ts @@ -19,6 +19,7 @@ import { RequestBase } from '@_types/Base' import { Id } from '@_types/common' +import { Duration } from '@_types/Time' import { AzureAiStudioServiceSettings, AzureAiStudioServiceType, @@ -54,6 +55,13 @@ export interface Request extends RequestBase { */ azureaistudio_inference_id: Id } + query_parameters: { + /** + * Specifies the amount of time to wait for the inference endpoint to be created. + * @server_default 30s + */ + timeout?: Duration + } body: { /** * The chunking configuration object. diff --git a/specification/inference/put_azureaistudio/examples/request/PutAzureAiStudioRequestExample1.yaml b/specification/inference/put_azureaistudio/examples/request/PutAzureAiStudioRequestExample1.yaml index 699cee5878..b5e10fbe70 100644 --- a/specification/inference/put_azureaistudio/examples/request/PutAzureAiStudioRequestExample1.yaml +++ b/specification/inference/put_azureaistudio/examples/request/PutAzureAiStudioRequestExample1.yaml @@ -14,79 +14,3 @@ value: |- "endpoint_type": "token" } } -alternatives: - - language: Python - code: |- - resp = client.inference.put( - task_type="text_embedding", - inference_id="azure_ai_studio_embeddings", - inference_config={ - "service": "azureaistudio", - "service_settings": { - "api_key": "Azure-AI-Studio-API-key", - "target": "Target-Uri", - "provider": "openai", - "endpoint_type": "token" - } - }, - ) - - language: JavaScript - code: |- - const response = await client.inference.put({ - task_type: "text_embedding", - inference_id: "azure_ai_studio_embeddings", - inference_config: { - service: "azureaistudio", - service_settings: { - api_key: "Azure-AI-Studio-API-key", - target: "Target-Uri", - provider: "openai", - endpoint_type: "token", - }, - }, - }); - - language: Ruby - code: |- - response = client.inference.put( - task_type: "text_embedding", - inference_id: "azure_ai_studio_embeddings", - body: { - "service": "azureaistudio", - "service_settings": { - "api_key": "Azure-AI-Studio-API-key", - "target": "Target-Uri", - "provider": "openai", - "endpoint_type": "token" - } - } - ) - - language: PHP - code: |- - $resp = $client->inference()->put([ - "task_type" => "text_embedding", - "inference_id" => "azure_ai_studio_embeddings", - "body" => [ - "service" => "azureaistudio", - "service_settings" => [ - "api_key" => "Azure-AI-Studio-API-key", - "target" => "Target-Uri", - "provider" => "openai", - "endpoint_type" => "token", - ], - ], - ]); - - language: curl - code: - "curl -X PUT -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d - '{\"service\":\"azureaistudio\",\"service_settings\":{\"api_key\":\"Azure-AI-Studio-API-key\",\"target\":\"Target-Uri\",\"pro\ - vider\":\"openai\",\"endpoint_type\":\"token\"}}' \"$ELASTICSEARCH_URL/_inference/text_embedding/azure_ai_studio_embeddings\"" - - language: Java - code: > - client.inference().put(p -> p - .inferenceId("azure_ai_studio_embeddings") - .taskType(TaskType.TextEmbedding) - .inferenceConfig(i -> i - .service("azureaistudio") - .serviceSettings(JsonData.fromJson("{\"api_key\":\"Azure-AI-Studio-API-key\",\"target\":\"Target-Uri\",\"provider\":\"openai\",\"endpoint_type\":\"token\"}")) - ) - ); diff --git a/specification/inference/put_azureaistudio/examples/request/PutAzureAiStudioRequestExample2.yaml b/specification/inference/put_azureaistudio/examples/request/PutAzureAiStudioRequestExample2.yaml index 73720b0f3c..a76c643459 100644 --- a/specification/inference/put_azureaistudio/examples/request/PutAzureAiStudioRequestExample2.yaml +++ b/specification/inference/put_azureaistudio/examples/request/PutAzureAiStudioRequestExample2.yaml @@ -12,80 +12,3 @@ value: |- "endpoint_type": "realtime" } } -alternatives: - - language: Python - code: |- - resp = client.inference.put( - task_type="completion", - inference_id="azure_ai_studio_completion", - inference_config={ - "service": "azureaistudio", - "service_settings": { - "api_key": "Azure-AI-Studio-API-key", - "target": "Target-URI", - "provider": "databricks", - "endpoint_type": "realtime" - } - }, - ) - - language: JavaScript - code: |- - const response = await client.inference.put({ - task_type: "completion", - inference_id: "azure_ai_studio_completion", - inference_config: { - service: "azureaistudio", - service_settings: { - api_key: "Azure-AI-Studio-API-key", - target: "Target-URI", - provider: "databricks", - endpoint_type: "realtime", - }, - }, - }); - - language: Ruby - code: |- - response = client.inference.put( - task_type: "completion", - inference_id: "azure_ai_studio_completion", - body: { - "service": "azureaistudio", - "service_settings": { - "api_key": "Azure-AI-Studio-API-key", - "target": "Target-URI", - "provider": "databricks", - "endpoint_type": "realtime" - } - } - ) - - language: PHP - code: |- - $resp = $client->inference()->put([ - "task_type" => "completion", - "inference_id" => "azure_ai_studio_completion", - "body" => [ - "service" => "azureaistudio", - "service_settings" => [ - "api_key" => "Azure-AI-Studio-API-key", - "target" => "Target-URI", - "provider" => "databricks", - "endpoint_type" => "realtime", - ], - ], - ]); - - language: curl - code: - "curl -X PUT -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d - '{\"service\":\"azureaistudio\",\"service_settings\":{\"api_key\":\"Azure-AI-Studio-API-key\",\"target\":\"Target-URI\",\"pro\ - vider\":\"databricks\",\"endpoint_type\":\"realtime\"}}' - \"$ELASTICSEARCH_URL/_inference/completion/azure_ai_studio_completion\"" - - language: Java - code: > - client.inference().put(p -> p - .inferenceId("azure_ai_studio_completion") - .taskType(TaskType.Completion) - .inferenceConfig(i -> i - .service("azureaistudio") - .serviceSettings(JsonData.fromJson("{\"api_key\":\"Azure-AI-Studio-API-key\",\"target\":\"Target-URI\",\"provider\":\"databricks\",\"endpoint_type\":\"realtime\"}")) - ) - ); diff --git a/specification/inference/put_azureopenai/PutAzureOpenAiRequest.ts b/specification/inference/put_azureopenai/PutAzureOpenAiRequest.ts index 63f0c42a8b..af881b68ef 100644 --- a/specification/inference/put_azureopenai/PutAzureOpenAiRequest.ts +++ b/specification/inference/put_azureopenai/PutAzureOpenAiRequest.ts @@ -19,6 +19,7 @@ import { RequestBase } from '@_types/Base' import { Id } from '@_types/common' +import { Duration } from '@_types/Time' import { AzureOpenAIServiceSettings, AzureOpenAIServiceType, @@ -62,6 +63,13 @@ export interface Request extends RequestBase { */ azureopenai_inference_id: Id } + query_parameters: { + /** + * Specifies the amount of time to wait for the inference endpoint to be created. + * @server_default 30s + */ + timeout?: Duration + } body: { /** * The chunking configuration object. diff --git a/specification/inference/put_azureopenai/examples/request/PutAzureOpenAiRequestExample1.yaml b/specification/inference/put_azureopenai/examples/request/PutAzureOpenAiRequestExample1.yaml index 6392cc20cf..fd1f0dcad2 100644 --- a/specification/inference/put_azureopenai/examples/request/PutAzureOpenAiRequestExample1.yaml +++ b/specification/inference/put_azureopenai/examples/request/PutAzureOpenAiRequestExample1.yaml @@ -14,80 +14,3 @@ value: |- "api_version": "2024-02-01" } } -alternatives: - - language: Python - code: |- - resp = client.inference.put( - task_type="text_embedding", - inference_id="azure_openai_embeddings", - inference_config={ - "service": "azureopenai", - "service_settings": { - "api_key": "Api-Key", - "resource_name": "Resource-name", - "deployment_id": "Deployment-id", - "api_version": "2024-02-01" - } - }, - ) - - language: JavaScript - code: |- - const response = await client.inference.put({ - task_type: "text_embedding", - inference_id: "azure_openai_embeddings", - inference_config: { - service: "azureopenai", - service_settings: { - api_key: "Api-Key", - resource_name: "Resource-name", - deployment_id: "Deployment-id", - api_version: "2024-02-01", - }, - }, - }); - - language: Ruby - code: |- - response = client.inference.put( - task_type: "text_embedding", - inference_id: "azure_openai_embeddings", - body: { - "service": "azureopenai", - "service_settings": { - "api_key": "Api-Key", - "resource_name": "Resource-name", - "deployment_id": "Deployment-id", - "api_version": "2024-02-01" - } - } - ) - - language: PHP - code: |- - $resp = $client->inference()->put([ - "task_type" => "text_embedding", - "inference_id" => "azure_openai_embeddings", - "body" => [ - "service" => "azureopenai", - "service_settings" => [ - "api_key" => "Api-Key", - "resource_name" => "Resource-name", - "deployment_id" => "Deployment-id", - "api_version" => "2024-02-01", - ], - ], - ]); - - language: curl - code: - "curl -X PUT -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d - '{\"service\":\"azureopenai\",\"service_settings\":{\"api_key\":\"Api-Key\",\"resource_name\":\"Resource-name\",\"deployment_\ - id\":\"Deployment-id\",\"api_version\":\"2024-02-01\"}}' - \"$ELASTICSEARCH_URL/_inference/text_embedding/azure_openai_embeddings\"" - - language: Java - code: > - client.inference().put(p -> p - .inferenceId("azure_openai_embeddings") - .taskType(TaskType.TextEmbedding) - .inferenceConfig(i -> i - .service("azureopenai") - .serviceSettings(JsonData.fromJson("{\"api_key\":\"Api-Key\",\"resource_name\":\"Resource-name\",\"deployment_id\":\"Deployment-id\",\"api_version\":\"2024-02-01\"}")) - ) - ); diff --git a/specification/inference/put_azureopenai/examples/request/PutAzureOpenAiRequestExample2.yaml b/specification/inference/put_azureopenai/examples/request/PutAzureOpenAiRequestExample2.yaml index 48e09cff9c..552769a778 100644 --- a/specification/inference/put_azureopenai/examples/request/PutAzureOpenAiRequestExample2.yaml +++ b/specification/inference/put_azureopenai/examples/request/PutAzureOpenAiRequestExample2.yaml @@ -12,79 +12,3 @@ value: |- "api_version": "2024-02-01" } } -alternatives: - - language: Python - code: |- - resp = client.inference.put( - task_type="completion", - inference_id="azure_openai_completion", - inference_config={ - "service": "azureopenai", - "service_settings": { - "api_key": "Api-Key", - "resource_name": "Resource-name", - "deployment_id": "Deployment-id", - "api_version": "2024-02-01" - } - }, - ) - - language: JavaScript - code: |- - const response = await client.inference.put({ - task_type: "completion", - inference_id: "azure_openai_completion", - inference_config: { - service: "azureopenai", - service_settings: { - api_key: "Api-Key", - resource_name: "Resource-name", - deployment_id: "Deployment-id", - api_version: "2024-02-01", - }, - }, - }); - - language: Ruby - code: |- - response = client.inference.put( - task_type: "completion", - inference_id: "azure_openai_completion", - body: { - "service": "azureopenai", - "service_settings": { - "api_key": "Api-Key", - "resource_name": "Resource-name", - "deployment_id": "Deployment-id", - "api_version": "2024-02-01" - } - } - ) - - language: PHP - code: |- - $resp = $client->inference()->put([ - "task_type" => "completion", - "inference_id" => "azure_openai_completion", - "body" => [ - "service" => "azureopenai", - "service_settings" => [ - "api_key" => "Api-Key", - "resource_name" => "Resource-name", - "deployment_id" => "Deployment-id", - "api_version" => "2024-02-01", - ], - ], - ]); - - language: curl - code: - "curl -X PUT -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d - '{\"service\":\"azureopenai\",\"service_settings\":{\"api_key\":\"Api-Key\",\"resource_name\":\"Resource-name\",\"deployment_\ - id\":\"Deployment-id\",\"api_version\":\"2024-02-01\"}}' \"$ELASTICSEARCH_URL/_inference/completion/azure_openai_completion\"" - - language: Java - code: > - client.inference().put(p -> p - .inferenceId("azure_openai_completion") - .taskType(TaskType.Completion) - .inferenceConfig(i -> i - .service("azureopenai") - .serviceSettings(JsonData.fromJson("{\"api_key\":\"Api-Key\",\"resource_name\":\"Resource-name\",\"deployment_id\":\"Deployment-id\",\"api_version\":\"2024-02-01\"}")) - ) - ); diff --git a/specification/inference/put_cohere/PutCohereRequest.ts b/specification/inference/put_cohere/PutCohereRequest.ts index 52ddd382e7..6ebfc47292 100644 --- a/specification/inference/put_cohere/PutCohereRequest.ts +++ b/specification/inference/put_cohere/PutCohereRequest.ts @@ -19,6 +19,7 @@ import { RequestBase } from '@_types/Base' import { Id } from '@_types/common' +import { Duration } from '@_types/Time' import { CohereServiceSettings, CohereServiceType, @@ -54,6 +55,13 @@ export interface Request extends RequestBase { */ cohere_inference_id: Id } + query_parameters: { + /** + * Specifies the amount of time to wait for the inference endpoint to be created. + * @server_default 30s + */ + timeout?: Duration + } body: { /** * The chunking configuration object. diff --git a/specification/inference/put_cohere/examples/request/PutCohereRequestExample1.yaml b/specification/inference/put_cohere/examples/request/PutCohereRequestExample1.yaml index 7a63fdf6e0..354199916e 100644 --- a/specification/inference/put_cohere/examples/request/PutCohereRequestExample1.yaml +++ b/specification/inference/put_cohere/examples/request/PutCohereRequestExample1.yaml @@ -11,75 +11,3 @@ value: |- "embedding_type": "byte" } } -alternatives: - - language: Python - code: |- - resp = client.inference.put( - task_type="text_embedding", - inference_id="cohere-embeddings", - inference_config={ - "service": "cohere", - "service_settings": { - "api_key": "Cohere-Api-key", - "model_id": "embed-english-light-v3.0", - "embedding_type": "byte" - } - }, - ) - - language: JavaScript - code: |- - const response = await client.inference.put({ - task_type: "text_embedding", - inference_id: "cohere-embeddings", - inference_config: { - service: "cohere", - service_settings: { - api_key: "Cohere-Api-key", - model_id: "embed-english-light-v3.0", - embedding_type: "byte", - }, - }, - }); - - language: Ruby - code: |- - response = client.inference.put( - task_type: "text_embedding", - inference_id: "cohere-embeddings", - body: { - "service": "cohere", - "service_settings": { - "api_key": "Cohere-Api-key", - "model_id": "embed-english-light-v3.0", - "embedding_type": "byte" - } - } - ) - - language: PHP - code: |- - $resp = $client->inference()->put([ - "task_type" => "text_embedding", - "inference_id" => "cohere-embeddings", - "body" => [ - "service" => "cohere", - "service_settings" => [ - "api_key" => "Cohere-Api-key", - "model_id" => "embed-english-light-v3.0", - "embedding_type" => "byte", - ], - ], - ]); - - language: curl - code: - "curl -X PUT -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d - '{\"service\":\"cohere\",\"service_settings\":{\"api_key\":\"Cohere-Api-key\",\"model_id\":\"embed-english-light-v3.0\",\"emb\ - edding_type\":\"byte\"}}' \"$ELASTICSEARCH_URL/_inference/text_embedding/cohere-embeddings\"" - - language: Java - code: > - client.inference().put(p -> p - .inferenceId("cohere-embeddings") - .taskType(TaskType.TextEmbedding) - .inferenceConfig(i -> i - .service("cohere") - .serviceSettings(JsonData.fromJson("{\"api_key\":\"Cohere-Api-key\",\"model_id\":\"embed-english-light-v3.0\",\"embedding_type\":\"byte\"}")) - ) - ); diff --git a/specification/inference/put_cohere/examples/request/PutCohereRequestExample2.yaml b/specification/inference/put_cohere/examples/request/PutCohereRequestExample2.yaml index 0c7368cb88..85d67c6525 100644 --- a/specification/inference/put_cohere/examples/request/PutCohereRequestExample2.yaml +++ b/specification/inference/put_cohere/examples/request/PutCohereRequestExample2.yaml @@ -14,88 +14,3 @@ value: |- "return_documents": true } } -alternatives: - - language: Python - code: |- - resp = client.inference.put( - task_type="rerank", - inference_id="cohere-rerank", - inference_config={ - "service": "cohere", - "service_settings": { - "api_key": "Cohere-API-key", - "model_id": "rerank-english-v3.0" - }, - "task_settings": { - "top_n": 10, - "return_documents": True - } - }, - ) - - language: JavaScript - code: |- - const response = await client.inference.put({ - task_type: "rerank", - inference_id: "cohere-rerank", - inference_config: { - service: "cohere", - service_settings: { - api_key: "Cohere-API-key", - model_id: "rerank-english-v3.0", - }, - task_settings: { - top_n: 10, - return_documents: true, - }, - }, - }); - - language: Ruby - code: |- - response = client.inference.put( - task_type: "rerank", - inference_id: "cohere-rerank", - body: { - "service": "cohere", - "service_settings": { - "api_key": "Cohere-API-key", - "model_id": "rerank-english-v3.0" - }, - "task_settings": { - "top_n": 10, - "return_documents": true - } - } - ) - - language: PHP - code: |- - $resp = $client->inference()->put([ - "task_type" => "rerank", - "inference_id" => "cohere-rerank", - "body" => [ - "service" => "cohere", - "service_settings" => [ - "api_key" => "Cohere-API-key", - "model_id" => "rerank-english-v3.0", - ], - "task_settings" => [ - "top_n" => 10, - "return_documents" => true, - ], - ], - ]); - - language: curl - code: - "curl -X PUT -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d - '{\"service\":\"cohere\",\"service_settings\":{\"api_key\":\"Cohere-API-key\",\"model_id\":\"rerank-english-v3.0\"},\"task_se\ - ttings\":{\"top_n\":10,\"return_documents\":true}}' \"$ELASTICSEARCH_URL/_inference/rerank/cohere-rerank\"" - - language: Java - code: | - client.inference().put(p -> p - .inferenceId("cohere-rerank") - .taskType(TaskType.Rerank) - .inferenceConfig(i -> i - .service("cohere") - .serviceSettings(JsonData.fromJson("{\"api_key\":\"Cohere-API-key\",\"model_id\":\"rerank-english-v3.0\"}")) - .taskSettings(JsonData.fromJson("{\"top_n\":10,\"return_documents\":true}")) - ) - ); diff --git a/specification/inference/put_cohere/examples/request/PutCohereRequestExample3.yaml b/specification/inference/put_cohere/examples/request/PutCohereRequestExample3.yaml new file mode 100644 index 0000000000..78428cee54 --- /dev/null +++ b/specification/inference/put_cohere/examples/request/PutCohereRequestExample3.yaml @@ -0,0 +1,12 @@ +summary: A completion task +description: Run `PUT _inference/completion/cohere-completion` to create an inference endpoint that performs a completion task. +method_request: 'PUT _inference/completion/cohere-completion' +# type: "request" +value: |- + { + "service": "cohere", + "service_settings": { + "api_key": "Cohere-API-key", + "model_id": "command-a-03-2025" + } + } diff --git a/specification/inference/put_custom/PutCustomRequest.ts b/specification/inference/put_custom/PutCustomRequest.ts new file mode 100644 index 0000000000..04d1e056a8 --- /dev/null +++ b/specification/inference/put_custom/PutCustomRequest.ts @@ -0,0 +1,117 @@ +/* + * 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. + */ + +import { RequestBase } from '@_types/Base' +import { Id } from '@_types/common' +import { + CustomServiceSettings, + CustomServiceType, + CustomTaskSettings, + CustomTaskType +} from '@inference/_types/CommonTypes' +import { InferenceChunkingSettings } from '@inference/_types/Services' + +/** + * Create a custom inference endpoint. + * + * The custom service gives more control over how to interact with external inference services that aren't explicitly supported through dedicated integrations. + * The custom service gives you the ability to define the headers, url, query parameters, request body, and secrets. + * The custom service supports the template replacement functionality, which enables you to define a template that can be replaced with the value associated with that key. + * Templates are portions of a string that start with `${` and end with `}`. + * The parameters `secret_parameters` and `task_settings` are checked for keys for template replacement. Template replacement is supported in the `request`, `headers`, `url`, and `query_parameters`. + * If the definition (key) is not found for a template, an error message is returned. + * In case of an endpoint definition like the following: + * ``` + * PUT _inference/text_embedding/test-text-embedding + * { + * "service": "custom", + * "service_settings": { + * "secret_parameters": { + * "api_key": "" + * }, + * "url": "...endpoints.huggingface.cloud/v1/embeddings", + * "headers": { + * "Authorization": "Bearer ${api_key}", + * "Content-Type": "application/json" + * }, + * "request": "{\"input\": ${input}}", + * "response": { + * "json_parser": { + * "text_embeddings":"$.data[*].embedding[*]" + * } + * } + * } + * } + * ``` + * To replace `${api_key}` the `secret_parameters` and `task_settings` are checked for a key named `api_key`. + * + * > info + * > Templates should not be surrounded by quotes. + * + * Pre-defined templates: + * * `${input}` refers to the array of input strings that comes from the `input` field of the subsequent inference requests. + * * `${input_type}` refers to the input type translation values. + * * `${query}` refers to the query field used specifically for reranking tasks. + * * `${top_n}` refers to the `top_n` field available when performing rerank requests. + * * `${return_documents}` refers to the `return_documents` field available when performing rerank requests. + * @rest_spec_name inference.put_custom + * @availability stack since=8.13.0 stability=stable visibility=public + * @availability serverless stability=stable visibility=public + * @cluster_privileges manage_inference + * @doc_id inference-api-put-custom + */ +export interface Request extends RequestBase { + urls: [ + { + path: '/_inference/{task_type}/{custom_inference_id}' + methods: ['PUT'] + } + ] + path_parts: { + /** + * The type of the inference task that the model will perform. + */ + task_type: CustomTaskType + /** + * The unique identifier of the inference endpoint. + */ + custom_inference_id: Id + } + body: { + /** + * The chunking configuration object. + * @ext_doc_id inference-chunking + */ + chunking_settings?: InferenceChunkingSettings + /** + * The type of service supported for the specified task type. In this case, `custom`. + */ + service: CustomServiceType + /** + * Settings used to install the inference model. + * These settings are specific to the `custom` service. + */ + service_settings: CustomServiceSettings + /** + * Settings to configure the inference task. + * These settings are specific to the task type you specified. + */ + task_settings?: CustomTaskSettings + } +} diff --git a/specification/inference/put_custom/PutCustomResponse.ts b/specification/inference/put_custom/PutCustomResponse.ts new file mode 100644 index 0000000000..c09467c944 --- /dev/null +++ b/specification/inference/put_custom/PutCustomResponse.ts @@ -0,0 +1,25 @@ +/* + * 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. + */ + +import { InferenceEndpointInfoCustom } from '@inference/_types/Services' + +export class Response { + /** @codegen_name endpoint_info */ + body: InferenceEndpointInfoCustom +} diff --git a/specification/inference/put_custom/examples/PutCustomRequestExample1.yaml b/specification/inference/put_custom/examples/PutCustomRequestExample1.yaml new file mode 100644 index 0000000000..dabe71ed86 --- /dev/null +++ b/specification/inference/put_custom/examples/PutCustomRequestExample1.yaml @@ -0,0 +1,24 @@ +summary: Custom text embedding task (OpenAI) +description: Run `PUT _inference/text_embedding/custom-embeddings` to create an inference endpoint that performs a text embedding task. +method_request: 'PUT _inference/text_embedding/custom-embeddings' +# type: "request" +value: |- + { + "service": "custom", + "service_settings": { + "secret_parameters": { + "api_key": "" + }, + "url": "https://api.openai.com/v1/embeddings", + "headers": { + "Authorization": "Bearer ${api_key}", + "Content-Type": "application/json;charset=utf-8" + }, + "request": "{\"input\": ${input}, \"model\": \"text-embedding-3-small\"}", + "response": { + "json_parser": { + "text_embeddings": "$.data[*].embedding[*]" + } + } + } + } diff --git a/specification/inference/put_custom/examples/PutCustomRequestExample2.yaml b/specification/inference/put_custom/examples/PutCustomRequestExample2.yaml new file mode 100644 index 0000000000..1fb61b58c1 --- /dev/null +++ b/specification/inference/put_custom/examples/PutCustomRequestExample2.yaml @@ -0,0 +1,25 @@ +summary: Custom rerank task (Cohere APIv2) +description: Run `PUT _inference/rerank/custom-rerank` to create an inference endpoint that performs a rerank task. +method_request: 'PUT _inference/rerank/custom-rerank' +# type: "request" +value: |- + { + "service": "custom", + "service_settings": { + "secret_parameters": { + "api_key": "" + }, + "url": "https://api.cohere.com/v2/rerank", + "headers": { + "Authorization": "bearer ${api_key}", + "Content-Type": "application/json" + }, + "request": "{\"documents\": ${input}, \"query\": ${query}, \"model\": \"rerank-v3.5\"}", + "response": { + "json_parser": { + "reranked_index":"$.results[*].index", + "relevance_score":"$.results[*].relevance_score" + } + } + } + } diff --git a/specification/inference/put_custom/examples/PutCustomRequestExample3.yaml b/specification/inference/put_custom/examples/PutCustomRequestExample3.yaml new file mode 100644 index 0000000000..70e5609051 --- /dev/null +++ b/specification/inference/put_custom/examples/PutCustomRequestExample3.yaml @@ -0,0 +1,31 @@ +summary: Custom text embedding task (Cohere APIv2) +description: Run `PUT _inference/text_embedding/custom-text-embedding` to create an inference endpoint that performs a text embedding task. +method_request: 'PUT _inference/text_embedding/custom-text-embedding' +# type: "request" +value: |- + { + "service": "custom", + "service_settings": { + "secret_parameters": { + "api_key": "" + }, + "url": "https://api.cohere.com/v2/embed", + "headers": { + "Authorization": "bearer ${api_key}", + "Content-Type": "application/json" + }, + "request": "{\"texts\": ${input}, \"model\": \"embed-v4.0\", \"input_type\": ${input_type}}", + "response": { + "json_parser": { + "text_embeddings":"$.embeddings.float[*]" + } + }, + "input_type": { + "translation": { + "ingest": "search_document", + "search": "search_query" + }, + "default": "search_document" + } + } + } diff --git a/specification/inference/put_custom/examples/PutCustomRequestExample4.yaml b/specification/inference/put_custom/examples/PutCustomRequestExample4.yaml new file mode 100644 index 0000000000..4ecaaf020b --- /dev/null +++ b/specification/inference/put_custom/examples/PutCustomRequestExample4.yaml @@ -0,0 +1,25 @@ +summary: Custom rerank task (Jina AI) +description: Run `PUT _inference/rerank/custom-rerank-jina` to create an inference endpoint that performs a rerank task. +method_request: 'PUT _inference/rerank/custom-rerank-jina' +# type: "request" +value: |- + { + "service": "custom", + "service_settings": { + "secret_parameters": { + "api_key": "" + }, + "url": "https://api.jina.ai/v1/rerank", + "headers": { + "Content-Type": "application/json", + "Authorization": "Bearer ${api_key}" + }, + "request": "{\"model\": \"jina-reranker-v2-base-multilingual\",\"query\": ${query},\"documents\":${input}}", + "response": { + "json_parser": { + "relevance_score": "$.results[*].relevance_score", + "reranked_index": "$.results[*].index" + } + } + } + } diff --git a/specification/inference/put_custom/examples/PutCustomRequestExample5.yaml b/specification/inference/put_custom/examples/PutCustomRequestExample5.yaml new file mode 100644 index 0000000000..c9f86dad8d --- /dev/null +++ b/specification/inference/put_custom/examples/PutCustomRequestExample5.yaml @@ -0,0 +1,24 @@ +summary: Custom text embedding task (Hugging Face) +description: Run `PUT _inference/text_embedding/custom-text-embedding-hf` to create an inference endpoint that performs a text embedding task by using the Qwen/Qwen3-Embedding-8B model. +method_request: 'PUT _inference/text_embedding/custom-text-embedding-hf' +# type: "request" +value: |- + { + "service": "custom", + "service_settings": { + "secret_parameters": { + "api_key": "" + }, + "url": "/v1/embeddings", + "headers": { + "Authorization": "Bearer ${api_key}", + "Content-Type": "application/json" + }, + "request": "{\"input\": ${input}}", + "response": { + "json_parser": { + "text_embeddings":"$.data[*].embedding[*]" + } + } + } + } diff --git a/specification/inference/put_deepseek/PutDeepSeekRequest.ts b/specification/inference/put_deepseek/PutDeepSeekRequest.ts new file mode 100644 index 0000000000..c188ffd857 --- /dev/null +++ b/specification/inference/put_deepseek/PutDeepSeekRequest.ts @@ -0,0 +1,80 @@ +/* + * 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. + */ + +import { RequestBase } from '@_types/Base' +import { Id } from '@_types/common' +import { Duration } from '@_types/Time' +import { + DeepSeekServiceSettings, + DeepSeekServiceType +} from '@inference/_types/CommonTypes' +import { InferenceChunkingSettings } from '@inference/_types/Services' +import { TaskTypeDeepSeek } from '@inference/_types/TaskType' + +/** + * Create a DeepSeek inference endpoint. + * + * Create an inference endpoint to perform an inference task with the `deepseek` service. + * @rest_spec_name inference.put_deepseek + * @availability stack since=9.1.0 stability=stable visibility=public + * @availability serverless stability=stable visibility=public + * @cluster_privileges manage_inference + * @doc_id inference-api-put-deepseek + */ +export interface Request extends RequestBase { + urls: [ + { + path: '/_inference/{task_type}/{deepseek_inference_id}' + methods: ['PUT'] + } + ] + path_parts: { + /** + * The type of the inference task that the model will perform. + */ + task_type: TaskTypeDeepSeek + /** + * The unique identifier of the inference endpoint. + */ + deepseek_inference_id: Id + } + query_parameters: { + /** + * Specifies the amount of time to wait for the inference endpoint to be created. + * @server_default 30s + */ + timeout?: Duration + } + body: { + /** + * The chunking configuration object. + * @ext_doc_id inference-chunking + */ + chunking_settings?: InferenceChunkingSettings + /** + * The type of service supported for the specified task type. In this case, `deepseek`. + */ + service: DeepSeekServiceType + /** + * Settings used to install the inference model. + * These settings are specific to the `deepseek` service. + */ + service_settings: DeepSeekServiceSettings + } +} diff --git a/specification/inference/put_deepseek/PutDeepSeekResponse.ts b/specification/inference/put_deepseek/PutDeepSeekResponse.ts new file mode 100644 index 0000000000..d2c14e6103 --- /dev/null +++ b/specification/inference/put_deepseek/PutDeepSeekResponse.ts @@ -0,0 +1,25 @@ +/* + * 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. + */ + +import { InferenceEndpointInfoDeepSeek } from '@inference/_types/Services' + +export class Response { + /** @codegen_name endpoint_info */ + body: InferenceEndpointInfoDeepSeek +} diff --git a/specification/inference/put_deepseek/examples/PutDeepSeekRequestExample1.yaml b/specification/inference/put_deepseek/examples/PutDeepSeekRequestExample1.yaml new file mode 100644 index 0000000000..bd1169b22b --- /dev/null +++ b/specification/inference/put_deepseek/examples/PutDeepSeekRequestExample1.yaml @@ -0,0 +1,12 @@ +summary: A completion task +description: Run `PUT _inference/completion/deepseek-completion` to create an inference endpoint that performs a completion task. +method_request: 'PUT _inference/completion/deepseek-completion' +# type: "request" +value: |- + { + "service": "deepseek", + "service_settings": { + "api_key": "DeepSeek-Api-key", + "model_id": "deepseek-chat" + } + } diff --git a/specification/inference/put_deepseek/examples/PutDeepSeekRequestExample2.yaml b/specification/inference/put_deepseek/examples/PutDeepSeekRequestExample2.yaml new file mode 100644 index 0000000000..91d11d1cb5 --- /dev/null +++ b/specification/inference/put_deepseek/examples/PutDeepSeekRequestExample2.yaml @@ -0,0 +1,12 @@ +summary: A chat completion task +description: Run `PUT _inference/chat_completion/deepseek-chat-completion` to create an inference endpoint that performs a chat completion task. +method_request: 'PUT _inference/chat_completion/deepseek-chat-completion' +# type: "request" +value: |- + { + "service": "deepseek", + "service_settings": { + "api_key": "DeepSeek-Api-key", + "model_id": "deepseek-chat" + } + } diff --git a/specification/inference/put_elasticsearch/PutElasticsearchRequest.ts b/specification/inference/put_elasticsearch/PutElasticsearchRequest.ts index bdf2a8d991..b57b062f67 100644 --- a/specification/inference/put_elasticsearch/PutElasticsearchRequest.ts +++ b/specification/inference/put_elasticsearch/PutElasticsearchRequest.ts @@ -19,6 +19,7 @@ import { RequestBase } from '@_types/Base' import { Id } from '@_types/common' +import { Duration } from '@_types/Time' import { ElasticsearchServiceSettings, ElasticsearchServiceType, @@ -68,6 +69,13 @@ export interface Request extends RequestBase { */ elasticsearch_inference_id: Id } + query_parameters: { + /** + * Specifies the amount of time to wait for the inference endpoint to be created. + * @server_default 30s + */ + timeout?: Duration + } body: { /** * The chunking configuration object. diff --git a/specification/inference/put_elasticsearch/examples/request/PutElasticsearchRequestExample1.yaml b/specification/inference/put_elasticsearch/examples/request/PutElasticsearchRequestExample1.yaml index 27f182e68b..c7e98c5e4d 100644 --- a/specification/inference/put_elasticsearch/examples/request/PutElasticsearchRequestExample1.yaml +++ b/specification/inference/put_elasticsearch/examples/request/PutElasticsearchRequestExample1.yaml @@ -18,92 +18,3 @@ value: |- "model_id": ".elser_model_2" } } -alternatives: - - language: Python - code: |- - resp = client.inference.put( - task_type="sparse_embedding", - inference_id="my-elser-model", - inference_config={ - "service": "elasticsearch", - "service_settings": { - "adaptive_allocations": { - "enabled": True, - "min_number_of_allocations": 1, - "max_number_of_allocations": 4 - }, - "num_threads": 1, - "model_id": ".elser_model_2" - } - }, - ) - - language: JavaScript - code: |- - const response = await client.inference.put({ - task_type: "sparse_embedding", - inference_id: "my-elser-model", - inference_config: { - service: "elasticsearch", - service_settings: { - adaptive_allocations: { - enabled: true, - min_number_of_allocations: 1, - max_number_of_allocations: 4, - }, - num_threads: 1, - model_id: ".elser_model_2", - }, - }, - }); - - language: Ruby - code: |- - response = client.inference.put( - task_type: "sparse_embedding", - inference_id: "my-elser-model", - body: { - "service": "elasticsearch", - "service_settings": { - "adaptive_allocations": { - "enabled": true, - "min_number_of_allocations": 1, - "max_number_of_allocations": 4 - }, - "num_threads": 1, - "model_id": ".elser_model_2" - } - } - ) - - language: PHP - code: |- - $resp = $client->inference()->put([ - "task_type" => "sparse_embedding", - "inference_id" => "my-elser-model", - "body" => [ - "service" => "elasticsearch", - "service_settings" => [ - "adaptive_allocations" => [ - "enabled" => true, - "min_number_of_allocations" => 1, - "max_number_of_allocations" => 4, - ], - "num_threads" => 1, - "model_id" => ".elser_model_2", - ], - ], - ]); - - language: curl - code: - "curl -X PUT -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d - '{\"service\":\"elasticsearch\",\"service_settings\":{\"adaptive_allocations\":{\"enabled\":true,\"min_number_of_allocations\ - \":1,\"max_number_of_allocations\":4},\"num_threads\":1,\"model_id\":\".elser_model_2\"}}' - \"$ELASTICSEARCH_URL/_inference/sparse_embedding/my-elser-model\"" - - language: Java - code: > - client.inference().put(p -> p - .inferenceId("my-elser-model") - .taskType(TaskType.SparseEmbedding) - .inferenceConfig(i -> i - .service("elasticsearch") - .serviceSettings(JsonData.fromJson("{\"adaptive_allocations\":{\"enabled\":true,\"min_number_of_allocations\":1,\"max_number_of_allocations\":4},\"num_threads\":1,\"model_id\":\".elser_model_2\"}")) - ) - ); diff --git a/specification/inference/put_elasticsearch/examples/request/PutElasticsearchRequestExample2.yaml b/specification/inference/put_elasticsearch/examples/request/PutElasticsearchRequestExample2.yaml index ecf4f0933e..c6e9f656dc 100644 --- a/specification/inference/put_elasticsearch/examples/request/PutElasticsearchRequestExample2.yaml +++ b/specification/inference/put_elasticsearch/examples/request/PutElasticsearchRequestExample2.yaml @@ -19,92 +19,3 @@ value: |- } } } -alternatives: - - language: Python - code: |- - resp = client.inference.put( - task_type="rerank", - inference_id="my-elastic-rerank", - inference_config={ - "service": "elasticsearch", - "service_settings": { - "model_id": ".rerank-v1", - "num_threads": 1, - "adaptive_allocations": { - "enabled": True, - "min_number_of_allocations": 1, - "max_number_of_allocations": 4 - } - } - }, - ) - - language: JavaScript - code: |- - const response = await client.inference.put({ - task_type: "rerank", - inference_id: "my-elastic-rerank", - inference_config: { - service: "elasticsearch", - service_settings: { - model_id: ".rerank-v1", - num_threads: 1, - adaptive_allocations: { - enabled: true, - min_number_of_allocations: 1, - max_number_of_allocations: 4, - }, - }, - }, - }); - - language: Ruby - code: |- - response = client.inference.put( - task_type: "rerank", - inference_id: "my-elastic-rerank", - body: { - "service": "elasticsearch", - "service_settings": { - "model_id": ".rerank-v1", - "num_threads": 1, - "adaptive_allocations": { - "enabled": true, - "min_number_of_allocations": 1, - "max_number_of_allocations": 4 - } - } - } - ) - - language: PHP - code: |- - $resp = $client->inference()->put([ - "task_type" => "rerank", - "inference_id" => "my-elastic-rerank", - "body" => [ - "service" => "elasticsearch", - "service_settings" => [ - "model_id" => ".rerank-v1", - "num_threads" => 1, - "adaptive_allocations" => [ - "enabled" => true, - "min_number_of_allocations" => 1, - "max_number_of_allocations" => 4, - ], - ], - ], - ]); - - language: curl - code: - "curl -X PUT -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d - '{\"service\":\"elasticsearch\",\"service_settings\":{\"model_id\":\".rerank-v1\",\"num_threads\":1,\"adaptive_allocations\":{\ - \"enabled\":true,\"min_number_of_allocations\":1,\"max_number_of_allocations\":4}}}' - \"$ELASTICSEARCH_URL/_inference/rerank/my-elastic-rerank\"" - - language: Java - code: > - client.inference().put(p -> p - .inferenceId("my-elastic-rerank") - .taskType(TaskType.Rerank) - .inferenceConfig(i -> i - .service("elasticsearch") - .serviceSettings(JsonData.fromJson("{\"model_id\":\".rerank-v1\",\"num_threads\":1,\"adaptive_allocations\":{\"enabled\":true,\"min_number_of_allocations\":1,\"max_number_of_allocations\":4}}")) - ) - ); diff --git a/specification/inference/put_elasticsearch/examples/request/PutElasticsearchRequestExample3.yaml b/specification/inference/put_elasticsearch/examples/request/PutElasticsearchRequestExample3.yaml index ebd2646814..f89dbb1c2a 100644 --- a/specification/inference/put_elasticsearch/examples/request/PutElasticsearchRequestExample3.yaml +++ b/specification/inference/put_elasticsearch/examples/request/PutElasticsearchRequestExample3.yaml @@ -14,75 +14,3 @@ value: |- "model_id": ".multilingual-e5-small" } } -alternatives: - - language: Python - code: |- - resp = client.inference.put( - task_type="text_embedding", - inference_id="my-e5-model", - inference_config={ - "service": "elasticsearch", - "service_settings": { - "num_allocations": 1, - "num_threads": 1, - "model_id": ".multilingual-e5-small" - } - }, - ) - - language: JavaScript - code: |- - const response = await client.inference.put({ - task_type: "text_embedding", - inference_id: "my-e5-model", - inference_config: { - service: "elasticsearch", - service_settings: { - num_allocations: 1, - num_threads: 1, - model_id: ".multilingual-e5-small", - }, - }, - }); - - language: Ruby - code: |- - response = client.inference.put( - task_type: "text_embedding", - inference_id: "my-e5-model", - body: { - "service": "elasticsearch", - "service_settings": { - "num_allocations": 1, - "num_threads": 1, - "model_id": ".multilingual-e5-small" - } - } - ) - - language: PHP - code: |- - $resp = $client->inference()->put([ - "task_type" => "text_embedding", - "inference_id" => "my-e5-model", - "body" => [ - "service" => "elasticsearch", - "service_settings" => [ - "num_allocations" => 1, - "num_threads" => 1, - "model_id" => ".multilingual-e5-small", - ], - ], - ]); - - language: curl - code: - "curl -X PUT -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d - '{\"service\":\"elasticsearch\",\"service_settings\":{\"num_allocations\":1,\"num_threads\":1,\"model_id\":\".multilingual-e5\ - -small\"}}' \"$ELASTICSEARCH_URL/_inference/text_embedding/my-e5-model\"" - - language: Java - code: > - client.inference().put(p -> p - .inferenceId("my-e5-model") - .taskType(TaskType.TextEmbedding) - .inferenceConfig(i -> i - .service("elasticsearch") - .serviceSettings(JsonData.fromJson("{\"num_allocations\":1,\"num_threads\":1,\"model_id\":\".multilingual-e5-small\"}")) - ) - ); diff --git a/specification/inference/put_elasticsearch/examples/request/PutElasticsearchRequestExample4.yaml b/specification/inference/put_elasticsearch/examples/request/PutElasticsearchRequestExample4.yaml index 1a8b93bcff..c8aee77c08 100644 --- a/specification/inference/put_elasticsearch/examples/request/PutElasticsearchRequestExample4.yaml +++ b/specification/inference/put_elasticsearch/examples/request/PutElasticsearchRequestExample4.yaml @@ -13,75 +13,3 @@ value: |- "model_id": "msmarco-MiniLM-L12-cos-v5" } } -alternatives: - - language: Python - code: |- - resp = client.inference.put( - task_type="text_embedding", - inference_id="my-msmarco-minilm-model", - inference_config={ - "service": "elasticsearch", - "service_settings": { - "num_allocations": 1, - "num_threads": 1, - "model_id": "msmarco-MiniLM-L12-cos-v5" - } - }, - ) - - language: JavaScript - code: |- - const response = await client.inference.put({ - task_type: "text_embedding", - inference_id: "my-msmarco-minilm-model", - inference_config: { - service: "elasticsearch", - service_settings: { - num_allocations: 1, - num_threads: 1, - model_id: "msmarco-MiniLM-L12-cos-v5", - }, - }, - }); - - language: Ruby - code: |- - response = client.inference.put( - task_type: "text_embedding", - inference_id: "my-msmarco-minilm-model", - body: { - "service": "elasticsearch", - "service_settings": { - "num_allocations": 1, - "num_threads": 1, - "model_id": "msmarco-MiniLM-L12-cos-v5" - } - } - ) - - language: PHP - code: |- - $resp = $client->inference()->put([ - "task_type" => "text_embedding", - "inference_id" => "my-msmarco-minilm-model", - "body" => [ - "service" => "elasticsearch", - "service_settings" => [ - "num_allocations" => 1, - "num_threads" => 1, - "model_id" => "msmarco-MiniLM-L12-cos-v5", - ], - ], - ]); - - language: curl - code: - "curl -X PUT -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d - '{\"service\":\"elasticsearch\",\"service_settings\":{\"num_allocations\":1,\"num_threads\":1,\"model_id\":\"msmarco-MiniLM-L\ - 12-cos-v5\"}}' \"$ELASTICSEARCH_URL/_inference/text_embedding/my-msmarco-minilm-model\"" - - language: Java - code: > - client.inference().put(p -> p - .inferenceId("my-msmarco-minilm-model") - .taskType(TaskType.TextEmbedding) - .inferenceConfig(i -> i - .service("elasticsearch") - .serviceSettings(JsonData.fromJson("{\"num_allocations\":1,\"num_threads\":1,\"model_id\":\"msmarco-MiniLM-L12-cos-v5\"}")) - ) - ); diff --git a/specification/inference/put_elasticsearch/examples/request/PutElasticsearchRequestExample5.yaml b/specification/inference/put_elasticsearch/examples/request/PutElasticsearchRequestExample5.yaml index d1cae4c160..7c80117d4c 100644 --- a/specification/inference/put_elasticsearch/examples/request/PutElasticsearchRequestExample5.yaml +++ b/specification/inference/put_elasticsearch/examples/request/PutElasticsearchRequestExample5.yaml @@ -18,92 +18,3 @@ value: |- "model_id": ".multilingual-e5-small" } } -alternatives: - - language: Python - code: |- - resp = client.inference.put( - task_type="text_embedding", - inference_id="my-e5-model", - inference_config={ - "service": "elasticsearch", - "service_settings": { - "adaptive_allocations": { - "enabled": True, - "min_number_of_allocations": 3, - "max_number_of_allocations": 10 - }, - "num_threads": 1, - "model_id": ".multilingual-e5-small" - } - }, - ) - - language: JavaScript - code: |- - const response = await client.inference.put({ - task_type: "text_embedding", - inference_id: "my-e5-model", - inference_config: { - service: "elasticsearch", - service_settings: { - adaptive_allocations: { - enabled: true, - min_number_of_allocations: 3, - max_number_of_allocations: 10, - }, - num_threads: 1, - model_id: ".multilingual-e5-small", - }, - }, - }); - - language: Ruby - code: |- - response = client.inference.put( - task_type: "text_embedding", - inference_id: "my-e5-model", - body: { - "service": "elasticsearch", - "service_settings": { - "adaptive_allocations": { - "enabled": true, - "min_number_of_allocations": 3, - "max_number_of_allocations": 10 - }, - "num_threads": 1, - "model_id": ".multilingual-e5-small" - } - } - ) - - language: PHP - code: |- - $resp = $client->inference()->put([ - "task_type" => "text_embedding", - "inference_id" => "my-e5-model", - "body" => [ - "service" => "elasticsearch", - "service_settings" => [ - "adaptive_allocations" => [ - "enabled" => true, - "min_number_of_allocations" => 3, - "max_number_of_allocations" => 10, - ], - "num_threads" => 1, - "model_id" => ".multilingual-e5-small", - ], - ], - ]); - - language: curl - code: - "curl -X PUT -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d - '{\"service\":\"elasticsearch\",\"service_settings\":{\"adaptive_allocations\":{\"enabled\":true,\"min_number_of_allocations\ - \":3,\"max_number_of_allocations\":10},\"num_threads\":1,\"model_id\":\".multilingual-e5-small\"}}' - \"$ELASTICSEARCH_URL/_inference/text_embedding/my-e5-model\"" - - language: Java - code: > - client.inference().put(p -> p - .inferenceId("my-e5-model") - .taskType(TaskType.TextEmbedding) - .inferenceConfig(i -> i - .service("elasticsearch") - .serviceSettings(JsonData.fromJson("{\"adaptive_allocations\":{\"enabled\":true,\"min_number_of_allocations\":3,\"max_number_of_allocations\":10},\"num_threads\":1,\"model_id\":\".multilingual-e5-small\"}")) - ) - ); diff --git a/specification/inference/put_elasticsearch/examples/request/PutElasticsearchRequestExample6.yaml b/specification/inference/put_elasticsearch/examples/request/PutElasticsearchRequestExample6.yaml index 6b0f9e515d..a13f5ee178 100644 --- a/specification/inference/put_elasticsearch/examples/request/PutElasticsearchRequestExample6.yaml +++ b/specification/inference/put_elasticsearch/examples/request/PutElasticsearchRequestExample6.yaml @@ -11,67 +11,3 @@ value: |- "deployment_id": ".elser_model_2" } } -alternatives: - - language: Python - code: |- - resp = client.inference.put( - task_type="sparse_embedding", - inference_id="use_existing_deployment", - inference_config={ - "service": "elasticsearch", - "service_settings": { - "deployment_id": ".elser_model_2" - } - }, - ) - - language: JavaScript - code: |- - const response = await client.inference.put({ - task_type: "sparse_embedding", - inference_id: "use_existing_deployment", - inference_config: { - service: "elasticsearch", - service_settings: { - deployment_id: ".elser_model_2", - }, - }, - }); - - language: Ruby - code: |- - response = client.inference.put( - task_type: "sparse_embedding", - inference_id: "use_existing_deployment", - body: { - "service": "elasticsearch", - "service_settings": { - "deployment_id": ".elser_model_2" - } - } - ) - - language: PHP - code: |- - $resp = $client->inference()->put([ - "task_type" => "sparse_embedding", - "inference_id" => "use_existing_deployment", - "body" => [ - "service" => "elasticsearch", - "service_settings" => [ - "deployment_id" => ".elser_model_2", - ], - ], - ]); - - language: curl - code: - 'curl -X PUT -H "Authorization: ApiKey $ELASTIC_API_KEY" -H "Content-Type: application/json" -d - ''{"service":"elasticsearch","service_settings":{"deployment_id":".elser_model_2"}}'' - "$ELASTICSEARCH_URL/_inference/sparse_embedding/use_existing_deployment"' - - language: Java - code: | - client.inference().put(p -> p - .inferenceId("use_existing_deployment") - .taskType(TaskType.SparseEmbedding) - .inferenceConfig(i -> i - .service("elasticsearch") - .serviceSettings(JsonData.fromJson("{\"deployment_id\":\".elser_model_2\"}")) - ) - ); diff --git a/specification/inference/put_elser/PutElserRequest.ts b/specification/inference/put_elser/PutElserRequest.ts index d9a4812243..179bb1e379 100644 --- a/specification/inference/put_elser/PutElserRequest.ts +++ b/specification/inference/put_elser/PutElserRequest.ts @@ -19,6 +19,7 @@ import { RequestBase } from '@_types/Base' import { Id } from '@_types/common' +import { Duration } from '@_types/Time' import { ElserServiceSettings, ElserServiceType, @@ -68,6 +69,13 @@ export interface Request extends RequestBase { */ elser_inference_id: Id } + query_parameters: { + /** + * Specifies the amount of time to wait for the inference endpoint to be created. + * @server_default 30s + */ + timeout?: Duration + } body: { /** * The chunking configuration object. diff --git a/specification/inference/put_elser/examples/request/PutElserRequestExample1.yaml b/specification/inference/put_elser/examples/request/PutElserRequestExample1.yaml index 8f3cc47569..1927bb0211 100644 --- a/specification/inference/put_elser/examples/request/PutElserRequestExample1.yaml +++ b/specification/inference/put_elser/examples/request/PutElserRequestExample1.yaml @@ -12,71 +12,3 @@ value: |- "num_threads": 1 } } -alternatives: - - language: Python - code: |- - resp = client.inference.put( - task_type="sparse_embedding", - inference_id="my-elser-model", - inference_config={ - "service": "elser", - "service_settings": { - "num_allocations": 1, - "num_threads": 1 - } - }, - ) - - language: JavaScript - code: |- - const response = await client.inference.put({ - task_type: "sparse_embedding", - inference_id: "my-elser-model", - inference_config: { - service: "elser", - service_settings: { - num_allocations: 1, - num_threads: 1, - }, - }, - }); - - language: Ruby - code: |- - response = client.inference.put( - task_type: "sparse_embedding", - inference_id: "my-elser-model", - body: { - "service": "elser", - "service_settings": { - "num_allocations": 1, - "num_threads": 1 - } - } - ) - - language: PHP - code: |- - $resp = $client->inference()->put([ - "task_type" => "sparse_embedding", - "inference_id" => "my-elser-model", - "body" => [ - "service" => "elser", - "service_settings" => [ - "num_allocations" => 1, - "num_threads" => 1, - ], - ], - ]); - - language: curl - code: - 'curl -X PUT -H "Authorization: ApiKey $ELASTIC_API_KEY" -H "Content-Type: application/json" -d - ''{"service":"elser","service_settings":{"num_allocations":1,"num_threads":1}}'' - "$ELASTICSEARCH_URL/_inference/sparse_embedding/my-elser-model"' - - language: Java - code: | - client.inference().put(p -> p - .inferenceId("my-elser-model") - .taskType(TaskType.SparseEmbedding) - .inferenceConfig(i -> i - .service("elser") - .serviceSettings(JsonData.fromJson("{\"num_allocations\":1,\"num_threads\":1}")) - ) - ); diff --git a/specification/inference/put_elser/examples/request/PutElserRequestExample2.yaml b/specification/inference/put_elser/examples/request/PutElserRequestExample2.yaml index 20975ba3ad..9a7f4c03d0 100644 --- a/specification/inference/put_elser/examples/request/PutElserRequestExample2.yaml +++ b/specification/inference/put_elser/examples/request/PutElserRequestExample2.yaml @@ -17,87 +17,3 @@ value: |- "num_threads": 1 } } -alternatives: - - language: Python - code: |- - resp = client.inference.put( - task_type="sparse_embedding", - inference_id="my-elser-model", - inference_config={ - "service": "elser", - "service_settings": { - "adaptive_allocations": { - "enabled": True, - "min_number_of_allocations": 3, - "max_number_of_allocations": 10 - }, - "num_threads": 1 - } - }, - ) - - language: JavaScript - code: |- - const response = await client.inference.put({ - task_type: "sparse_embedding", - inference_id: "my-elser-model", - inference_config: { - service: "elser", - service_settings: { - adaptive_allocations: { - enabled: true, - min_number_of_allocations: 3, - max_number_of_allocations: 10, - }, - num_threads: 1, - }, - }, - }); - - language: Ruby - code: |- - response = client.inference.put( - task_type: "sparse_embedding", - inference_id: "my-elser-model", - body: { - "service": "elser", - "service_settings": { - "adaptive_allocations": { - "enabled": true, - "min_number_of_allocations": 3, - "max_number_of_allocations": 10 - }, - "num_threads": 1 - } - } - ) - - language: PHP - code: |- - $resp = $client->inference()->put([ - "task_type" => "sparse_embedding", - "inference_id" => "my-elser-model", - "body" => [ - "service" => "elser", - "service_settings" => [ - "adaptive_allocations" => [ - "enabled" => true, - "min_number_of_allocations" => 3, - "max_number_of_allocations" => 10, - ], - "num_threads" => 1, - ], - ], - ]); - - language: curl - code: - "curl -X PUT -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d - '{\"service\":\"elser\",\"service_settings\":{\"adaptive_allocations\":{\"enabled\":true,\"min_number_of_allocations\":3,\"ma\ - x_number_of_allocations\":10},\"num_threads\":1}}' \"$ELASTICSEARCH_URL/_inference/sparse_embedding/my-elser-model\"" - - language: Java - code: > - client.inference().put(p -> p - .inferenceId("my-elser-model") - .taskType(TaskType.SparseEmbedding) - .inferenceConfig(i -> i - .service("elser") - .serviceSettings(JsonData.fromJson("{\"adaptive_allocations\":{\"enabled\":true,\"min_number_of_allocations\":3,\"max_number_of_allocations\":10},\"num_threads\":1}")) - ) - ); diff --git a/specification/inference/put_googleaistudio/PutGoogleAiStudioRequest.ts b/specification/inference/put_googleaistudio/PutGoogleAiStudioRequest.ts index 691710a32e..6871ceb750 100644 --- a/specification/inference/put_googleaistudio/PutGoogleAiStudioRequest.ts +++ b/specification/inference/put_googleaistudio/PutGoogleAiStudioRequest.ts @@ -19,6 +19,7 @@ import { RequestBase } from '@_types/Base' import { Id } from '@_types/common' +import { Duration } from '@_types/Time' import { GoogleAiServiceType, GoogleAiStudioServiceSettings, @@ -53,6 +54,13 @@ export interface Request extends RequestBase { */ googleaistudio_inference_id: Id } + query_parameters: { + /** + * Specifies the amount of time to wait for the inference endpoint to be created. + * @server_default 30s + */ + timeout?: Duration + } body: { /** * The chunking configuration object. diff --git a/specification/inference/put_googleaistudio/examples/request/PutGoogleAiStudioRequestExample1.yaml b/specification/inference/put_googleaistudio/examples/request/PutGoogleAiStudioRequestExample1.yaml index 32f130ab9b..3b5b79bb64 100644 --- a/specification/inference/put_googleaistudio/examples/request/PutGoogleAiStudioRequestExample1.yaml +++ b/specification/inference/put_googleaistudio/examples/request/PutGoogleAiStudioRequestExample1.yaml @@ -10,71 +10,3 @@ value: |- "model_id": "model-id" } } -alternatives: - - language: Python - code: |- - resp = client.inference.put( - task_type="completion", - inference_id="google_ai_studio_completion", - inference_config={ - "service": "googleaistudio", - "service_settings": { - "api_key": "api-key", - "model_id": "model-id" - } - }, - ) - - language: JavaScript - code: |- - const response = await client.inference.put({ - task_type: "completion", - inference_id: "google_ai_studio_completion", - inference_config: { - service: "googleaistudio", - service_settings: { - api_key: "api-key", - model_id: "model-id", - }, - }, - }); - - language: Ruby - code: |- - response = client.inference.put( - task_type: "completion", - inference_id: "google_ai_studio_completion", - body: { - "service": "googleaistudio", - "service_settings": { - "api_key": "api-key", - "model_id": "model-id" - } - } - ) - - language: PHP - code: |- - $resp = $client->inference()->put([ - "task_type" => "completion", - "inference_id" => "google_ai_studio_completion", - "body" => [ - "service" => "googleaistudio", - "service_settings" => [ - "api_key" => "api-key", - "model_id" => "model-id", - ], - ], - ]); - - language: curl - code: - 'curl -X PUT -H "Authorization: ApiKey $ELASTIC_API_KEY" -H "Content-Type: application/json" -d - ''{"service":"googleaistudio","service_settings":{"api_key":"api-key","model_id":"model-id"}}'' - "$ELASTICSEARCH_URL/_inference/completion/google_ai_studio_completion"' - - language: Java - code: | - client.inference().put(p -> p - .inferenceId("google_ai_studio_completion") - .taskType(TaskType.Completion) - .inferenceConfig(i -> i - .service("googleaistudio") - .serviceSettings(JsonData.fromJson("{\"api_key\":\"api-key\",\"model_id\":\"model-id\"}")) - ) - ); diff --git a/specification/inference/put_googlevertexai/PutGoogleVertexAiRequest.ts b/specification/inference/put_googlevertexai/PutGoogleVertexAiRequest.ts index 40a65dbb56..80cf04059e 100644 --- a/specification/inference/put_googlevertexai/PutGoogleVertexAiRequest.ts +++ b/specification/inference/put_googlevertexai/PutGoogleVertexAiRequest.ts @@ -19,6 +19,7 @@ import { RequestBase } from '@_types/Base' import { Id } from '@_types/common' +import { Duration } from '@_types/Time' import { GoogleVertexAIServiceSettings, GoogleVertexAIServiceType, @@ -54,6 +55,13 @@ export interface Request extends RequestBase { */ googlevertexai_inference_id: Id } + query_parameters: { + /** + * Specifies the amount of time to wait for the inference endpoint to be created. + * @server_default 30s + */ + timeout?: Duration + } body: { /** * The chunking configuration object. diff --git a/specification/inference/put_googlevertexai/examples/request/PutGoogleVertexAiRequestExample1.yaml b/specification/inference/put_googlevertexai/examples/request/PutGoogleVertexAiRequestExample1.yaml index b6eba7c454..9df3634e3f 100644 --- a/specification/inference/put_googlevertexai/examples/request/PutGoogleVertexAiRequestExample1.yaml +++ b/specification/inference/put_googlevertexai/examples/request/PutGoogleVertexAiRequestExample1.yaml @@ -14,80 +14,3 @@ value: |- "project_id": "project-id" } } -alternatives: - - language: Python - code: |- - resp = client.inference.put( - task_type="text_embedding", - inference_id="google_vertex_ai_embeddingss", - inference_config={ - "service": "googlevertexai", - "service_settings": { - "service_account_json": "service-account-json", - "model_id": "model-id", - "location": "location", - "project_id": "project-id" - } - }, - ) - - language: JavaScript - code: |- - const response = await client.inference.put({ - task_type: "text_embedding", - inference_id: "google_vertex_ai_embeddingss", - inference_config: { - service: "googlevertexai", - service_settings: { - service_account_json: "service-account-json", - model_id: "model-id", - location: "location", - project_id: "project-id", - }, - }, - }); - - language: Ruby - code: |- - response = client.inference.put( - task_type: "text_embedding", - inference_id: "google_vertex_ai_embeddingss", - body: { - "service": "googlevertexai", - "service_settings": { - "service_account_json": "service-account-json", - "model_id": "model-id", - "location": "location", - "project_id": "project-id" - } - } - ) - - language: PHP - code: |- - $resp = $client->inference()->put([ - "task_type" => "text_embedding", - "inference_id" => "google_vertex_ai_embeddingss", - "body" => [ - "service" => "googlevertexai", - "service_settings" => [ - "service_account_json" => "service-account-json", - "model_id" => "model-id", - "location" => "location", - "project_id" => "project-id", - ], - ], - ]); - - language: curl - code: - "curl -X PUT -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d - '{\"service\":\"googlevertexai\",\"service_settings\":{\"service_account_json\":\"service-account-json\",\"model_id\":\"model\ - -id\",\"location\":\"location\",\"project_id\":\"project-id\"}}' - \"$ELASTICSEARCH_URL/_inference/text_embedding/google_vertex_ai_embeddingss\"" - - language: Java - code: > - client.inference().put(p -> p - .inferenceId("google_vertex_ai_embeddingss") - .taskType(TaskType.TextEmbedding) - .inferenceConfig(i -> i - .service("googlevertexai") - .serviceSettings(JsonData.fromJson("{\"service_account_json\":\"service-account-json\",\"model_id\":\"model-id\",\"location\":\"location\",\"project_id\":\"project-id\"}")) - ) - ); diff --git a/specification/inference/put_googlevertexai/examples/request/PutGoogleVertexAiRequestExample2.yaml b/specification/inference/put_googlevertexai/examples/request/PutGoogleVertexAiRequestExample2.yaml index d1e18f9b1e..a8d2ed5806 100644 --- a/specification/inference/put_googlevertexai/examples/request/PutGoogleVertexAiRequestExample2.yaml +++ b/specification/inference/put_googlevertexai/examples/request/PutGoogleVertexAiRequestExample2.yaml @@ -10,71 +10,3 @@ value: |- "project_id": "project-id" } } -alternatives: - - language: Python - code: |- - resp = client.inference.put( - task_type="rerank", - inference_id="google_vertex_ai_rerank", - inference_config={ - "service": "googlevertexai", - "service_settings": { - "service_account_json": "service-account-json", - "project_id": "project-id" - } - }, - ) - - language: JavaScript - code: |- - const response = await client.inference.put({ - task_type: "rerank", - inference_id: "google_vertex_ai_rerank", - inference_config: { - service: "googlevertexai", - service_settings: { - service_account_json: "service-account-json", - project_id: "project-id", - }, - }, - }); - - language: Ruby - code: |- - response = client.inference.put( - task_type: "rerank", - inference_id: "google_vertex_ai_rerank", - body: { - "service": "googlevertexai", - "service_settings": { - "service_account_json": "service-account-json", - "project_id": "project-id" - } - } - ) - - language: PHP - code: |- - $resp = $client->inference()->put([ - "task_type" => "rerank", - "inference_id" => "google_vertex_ai_rerank", - "body" => [ - "service" => "googlevertexai", - "service_settings" => [ - "service_account_json" => "service-account-json", - "project_id" => "project-id", - ], - ], - ]); - - language: curl - code: - "curl -X PUT -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d - '{\"service\":\"googlevertexai\",\"service_settings\":{\"service_account_json\":\"service-account-json\",\"project_id\":\"pro\ - ject-id\"}}' \"$ELASTICSEARCH_URL/_inference/rerank/google_vertex_ai_rerank\"" - - language: Java - code: > - client.inference().put(p -> p - .inferenceId("google_vertex_ai_rerank") - .taskType(TaskType.Rerank) - .inferenceConfig(i -> i - .service("googlevertexai") - .serviceSettings(JsonData.fromJson("{\"service_account_json\":\"service-account-json\",\"project_id\":\"project-id\"}")) - ) - ); diff --git a/specification/inference/put_hugging_face/PutHuggingFaceRequest.ts b/specification/inference/put_hugging_face/PutHuggingFaceRequest.ts index 9181c42149..d4c16ffb84 100644 --- a/specification/inference/put_hugging_face/PutHuggingFaceRequest.ts +++ b/specification/inference/put_hugging_face/PutHuggingFaceRequest.ts @@ -19,6 +19,7 @@ import { RequestBase } from '@_types/Base' import { Id } from '@_types/common' +import { Duration } from '@_types/Time' import { HuggingFaceServiceSettings, HuggingFaceServiceType, @@ -90,6 +91,13 @@ export interface Request extends RequestBase { */ huggingface_inference_id: Id } + query_parameters: { + /** + * Specifies the amount of time to wait for the inference endpoint to be created. + * @server_default 30s + */ + timeout?: Duration + } body: { /** * The chunking configuration object. diff --git a/specification/inference/put_hugging_face/examples/request/PutHuggingFaceRequestExample1.yaml b/specification/inference/put_hugging_face/examples/request/PutHuggingFaceRequestExample1.yaml index 2d4d81269d..aff674f7fc 100644 --- a/specification/inference/put_hugging_face/examples/request/PutHuggingFaceRequestExample1.yaml +++ b/specification/inference/put_hugging_face/examples/request/PutHuggingFaceRequestExample1.yaml @@ -12,71 +12,3 @@ value: |- "url": "url-endpoint" } } -alternatives: - - language: Python - code: |- - resp = client.inference.put( - task_type="text_embedding", - inference_id="hugging-face-embeddings", - inference_config={ - "service": "hugging_face", - "service_settings": { - "api_key": "hugging-face-access-token", - "url": "url-endpoint" - } - }, - ) - - language: JavaScript - code: |- - const response = await client.inference.put({ - task_type: "text_embedding", - inference_id: "hugging-face-embeddings", - inference_config: { - service: "hugging_face", - service_settings: { - api_key: "hugging-face-access-token", - url: "url-endpoint", - }, - }, - }); - - language: Ruby - code: |- - response = client.inference.put( - task_type: "text_embedding", - inference_id: "hugging-face-embeddings", - body: { - "service": "hugging_face", - "service_settings": { - "api_key": "hugging-face-access-token", - "url": "url-endpoint" - } - } - ) - - language: PHP - code: |- - $resp = $client->inference()->put([ - "task_type" => "text_embedding", - "inference_id" => "hugging-face-embeddings", - "body" => [ - "service" => "hugging_face", - "service_settings" => [ - "api_key" => "hugging-face-access-token", - "url" => "url-endpoint", - ], - ], - ]); - - language: curl - code: - 'curl -X PUT -H "Authorization: ApiKey $ELASTIC_API_KEY" -H "Content-Type: application/json" -d - ''{"service":"hugging_face","service_settings":{"api_key":"hugging-face-access-token","url":"url-endpoint"}}'' - "$ELASTICSEARCH_URL/_inference/text_embedding/hugging-face-embeddings"' - - language: Java - code: | - client.inference().put(p -> p - .inferenceId("hugging-face-embeddings") - .taskType(TaskType.TextEmbedding) - .inferenceConfig(i -> i - .service("hugging_face") - .serviceSettings(JsonData.fromJson("{\"api_key\":\"hugging-face-access-token\",\"url\":\"url-endpoint\"}")) - ) - ); diff --git a/specification/inference/put_hugging_face/examples/request/PutHuggingFaceRequestExample2.yaml b/specification/inference/put_hugging_face/examples/request/PutHuggingFaceRequestExample2.yaml index e6f830d821..cb5354b87f 100644 --- a/specification/inference/put_hugging_face/examples/request/PutHuggingFaceRequestExample2.yaml +++ b/specification/inference/put_hugging_face/examples/request/PutHuggingFaceRequestExample2.yaml @@ -14,88 +14,3 @@ value: |- "top_n": 3 } } -alternatives: - - language: Python - code: |- - resp = client.inference.put( - task_type="rerank", - inference_id="hugging-face-rerank", - inference_config={ - "service": "hugging_face", - "service_settings": { - "api_key": "hugging-face-access-token", - "url": "url-endpoint" - }, - "task_settings": { - "return_documents": True, - "top_n": 3 - } - }, - ) - - language: JavaScript - code: |- - const response = await client.inference.put({ - task_type: "rerank", - inference_id: "hugging-face-rerank", - inference_config: { - service: "hugging_face", - service_settings: { - api_key: "hugging-face-access-token", - url: "url-endpoint", - }, - task_settings: { - return_documents: true, - top_n: 3, - }, - }, - }); - - language: Ruby - code: |- - response = client.inference.put( - task_type: "rerank", - inference_id: "hugging-face-rerank", - body: { - "service": "hugging_face", - "service_settings": { - "api_key": "hugging-face-access-token", - "url": "url-endpoint" - }, - "task_settings": { - "return_documents": true, - "top_n": 3 - } - } - ) - - language: PHP - code: |- - $resp = $client->inference()->put([ - "task_type" => "rerank", - "inference_id" => "hugging-face-rerank", - "body" => [ - "service" => "hugging_face", - "service_settings" => [ - "api_key" => "hugging-face-access-token", - "url" => "url-endpoint", - ], - "task_settings" => [ - "return_documents" => true, - "top_n" => 3, - ], - ], - ]); - - language: curl - code: - "curl -X PUT -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d - '{\"service\":\"hugging_face\",\"service_settings\":{\"api_key\":\"hugging-face-access-token\",\"url\":\"url-endpoint\"},\"ta\ - sk_settings\":{\"return_documents\":true,\"top_n\":3}}' \"$ELASTICSEARCH_URL/_inference/rerank/hugging-face-rerank\"" - - language: Java - code: | - client.inference().put(p -> p - .inferenceId("hugging-face-rerank") - .taskType(TaskType.Rerank) - .inferenceConfig(i -> i - .service("hugging_face") - .serviceSettings(JsonData.fromJson("{\"api_key\":\"hugging-face-access-token\",\"url\":\"url-endpoint\"}")) - .taskSettings(JsonData.fromJson("{\"return_documents\":true,\"top_n\":3}")) - ) - ); diff --git a/specification/inference/put_jinaai/PutJinaAiRequest.ts b/specification/inference/put_jinaai/PutJinaAiRequest.ts index c34b80d4a4..6685c2c874 100644 --- a/specification/inference/put_jinaai/PutJinaAiRequest.ts +++ b/specification/inference/put_jinaai/PutJinaAiRequest.ts @@ -19,6 +19,7 @@ import { RequestBase } from '@_types/Base' import { Id } from '@_types/common' +import { Duration } from '@_types/Time' import { JinaAIServiceSettings, JinaAIServiceType, @@ -57,6 +58,13 @@ export interface Request extends RequestBase { */ jinaai_inference_id: Id } + query_parameters: { + /** + * Specifies the amount of time to wait for the inference endpoint to be created. + * @server_default 30s + */ + timeout?: Duration + } body: { /** * The chunking configuration object. diff --git a/specification/inference/put_jinaai/examples/request/PutJinaAiRequestExample1.yaml b/specification/inference/put_jinaai/examples/request/PutJinaAiRequestExample1.yaml index 01a6f1221e..e574f680da 100644 --- a/specification/inference/put_jinaai/examples/request/PutJinaAiRequestExample1.yaml +++ b/specification/inference/put_jinaai/examples/request/PutJinaAiRequestExample1.yaml @@ -12,71 +12,3 @@ value: |- "api_key": "JinaAi-Api-key" } } -alternatives: - - language: Python - code: |- - resp = client.inference.put( - task_type="text_embedding", - inference_id="jinaai-embeddings", - inference_config={ - "service": "jinaai", - "service_settings": { - "model_id": "jina-embeddings-v3", - "api_key": "JinaAi-Api-key" - } - }, - ) - - language: JavaScript - code: |- - const response = await client.inference.put({ - task_type: "text_embedding", - inference_id: "jinaai-embeddings", - inference_config: { - service: "jinaai", - service_settings: { - model_id: "jina-embeddings-v3", - api_key: "JinaAi-Api-key", - }, - }, - }); - - language: Ruby - code: |- - response = client.inference.put( - task_type: "text_embedding", - inference_id: "jinaai-embeddings", - body: { - "service": "jinaai", - "service_settings": { - "model_id": "jina-embeddings-v3", - "api_key": "JinaAi-Api-key" - } - } - ) - - language: PHP - code: |- - $resp = $client->inference()->put([ - "task_type" => "text_embedding", - "inference_id" => "jinaai-embeddings", - "body" => [ - "service" => "jinaai", - "service_settings" => [ - "model_id" => "jina-embeddings-v3", - "api_key" => "JinaAi-Api-key", - ], - ], - ]); - - language: curl - code: - 'curl -X PUT -H "Authorization: ApiKey $ELASTIC_API_KEY" -H "Content-Type: application/json" -d - ''{"service":"jinaai","service_settings":{"model_id":"jina-embeddings-v3","api_key":"JinaAi-Api-key"}}'' - "$ELASTICSEARCH_URL/_inference/text_embedding/jinaai-embeddings"' - - language: Java - code: | - client.inference().put(p -> p - .inferenceId("jinaai-embeddings") - .taskType(TaskType.TextEmbedding) - .inferenceConfig(i -> i - .service("jinaai") - .serviceSettings(JsonData.fromJson("{\"model_id\":\"jina-embeddings-v3\",\"api_key\":\"JinaAi-Api-key\"}")) - ) - ); diff --git a/specification/inference/put_jinaai/examples/request/PutJinaAiRequestExample2.yaml b/specification/inference/put_jinaai/examples/request/PutJinaAiRequestExample2.yaml index a638f53a0d..d48c6a76d2 100644 --- a/specification/inference/put_jinaai/examples/request/PutJinaAiRequestExample2.yaml +++ b/specification/inference/put_jinaai/examples/request/PutJinaAiRequestExample2.yaml @@ -14,88 +14,3 @@ value: |- "return_documents": true } } -alternatives: - - language: Python - code: |- - resp = client.inference.put( - task_type="rerank", - inference_id="jinaai-rerank", - inference_config={ - "service": "jinaai", - "service_settings": { - "api_key": "JinaAI-Api-key", - "model_id": "jina-reranker-v2-base-multilingual" - }, - "task_settings": { - "top_n": 10, - "return_documents": True - } - }, - ) - - language: JavaScript - code: |- - const response = await client.inference.put({ - task_type: "rerank", - inference_id: "jinaai-rerank", - inference_config: { - service: "jinaai", - service_settings: { - api_key: "JinaAI-Api-key", - model_id: "jina-reranker-v2-base-multilingual", - }, - task_settings: { - top_n: 10, - return_documents: true, - }, - }, - }); - - language: Ruby - code: |- - response = client.inference.put( - task_type: "rerank", - inference_id: "jinaai-rerank", - body: { - "service": "jinaai", - "service_settings": { - "api_key": "JinaAI-Api-key", - "model_id": "jina-reranker-v2-base-multilingual" - }, - "task_settings": { - "top_n": 10, - "return_documents": true - } - } - ) - - language: PHP - code: |- - $resp = $client->inference()->put([ - "task_type" => "rerank", - "inference_id" => "jinaai-rerank", - "body" => [ - "service" => "jinaai", - "service_settings" => [ - "api_key" => "JinaAI-Api-key", - "model_id" => "jina-reranker-v2-base-multilingual", - ], - "task_settings" => [ - "top_n" => 10, - "return_documents" => true, - ], - ], - ]); - - language: curl - code: - "curl -X PUT -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d - '{\"service\":\"jinaai\",\"service_settings\":{\"api_key\":\"JinaAI-Api-key\",\"model_id\":\"jina-reranker-v2-base-multilingu\ - al\"},\"task_settings\":{\"top_n\":10,\"return_documents\":true}}' \"$ELASTICSEARCH_URL/_inference/rerank/jinaai-rerank\"" - - language: Java - code: > - client.inference().put(p -> p - .inferenceId("jinaai-rerank") - .taskType(TaskType.Rerank) - .inferenceConfig(i -> i - .service("jinaai") - .serviceSettings(JsonData.fromJson("{\"api_key\":\"JinaAI-Api-key\",\"model_id\":\"jina-reranker-v2-base-multilingual\"}")) - .taskSettings(JsonData.fromJson("{\"top_n\":10,\"return_documents\":true}")) - ) - ); diff --git a/specification/inference/put_mistral/PutMistralRequest.ts b/specification/inference/put_mistral/PutMistralRequest.ts index 17508e1505..3a7b5eaace 100644 --- a/specification/inference/put_mistral/PutMistralRequest.ts +++ b/specification/inference/put_mistral/PutMistralRequest.ts @@ -19,6 +19,7 @@ import { RequestBase } from '@_types/Base' import { Id } from '@_types/common' +import { Duration } from '@_types/Time' import { MistralServiceSettings, MistralServiceType, @@ -53,6 +54,13 @@ export interface Request extends RequestBase { */ mistral_inference_id: Id } + query_parameters: { + /** + * Specifies the amount of time to wait for the inference endpoint to be created. + * @server_default 30s + */ + timeout?: Duration + } body: { /** * The chunking configuration object. diff --git a/specification/inference/put_mistral/examples/request/PutMistralRequestExample1.yaml b/specification/inference/put_mistral/examples/request/PutMistralRequestExample1.yaml index 29e006a4f3..c0424aa193 100644 --- a/specification/inference/put_mistral/examples/request/PutMistralRequestExample1.yaml +++ b/specification/inference/put_mistral/examples/request/PutMistralRequestExample1.yaml @@ -12,71 +12,3 @@ value: |- "model": "mistral-embed" } } -alternatives: - - language: Python - code: |- - resp = client.inference.put( - task_type="text_embedding", - inference_id="mistral-embeddings-test", - inference_config={ - "service": "mistral", - "service_settings": { - "api_key": "Mistral-API-Key", - "model": "mistral-embed" - } - }, - ) - - language: JavaScript - code: |- - const response = await client.inference.put({ - task_type: "text_embedding", - inference_id: "mistral-embeddings-test", - inference_config: { - service: "mistral", - service_settings: { - api_key: "Mistral-API-Key", - model: "mistral-embed", - }, - }, - }); - - language: Ruby - code: |- - response = client.inference.put( - task_type: "text_embedding", - inference_id: "mistral-embeddings-test", - body: { - "service": "mistral", - "service_settings": { - "api_key": "Mistral-API-Key", - "model": "mistral-embed" - } - } - ) - - language: PHP - code: |- - $resp = $client->inference()->put([ - "task_type" => "text_embedding", - "inference_id" => "mistral-embeddings-test", - "body" => [ - "service" => "mistral", - "service_settings" => [ - "api_key" => "Mistral-API-Key", - "model" => "mistral-embed", - ], - ], - ]); - - language: curl - code: - 'curl -X PUT -H "Authorization: ApiKey $ELASTIC_API_KEY" -H "Content-Type: application/json" -d - ''{"service":"mistral","service_settings":{"api_key":"Mistral-API-Key","model":"mistral-embed"}}'' - "$ELASTICSEARCH_URL/_inference/text_embedding/mistral-embeddings-test"' - - language: Java - code: | - client.inference().put(p -> p - .inferenceId("mistral-embeddings-test") - .taskType(TaskType.TextEmbedding) - .inferenceConfig(i -> i - .service("mistral") - .serviceSettings(JsonData.fromJson("{\"api_key\":\"Mistral-API-Key\",\"model\":\"mistral-embed\"}")) - ) - ); diff --git a/specification/inference/put_openai/PutOpenAiRequest.ts b/specification/inference/put_openai/PutOpenAiRequest.ts index d322b89c36..b6bb675f46 100644 --- a/specification/inference/put_openai/PutOpenAiRequest.ts +++ b/specification/inference/put_openai/PutOpenAiRequest.ts @@ -19,6 +19,7 @@ import { RequestBase } from '@_types/Base' import { Id } from '@_types/common' +import { Duration } from '@_types/Time' import { OpenAIServiceSettings, OpenAIServiceType, @@ -55,6 +56,13 @@ export interface Request extends RequestBase { */ openai_inference_id: Id } + query_parameters: { + /** + * Specifies the amount of time to wait for the inference endpoint to be created. + * @server_default 30s + */ + timeout?: Duration + } body: { /** * The chunking configuration object. diff --git a/specification/inference/put_openai/examples/request/PutOpenAiRequestExample1.yaml b/specification/inference/put_openai/examples/request/PutOpenAiRequestExample1.yaml index c57ae807fa..1b9b7c11b7 100644 --- a/specification/inference/put_openai/examples/request/PutOpenAiRequestExample1.yaml +++ b/specification/inference/put_openai/examples/request/PutOpenAiRequestExample1.yaml @@ -13,75 +13,3 @@ value: |- "dimensions": 128 } } -alternatives: - - language: Python - code: |- - resp = client.inference.put( - task_type="text_embedding", - inference_id="openai-embeddings", - inference_config={ - "service": "openai", - "service_settings": { - "api_key": "OpenAI-API-Key", - "model_id": "text-embedding-3-small", - "dimensions": 128 - } - }, - ) - - language: JavaScript - code: |- - const response = await client.inference.put({ - task_type: "text_embedding", - inference_id: "openai-embeddings", - inference_config: { - service: "openai", - service_settings: { - api_key: "OpenAI-API-Key", - model_id: "text-embedding-3-small", - dimensions: 128, - }, - }, - }); - - language: Ruby - code: |- - response = client.inference.put( - task_type: "text_embedding", - inference_id: "openai-embeddings", - body: { - "service": "openai", - "service_settings": { - "api_key": "OpenAI-API-Key", - "model_id": "text-embedding-3-small", - "dimensions": 128 - } - } - ) - - language: PHP - code: |- - $resp = $client->inference()->put([ - "task_type" => "text_embedding", - "inference_id" => "openai-embeddings", - "body" => [ - "service" => "openai", - "service_settings" => [ - "api_key" => "OpenAI-API-Key", - "model_id" => "text-embedding-3-small", - "dimensions" => 128, - ], - ], - ]); - - language: curl - code: - "curl -X PUT -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d - '{\"service\":\"openai\",\"service_settings\":{\"api_key\":\"OpenAI-API-Key\",\"model_id\":\"text-embedding-3-small\",\"dimen\ - sions\":128}}' \"$ELASTICSEARCH_URL/_inference/text_embedding/openai-embeddings\"" - - language: Java - code: > - client.inference().put(p -> p - .inferenceId("openai-embeddings") - .taskType(TaskType.TextEmbedding) - .inferenceConfig(i -> i - .service("openai") - .serviceSettings(JsonData.fromJson("{\"api_key\":\"OpenAI-API-Key\",\"model_id\":\"text-embedding-3-small\",\"dimensions\":128}")) - ) - ); diff --git a/specification/inference/put_openai/examples/request/PutOpenAiRequestExample2.yaml b/specification/inference/put_openai/examples/request/PutOpenAiRequestExample2.yaml index c40aaeb571..81bbd193f7 100644 --- a/specification/inference/put_openai/examples/request/PutOpenAiRequestExample2.yaml +++ b/specification/inference/put_openai/examples/request/PutOpenAiRequestExample2.yaml @@ -13,84 +13,3 @@ value: |- "model": "amazon.titan-text-premier-v1:0" } } -alternatives: - - language: Python - code: |- - resp = client.inference.put( - task_type="completion", - inference_id="amazon_bedrock_completion", - inference_config={ - "service": "amazonbedrock", - "service_settings": { - "access_key": "AWS-access-key", - "secret_key": "AWS-secret-key", - "region": "us-east-1", - "provider": "amazontitan", - "model": "amazon.titan-text-premier-v1:0" - } - }, - ) - - language: JavaScript - code: |- - const response = await client.inference.put({ - task_type: "completion", - inference_id: "amazon_bedrock_completion", - inference_config: { - service: "amazonbedrock", - service_settings: { - access_key: "AWS-access-key", - secret_key: "AWS-secret-key", - region: "us-east-1", - provider: "amazontitan", - model: "amazon.titan-text-premier-v1:0", - }, - }, - }); - - language: Ruby - code: |- - response = client.inference.put( - task_type: "completion", - inference_id: "amazon_bedrock_completion", - body: { - "service": "amazonbedrock", - "service_settings": { - "access_key": "AWS-access-key", - "secret_key": "AWS-secret-key", - "region": "us-east-1", - "provider": "amazontitan", - "model": "amazon.titan-text-premier-v1:0" - } - } - ) - - language: PHP - code: |- - $resp = $client->inference()->put([ - "task_type" => "completion", - "inference_id" => "amazon_bedrock_completion", - "body" => [ - "service" => "amazonbedrock", - "service_settings" => [ - "access_key" => "AWS-access-key", - "secret_key" => "AWS-secret-key", - "region" => "us-east-1", - "provider" => "amazontitan", - "model" => "amazon.titan-text-premier-v1:0", - ], - ], - ]); - - language: curl - code: - "curl -X PUT -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d - '{\"service\":\"amazonbedrock\",\"service_settings\":{\"access_key\":\"AWS-access-key\",\"secret_key\":\"AWS-secret-key\",\"r\ - egion\":\"us-east-1\",\"provider\":\"amazontitan\",\"model\":\"amazon.titan-text-premier-v1:0\"}}' - \"$ELASTICSEARCH_URL/_inference/completion/amazon_bedrock_completion\"" - - language: Java - code: > - client.inference().put(p -> p - .inferenceId("amazon_bedrock_completion") - .taskType(TaskType.Completion) - .inferenceConfig(i -> i - .service("amazonbedrock") - .serviceSettings(JsonData.fromJson("{\"access_key\":\"AWS-access-key\",\"secret_key\":\"AWS-secret-key\",\"region\":\"us-east-1\",\"provider\":\"amazontitan\",\"model\":\"amazon.titan-text-premier-v1:0\"}")) - ) - ); diff --git a/specification/inference/put_voyageai/PutVoyageAIRequest.ts b/specification/inference/put_voyageai/PutVoyageAIRequest.ts index 9d1c2e0006..2bb4b7ef46 100644 --- a/specification/inference/put_voyageai/PutVoyageAIRequest.ts +++ b/specification/inference/put_voyageai/PutVoyageAIRequest.ts @@ -19,6 +19,7 @@ import { RequestBase } from '@_types/Base' import { Id } from '@_types/common' +import { Duration } from '@_types/Time' import { VoyageAIServiceSettings, VoyageAIServiceType, @@ -56,6 +57,13 @@ export interface Request extends RequestBase { */ voyageai_inference_id: Id } + query_parameters: { + /** + * Specifies the amount of time to wait for the inference endpoint to be created. + * @server_default 30s + */ + timeout?: Duration + } body: { /** * The chunking configuration object. diff --git a/specification/inference/put_voyageai/examples/request/PutVoyageAIRequestExample1.yaml b/specification/inference/put_voyageai/examples/request/PutVoyageAIRequestExample1.yaml index fe2ccf9b0b..7f889ec4bd 100644 --- a/specification/inference/put_voyageai/examples/request/PutVoyageAIRequestExample1.yaml +++ b/specification/inference/put_voyageai/examples/request/PutVoyageAIRequestExample1.yaml @@ -12,71 +12,3 @@ value: |- "dimensions": 512 } } -alternatives: - - language: Python - code: |- - resp = client.inference.put( - task_type="text_embedding", - inference_id="openai-embeddings", - inference_config={ - "service": "voyageai", - "service_settings": { - "model_id": "voyage-3-large", - "dimensions": 512 - } - }, - ) - - language: JavaScript - code: |- - const response = await client.inference.put({ - task_type: "text_embedding", - inference_id: "openai-embeddings", - inference_config: { - service: "voyageai", - service_settings: { - model_id: "voyage-3-large", - dimensions: 512, - }, - }, - }); - - language: Ruby - code: |- - response = client.inference.put( - task_type: "text_embedding", - inference_id: "openai-embeddings", - body: { - "service": "voyageai", - "service_settings": { - "model_id": "voyage-3-large", - "dimensions": 512 - } - } - ) - - language: PHP - code: |- - $resp = $client->inference()->put([ - "task_type" => "text_embedding", - "inference_id" => "openai-embeddings", - "body" => [ - "service" => "voyageai", - "service_settings" => [ - "model_id" => "voyage-3-large", - "dimensions" => 512, - ], - ], - ]); - - language: curl - code: - 'curl -X PUT -H "Authorization: ApiKey $ELASTIC_API_KEY" -H "Content-Type: application/json" -d - ''{"service":"voyageai","service_settings":{"model_id":"voyage-3-large","dimensions":512}}'' - "$ELASTICSEARCH_URL/_inference/text_embedding/openai-embeddings"' - - language: Java - code: | - client.inference().put(p -> p - .inferenceId("openai-embeddings") - .taskType(TaskType.TextEmbedding) - .inferenceConfig(i -> i - .service("voyageai") - .serviceSettings(JsonData.fromJson("{\"model_id\":\"voyage-3-large\",\"dimensions\":512}")) - ) - ); diff --git a/specification/inference/put_voyageai/examples/request/PutVoyageAIRequestExample2.yaml b/specification/inference/put_voyageai/examples/request/PutVoyageAIRequestExample2.yaml index 66f6dcc496..976d13478f 100644 --- a/specification/inference/put_voyageai/examples/request/PutVoyageAIRequestExample2.yaml +++ b/specification/inference/put_voyageai/examples/request/PutVoyageAIRequestExample2.yaml @@ -9,67 +9,3 @@ value: |- "model_id": "rerank-2" } } -alternatives: - - language: Python - code: |- - resp = client.inference.put( - task_type="rerank", - inference_id="voyageai-rerank", - inference_config={ - "service": "voyageai", - "service_settings": { - "model_id": "rerank-2" - } - }, - ) - - language: JavaScript - code: |- - const response = await client.inference.put({ - task_type: "rerank", - inference_id: "voyageai-rerank", - inference_config: { - service: "voyageai", - service_settings: { - model_id: "rerank-2", - }, - }, - }); - - language: Ruby - code: |- - response = client.inference.put( - task_type: "rerank", - inference_id: "voyageai-rerank", - body: { - "service": "voyageai", - "service_settings": { - "model_id": "rerank-2" - } - } - ) - - language: PHP - code: |- - $resp = $client->inference()->put([ - "task_type" => "rerank", - "inference_id" => "voyageai-rerank", - "body" => [ - "service" => "voyageai", - "service_settings" => [ - "model_id" => "rerank-2", - ], - ], - ]); - - language: curl - code: - 'curl -X PUT -H "Authorization: ApiKey $ELASTIC_API_KEY" -H "Content-Type: application/json" -d - ''{"service":"voyageai","service_settings":{"model_id":"rerank-2"}}'' - "$ELASTICSEARCH_URL/_inference/rerank/voyageai-rerank"' - - language: Java - code: | - client.inference().put(p -> p - .inferenceId("voyageai-rerank") - .taskType(TaskType.Rerank) - .inferenceConfig(i -> i - .service("voyageai") - .serviceSettings(JsonData.fromJson("{\"model_id\":\"rerank-2\"}")) - ) - ); diff --git a/specification/inference/put_watsonx/PutWatsonxRequest.ts b/specification/inference/put_watsonx/PutWatsonxRequest.ts index f582fe0790..b48fb3aa4c 100644 --- a/specification/inference/put_watsonx/PutWatsonxRequest.ts +++ b/specification/inference/put_watsonx/PutWatsonxRequest.ts @@ -19,6 +19,7 @@ import { RequestBase } from '@_types/Base' import { Id } from '@_types/common' +import { Duration } from '@_types/Time' import { WatsonxServiceSettings, WatsonxServiceType, @@ -54,6 +55,13 @@ export interface Request extends RequestBase { */ watsonx_inference_id: Id } + query_parameters: { + /** + * Specifies the amount of time to wait for the inference endpoint to be created. + * @server_default 30s + */ + timeout?: Duration + } body: { /** * The type of service supported for the specified task type. In this case, `watsonxai`. diff --git a/specification/inference/put_watsonx/examples/request/PutWatsonxRequestExample1.yaml b/specification/inference/put_watsonx/examples/request/PutWatsonxRequestExample1.yaml index ff714c44f5..a488512a57 100644 --- a/specification/inference/put_watsonx/examples/request/PutWatsonxRequestExample1.yaml +++ b/specification/inference/put_watsonx/examples/request/PutWatsonxRequestExample1.yaml @@ -13,84 +13,3 @@ value: |- "api_version": "2024-03-14" } } -alternatives: - - language: Python - code: |- - resp = client.inference.put( - task_type="text_embedding", - inference_id="watsonx-embeddings", - inference_config={ - "service": "watsonxai", - "service_settings": { - "api_key": "Watsonx-API-Key", - "url": "Wastonx-URL", - "model_id": "ibm/slate-30m-english-rtrvr", - "project_id": "IBM-Cloud-ID", - "api_version": "2024-03-14" - } - }, - ) - - language: JavaScript - code: |- - const response = await client.inference.put({ - task_type: "text_embedding", - inference_id: "watsonx-embeddings", - inference_config: { - service: "watsonxai", - service_settings: { - api_key: "Watsonx-API-Key", - url: "Wastonx-URL", - model_id: "ibm/slate-30m-english-rtrvr", - project_id: "IBM-Cloud-ID", - api_version: "2024-03-14", - }, - }, - }); - - language: Ruby - code: |- - response = client.inference.put( - task_type: "text_embedding", - inference_id: "watsonx-embeddings", - body: { - "service": "watsonxai", - "service_settings": { - "api_key": "Watsonx-API-Key", - "url": "Wastonx-URL", - "model_id": "ibm/slate-30m-english-rtrvr", - "project_id": "IBM-Cloud-ID", - "api_version": "2024-03-14" - } - } - ) - - language: PHP - code: |- - $resp = $client->inference()->put([ - "task_type" => "text_embedding", - "inference_id" => "watsonx-embeddings", - "body" => [ - "service" => "watsonxai", - "service_settings" => [ - "api_key" => "Watsonx-API-Key", - "url" => "Wastonx-URL", - "model_id" => "ibm/slate-30m-english-rtrvr", - "project_id" => "IBM-Cloud-ID", - "api_version" => "2024-03-14", - ], - ], - ]); - - language: curl - code: - "curl -X PUT -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d - '{\"service\":\"watsonxai\",\"service_settings\":{\"api_key\":\"Watsonx-API-Key\",\"url\":\"Wastonx-URL\",\"model_id\":\"ibm/\ - slate-30m-english-rtrvr\",\"project_id\":\"IBM-Cloud-ID\",\"api_version\":\"2024-03-14\"}}' - \"$ELASTICSEARCH_URL/_inference/text_embedding/watsonx-embeddings\"" - - language: Java - code: > - client.inference().put(p -> p - .inferenceId("watsonx-embeddings") - .taskType(TaskType.TextEmbedding) - .inferenceConfig(i -> i - .service("watsonxai") - .serviceSettings(JsonData.fromJson("{\"api_key\":\"Watsonx-API-Key\",\"url\":\"Wastonx-URL\",\"model_id\":\"ibm/slate-30m-english-rtrvr\",\"project_id\":\"IBM-Cloud-ID\",\"api_version\":\"2024-03-14\"}")) - ) - ); diff --git a/specification/inference/rerank/RerankRequest.ts b/specification/inference/rerank/RerankRequest.ts index 9c0876d9bc..04ffbed698 100644 --- a/specification/inference/rerank/RerankRequest.ts +++ b/specification/inference/rerank/RerankRequest.ts @@ -23,7 +23,7 @@ import { Duration } from '@_types/Time' import { TaskSettings } from '@inference/_types/Services' /** - * Perform rereanking inference on the service + * Perform reranking inference on the service * @rest_spec_name inference.rerank * @availability stack since=8.11.0 stability=stable visibility=public * @availability serverless stability=stable visibility=public diff --git a/specification/inference/rerank/examples/request/RerankRequestExample1.yaml b/specification/inference/rerank/examples/request/RerankRequestExample1.yaml index 1440c6f642..56c359a99f 100644 --- a/specification/inference/rerank/examples/request/RerankRequestExample1.yaml +++ b/specification/inference/rerank/examples/request/RerankRequestExample1.yaml @@ -7,72 +7,3 @@ value: |- "input": ["luke", "like", "leia", "chewy","r2d2", "star", "wars"], "query": "star wars main character" } -alternatives: - - language: Python - code: |- - resp = client.inference.rerank( - inference_id="cohere_rerank", - input=[ - "luke", - "like", - "leia", - "chewy", - "r2d2", - "star", - "wars" - ], - query="star wars main character", - ) - - language: JavaScript - code: |- - const response = await client.inference.rerank({ - inference_id: "cohere_rerank", - input: ["luke", "like", "leia", "chewy", "r2d2", "star", "wars"], - query: "star wars main character", - }); - - language: Ruby - code: |- - response = client.inference.rerank( - inference_id: "cohere_rerank", - body: { - "input": [ - "luke", - "like", - "leia", - "chewy", - "r2d2", - "star", - "wars" - ], - "query": "star wars main character" - } - ) - - language: PHP - code: |- - $resp = $client->inference()->rerank([ - "inference_id" => "cohere_rerank", - "body" => [ - "input" => array( - "luke", - "like", - "leia", - "chewy", - "r2d2", - "star", - "wars", - ), - "query" => "star wars main character", - ], - ]); - - language: curl - code: - 'curl -X POST -H "Authorization: ApiKey $ELASTIC_API_KEY" -H "Content-Type: application/json" -d - ''{"input":["luke","like","leia","chewy","r2d2","star","wars"],"query":"star wars main character"}'' - "$ELASTICSEARCH_URL/_inference/rerank/cohere_rerank"' - - language: Java - code: | - client.inference().rerank(r -> r - .inferenceId("cohere_rerank") - .input(List.of("luke","like","leia","chewy","r2d2","star","wars")) - .query("star wars main character") - ); diff --git a/specification/inference/rerank/examples/request/RerankRequestExample2.yaml b/specification/inference/rerank/examples/request/RerankRequestExample2.yaml index 24b48b96ab..faa519fb78 100644 --- a/specification/inference/rerank/examples/request/RerankRequestExample2.yaml +++ b/specification/inference/rerank/examples/request/RerankRequestExample2.yaml @@ -9,80 +9,3 @@ value: |- "return_documents": false, "top_n": 2 } -alternatives: - - language: Python - code: |- - resp = client.inference.rerank( - inference_id="bge-reranker-base-mkn", - input=[ - "luke", - "like", - "leia", - "chewy", - "r2d2", - "star", - "wars" - ], - query="star wars main character", - return_documents=False, - top_n=2, - ) - - language: JavaScript - code: |- - const response = await client.inference.rerank({ - inference_id: "bge-reranker-base-mkn", - input: ["luke", "like", "leia", "chewy", "r2d2", "star", "wars"], - query: "star wars main character", - return_documents: false, - top_n: 2, - }); - - language: Ruby - code: |- - response = client.inference.rerank( - inference_id: "bge-reranker-base-mkn", - body: { - "input": [ - "luke", - "like", - "leia", - "chewy", - "r2d2", - "star", - "wars" - ], - "query": "star wars main character", - "return_documents": false, - "top_n": 2 - } - ) - - language: PHP - code: |- - $resp = $client->inference()->rerank([ - "inference_id" => "bge-reranker-base-mkn", - "body" => [ - "input" => array( - "luke", - "like", - "leia", - "chewy", - "r2d2", - "star", - "wars", - ), - "query" => "star wars main character", - "return_documents" => false, - "top_n" => 2, - ], - ]); - - language: curl - code: - 'curl -X POST -H "Authorization: ApiKey $ELASTIC_API_KEY" -H "Content-Type: application/json" -d - ''{"input":["luke","like","leia","chewy","r2d2","star","wars"],"query":"star wars main - character","return_documents":false,"top_n":2}'' "$ELASTICSEARCH_URL/_inference/rerank/bge-reranker-base-mkn"' - - language: Java - code: | - client.inference().rerank(r -> r - .inferenceId("bge-reranker-base-mkn") - .input(List.of("luke","like","leia","chewy","r2d2","star","wars")) - .query("star wars main character") - ); diff --git a/specification/inference/rerank/examples/request/RerankRequestExample3.yaml b/specification/inference/rerank/examples/request/RerankRequestExample3.yaml index 3e351a9863..9e17241d7e 100644 --- a/specification/inference/rerank/examples/request/RerankRequestExample3.yaml +++ b/specification/inference/rerank/examples/request/RerankRequestExample3.yaml @@ -9,80 +9,3 @@ value: |- "return_documents": true, "top_n": 3 } -alternatives: - - language: Python - code: |- - resp = client.inference.rerank( - inference_id="bge-reranker-base-mkn", - input=[ - "luke", - "like", - "leia", - "chewy", - "r2d2", - "star", - "wars" - ], - query="star wars main character", - return_documents=True, - top_n=3, - ) - - language: JavaScript - code: |- - const response = await client.inference.rerank({ - inference_id: "bge-reranker-base-mkn", - input: ["luke", "like", "leia", "chewy", "r2d2", "star", "wars"], - query: "star wars main character", - return_documents: true, - top_n: 3, - }); - - language: Ruby - code: |- - response = client.inference.rerank( - inference_id: "bge-reranker-base-mkn", - body: { - "input": [ - "luke", - "like", - "leia", - "chewy", - "r2d2", - "star", - "wars" - ], - "query": "star wars main character", - "return_documents": true, - "top_n": 3 - } - ) - - language: PHP - code: |- - $resp = $client->inference()->rerank([ - "inference_id" => "bge-reranker-base-mkn", - "body" => [ - "input" => array( - "luke", - "like", - "leia", - "chewy", - "r2d2", - "star", - "wars", - ), - "query" => "star wars main character", - "return_documents" => true, - "top_n" => 3, - ], - ]); - - language: curl - code: - 'curl -X POST -H "Authorization: ApiKey $ELASTIC_API_KEY" -H "Content-Type: application/json" -d - ''{"input":["luke","like","leia","chewy","r2d2","star","wars"],"query":"star wars main - character","return_documents":true,"top_n":3}'' "$ELASTICSEARCH_URL/_inference/rerank/bge-reranker-base-mkn"' - - language: Java - code: | - client.inference().rerank(r -> r - .inferenceId("bge-reranker-base-mkn") - .input(List.of("luke","like","leia","chewy","r2d2","star","wars")) - .query("star wars main character") - ); diff --git a/specification/inference/sparse_embedding/examples/request/SparseEmbeddingRequestExample1.yaml b/specification/inference/sparse_embedding/examples/request/SparseEmbeddingRequestExample1.yaml index 9c8d16876b..78b349a14e 100644 --- a/specification/inference/sparse_embedding/examples/request/SparseEmbeddingRequestExample1.yaml +++ b/specification/inference/sparse_embedding/examples/request/SparseEmbeddingRequestExample1.yaml @@ -6,44 +6,3 @@ value: |- { "input": "The sky above the port was the color of television tuned to a dead channel." } -alternatives: - - language: Python - code: |- - resp = client.inference.sparse_embedding( - inference_id="my-elser-model", - input="The sky above the port was the color of television tuned to a dead channel.", - ) - - language: JavaScript - code: |- - const response = await client.inference.sparseEmbedding({ - inference_id: "my-elser-model", - input: - "The sky above the port was the color of television tuned to a dead channel.", - }); - - language: Ruby - code: |- - response = client.inference.sparse_embedding( - inference_id: "my-elser-model", - body: { - "input": "The sky above the port was the color of television tuned to a dead channel." - } - ) - - language: PHP - code: |- - $resp = $client->inference()->sparseEmbedding([ - "inference_id" => "my-elser-model", - "body" => [ - "input" => "The sky above the port was the color of television tuned to a dead channel.", - ], - ]); - - language: curl - code: - 'curl -X POST -H "Authorization: ApiKey $ELASTIC_API_KEY" -H "Content-Type: application/json" -d ''{"input":"The sky - above the port was the color of television tuned to a dead channel."}'' - "$ELASTICSEARCH_URL/_inference/sparse_embedding/my-elser-model"' - - language: Java - code: | - client.inference().sparseEmbedding(s -> s - .inferenceId("my-elser-model") - .input("The sky above the port was the color of television tuned to a dead channel.") - ); diff --git a/specification/inference/stream_completion/StreamInferenceRequest.ts b/specification/inference/stream_completion/StreamInferenceRequest.ts index 1d2c83bee9..0e08af6a6f 100644 --- a/specification/inference/stream_completion/StreamInferenceRequest.ts +++ b/specification/inference/stream_completion/StreamInferenceRequest.ts @@ -19,6 +19,7 @@ import { RequestBase } from '@_types/Base' import { Id } from '@_types/common' +import { Duration } from '@_types/Time' import { TaskSettings } from '@inference/_types/Services' /** @@ -47,6 +48,13 @@ export interface Request extends RequestBase { */ inference_id: Id } + query_parameters: { + /** + * The amount of time to wait for the inference request to complete. + * @server_default 30s + */ + timeout?: Duration + } body: { /** * The text on which you want to perform the inference task. diff --git a/specification/inference/stream_completion/examples/request/StreamInferenceRequestExample1.yaml b/specification/inference/stream_completion/examples/request/StreamInferenceRequestExample1.yaml index 3a63b05227..3066f6f95e 100644 --- a/specification/inference/stream_completion/examples/request/StreamInferenceRequestExample1.yaml +++ b/specification/inference/stream_completion/examples/request/StreamInferenceRequestExample1.yaml @@ -4,42 +4,3 @@ method_request: 'POST _inference/completion/openai-completion/_stream' # type: "request" value: input: 'What is Elastic?' -alternatives: - - language: Python - code: |- - resp = client.inference.stream_completion( - inference_id="openai-completion", - input="What is Elastic?", - ) - - language: JavaScript - code: |- - const response = await client.inference.streamCompletion({ - inference_id: "openai-completion", - input: "What is Elastic?", - }); - - language: Ruby - code: |- - response = client.inference.stream_completion( - inference_id: "openai-completion", - body: { - "input": "What is Elastic?" - } - ) - - language: PHP - code: |- - $resp = $client->inference()->streamCompletion([ - "inference_id" => "openai-completion", - "body" => [ - "input" => "What is Elastic?", - ], - ]); - - language: curl - code: - 'curl -X POST -H "Authorization: ApiKey $ELASTIC_API_KEY" -H "Content-Type: application/json" -d ''{"input":"What is - Elastic?"}'' "$ELASTICSEARCH_URL/_inference/completion/openai-completion/_stream"' - - language: Java - code: | - client.inference().streamCompletion(s -> s - .inferenceId("openai-completion") - .input("What is Elastic?") - ); diff --git a/specification/inference/text_embedding/examples/request/TextEmbeddingRequestExample1.yaml b/specification/inference/text_embedding/examples/request/TextEmbeddingRequestExample1.yaml index 94df7931ef..6ad435dfd2 100644 --- a/specification/inference/text_embedding/examples/request/TextEmbeddingRequestExample1.yaml +++ b/specification/inference/text_embedding/examples/request/TextEmbeddingRequestExample1.yaml @@ -11,57 +11,3 @@ value: |- "input_type": "ingest" } } -alternatives: - - language: Python - code: |- - resp = client.inference.text_embedding( - inference_id="my-cohere-endpoint", - input="The sky above the port was the color of television tuned to a dead channel.", - task_settings={ - "input_type": "ingest" - }, - ) - - language: JavaScript - code: |- - const response = await client.inference.textEmbedding({ - inference_id: "my-cohere-endpoint", - input: - "The sky above the port was the color of television tuned to a dead channel.", - task_settings: { - input_type: "ingest", - }, - }); - - language: Ruby - code: |- - response = client.inference.text_embedding( - inference_id: "my-cohere-endpoint", - body: { - "input": "The sky above the port was the color of television tuned to a dead channel.", - "task_settings": { - "input_type": "ingest" - } - } - ) - - language: PHP - code: |- - $resp = $client->inference()->textEmbedding([ - "inference_id" => "my-cohere-endpoint", - "body" => [ - "input" => "The sky above the port was the color of television tuned to a dead channel.", - "task_settings" => [ - "input_type" => "ingest", - ], - ], - ]); - - language: curl - code: - 'curl -X POST -H "Authorization: ApiKey $ELASTIC_API_KEY" -H "Content-Type: application/json" -d ''{"input":"The sky - above the port was the color of television tuned to a dead channel.","task_settings":{"input_type":"ingest"}}'' - "$ELASTICSEARCH_URL/_inference/text_embedding/my-cohere-endpoint"' - - language: Java - code: | - client.inference().textEmbedding(t -> t - .inferenceId("my-cohere-endpoint") - .input("The sky above the port was the color of television tuned to a dead channel.") - .taskSettings(JsonData.fromJson("{\"input_type\":\"ingest\"}")) - ); diff --git a/specification/inference/update/examples/request/InferenceUpdateExample1.yaml b/specification/inference/update/examples/request/InferenceUpdateExample1.yaml index a5c242ae29..f986bcb01d 100644 --- a/specification/inference/update/examples/request/InferenceUpdateExample1.yaml +++ b/specification/inference/update/examples/request/InferenceUpdateExample1.yaml @@ -6,48 +6,3 @@ value: |- "api_key": "" } } -alternatives: - - language: Python - code: |- - resp = client.inference.update( - inference_id="my-inference-endpoint", - inference_config={ - "service_settings": { - "api_key": "" - } - }, - ) - - language: JavaScript - code: |- - const response = await client.inference.update({ - inference_id: "my-inference-endpoint", - inference_config: { - service_settings: { - api_key: "", - }, - }, - }); - - language: Ruby - code: |- - response = client.inference.update( - inference_id: "my-inference-endpoint", - body: { - "service_settings": { - "api_key": "" - } - } - ) - - language: PHP - code: |- - $resp = $client->inference()->update([ - "inference_id" => "my-inference-endpoint", - "body" => [ - "service_settings" => [ - "api_key" => "", - ], - ], - ]); - - language: curl - code: - 'curl -X PUT -H "Authorization: ApiKey $ELASTIC_API_KEY" -H "Content-Type: application/json" -d - ''{"service_settings":{"api_key":""}}'' "$ELASTICSEARCH_URL/_inference/my-inference-endpoint/_update"' diff --git a/specification/ingest/delete_ip_location_database/examples/request/IngestDeleteIpLocationDatabaseExample1.yaml b/specification/ingest/delete_ip_location_database/examples/request/IngestDeleteIpLocationDatabaseExample1.yaml index 7833a861f8..fcf2258725 100644 --- a/specification/ingest/delete_ip_location_database/examples/request/IngestDeleteIpLocationDatabaseExample1.yaml +++ b/specification/ingest/delete_ip_location_database/examples/request/IngestDeleteIpLocationDatabaseExample1.yaml @@ -1,29 +1 @@ method_request: DELETE /_ingest/ip_location/database/my-database-id -alternatives: - - language: Python - code: |- - resp = client.ingest.delete_ip_location_database( - id="my-database-id", - ) - - language: JavaScript - code: |- - const response = await client.ingest.deleteIpLocationDatabase({ - id: "my-database-id", - }); - - language: Ruby - code: |- - response = client.ingest.delete_ip_location_database( - id: "my-database-id" - ) - - language: PHP - code: |- - $resp = $client->ingest()->deleteIpLocationDatabase([ - "id" => "my-database-id", - ]); - - language: curl - code: 'curl -X DELETE -H "Authorization: ApiKey $ELASTIC_API_KEY" "$ELASTICSEARCH_URL/_ingest/ip_location/database/my-database-id"' - - language: Java - code: | - client.ingest().deleteIpLocationDatabase(d -> d - .id("my-database-id") - ); diff --git a/specification/ingest/delete_pipeline/examples/request/IngestDeletePipelineExample1.yaml b/specification/ingest/delete_pipeline/examples/request/IngestDeletePipelineExample1.yaml index 44a8d29b1d..6474f66e49 100644 --- a/specification/ingest/delete_pipeline/examples/request/IngestDeletePipelineExample1.yaml +++ b/specification/ingest/delete_pipeline/examples/request/IngestDeletePipelineExample1.yaml @@ -1,29 +1 @@ method_request: DELETE /_ingest/pipeline/my-pipeline-id -alternatives: - - language: Python - code: |- - resp = client.ingest.delete_pipeline( - id="my-pipeline-id", - ) - - language: JavaScript - code: |- - const response = await client.ingest.deletePipeline({ - id: "my-pipeline-id", - }); - - language: Ruby - code: |- - response = client.ingest.delete_pipeline( - id: "my-pipeline-id" - ) - - language: PHP - code: |- - $resp = $client->ingest()->deletePipeline([ - "id" => "my-pipeline-id", - ]); - - language: curl - code: 'curl -X DELETE -H "Authorization: ApiKey $ELASTIC_API_KEY" "$ELASTICSEARCH_URL/_ingest/pipeline/my-pipeline-id"' - - language: Java - code: | - client.ingest().deletePipeline(d -> d - .id("my-pipeline-id") - ); diff --git a/specification/ingest/geo_ip_stats/examples/request/IngestGeoIpStatsExample1.yaml b/specification/ingest/geo_ip_stats/examples/request/IngestGeoIpStatsExample1.yaml index 86786c7345..00e03c8138 100644 --- a/specification/ingest/geo_ip_stats/examples/request/IngestGeoIpStatsExample1.yaml +++ b/specification/ingest/geo_ip_stats/examples/request/IngestGeoIpStatsExample1.yaml @@ -1,15 +1 @@ method_request: GET _ingest/geoip/stats -alternatives: - - language: Python - code: resp = client.ingest.geo_ip_stats() - - language: JavaScript - code: const response = await client.ingest.geoIpStats(); - - language: Ruby - code: response = client.ingest.geo_ip_stats - - language: PHP - code: $resp = $client->ingest()->geoIpStats(); - - language: curl - code: 'curl -X GET -H "Authorization: ApiKey $ELASTIC_API_KEY" "$ELASTICSEARCH_URL/_ingest/geoip/stats"' - - language: Java - code: | - client.ingest().geoIpStats(); diff --git a/specification/ingest/get_ip_location_database/GetIpLocationDatabaseRequest.ts b/specification/ingest/get_ip_location_database/GetIpLocationDatabaseRequest.ts index e3e8e4b28e..b38a64f029 100644 --- a/specification/ingest/get_ip_location_database/GetIpLocationDatabaseRequest.ts +++ b/specification/ingest/get_ip_location_database/GetIpLocationDatabaseRequest.ts @@ -19,7 +19,6 @@ import { RequestBase } from '@_types/Base' import { Ids } from '@_types/common' -import { Duration } from '@_types/Time' /** * Get IP geolocation database configurations. @@ -48,12 +47,4 @@ export interface Request extends RequestBase { */ id?: Ids } - query_parameters: { - /** - * The period to wait for a connection to the master node. - * If no response is received before the timeout expires, the request fails and returns an error. - * A value of `-1` indicates that the request should never time out. - * @server_default 30s */ - master_timeout?: Duration - } } diff --git a/specification/ingest/get_ip_location_database/examples/request/IngestGetIpLocationDatabaseExample1.yaml b/specification/ingest/get_ip_location_database/examples/request/IngestGetIpLocationDatabaseExample1.yaml index f98b84a82b..f266e00c60 100644 --- a/specification/ingest/get_ip_location_database/examples/request/IngestGetIpLocationDatabaseExample1.yaml +++ b/specification/ingest/get_ip_location_database/examples/request/IngestGetIpLocationDatabaseExample1.yaml @@ -1,29 +1 @@ method_request: GET /_ingest/ip_location/database/my-database-id -alternatives: - - language: Python - code: |- - resp = client.ingest.get_ip_location_database( - id="my-database-id", - ) - - language: JavaScript - code: |- - const response = await client.ingest.getIpLocationDatabase({ - id: "my-database-id", - }); - - language: Ruby - code: |- - response = client.ingest.get_ip_location_database( - id: "my-database-id" - ) - - language: PHP - code: |- - $resp = $client->ingest()->getIpLocationDatabase([ - "id" => "my-database-id", - ]); - - language: curl - code: 'curl -X GET -H "Authorization: ApiKey $ELASTIC_API_KEY" "$ELASTICSEARCH_URL/_ingest/ip_location/database/my-database-id"' - - language: Java - code: | - client.ingest().getIpLocationDatabase(g -> g - .id("my-database-id") - ); diff --git a/specification/ingest/get_pipeline/examples/request/IngestGetPipelineExample1.yaml b/specification/ingest/get_pipeline/examples/request/IngestGetPipelineExample1.yaml index c6f7c83427..34a3eaeb9e 100644 --- a/specification/ingest/get_pipeline/examples/request/IngestGetPipelineExample1.yaml +++ b/specification/ingest/get_pipeline/examples/request/IngestGetPipelineExample1.yaml @@ -1,29 +1 @@ method_request: GET /_ingest/pipeline/my-pipeline-id -alternatives: - - language: Python - code: |- - resp = client.ingest.get_pipeline( - id="my-pipeline-id", - ) - - language: JavaScript - code: |- - const response = await client.ingest.getPipeline({ - id: "my-pipeline-id", - }); - - language: Ruby - code: |- - response = client.ingest.get_pipeline( - id: "my-pipeline-id" - ) - - language: PHP - code: |- - $resp = $client->ingest()->getPipeline([ - "id" => "my-pipeline-id", - ]); - - language: curl - code: 'curl -X GET -H "Authorization: ApiKey $ELASTIC_API_KEY" "$ELASTICSEARCH_URL/_ingest/pipeline/my-pipeline-id"' - - language: Java - code: | - client.ingest().getPipeline(g -> g - .id("my-pipeline-id") - ); diff --git a/specification/ingest/processor_grok/examples/request/IngestProcessorGrokExample1.yaml b/specification/ingest/processor_grok/examples/request/IngestProcessorGrokExample1.yaml index 10bd4e6426..2ca8dd7a47 100644 --- a/specification/ingest/processor_grok/examples/request/IngestProcessorGrokExample1.yaml +++ b/specification/ingest/processor_grok/examples/request/IngestProcessorGrokExample1.yaml @@ -1,15 +1 @@ method_request: GET _ingest/processor/grok -alternatives: - - language: Python - code: resp = client.ingest.processor_grok() - - language: JavaScript - code: const response = await client.ingest.processorGrok(); - - language: Ruby - code: response = client.ingest.processor_grok - - language: PHP - code: $resp = $client->ingest()->processorGrok(); - - language: curl - code: 'curl -X GET -H "Authorization: ApiKey $ELASTIC_API_KEY" "$ELASTICSEARCH_URL/_ingest/processor/grok"' - - language: Java - code: | - client.ingest().processorGrok(); diff --git a/specification/ingest/put_ip_location_database/examples/request/IngestPutIpLocationDatabaseExample1.yaml b/specification/ingest/put_ip_location_database/examples/request/IngestPutIpLocationDatabaseExample1.yaml index d18ae2ff8e..6656b88411 100644 --- a/specification/ingest/put_ip_location_database/examples/request/IngestPutIpLocationDatabaseExample1.yaml +++ b/specification/ingest/put_ip_location_database/examples/request/IngestPutIpLocationDatabaseExample1.yaml @@ -7,64 +7,3 @@ value: |- "account_id": "1234567" } } -alternatives: - - language: Python - code: |- - resp = client.ingest.put_ip_location_database( - id="my-database-1", - configuration={ - "name": "GeoIP2-Domain", - "maxmind": { - "account_id": "1234567" - } - }, - ) - - language: JavaScript - code: |- - const response = await client.ingest.putIpLocationDatabase({ - id: "my-database-1", - configuration: { - name: "GeoIP2-Domain", - maxmind: { - account_id: "1234567", - }, - }, - }); - - language: Ruby - code: |- - response = client.ingest.put_ip_location_database( - id: "my-database-1", - body: { - "name": "GeoIP2-Domain", - "maxmind": { - "account_id": "1234567" - } - } - ) - - language: PHP - code: |- - $resp = $client->ingest()->putIpLocationDatabase([ - "id" => "my-database-1", - "body" => [ - "name" => "GeoIP2-Domain", - "maxmind" => [ - "account_id" => "1234567", - ], - ], - ]); - - language: curl - code: - 'curl -X PUT -H "Authorization: ApiKey $ELASTIC_API_KEY" -H "Content-Type: application/json" -d - ''{"name":"GeoIP2-Domain","maxmind":{"account_id":"1234567"}}'' - "$ELASTICSEARCH_URL/_ingest/ip_location/database/my-database-1"' - - language: Java - code: | - client.ingest().putIpLocationDatabase(p -> p - .id("my-database-1") - .configuration(c -> c - .maxmind(m -> m - .accountId("1234567") - ) - .name("GeoIP2-Domain") - ) - ); diff --git a/specification/ingest/put_pipeline/examples/request/PutPipelineRequestExample1.yaml b/specification/ingest/put_pipeline/examples/request/PutPipelineRequestExample1.yaml index 644076d96a..88f232b0a0 100644 --- a/specification/ingest/put_pipeline/examples/request/PutPipelineRequestExample1.yaml +++ b/specification/ingest/put_pipeline/examples/request/PutPipelineRequestExample1.yaml @@ -25,86 +25,3 @@ value: "{ \ ] }" -alternatives: - - language: Python - code: |- - resp = client.ingest.put_pipeline( - id="my-pipeline-id", - description="My optional pipeline description", - processors=[ - { - "set": { - "description": "My optional processor description", - "field": "my-keyword-field", - "value": "foo" - } - } - ], - ) - - language: JavaScript - code: |- - const response = await client.ingest.putPipeline({ - id: "my-pipeline-id", - description: "My optional pipeline description", - processors: [ - { - set: { - description: "My optional processor description", - field: "my-keyword-field", - value: "foo", - }, - }, - ], - }); - - language: Ruby - code: |- - response = client.ingest.put_pipeline( - id: "my-pipeline-id", - body: { - "description": "My optional pipeline description", - "processors": [ - { - "set": { - "description": "My optional processor description", - "field": "my-keyword-field", - "value": "foo" - } - } - ] - } - ) - - language: PHP - code: |- - $resp = $client->ingest()->putPipeline([ - "id" => "my-pipeline-id", - "body" => [ - "description" => "My optional pipeline description", - "processors" => array( - [ - "set" => [ - "description" => "My optional processor description", - "field" => "my-keyword-field", - "value" => "foo", - ], - ], - ), - ], - ]); - - language: curl - code: - 'curl -X PUT -H "Authorization: ApiKey $ELASTIC_API_KEY" -H "Content-Type: application/json" -d ''{"description":"My - optional pipeline description","processors":[{"set":{"description":"My optional processor - description","field":"my-keyword-field","value":"foo"}}]}'' "$ELASTICSEARCH_URL/_ingest/pipeline/my-pipeline-id"' - - language: Java - code: | - client.ingest().putPipeline(p -> p - .description("My optional pipeline description") - .id("my-pipeline-id") - .processors(pr -> pr - .set(s -> s - .field("my-keyword-field") - .value(JsonData.fromJson("\"foo\"")) - .description("My optional processor description") - ) - ) - ); diff --git a/specification/ingest/put_pipeline/examples/request/PutPipelineRequestExample2.yaml b/specification/ingest/put_pipeline/examples/request/PutPipelineRequestExample2.yaml index a8d421929f..bdb4831c2d 100644 --- a/specification/ingest/put_pipeline/examples/request/PutPipelineRequestExample2.yaml +++ b/specification/ingest/put_pipeline/examples/request/PutPipelineRequestExample2.yaml @@ -39,116 +39,3 @@ value: "{ \ } }" -alternatives: - - language: Python - code: |- - resp = client.ingest.put_pipeline( - id="my-pipeline-id", - description="My optional pipeline description", - processors=[ - { - "set": { - "description": "My optional processor description", - "field": "my-keyword-field", - "value": "foo" - } - } - ], - meta={ - "reason": "set my-keyword-field to foo", - "serialization": { - "class": "MyPipeline", - "id": 10 - } - }, - ) - - language: JavaScript - code: |- - const response = await client.ingest.putPipeline({ - id: "my-pipeline-id", - description: "My optional pipeline description", - processors: [ - { - set: { - description: "My optional processor description", - field: "my-keyword-field", - value: "foo", - }, - }, - ], - meta: { - reason: "set my-keyword-field to foo", - serialization: { - class: "MyPipeline", - id: 10, - }, - }, - }); - - language: Ruby - code: |- - response = client.ingest.put_pipeline( - id: "my-pipeline-id", - body: { - "description": "My optional pipeline description", - "processors": [ - { - "set": { - "description": "My optional processor description", - "field": "my-keyword-field", - "value": "foo" - } - } - ], - "_meta": { - "reason": "set my-keyword-field to foo", - "serialization": { - "class": "MyPipeline", - "id": 10 - } - } - } - ) - - language: PHP - code: |- - $resp = $client->ingest()->putPipeline([ - "id" => "my-pipeline-id", - "body" => [ - "description" => "My optional pipeline description", - "processors" => array( - [ - "set" => [ - "description" => "My optional processor description", - "field" => "my-keyword-field", - "value" => "foo", - ], - ], - ), - "_meta" => [ - "reason" => "set my-keyword-field to foo", - "serialization" => [ - "class" => "MyPipeline", - "id" => 10, - ], - ], - ], - ]); - - language: curl - code: - 'curl -X PUT -H "Authorization: ApiKey $ELASTIC_API_KEY" -H "Content-Type: application/json" -d ''{"description":"My - optional pipeline description","processors":[{"set":{"description":"My optional processor - description","field":"my-keyword-field","value":"foo"}}],"_meta":{"reason":"set my-keyword-field to - foo","serialization":{"class":"MyPipeline","id":10}}}'' "$ELASTICSEARCH_URL/_ingest/pipeline/my-pipeline-id"' - - language: Java - code: > - client.ingest().putPipeline(p -> p - .meta(Map.of("serialization", JsonData.fromJson("{\"class\":\"MyPipeline\",\"id\":10}"),"reason", JsonData.fromJson("\"set my-keyword-field to foo\""))) - .description("My optional pipeline description") - .id("my-pipeline-id") - .processors(pr -> pr - .set(s -> s - .field("my-keyword-field") - .value(JsonData.fromJson("\"foo\"")) - .description("My optional processor description") - ) - ) - ); diff --git a/specification/ingest/simulate/examples/request/SimulatePipelineRequestExample1.yaml b/specification/ingest/simulate/examples/request/SimulatePipelineRequestExample1.yaml index 2bd4e4feb7..9cb6f563a1 100644 --- a/specification/ingest/simulate/examples/request/SimulatePipelineRequestExample1.yaml +++ b/specification/ingest/simulate/examples/request/SimulatePipelineRequestExample1.yaml @@ -61,158 +61,3 @@ value: "{ \ ] }" -alternatives: - - language: Python - code: |- - resp = client.ingest.simulate( - pipeline={ - "description": "_description", - "processors": [ - { - "set": { - "field": "field2", - "value": "_value" - } - } - ] - }, - docs=[ - { - "_index": "index", - "_id": "id", - "_source": { - "foo": "bar" - } - }, - { - "_index": "index", - "_id": "id", - "_source": { - "foo": "rab" - } - } - ], - ) - - language: JavaScript - code: |- - const response = await client.ingest.simulate({ - pipeline: { - description: "_description", - processors: [ - { - set: { - field: "field2", - value: "_value", - }, - }, - ], - }, - docs: [ - { - _index: "index", - _id: "id", - _source: { - foo: "bar", - }, - }, - { - _index: "index", - _id: "id", - _source: { - foo: "rab", - }, - }, - ], - }); - - language: Ruby - code: |- - response = client.ingest.simulate( - body: { - "pipeline": { - "description": "_description", - "processors": [ - { - "set": { - "field": "field2", - "value": "_value" - } - } - ] - }, - "docs": [ - { - "_index": "index", - "_id": "id", - "_source": { - "foo": "bar" - } - }, - { - "_index": "index", - "_id": "id", - "_source": { - "foo": "rab" - } - } - ] - } - ) - - language: PHP - code: |- - $resp = $client->ingest()->simulate([ - "body" => [ - "pipeline" => [ - "description" => "_description", - "processors" => array( - [ - "set" => [ - "field" => "field2", - "value" => "_value", - ], - ], - ), - ], - "docs" => array( - [ - "_index" => "index", - "_id" => "id", - "_source" => [ - "foo" => "bar", - ], - ], - [ - "_index" => "index", - "_id" => "id", - "_source" => [ - "foo" => "rab", - ], - ], - ), - ], - ]); - - language: curl - code: - "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d - '{\"pipeline\":{\"description\":\"_description\",\"processors\":[{\"set\":{\"field\":\"field2\",\"value\":\"_value\"}}]},\"do\ - cs\":[{\"_index\":\"index\",\"_id\":\"id\",\"_source\":{\"foo\":\"bar\"}},{\"_index\":\"index\",\"_id\":\"id\",\"_source\":{\ - \"foo\":\"rab\"}}]}' \"$ELASTICSEARCH_URL/_ingest/pipeline/_simulate\"" - - language: Java - code: | - client.ingest().simulate(s -> s - .docs(List.of(Document.of(d -> d - .id("id") - .index("index") - .source(JsonData.fromJson("{\"foo\":\"bar\"}"))),Document.of(d -> d - .id("id") - .index("index") - .source(JsonData.fromJson("{\"foo\":\"rab\"}"))))) - .pipeline(p -> p - .description("_description") - .processors(pr -> pr - .set(se -> se - .field("field2") - .value(JsonData.fromJson("\"_value\"")) - ) - ) - ) - ); diff --git a/specification/license/delete/examples/request/LicenseDeleteExample1.yaml b/specification/license/delete/examples/request/LicenseDeleteExample1.yaml index ce4cb5d47e..9051d299cd 100644 --- a/specification/license/delete/examples/request/LicenseDeleteExample1.yaml +++ b/specification/license/delete/examples/request/LicenseDeleteExample1.yaml @@ -1,15 +1 @@ method_request: DELETE /_license -alternatives: - - language: Python - code: resp = client.license.delete() - - language: JavaScript - code: const response = await client.license.delete(); - - language: Ruby - code: response = client.license.delete - - language: PHP - code: $resp = $client->license()->delete(); - - language: curl - code: 'curl -X DELETE -H "Authorization: ApiKey $ELASTIC_API_KEY" "$ELASTICSEARCH_URL/_license"' - - language: Java - code: | - client.license().delete(d -> d); diff --git a/specification/license/get/examples/request/GetLicenseRequestExample1.yaml b/specification/license/get/examples/request/GetLicenseRequestExample1.yaml index 51d9b71891..a05a5fbabe 100644 --- a/specification/license/get/examples/request/GetLicenseRequestExample1.yaml +++ b/specification/license/get/examples/request/GetLicenseRequestExample1.yaml @@ -1,15 +1 @@ method_request: GET /_license -alternatives: - - language: Python - code: resp = client.license.get() - - language: JavaScript - code: const response = await client.license.get(); - - language: Ruby - code: response = client.license.get - - language: PHP - code: $resp = $client->license()->get(); - - language: curl - code: 'curl -X GET -H "Authorization: ApiKey $ELASTIC_API_KEY" "$ELASTICSEARCH_URL/_license"' - - language: Java - code: | - client.license().get(g -> g); diff --git a/specification/license/get_basic_status/examples/request/GetBasicLicenseStatusRequestExample1.yaml b/specification/license/get_basic_status/examples/request/GetBasicLicenseStatusRequestExample1.yaml index 0b808c7452..5b13e6709d 100644 --- a/specification/license/get_basic_status/examples/request/GetBasicLicenseStatusRequestExample1.yaml +++ b/specification/license/get_basic_status/examples/request/GetBasicLicenseStatusRequestExample1.yaml @@ -1,15 +1 @@ method_request: GET /_license/basic_status -alternatives: - - language: Python - code: resp = client.license.get_basic_status() - - language: JavaScript - code: const response = await client.license.getBasicStatus(); - - language: Ruby - code: response = client.license.get_basic_status - - language: PHP - code: $resp = $client->license()->getBasicStatus(); - - language: curl - code: 'curl -X GET -H "Authorization: ApiKey $ELASTIC_API_KEY" "$ELASTICSEARCH_URL/_license/basic_status"' - - language: Java - code: | - client.license().getBasicStatus(); diff --git a/specification/license/get_trial_status/examples/request/GetTrialLicenseStatusRequestExample1.yaml b/specification/license/get_trial_status/examples/request/GetTrialLicenseStatusRequestExample1.yaml index f21cbefa7f..b43a0b4c02 100644 --- a/specification/license/get_trial_status/examples/request/GetTrialLicenseStatusRequestExample1.yaml +++ b/specification/license/get_trial_status/examples/request/GetTrialLicenseStatusRequestExample1.yaml @@ -1,15 +1 @@ method_request: GET /_license/trial_status -alternatives: - - language: Python - code: resp = client.license.get_trial_status() - - language: JavaScript - code: const response = await client.license.getTrialStatus(); - - language: Ruby - code: response = client.license.get_trial_status - - language: PHP - code: $resp = $client->license()->getTrialStatus(); - - language: curl - code: 'curl -X GET -H "Authorization: ApiKey $ELASTIC_API_KEY" "$ELASTICSEARCH_URL/_license/trial_status"' - - language: Java - code: | - client.license().getTrialStatus(); diff --git a/specification/license/post/examples/request/PostLicenseRequestExample1.yaml b/specification/license/post/examples/request/PostLicenseRequestExample1.yaml index df722c316b..e7e31c1089 100644 --- a/specification/license/post/examples/request/PostLicenseRequestExample1.yaml +++ b/specification/license/post/examples/request/PostLicenseRequestExample1.yaml @@ -31,92 +31,3 @@ value: "{ \ ] }" -alternatives: - - language: Python - code: |- - resp = client.license.post( - licenses=[ - { - "uid": "893361dc-9749-4997-93cb-802e3d7fa4xx", - "type": "basic", - "issue_date_in_millis": 1411948800000, - "expiry_date_in_millis": 1914278399999, - "max_nodes": 1, - "issued_to": "issuedTo", - "issuer": "issuer", - "signature": "xx" - } - ], - ) - - language: JavaScript - code: |- - const response = await client.license.post({ - licenses: [ - { - uid: "893361dc-9749-4997-93cb-802e3d7fa4xx", - type: "basic", - issue_date_in_millis: 1411948800000, - expiry_date_in_millis: 1914278399999, - max_nodes: 1, - issued_to: "issuedTo", - issuer: "issuer", - signature: "xx", - }, - ], - }); - - language: Ruby - code: |- - response = client.license.post( - body: { - "licenses": [ - { - "uid": "893361dc-9749-4997-93cb-802e3d7fa4xx", - "type": "basic", - "issue_date_in_millis": 1411948800000, - "expiry_date_in_millis": 1914278399999, - "max_nodes": 1, - "issued_to": "issuedTo", - "issuer": "issuer", - "signature": "xx" - } - ] - } - ) - - language: PHP - code: |- - $resp = $client->license()->post([ - "body" => [ - "licenses" => array( - [ - "uid" => "893361dc-9749-4997-93cb-802e3d7fa4xx", - "type" => "basic", - "issue_date_in_millis" => 1411948800000, - "expiry_date_in_millis" => 1914278399999, - "max_nodes" => 1, - "issued_to" => "issuedTo", - "issuer" => "issuer", - "signature" => "xx", - ], - ), - ], - ]); - - language: curl - code: - "curl -X PUT -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d - '{\"licenses\":[{\"uid\":\"893361dc-9749-4997-93cb-802e3d7fa4xx\",\"type\":\"basic\",\"issue_date_in_millis\":1411948800000,\ - \"expiry_date_in_millis\":1914278399999,\"max_nodes\":1,\"issued_to\":\"issuedTo\",\"issuer\":\"issuer\",\"signature\":\"xx\"\ - }]}' \"$ELASTICSEARCH_URL/_license\"" - - language: Java - code: | - client.license().post(p -> p - .licenses(l -> l - .expiryDateInMillis(1914278399999L) - .issueDateInMillis(1411948800000L) - .issuedTo("issuedTo") - .issuer("issuer") - .maxNodes(1L) - .signature("xx") - .type(LicenseType.Basic) - .uid("893361dc-9749-4997-93cb-802e3d7fa4xx") - ) - ); diff --git a/specification/license/post_start_basic/examples/request/StartBasicLicenseRequestExample1.yaml b/specification/license/post_start_basic/examples/request/StartBasicLicenseRequestExample1.yaml index a0149dd9c2..1da320bc31 100644 --- a/specification/license/post_start_basic/examples/request/StartBasicLicenseRequestExample1.yaml +++ b/specification/license/post_start_basic/examples/request/StartBasicLicenseRequestExample1.yaml @@ -1,29 +1 @@ method_request: POST /_license/start_basic?acknowledge=true -alternatives: - - language: Python - code: |- - resp = client.license.post_start_basic( - acknowledge=True, - ) - - language: JavaScript - code: |- - const response = await client.license.postStartBasic({ - acknowledge: "true", - }); - - language: Ruby - code: |- - response = client.license.post_start_basic( - acknowledge: "true" - ) - - language: PHP - code: |- - $resp = $client->license()->postStartBasic([ - "acknowledge" => "true", - ]); - - language: curl - code: 'curl -X POST -H "Authorization: ApiKey $ELASTIC_API_KEY" "$ELASTICSEARCH_URL/_license/start_basic?acknowledge=true"' - - language: Java - code: | - client.license().postStartBasic(p -> p - .acknowledge(true) - ); diff --git a/specification/license/post_start_trial/StartTrialLicenseRequest.ts b/specification/license/post_start_trial/StartTrialLicenseRequest.ts index ba1b56f738..ad33b3072a 100644 --- a/specification/license/post_start_trial/StartTrialLicenseRequest.ts +++ b/specification/license/post_start_trial/StartTrialLicenseRequest.ts @@ -42,7 +42,7 @@ export interface Request extends RequestBase { ] query_parameters: { acknowledge?: boolean - type_query_string?: string + type?: string /** * Period to wait for a connection to the master node. * @server_default 30s diff --git a/specification/license/post_start_trial/examples/request/StartTrialLicenseRequestExample1.yaml b/specification/license/post_start_trial/examples/request/StartTrialLicenseRequestExample1.yaml index f1b78f3017..684e3ce68a 100644 --- a/specification/license/post_start_trial/examples/request/StartTrialLicenseRequestExample1.yaml +++ b/specification/license/post_start_trial/examples/request/StartTrialLicenseRequestExample1.yaml @@ -1,29 +1 @@ method_request: POST /_license/start_trial?acknowledge=true -alternatives: - - language: Python - code: |- - resp = client.license.post_start_trial( - acknowledge=True, - ) - - language: JavaScript - code: |- - const response = await client.license.postStartTrial({ - acknowledge: "true", - }); - - language: Ruby - code: |- - response = client.license.post_start_trial( - acknowledge: "true" - ) - - language: PHP - code: |- - $resp = $client->license()->postStartTrial([ - "acknowledge" => "true", - ]); - - language: curl - code: 'curl -X POST -H "Authorization: ApiKey $ELASTIC_API_KEY" "$ELASTICSEARCH_URL/_license/start_trial?acknowledge=true"' - - language: Java - code: | - client.license().postStartTrial(p -> p - .acknowledge(true) - ); diff --git a/specification/logstash/delete_pipeline/examples/request/LogstashDeletePipelineExample1.yaml b/specification/logstash/delete_pipeline/examples/request/LogstashDeletePipelineExample1.yaml index db91116ca7..f3bd2e9aa7 100644 --- a/specification/logstash/delete_pipeline/examples/request/LogstashDeletePipelineExample1.yaml +++ b/specification/logstash/delete_pipeline/examples/request/LogstashDeletePipelineExample1.yaml @@ -1,29 +1 @@ method_request: DELETE _logstash/pipeline/my_pipeline -alternatives: - - language: Python - code: |- - resp = client.logstash.delete_pipeline( - id="my_pipeline", - ) - - language: JavaScript - code: |- - const response = await client.logstash.deletePipeline({ - id: "my_pipeline", - }); - - language: Ruby - code: |- - response = client.logstash.delete_pipeline( - id: "my_pipeline" - ) - - language: PHP - code: |- - $resp = $client->logstash()->deletePipeline([ - "id" => "my_pipeline", - ]); - - language: curl - code: 'curl -X DELETE -H "Authorization: ApiKey $ELASTIC_API_KEY" "$ELASTICSEARCH_URL/_logstash/pipeline/my_pipeline"' - - language: Java - code: | - client.logstash().deletePipeline(d -> d - .id("my_pipeline") - ); diff --git a/specification/logstash/get_pipeline/examples/request/LogstashGetPipelineRequestExample1.yaml b/specification/logstash/get_pipeline/examples/request/LogstashGetPipelineRequestExample1.yaml index 2bb607e259..6e566ef39d 100644 --- a/specification/logstash/get_pipeline/examples/request/LogstashGetPipelineRequestExample1.yaml +++ b/specification/logstash/get_pipeline/examples/request/LogstashGetPipelineRequestExample1.yaml @@ -1,29 +1 @@ method_request: GET _logstash/pipeline/my_pipeline -alternatives: - - language: Python - code: |- - resp = client.logstash.get_pipeline( - id="my_pipeline", - ) - - language: JavaScript - code: |- - const response = await client.logstash.getPipeline({ - id: "my_pipeline", - }); - - language: Ruby - code: |- - response = client.logstash.get_pipeline( - id: "my_pipeline" - ) - - language: PHP - code: |- - $resp = $client->logstash()->getPipeline([ - "id" => "my_pipeline", - ]); - - language: curl - code: 'curl -X GET -H "Authorization: ApiKey $ELASTIC_API_KEY" "$ELASTICSEARCH_URL/_logstash/pipeline/my_pipeline"' - - language: Java - code: | - client.logstash().getPipeline(g -> g - .id("my_pipeline") - ); diff --git a/specification/logstash/put_pipeline/examples/request/LogstashPutPipelineRequestExample1.yaml b/specification/logstash/put_pipeline/examples/request/LogstashPutPipelineRequestExample1.yaml index 8ddf57fdd6..bebc71ab8f 100644 --- a/specification/logstash/put_pipeline/examples/request/LogstashPutPipelineRequestExample1.yaml +++ b/specification/logstash/put_pipeline/examples/request/LogstashPutPipelineRequestExample1.yaml @@ -17,127 +17,3 @@ value: queue.type: memory queue.max_bytes: 1gb queue.checkpoint.writes: 1024 -alternatives: - - language: Python - code: |- - resp = client.logstash.put_pipeline( - id="my_pipeline", - pipeline={ - "description": "Sample pipeline for illustration purposes", - "last_modified": "2021-01-02T02:50:51.250Z", - "pipeline_metadata": { - "type": "logstash_pipeline", - "version": 1 - }, - "username": "elastic", - "pipeline": "input {}\\n filter { grok {} }\\n output {}", - "pipeline_settings": { - "pipeline.workers": 1, - "pipeline.batch.size": 125, - "pipeline.batch.delay": 50, - "queue.type": "memory", - "queue.max_bytes": "1gb", - "queue.checkpoint.writes": 1024 - } - }, - ) - - language: JavaScript - code: |- - const response = await client.logstash.putPipeline({ - id: "my_pipeline", - pipeline: { - description: "Sample pipeline for illustration purposes", - last_modified: "2021-01-02T02:50:51.250Z", - pipeline_metadata: { - type: "logstash_pipeline", - version: 1, - }, - username: "elastic", - pipeline: "input {}\\n filter { grok {} }\\n output {}", - pipeline_settings: { - "pipeline.workers": 1, - "pipeline.batch.size": 125, - "pipeline.batch.delay": 50, - "queue.type": "memory", - "queue.max_bytes": "1gb", - "queue.checkpoint.writes": 1024, - }, - }, - }); - - language: Ruby - code: |- - response = client.logstash.put_pipeline( - id: "my_pipeline", - body: { - "description": "Sample pipeline for illustration purposes", - "last_modified": "2021-01-02T02:50:51.250Z", - "pipeline_metadata": { - "type": "logstash_pipeline", - "version": 1 - }, - "username": "elastic", - "pipeline": "input {}\\n filter { grok {} }\\n output {}", - "pipeline_settings": { - "pipeline.workers": 1, - "pipeline.batch.size": 125, - "pipeline.batch.delay": 50, - "queue.type": "memory", - "queue.max_bytes": "1gb", - "queue.checkpoint.writes": 1024 - } - } - ) - - language: PHP - code: |- - $resp = $client->logstash()->putPipeline([ - "id" => "my_pipeline", - "body" => [ - "description" => "Sample pipeline for illustration purposes", - "last_modified" => "2021-01-02T02:50:51.250Z", - "pipeline_metadata" => [ - "type" => "logstash_pipeline", - "version" => 1, - ], - "username" => "elastic", - "pipeline" => "input {}\\n filter { grok {} }\\n output {}", - "pipeline_settings" => [ - "pipeline.workers" => 1, - "pipeline.batch.size" => 125, - "pipeline.batch.delay" => 50, - "queue.type" => "memory", - "queue.max_bytes" => "1gb", - "queue.checkpoint.writes" => 1024, - ], - ], - ]); - - language: curl - code: - "curl -X PUT -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"description\":\"Sample - pipeline for illustration - purposes\",\"last_modified\":\"2021-01-02T02:50:51.250Z\",\"pipeline_metadata\":{\"type\":\"logstash_pipeline\",\"version\":1\ - },\"username\":\"elastic\",\"pipeline\":\"input {}\\\\n filter { grok {} }\\\\n output - {}\",\"pipeline_settings\":{\"pipeline.workers\":1,\"pipeline.batch.size\":125,\"pipeline.batch.delay\":50,\"queue.type\":\"m\ - emory\",\"queue.max_bytes\":\"1gb\",\"queue.checkpoint.writes\":1024}}' \"$ELASTICSEARCH_URL/_logstash/pipeline/my_pipeline\"" - - language: Java - code: | - client.logstash().putPipeline(p -> p - .id("my_pipeline") - .pipeline(pi -> pi - .description("Sample pipeline for illustration purposes") - .lastModified(DateTime.of("2021-01-02T02:50:51.250Z")) - .pipeline("input {}\n filter { grok {} }\n output {}") - .pipelineMetadata(pip -> pip - .type("logstash_pipeline") - .version("1") - ) - .pipelineSettings(pip -> pip - .pipelineWorkers(1) - .pipelineBatchSize(125) - .pipelineBatchDelay(50) - .queueType("memory") - .queueMaxBytes("1gb") - .queueCheckpointWrites(1024) - ) - .username("elastic") - ) - ); diff --git a/specification/migration/deprecations/examples/request/DeprecationInfoRequestExample1.yaml b/specification/migration/deprecations/examples/request/DeprecationInfoRequestExample1.yaml index 27c0809baf..e096e74803 100644 --- a/specification/migration/deprecations/examples/request/DeprecationInfoRequestExample1.yaml +++ b/specification/migration/deprecations/examples/request/DeprecationInfoRequestExample1.yaml @@ -1,15 +1 @@ method_request: GET /_migration/deprecations -alternatives: - - language: Python - code: resp = client.migration.deprecations() - - language: JavaScript - code: const response = await client.migration.deprecations(); - - language: Ruby - code: response = client.migration.deprecations - - language: PHP - code: $resp = $client->migration()->deprecations(); - - language: curl - code: 'curl -X GET -H "Authorization: ApiKey $ELASTIC_API_KEY" "$ELASTICSEARCH_URL/_migration/deprecations"' - - language: Java - code: | - client.migration().deprecations(d -> d); diff --git a/specification/migration/get_feature_upgrade_status/examples/request/GetFeatureUpgradeStatusRequestExample1.yaml b/specification/migration/get_feature_upgrade_status/examples/request/GetFeatureUpgradeStatusRequestExample1.yaml index 062461451d..2bd680e656 100644 --- a/specification/migration/get_feature_upgrade_status/examples/request/GetFeatureUpgradeStatusRequestExample1.yaml +++ b/specification/migration/get_feature_upgrade_status/examples/request/GetFeatureUpgradeStatusRequestExample1.yaml @@ -1,15 +1 @@ method_request: GET /_migration/system_features -alternatives: - - language: Python - code: resp = client.migration.get_feature_upgrade_status() - - language: JavaScript - code: const response = await client.migration.getFeatureUpgradeStatus(); - - language: Ruby - code: response = client.migration.get_feature_upgrade_status - - language: PHP - code: $resp = $client->migration()->getFeatureUpgradeStatus(); - - language: curl - code: 'curl -X GET -H "Authorization: ApiKey $ELASTIC_API_KEY" "$ELASTICSEARCH_URL/_migration/system_features"' - - language: Java - code: | - client.migration().getFeatureUpgradeStatus(); diff --git a/specification/migration/post_feature_upgrade/examples/request/PostFeatureUpgradeRequestExample1.yaml b/specification/migration/post_feature_upgrade/examples/request/PostFeatureUpgradeRequestExample1.yaml index 1e875c2860..c77bc6e0ff 100644 --- a/specification/migration/post_feature_upgrade/examples/request/PostFeatureUpgradeRequestExample1.yaml +++ b/specification/migration/post_feature_upgrade/examples/request/PostFeatureUpgradeRequestExample1.yaml @@ -1,15 +1 @@ method_request: POST /_migration/system_features -alternatives: - - language: Python - code: resp = client.migration.post_feature_upgrade() - - language: JavaScript - code: const response = await client.migration.postFeatureUpgrade(); - - language: Ruby - code: response = client.migration.post_feature_upgrade - - language: PHP - code: $resp = $client->migration()->postFeatureUpgrade(); - - language: curl - code: 'curl -X POST -H "Authorization: ApiKey $ELASTIC_API_KEY" "$ELASTICSEARCH_URL/_migration/system_features"' - - language: Java - code: | - client.migration().postFeatureUpgrade(); diff --git a/specification/ml/clear_trained_model_deployment_cache/examples/request/MlClearTrainedModelDeploymentCacheExample1.yaml b/specification/ml/clear_trained_model_deployment_cache/examples/request/MlClearTrainedModelDeploymentCacheExample1.yaml index 0ace54f7d1..0417377ba9 100644 --- a/specification/ml/clear_trained_model_deployment_cache/examples/request/MlClearTrainedModelDeploymentCacheExample1.yaml +++ b/specification/ml/clear_trained_model_deployment_cache/examples/request/MlClearTrainedModelDeploymentCacheExample1.yaml @@ -1,30 +1 @@ method_request: POST _ml/trained_models/elastic__distilbert-base-uncased-finetuned-conll03-english/deployment/cache/_clear -alternatives: - - language: Python - code: |- - resp = client.ml.clear_trained_model_deployment_cache( - model_id="elastic__distilbert-base-uncased-finetuned-conll03-english", - ) - - language: JavaScript - code: |- - const response = await client.ml.clearTrainedModelDeploymentCache({ - model_id: "elastic__distilbert-base-uncased-finetuned-conll03-english", - }); - - language: Ruby - code: |- - response = client.ml.clear_trained_model_deployment_cache( - model_id: "elastic__distilbert-base-uncased-finetuned-conll03-english" - ) - - language: PHP - code: |- - $resp = $client->ml()->clearTrainedModelDeploymentCache([ - "model_id" => "elastic__distilbert-base-uncased-finetuned-conll03-english", - ]); - - language: curl - code: 'curl -X POST -H "Authorization: ApiKey $ELASTIC_API_KEY" - "$ELASTICSEARCH_URL/_ml/trained_models/elastic__distilbert-base-uncased-finetuned-conll03-english/deployment/cache/_clear"' - - language: Java - code: | - client.ml().clearTrainedModelDeploymentCache(c -> c - .modelId("elastic__distilbert-base-uncased-finetuned-conll03-english") - ); diff --git a/specification/ml/close_job/examples/request/MlCloseJobExample1.yaml b/specification/ml/close_job/examples/request/MlCloseJobExample1.yaml index 5635df9f63..ff006ad930 100644 --- a/specification/ml/close_job/examples/request/MlCloseJobExample1.yaml +++ b/specification/ml/close_job/examples/request/MlCloseJobExample1.yaml @@ -1,29 +1 @@ method_request: POST _ml/anomaly_detectors/low_request_rate/_close -alternatives: - - language: Python - code: |- - resp = client.ml.close_job( - job_id="low_request_rate", - ) - - language: JavaScript - code: |- - const response = await client.ml.closeJob({ - job_id: "low_request_rate", - }); - - language: Ruby - code: |- - response = client.ml.close_job( - job_id: "low_request_rate" - ) - - language: PHP - code: |- - $resp = $client->ml()->closeJob([ - "job_id" => "low_request_rate", - ]); - - language: curl - code: 'curl -X POST -H "Authorization: ApiKey $ELASTIC_API_KEY" "$ELASTICSEARCH_URL/_ml/anomaly_detectors/low_request_rate/_close"' - - language: Java - code: | - client.ml().closeJob(c -> c - .jobId("low_request_rate") - ); diff --git a/specification/ml/delete_calendar/examples/request/MlDeleteCalendarExample1.yaml b/specification/ml/delete_calendar/examples/request/MlDeleteCalendarExample1.yaml index 37638332d8..cdd6642c4d 100644 --- a/specification/ml/delete_calendar/examples/request/MlDeleteCalendarExample1.yaml +++ b/specification/ml/delete_calendar/examples/request/MlDeleteCalendarExample1.yaml @@ -1,29 +1 @@ method_request: DELETE _ml/calendars/planned-outages -alternatives: - - language: Python - code: |- - resp = client.ml.delete_calendar( - calendar_id="planned-outages", - ) - - language: JavaScript - code: |- - const response = await client.ml.deleteCalendar({ - calendar_id: "planned-outages", - }); - - language: Ruby - code: |- - response = client.ml.delete_calendar( - calendar_id: "planned-outages" - ) - - language: PHP - code: |- - $resp = $client->ml()->deleteCalendar([ - "calendar_id" => "planned-outages", - ]); - - language: curl - code: 'curl -X DELETE -H "Authorization: ApiKey $ELASTIC_API_KEY" "$ELASTICSEARCH_URL/_ml/calendars/planned-outages"' - - language: Java - code: | - client.ml().deleteCalendar(d -> d - .calendarId("planned-outages") - ); diff --git a/specification/ml/delete_calendar_event/examples/request/MlDeleteCalendarEventExample1.yaml b/specification/ml/delete_calendar_event/examples/request/MlDeleteCalendarEventExample1.yaml index d7a10a804e..03e0bc1377 100644 --- a/specification/ml/delete_calendar_event/examples/request/MlDeleteCalendarEventExample1.yaml +++ b/specification/ml/delete_calendar_event/examples/request/MlDeleteCalendarEventExample1.yaml @@ -1,35 +1 @@ method_request: DELETE _ml/calendars/planned-outages/events/LS8LJGEBMTCMA-qz49st -alternatives: - - language: Python - code: |- - resp = client.ml.delete_calendar_event( - calendar_id="planned-outages", - event_id="LS8LJGEBMTCMA-qz49st", - ) - - language: JavaScript - code: |- - const response = await client.ml.deleteCalendarEvent({ - calendar_id: "planned-outages", - event_id: "LS8LJGEBMTCMA-qz49st", - }); - - language: Ruby - code: |- - response = client.ml.delete_calendar_event( - calendar_id: "planned-outages", - event_id: "LS8LJGEBMTCMA-qz49st" - ) - - language: PHP - code: |- - $resp = $client->ml()->deleteCalendarEvent([ - "calendar_id" => "planned-outages", - "event_id" => "LS8LJGEBMTCMA-qz49st", - ]); - - language: curl - code: 'curl -X DELETE -H "Authorization: ApiKey $ELASTIC_API_KEY" - "$ELASTICSEARCH_URL/_ml/calendars/planned-outages/events/LS8LJGEBMTCMA-qz49st"' - - language: Java - code: | - client.ml().deleteCalendarEvent(d -> d - .calendarId("planned-outages") - .eventId("LS8LJGEBMTCMA-qz49st") - ); diff --git a/specification/ml/delete_calendar_job/examples/request/MlDeleteCalendarJobExample1.yaml b/specification/ml/delete_calendar_job/examples/request/MlDeleteCalendarJobExample1.yaml index 266af51ca1..f42515b459 100644 --- a/specification/ml/delete_calendar_job/examples/request/MlDeleteCalendarJobExample1.yaml +++ b/specification/ml/delete_calendar_job/examples/request/MlDeleteCalendarJobExample1.yaml @@ -1,35 +1 @@ method_request: DELETE _ml/calendars/planned-outages/jobs/total-requests -alternatives: - - language: Python - code: |- - resp = client.ml.delete_calendar_job( - calendar_id="planned-outages", - job_id="total-requests", - ) - - language: JavaScript - code: |- - const response = await client.ml.deleteCalendarJob({ - calendar_id: "planned-outages", - job_id: "total-requests", - }); - - language: Ruby - code: |- - response = client.ml.delete_calendar_job( - calendar_id: "planned-outages", - job_id: "total-requests" - ) - - language: PHP - code: |- - $resp = $client->ml()->deleteCalendarJob([ - "calendar_id" => "planned-outages", - "job_id" => "total-requests", - ]); - - language: curl - code: 'curl -X DELETE -H "Authorization: ApiKey $ELASTIC_API_KEY" - "$ELASTICSEARCH_URL/_ml/calendars/planned-outages/jobs/total-requests"' - - language: Java - code: | - client.ml().deleteCalendarJob(d -> d - .calendarId("planned-outages") - .jobId("total-requests") - ); diff --git a/specification/ml/delete_data_frame_analytics/examples/request/MlDeleteDataFrameAnalyticsExample1.yaml b/specification/ml/delete_data_frame_analytics/examples/request/MlDeleteDataFrameAnalyticsExample1.yaml index 459170e7df..1e7f8c41fb 100644 --- a/specification/ml/delete_data_frame_analytics/examples/request/MlDeleteDataFrameAnalyticsExample1.yaml +++ b/specification/ml/delete_data_frame_analytics/examples/request/MlDeleteDataFrameAnalyticsExample1.yaml @@ -1,29 +1 @@ method_request: DELETE _ml/data_frame/analytics/loganalytics -alternatives: - - language: Python - code: |- - resp = client.ml.delete_data_frame_analytics( - id="loganalytics", - ) - - language: JavaScript - code: |- - const response = await client.ml.deleteDataFrameAnalytics({ - id: "loganalytics", - }); - - language: Ruby - code: |- - response = client.ml.delete_data_frame_analytics( - id: "loganalytics" - ) - - language: PHP - code: |- - $resp = $client->ml()->deleteDataFrameAnalytics([ - "id" => "loganalytics", - ]); - - language: curl - code: 'curl -X DELETE -H "Authorization: ApiKey $ELASTIC_API_KEY" "$ELASTICSEARCH_URL/_ml/data_frame/analytics/loganalytics"' - - language: Java - code: | - client.ml().deleteDataFrameAnalytics(d -> d - .id("loganalytics") - ); diff --git a/specification/ml/delete_datafeed/examples/request/MlDeleteDatafeedExample1.yaml b/specification/ml/delete_datafeed/examples/request/MlDeleteDatafeedExample1.yaml index 78477fc74b..86cb00fa59 100644 --- a/specification/ml/delete_datafeed/examples/request/MlDeleteDatafeedExample1.yaml +++ b/specification/ml/delete_datafeed/examples/request/MlDeleteDatafeedExample1.yaml @@ -1,29 +1 @@ method_request: DELETE _ml/datafeeds/datafeed-total-requests -alternatives: - - language: Python - code: |- - resp = client.ml.delete_datafeed( - datafeed_id="datafeed-total-requests", - ) - - language: JavaScript - code: |- - const response = await client.ml.deleteDatafeed({ - datafeed_id: "datafeed-total-requests", - }); - - language: Ruby - code: |- - response = client.ml.delete_datafeed( - datafeed_id: "datafeed-total-requests" - ) - - language: PHP - code: |- - $resp = $client->ml()->deleteDatafeed([ - "datafeed_id" => "datafeed-total-requests", - ]); - - language: curl - code: 'curl -X DELETE -H "Authorization: ApiKey $ELASTIC_API_KEY" "$ELASTICSEARCH_URL/_ml/datafeeds/datafeed-total-requests"' - - language: Java - code: | - client.ml().deleteDatafeed(d -> d - .datafeedId("datafeed-total-requests") - ); diff --git a/specification/ml/delete_expired_data/examples/request/MlDeleteExpiredDataExample1.yaml b/specification/ml/delete_expired_data/examples/request/MlDeleteExpiredDataExample1.yaml index 9fc52963d8..2effc4042c 100644 --- a/specification/ml/delete_expired_data/examples/request/MlDeleteExpiredDataExample1.yaml +++ b/specification/ml/delete_expired_data/examples/request/MlDeleteExpiredDataExample1.yaml @@ -1,31 +1 @@ method_request: DELETE _ml/_delete_expired_data?timeout=1h -alternatives: - - language: Python - code: |- - resp = client.ml.delete_expired_data( - timeout="1h", - ) - - language: JavaScript - code: |- - const response = await client.ml.deleteExpiredData({ - timeout: "1h", - }); - - language: Ruby - code: |- - response = client.ml.delete_expired_data( - timeout: "1h" - ) - - language: PHP - code: |- - $resp = $client->ml()->deleteExpiredData([ - "timeout" => "1h", - ]); - - language: curl - code: 'curl -X DELETE -H "Authorization: ApiKey $ELASTIC_API_KEY" "$ELASTICSEARCH_URL/_ml/_delete_expired_data?timeout=1h"' - - language: Java - code: | - client.ml().deleteExpiredData(d -> d - .timeout(t -> t - .offset(1) - ) - ); diff --git a/specification/ml/delete_filter/examples/request/MlDeleteFilterExample1.yaml b/specification/ml/delete_filter/examples/request/MlDeleteFilterExample1.yaml index 924e3c2703..8a61ae8bdd 100644 --- a/specification/ml/delete_filter/examples/request/MlDeleteFilterExample1.yaml +++ b/specification/ml/delete_filter/examples/request/MlDeleteFilterExample1.yaml @@ -1,29 +1 @@ method_request: DELETE _ml/filters/safe_domains -alternatives: - - language: Python - code: |- - resp = client.ml.delete_filter( - filter_id="safe_domains", - ) - - language: JavaScript - code: |- - const response = await client.ml.deleteFilter({ - filter_id: "safe_domains", - }); - - language: Ruby - code: |- - response = client.ml.delete_filter( - filter_id: "safe_domains" - ) - - language: PHP - code: |- - $resp = $client->ml()->deleteFilter([ - "filter_id" => "safe_domains", - ]); - - language: curl - code: 'curl -X DELETE -H "Authorization: ApiKey $ELASTIC_API_KEY" "$ELASTICSEARCH_URL/_ml/filters/safe_domains"' - - language: Java - code: | - client.ml().deleteFilter(d -> d - .filterId("safe_domains") - ); diff --git a/specification/ml/delete_forecast/examples/request/MlDeleteForecastExample1.yaml b/specification/ml/delete_forecast/examples/request/MlDeleteForecastExample1.yaml index 255ae060a5..b8069fc90f 100644 --- a/specification/ml/delete_forecast/examples/request/MlDeleteForecastExample1.yaml +++ b/specification/ml/delete_forecast/examples/request/MlDeleteForecastExample1.yaml @@ -1,35 +1 @@ method_request: DELETE _ml/anomaly_detectors/total-requests/_forecast/_all -alternatives: - - language: Python - code: |- - resp = client.ml.delete_forecast( - job_id="total-requests", - forecast_id="_all", - ) - - language: JavaScript - code: |- - const response = await client.ml.deleteForecast({ - job_id: "total-requests", - forecast_id: "_all", - }); - - language: Ruby - code: |- - response = client.ml.delete_forecast( - job_id: "total-requests", - forecast_id: "_all" - ) - - language: PHP - code: |- - $resp = $client->ml()->deleteForecast([ - "job_id" => "total-requests", - "forecast_id" => "_all", - ]); - - language: curl - code: 'curl -X DELETE -H "Authorization: ApiKey $ELASTIC_API_KEY" - "$ELASTICSEARCH_URL/_ml/anomaly_detectors/total-requests/_forecast/_all"' - - language: Java - code: | - client.ml().deleteForecast(d -> d - .forecastId("_all") - .jobId("total-requests") - ); diff --git a/specification/ml/delete_job/examples/request/MlDeleteJobExample1.yaml b/specification/ml/delete_job/examples/request/MlDeleteJobExample1.yaml index 24a5c26e29..a996042090 100644 --- a/specification/ml/delete_job/examples/request/MlDeleteJobExample1.yaml +++ b/specification/ml/delete_job/examples/request/MlDeleteJobExample1.yaml @@ -1,29 +1 @@ method_request: DELETE _ml/anomaly_detectors/total-requests -alternatives: - - language: Python - code: |- - resp = client.ml.delete_job( - job_id="total-requests", - ) - - language: JavaScript - code: |- - const response = await client.ml.deleteJob({ - job_id: "total-requests", - }); - - language: Ruby - code: |- - response = client.ml.delete_job( - job_id: "total-requests" - ) - - language: PHP - code: |- - $resp = $client->ml()->deleteJob([ - "job_id" => "total-requests", - ]); - - language: curl - code: 'curl -X DELETE -H "Authorization: ApiKey $ELASTIC_API_KEY" "$ELASTICSEARCH_URL/_ml/anomaly_detectors/total-requests"' - - language: Java - code: | - client.ml().deleteJob(d -> d - .jobId("total-requests") - ); diff --git a/specification/ml/delete_model_snapshot/examples/request/MlDeleteModelSnapshotExample1.yaml b/specification/ml/delete_model_snapshot/examples/request/MlDeleteModelSnapshotExample1.yaml index 889597603d..36617a5bc6 100644 --- a/specification/ml/delete_model_snapshot/examples/request/MlDeleteModelSnapshotExample1.yaml +++ b/specification/ml/delete_model_snapshot/examples/request/MlDeleteModelSnapshotExample1.yaml @@ -1,35 +1 @@ method_request: DELETE _ml/anomaly_detectors/farequote/model_snapshots/1491948163 -alternatives: - - language: Python - code: |- - resp = client.ml.delete_model_snapshot( - job_id="farequote", - snapshot_id="1491948163", - ) - - language: JavaScript - code: |- - const response = await client.ml.deleteModelSnapshot({ - job_id: "farequote", - snapshot_id: 1491948163, - }); - - language: Ruby - code: |- - response = client.ml.delete_model_snapshot( - job_id: "farequote", - snapshot_id: "1491948163" - ) - - language: PHP - code: |- - $resp = $client->ml()->deleteModelSnapshot([ - "job_id" => "farequote", - "snapshot_id" => "1491948163", - ]); - - language: curl - code: 'curl -X DELETE -H "Authorization: ApiKey $ELASTIC_API_KEY" - "$ELASTICSEARCH_URL/_ml/anomaly_detectors/farequote/model_snapshots/1491948163"' - - language: Java - code: | - client.ml().deleteModelSnapshot(d -> d - .jobId("farequote") - .snapshotId("1491948163") - ); diff --git a/specification/ml/delete_trained_model/examples/request/MlDeleteTrainedModelExample1.yaml b/specification/ml/delete_trained_model/examples/request/MlDeleteTrainedModelExample1.yaml index 5045f8e890..36f643b4da 100644 --- a/specification/ml/delete_trained_model/examples/request/MlDeleteTrainedModelExample1.yaml +++ b/specification/ml/delete_trained_model/examples/request/MlDeleteTrainedModelExample1.yaml @@ -1,30 +1 @@ method_request: DELETE _ml/trained_models/regression-job-one-1574775307356 -alternatives: - - language: Python - code: |- - resp = client.ml.delete_trained_model( - model_id="regression-job-one-1574775307356", - ) - - language: JavaScript - code: |- - const response = await client.ml.deleteTrainedModel({ - model_id: "regression-job-one-1574775307356", - }); - - language: Ruby - code: |- - response = client.ml.delete_trained_model( - model_id: "regression-job-one-1574775307356" - ) - - language: PHP - code: |- - $resp = $client->ml()->deleteTrainedModel([ - "model_id" => "regression-job-one-1574775307356", - ]); - - language: curl - code: 'curl -X DELETE -H "Authorization: ApiKey $ELASTIC_API_KEY" - "$ELASTICSEARCH_URL/_ml/trained_models/regression-job-one-1574775307356"' - - language: Java - code: | - client.ml().deleteTrainedModel(d -> d - .modelId("regression-job-one-1574775307356") - ); diff --git a/specification/ml/delete_trained_model_alias/examples/request/MlDeleteTrainedModelAliasExample1.yaml b/specification/ml/delete_trained_model_alias/examples/request/MlDeleteTrainedModelAliasExample1.yaml index 0b0664e5ec..cfba1b00b5 100644 --- a/specification/ml/delete_trained_model_alias/examples/request/MlDeleteTrainedModelAliasExample1.yaml +++ b/specification/ml/delete_trained_model_alias/examples/request/MlDeleteTrainedModelAliasExample1.yaml @@ -1,35 +1 @@ method_request: DELETE _ml/trained_models/flight-delay-prediction-1574775339910/model_aliases/flight_delay_model -alternatives: - - language: Python - code: |- - resp = client.ml.delete_trained_model_alias( - model_id="flight-delay-prediction-1574775339910", - model_alias="flight_delay_model", - ) - - language: JavaScript - code: |- - const response = await client.ml.deleteTrainedModelAlias({ - model_id: "flight-delay-prediction-1574775339910", - model_alias: "flight_delay_model", - }); - - language: Ruby - code: |- - response = client.ml.delete_trained_model_alias( - model_id: "flight-delay-prediction-1574775339910", - model_alias: "flight_delay_model" - ) - - language: PHP - code: |- - $resp = $client->ml()->deleteTrainedModelAlias([ - "model_id" => "flight-delay-prediction-1574775339910", - "model_alias" => "flight_delay_model", - ]); - - language: curl - code: 'curl -X DELETE -H "Authorization: ApiKey $ELASTIC_API_KEY" - "$ELASTICSEARCH_URL/_ml/trained_models/flight-delay-prediction-1574775339910/model_aliases/flight_delay_model"' - - language: Java - code: | - client.ml().deleteTrainedModelAlias(d -> d - .modelAlias("flight_delay_model") - .modelId("flight-delay-prediction-1574775339910") - ); diff --git a/specification/ml/estimate_model_memory/examples/request/MlEstimateModelMemoryRequestExample1.yaml b/specification/ml/estimate_model_memory/examples/request/MlEstimateModelMemoryRequestExample1.yaml index f081dad394..a0a7ef0c3e 100644 --- a/specification/ml/estimate_model_memory/examples/request/MlEstimateModelMemoryRequestExample1.yaml +++ b/specification/ml/estimate_model_memory/examples/request/MlEstimateModelMemoryRequestExample1.yaml @@ -21,138 +21,3 @@ value: max_bucket_cardinality: source_ip: 300 dest_ip: 30 -alternatives: - - language: Python - code: |- - resp = client.ml.estimate_model_memory( - analysis_config={ - "bucket_span": "5m", - "detectors": [ - { - "function": "sum", - "field_name": "bytes", - "by_field_name": "status", - "partition_field_name": "app" - } - ], - "influencers": [ - "source_ip", - "dest_ip" - ] - }, - overall_cardinality={ - "status": 10, - "app": 50 - }, - max_bucket_cardinality={ - "source_ip": 300, - "dest_ip": 30 - }, - ) - - language: JavaScript - code: |- - const response = await client.ml.estimateModelMemory({ - analysis_config: { - bucket_span: "5m", - detectors: [ - { - function: "sum", - field_name: "bytes", - by_field_name: "status", - partition_field_name: "app", - }, - ], - influencers: ["source_ip", "dest_ip"], - }, - overall_cardinality: { - status: 10, - app: 50, - }, - max_bucket_cardinality: { - source_ip: 300, - dest_ip: 30, - }, - }); - - language: Ruby - code: |- - response = client.ml.estimate_model_memory( - body: { - "analysis_config": { - "bucket_span": "5m", - "detectors": [ - { - "function": "sum", - "field_name": "bytes", - "by_field_name": "status", - "partition_field_name": "app" - } - ], - "influencers": [ - "source_ip", - "dest_ip" - ] - }, - "overall_cardinality": { - "status": 10, - "app": 50 - }, - "max_bucket_cardinality": { - "source_ip": 300, - "dest_ip": 30 - } - } - ) - - language: PHP - code: |- - $resp = $client->ml()->estimateModelMemory([ - "body" => [ - "analysis_config" => [ - "bucket_span" => "5m", - "detectors" => array( - [ - "function" => "sum", - "field_name" => "bytes", - "by_field_name" => "status", - "partition_field_name" => "app", - ], - ), - "influencers" => array( - "source_ip", - "dest_ip", - ), - ], - "overall_cardinality" => [ - "status" => 10, - "app" => 50, - ], - "max_bucket_cardinality" => [ - "source_ip" => 300, - "dest_ip" => 30, - ], - ], - ]); - - language: curl - code: - "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d - '{\"analysis_config\":{\"bucket_span\":\"5m\",\"detectors\":[{\"function\":\"sum\",\"field_name\":\"bytes\",\"by_field_name\":\ - \"status\",\"partition_field_name\":\"app\"}],\"influencers\":[\"source_ip\",\"dest_ip\"]},\"overall_cardinality\":{\"status\ - \":10,\"app\":50},\"max_bucket_cardinality\":{\"source_ip\":300,\"dest_ip\":30}}' - \"$ELASTICSEARCH_URL/_ml/anomaly_detectors/_estimate_model_memory\"" - - language: Java - code: | - client.ml().estimateModelMemory(e -> e - .analysisConfig(a -> a - .bucketSpan(b -> b - .time("5m") - ) - .detectors(d -> d - .byFieldName("status") - .fieldName("bytes") - .function("sum") - .partitionFieldName("app") - ) - .influencers(List.of("source_ip","dest_ip")) - ) - .maxBucketCardinality(Map.of("dest_ip", 30L,"source_ip", 300L)) - .overallCardinality(Map.of("app", 50L,"status", 10L)) - ); diff --git a/specification/ml/evaluate_data_frame/examples/request/MlEvaluateDataFrameRequestExample1.yaml b/specification/ml/evaluate_data_frame/examples/request/MlEvaluateDataFrameRequestExample1.yaml index 9e3a7d62c8..64c2ab60f7 100644 --- a/specification/ml/evaluate_data_frame/examples/request/MlEvaluateDataFrameRequestExample1.yaml +++ b/specification/ml/evaluate_data_frame/examples/request/MlEvaluateDataFrameRequestExample1.yaml @@ -12,82 +12,3 @@ value: predicted_field: ml.animal_class_prediction metrics: multiclass_confusion_matrix: {} -alternatives: - - language: Python - code: |- - resp = client.ml.evaluate_data_frame( - index="animal_classification", - evaluation={ - "classification": { - "actual_field": "animal_class", - "predicted_field": "ml.animal_class_prediction", - "metrics": { - "multiclass_confusion_matrix": {} - } - } - }, - ) - - language: JavaScript - code: |- - const response = await client.ml.evaluateDataFrame({ - index: "animal_classification", - evaluation: { - classification: { - actual_field: "animal_class", - predicted_field: "ml.animal_class_prediction", - metrics: { - multiclass_confusion_matrix: {}, - }, - }, - }, - }); - - language: Ruby - code: |- - response = client.ml.evaluate_data_frame( - body: { - "index": "animal_classification", - "evaluation": { - "classification": { - "actual_field": "animal_class", - "predicted_field": "ml.animal_class_prediction", - "metrics": { - "multiclass_confusion_matrix": {} - } - } - } - } - ) - - language: PHP - code: |- - $resp = $client->ml()->evaluateDataFrame([ - "body" => [ - "index" => "animal_classification", - "evaluation" => [ - "classification" => [ - "actual_field" => "animal_class", - "predicted_field" => "ml.animal_class_prediction", - "metrics" => [ - "multiclass_confusion_matrix" => new ArrayObject([]), - ], - ], - ], - ], - ]); - - language: curl - code: - "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d - '{\"index\":\"animal_classification\",\"evaluation\":{\"classification\":{\"actual_field\":\"animal_class\",\"predicted_field\ - \":\"ml.animal_class_prediction\",\"metrics\":{\"multiclass_confusion_matrix\":{}}}}}' - \"$ELASTICSEARCH_URL/_ml/data_frame/_evaluate\"" - - language: Java - code: | - client.ml().evaluateDataFrame(e -> e - .evaluation(ev -> ev - .classification(c -> c - .actualField("animal_class") - .predictedField("ml.animal_class_prediction") - .metrics(m -> m) - ) - ) - .index("animal_classification") - ); diff --git a/specification/ml/evaluate_data_frame/examples/request/MlEvaluateDataFrameRequestExample2.yaml b/specification/ml/evaluate_data_frame/examples/request/MlEvaluateDataFrameRequestExample2.yaml index e72b5a8216..75e8de5129 100644 --- a/specification/ml/evaluate_data_frame/examples/request/MlEvaluateDataFrameRequestExample2.yaml +++ b/specification/ml/evaluate_data_frame/examples/request/MlEvaluateDataFrameRequestExample2.yaml @@ -14,88 +14,3 @@ value: metrics: auc_roc: class_name: dog -alternatives: - - language: Python - code: |- - resp = client.ml.evaluate_data_frame( - index="animal_classification", - evaluation={ - "classification": { - "actual_field": "animal_class", - "metrics": { - "auc_roc": { - "class_name": "dog" - } - } - } - }, - ) - - language: JavaScript - code: |- - const response = await client.ml.evaluateDataFrame({ - index: "animal_classification", - evaluation: { - classification: { - actual_field: "animal_class", - metrics: { - auc_roc: { - class_name: "dog", - }, - }, - }, - }, - }); - - language: Ruby - code: |- - response = client.ml.evaluate_data_frame( - body: { - "index": "animal_classification", - "evaluation": { - "classification": { - "actual_field": "animal_class", - "metrics": { - "auc_roc": { - "class_name": "dog" - } - } - } - } - } - ) - - language: PHP - code: |- - $resp = $client->ml()->evaluateDataFrame([ - "body" => [ - "index" => "animal_classification", - "evaluation" => [ - "classification" => [ - "actual_field" => "animal_class", - "metrics" => [ - "auc_roc" => [ - "class_name" => "dog", - ], - ], - ], - ], - ], - ]); - - language: curl - code: - "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d - '{\"index\":\"animal_classification\",\"evaluation\":{\"classification\":{\"actual_field\":\"animal_class\",\"metrics\":{\"au\ - c_roc\":{\"class_name\":\"dog\"}}}}}' \"$ELASTICSEARCH_URL/_ml/data_frame/_evaluate\"" - - language: Java - code: | - client.ml().evaluateDataFrame(e -> e - .evaluation(ev -> ev - .classification(c -> c - .actualField("animal_class") - .metrics(m -> m - .aucRoc(a -> a - .className("dog") - ) - ) - ) - ) - .index("animal_classification") - ); diff --git a/specification/ml/evaluate_data_frame/examples/request/MlEvaluateDataFrameRequestExample3.yaml b/specification/ml/evaluate_data_frame/examples/request/MlEvaluateDataFrameRequestExample3.yaml index cc6dbd8ef3..4ff41e2545 100644 --- a/specification/ml/evaluate_data_frame/examples/request/MlEvaluateDataFrameRequestExample3.yaml +++ b/specification/ml/evaluate_data_frame/examples/request/MlEvaluateDataFrameRequestExample3.yaml @@ -9,68 +9,3 @@ value: outlier_detection: actual_field: is_outlier predicted_probability_field: ml.outlier_score -alternatives: - - language: Python - code: |- - resp = client.ml.evaluate_data_frame( - index="my_analytics_dest_index", - evaluation={ - "outlier_detection": { - "actual_field": "is_outlier", - "predicted_probability_field": "ml.outlier_score" - } - }, - ) - - language: JavaScript - code: |- - const response = await client.ml.evaluateDataFrame({ - index: "my_analytics_dest_index", - evaluation: { - outlier_detection: { - actual_field: "is_outlier", - predicted_probability_field: "ml.outlier_score", - }, - }, - }); - - language: Ruby - code: |- - response = client.ml.evaluate_data_frame( - body: { - "index": "my_analytics_dest_index", - "evaluation": { - "outlier_detection": { - "actual_field": "is_outlier", - "predicted_probability_field": "ml.outlier_score" - } - } - } - ) - - language: PHP - code: |- - $resp = $client->ml()->evaluateDataFrame([ - "body" => [ - "index" => "my_analytics_dest_index", - "evaluation" => [ - "outlier_detection" => [ - "actual_field" => "is_outlier", - "predicted_probability_field" => "ml.outlier_score", - ], - ], - ], - ]); - - language: curl - code: - "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d - '{\"index\":\"my_analytics_dest_index\",\"evaluation\":{\"outlier_detection\":{\"actual_field\":\"is_outlier\",\"predicted_pr\ - obability_field\":\"ml.outlier_score\"}}}' \"$ELASTICSEARCH_URL/_ml/data_frame/_evaluate\"" - - language: Java - code: | - client.ml().evaluateDataFrame(e -> e - .evaluation(ev -> ev - .outlierDetection(o -> o - .actualField("is_outlier") - .predictedProbabilityField("ml.outlier_score") - ) - ) - .index("my_analytics_dest_index") - ); diff --git a/specification/ml/evaluate_data_frame/examples/request/MlEvaluateDataFrameRequestExample4.yaml b/specification/ml/evaluate_data_frame/examples/request/MlEvaluateDataFrameRequestExample4.yaml index 622823476d..1dc1c71b2f 100644 --- a/specification/ml/evaluate_data_frame/examples/request/MlEvaluateDataFrameRequestExample4.yaml +++ b/specification/ml/evaluate_data_frame/examples/request/MlEvaluateDataFrameRequestExample4.yaml @@ -23,171 +23,3 @@ value: offset: 10 huber: delta: 1.5 -alternatives: - - language: Python - code: |- - resp = client.ml.evaluate_data_frame( - index="house_price_predictions", - query={ - "bool": { - "filter": [ - { - "term": { - "ml.is_training": False - } - } - ] - } - }, - evaluation={ - "regression": { - "actual_field": "price", - "predicted_field": "ml.price_prediction", - "metrics": { - "r_squared": {}, - "mse": {}, - "msle": { - "offset": 10 - }, - "huber": { - "delta": 1.5 - } - } - } - }, - ) - - language: JavaScript - code: |- - const response = await client.ml.evaluateDataFrame({ - index: "house_price_predictions", - query: { - bool: { - filter: [ - { - term: { - "ml.is_training": false, - }, - }, - ], - }, - }, - evaluation: { - regression: { - actual_field: "price", - predicted_field: "ml.price_prediction", - metrics: { - r_squared: {}, - mse: {}, - msle: { - offset: 10, - }, - huber: { - delta: 1.5, - }, - }, - }, - }, - }); - - language: Ruby - code: |- - response = client.ml.evaluate_data_frame( - body: { - "index": "house_price_predictions", - "query": { - "bool": { - "filter": [ - { - "term": { - "ml.is_training": false - } - } - ] - } - }, - "evaluation": { - "regression": { - "actual_field": "price", - "predicted_field": "ml.price_prediction", - "metrics": { - "r_squared": {}, - "mse": {}, - "msle": { - "offset": 10 - }, - "huber": { - "delta": 1.5 - } - } - } - } - } - ) - - language: PHP - code: |- - $resp = $client->ml()->evaluateDataFrame([ - "body" => [ - "index" => "house_price_predictions", - "query" => [ - "bool" => [ - "filter" => array( - [ - "term" => [ - "ml.is_training" => false, - ], - ], - ), - ], - ], - "evaluation" => [ - "regression" => [ - "actual_field" => "price", - "predicted_field" => "ml.price_prediction", - "metrics" => [ - "r_squared" => new ArrayObject([]), - "mse" => new ArrayObject([]), - "msle" => [ - "offset" => 10, - ], - "huber" => [ - "delta" => 1.5, - ], - ], - ], - ], - ], - ]); - - language: curl - code: - "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d - '{\"index\":\"house_price_predictions\",\"query\":{\"bool\":{\"filter\":[{\"term\":{\"ml.is_training\":false}}]}},\"evaluation\ - \":{\"regression\":{\"actual_field\":\"price\",\"predicted_field\":\"ml.price_prediction\",\"metrics\":{\"r_squared\":{},\"mse\ - \":{},\"msle\":{\"offset\":10},\"huber\":{\"delta\":1.5}}}}}' \"$ELASTICSEARCH_URL/_ml/data_frame/_evaluate\"" - - language: Java - code: | - client.ml().evaluateDataFrame(e -> e - .evaluation(ev -> ev - .regression(r -> r - .actualField("price") - .predictedField("ml.price_prediction") - .metrics(m -> m - .msle(ms -> ms - .offset(10.0D) - ) - .huber(h -> h - .delta(1.5D) - ) - ) - ) - ) - .index("house_price_predictions") - .query(q -> q - .bool(b -> b - .filter(f -> f - .term(t -> t - .field("ml.is_training") - .value(FieldValue.of(false)) - ) - ) - ) - ) - ); diff --git a/specification/ml/evaluate_data_frame/examples/request/MlEvaluateDataFrameRequestExample5.yaml b/specification/ml/evaluate_data_frame/examples/request/MlEvaluateDataFrameRequestExample5.yaml index 41e76dd6fc..8ffb999c10 100644 --- a/specification/ml/evaluate_data_frame/examples/request/MlEvaluateDataFrameRequestExample5.yaml +++ b/specification/ml/evaluate_data_frame/examples/request/MlEvaluateDataFrameRequestExample5.yaml @@ -20,131 +20,3 @@ value: mse: {} msle: {} huber: {} -alternatives: - - language: Python - code: |- - resp = client.ml.evaluate_data_frame( - index="house_price_predictions", - query={ - "term": { - "ml.is_training": { - "value": True - } - } - }, - evaluation={ - "regression": { - "actual_field": "price", - "predicted_field": "ml.price_prediction", - "metrics": { - "r_squared": {}, - "mse": {}, - "msle": {}, - "huber": {} - } - } - }, - ) - - language: JavaScript - code: |- - const response = await client.ml.evaluateDataFrame({ - index: "house_price_predictions", - query: { - term: { - "ml.is_training": { - value: true, - }, - }, - }, - evaluation: { - regression: { - actual_field: "price", - predicted_field: "ml.price_prediction", - metrics: { - r_squared: {}, - mse: {}, - msle: {}, - huber: {}, - }, - }, - }, - }); - - language: Ruby - code: |- - response = client.ml.evaluate_data_frame( - body: { - "index": "house_price_predictions", - "query": { - "term": { - "ml.is_training": { - "value": true - } - } - }, - "evaluation": { - "regression": { - "actual_field": "price", - "predicted_field": "ml.price_prediction", - "metrics": { - "r_squared": {}, - "mse": {}, - "msle": {}, - "huber": {} - } - } - } - } - ) - - language: PHP - code: |- - $resp = $client->ml()->evaluateDataFrame([ - "body" => [ - "index" => "house_price_predictions", - "query" => [ - "term" => [ - "ml.is_training" => [ - "value" => true, - ], - ], - ], - "evaluation" => [ - "regression" => [ - "actual_field" => "price", - "predicted_field" => "ml.price_prediction", - "metrics" => [ - "r_squared" => new ArrayObject([]), - "mse" => new ArrayObject([]), - "msle" => new ArrayObject([]), - "huber" => new ArrayObject([]), - ], - ], - ], - ], - ]); - - language: curl - code: - "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d - '{\"index\":\"house_price_predictions\",\"query\":{\"term\":{\"ml.is_training\":{\"value\":true}}},\"evaluation\":{\"regressi\ - on\":{\"actual_field\":\"price\",\"predicted_field\":\"ml.price_prediction\",\"metrics\":{\"r_squared\":{},\"mse\":{},\"msle\ - \":{},\"huber\":{}}}}}' \"$ELASTICSEARCH_URL/_ml/data_frame/_evaluate\"" - - language: Java - code: | - client.ml().evaluateDataFrame(e -> e - .evaluation(ev -> ev - .regression(r -> r - .actualField("price") - .predictedField("ml.price_prediction") - .metrics(m -> m - .msle(ms -> ms) - .huber(h -> h) - ) - ) - ) - .index("house_price_predictions") - .query(q -> q - .term(t -> t - .field("ml.is_training") - .value(FieldValue.of(true)) - ) - ) - ); diff --git a/specification/ml/explain_data_frame_analytics/examples/request/MlExplainDataFrameAnalyticsRequestExample1.yaml b/specification/ml/explain_data_frame_analytics/examples/request/MlExplainDataFrameAnalyticsRequestExample1.yaml index 674937a17e..fb1f81f76e 100644 --- a/specification/ml/explain_data_frame_analytics/examples/request/MlExplainDataFrameAnalyticsRequestExample1.yaml +++ b/specification/ml/explain_data_frame_analytics/examples/request/MlExplainDataFrameAnalyticsRequestExample1.yaml @@ -8,73 +8,3 @@ value: analysis: regression: dependent_variable: price -alternatives: - - language: Python - code: |- - resp = client.ml.explain_data_frame_analytics( - source={ - "index": "houses_sold_last_10_yrs" - }, - analysis={ - "regression": { - "dependent_variable": "price" - } - }, - ) - - language: JavaScript - code: |- - const response = await client.ml.explainDataFrameAnalytics({ - source: { - index: "houses_sold_last_10_yrs", - }, - analysis: { - regression: { - dependent_variable: "price", - }, - }, - }); - - language: Ruby - code: |- - response = client.ml.explain_data_frame_analytics( - body: { - "source": { - "index": "houses_sold_last_10_yrs" - }, - "analysis": { - "regression": { - "dependent_variable": "price" - } - } - } - ) - - language: PHP - code: |- - $resp = $client->ml()->explainDataFrameAnalytics([ - "body" => [ - "source" => [ - "index" => "houses_sold_last_10_yrs", - ], - "analysis" => [ - "regression" => [ - "dependent_variable" => "price", - ], - ], - ], - ]); - - language: curl - code: - 'curl -X POST -H "Authorization: ApiKey $ELASTIC_API_KEY" -H "Content-Type: application/json" -d - ''{"source":{"index":"houses_sold_last_10_yrs"},"analysis":{"regression":{"dependent_variable":"price"}}}'' - "$ELASTICSEARCH_URL/_ml/data_frame/analytics/_explain"' - - language: Java - code: | - client.ml().explainDataFrameAnalytics(e -> e - .analysis(a -> a - .regression(r -> r - .dependentVariable("price") - ) - ) - .source(s -> s - .index("houses_sold_last_10_yrs") - ) - ); diff --git a/specification/ml/flush_job/examples/request/MlFlushJobExample1.yaml b/specification/ml/flush_job/examples/request/MlFlushJobExample1.yaml index 076e3e7793..21e1dbd2b6 100644 --- a/specification/ml/flush_job/examples/request/MlFlushJobExample1.yaml +++ b/specification/ml/flush_job/examples/request/MlFlushJobExample1.yaml @@ -4,42 +4,3 @@ value: |- { "calc_interim": true } -alternatives: - - language: Python - code: |- - resp = client.ml.flush_job( - job_id="low_request_rate", - calc_interim=True, - ) - - language: JavaScript - code: |- - const response = await client.ml.flushJob({ - job_id: "low_request_rate", - calc_interim: true, - }); - - language: Ruby - code: |- - response = client.ml.flush_job( - job_id: "low_request_rate", - body: { - "calc_interim": true - } - ) - - language: PHP - code: |- - $resp = $client->ml()->flushJob([ - "job_id" => "low_request_rate", - "body" => [ - "calc_interim" => true, - ], - ]); - - language: curl - code: - 'curl -X POST -H "Authorization: ApiKey $ELASTIC_API_KEY" -H "Content-Type: application/json" -d ''{"calc_interim":true}'' - "$ELASTICSEARCH_URL/_ml/anomaly_detectors/low_request_rate/_flush"' - - language: Java - code: | - client.ml().flushJob(f -> f - .calcInterim(true) - .jobId("low_request_rate") - ); diff --git a/specification/ml/forecast/examples/request/MlForecastExample1.yaml b/specification/ml/forecast/examples/request/MlForecastExample1.yaml index 281e668467..2e2dc3dc63 100644 --- a/specification/ml/forecast/examples/request/MlForecastExample1.yaml +++ b/specification/ml/forecast/examples/request/MlForecastExample1.yaml @@ -4,44 +4,3 @@ value: |- { "duration": "10d" } -alternatives: - - language: Python - code: |- - resp = client.ml.forecast( - job_id="low_request_rate", - duration="10d", - ) - - language: JavaScript - code: |- - const response = await client.ml.forecast({ - job_id: "low_request_rate", - duration: "10d", - }); - - language: Ruby - code: |- - response = client.ml.forecast( - job_id: "low_request_rate", - body: { - "duration": "10d" - } - ) - - language: PHP - code: |- - $resp = $client->ml()->forecast([ - "job_id" => "low_request_rate", - "body" => [ - "duration" => "10d", - ], - ]); - - language: curl - code: - 'curl -X POST -H "Authorization: ApiKey $ELASTIC_API_KEY" -H "Content-Type: application/json" -d ''{"duration":"10d"}'' - "$ELASTICSEARCH_URL/_ml/anomaly_detectors/low_request_rate/_forecast"' - - language: Java - code: | - client.ml().forecast(f -> f - .duration(d -> d - .time("10d") - ) - .jobId("low_request_rate") - ); diff --git a/specification/ml/get_buckets/examples/request/MlGetBucketsExample1.yaml b/specification/ml/get_buckets/examples/request/MlGetBucketsExample1.yaml index 01f7964a94..85002c44c3 100644 --- a/specification/ml/get_buckets/examples/request/MlGetBucketsExample1.yaml +++ b/specification/ml/get_buckets/examples/request/MlGetBucketsExample1.yaml @@ -5,48 +5,3 @@ value: |- "anomaly_score": 80, "start": "1454530200001" } -alternatives: - - language: Python - code: |- - resp = client.ml.get_buckets( - job_id="low_request_rate", - anomaly_score=80, - start="1454530200001", - ) - - language: JavaScript - code: |- - const response = await client.ml.getBuckets({ - job_id: "low_request_rate", - anomaly_score: 80, - start: 1454530200001, - }); - - language: Ruby - code: |- - response = client.ml.get_buckets( - job_id: "low_request_rate", - body: { - "anomaly_score": 80, - "start": "1454530200001" - } - ) - - language: PHP - code: |- - $resp = $client->ml()->getBuckets([ - "job_id" => "low_request_rate", - "body" => [ - "anomaly_score" => 80, - "start" => "1454530200001", - ], - ]); - - language: curl - code: - 'curl -X GET -H "Authorization: ApiKey $ELASTIC_API_KEY" -H "Content-Type: application/json" -d - ''{"anomaly_score":80,"start":"1454530200001"}'' - "$ELASTICSEARCH_URL/_ml/anomaly_detectors/low_request_rate/results/buckets"' - - language: Java - code: | - client.ml().getBuckets(g -> g - .anomalyScore(80.0D) - .jobId("low_request_rate") - .start(DateTime.of("1454530200001")) - ); diff --git a/specification/ml/get_calendar_events/examples/request/MlGetCalendarEventsExample1.yaml b/specification/ml/get_calendar_events/examples/request/MlGetCalendarEventsExample1.yaml index 903d37f89f..2271588bc5 100644 --- a/specification/ml/get_calendar_events/examples/request/MlGetCalendarEventsExample1.yaml +++ b/specification/ml/get_calendar_events/examples/request/MlGetCalendarEventsExample1.yaml @@ -1,29 +1 @@ method_request: GET _ml/calendars/planned-outages/events -alternatives: - - language: Python - code: |- - resp = client.ml.get_calendar_events( - calendar_id="planned-outages", - ) - - language: JavaScript - code: |- - const response = await client.ml.getCalendarEvents({ - calendar_id: "planned-outages", - }); - - language: Ruby - code: |- - response = client.ml.get_calendar_events( - calendar_id: "planned-outages" - ) - - language: PHP - code: |- - $resp = $client->ml()->getCalendarEvents([ - "calendar_id" => "planned-outages", - ]); - - language: curl - code: 'curl -X GET -H "Authorization: ApiKey $ELASTIC_API_KEY" "$ELASTICSEARCH_URL/_ml/calendars/planned-outages/events"' - - language: Java - code: | - client.ml().getCalendarEvents(g -> g - .calendarId("planned-outages") - ); diff --git a/specification/ml/get_calendars/examples/request/MlGetCalendarsExample1.yaml b/specification/ml/get_calendars/examples/request/MlGetCalendarsExample1.yaml index 7031b45741..7964e0844d 100644 --- a/specification/ml/get_calendars/examples/request/MlGetCalendarsExample1.yaml +++ b/specification/ml/get_calendars/examples/request/MlGetCalendarsExample1.yaml @@ -1,29 +1 @@ method_request: GET _ml/calendars/planned-outages -alternatives: - - language: Python - code: |- - resp = client.ml.get_calendars( - calendar_id="planned-outages", - ) - - language: JavaScript - code: |- - const response = await client.ml.getCalendars({ - calendar_id: "planned-outages", - }); - - language: Ruby - code: |- - response = client.ml.get_calendars( - calendar_id: "planned-outages" - ) - - language: PHP - code: |- - $resp = $client->ml()->getCalendars([ - "calendar_id" => "planned-outages", - ]); - - language: curl - code: 'curl -X GET -H "Authorization: ApiKey $ELASTIC_API_KEY" "$ELASTICSEARCH_URL/_ml/calendars/planned-outages"' - - language: Java - code: | - client.ml().getCalendars(g -> g - .calendarId("planned-outages") - ); diff --git a/specification/ml/get_categories/examples/request/MlGetCategoriesExample1.yaml b/specification/ml/get_categories/examples/request/MlGetCategoriesExample1.yaml index 3184834163..31dd82d9fa 100644 --- a/specification/ml/get_categories/examples/request/MlGetCategoriesExample1.yaml +++ b/specification/ml/get_categories/examples/request/MlGetCategoriesExample1.yaml @@ -6,52 +6,3 @@ value: |- "size": 1 } } -alternatives: - - language: Python - code: |- - resp = client.ml.get_categories( - job_id="esxi_log", - page={ - "size": 1 - }, - ) - - language: JavaScript - code: |- - const response = await client.ml.getCategories({ - job_id: "esxi_log", - page: { - size: 1, - }, - }); - - language: Ruby - code: |- - response = client.ml.get_categories( - job_id: "esxi_log", - body: { - "page": { - "size": 1 - } - } - ) - - language: PHP - code: |- - $resp = $client->ml()->getCategories([ - "job_id" => "esxi_log", - "body" => [ - "page" => [ - "size" => 1, - ], - ], - ]); - - language: curl - code: - 'curl -X GET -H "Authorization: ApiKey $ELASTIC_API_KEY" -H "Content-Type: application/json" -d ''{"page":{"size":1}}'' - "$ELASTICSEARCH_URL/_ml/anomaly_detectors/esxi_log/results/categories"' - - language: Java - code: | - client.ml().getCategories(g -> g - .jobId("esxi_log") - .page(p -> p - .size(1) - ) - ); diff --git a/specification/ml/get_data_frame_analytics/examples/request/MlGetDataFrameAnalyticsExample1.yaml b/specification/ml/get_data_frame_analytics/examples/request/MlGetDataFrameAnalyticsExample1.yaml index 6ae5827ffe..d87c068be6 100644 --- a/specification/ml/get_data_frame_analytics/examples/request/MlGetDataFrameAnalyticsExample1.yaml +++ b/specification/ml/get_data_frame_analytics/examples/request/MlGetDataFrameAnalyticsExample1.yaml @@ -1,29 +1 @@ method_request: GET _ml/data_frame/analytics/loganalytics -alternatives: - - language: Python - code: |- - resp = client.ml.get_data_frame_analytics( - id="loganalytics", - ) - - language: JavaScript - code: |- - const response = await client.ml.getDataFrameAnalytics({ - id: "loganalytics", - }); - - language: Ruby - code: |- - response = client.ml.get_data_frame_analytics( - id: "loganalytics" - ) - - language: PHP - code: |- - $resp = $client->ml()->getDataFrameAnalytics([ - "id" => "loganalytics", - ]); - - language: curl - code: 'curl -X GET -H "Authorization: ApiKey $ELASTIC_API_KEY" "$ELASTICSEARCH_URL/_ml/data_frame/analytics/loganalytics"' - - language: Java - code: | - client.ml().getDataFrameAnalytics(g -> g - .id("loganalytics") - ); diff --git a/specification/ml/get_data_frame_analytics_stats/examples/request/MlGetDataFrameAnalyticsStatsExample1.yaml b/specification/ml/get_data_frame_analytics_stats/examples/request/MlGetDataFrameAnalyticsStatsExample1.yaml index 2b46e403eb..bfab4a796b 100644 --- a/specification/ml/get_data_frame_analytics_stats/examples/request/MlGetDataFrameAnalyticsStatsExample1.yaml +++ b/specification/ml/get_data_frame_analytics_stats/examples/request/MlGetDataFrameAnalyticsStatsExample1.yaml @@ -1,29 +1 @@ method_request: GET _ml/data_frame/analytics/weblog-outliers/_stats -alternatives: - - language: Python - code: |- - resp = client.ml.get_data_frame_analytics_stats( - id="weblog-outliers", - ) - - language: JavaScript - code: |- - const response = await client.ml.getDataFrameAnalyticsStats({ - id: "weblog-outliers", - }); - - language: Ruby - code: |- - response = client.ml.get_data_frame_analytics_stats( - id: "weblog-outliers" - ) - - language: PHP - code: |- - $resp = $client->ml()->getDataFrameAnalyticsStats([ - "id" => "weblog-outliers", - ]); - - language: curl - code: 'curl -X GET -H "Authorization: ApiKey $ELASTIC_API_KEY" "$ELASTICSEARCH_URL/_ml/data_frame/analytics/weblog-outliers/_stats"' - - language: Java - code: | - client.ml().getDataFrameAnalyticsStats(g -> g - .id("weblog-outliers") - ); diff --git a/specification/ml/get_datafeed_stats/examples/request/MlGetDatafeedStatsExample1.yaml b/specification/ml/get_datafeed_stats/examples/request/MlGetDatafeedStatsExample1.yaml index b7cf20132a..4022e01353 100644 --- a/specification/ml/get_datafeed_stats/examples/request/MlGetDatafeedStatsExample1.yaml +++ b/specification/ml/get_datafeed_stats/examples/request/MlGetDatafeedStatsExample1.yaml @@ -1,30 +1 @@ method_request: GET _ml/datafeeds/datafeed-high_sum_total_sales/_stats -alternatives: - - language: Python - code: |- - resp = client.ml.get_datafeed_stats( - datafeed_id="datafeed-high_sum_total_sales", - ) - - language: JavaScript - code: |- - const response = await client.ml.getDatafeedStats({ - datafeed_id: "datafeed-high_sum_total_sales", - }); - - language: Ruby - code: |- - response = client.ml.get_datafeed_stats( - datafeed_id: "datafeed-high_sum_total_sales" - ) - - language: PHP - code: |- - $resp = $client->ml()->getDatafeedStats([ - "datafeed_id" => "datafeed-high_sum_total_sales", - ]); - - language: curl - code: 'curl -X GET -H "Authorization: ApiKey $ELASTIC_API_KEY" - "$ELASTICSEARCH_URL/_ml/datafeeds/datafeed-high_sum_total_sales/_stats"' - - language: Java - code: | - client.ml().getDatafeedStats(g -> g - .datafeedId("datafeed-high_sum_total_sales") - ); diff --git a/specification/ml/get_datafeeds/examples/request/MlGetDatafeedsExample1.yaml b/specification/ml/get_datafeeds/examples/request/MlGetDatafeedsExample1.yaml index 4a1037d315..bd31d72579 100644 --- a/specification/ml/get_datafeeds/examples/request/MlGetDatafeedsExample1.yaml +++ b/specification/ml/get_datafeeds/examples/request/MlGetDatafeedsExample1.yaml @@ -1,29 +1 @@ method_request: GET _ml/datafeeds/datafeed-high_sum_total_sales -alternatives: - - language: Python - code: |- - resp = client.ml.get_datafeeds( - datafeed_id="datafeed-high_sum_total_sales", - ) - - language: JavaScript - code: |- - const response = await client.ml.getDatafeeds({ - datafeed_id: "datafeed-high_sum_total_sales", - }); - - language: Ruby - code: |- - response = client.ml.get_datafeeds( - datafeed_id: "datafeed-high_sum_total_sales" - ) - - language: PHP - code: |- - $resp = $client->ml()->getDatafeeds([ - "datafeed_id" => "datafeed-high_sum_total_sales", - ]); - - language: curl - code: 'curl -X GET -H "Authorization: ApiKey $ELASTIC_API_KEY" "$ELASTICSEARCH_URL/_ml/datafeeds/datafeed-high_sum_total_sales"' - - language: Java - code: | - client.ml().getDatafeeds(g -> g - .datafeedId("datafeed-high_sum_total_sales") - ); diff --git a/specification/ml/get_filters/examples/request/MlGetFiltersExample1.yaml b/specification/ml/get_filters/examples/request/MlGetFiltersExample1.yaml index 624a3d092f..41c8454cc2 100644 --- a/specification/ml/get_filters/examples/request/MlGetFiltersExample1.yaml +++ b/specification/ml/get_filters/examples/request/MlGetFiltersExample1.yaml @@ -1,29 +1 @@ method_request: GET _ml/filters/safe_domains -alternatives: - - language: Python - code: |- - resp = client.ml.get_filters( - filter_id="safe_domains", - ) - - language: JavaScript - code: |- - const response = await client.ml.getFilters({ - filter_id: "safe_domains", - }); - - language: Ruby - code: |- - response = client.ml.get_filters( - filter_id: "safe_domains" - ) - - language: PHP - code: |- - $resp = $client->ml()->getFilters([ - "filter_id" => "safe_domains", - ]); - - language: curl - code: 'curl -X GET -H "Authorization: ApiKey $ELASTIC_API_KEY" "$ELASTICSEARCH_URL/_ml/filters/safe_domains"' - - language: Java - code: | - client.ml().getFilters(g -> g - .filterId("safe_domains") - ); diff --git a/specification/ml/get_influencers/examples/request/MlGetInfluencersExample1.yaml b/specification/ml/get_influencers/examples/request/MlGetInfluencersExample1.yaml index 5d36ade4ba..0bb4c9f2b1 100644 --- a/specification/ml/get_influencers/examples/request/MlGetInfluencersExample1.yaml +++ b/specification/ml/get_influencers/examples/request/MlGetInfluencersExample1.yaml @@ -5,46 +5,3 @@ value: |- "sort": "influencer_score", "desc": true } -alternatives: - - language: Python - code: |- - resp = client.ml.get_influencers( - job_id="high_sum_total_sales", - sort="influencer_score", - desc=True, - ) - - language: JavaScript - code: |- - const response = await client.ml.getInfluencers({ - job_id: "high_sum_total_sales", - sort: "influencer_score", - desc: true, - }); - - language: Ruby - code: |- - response = client.ml.get_influencers( - job_id: "high_sum_total_sales", - body: { - "sort": "influencer_score", - "desc": true - } - ) - - language: PHP - code: |- - $resp = $client->ml()->getInfluencers([ - "job_id" => "high_sum_total_sales", - "body" => [ - "sort" => "influencer_score", - "desc" => true, - ], - ]); - - language: curl - code: - 'curl -X GET -H "Authorization: ApiKey $ELASTIC_API_KEY" -H "Content-Type: application/json" -d - ''{"sort":"influencer_score","desc":true}'' - "$ELASTICSEARCH_URL/_ml/anomaly_detectors/high_sum_total_sales/results/influencers"' - - language: Java - code: | - client.ml().getInfluencers(g -> g - .jobId("high_sum_total_sales") - ); diff --git a/specification/ml/get_job_stats/examples/request/MlGetJobStatsExample1.yaml b/specification/ml/get_job_stats/examples/request/MlGetJobStatsExample1.yaml index 07381729d9..992d5eb383 100644 --- a/specification/ml/get_job_stats/examples/request/MlGetJobStatsExample1.yaml +++ b/specification/ml/get_job_stats/examples/request/MlGetJobStatsExample1.yaml @@ -1,29 +1 @@ method_request: GET _ml/anomaly_detectors/low_request_rate/_stats -alternatives: - - language: Python - code: |- - resp = client.ml.get_job_stats( - job_id="low_request_rate", - ) - - language: JavaScript - code: |- - const response = await client.ml.getJobStats({ - job_id: "low_request_rate", - }); - - language: Ruby - code: |- - response = client.ml.get_job_stats( - job_id: "low_request_rate" - ) - - language: PHP - code: |- - $resp = $client->ml()->getJobStats([ - "job_id" => "low_request_rate", - ]); - - language: curl - code: 'curl -X GET -H "Authorization: ApiKey $ELASTIC_API_KEY" "$ELASTICSEARCH_URL/_ml/anomaly_detectors/low_request_rate/_stats"' - - language: Java - code: | - client.ml().getJobStats(g -> g - .jobId("low_request_rate") - ); diff --git a/specification/ml/get_jobs/examples/request/MlGetJobsExample1.yaml b/specification/ml/get_jobs/examples/request/MlGetJobsExample1.yaml index b6d456970d..5edb88e3ff 100644 --- a/specification/ml/get_jobs/examples/request/MlGetJobsExample1.yaml +++ b/specification/ml/get_jobs/examples/request/MlGetJobsExample1.yaml @@ -1,29 +1 @@ method_request: GET _ml/anomaly_detectors/high_sum_total_sales -alternatives: - - language: Python - code: |- - resp = client.ml.get_jobs( - job_id="high_sum_total_sales", - ) - - language: JavaScript - code: |- - const response = await client.ml.getJobs({ - job_id: "high_sum_total_sales", - }); - - language: Ruby - code: |- - response = client.ml.get_jobs( - job_id: "high_sum_total_sales" - ) - - language: PHP - code: |- - $resp = $client->ml()->getJobs([ - "job_id" => "high_sum_total_sales", - ]); - - language: curl - code: 'curl -X GET -H "Authorization: ApiKey $ELASTIC_API_KEY" "$ELASTICSEARCH_URL/_ml/anomaly_detectors/high_sum_total_sales"' - - language: Java - code: | - client.ml().getJobs(g -> g - .jobId("high_sum_total_sales") - ); diff --git a/specification/ml/get_memory_stats/examples/request/MlGetMemoryStatsExample1.yaml b/specification/ml/get_memory_stats/examples/request/MlGetMemoryStatsExample1.yaml index f2b94df12c..d96eea698e 100644 --- a/specification/ml/get_memory_stats/examples/request/MlGetMemoryStatsExample1.yaml +++ b/specification/ml/get_memory_stats/examples/request/MlGetMemoryStatsExample1.yaml @@ -1,26 +1 @@ method_request: GET _ml/memory/_stats?human -alternatives: - - language: Python - code: |- - resp = client.ml.get_memory_stats( - human=True, - ) - - language: JavaScript - code: |- - const response = await client.ml.getMemoryStats({ - human: "true", - }); - - language: Ruby - code: |- - response = client.ml.get_memory_stats( - human: "true" - ) - - language: PHP - code: |- - $resp = $client->ml()->getMemoryStats([ - "human" => "true", - ]); - - language: curl - code: 'curl -X GET -H "Authorization: ApiKey $ELASTIC_API_KEY" "$ELASTICSEARCH_URL/_ml/memory/_stats?human"' - - language: Java - code: "\n" diff --git a/specification/ml/get_model_snapshot_upgrade_stats/examples/request/MlGetModelSnapshotUpgradeStatsExample1.yaml b/specification/ml/get_model_snapshot_upgrade_stats/examples/request/MlGetModelSnapshotUpgradeStatsExample1.yaml index c43070df50..42473e9e83 100644 --- a/specification/ml/get_model_snapshot_upgrade_stats/examples/request/MlGetModelSnapshotUpgradeStatsExample1.yaml +++ b/specification/ml/get_model_snapshot_upgrade_stats/examples/request/MlGetModelSnapshotUpgradeStatsExample1.yaml @@ -1,35 +1 @@ method_request: GET _ml/anomaly_detectors/low_request_rate/model_snapshots/_all/_upgrade/_stats -alternatives: - - language: Python - code: |- - resp = client.ml.get_model_snapshot_upgrade_stats( - job_id="low_request_rate", - snapshot_id="_all", - ) - - language: JavaScript - code: |- - const response = await client.ml.getModelSnapshotUpgradeStats({ - job_id: "low_request_rate", - snapshot_id: "_all", - }); - - language: Ruby - code: |- - response = client.ml.get_model_snapshot_upgrade_stats( - job_id: "low_request_rate", - snapshot_id: "_all" - ) - - language: PHP - code: |- - $resp = $client->ml()->getModelSnapshotUpgradeStats([ - "job_id" => "low_request_rate", - "snapshot_id" => "_all", - ]); - - language: curl - code: 'curl -X GET -H "Authorization: ApiKey $ELASTIC_API_KEY" - "$ELASTICSEARCH_URL/_ml/anomaly_detectors/low_request_rate/model_snapshots/_all/_upgrade/_stats"' - - language: Java - code: | - client.ml().getModelSnapshotUpgradeStats(g -> g - .jobId("low_request_rate") - .snapshotId("_all") - ); diff --git a/specification/ml/get_model_snapshots/examples/request/MlGetModelSnapshotsExample1.yaml b/specification/ml/get_model_snapshots/examples/request/MlGetModelSnapshotsExample1.yaml index d7fb910aa2..5d9f0959b4 100644 --- a/specification/ml/get_model_snapshots/examples/request/MlGetModelSnapshotsExample1.yaml +++ b/specification/ml/get_model_snapshots/examples/request/MlGetModelSnapshotsExample1.yaml @@ -4,42 +4,3 @@ value: |- { "start": "1575402236000" } -alternatives: - - language: Python - code: |- - resp = client.ml.get_model_snapshots( - job_id="high_sum_total_sales", - start="1575402236000", - ) - - language: JavaScript - code: |- - const response = await client.ml.getModelSnapshots({ - job_id: "high_sum_total_sales", - start: 1575402236000, - }); - - language: Ruby - code: |- - response = client.ml.get_model_snapshots( - job_id: "high_sum_total_sales", - body: { - "start": "1575402236000" - } - ) - - language: PHP - code: |- - $resp = $client->ml()->getModelSnapshots([ - "job_id" => "high_sum_total_sales", - "body" => [ - "start" => "1575402236000", - ], - ]); - - language: curl - code: - 'curl -X GET -H "Authorization: ApiKey $ELASTIC_API_KEY" -H "Content-Type: application/json" -d - ''{"start":"1575402236000"}'' "$ELASTICSEARCH_URL/_ml/anomaly_detectors/high_sum_total_sales/model_snapshots"' - - language: Java - code: | - client.ml().getModelSnapshots(g -> g - .jobId("high_sum_total_sales") - .start(DateTime.of("1575402236000")) - ); diff --git a/specification/ml/get_overall_buckets/examples/request/MlGetOverallBucketsExample1.yaml b/specification/ml/get_overall_buckets/examples/request/MlGetOverallBucketsExample1.yaml index 3fdb7c7946..3fd53f76b4 100644 --- a/specification/ml/get_overall_buckets/examples/request/MlGetOverallBucketsExample1.yaml +++ b/specification/ml/get_overall_buckets/examples/request/MlGetOverallBucketsExample1.yaml @@ -5,48 +5,3 @@ value: |- "overall_score": 80, "start": "1403532000000" } -alternatives: - - language: Python - code: |- - resp = client.ml.get_overall_buckets( - job_id="job-*", - overall_score=80, - start="1403532000000", - ) - - language: JavaScript - code: |- - const response = await client.ml.getOverallBuckets({ - job_id: "job-*", - overall_score: 80, - start: 1403532000000, - }); - - language: Ruby - code: |- - response = client.ml.get_overall_buckets( - job_id: "job-*", - body: { - "overall_score": 80, - "start": "1403532000000" - } - ) - - language: PHP - code: |- - $resp = $client->ml()->getOverallBuckets([ - "job_id" => "job-*", - "body" => [ - "overall_score" => 80, - "start" => "1403532000000", - ], - ]); - - language: curl - code: - 'curl -X GET -H "Authorization: ApiKey $ELASTIC_API_KEY" -H "Content-Type: application/json" -d - ''{"overall_score":80,"start":"1403532000000"}'' - "$ELASTICSEARCH_URL/_ml/anomaly_detectors/job-*/results/overall_buckets"' - - language: Java - code: | - client.ml().getOverallBuckets(g -> g - .jobId("job-*") - .overallScore("80") - .start(DateTime.of("1403532000000")) - ); diff --git a/specification/ml/get_records/examples/request/MlGetRecordsExample1.yaml b/specification/ml/get_records/examples/request/MlGetRecordsExample1.yaml index 53aae1ce53..78968584d7 100644 --- a/specification/ml/get_records/examples/request/MlGetRecordsExample1.yaml +++ b/specification/ml/get_records/examples/request/MlGetRecordsExample1.yaml @@ -6,53 +6,3 @@ value: |- "desc": true, "start": "1454944100000" } -alternatives: - - language: Python - code: |- - resp = client.ml.get_records( - job_id="low_request_rate", - sort="record_score", - desc=True, - start="1454944100000", - ) - - language: JavaScript - code: |- - const response = await client.ml.getRecords({ - job_id: "low_request_rate", - sort: "record_score", - desc: true, - start: 1454944100000, - }); - - language: Ruby - code: |- - response = client.ml.get_records( - job_id: "low_request_rate", - body: { - "sort": "record_score", - "desc": true, - "start": "1454944100000" - } - ) - - language: PHP - code: |- - $resp = $client->ml()->getRecords([ - "job_id" => "low_request_rate", - "body" => [ - "sort" => "record_score", - "desc" => true, - "start" => "1454944100000", - ], - ]); - - language: curl - code: - 'curl -X GET -H "Authorization: ApiKey $ELASTIC_API_KEY" -H "Content-Type: application/json" -d - ''{"sort":"record_score","desc":true,"start":"1454944100000"}'' - "$ELASTICSEARCH_URL/_ml/anomaly_detectors/low_request_rate/results/records"' - - language: Java - code: | - client.ml().getRecords(g -> g - .desc(true) - .jobId("low_request_rate") - .sort("record_score") - .start(DateTime.of("1454944100000")) - ); diff --git a/specification/ml/get_trained_models/examples/request/MlGetTrainedModelsExample1.yaml b/specification/ml/get_trained_models/examples/request/MlGetTrainedModelsExample1.yaml index f28c5c3cae..6de7522ab6 100644 --- a/specification/ml/get_trained_models/examples/request/MlGetTrainedModelsExample1.yaml +++ b/specification/ml/get_trained_models/examples/request/MlGetTrainedModelsExample1.yaml @@ -1,15 +1 @@ method_request: GET _ml/trained_models/ -alternatives: - - language: Python - code: resp = client.ml.get_trained_models() - - language: JavaScript - code: const response = await client.ml.getTrainedModels(); - - language: Ruby - code: response = client.ml.get_trained_models - - language: PHP - code: $resp = $client->ml()->getTrainedModels(); - - language: curl - code: 'curl -X GET -H "Authorization: ApiKey $ELASTIC_API_KEY" "$ELASTICSEARCH_URL/_ml/trained_models/"' - - language: Java - code: | - client.ml().getTrainedModels(g -> g); diff --git a/specification/ml/get_trained_models_stats/examples/request/MlGetTrainedModelsStatsExample1.yaml b/specification/ml/get_trained_models_stats/examples/request/MlGetTrainedModelsStatsExample1.yaml index e2fe9f1bff..f0367abf92 100644 --- a/specification/ml/get_trained_models_stats/examples/request/MlGetTrainedModelsStatsExample1.yaml +++ b/specification/ml/get_trained_models_stats/examples/request/MlGetTrainedModelsStatsExample1.yaml @@ -1,15 +1 @@ method_request: GET _ml/trained_models/_stats -alternatives: - - language: Python - code: resp = client.ml.get_trained_models_stats() - - language: JavaScript - code: const response = await client.ml.getTrainedModelsStats(); - - language: Ruby - code: response = client.ml.get_trained_models_stats - - language: PHP - code: $resp = $client->ml()->getTrainedModelsStats(); - - language: curl - code: 'curl -X GET -H "Authorization: ApiKey $ELASTIC_API_KEY" "$ELASTICSEARCH_URL/_ml/trained_models/_stats"' - - language: Java - code: | - client.ml().getTrainedModelsStats(g -> g); diff --git a/specification/ml/infer_trained_model/examples/request/MlInferTrainedModelExample1.yaml b/specification/ml/infer_trained_model/examples/request/MlInferTrainedModelExample1.yaml index b10a3fe433..1688659f03 100644 --- a/specification/ml/infer_trained_model/examples/request/MlInferTrainedModelExample1.yaml +++ b/specification/ml/infer_trained_model/examples/request/MlInferTrainedModelExample1.yaml @@ -4,59 +4,3 @@ value: |- { "docs":[{"text": "The fool doth think he is wise, but the wise man knows himself to be a fool."}] } -alternatives: - - language: Python - code: |- - resp = client.ml.infer_trained_model( - model_id="lang_ident_model_1", - docs=[ - { - "text": "The fool doth think he is wise, but the wise man knows himself to be a fool." - } - ], - ) - - language: JavaScript - code: |- - const response = await client.ml.inferTrainedModel({ - model_id: "lang_ident_model_1", - docs: [ - { - text: "The fool doth think he is wise, but the wise man knows himself to be a fool.", - }, - ], - }); - - language: Ruby - code: |- - response = client.ml.infer_trained_model( - model_id: "lang_ident_model_1", - body: { - "docs": [ - { - "text": "The fool doth think he is wise, but the wise man knows himself to be a fool." - } - ] - } - ) - - language: PHP - code: |- - $resp = $client->ml()->inferTrainedModel([ - "model_id" => "lang_ident_model_1", - "body" => [ - "docs" => array( - [ - "text" => "The fool doth think he is wise, but the wise man knows himself to be a fool.", - ], - ), - ], - ]); - - language: curl - code: - 'curl -X POST -H "Authorization: ApiKey $ELASTIC_API_KEY" -H "Content-Type: application/json" -d - ''{"docs":[{"text":"The fool doth think he is wise, but the wise man knows himself to be a fool."}]}'' - "$ELASTICSEARCH_URL/_ml/trained_models/lang_ident_model_1/_infer"' - - language: Java - code: | - client.ml().inferTrainedModel(i -> i - .docs(Map.of("text", JsonData.fromJson("\"The fool doth think he is wise, but the wise man knows himself to be a fool.\""))) - .modelId("lang_ident_model_1") - ); diff --git a/specification/ml/info/examples/request/MlInfoExample1.yaml b/specification/ml/info/examples/request/MlInfoExample1.yaml index 7ed33a8249..a32dec1f8d 100644 --- a/specification/ml/info/examples/request/MlInfoExample1.yaml +++ b/specification/ml/info/examples/request/MlInfoExample1.yaml @@ -1,15 +1 @@ method_request: GET _ml/info -alternatives: - - language: Python - code: resp = client.ml.info() - - language: JavaScript - code: const response = await client.ml.info(); - - language: Ruby - code: response = client.ml.info - - language: PHP - code: $resp = $client->ml()->info(); - - language: curl - code: 'curl -X GET -H "Authorization: ApiKey $ELASTIC_API_KEY" "$ELASTICSEARCH_URL/_ml/info"' - - language: Java - code: | - client.ml().info(); diff --git a/specification/ml/open_job/examples/request/MlOpenJobRequestExample1.yaml b/specification/ml/open_job/examples/request/MlOpenJobRequestExample1.yaml index 2dcf513e30..7423e886be 100644 --- a/specification/ml/open_job/examples/request/MlOpenJobRequestExample1.yaml +++ b/specification/ml/open_job/examples/request/MlOpenJobRequestExample1.yaml @@ -4,44 +4,3 @@ description: > A request to open anomaly detection jobs. The timeout specifies to wait 35 minutes for the job to open. value: timeout: 35m -alternatives: - - language: Python - code: |- - resp = client.ml.open_job( - job_id="job-01", - timeout="35m", - ) - - language: JavaScript - code: |- - const response = await client.ml.openJob({ - job_id: "job-01", - timeout: "35m", - }); - - language: Ruby - code: |- - response = client.ml.open_job( - job_id: "job-01", - body: { - "timeout": "35m" - } - ) - - language: PHP - code: |- - $resp = $client->ml()->openJob([ - "job_id" => "job-01", - "body" => [ - "timeout" => "35m", - ], - ]); - - language: curl - code: - 'curl -X POST -H "Authorization: ApiKey $ELASTIC_API_KEY" -H "Content-Type: application/json" -d ''{"timeout":"35m"}'' - "$ELASTICSEARCH_URL/_ml/anomaly_detectors/job-01/_open"' - - language: Java - code: | - client.ml().openJob(o -> o - .jobId("job-01") - .timeout(t -> t - .time("35m") - ) - ); diff --git a/specification/ml/post_calendar_events/examples/request/MlPostCalendarEventsExample1.yaml b/specification/ml/post_calendar_events/examples/request/MlPostCalendarEventsExample1.yaml index c01e4e4753..9235c4c7d8 100644 --- a/specification/ml/post_calendar_events/examples/request/MlPostCalendarEventsExample1.yaml +++ b/specification/ml/post_calendar_events/examples/request/MlPostCalendarEventsExample1.yaml @@ -8,117 +8,3 @@ value: |- {"description": "event 3", "start_time": 1514160000000, "end_time": 1514246400000} ] } -alternatives: - - language: Python - code: |- - resp = client.ml.post_calendar_events( - calendar_id="planned-outages", - events=[ - { - "description": "event 1", - "start_time": 1513641600000, - "end_time": 1513728000000 - }, - { - "description": "event 2", - "start_time": 1513814400000, - "end_time": 1513900800000 - }, - { - "description": "event 3", - "start_time": 1514160000000, - "end_time": 1514246400000 - } - ], - ) - - language: JavaScript - code: |- - const response = await client.ml.postCalendarEvents({ - calendar_id: "planned-outages", - events: [ - { - description: "event 1", - start_time: 1513641600000, - end_time: 1513728000000, - }, - { - description: "event 2", - start_time: 1513814400000, - end_time: 1513900800000, - }, - { - description: "event 3", - start_time: 1514160000000, - end_time: 1514246400000, - }, - ], - }); - - language: Ruby - code: |- - response = client.ml.post_calendar_events( - calendar_id: "planned-outages", - body: { - "events": [ - { - "description": "event 1", - "start_time": 1513641600000, - "end_time": 1513728000000 - }, - { - "description": "event 2", - "start_time": 1513814400000, - "end_time": 1513900800000 - }, - { - "description": "event 3", - "start_time": 1514160000000, - "end_time": 1514246400000 - } - ] - } - ) - - language: PHP - code: |- - $resp = $client->ml()->postCalendarEvents([ - "calendar_id" => "planned-outages", - "body" => [ - "events" => array( - [ - "description" => "event 1", - "start_time" => 1513641600000, - "end_time" => 1513728000000, - ], - [ - "description" => "event 2", - "start_time" => 1513814400000, - "end_time" => 1513900800000, - ], - [ - "description" => "event 3", - "start_time" => 1514160000000, - "end_time" => 1514246400000, - ], - ), - ], - ]); - - language: curl - code: - 'curl -X POST -H "Authorization: ApiKey $ELASTIC_API_KEY" -H "Content-Type: application/json" -d - ''{"events":[{"description":"event 1","start_time":1513641600000,"end_time":1513728000000},{"description":"event - 2","start_time":1513814400000,"end_time":1513900800000},{"description":"event - 3","start_time":1514160000000,"end_time":1514246400000}]}'' "$ELASTICSEARCH_URL/_ml/calendars/planned-outages/events"' - - language: Java - code: | - client.ml().postCalendarEvents(p -> p - .calendarId("planned-outages") - .events(List.of(CalendarEvent.of(c -> c - .description("event 1") - .endTime(DateTime.ofEpochMilli(1513728000000L)) - .startTime(DateTime.ofEpochMilli(1513641600000L))),CalendarEvent.of(c -> c - .description("event 2") - .endTime(DateTime.ofEpochMilli(1513900800000L)) - .startTime(DateTime.ofEpochMilli(1513814400000L))),CalendarEvent.of(c -> c - .description("event 3") - .endTime(DateTime.ofEpochMilli(1514246400000L)) - .startTime(DateTime.ofEpochMilli(1514160000000L))))) - ); diff --git a/specification/ml/preview_data_frame_analytics/examples/request/MlPreviewDataFrameAnalyticsExample1.yaml b/specification/ml/preview_data_frame_analytics/examples/request/MlPreviewDataFrameAnalyticsExample1.yaml index 535e9c5a29..cd481962f9 100644 --- a/specification/ml/preview_data_frame_analytics/examples/request/MlPreviewDataFrameAnalyticsExample1.yaml +++ b/specification/ml/preview_data_frame_analytics/examples/request/MlPreviewDataFrameAnalyticsExample1.yaml @@ -13,83 +13,3 @@ value: |- } } } -alternatives: - - language: Python - code: |- - resp = client.ml.preview_data_frame_analytics( - config={ - "source": { - "index": "houses_sold_last_10_yrs" - }, - "analysis": { - "regression": { - "dependent_variable": "price" - } - } - }, - ) - - language: JavaScript - code: |- - const response = await client.ml.previewDataFrameAnalytics({ - config: { - source: { - index: "houses_sold_last_10_yrs", - }, - analysis: { - regression: { - dependent_variable: "price", - }, - }, - }, - }); - - language: Ruby - code: |- - response = client.ml.preview_data_frame_analytics( - body: { - "config": { - "source": { - "index": "houses_sold_last_10_yrs" - }, - "analysis": { - "regression": { - "dependent_variable": "price" - } - } - } - } - ) - - language: PHP - code: |- - $resp = $client->ml()->previewDataFrameAnalytics([ - "body" => [ - "config" => [ - "source" => [ - "index" => "houses_sold_last_10_yrs", - ], - "analysis" => [ - "regression" => [ - "dependent_variable" => "price", - ], - ], - ], - ], - ]); - - language: curl - code: - "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d - '{\"config\":{\"source\":{\"index\":\"houses_sold_last_10_yrs\"},\"analysis\":{\"regression\":{\"dependent_variable\":\"price\ - \"}}}}' \"$ELASTICSEARCH_URL/_ml/data_frame/analytics/_preview\"" - - language: Java - code: | - client.ml().previewDataFrameAnalytics(p -> p - .config(c -> c - .source(s -> s - .index("houses_sold_last_10_yrs") - ) - .analysis(a -> a - .regression(r -> r - .dependentVariable("price") - ) - ) - ) - ); diff --git a/specification/ml/preview_datafeed/examples/request/MlPreviewDatafeedExample1.yaml b/specification/ml/preview_datafeed/examples/request/MlPreviewDatafeedExample1.yaml index 27b7fa8c00..59b54791fa 100644 --- a/specification/ml/preview_datafeed/examples/request/MlPreviewDatafeedExample1.yaml +++ b/specification/ml/preview_datafeed/examples/request/MlPreviewDatafeedExample1.yaml @@ -1,30 +1 @@ method_request: GET _ml/datafeeds/datafeed-high_sum_total_sales/_preview -alternatives: - - language: Python - code: |- - resp = client.ml.preview_datafeed( - datafeed_id="datafeed-high_sum_total_sales", - ) - - language: JavaScript - code: |- - const response = await client.ml.previewDatafeed({ - datafeed_id: "datafeed-high_sum_total_sales", - }); - - language: Ruby - code: |- - response = client.ml.preview_datafeed( - datafeed_id: "datafeed-high_sum_total_sales" - ) - - language: PHP - code: |- - $resp = $client->ml()->previewDatafeed([ - "datafeed_id" => "datafeed-high_sum_total_sales", - ]); - - language: curl - code: 'curl -X GET -H "Authorization: ApiKey $ELASTIC_API_KEY" - "$ELASTICSEARCH_URL/_ml/datafeeds/datafeed-high_sum_total_sales/_preview"' - - language: Java - code: | - client.ml().previewDatafeed(p -> p - .datafeedId("datafeed-high_sum_total_sales") - ); diff --git a/specification/ml/put_calendar/examples/request/MlPutCalendarExample1.yaml b/specification/ml/put_calendar/examples/request/MlPutCalendarExample1.yaml index b2cdb84a0e..a566a5aaca 100644 --- a/specification/ml/put_calendar/examples/request/MlPutCalendarExample1.yaml +++ b/specification/ml/put_calendar/examples/request/MlPutCalendarExample1.yaml @@ -1,29 +1 @@ method_request: PUT _ml/calendars/planned-outages -alternatives: - - language: Python - code: |- - resp = client.ml.put_calendar( - calendar_id="planned-outages", - ) - - language: JavaScript - code: |- - const response = await client.ml.putCalendar({ - calendar_id: "planned-outages", - }); - - language: Ruby - code: |- - response = client.ml.put_calendar( - calendar_id: "planned-outages" - ) - - language: PHP - code: |- - $resp = $client->ml()->putCalendar([ - "calendar_id" => "planned-outages", - ]); - - language: curl - code: 'curl -X PUT -H "Authorization: ApiKey $ELASTIC_API_KEY" "$ELASTICSEARCH_URL/_ml/calendars/planned-outages"' - - language: Java - code: | - client.ml().putCalendar(p -> p - .calendarId("planned-outages") - ); diff --git a/specification/ml/put_calendar_job/examples/request/MlPutCalendarJobExample1.yaml b/specification/ml/put_calendar_job/examples/request/MlPutCalendarJobExample1.yaml index 76c7799291..d380156208 100644 --- a/specification/ml/put_calendar_job/examples/request/MlPutCalendarJobExample1.yaml +++ b/specification/ml/put_calendar_job/examples/request/MlPutCalendarJobExample1.yaml @@ -1,35 +1 @@ method_request: PUT _ml/calendars/planned-outages/jobs/total-requests -alternatives: - - language: Python - code: |- - resp = client.ml.put_calendar_job( - calendar_id="planned-outages", - job_id="total-requests", - ) - - language: JavaScript - code: |- - const response = await client.ml.putCalendarJob({ - calendar_id: "planned-outages", - job_id: "total-requests", - }); - - language: Ruby - code: |- - response = client.ml.put_calendar_job( - calendar_id: "planned-outages", - job_id: "total-requests" - ) - - language: PHP - code: |- - $resp = $client->ml()->putCalendarJob([ - "calendar_id" => "planned-outages", - "job_id" => "total-requests", - ]); - - language: curl - code: 'curl -X PUT -H "Authorization: ApiKey $ELASTIC_API_KEY" - "$ELASTICSEARCH_URL/_ml/calendars/planned-outages/jobs/total-requests"' - - language: Java - code: | - client.ml().putCalendarJob(p -> p - .calendarId("planned-outages") - .jobId("total-requests") - ); diff --git a/specification/ml/put_data_frame_analytics/examples/request/MlPutDataFrameAnalyticsExample1.yaml b/specification/ml/put_data_frame_analytics/examples/request/MlPutDataFrameAnalyticsExample1.yaml index a6de4ea357..266d059d4c 100644 --- a/specification/ml/put_data_frame_analytics/examples/request/MlPutDataFrameAnalyticsExample1.yaml +++ b/specification/ml/put_data_frame_analytics/examples/request/MlPutDataFrameAnalyticsExample1.yaml @@ -39,208 +39,3 @@ value: |- }, "model_memory_limit": "100mb" } -alternatives: - - language: Python - code: |- - resp = client.ml.put_data_frame_analytics( - id="model-flight-delays-pre", - source={ - "index": [ - "kibana_sample_data_flights" - ], - "query": { - "range": { - "DistanceKilometers": { - "gt": 0 - } - } - }, - "_source": { - "includes": [], - "excludes": [ - "FlightDelay", - "FlightDelayType" - ] - } - }, - dest={ - "index": "df-flight-delays", - "results_field": "ml-results" - }, - analysis={ - "regression": { - "dependent_variable": "FlightDelayMin", - "training_percent": 90 - } - }, - analyzed_fields={ - "includes": [], - "excludes": [ - "FlightNum" - ] - }, - model_memory_limit="100mb", - ) - - language: JavaScript - code: |- - const response = await client.ml.putDataFrameAnalytics({ - id: "model-flight-delays-pre", - source: { - index: ["kibana_sample_data_flights"], - query: { - range: { - DistanceKilometers: { - gt: 0, - }, - }, - }, - _source: { - includes: [], - excludes: ["FlightDelay", "FlightDelayType"], - }, - }, - dest: { - index: "df-flight-delays", - results_field: "ml-results", - }, - analysis: { - regression: { - dependent_variable: "FlightDelayMin", - training_percent: 90, - }, - }, - analyzed_fields: { - includes: [], - excludes: ["FlightNum"], - }, - model_memory_limit: "100mb", - }); - - language: Ruby - code: |- - response = client.ml.put_data_frame_analytics( - id: "model-flight-delays-pre", - body: { - "source": { - "index": [ - "kibana_sample_data_flights" - ], - "query": { - "range": { - "DistanceKilometers": { - "gt": 0 - } - } - }, - "_source": { - "includes": [], - "excludes": [ - "FlightDelay", - "FlightDelayType" - ] - } - }, - "dest": { - "index": "df-flight-delays", - "results_field": "ml-results" - }, - "analysis": { - "regression": { - "dependent_variable": "FlightDelayMin", - "training_percent": 90 - } - }, - "analyzed_fields": { - "includes": [], - "excludes": [ - "FlightNum" - ] - }, - "model_memory_limit": "100mb" - } - ) - - language: PHP - code: |- - $resp = $client->ml()->putDataFrameAnalytics([ - "id" => "model-flight-delays-pre", - "body" => [ - "source" => [ - "index" => array( - "kibana_sample_data_flights", - ), - "query" => [ - "range" => [ - "DistanceKilometers" => [ - "gt" => 0, - ], - ], - ], - "_source" => [ - "includes" => array( - ), - "excludes" => array( - "FlightDelay", - "FlightDelayType", - ), - ], - ], - "dest" => [ - "index" => "df-flight-delays", - "results_field" => "ml-results", - ], - "analysis" => [ - "regression" => [ - "dependent_variable" => "FlightDelayMin", - "training_percent" => 90, - ], - ], - "analyzed_fields" => [ - "includes" => array( - ), - "excludes" => array( - "FlightNum", - ), - ], - "model_memory_limit" => "100mb", - ], - ]); - - language: curl - code: - "curl -X PUT -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d - '{\"source\":{\"index\":[\"kibana_sample_data_flights\"],\"query\":{\"range\":{\"DistanceKilometers\":{\"gt\":0}}},\"_source\ - \":{\"includes\":[],\"excludes\":[\"FlightDelay\",\"FlightDelayType\"]}},\"dest\":{\"index\":\"df-flight-delays\",\"results_f\ - ield\":\"ml-results\"},\"analysis\":{\"regression\":{\"dependent_variable\":\"FlightDelayMin\",\"training_percent\":90}},\"an\ - alyzed_fields\":{\"includes\":[],\"excludes\":[\"FlightNum\"]},\"model_memory_limit\":\"100mb\"}' - \"$ELASTICSEARCH_URL/_ml/data_frame/analytics/model-flight-delays-pre\"" - - language: Java - code: | - client.ml().putDataFrameAnalytics(p -> p - .analysis(a -> a - .regression(r -> r - .dependentVariable("FlightDelayMin") - .trainingPercent("90") - ) - ) - .analyzedFields(an -> an - .excludes("FlightNum") - ) - .dest(d -> d - .index("df-flight-delays") - .resultsField("ml-results") - ) - .id("model-flight-delays-pre") - .modelMemoryLimit("100mb") - .source(s -> s - .index("kibana_sample_data_flights") - .query(q -> q - .range(r -> r - .untyped(u -> u - .field("DistanceKilometers") - .gt(JsonData.fromJson("0")) - ) - ) - ) - .source(so -> so - .excludes(List.of("FlightDelay","FlightDelayType")) - ) - ) - ); diff --git a/specification/ml/put_datafeed/examples/request/MlPutDatafeedExample1.yaml b/specification/ml/put_datafeed/examples/request/MlPutDatafeedExample1.yaml index 200ffb07fb..8dcb37a8b2 100644 --- a/specification/ml/put_datafeed/examples/request/MlPutDatafeedExample1.yaml +++ b/specification/ml/put_datafeed/examples/request/MlPutDatafeedExample1.yaml @@ -16,89 +16,3 @@ value: |- }, "job_id": "test-job" } -alternatives: - - language: Python - code: |- - resp = client.ml.put_datafeed( - datafeed_id="datafeed-test-job", - pretty=True, - indices=[ - "kibana_sample_data_logs" - ], - query={ - "bool": { - "must": [ - { - "match_all": {} - } - ] - } - }, - job_id="test-job", - ) - - language: JavaScript - code: |- - const response = await client.ml.putDatafeed({ - datafeed_id: "datafeed-test-job", - pretty: "true", - indices: ["kibana_sample_data_logs"], - query: { - bool: { - must: [ - { - match_all: {}, - }, - ], - }, - }, - job_id: "test-job", - }); - - language: Ruby - code: |- - response = client.ml.put_datafeed( - datafeed_id: "datafeed-test-job", - pretty: "true", - body: { - "indices": [ - "kibana_sample_data_logs" - ], - "query": { - "bool": { - "must": [ - { - "match_all": {} - } - ] - } - }, - "job_id": "test-job" - } - ) - - language: PHP - code: |- - $resp = $client->ml()->putDatafeed([ - "datafeed_id" => "datafeed-test-job", - "pretty" => "true", - "body" => [ - "indices" => array( - "kibana_sample_data_logs", - ), - "query" => [ - "bool" => [ - "must" => array( - [ - "match_all" => new ArrayObject([]), - ], - ), - ], - ], - "job_id" => "test-job", - ], - ]); - - language: curl - code: - 'curl -X PUT -H "Authorization: ApiKey $ELASTIC_API_KEY" -H "Content-Type: application/json" -d - ''{"indices":["kibana_sample_data_logs"],"query":{"bool":{"must":[{"match_all":{}}]}},"job_id":"test-job"}'' - "$ELASTICSEARCH_URL/_ml/datafeeds/datafeed-test-job?pretty"' - - language: Java - code: "\n" diff --git a/specification/ml/put_filter/examples/request/MlPutFilterExample1.yaml b/specification/ml/put_filter/examples/request/MlPutFilterExample1.yaml index babb5c8d0e..36a56f9989 100644 --- a/specification/ml/put_filter/examples/request/MlPutFilterExample1.yaml +++ b/specification/ml/put_filter/examples/request/MlPutFilterExample1.yaml @@ -5,56 +5,3 @@ value: |- "description": "A list of safe domains", "items": ["*.google.com", "wikipedia.org"] } -alternatives: - - language: Python - code: |- - resp = client.ml.put_filter( - filter_id="safe_domains", - description="A list of safe domains", - items=[ - "*.google.com", - "wikipedia.org" - ], - ) - - language: JavaScript - code: |- - const response = await client.ml.putFilter({ - filter_id: "safe_domains", - description: "A list of safe domains", - items: ["*.google.com", "wikipedia.org"], - }); - - language: Ruby - code: |- - response = client.ml.put_filter( - filter_id: "safe_domains", - body: { - "description": "A list of safe domains", - "items": [ - "*.google.com", - "wikipedia.org" - ] - } - ) - - language: PHP - code: |- - $resp = $client->ml()->putFilter([ - "filter_id" => "safe_domains", - "body" => [ - "description" => "A list of safe domains", - "items" => array( - "*.google.com", - "wikipedia.org", - ), - ], - ]); - - language: curl - code: - 'curl -X PUT -H "Authorization: ApiKey $ELASTIC_API_KEY" -H "Content-Type: application/json" -d ''{"description":"A list - of safe domains","items":["*.google.com","wikipedia.org"]}'' "$ELASTICSEARCH_URL/_ml/filters/safe_domains"' - - language: Java - code: | - client.ml().putFilter(p -> p - .description("A list of safe domains") - .filterId("safe_domains") - .items(List.of("*.google.com","wikipedia.org")) - ); diff --git a/specification/ml/put_job/examples/request/MlPutJobRequestExample1.yaml b/specification/ml/put_job/examples/request/MlPutJobRequestExample1.yaml index 6286e08954..8de6bccc91 100644 --- a/specification/ml/put_job/examples/request/MlPutJobRequestExample1.yaml +++ b/specification/ml/put_job/examples/request/MlPutJobRequestExample1.yaml @@ -30,262 +30,3 @@ value: script: source: "emit(doc['timestamp'].value.getHour());" datafeed_id: datafeed-test-job1 -alternatives: - - language: Python - code: |- - resp = client.ml.put_job( - job_id="job-01", - analysis_config={ - "bucket_span": "15m", - "detectors": [ - { - "detector_description": "Sum of bytes", - "function": "sum", - "field_name": "bytes" - } - ] - }, - data_description={ - "time_field": "timestamp", - "time_format": "epoch_ms" - }, - analysis_limits={ - "model_memory_limit": "11MB" - }, - model_plot_config={ - "enabled": True, - "annotations_enabled": True - }, - results_index_name="test-job1", - datafeed_config={ - "indices": [ - "kibana_sample_data_logs" - ], - "query": { - "bool": { - "must": [ - { - "match_all": {} - } - ] - } - }, - "runtime_mappings": { - "hour_of_day": { - "type": "long", - "script": { - "source": "emit(doc['timestamp'].value.getHour());" - } - } - }, - "datafeed_id": "datafeed-test-job1" - }, - ) - - language: JavaScript - code: |- - const response = await client.ml.putJob({ - job_id: "job-01", - analysis_config: { - bucket_span: "15m", - detectors: [ - { - detector_description: "Sum of bytes", - function: "sum", - field_name: "bytes", - }, - ], - }, - data_description: { - time_field: "timestamp", - time_format: "epoch_ms", - }, - analysis_limits: { - model_memory_limit: "11MB", - }, - model_plot_config: { - enabled: true, - annotations_enabled: true, - }, - results_index_name: "test-job1", - datafeed_config: { - indices: ["kibana_sample_data_logs"], - query: { - bool: { - must: [ - { - match_all: {}, - }, - ], - }, - }, - runtime_mappings: { - hour_of_day: { - type: "long", - script: { - source: "emit(doc['timestamp'].value.getHour());", - }, - }, - }, - datafeed_id: "datafeed-test-job1", - }, - }); - - language: Ruby - code: |- - response = client.ml.put_job( - job_id: "job-01", - body: { - "analysis_config": { - "bucket_span": "15m", - "detectors": [ - { - "detector_description": "Sum of bytes", - "function": "sum", - "field_name": "bytes" - } - ] - }, - "data_description": { - "time_field": "timestamp", - "time_format": "epoch_ms" - }, - "analysis_limits": { - "model_memory_limit": "11MB" - }, - "model_plot_config": { - "enabled": true, - "annotations_enabled": true - }, - "results_index_name": "test-job1", - "datafeed_config": { - "indices": [ - "kibana_sample_data_logs" - ], - "query": { - "bool": { - "must": [ - { - "match_all": {} - } - ] - } - }, - "runtime_mappings": { - "hour_of_day": { - "type": "long", - "script": { - "source": "emit(doc['timestamp'].value.getHour());" - } - } - }, - "datafeed_id": "datafeed-test-job1" - } - } - ) - - language: PHP - code: |- - $resp = $client->ml()->putJob([ - "job_id" => "job-01", - "body" => [ - "analysis_config" => [ - "bucket_span" => "15m", - "detectors" => array( - [ - "detector_description" => "Sum of bytes", - "function" => "sum", - "field_name" => "bytes", - ], - ), - ], - "data_description" => [ - "time_field" => "timestamp", - "time_format" => "epoch_ms", - ], - "analysis_limits" => [ - "model_memory_limit" => "11MB", - ], - "model_plot_config" => [ - "enabled" => true, - "annotations_enabled" => true, - ], - "results_index_name" => "test-job1", - "datafeed_config" => [ - "indices" => array( - "kibana_sample_data_logs", - ), - "query" => [ - "bool" => [ - "must" => array( - [ - "match_all" => new ArrayObject([]), - ], - ), - ], - ], - "runtime_mappings" => [ - "hour_of_day" => [ - "type" => "long", - "script" => [ - "source" => "emit(doc['timestamp'].value.getHour());", - ], - ], - ], - "datafeed_id" => "datafeed-test-job1", - ], - ], - ]); - - language: curl - code: - "curl -X PUT -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d - '{\"analysis_config\":{\"bucket_span\":\"15m\",\"detectors\":[{\"detector_description\":\"Sum of - bytes\",\"function\":\"sum\",\"field_name\":\"bytes\"}]},\"data_description\":{\"time_field\":\"timestamp\",\"time_format\":\ - \"epoch_ms\"},\"analysis_limits\":{\"model_memory_limit\":\"11MB\"},\"model_plot_config\":{\"enabled\":true,\"annotations_ena\ - bled\":true},\"results_index_name\":\"test-job1\",\"datafeed_config\":{\"indices\":[\"kibana_sample_data_logs\"],\"query\":{\ - \"bool\":{\"must\":[{\"match_all\":{}}]}},\"runtime_mappings\":{\"hour_of_day\":{\"type\":\"long\",\"script\":{\"source\":\"e\ - mit(doc['\"'\"'timestamp'\"'\"'].value.getHour());\"}}},\"datafeed_id\":\"datafeed-test-job1\"}}' - \"$ELASTICSEARCH_URL/_ml/anomaly_detectors/job-01\"" - - language: Java - code: | - client.ml().putJob(p -> p - .analysisConfig(a -> a - .bucketSpan(b -> b - .time("15m") - ) - .detectors(d -> d - .detectorDescription("Sum of bytes") - .fieldName("bytes") - .function("sum") - ) - ) - .analysisLimits(an -> an - .modelMemoryLimit("11MB") - ) - .dataDescription(d -> d - .timeField("timestamp") - .timeFormat("epoch_ms") - ) - .datafeedConfig(d -> d - .datafeedId("datafeed-test-job1") - .indices("kibana_sample_data_logs") - .query(q -> q - .bool(b -> b - .must(m -> m - .matchAll(ma -> ma) - ) - ) - ) - .runtimeMappings("hour_of_day", r -> r - .script(s -> s - .source(so -> so - .scriptString("emit(doc['timestamp'].value.getHour());") - ) - ) - .type(RuntimeFieldType.Long) - ) - ) - .jobId("job-01") - .modelPlotConfig(m -> m - .annotationsEnabled(true) - .enabled(true) - ) - .resultsIndexName("test-job1") - ); diff --git a/specification/ml/put_trained_model_alias/examples/request/MlPutTrainedModelAliasExample1.yaml b/specification/ml/put_trained_model_alias/examples/request/MlPutTrainedModelAliasExample1.yaml index 2f4ef07310..50b8336929 100644 --- a/specification/ml/put_trained_model_alias/examples/request/MlPutTrainedModelAliasExample1.yaml +++ b/specification/ml/put_trained_model_alias/examples/request/MlPutTrainedModelAliasExample1.yaml @@ -1,35 +1 @@ method_request: PUT _ml/trained_models/flight-delay-prediction-1574775339910/model_aliases/flight_delay_model -alternatives: - - language: Python - code: |- - resp = client.ml.put_trained_model_alias( - model_id="flight-delay-prediction-1574775339910", - model_alias="flight_delay_model", - ) - - language: JavaScript - code: |- - const response = await client.ml.putTrainedModelAlias({ - model_id: "flight-delay-prediction-1574775339910", - model_alias: "flight_delay_model", - }); - - language: Ruby - code: |- - response = client.ml.put_trained_model_alias( - model_id: "flight-delay-prediction-1574775339910", - model_alias: "flight_delay_model" - ) - - language: PHP - code: |- - $resp = $client->ml()->putTrainedModelAlias([ - "model_id" => "flight-delay-prediction-1574775339910", - "model_alias" => "flight_delay_model", - ]); - - language: curl - code: 'curl -X PUT -H "Authorization: ApiKey $ELASTIC_API_KEY" - "$ELASTICSEARCH_URL/_ml/trained_models/flight-delay-prediction-1574775339910/model_aliases/flight_delay_model"' - - language: Java - code: | - client.ml().putTrainedModelAlias(p -> p - .modelAlias("flight_delay_model") - .modelId("flight-delay-prediction-1574775339910") - ); diff --git a/specification/ml/put_trained_model_definition_part/examples/request/MlPutTrainedModelDefinitionPartExample1.yaml b/specification/ml/put_trained_model_definition_part/examples/request/MlPutTrainedModelDefinitionPartExample1.yaml index d9868bc8d4..e3ee1da7db 100644 --- a/specification/ml/put_trained_model_definition_part/examples/request/MlPutTrainedModelDefinitionPartExample1.yaml +++ b/specification/ml/put_trained_model_definition_part/examples/request/MlPutTrainedModelDefinitionPartExample1.yaml @@ -6,49 +6,3 @@ value: |- "total_definition_length": 265632637, "total_parts": 64 } -alternatives: - - language: Python - code: |- - resp = client.ml.put_trained_model_definition_part( - model_id="elastic__distilbert-base-uncased-finetuned-conll03-english", - part="0", - definition="...", - total_definition_length=265632637, - total_parts=64, - ) - - language: JavaScript - code: |- - const response = await client.ml.putTrainedModelDefinitionPart({ - model_id: "elastic__distilbert-base-uncased-finetuned-conll03-english", - part: 0, - definition: "...", - total_definition_length: 265632637, - total_parts: 64, - }); - - language: Ruby - code: |- - response = client.ml.put_trained_model_definition_part( - model_id: "elastic__distilbert-base-uncased-finetuned-conll03-english", - part: "0", - body: { - "definition": "...", - "total_definition_length": 265632637, - "total_parts": 64 - } - ) - - language: PHP - code: |- - $resp = $client->ml()->putTrainedModelDefinitionPart([ - "model_id" => "elastic__distilbert-base-uncased-finetuned-conll03-english", - "part" => "0", - "body" => [ - "definition" => "...", - "total_definition_length" => 265632637, - "total_parts" => 64, - ], - ]); - - language: curl - code: - 'curl -X PUT -H "Authorization: ApiKey $ELASTIC_API_KEY" -H "Content-Type: application/json" -d - ''{"definition":"...","total_definition_length":265632637,"total_parts":64}'' - "$ELASTICSEARCH_URL/_ml/trained_models/elastic__distilbert-base-uncased-finetuned-conll03-english/definition/0"' diff --git a/specification/ml/put_trained_model_vocabulary/examples/request/MlPutTrainedModelVocabularyExample1.yaml b/specification/ml/put_trained_model_vocabulary/examples/request/MlPutTrainedModelVocabularyExample1.yaml index 2b49aef59c..8dc57715c9 100644 --- a/specification/ml/put_trained_model_vocabulary/examples/request/MlPutTrainedModelVocabularyExample1.yaml +++ b/specification/ml/put_trained_model_vocabulary/examples/request/MlPutTrainedModelVocabularyExample1.yaml @@ -7,52 +7,3 @@ value: |- "[unused0]", ] } -alternatives: - - language: Python - code: |- - resp = client.ml.put_trained_model_vocabulary( - model_id="elastic__distilbert-base-uncased-finetuned-conll03-english", - vocabulary=[ - "[PAD]", - "[unused0]" - ], - ) - - language: JavaScript - code: |- - const response = await client.ml.putTrainedModelVocabulary({ - model_id: "elastic__distilbert-base-uncased-finetuned-conll03-english", - vocabulary: ["[PAD]", "[unused0]"], - }); - - language: Ruby - code: |- - response = client.ml.put_trained_model_vocabulary( - model_id: "elastic__distilbert-base-uncased-finetuned-conll03-english", - body: { - "vocabulary": [ - "[PAD]", - "[unused0]" - ] - } - ) - - language: PHP - code: |- - $resp = $client->ml()->putTrainedModelVocabulary([ - "model_id" => "elastic__distilbert-base-uncased-finetuned-conll03-english", - "body" => [ - "vocabulary" => array( - "[PAD]", - "[unused0]", - ), - ], - ]); - - language: curl - code: - 'curl -X PUT -H "Authorization: ApiKey $ELASTIC_API_KEY" -H "Content-Type: application/json" -d - ''{"vocabulary":["[PAD]","[unused0]"]}'' - "$ELASTICSEARCH_URL/_ml/trained_models/elastic__distilbert-base-uncased-finetuned-conll03-english/vocabulary"' - - language: Java - code: | - client.ml().putTrainedModelVocabulary(p -> p - .modelId("elastic__distilbert-base-uncased-finetuned-conll03-english") - .vocabulary(List.of("[PAD]","[unused0]")) - ); diff --git a/specification/ml/reset_job/examples/request/MlResetJobExample1.yaml b/specification/ml/reset_job/examples/request/MlResetJobExample1.yaml index 3cf918505d..60909463d9 100644 --- a/specification/ml/reset_job/examples/request/MlResetJobExample1.yaml +++ b/specification/ml/reset_job/examples/request/MlResetJobExample1.yaml @@ -1,29 +1 @@ method_request: POST _ml/anomaly_detectors/total-requests/_reset -alternatives: - - language: Python - code: |- - resp = client.ml.reset_job( - job_id="total-requests", - ) - - language: JavaScript - code: |- - const response = await client.ml.resetJob({ - job_id: "total-requests", - }); - - language: Ruby - code: |- - response = client.ml.reset_job( - job_id: "total-requests" - ) - - language: PHP - code: |- - $resp = $client->ml()->resetJob([ - "job_id" => "total-requests", - ]); - - language: curl - code: 'curl -X POST -H "Authorization: ApiKey $ELASTIC_API_KEY" "$ELASTICSEARCH_URL/_ml/anomaly_detectors/total-requests/_reset"' - - language: Java - code: | - client.ml().resetJob(r -> r - .jobId("total-requests") - ); diff --git a/specification/ml/revert_model_snapshot/examples/request/MlRevertModelSnapshotExample1.yaml b/specification/ml/revert_model_snapshot/examples/request/MlRevertModelSnapshotExample1.yaml index 42625ed27c..be5b441ba5 100644 --- a/specification/ml/revert_model_snapshot/examples/request/MlRevertModelSnapshotExample1.yaml +++ b/specification/ml/revert_model_snapshot/examples/request/MlRevertModelSnapshotExample1.yaml @@ -4,48 +4,3 @@ value: |- { "delete_intervening_results": true } -alternatives: - - language: Python - code: |- - resp = client.ml.revert_model_snapshot( - job_id="low_request_rate", - snapshot_id="1637092688", - delete_intervening_results=True, - ) - - language: JavaScript - code: |- - const response = await client.ml.revertModelSnapshot({ - job_id: "low_request_rate", - snapshot_id: 1637092688, - delete_intervening_results: true, - }); - - language: Ruby - code: |- - response = client.ml.revert_model_snapshot( - job_id: "low_request_rate", - snapshot_id: "1637092688", - body: { - "delete_intervening_results": true - } - ) - - language: PHP - code: |- - $resp = $client->ml()->revertModelSnapshot([ - "job_id" => "low_request_rate", - "snapshot_id" => "1637092688", - "body" => [ - "delete_intervening_results" => true, - ], - ]); - - language: curl - code: - 'curl -X POST -H "Authorization: ApiKey $ELASTIC_API_KEY" -H "Content-Type: application/json" -d - ''{"delete_intervening_results":true}'' - "$ELASTICSEARCH_URL/_ml/anomaly_detectors/low_request_rate/model_snapshots/1637092688/_revert"' - - language: Java - code: | - client.ml().revertModelSnapshot(r -> r - .deleteInterveningResults(true) - .jobId("low_request_rate") - .snapshotId("1637092688") - ); diff --git a/specification/ml/set_upgrade_mode/examples/request/MlSetUpgradeModeExample1.yaml b/specification/ml/set_upgrade_mode/examples/request/MlSetUpgradeModeExample1.yaml index 1c1ccf52e9..e17ca2f2a5 100644 --- a/specification/ml/set_upgrade_mode/examples/request/MlSetUpgradeModeExample1.yaml +++ b/specification/ml/set_upgrade_mode/examples/request/MlSetUpgradeModeExample1.yaml @@ -1,29 +1 @@ method_request: POST _ml/set_upgrade_mode?enabled=true -alternatives: - - language: Python - code: |- - resp = client.ml.set_upgrade_mode( - enabled=True, - ) - - language: JavaScript - code: |- - const response = await client.ml.setUpgradeMode({ - enabled: "true", - }); - - language: Ruby - code: |- - response = client.ml.set_upgrade_mode( - enabled: "true" - ) - - language: PHP - code: |- - $resp = $client->ml()->setUpgradeMode([ - "enabled" => "true", - ]); - - language: curl - code: 'curl -X POST -H "Authorization: ApiKey $ELASTIC_API_KEY" "$ELASTICSEARCH_URL/_ml/set_upgrade_mode?enabled=true"' - - language: Java - code: | - client.ml().setUpgradeMode(s -> s - .enabled(true) - ); diff --git a/specification/ml/start_data_frame_analytics/examples/request/MlStartDataFrameAnalyticsExample1.yaml b/specification/ml/start_data_frame_analytics/examples/request/MlStartDataFrameAnalyticsExample1.yaml index afddbc3879..74653e7a8b 100644 --- a/specification/ml/start_data_frame_analytics/examples/request/MlStartDataFrameAnalyticsExample1.yaml +++ b/specification/ml/start_data_frame_analytics/examples/request/MlStartDataFrameAnalyticsExample1.yaml @@ -1,29 +1 @@ method_request: POST _ml/data_frame/analytics/loganalytics/_start -alternatives: - - language: Python - code: |- - resp = client.ml.start_data_frame_analytics( - id="loganalytics", - ) - - language: JavaScript - code: |- - const response = await client.ml.startDataFrameAnalytics({ - id: "loganalytics", - }); - - language: Ruby - code: |- - response = client.ml.start_data_frame_analytics( - id: "loganalytics" - ) - - language: PHP - code: |- - $resp = $client->ml()->startDataFrameAnalytics([ - "id" => "loganalytics", - ]); - - language: curl - code: 'curl -X POST -H "Authorization: ApiKey $ELASTIC_API_KEY" "$ELASTICSEARCH_URL/_ml/data_frame/analytics/loganalytics/_start"' - - language: Java - code: | - client.ml().startDataFrameAnalytics(s -> s - .id("loganalytics") - ); diff --git a/specification/ml/start_datafeed/examples/request/MlStartDatafeedExample1.yaml b/specification/ml/start_datafeed/examples/request/MlStartDatafeedExample1.yaml index 5300ae37df..561f5e64cc 100644 --- a/specification/ml/start_datafeed/examples/request/MlStartDatafeedExample1.yaml +++ b/specification/ml/start_datafeed/examples/request/MlStartDatafeedExample1.yaml @@ -4,42 +4,3 @@ value: |- { "start": "2019-04-07T18:22:16Z" } -alternatives: - - language: Python - code: |- - resp = client.ml.start_datafeed( - datafeed_id="datafeed-low_request_rate", - start="2019-04-07T18:22:16Z", - ) - - language: JavaScript - code: |- - const response = await client.ml.startDatafeed({ - datafeed_id: "datafeed-low_request_rate", - start: "2019-04-07T18:22:16Z", - }); - - language: Ruby - code: |- - response = client.ml.start_datafeed( - datafeed_id: "datafeed-low_request_rate", - body: { - "start": "2019-04-07T18:22:16Z" - } - ) - - language: PHP - code: |- - $resp = $client->ml()->startDatafeed([ - "datafeed_id" => "datafeed-low_request_rate", - "body" => [ - "start" => "2019-04-07T18:22:16Z", - ], - ]); - - language: curl - code: - 'curl -X POST -H "Authorization: ApiKey $ELASTIC_API_KEY" -H "Content-Type: application/json" -d - ''{"start":"2019-04-07T18:22:16Z"}'' "$ELASTICSEARCH_URL/_ml/datafeeds/datafeed-low_request_rate/_start"' - - language: Java - code: | - client.ml().startDatafeed(s -> s - .datafeedId("datafeed-low_request_rate") - .start(DateTime.of("2019-04-07T18:22:16Z")) - ); diff --git a/specification/ml/start_trained_model_deployment/examples/request/MlStartTrainedModelDeploymentExample1.yaml b/specification/ml/start_trained_model_deployment/examples/request/MlStartTrainedModelDeploymentExample1.yaml index 332e4d4f05..bde8ed0c79 100644 --- a/specification/ml/start_trained_model_deployment/examples/request/MlStartTrainedModelDeploymentExample1.yaml +++ b/specification/ml/start_trained_model_deployment/examples/request/MlStartTrainedModelDeploymentExample1.yaml @@ -1,42 +1 @@ method_request: POST _ml/trained_models/elastic__distilbert-base-uncased-finetuned-conll03-english/deployment/_start?wait_for=started&timeout=1m -alternatives: - - language: Python - code: |- - resp = client.ml.start_trained_model_deployment( - model_id="elastic__distilbert-base-uncased-finetuned-conll03-english", - wait_for="started", - timeout="1m", - ) - - language: JavaScript - code: |- - const response = await client.ml.startTrainedModelDeployment({ - model_id: "elastic__distilbert-base-uncased-finetuned-conll03-english", - wait_for: "started", - timeout: "1m", - }); - - language: Ruby - code: |- - response = client.ml.start_trained_model_deployment( - model_id: "elastic__distilbert-base-uncased-finetuned-conll03-english", - wait_for: "started", - timeout: "1m" - ) - - language: PHP - code: |- - $resp = $client->ml()->startTrainedModelDeployment([ - "model_id" => "elastic__distilbert-base-uncased-finetuned-conll03-english", - "wait_for" => "started", - "timeout" => "1m", - ]); - - language: curl - code: 'curl -X POST -H "Authorization: ApiKey $ELASTIC_API_KEY" - "$ELASTICSEARCH_URL/_ml/trained_models/elastic__distilbert-base-uncased-finetuned-conll03-english/deployment/_start?wait_for=started&timeout=1m"' - - language: Java - code: | - client.ml().startTrainedModelDeployment(s -> s - .modelId("elastic__distilbert-base-uncased-finetuned-conll03-english") - .timeout(t -> t - .offset(1) - ) - .waitFor(DeploymentAllocationState.Started) - ); diff --git a/specification/ml/stop_data_frame_analytics/examples/request/MlStopDataFrameAnalyticsExample1.yaml b/specification/ml/stop_data_frame_analytics/examples/request/MlStopDataFrameAnalyticsExample1.yaml index b590e4da49..819d809f82 100644 --- a/specification/ml/stop_data_frame_analytics/examples/request/MlStopDataFrameAnalyticsExample1.yaml +++ b/specification/ml/stop_data_frame_analytics/examples/request/MlStopDataFrameAnalyticsExample1.yaml @@ -1,29 +1 @@ method_request: POST _ml/data_frame/analytics/loganalytics/_stop -alternatives: - - language: Python - code: |- - resp = client.ml.stop_data_frame_analytics( - id="loganalytics", - ) - - language: JavaScript - code: |- - const response = await client.ml.stopDataFrameAnalytics({ - id: "loganalytics", - }); - - language: Ruby - code: |- - response = client.ml.stop_data_frame_analytics( - id: "loganalytics" - ) - - language: PHP - code: |- - $resp = $client->ml()->stopDataFrameAnalytics([ - "id" => "loganalytics", - ]); - - language: curl - code: 'curl -X POST -H "Authorization: ApiKey $ELASTIC_API_KEY" "$ELASTICSEARCH_URL/_ml/data_frame/analytics/loganalytics/_stop"' - - language: Java - code: | - client.ml().stopDataFrameAnalytics(s -> s - .id("loganalytics") - ); diff --git a/specification/ml/stop_datafeed/examples/request/MlStopDatafeedExample1.yaml b/specification/ml/stop_datafeed/examples/request/MlStopDatafeedExample1.yaml index 66212f8738..e13b090a8a 100644 --- a/specification/ml/stop_datafeed/examples/request/MlStopDatafeedExample1.yaml +++ b/specification/ml/stop_datafeed/examples/request/MlStopDatafeedExample1.yaml @@ -4,44 +4,3 @@ value: |- { "timeout": "30s" } -alternatives: - - language: Python - code: |- - resp = client.ml.stop_datafeed( - datafeed_id="datafeed-low_request_rate", - timeout="30s", - ) - - language: JavaScript - code: |- - const response = await client.ml.stopDatafeed({ - datafeed_id: "datafeed-low_request_rate", - timeout: "30s", - }); - - language: Ruby - code: |- - response = client.ml.stop_datafeed( - datafeed_id: "datafeed-low_request_rate", - body: { - "timeout": "30s" - } - ) - - language: PHP - code: |- - $resp = $client->ml()->stopDatafeed([ - "datafeed_id" => "datafeed-low_request_rate", - "body" => [ - "timeout" => "30s", - ], - ]); - - language: curl - code: - 'curl -X POST -H "Authorization: ApiKey $ELASTIC_API_KEY" -H "Content-Type: application/json" -d ''{"timeout":"30s"}'' - "$ELASTICSEARCH_URL/_ml/datafeeds/datafeed-low_request_rate/_stop"' - - language: Java - code: | - client.ml().stopDatafeed(s -> s - .datafeedId("datafeed-low_request_rate") - .timeout(t -> t - .time("30s") - ) - ); diff --git a/specification/ml/stop_trained_model_deployment/examples/request/MlStopTrainedModelDeploymentExample1.yaml b/specification/ml/stop_trained_model_deployment/examples/request/MlStopTrainedModelDeploymentExample1.yaml index 1aa14e12e8..74d933d369 100644 --- a/specification/ml/stop_trained_model_deployment/examples/request/MlStopTrainedModelDeploymentExample1.yaml +++ b/specification/ml/stop_trained_model_deployment/examples/request/MlStopTrainedModelDeploymentExample1.yaml @@ -1,30 +1 @@ method_request: POST _ml/trained_models/my_model_for_search/deployment/_stop -alternatives: - - language: Python - code: |- - resp = client.ml.stop_trained_model_deployment( - model_id="my_model_for_search", - ) - - language: JavaScript - code: |- - const response = await client.ml.stopTrainedModelDeployment({ - model_id: "my_model_for_search", - }); - - language: Ruby - code: |- - response = client.ml.stop_trained_model_deployment( - model_id: "my_model_for_search" - ) - - language: PHP - code: |- - $resp = $client->ml()->stopTrainedModelDeployment([ - "model_id" => "my_model_for_search", - ]); - - language: curl - code: 'curl -X POST -H "Authorization: ApiKey $ELASTIC_API_KEY" - "$ELASTICSEARCH_URL/_ml/trained_models/my_model_for_search/deployment/_stop"' - - language: Java - code: | - client.ml().stopTrainedModelDeployment(s -> s - .modelId("my_model_for_search") - ); diff --git a/specification/ml/update_data_frame_analytics/examples/request/MlUpdateDataFrameAnalyticsExample1.yaml b/specification/ml/update_data_frame_analytics/examples/request/MlUpdateDataFrameAnalyticsExample1.yaml index ad7cb389ae..9820aa0787 100644 --- a/specification/ml/update_data_frame_analytics/examples/request/MlUpdateDataFrameAnalyticsExample1.yaml +++ b/specification/ml/update_data_frame_analytics/examples/request/MlUpdateDataFrameAnalyticsExample1.yaml @@ -4,42 +4,3 @@ value: |- { "model_memory_limit": "200mb" } -alternatives: - - language: Python - code: |- - resp = client.ml.update_data_frame_analytics( - id="loganalytics", - model_memory_limit="200mb", - ) - - language: JavaScript - code: |- - const response = await client.ml.updateDataFrameAnalytics({ - id: "loganalytics", - model_memory_limit: "200mb", - }); - - language: Ruby - code: |- - response = client.ml.update_data_frame_analytics( - id: "loganalytics", - body: { - "model_memory_limit": "200mb" - } - ) - - language: PHP - code: |- - $resp = $client->ml()->updateDataFrameAnalytics([ - "id" => "loganalytics", - "body" => [ - "model_memory_limit" => "200mb", - ], - ]); - - language: curl - code: - 'curl -X POST -H "Authorization: ApiKey $ELASTIC_API_KEY" -H "Content-Type: application/json" -d - ''{"model_memory_limit":"200mb"}'' "$ELASTICSEARCH_URL/_ml/data_frame/analytics/loganalytics/_update"' - - language: Java - code: | - client.ml().updateDataFrameAnalytics(u -> u - .id("loganalytics") - .modelMemoryLimit("200mb") - ); diff --git a/specification/ml/update_datafeed/examples/request/MlUpdateDatafeedExample1.yaml b/specification/ml/update_datafeed/examples/request/MlUpdateDatafeedExample1.yaml index 8e9675a6ab..5d50e3fdba 100644 --- a/specification/ml/update_datafeed/examples/request/MlUpdateDatafeedExample1.yaml +++ b/specification/ml/update_datafeed/examples/request/MlUpdateDatafeedExample1.yaml @@ -8,63 +8,3 @@ value: |- } } } -alternatives: - - language: Python - code: |- - resp = client.ml.update_datafeed( - datafeed_id="datafeed-test-job", - query={ - "term": { - "geo.src": "US" - } - }, - ) - - language: JavaScript - code: |- - const response = await client.ml.updateDatafeed({ - datafeed_id: "datafeed-test-job", - query: { - term: { - "geo.src": "US", - }, - }, - }); - - language: Ruby - code: |- - response = client.ml.update_datafeed( - datafeed_id: "datafeed-test-job", - body: { - "query": { - "term": { - "geo.src": "US" - } - } - } - ) - - language: PHP - code: |- - $resp = $client->ml()->updateDatafeed([ - "datafeed_id" => "datafeed-test-job", - "body" => [ - "query" => [ - "term" => [ - "geo.src" => "US", - ], - ], - ], - ]); - - language: curl - code: - 'curl -X POST -H "Authorization: ApiKey $ELASTIC_API_KEY" -H "Content-Type: application/json" -d - ''{"query":{"term":{"geo.src":"US"}}}'' "$ELASTICSEARCH_URL/_ml/datafeeds/datafeed-test-job/_update"' - - language: Java - code: | - client.ml().updateDatafeed(u -> u - .datafeedId("datafeed-test-job") - .query(q -> q - .term(t -> t - .field("geo.src") - .value(FieldValue.of("US")) - ) - ) - ); diff --git a/specification/ml/update_filter/examples/request/MlUpdateFilterExample1.yaml b/specification/ml/update_filter/examples/request/MlUpdateFilterExample1.yaml index da6e3bc182..1bb685211b 100644 --- a/specification/ml/update_filter/examples/request/MlUpdateFilterExample1.yaml +++ b/specification/ml/update_filter/examples/request/MlUpdateFilterExample1.yaml @@ -6,65 +6,3 @@ value: |- "add_items": ["*.myorg.com"], "remove_items": ["wikipedia.org"] } -alternatives: - - language: Python - code: |- - resp = client.ml.update_filter( - filter_id="safe_domains", - description="Updated list of domains", - add_items=[ - "*.myorg.com" - ], - remove_items=[ - "wikipedia.org" - ], - ) - - language: JavaScript - code: |- - const response = await client.ml.updateFilter({ - filter_id: "safe_domains", - description: "Updated list of domains", - add_items: ["*.myorg.com"], - remove_items: ["wikipedia.org"], - }); - - language: Ruby - code: |- - response = client.ml.update_filter( - filter_id: "safe_domains", - body: { - "description": "Updated list of domains", - "add_items": [ - "*.myorg.com" - ], - "remove_items": [ - "wikipedia.org" - ] - } - ) - - language: PHP - code: |- - $resp = $client->ml()->updateFilter([ - "filter_id" => "safe_domains", - "body" => [ - "description" => "Updated list of domains", - "add_items" => array( - "*.myorg.com", - ), - "remove_items" => array( - "wikipedia.org", - ), - ], - ]); - - language: curl - code: - 'curl -X POST -H "Authorization: ApiKey $ELASTIC_API_KEY" -H "Content-Type: application/json" -d - ''{"description":"Updated list of domains","add_items":["*.myorg.com"],"remove_items":["wikipedia.org"]}'' - "$ELASTICSEARCH_URL/_ml/filters/safe_domains/_update"' - - language: Java - code: | - client.ml().updateFilter(u -> u - .addItems("*.myorg.com") - .description("Updated list of domains") - .filterId("safe_domains") - .removeItems("wikipedia.org") - ); diff --git a/specification/ml/update_job/examples/request/MlUpdateJobExample1.yaml b/specification/ml/update_job/examples/request/MlUpdateJobExample1.yaml index eb917fb367..8d8a616b0a 100644 --- a/specification/ml/update_job/examples/request/MlUpdateJobExample1.yaml +++ b/specification/ml/update_job/examples/request/MlUpdateJobExample1.yaml @@ -16,116 +16,3 @@ value: |- "model_snapshot_retention_days": 7, "results_retention_days": 60 } -alternatives: - - language: Python - code: |- - resp = client.ml.update_job( - job_id="low_request_rate", - description="An updated job", - detectors={ - "detector_index": 0, - "description": "An updated detector description" - }, - groups=[ - "kibana_sample_data", - "kibana_sample_web_logs" - ], - model_plot_config={ - "enabled": True - }, - renormalization_window_days=30, - background_persist_interval="2h", - model_snapshot_retention_days=7, - results_retention_days=60, - ) - - language: JavaScript - code: |- - const response = await client.ml.updateJob({ - job_id: "low_request_rate", - description: "An updated job", - detectors: { - detector_index: 0, - description: "An updated detector description", - }, - groups: ["kibana_sample_data", "kibana_sample_web_logs"], - model_plot_config: { - enabled: true, - }, - renormalization_window_days: 30, - background_persist_interval: "2h", - model_snapshot_retention_days: 7, - results_retention_days: 60, - }); - - language: Ruby - code: |- - response = client.ml.update_job( - job_id: "low_request_rate", - body: { - "description": "An updated job", - "detectors": { - "detector_index": 0, - "description": "An updated detector description" - }, - "groups": [ - "kibana_sample_data", - "kibana_sample_web_logs" - ], - "model_plot_config": { - "enabled": true - }, - "renormalization_window_days": 30, - "background_persist_interval": "2h", - "model_snapshot_retention_days": 7, - "results_retention_days": 60 - } - ) - - language: PHP - code: |- - $resp = $client->ml()->updateJob([ - "job_id" => "low_request_rate", - "body" => [ - "description" => "An updated job", - "detectors" => [ - "detector_index" => 0, - "description" => "An updated detector description", - ], - "groups" => array( - "kibana_sample_data", - "kibana_sample_web_logs", - ), - "model_plot_config" => [ - "enabled" => true, - ], - "renormalization_window_days" => 30, - "background_persist_interval" => "2h", - "model_snapshot_retention_days" => 7, - "results_retention_days" => 60, - ], - ]); - - language: curl - code: - "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"description\":\"An - updated job\",\"detectors\":{\"detector_index\":0,\"description\":\"An updated detector - description\"},\"groups\":[\"kibana_sample_data\",\"kibana_sample_web_logs\"],\"model_plot_config\":{\"enabled\":true},\"reno\ - rmalization_window_days\":30,\"background_persist_interval\":\"2h\",\"model_snapshot_retention_days\":7,\"results_retention_d\ - ays\":60}' \"$ELASTICSEARCH_URL/_ml/anomaly_detectors/low_request_rate/_update\"" - - language: Java - code: | - client.ml().updateJob(u -> u - .backgroundPersistInterval(b -> b - .time("2h") - ) - .description("An updated job") - .detectors(d -> d - .detectorIndex(0) - .description("An updated detector description") - ) - .groups(List.of("kibana_sample_data","kibana_sample_web_logs")) - .jobId("low_request_rate") - .modelPlotConfig(m -> m - .enabled(true) - ) - .modelSnapshotRetentionDays(7L) - .renormalizationWindowDays(30L) - .resultsRetentionDays(60L) - ); diff --git a/specification/ml/update_model_snapshot/examples/request/MlUpdateModelSnapshotExample1.yaml b/specification/ml/update_model_snapshot/examples/request/MlUpdateModelSnapshotExample1.yaml index 86cf128655..2659e93d4b 100644 --- a/specification/ml/update_model_snapshot/examples/request/MlUpdateModelSnapshotExample1.yaml +++ b/specification/ml/update_model_snapshot/examples/request/MlUpdateModelSnapshotExample1.yaml @@ -6,53 +6,3 @@ value: |- "description": "Snapshot 1", "retain": true } -alternatives: - - language: Python - code: |- - resp = client.ml.update_model_snapshot( - job_id="it_ops_new_logs", - snapshot_id="1491852978", - description="Snapshot 1", - retain=True, - ) - - language: JavaScript - code: |- - const response = await client.ml.updateModelSnapshot({ - job_id: "it_ops_new_logs", - snapshot_id: 1491852978, - description: "Snapshot 1", - retain: true, - }); - - language: Ruby - code: |- - response = client.ml.update_model_snapshot( - job_id: "it_ops_new_logs", - snapshot_id: "1491852978", - body: { - "description": "Snapshot 1", - "retain": true - } - ) - - language: PHP - code: |- - $resp = $client->ml()->updateModelSnapshot([ - "job_id" => "it_ops_new_logs", - "snapshot_id" => "1491852978", - "body" => [ - "description" => "Snapshot 1", - "retain" => true, - ], - ]); - - language: curl - code: - 'curl -X POST -H "Authorization: ApiKey $ELASTIC_API_KEY" -H "Content-Type: application/json" -d - ''{"description":"Snapshot 1","retain":true}'' - "$ELASTICSEARCH_URL/_ml/anomaly_detectors/it_ops_new_logs/model_snapshots/1491852978/_update"' - - language: Java - code: | - client.ml().updateModelSnapshot(u -> u - .description("Snapshot 1") - .jobId("it_ops_new_logs") - .retain(true) - .snapshotId("1491852978") - ); diff --git a/specification/ml/update_trained_model_deployment/examples/request/MlUpdateTrainedModelDeploymentExample1.yaml b/specification/ml/update_trained_model_deployment/examples/request/MlUpdateTrainedModelDeploymentExample1.yaml index f8f9d1b3fd..f26d17b778 100644 --- a/specification/ml/update_trained_model_deployment/examples/request/MlUpdateTrainedModelDeploymentExample1.yaml +++ b/specification/ml/update_trained_model_deployment/examples/request/MlUpdateTrainedModelDeploymentExample1.yaml @@ -5,43 +5,3 @@ value: |- { "number_of_allocations": 4 } -alternatives: - - language: Python - code: |- - resp = client.ml.update_trained_model_deployment( - model_id="elastic__distilbert-base-uncased-finetuned-conll03-english", - number_of_allocations=4, - ) - - language: JavaScript - code: |- - const response = await client.ml.updateTrainedModelDeployment({ - model_id: "elastic__distilbert-base-uncased-finetuned-conll03-english", - number_of_allocations: 4, - }); - - language: Ruby - code: |- - response = client.ml.update_trained_model_deployment( - model_id: "elastic__distilbert-base-uncased-finetuned-conll03-english", - body: { - "number_of_allocations": 4 - } - ) - - language: PHP - code: |- - $resp = $client->ml()->updateTrainedModelDeployment([ - "model_id" => "elastic__distilbert-base-uncased-finetuned-conll03-english", - "body" => [ - "number_of_allocations" => 4, - ], - ]); - - language: curl - code: - 'curl -X POST -H "Authorization: ApiKey $ELASTIC_API_KEY" -H "Content-Type: application/json" -d - ''{"number_of_allocations":4}'' - "$ELASTICSEARCH_URL/_ml/trained_models/elastic__distilbert-base-uncased-finetuned-conll03-english/deployment/_update"' - - language: Java - code: | - client.ml().updateTrainedModelDeployment(u -> u - .modelId("elastic__distilbert-base-uncased-finetuned-conll03-english") - .numberOfAllocations(4) - ); diff --git a/specification/ml/upgrade_job_snapshot/examples/request/MlUpgradeJobSnapshotExample1.yaml b/specification/ml/upgrade_job_snapshot/examples/request/MlUpgradeJobSnapshotExample1.yaml index 0943d9e2b9..e7d136c0c7 100644 --- a/specification/ml/upgrade_job_snapshot/examples/request/MlUpgradeJobSnapshotExample1.yaml +++ b/specification/ml/upgrade_job_snapshot/examples/request/MlUpgradeJobSnapshotExample1.yaml @@ -1,47 +1 @@ method_request: POST _ml/anomaly_detectors/low_request_rate/model_snapshots/1828371/_upgrade?timeout=45m&wait_for_completion=true -alternatives: - - language: Python - code: |- - resp = client.ml.upgrade_job_snapshot( - job_id="low_request_rate", - snapshot_id="1828371", - timeout="45m", - wait_for_completion=True, - ) - - language: JavaScript - code: |- - const response = await client.ml.upgradeJobSnapshot({ - job_id: "low_request_rate", - snapshot_id: 1828371, - timeout: "45m", - wait_for_completion: "true", - }); - - language: Ruby - code: |- - response = client.ml.upgrade_job_snapshot( - job_id: "low_request_rate", - snapshot_id: "1828371", - timeout: "45m", - wait_for_completion: "true" - ) - - language: PHP - code: |- - $resp = $client->ml()->upgradeJobSnapshot([ - "job_id" => "low_request_rate", - "snapshot_id" => "1828371", - "timeout" => "45m", - "wait_for_completion" => "true", - ]); - - language: curl - code: 'curl -X POST -H "Authorization: ApiKey $ELASTIC_API_KEY" - "$ELASTICSEARCH_URL/_ml/anomaly_detectors/low_request_rate/model_snapshots/1828371/_upgrade?timeout=45m&wait_for_completion=true"' - - language: Java - code: | - client.ml().upgradeJobSnapshot(u -> u - .jobId("low_request_rate") - .snapshotId("1828371") - .timeout(t -> t - .offset(45) - ) - .waitForCompletion(true) - ); diff --git a/specification/nodes/_types/Stats.ts b/specification/nodes/_types/Stats.ts index bb6991e62a..8790adda3d 100644 --- a/specification/nodes/_types/Stats.ts +++ b/specification/nodes/_types/Stats.ts @@ -196,6 +196,8 @@ export interface PressureMemory { * Number of indexing requests rejected in the replica stage. */ replica_rejections?: long + primary_document_rejections?: long + large_operation_rejections?: long } export class Discovery { @@ -932,6 +934,11 @@ export class JvmMemoryStats { * Maximum amount of memory, in bytes, available for use by the heap. */ heap_max_in_bytes?: long + /** + * Maximum amount of memory, available for use by the heap. + */ + heap_max?: ByteSize + /** * Non-heap memory used, in bytes. */ diff --git a/specification/nodes/hot_threads/examples/request/NodesHotThreadsExample1.yaml b/specification/nodes/hot_threads/examples/request/NodesHotThreadsExample1.yaml index ea6d3cf6fe..376e42d32d 100644 --- a/specification/nodes/hot_threads/examples/request/NodesHotThreadsExample1.yaml +++ b/specification/nodes/hot_threads/examples/request/NodesHotThreadsExample1.yaml @@ -1,15 +1 @@ method_request: GET /_nodes/hot_threads -alternatives: - - language: Python - code: resp = client.nodes.hot_threads() - - language: JavaScript - code: const response = await client.nodes.hotThreads(); - - language: Ruby - code: response = client.nodes.hot_threads - - language: PHP - code: $resp = $client->nodes()->hotThreads(); - - language: curl - code: 'curl -X GET -H "Authorization: ApiKey $ELASTIC_API_KEY" "$ELASTICSEARCH_URL/_nodes/hot_threads"' - - language: Java - code: | - client.nodes().hotThreads(h -> h); diff --git a/specification/nodes/info/examples/request/NodesInfoExample1.yaml b/specification/nodes/info/examples/request/NodesInfoExample1.yaml index 618a6bfe97..9f78ea319c 100644 --- a/specification/nodes/info/examples/request/NodesInfoExample1.yaml +++ b/specification/nodes/info/examples/request/NodesInfoExample1.yaml @@ -1,34 +1 @@ method_request: GET _nodes/_all/jvm -alternatives: - - language: Python - code: |- - resp = client.nodes.info( - node_id="_all", - metric="jvm", - ) - - language: JavaScript - code: |- - const response = await client.nodes.info({ - node_id: "_all", - metric: "jvm", - }); - - language: Ruby - code: |- - response = client.nodes.info( - node_id: "_all", - metric: "jvm" - ) - - language: PHP - code: |- - $resp = $client->nodes()->info([ - "node_id" => "_all", - "metric" => "jvm", - ]); - - language: curl - code: 'curl -X GET -H "Authorization: ApiKey $ELASTIC_API_KEY" "$ELASTICSEARCH_URL/_nodes/_all/jvm"' - - language: Java - code: | - client.nodes().info(i -> i - .metric("jvm") - .nodeId("_all") - ); diff --git a/specification/nodes/info/types.ts b/specification/nodes/info/types.ts index 43658aff0e..7c4473a4dc 100644 --- a/specification/nodes/info/types.ts +++ b/specification/nodes/info/types.ts @@ -17,7 +17,7 @@ * under the License. */ -import { ByteSize, Name, VersionString } from '@_types/common' +import { ByteSize, Name, VersionNumber, VersionString } from '@_types/common' import { Host, Ip, TransportAddress } from '@_types/Networking' import { NodeRoles } from '@_types/Node' import { integer, long } from '@_types/Numeric' @@ -26,6 +26,7 @@ import { Duration, DurationValue, EpochTime, UnitMillis } from '@_types/Time' import { IndexRouting } from '@indices/_types/IndexRouting' import { AdditionalProperties } from '@spec_utils/behaviors' import { Dictionary } from '@spec_utils/Dictionary' +import { Stringified } from '@spec_utils/Stringified' import { UserDefinedValue } from '@spec_utils/UserDefinedValue' export class NodeInfo { @@ -34,15 +35,16 @@ export class NodeInfo { /** Short hash of the last git commit in this release. */ build_hash: string build_type: string + component_versions: Dictionary /** The node’s host name. */ host: Host http?: NodeInfoHttp + index_version: VersionNumber /** The node’s IP address. */ ip: Ip jvm?: NodeJvmInfo /** The node's name */ name: Name - network?: NodeInfoNetwork os?: NodeOperatingSystemInfo plugins?: PluginStats[] process?: NodeProcessInfo @@ -59,11 +61,19 @@ export class NodeInfo { transport?: NodeInfoTransport /** Host and port where transport HTTP connections are accepted. */ transport_address: TransportAddress + transport_version: VersionNumber + /** Elasticsearch version running on this node. */ version: VersionString modules?: PluginStats[] ingest?: NodeInfoIngest aggregations?: Dictionary + remote_cluster_server?: RemoveClusterServer +} + +export class RemoveClusterServer { + bound_address: TransportAddress[] + publish_address: TransportAddress } export class NodeInfoSettings { @@ -133,7 +143,7 @@ export class NodeInfoSettingsCluster { name: Name routing?: IndexRouting election: NodeInfoSettingsClusterElection - initial_master_nodes?: string[] + initial_master_nodes?: string[] | string /** * @availability stack since=7.16.0 * @availability serverless @@ -176,7 +186,7 @@ export class NodeInfoRepositoriesUrl { export class NodeInfoDiscover implements AdditionalProperties { - seed_hosts?: string[] + seed_hosts?: string[] | string type?: string seed_providers?: string[] } @@ -209,6 +219,11 @@ export class NodeInfoSettingsTransport { type: NodeInfoSettingsTransportType 'type.default'?: string // TODO this clashes with NodeInfoSettingsTransportType features?: NodeInfoSettingsTransportFeatures + /** + * Only used in unit tests + * @availability stack visibility=private + * */ + ignore_deserialization_errors?: Stringified } /** @shortcut_property default */ @@ -333,17 +348,6 @@ export class NodeInfoMemory { total_in_bytes: long } -export class NodeInfoNetwork { - primary_interface: NodeInfoNetworkInterface - refresh_interval: integer -} - -export class NodeInfoNetworkInterface { - address: string - mac_address: string - name: Name -} - export class NodeInfoOSCPU { cache_size: string cache_size_in_bytes: integer @@ -371,7 +375,6 @@ export class NodeJvmInfo { vm_name: Name vm_vendor: string vm_version: VersionString - /** @aliases bundled_jdk */ using_bundled_jdk: boolean using_compressed_ordinary_object_pointers?: boolean | string input_arguments: string[] diff --git a/specification/nodes/reload_secure_settings/examples/request/ReloadSecureSettingsRequestExample1.yaml b/specification/nodes/reload_secure_settings/examples/request/ReloadSecureSettingsRequestExample1.yaml index cb82ededbe..17901ecfb4 100644 --- a/specification/nodes/reload_secure_settings/examples/request/ReloadSecureSettingsRequestExample1.yaml +++ b/specification/nodes/reload_secure_settings/examples/request/ReloadSecureSettingsRequestExample1.yaml @@ -6,37 +6,3 @@ value: |- { "secure_settings_password": "keystore-password" } -alternatives: - - language: Python - code: |- - resp = client.nodes.reload_secure_settings( - secure_settings_password="keystore-password", - ) - - language: JavaScript - code: |- - const response = await client.nodes.reloadSecureSettings({ - secure_settings_password: "keystore-password", - }); - - language: Ruby - code: |- - response = client.nodes.reload_secure_settings( - body: { - "secure_settings_password": "keystore-password" - } - ) - - language: PHP - code: |- - $resp = $client->nodes()->reloadSecureSettings([ - "body" => [ - "secure_settings_password" => "keystore-password", - ], - ]); - - language: curl - code: - 'curl -X POST -H "Authorization: ApiKey $ELASTIC_API_KEY" -H "Content-Type: application/json" -d - ''{"secure_settings_password":"keystore-password"}'' "$ELASTICSEARCH_URL/_nodes/reload_secure_settings"' - - language: Java - code: | - client.nodes().reloadSecureSettings(r -> r - .secureSettingsPassword("keystore-password") - ); diff --git a/specification/nodes/stats/examples/request/NodesStatsExample1.yaml b/specification/nodes/stats/examples/request/NodesStatsExample1.yaml index 678c6053bf..530ddd65ef 100644 --- a/specification/nodes/stats/examples/request/NodesStatsExample1.yaml +++ b/specification/nodes/stats/examples/request/NodesStatsExample1.yaml @@ -1,31 +1 @@ method_request: GET _nodes/stats/process?filter_path=**.max_file_descriptors -alternatives: - - language: Python - code: |- - resp = client.nodes.stats( - metric="process", - filter_path="**.max_file_descriptors", - ) - - language: JavaScript - code: |- - const response = await client.nodes.stats({ - metric: "process", - filter_path: "**.max_file_descriptors", - }); - - language: Ruby - code: |- - response = client.nodes.stats( - metric: "process", - filter_path: "**.max_file_descriptors" - ) - - language: PHP - code: |- - $resp = $client->nodes()->stats([ - "metric" => "process", - "filter_path" => "**.max_file_descriptors", - ]); - - language: curl - code: 'curl -X GET -H "Authorization: ApiKey $ELASTIC_API_KEY" - "$ELASTICSEARCH_URL/_nodes/stats/process?filter_path=**.max_file_descriptors"' - - language: Java - code: "\n" diff --git a/specification/nodes/usage/examples/request/NodesUsageExample1.yaml b/specification/nodes/usage/examples/request/NodesUsageExample1.yaml index a1be84482f..6c9b6fc2bc 100644 --- a/specification/nodes/usage/examples/request/NodesUsageExample1.yaml +++ b/specification/nodes/usage/examples/request/NodesUsageExample1.yaml @@ -1,15 +1 @@ method_request: GET _nodes/usage -alternatives: - - language: Python - code: resp = client.nodes.usage() - - language: JavaScript - code: const response = await client.nodes.usage(); - - language: Ruby - code: response = client.nodes.usage - - language: PHP - code: $resp = $client->nodes()->usage(); - - language: curl - code: 'curl -X GET -H "Authorization: ApiKey $ELASTIC_API_KEY" "$ELASTICSEARCH_URL/_nodes/usage"' - - language: Java - code: | - client.nodes().usage(u -> u); diff --git a/specification/package-lock.json b/specification/package-lock.json index 8e3d8486ba..6d29913c30 100644 --- a/specification/package-lock.json +++ b/specification/package-lock.json @@ -191,18 +191,30 @@ } }, "node_modules/@eslint/plugin-kit": { - "version": "0.3.1", - "resolved": "https://registry.npmjs.org/@eslint/plugin-kit/-/plugin-kit-0.3.1.tgz", - "integrity": "sha512-0J+zgWxHN+xXONWIyPWKFMgVuJoZuGiIFu8yxk7RJjxkzpGmyja5wRFqZIVtjDVOQpV+Rw0iOAjYPE2eQyjr0w==", + "version": "0.3.3", + "resolved": "https://registry.npmjs.org/@eslint/plugin-kit/-/plugin-kit-0.3.3.tgz", + "integrity": "sha512-1+WqvgNMhmlAambTvT3KPtCl/Ibr68VldY2XY40SL1CE0ZXiakFR/cbTspaF5HsnpDMvcYYoJHfl4980NBjGag==", "license": "Apache-2.0", "dependencies": { - "@eslint/core": "^0.14.0", + "@eslint/core": "^0.15.1", "levn": "^0.4.1" }, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" } }, + "node_modules/@eslint/plugin-kit/node_modules/@eslint/core": { + "version": "0.15.1", + "resolved": "https://registry.npmjs.org/@eslint/core/-/core-0.15.1.tgz", + "integrity": "sha512-bkOp+iumZCCbt1K1CmWf0R9pM5yKpDv+ZXtvSyQpudrI9kuFLp+bM2WOPXImuD/ceQuaa8f5pj93Y7zyECIGNA==", + "license": "Apache-2.0", + "dependencies": { + "@types/json-schema": "^7.0.15" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + } + }, "node_modules/@humanfs/core": { "version": "0.19.1", "resolved": "https://registry.npmjs.org/@humanfs/core/-/core-0.19.1.tgz", diff --git a/specification/query_rules/delete_rule/examples/request/QueryRulesDeleteRuleExample1.yaml b/specification/query_rules/delete_rule/examples/request/QueryRulesDeleteRuleExample1.yaml index 85a1fe1235..65711f5067 100644 --- a/specification/query_rules/delete_rule/examples/request/QueryRulesDeleteRuleExample1.yaml +++ b/specification/query_rules/delete_rule/examples/request/QueryRulesDeleteRuleExample1.yaml @@ -1,34 +1 @@ method_request: DELETE _query_rules/my-ruleset/_rule/my-rule1 -alternatives: - - language: Python - code: |- - resp = client.query_rules.delete_rule( - ruleset_id="my-ruleset", - rule_id="my-rule1", - ) - - language: JavaScript - code: |- - const response = await client.queryRules.deleteRule({ - ruleset_id: "my-ruleset", - rule_id: "my-rule1", - }); - - language: Ruby - code: |- - response = client.query_rules.delete_rule( - ruleset_id: "my-ruleset", - rule_id: "my-rule1" - ) - - language: PHP - code: |- - $resp = $client->queryRules()->deleteRule([ - "ruleset_id" => "my-ruleset", - "rule_id" => "my-rule1", - ]); - - language: curl - code: 'curl -X DELETE -H "Authorization: ApiKey $ELASTIC_API_KEY" "$ELASTICSEARCH_URL/_query_rules/my-ruleset/_rule/my-rule1"' - - language: Java - code: | - client.queryRules().deleteRule(d -> d - .ruleId("my-rule1") - .rulesetId("my-ruleset") - ); diff --git a/specification/query_rules/delete_ruleset/examples/request/QueryRulesDeleteRulesetExample1.yaml b/specification/query_rules/delete_ruleset/examples/request/QueryRulesDeleteRulesetExample1.yaml index 02998b8918..60b70ddf05 100644 --- a/specification/query_rules/delete_ruleset/examples/request/QueryRulesDeleteRulesetExample1.yaml +++ b/specification/query_rules/delete_ruleset/examples/request/QueryRulesDeleteRulesetExample1.yaml @@ -1,29 +1 @@ method_request: DELETE _query_rules/my-ruleset/ -alternatives: - - language: Python - code: |- - resp = client.query_rules.delete_ruleset( - ruleset_id="my-ruleset", - ) - - language: JavaScript - code: |- - const response = await client.queryRules.deleteRuleset({ - ruleset_id: "my-ruleset", - }); - - language: Ruby - code: |- - response = client.query_rules.delete_ruleset( - ruleset_id: "my-ruleset" - ) - - language: PHP - code: |- - $resp = $client->queryRules()->deleteRuleset([ - "ruleset_id" => "my-ruleset", - ]); - - language: curl - code: 'curl -X DELETE -H "Authorization: ApiKey $ELASTIC_API_KEY" "$ELASTICSEARCH_URL/_query_rules/my-ruleset/"' - - language: Java - code: | - client.queryRules().deleteRuleset(d -> d - .rulesetId("my-ruleset") - ); diff --git a/specification/query_rules/get_rule/examples/request/QueryRuleGetRequestExample1.yaml b/specification/query_rules/get_rule/examples/request/QueryRuleGetRequestExample1.yaml index e7fa0f3fa2..3cf7b6f67a 100644 --- a/specification/query_rules/get_rule/examples/request/QueryRuleGetRequestExample1.yaml +++ b/specification/query_rules/get_rule/examples/request/QueryRuleGetRequestExample1.yaml @@ -1,34 +1 @@ method_request: GET _query_rules/my-ruleset/_rule/my-rule1 -alternatives: - - language: Python - code: |- - resp = client.query_rules.get_rule( - ruleset_id="my-ruleset", - rule_id="my-rule1", - ) - - language: JavaScript - code: |- - const response = await client.queryRules.getRule({ - ruleset_id: "my-ruleset", - rule_id: "my-rule1", - }); - - language: Ruby - code: |- - response = client.query_rules.get_rule( - ruleset_id: "my-ruleset", - rule_id: "my-rule1" - ) - - language: PHP - code: |- - $resp = $client->queryRules()->getRule([ - "ruleset_id" => "my-ruleset", - "rule_id" => "my-rule1", - ]); - - language: curl - code: 'curl -X GET -H "Authorization: ApiKey $ELASTIC_API_KEY" "$ELASTICSEARCH_URL/_query_rules/my-ruleset/_rule/my-rule1"' - - language: Java - code: | - client.queryRules().getRule(g -> g - .ruleId("my-rule1") - .rulesetId("my-ruleset") - ); diff --git a/specification/query_rules/get_ruleset/examples/request/QueryRulesetGetRequestExample1.yaml b/specification/query_rules/get_ruleset/examples/request/QueryRulesetGetRequestExample1.yaml index ca8b7a8e48..f22fa12d34 100644 --- a/specification/query_rules/get_ruleset/examples/request/QueryRulesetGetRequestExample1.yaml +++ b/specification/query_rules/get_ruleset/examples/request/QueryRulesetGetRequestExample1.yaml @@ -1,29 +1 @@ method_request: GET _query_rules/my-ruleset/ -alternatives: - - language: Python - code: |- - resp = client.query_rules.get_ruleset( - ruleset_id="my-ruleset", - ) - - language: JavaScript - code: |- - const response = await client.queryRules.getRuleset({ - ruleset_id: "my-ruleset", - }); - - language: Ruby - code: |- - response = client.query_rules.get_ruleset( - ruleset_id: "my-ruleset" - ) - - language: PHP - code: |- - $resp = $client->queryRules()->getRuleset([ - "ruleset_id" => "my-ruleset", - ]); - - language: curl - code: 'curl -X GET -H "Authorization: ApiKey $ELASTIC_API_KEY" "$ELASTICSEARCH_URL/_query_rules/my-ruleset/"' - - language: Java - code: | - client.queryRules().getRuleset(g -> g - .rulesetId("my-ruleset") - ); diff --git a/specification/query_rules/list_rulesets/examples/request/QueryRulesetListRequestExample1.yaml b/specification/query_rules/list_rulesets/examples/request/QueryRulesetListRequestExample1.yaml index 733fdaa65d..46e42c3046 100644 --- a/specification/query_rules/list_rulesets/examples/request/QueryRulesetListRequestExample1.yaml +++ b/specification/query_rules/list_rulesets/examples/request/QueryRulesetListRequestExample1.yaml @@ -1,34 +1 @@ method_request: GET _query_rules/?from=0&size=3 -alternatives: - - language: Python - code: |- - resp = client.query_rules.list_rulesets( - from="0", - size="3", - ) - - language: JavaScript - code: |- - const response = await client.queryRules.listRulesets({ - from: 0, - size: 3, - }); - - language: Ruby - code: |- - response = client.query_rules.list_rulesets( - from: "0", - size: "3" - ) - - language: PHP - code: |- - $resp = $client->queryRules()->listRulesets([ - "from" => "0", - "size" => "3", - ]); - - language: curl - code: 'curl -X GET -H "Authorization: ApiKey $ELASTIC_API_KEY" "$ELASTICSEARCH_URL/_query_rules/?from=0&size=3"' - - language: Java - code: | - client.queryRules().listRulesets(l -> l - .from(0) - .size(3) - ); diff --git a/specification/query_rules/put_rule/examples/request/QueryRulePutRequestExample1.yaml b/specification/query_rules/put_rule/examples/request/QueryRulePutRequestExample1.yaml index 4bdec267fb..beacbae1be 100644 --- a/specification/query_rules/put_rule/examples/request/QueryRulePutRequestExample1.yaml +++ b/specification/query_rules/put_rule/examples/request/QueryRulePutRequestExample1.yaml @@ -6,50 +6,3 @@ description: > value: match_criteria: query_string: puggles -alternatives: - - language: Python - code: |- - resp = client.query_rules.test( - ruleset_id="my-ruleset", - match_criteria={ - "query_string": "puggles" - }, - ) - - language: JavaScript - code: |- - const response = await client.queryRules.test({ - ruleset_id: "my-ruleset", - match_criteria: { - query_string: "puggles", - }, - }); - - language: Ruby - code: |- - response = client.query_rules.test( - ruleset_id: "my-ruleset", - body: { - "match_criteria": { - "query_string": "puggles" - } - } - ) - - language: PHP - code: |- - $resp = $client->queryRules()->test([ - "ruleset_id" => "my-ruleset", - "body" => [ - "match_criteria" => [ - "query_string" => "puggles", - ], - ], - ]); - - language: curl - code: - 'curl -X POST -H "Authorization: ApiKey $ELASTIC_API_KEY" -H "Content-Type: application/json" -d - ''{"match_criteria":{"query_string":"puggles"}}'' "$ELASTICSEARCH_URL/_query_rules/my-ruleset/_test"' - - language: Java - code: | - client.queryRules().test(t -> t - .matchCriteria("query_string", JsonData.fromJson("\"puggles\"")) - .rulesetId("my-ruleset") - ); diff --git a/specification/query_rules/put_ruleset/examples/request/QueryRulesetPutRequestExample1.yaml b/specification/query_rules/put_ruleset/examples/request/QueryRulesetPutRequestExample1.yaml index 19dda02f03..a5524fb73f 100644 --- a/specification/query_rules/put_ruleset/examples/request/QueryRulesetPutRequestExample1.yaml +++ b/specification/query_rules/put_ruleset/examples/request/QueryRulesetPutRequestExample1.yaml @@ -103,275 +103,3 @@ value: "{ \ ] }" -alternatives: - - language: Python - code: |- - resp = client.query_rules.put_ruleset( - ruleset_id="my-ruleset", - rules=[ - { - "rule_id": "my-rule1", - "type": "pinned", - "criteria": [ - { - "type": "contains", - "metadata": "user_query", - "values": [ - "pugs", - "puggles" - ] - }, - { - "type": "exact", - "metadata": "user_country", - "values": [ - "us" - ] - } - ], - "actions": { - "ids": [ - "id1", - "id2" - ] - } - }, - { - "rule_id": "my-rule2", - "type": "pinned", - "criteria": [ - { - "type": "fuzzy", - "metadata": "user_query", - "values": [ - "rescue dogs" - ] - } - ], - "actions": { - "docs": [ - { - "_index": "index1", - "_id": "id3" - }, - { - "_index": "index2", - "_id": "id4" - } - ] - } - } - ], - ) - - language: JavaScript - code: |- - const response = await client.queryRules.putRuleset({ - ruleset_id: "my-ruleset", - rules: [ - { - rule_id: "my-rule1", - type: "pinned", - criteria: [ - { - type: "contains", - metadata: "user_query", - values: ["pugs", "puggles"], - }, - { - type: "exact", - metadata: "user_country", - values: ["us"], - }, - ], - actions: { - ids: ["id1", "id2"], - }, - }, - { - rule_id: "my-rule2", - type: "pinned", - criteria: [ - { - type: "fuzzy", - metadata: "user_query", - values: ["rescue dogs"], - }, - ], - actions: { - docs: [ - { - _index: "index1", - _id: "id3", - }, - { - _index: "index2", - _id: "id4", - }, - ], - }, - }, - ], - }); - - language: Ruby - code: |- - response = client.query_rules.put_ruleset( - ruleset_id: "my-ruleset", - body: { - "rules": [ - { - "rule_id": "my-rule1", - "type": "pinned", - "criteria": [ - { - "type": "contains", - "metadata": "user_query", - "values": [ - "pugs", - "puggles" - ] - }, - { - "type": "exact", - "metadata": "user_country", - "values": [ - "us" - ] - } - ], - "actions": { - "ids": [ - "id1", - "id2" - ] - } - }, - { - "rule_id": "my-rule2", - "type": "pinned", - "criteria": [ - { - "type": "fuzzy", - "metadata": "user_query", - "values": [ - "rescue dogs" - ] - } - ], - "actions": { - "docs": [ - { - "_index": "index1", - "_id": "id3" - }, - { - "_index": "index2", - "_id": "id4" - } - ] - } - } - ] - } - ) - - language: PHP - code: |- - $resp = $client->queryRules()->putRuleset([ - "ruleset_id" => "my-ruleset", - "body" => [ - "rules" => array( - [ - "rule_id" => "my-rule1", - "type" => "pinned", - "criteria" => array( - [ - "type" => "contains", - "metadata" => "user_query", - "values" => array( - "pugs", - "puggles", - ), - ], - [ - "type" => "exact", - "metadata" => "user_country", - "values" => array( - "us", - ), - ], - ), - "actions" => [ - "ids" => array( - "id1", - "id2", - ), - ], - ], - [ - "rule_id" => "my-rule2", - "type" => "pinned", - "criteria" => array( - [ - "type" => "fuzzy", - "metadata" => "user_query", - "values" => array( - "rescue dogs", - ), - ], - ), - "actions" => [ - "docs" => array( - [ - "_index" => "index1", - "_id" => "id3", - ], - [ - "_index" => "index2", - "_id" => "id4", - ], - ), - ], - ], - ), - ], - ]); - - language: curl - code: - "curl -X PUT -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d - '{\"rules\":[{\"rule_id\":\"my-rule1\",\"type\":\"pinned\",\"criteria\":[{\"type\":\"contains\",\"metadata\":\"user_query\",\ - \"values\":[\"pugs\",\"puggles\"]},{\"type\":\"exact\",\"metadata\":\"user_country\",\"values\":[\"us\"]}],\"actions\":{\"ids\ - \":[\"id1\",\"id2\"]}},{\"rule_id\":\"my-rule2\",\"type\":\"pinned\",\"criteria\":[{\"type\":\"fuzzy\",\"metadata\":\"user_qu\ - ery\",\"values\":[\"rescue - dogs\"]}],\"actions\":{\"docs\":[{\"_index\":\"index1\",\"_id\":\"id3\"},{\"_index\":\"index2\",\"_id\":\"id4\"}]}}]}' - \"$ELASTICSEARCH_URL/_query_rules/my-ruleset\"" - - language: Java - code: > - client.queryRules().putRuleset(p -> p - .rules(List.of(QueryRule.queryRuleOf(q -> q - .ruleId("my-rule1") - .type(QueryRuleType.Pinned) - .criteria(List.of(QueryRuleCriteria.of(qu -> qu - .type(QueryRuleCriteriaType.Contains) - .metadata("user_query") - .values(List.of(JsonData.fromJson("\"pugs\""),JsonData.fromJson("\"puggles\"")))),QueryRuleCriteria.of(qu -> qu - .type(QueryRuleCriteriaType.Exact) - .metadata("user_country") - .values(JsonData.fromJson("\"us\""))))) - .actions(a -> a - .ids(List.of("id1","id2")) - )),QueryRule.queryRuleOf(q -> q - .ruleId("my-rule2") - .type(QueryRuleType.Pinned) - .criteria(c -> c - .type(QueryRuleCriteriaType.Fuzzy) - .metadata("user_query") - .values(JsonData.fromJson("\"rescue dogs\"")) - ) - .actions(a -> a - .docs(List.of(PinnedDoc.of(pi -> pi - .id("id3") - .index("index1")),PinnedDoc.of(pi -> pi - .id("id4") - .index("index2")))) - )))) - .rulesetId("my-ruleset") - ); diff --git a/specification/query_rules/test/examples/request/QueryRulesetTestRequestExample1.yaml b/specification/query_rules/test/examples/request/QueryRulesetTestRequestExample1.yaml index 19dda02f03..a5524fb73f 100644 --- a/specification/query_rules/test/examples/request/QueryRulesetTestRequestExample1.yaml +++ b/specification/query_rules/test/examples/request/QueryRulesetTestRequestExample1.yaml @@ -103,275 +103,3 @@ value: "{ \ ] }" -alternatives: - - language: Python - code: |- - resp = client.query_rules.put_ruleset( - ruleset_id="my-ruleset", - rules=[ - { - "rule_id": "my-rule1", - "type": "pinned", - "criteria": [ - { - "type": "contains", - "metadata": "user_query", - "values": [ - "pugs", - "puggles" - ] - }, - { - "type": "exact", - "metadata": "user_country", - "values": [ - "us" - ] - } - ], - "actions": { - "ids": [ - "id1", - "id2" - ] - } - }, - { - "rule_id": "my-rule2", - "type": "pinned", - "criteria": [ - { - "type": "fuzzy", - "metadata": "user_query", - "values": [ - "rescue dogs" - ] - } - ], - "actions": { - "docs": [ - { - "_index": "index1", - "_id": "id3" - }, - { - "_index": "index2", - "_id": "id4" - } - ] - } - } - ], - ) - - language: JavaScript - code: |- - const response = await client.queryRules.putRuleset({ - ruleset_id: "my-ruleset", - rules: [ - { - rule_id: "my-rule1", - type: "pinned", - criteria: [ - { - type: "contains", - metadata: "user_query", - values: ["pugs", "puggles"], - }, - { - type: "exact", - metadata: "user_country", - values: ["us"], - }, - ], - actions: { - ids: ["id1", "id2"], - }, - }, - { - rule_id: "my-rule2", - type: "pinned", - criteria: [ - { - type: "fuzzy", - metadata: "user_query", - values: ["rescue dogs"], - }, - ], - actions: { - docs: [ - { - _index: "index1", - _id: "id3", - }, - { - _index: "index2", - _id: "id4", - }, - ], - }, - }, - ], - }); - - language: Ruby - code: |- - response = client.query_rules.put_ruleset( - ruleset_id: "my-ruleset", - body: { - "rules": [ - { - "rule_id": "my-rule1", - "type": "pinned", - "criteria": [ - { - "type": "contains", - "metadata": "user_query", - "values": [ - "pugs", - "puggles" - ] - }, - { - "type": "exact", - "metadata": "user_country", - "values": [ - "us" - ] - } - ], - "actions": { - "ids": [ - "id1", - "id2" - ] - } - }, - { - "rule_id": "my-rule2", - "type": "pinned", - "criteria": [ - { - "type": "fuzzy", - "metadata": "user_query", - "values": [ - "rescue dogs" - ] - } - ], - "actions": { - "docs": [ - { - "_index": "index1", - "_id": "id3" - }, - { - "_index": "index2", - "_id": "id4" - } - ] - } - } - ] - } - ) - - language: PHP - code: |- - $resp = $client->queryRules()->putRuleset([ - "ruleset_id" => "my-ruleset", - "body" => [ - "rules" => array( - [ - "rule_id" => "my-rule1", - "type" => "pinned", - "criteria" => array( - [ - "type" => "contains", - "metadata" => "user_query", - "values" => array( - "pugs", - "puggles", - ), - ], - [ - "type" => "exact", - "metadata" => "user_country", - "values" => array( - "us", - ), - ], - ), - "actions" => [ - "ids" => array( - "id1", - "id2", - ), - ], - ], - [ - "rule_id" => "my-rule2", - "type" => "pinned", - "criteria" => array( - [ - "type" => "fuzzy", - "metadata" => "user_query", - "values" => array( - "rescue dogs", - ), - ], - ), - "actions" => [ - "docs" => array( - [ - "_index" => "index1", - "_id" => "id3", - ], - [ - "_index" => "index2", - "_id" => "id4", - ], - ), - ], - ], - ), - ], - ]); - - language: curl - code: - "curl -X PUT -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d - '{\"rules\":[{\"rule_id\":\"my-rule1\",\"type\":\"pinned\",\"criteria\":[{\"type\":\"contains\",\"metadata\":\"user_query\",\ - \"values\":[\"pugs\",\"puggles\"]},{\"type\":\"exact\",\"metadata\":\"user_country\",\"values\":[\"us\"]}],\"actions\":{\"ids\ - \":[\"id1\",\"id2\"]}},{\"rule_id\":\"my-rule2\",\"type\":\"pinned\",\"criteria\":[{\"type\":\"fuzzy\",\"metadata\":\"user_qu\ - ery\",\"values\":[\"rescue - dogs\"]}],\"actions\":{\"docs\":[{\"_index\":\"index1\",\"_id\":\"id3\"},{\"_index\":\"index2\",\"_id\":\"id4\"}]}}]}' - \"$ELASTICSEARCH_URL/_query_rules/my-ruleset\"" - - language: Java - code: > - client.queryRules().putRuleset(p -> p - .rules(List.of(QueryRule.queryRuleOf(q -> q - .ruleId("my-rule1") - .type(QueryRuleType.Pinned) - .criteria(List.of(QueryRuleCriteria.of(qu -> qu - .type(QueryRuleCriteriaType.Contains) - .metadata("user_query") - .values(List.of(JsonData.fromJson("\"pugs\""),JsonData.fromJson("\"puggles\"")))),QueryRuleCriteria.of(qu -> qu - .type(QueryRuleCriteriaType.Exact) - .metadata("user_country") - .values(JsonData.fromJson("\"us\""))))) - .actions(a -> a - .ids(List.of("id1","id2")) - )),QueryRule.queryRuleOf(q -> q - .ruleId("my-rule2") - .type(QueryRuleType.Pinned) - .criteria(c -> c - .type(QueryRuleCriteriaType.Fuzzy) - .metadata("user_query") - .values(JsonData.fromJson("\"rescue dogs\"")) - ) - .actions(a -> a - .docs(List.of(PinnedDoc.of(pi -> pi - .id("id3") - .index("index1")),PinnedDoc.of(pi -> pi - .id("id4") - .index("index2")))) - )))) - .rulesetId("my-ruleset") - ); diff --git a/specification/rollup/delete_job/examples/request/DeleteRollupJobRequestExample1.yaml b/specification/rollup/delete_job/examples/request/DeleteRollupJobRequestExample1.yaml index 86869b1231..4e29cf1351 100644 --- a/specification/rollup/delete_job/examples/request/DeleteRollupJobRequestExample1.yaml +++ b/specification/rollup/delete_job/examples/request/DeleteRollupJobRequestExample1.yaml @@ -1,29 +1 @@ method_request: DELETE _rollup/job/sensor -alternatives: - - language: Python - code: |- - resp = client.rollup.delete_job( - id="sensor", - ) - - language: JavaScript - code: |- - const response = await client.rollup.deleteJob({ - id: "sensor", - }); - - language: Ruby - code: |- - response = client.rollup.delete_job( - id: "sensor" - ) - - language: PHP - code: |- - $resp = $client->rollup()->deleteJob([ - "id" => "sensor", - ]); - - language: curl - code: 'curl -X DELETE -H "Authorization: ApiKey $ELASTIC_API_KEY" "$ELASTICSEARCH_URL/_rollup/job/sensor"' - - language: Java - code: | - client.rollup().deleteJob(d -> d - .id("sensor") - ); diff --git a/specification/rollup/get_jobs/examples/request/GetRollupJobRequestExample1.yaml b/specification/rollup/get_jobs/examples/request/GetRollupJobRequestExample1.yaml index ec266d8ddc..fc03b7a60e 100644 --- a/specification/rollup/get_jobs/examples/request/GetRollupJobRequestExample1.yaml +++ b/specification/rollup/get_jobs/examples/request/GetRollupJobRequestExample1.yaml @@ -1,29 +1 @@ method_request: GET _rollup/job/sensor -alternatives: - - language: Python - code: |- - resp = client.rollup.get_jobs( - id="sensor", - ) - - language: JavaScript - code: |- - const response = await client.rollup.getJobs({ - id: "sensor", - }); - - language: Ruby - code: |- - response = client.rollup.get_jobs( - id: "sensor" - ) - - language: PHP - code: |- - $resp = $client->rollup()->getJobs([ - "id" => "sensor", - ]); - - language: curl - code: 'curl -X GET -H "Authorization: ApiKey $ELASTIC_API_KEY" "$ELASTICSEARCH_URL/_rollup/job/sensor"' - - language: Java - code: | - client.rollup().getJobs(g -> g - .id("sensor") - ); diff --git a/specification/rollup/get_rollup_caps/examples/request/GetRollupCapabilitiesRequestExample1.yaml b/specification/rollup/get_rollup_caps/examples/request/GetRollupCapabilitiesRequestExample1.yaml index 9fc0e320a2..2ddfc8ee9c 100644 --- a/specification/rollup/get_rollup_caps/examples/request/GetRollupCapabilitiesRequestExample1.yaml +++ b/specification/rollup/get_rollup_caps/examples/request/GetRollupCapabilitiesRequestExample1.yaml @@ -1,29 +1 @@ method_request: GET _rollup/data/sensor-* -alternatives: - - language: Python - code: |- - resp = client.rollup.get_rollup_caps( - id="sensor-*", - ) - - language: JavaScript - code: |- - const response = await client.rollup.getRollupCaps({ - id: "sensor-*", - }); - - language: Ruby - code: |- - response = client.rollup.get_rollup_caps( - id: "sensor-*" - ) - - language: PHP - code: |- - $resp = $client->rollup()->getRollupCaps([ - "id" => "sensor-*", - ]); - - language: curl - code: 'curl -X GET -H "Authorization: ApiKey $ELASTIC_API_KEY" "$ELASTICSEARCH_URL/_rollup/data/sensor-*"' - - language: Java - code: | - client.rollup().getRollupCaps(g -> g - .id("sensor-*") - ); diff --git a/specification/rollup/get_rollup_index_caps/examples/request/GetRollupIndexCapabilitiesRequestExample1.yaml b/specification/rollup/get_rollup_index_caps/examples/request/GetRollupIndexCapabilitiesRequestExample1.yaml index 7d4ab2ef6d..01b9d8fe31 100644 --- a/specification/rollup/get_rollup_index_caps/examples/request/GetRollupIndexCapabilitiesRequestExample1.yaml +++ b/specification/rollup/get_rollup_index_caps/examples/request/GetRollupIndexCapabilitiesRequestExample1.yaml @@ -1,29 +1 @@ method_request: GET /sensor_rollup/_rollup/data -alternatives: - - language: Python - code: |- - resp = client.rollup.get_rollup_index_caps( - index="sensor_rollup", - ) - - language: JavaScript - code: |- - const response = await client.rollup.getRollupIndexCaps({ - index: "sensor_rollup", - }); - - language: Ruby - code: |- - response = client.rollup.get_rollup_index_caps( - index: "sensor_rollup" - ) - - language: PHP - code: |- - $resp = $client->rollup()->getRollupIndexCaps([ - "index" => "sensor_rollup", - ]); - - language: curl - code: 'curl -X GET -H "Authorization: ApiKey $ELASTIC_API_KEY" "$ELASTICSEARCH_URL/sensor_rollup/_rollup/data"' - - language: Java - code: | - client.rollup().getRollupIndexCaps(g -> g - .index("sensor_rollup") - ); diff --git a/specification/rollup/put_job/examples/request/CreateRollupJobRequestExample1.yaml b/specification/rollup/put_job/examples/request/CreateRollupJobRequestExample1.yaml index ae074d9546..560413e6a9 100644 --- a/specification/rollup/put_job/examples/request/CreateRollupJobRequestExample1.yaml +++ b/specification/rollup/put_job/examples/request/CreateRollupJobRequestExample1.yaml @@ -57,183 +57,3 @@ value: "{ \ ] }" -alternatives: - - language: Python - code: |- - resp = client.rollup.put_job( - id="sensor", - index_pattern="sensor-*", - rollup_index="sensor_rollup", - cron="*/30 * * * * ?", - page_size=1000, - groups={ - "date_histogram": { - "field": "timestamp", - "fixed_interval": "1h", - "delay": "7d" - }, - "terms": { - "fields": [ - "node" - ] - } - }, - metrics=[ - { - "field": "temperature", - "metrics": [ - "min", - "max", - "sum" - ] - }, - { - "field": "voltage", - "metrics": [ - "avg" - ] - } - ], - ) - - language: JavaScript - code: |- - const response = await client.rollup.putJob({ - id: "sensor", - index_pattern: "sensor-*", - rollup_index: "sensor_rollup", - cron: "*/30 * * * * ?", - page_size: 1000, - groups: { - date_histogram: { - field: "timestamp", - fixed_interval: "1h", - delay: "7d", - }, - terms: { - fields: ["node"], - }, - }, - metrics: [ - { - field: "temperature", - metrics: ["min", "max", "sum"], - }, - { - field: "voltage", - metrics: ["avg"], - }, - ], - }); - - language: Ruby - code: |- - response = client.rollup.put_job( - id: "sensor", - body: { - "index_pattern": "sensor-*", - "rollup_index": "sensor_rollup", - "cron": "*/30 * * * * ?", - "page_size": 1000, - "groups": { - "date_histogram": { - "field": "timestamp", - "fixed_interval": "1h", - "delay": "7d" - }, - "terms": { - "fields": [ - "node" - ] - } - }, - "metrics": [ - { - "field": "temperature", - "metrics": [ - "min", - "max", - "sum" - ] - }, - { - "field": "voltage", - "metrics": [ - "avg" - ] - } - ] - } - ) - - language: PHP - code: |- - $resp = $client->rollup()->putJob([ - "id" => "sensor", - "body" => [ - "index_pattern" => "sensor-*", - "rollup_index" => "sensor_rollup", - "cron" => "*/30 * * * * ?", - "page_size" => 1000, - "groups" => [ - "date_histogram" => [ - "field" => "timestamp", - "fixed_interval" => "1h", - "delay" => "7d", - ], - "terms" => [ - "fields" => array( - "node", - ), - ], - ], - "metrics" => array( - [ - "field" => "temperature", - "metrics" => array( - "min", - "max", - "sum", - ), - ], - [ - "field" => "voltage", - "metrics" => array( - "avg", - ), - ], - ), - ], - ]); - - language: curl - code: - "curl -X PUT -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d - '{\"index_pattern\":\"sensor-*\",\"rollup_index\":\"sensor_rollup\",\"cron\":\"*/30 * * * * - ?\",\"page_size\":1000,\"groups\":{\"date_histogram\":{\"field\":\"timestamp\",\"fixed_interval\":\"1h\",\"delay\":\"7d\"},\"\ - terms\":{\"fields\":[\"node\"]}},\"metrics\":[{\"field\":\"temperature\",\"metrics\":[\"min\",\"max\",\"sum\"]},{\"field\":\"\ - voltage\",\"metrics\":[\"avg\"]}]}' \"$ELASTICSEARCH_URL/_rollup/job/sensor\"" - - language: Java - code: | - client.rollup().putJob(p -> p - .cron("*/30 * * * * ?") - .groups(g -> g - .dateHistogram(d -> d - .delay(de -> de - .time("7d") - ) - .field("timestamp") - .fixedInterval(f -> f - .time("1h") - ) - ) - .terms(t -> t - .fields("node") - ) - ) - .id("sensor") - .indexPattern("sensor-*") - .metrics(List.of(FieldMetric.of(f -> f - .field("temperature") - .metrics(List.of(Metric.Min,Metric.Max,Metric.Sum))),FieldMetric.of(f -> f - .field("voltage") - .metrics(Metric.Avg)))) - .pageSize(1000) - .rollupIndex("sensor_rollup") - ); diff --git a/specification/rollup/rollup_search/RollupSearchRequest.ts b/specification/rollup/rollup_search/RollupSearchRequest.ts index 75d3378ccc..622cd9dd2d 100644 --- a/specification/rollup/rollup_search/RollupSearchRequest.ts +++ b/specification/rollup/rollup_search/RollupSearchRequest.ts @@ -35,36 +35,13 @@ import { Dictionary } from '@spec_utils/Dictionary' * `size`: Because rollups work on pre-aggregated data, no search hits can be returned and so size must be set to zero or omitted entirely. * `highlighter`, `suggestors`, `post_filter`, `profile`, `explain`: These are similarly disallowed. * - * **Searching both historical rollup and non-rollup data** + * For more detailed examples of using the rollup search API, including querying rolled-up data only or combining rolled-up and live data, refer to the External documentation. * - * The rollup search API has the capability to search across both "live" non-rollup data and the aggregated rollup data. - * This is done by simply adding the live indices to the URI. For example: - * - * ``` - * GET sensor-1,sensor_rollup/_rollup_search - * { - * "size": 0, - * "aggregations": { - * "max_temperature": { - * "max": { - * "field": "temperature" - * } - * } - * } - * } - * ``` - * - * The rollup search endpoint does two things when the search runs: - * - * * The original request is sent to the non-rollup index unaltered. - * * A rewritten version of the original request is sent to the rollup index. - * - * When the two responses are received, the endpoint rewrites the rollup response and merges the two together. - * During the merging process, if there is any overlap in buckets between the two responses, the buckets from the non-rollup index are used. * @rest_spec_name rollup.rollup_search * @availability stack since=6.3.0 stability=experimental * @deprecated 8.11.0 * @doc_id rollup-search + * @ext_doc_id rollup-examples */ export interface Request extends RequestBase { urls: [ diff --git a/specification/rollup/rollup_search/examples/request/RollupSearchRequestExample1.yaml b/specification/rollup/rollup_search/examples/request/RollupSearchRequestExample1.yaml index 75d049026f..eb955cd4a3 100644 --- a/specification/rollup/rollup_search/examples/request/RollupSearchRequestExample1.yaml +++ b/specification/rollup/rollup_search/examples/request/RollupSearchRequestExample1.yaml @@ -21,76 +21,3 @@ value: "{ \ } }" -alternatives: - - language: Python - code: |- - resp = client.rollup.rollup_search( - index="sensor_rollup", - size=0, - aggregations={ - "max_temperature": { - "max": { - "field": "temperature" - } - } - }, - ) - - language: JavaScript - code: |- - const response = await client.rollup.rollupSearch({ - index: "sensor_rollup", - size: 0, - aggregations: { - max_temperature: { - max: { - field: "temperature", - }, - }, - }, - }); - - language: Ruby - code: |- - response = client.rollup.rollup_search( - index: "sensor_rollup", - body: { - "size": 0, - "aggregations": { - "max_temperature": { - "max": { - "field": "temperature" - } - } - } - } - ) - - language: PHP - code: |- - $resp = $client->rollup()->rollupSearch([ - "index" => "sensor_rollup", - "body" => [ - "size" => 0, - "aggregations" => [ - "max_temperature" => [ - "max" => [ - "field" => "temperature", - ], - ], - ], - ], - ]); - - language: curl - code: - 'curl -X GET -H "Authorization: ApiKey $ELASTIC_API_KEY" -H "Content-Type: application/json" -d - ''{"size":0,"aggregations":{"max_temperature":{"max":{"field":"temperature"}}}}'' - "$ELASTICSEARCH_URL/sensor_rollup/_rollup_search"' - - language: Java - code: | - client.rollup().rollupSearch(r -> r - .aggregations("max_temperature", a -> a - .max(m -> m - .field("temperature") - ) - ) - .index("sensor_rollup") - .size(0) - ); diff --git a/specification/rollup/start_job/examples/request/StartRollupJobRequestExample1.yaml b/specification/rollup/start_job/examples/request/StartRollupJobRequestExample1.yaml index dbbd33b121..8ddfdb7299 100644 --- a/specification/rollup/start_job/examples/request/StartRollupJobRequestExample1.yaml +++ b/specification/rollup/start_job/examples/request/StartRollupJobRequestExample1.yaml @@ -1,29 +1 @@ method_request: POST _rollup/job/sensor/_start -alternatives: - - language: Python - code: |- - resp = client.rollup.start_job( - id="sensor", - ) - - language: JavaScript - code: |- - const response = await client.rollup.startJob({ - id: "sensor", - }); - - language: Ruby - code: |- - response = client.rollup.start_job( - id: "sensor" - ) - - language: PHP - code: |- - $resp = $client->rollup()->startJob([ - "id" => "sensor", - ]); - - language: curl - code: 'curl -X POST -H "Authorization: ApiKey $ELASTIC_API_KEY" "$ELASTICSEARCH_URL/_rollup/job/sensor/_start"' - - language: Java - code: | - client.rollup().startJob(s -> s - .id("sensor") - ); diff --git a/specification/rollup/stop_job/examples/request/RollupStopJobExample1.yaml b/specification/rollup/stop_job/examples/request/RollupStopJobExample1.yaml index bfb46170ef..40619f2064 100644 --- a/specification/rollup/stop_job/examples/request/RollupStopJobExample1.yaml +++ b/specification/rollup/stop_job/examples/request/RollupStopJobExample1.yaml @@ -1,42 +1 @@ method_request: POST _rollup/job/sensor/_stop?wait_for_completion=true&timeout=10s -alternatives: - - language: Python - code: |- - resp = client.rollup.stop_job( - id="sensor", - wait_for_completion=True, - timeout="10s", - ) - - language: JavaScript - code: |- - const response = await client.rollup.stopJob({ - id: "sensor", - wait_for_completion: "true", - timeout: "10s", - }); - - language: Ruby - code: |- - response = client.rollup.stop_job( - id: "sensor", - wait_for_completion: "true", - timeout: "10s" - ) - - language: PHP - code: |- - $resp = $client->rollup()->stopJob([ - "id" => "sensor", - "wait_for_completion" => "true", - "timeout" => "10s", - ]); - - language: curl - code: 'curl -X POST -H "Authorization: ApiKey $ELASTIC_API_KEY" - "$ELASTICSEARCH_URL/_rollup/job/sensor/_stop?wait_for_completion=true&timeout=10s"' - - language: Java - code: | - client.rollup().stopJob(s -> s - .id("sensor") - .timeout(t -> t - .offset(10) - ) - .waitForCompletion(true) - ); diff --git a/specification/search_application/delete/examples/request/SearchApplicationDeleteExample1.yaml b/specification/search_application/delete/examples/request/SearchApplicationDeleteExample1.yaml index f76ad9d5e4..7798b430d6 100644 --- a/specification/search_application/delete/examples/request/SearchApplicationDeleteExample1.yaml +++ b/specification/search_application/delete/examples/request/SearchApplicationDeleteExample1.yaml @@ -1,29 +1 @@ method_request: DELETE _application/search_application/my-app/ -alternatives: - - language: Python - code: |- - resp = client.search_application.delete( - name="my-app", - ) - - language: JavaScript - code: |- - const response = await client.searchApplication.delete({ - name: "my-app", - }); - - language: Ruby - code: |- - response = client.search_application.delete( - name: "my-app" - ) - - language: PHP - code: |- - $resp = $client->searchApplication()->delete([ - "name" => "my-app", - ]); - - language: curl - code: 'curl -X DELETE -H "Authorization: ApiKey $ELASTIC_API_KEY" "$ELASTICSEARCH_URL/_application/search_application/my-app/"' - - language: Java - code: | - client.searchApplication().delete(d -> d - .name("my-app") - ); diff --git a/specification/search_application/delete_behavioral_analytics/examples/request/SearchApplicationDeleteBehavioralAnalyticsExample1.yaml b/specification/search_application/delete_behavioral_analytics/examples/request/SearchApplicationDeleteBehavioralAnalyticsExample1.yaml index 3fb9ebf9d9..4e5eda09a5 100644 --- a/specification/search_application/delete_behavioral_analytics/examples/request/SearchApplicationDeleteBehavioralAnalyticsExample1.yaml +++ b/specification/search_application/delete_behavioral_analytics/examples/request/SearchApplicationDeleteBehavioralAnalyticsExample1.yaml @@ -1,30 +1 @@ method_request: DELETE _application/analytics/my_analytics_collection/ -alternatives: - - language: Python - code: |- - resp = client.search_application.delete_behavioral_analytics( - name="my_analytics_collection", - ) - - language: JavaScript - code: |- - const response = await client.searchApplication.deleteBehavioralAnalytics({ - name: "my_analytics_collection", - }); - - language: Ruby - code: |- - response = client.search_application.delete_behavioral_analytics( - name: "my_analytics_collection" - ) - - language: PHP - code: |- - $resp = $client->searchApplication()->deleteBehavioralAnalytics([ - "name" => "my_analytics_collection", - ]); - - language: curl - code: 'curl -X DELETE -H "Authorization: ApiKey $ELASTIC_API_KEY" - "$ELASTICSEARCH_URL/_application/analytics/my_analytics_collection/"' - - language: Java - code: | - client.searchApplication().deleteBehavioralAnalytics(d -> d - .name("my_analytics_collection") - ); diff --git a/specification/search_application/get/examples/request/SearchApplicationGetRequestExample1.yaml b/specification/search_application/get/examples/request/SearchApplicationGetRequestExample1.yaml index 45c3f339c6..3e3bbd8ce3 100644 --- a/specification/search_application/get/examples/request/SearchApplicationGetRequestExample1.yaml +++ b/specification/search_application/get/examples/request/SearchApplicationGetRequestExample1.yaml @@ -1,29 +1 @@ method_request: GET _application/search_application/my-app/ -alternatives: - - language: Python - code: |- - resp = client.search_application.get( - name="my-app", - ) - - language: JavaScript - code: |- - const response = await client.searchApplication.get({ - name: "my-app", - }); - - language: Ruby - code: |- - response = client.search_application.get( - name: "my-app" - ) - - language: PHP - code: |- - $resp = $client->searchApplication()->get([ - "name" => "my-app", - ]); - - language: curl - code: 'curl -X GET -H "Authorization: ApiKey $ELASTIC_API_KEY" "$ELASTICSEARCH_URL/_application/search_application/my-app/"' - - language: Java - code: | - client.searchApplication().get(g -> g - .name("my-app") - ); diff --git a/specification/search_application/get_behavioral_analytics/examples/request/BehavioralAnalyticsGetRequestExample1.yaml b/specification/search_application/get_behavioral_analytics/examples/request/BehavioralAnalyticsGetRequestExample1.yaml index 9c10b4b77c..072e6eb801 100644 --- a/specification/search_application/get_behavioral_analytics/examples/request/BehavioralAnalyticsGetRequestExample1.yaml +++ b/specification/search_application/get_behavioral_analytics/examples/request/BehavioralAnalyticsGetRequestExample1.yaml @@ -1,29 +1 @@ method_request: GET _application/analytics/my* -alternatives: - - language: Python - code: |- - resp = client.search_application.get_behavioral_analytics( - name="my*", - ) - - language: JavaScript - code: |- - const response = await client.searchApplication.getBehavioralAnalytics({ - name: "my*", - }); - - language: Ruby - code: |- - response = client.search_application.get_behavioral_analytics( - name: "my*" - ) - - language: PHP - code: |- - $resp = $client->searchApplication()->getBehavioralAnalytics([ - "name" => "my*", - ]); - - language: curl - code: 'curl -X GET -H "Authorization: ApiKey $ELASTIC_API_KEY" "$ELASTICSEARCH_URL/_application/analytics/my*"' - - language: Java - code: | - client.searchApplication().getBehavioralAnalytics(g -> g - .name("my*") - ); diff --git a/specification/search_application/list/examples/request/SearchApplicationsListRequestExample1.yaml b/specification/search_application/list/examples/request/SearchApplicationsListRequestExample1.yaml index c8594bc3d1..16096a75a2 100644 --- a/specification/search_application/list/examples/request/SearchApplicationsListRequestExample1.yaml +++ b/specification/search_application/list/examples/request/SearchApplicationsListRequestExample1.yaml @@ -1,40 +1 @@ method_request: GET _application/search_application?from=0&size=3&q=app* -alternatives: - - language: Python - code: |- - resp = client.search_application.list( - from="0", - size="3", - q="app*", - ) - - language: JavaScript - code: |- - const response = await client.searchApplication.list({ - from: 0, - size: 3, - q: "app*", - }); - - language: Ruby - code: |- - response = client.search_application.list( - from: "0", - size: "3", - q: "app*" - ) - - language: PHP - code: |- - $resp = $client->searchApplication()->list([ - "from" => "0", - "size" => "3", - "q" => "app*", - ]); - - language: curl - code: 'curl -X GET -H "Authorization: ApiKey $ELASTIC_API_KEY" - "$ELASTICSEARCH_URL/_application/search_application?from=0&size=3&q=app*"' - - language: Java - code: | - client.searchApplication().list(l -> l - .from(0) - .q("app*") - .size(3) - ); diff --git a/specification/search_application/post_behavioral_analytics_event/examples/request/BehavioralAnalyticsEventPostRequestExample1.yaml b/specification/search_application/post_behavioral_analytics_event/examples/request/BehavioralAnalyticsEventPostRequestExample1.yaml index 415f7b0d27..036bc78258 100644 --- a/specification/search_application/post_behavioral_analytics_event/examples/request/BehavioralAnalyticsEventPostRequestExample1.yaml +++ b/specification/search_application/post_behavioral_analytics_event/examples/request/BehavioralAnalyticsEventPostRequestExample1.yaml @@ -63,163 +63,3 @@ value: "{ \ } }" -alternatives: - - language: Python - code: |- - resp = client.search_application.post_behavioral_analytics_event( - collection_name="my_analytics_collection", - event_type="search_click", - payload={ - "session": { - "id": "1797ca95-91c9-4e2e-b1bd-9c38e6f386a9" - }, - "user": { - "id": "5f26f01a-bbee-4202-9298-81261067abbd" - }, - "search": { - "query": "search term", - "results": { - "items": [ - { - "document": { - "id": "123", - "index": "products" - } - } - ], - "total_results": 10 - }, - "sort": { - "name": "relevance" - }, - "search_application": "website" - }, - "document": { - "id": "123", - "index": "products" - } - }, - ) - - language: JavaScript - code: |- - const response = await client.searchApplication.postBehavioralAnalyticsEvent({ - collection_name: "my_analytics_collection", - event_type: "search_click", - payload: { - session: { - id: "1797ca95-91c9-4e2e-b1bd-9c38e6f386a9", - }, - user: { - id: "5f26f01a-bbee-4202-9298-81261067abbd", - }, - search: { - query: "search term", - results: { - items: [ - { - document: { - id: "123", - index: "products", - }, - }, - ], - total_results: 10, - }, - sort: { - name: "relevance", - }, - search_application: "website", - }, - document: { - id: "123", - index: "products", - }, - }, - }); - - language: Ruby - code: |- - response = client.search_application.post_behavioral_analytics_event( - collection_name: "my_analytics_collection", - event_type: "search_click", - body: { - "session": { - "id": "1797ca95-91c9-4e2e-b1bd-9c38e6f386a9" - }, - "user": { - "id": "5f26f01a-bbee-4202-9298-81261067abbd" - }, - "search": { - "query": "search term", - "results": { - "items": [ - { - "document": { - "id": "123", - "index": "products" - } - } - ], - "total_results": 10 - }, - "sort": { - "name": "relevance" - }, - "search_application": "website" - }, - "document": { - "id": "123", - "index": "products" - } - } - ) - - language: PHP - code: |- - $resp = $client->searchApplication()->postBehavioralAnalyticsEvent([ - "collection_name" => "my_analytics_collection", - "event_type" => "search_click", - "body" => [ - "session" => [ - "id" => "1797ca95-91c9-4e2e-b1bd-9c38e6f386a9", - ], - "user" => [ - "id" => "5f26f01a-bbee-4202-9298-81261067abbd", - ], - "search" => [ - "query" => "search term", - "results" => [ - "items" => array( - [ - "document" => [ - "id" => "123", - "index" => "products", - ], - ], - ), - "total_results" => 10, - ], - "sort" => [ - "name" => "relevance", - ], - "search_application" => "website", - ], - "document" => [ - "id" => "123", - "index" => "products", - ], - ], - ]); - - language: curl - code: - "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d - '{\"session\":{\"id\":\"1797ca95-91c9-4e2e-b1bd-9c38e6f386a9\"},\"user\":{\"id\":\"5f26f01a-bbee-4202-9298-81261067abbd\"},\"\ - search\":{\"query\":\"search - term\",\"results\":{\"items\":[{\"document\":{\"id\":\"123\",\"index\":\"products\"}}],\"total_results\":10},\"sort\":{\"name\ - \":\"relevance\"},\"search_application\":\"website\"},\"document\":{\"id\":\"123\",\"index\":\"products\"}}' - \"$ELASTICSEARCH_URL/_application/analytics/my_analytics_collection/event/search_click\"" - - language: Java - code: > - client.searchApplication().postBehavioralAnalyticsEvent(p -> p - .collectionName("my_analytics_collection") - .eventType(EventType.SearchClick) - .payload(JsonData.fromJson("{\"session\":{\"id\":\"1797ca95-91c9-4e2e-b1bd-9c38e6f386a9\"},\"user\":{\"id\":\"5f26f01a-bbee-4202-9298-81261067abbd\"},\"search\":{\"query\":\"search term\",\"results\":{\"items\":[{\"document\":{\"id\":\"123\",\"index\":\"products\"}}],\"total_results\":10},\"sort\":{\"name\":\"relevance\"},\"search_application\":\"website\"},\"document\":{\"id\":\"123\",\"index\":\"products\"}}")) - ); diff --git a/specification/search_application/put/examples/request/SearchApplicationPutRequestExample1.yaml b/specification/search_application/put/examples/request/SearchApplicationPutRequestExample1.yaml index 7e58ba7b02..6a5d5992f8 100644 --- a/specification/search_application/put/examples/request/SearchApplicationPutRequestExample1.yaml +++ b/specification/search_application/put/examples/request/SearchApplicationPutRequestExample1.yaml @@ -80,207 +80,3 @@ value: "{ \ } }" -alternatives: - - language: Python - code: |- - resp = client.search_application.put( - name="my-app", - search_application={ - "indices": [ - "index1", - "index2" - ], - "template": { - "script": { - "source": { - "query": { - "query_string": { - "query": "{{query_string}}", - "default_field": "{{default_field}}" - } - } - }, - "params": { - "query_string": "*", - "default_field": "*" - } - }, - "dictionary": { - "properties": { - "query_string": { - "type": "string" - }, - "default_field": { - "type": "string", - "enum": [ - "title", - "description" - ] - }, - "additionalProperties": False - }, - "required": [ - "query_string" - ] - } - } - }, - ) - - language: JavaScript - code: |- - const response = await client.searchApplication.put({ - name: "my-app", - search_application: { - indices: ["index1", "index2"], - template: { - script: { - source: { - query: { - query_string: { - query: "{{query_string}}", - default_field: "{{default_field}}", - }, - }, - }, - params: { - query_string: "*", - default_field: "*", - }, - }, - dictionary: { - properties: { - query_string: { - type: "string", - }, - default_field: { - type: "string", - enum: ["title", "description"], - }, - additionalProperties: false, - }, - required: ["query_string"], - }, - }, - }, - }); - - language: Ruby - code: |- - response = client.search_application.put( - name: "my-app", - body: { - "indices": [ - "index1", - "index2" - ], - "template": { - "script": { - "source": { - "query": { - "query_string": { - "query": "{{query_string}}", - "default_field": "{{default_field}}" - } - } - }, - "params": { - "query_string": "*", - "default_field": "*" - } - }, - "dictionary": { - "properties": { - "query_string": { - "type": "string" - }, - "default_field": { - "type": "string", - "enum": [ - "title", - "description" - ] - }, - "additionalProperties": false - }, - "required": [ - "query_string" - ] - } - } - } - ) - - language: PHP - code: |- - $resp = $client->searchApplication()->put([ - "name" => "my-app", - "body" => [ - "indices" => array( - "index1", - "index2", - ), - "template" => [ - "script" => [ - "source" => [ - "query" => [ - "query_string" => [ - "query" => "{{query_string}}", - "default_field" => "{{default_field}}", - ], - ], - ], - "params" => [ - "query_string" => "*", - "default_field" => "*", - ], - ], - "dictionary" => [ - "properties" => [ - "query_string" => [ - "type" => "string", - ], - "default_field" => [ - "type" => "string", - "enum" => array( - "title", - "description", - ), - ], - "additionalProperties" => false, - ], - "required" => array( - "query_string", - ), - ], - ], - ], - ]); - - language: curl - code: - "curl -X PUT -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d - '{\"indices\":[\"index1\",\"index2\"],\"template\":{\"script\":{\"source\":{\"query\":{\"query_string\":{\"query\":\"{{query_\ - string}}\",\"default_field\":\"{{default_field}}\"}}},\"params\":{\"query_string\":\"*\",\"default_field\":\"*\"}},\"dictiona\ - ry\":{\"properties\":{\"query_string\":{\"type\":\"string\"},\"default_field\":{\"type\":\"string\",\"enum\":[\"title\",\"des\ - cription\"]},\"additionalProperties\":false},\"required\":[\"query_string\"]}}}' - \"$ELASTICSEARCH_URL/_application/search_application/my-app\"" - - language: Java - code: | - client.searchApplication().put(p -> p - .name("my-app") - .searchApplication(s -> s - .indices(List.of("index1","index2")) - .template(t -> t - .script(sc -> sc - .source(so -> so - .scriptTemplate(scr -> scr - .query(q -> q - .queryString(qu -> qu - .defaultField("{{default_field}}") - .query("{{query_string}}") - ) - ) - ) - ) - .params(Map.of("default_field", JsonData.fromJson("\"*\""),"query_string", JsonData.fromJson("\"*\""))) - ) - ) - ) - ); diff --git a/specification/search_application/put_behavioral_analytics/examples/request/SearchApplicationPutBehavioralAnalyticsExample1.yaml b/specification/search_application/put_behavioral_analytics/examples/request/SearchApplicationPutBehavioralAnalyticsExample1.yaml index 60d6da4f34..4aaf67d23a 100644 --- a/specification/search_application/put_behavioral_analytics/examples/request/SearchApplicationPutBehavioralAnalyticsExample1.yaml +++ b/specification/search_application/put_behavioral_analytics/examples/request/SearchApplicationPutBehavioralAnalyticsExample1.yaml @@ -1,29 +1 @@ method_request: PUT _application/analytics/my_analytics_collection -alternatives: - - language: Python - code: |- - resp = client.search_application.put_behavioral_analytics( - name="my_analytics_collection", - ) - - language: JavaScript - code: |- - const response = await client.searchApplication.putBehavioralAnalytics({ - name: "my_analytics_collection", - }); - - language: Ruby - code: |- - response = client.search_application.put_behavioral_analytics( - name: "my_analytics_collection" - ) - - language: PHP - code: |- - $resp = $client->searchApplication()->putBehavioralAnalytics([ - "name" => "my_analytics_collection", - ]); - - language: curl - code: 'curl -X PUT -H "Authorization: ApiKey $ELASTIC_API_KEY" "$ELASTICSEARCH_URL/_application/analytics/my_analytics_collection"' - - language: Java - code: | - client.searchApplication().putBehavioralAnalytics(p -> p - .name("my_analytics_collection") - ); diff --git a/specification/search_application/render_query/examples/request/SearchApplicationsRenderQueryRequestExample1.yaml b/specification/search_application/render_query/examples/request/SearchApplicationsRenderQueryRequestExample1.yaml index 97426feaea..1a3ee03714 100644 --- a/specification/search_application/render_query/examples/request/SearchApplicationsRenderQueryRequestExample1.yaml +++ b/specification/search_application/render_query/examples/request/SearchApplicationsRenderQueryRequestExample1.yaml @@ -12,92 +12,3 @@ value: boost: 5 - name: description boost: 1 -alternatives: - - language: Python - code: |- - resp = client.search_application.render_query( - name="my-app", - params={ - "query_string": "my first query", - "text_fields": [ - { - "name": "title", - "boost": 5 - }, - { - "name": "description", - "boost": 1 - } - ] - }, - ) - - language: JavaScript - code: |- - const response = await client.searchApplication.renderQuery({ - name: "my-app", - params: { - query_string: "my first query", - text_fields: [ - { - name: "title", - boost: 5, - }, - { - name: "description", - boost: 1, - }, - ], - }, - }); - - language: Ruby - code: |- - response = client.search_application.render_query( - name: "my-app", - body: { - "params": { - "query_string": "my first query", - "text_fields": [ - { - "name": "title", - "boost": 5 - }, - { - "name": "description", - "boost": 1 - } - ] - } - } - ) - - language: PHP - code: |- - $resp = $client->searchApplication()->renderQuery([ - "name" => "my-app", - "body" => [ - "params" => [ - "query_string" => "my first query", - "text_fields" => array( - [ - "name" => "title", - "boost" => 5, - ], - [ - "name" => "description", - "boost" => 1, - ], - ), - ], - ], - ]); - - language: curl - code: - 'curl -X POST -H "Authorization: ApiKey $ELASTIC_API_KEY" -H "Content-Type: application/json" -d - ''{"params":{"query_string":"my first - query","text_fields":[{"name":"title","boost":5},{"name":"description","boost":1}]}}'' - "$ELASTICSEARCH_URL/_application/search_application/my-app/_render_query"' - - language: Java - code: > - client.searchApplication().renderQuery(r -> r - .name("my-app") - .params(Map.of("text_fields", JsonData.fromJson("[{\"name\":\"title\",\"boost\":5},{\"name\":\"description\",\"boost\":1}]"),"query_string", JsonData.fromJson("\"my first query\""))) - ); diff --git a/specification/search_application/search/examples/request/SearchApplicationsSearchRequestExample1.yaml b/specification/search_application/search/examples/request/SearchApplicationsSearchRequestExample1.yaml index 76d100b7b4..dbacffc671 100644 --- a/specification/search_application/search/examples/request/SearchApplicationsSearchRequestExample1.yaml +++ b/specification/search_application/search/examples/request/SearchApplicationsSearchRequestExample1.yaml @@ -21,92 +21,3 @@ value: "{ \ } }" -alternatives: - - language: Python - code: |- - resp = client.search_application.search( - name="my-app", - params={ - "query_string": "my first query", - "text_fields": [ - { - "name": "title", - "boost": 5 - }, - { - "name": "description", - "boost": 1 - } - ] - }, - ) - - language: JavaScript - code: |- - const response = await client.searchApplication.search({ - name: "my-app", - params: { - query_string: "my first query", - text_fields: [ - { - name: "title", - boost: 5, - }, - { - name: "description", - boost: 1, - }, - ], - }, - }); - - language: Ruby - code: |- - response = client.search_application.search( - name: "my-app", - body: { - "params": { - "query_string": "my first query", - "text_fields": [ - { - "name": "title", - "boost": 5 - }, - { - "name": "description", - "boost": 1 - } - ] - } - } - ) - - language: PHP - code: |- - $resp = $client->searchApplication()->search([ - "name" => "my-app", - "body" => [ - "params" => [ - "query_string" => "my first query", - "text_fields" => array( - [ - "name" => "title", - "boost" => 5, - ], - [ - "name" => "description", - "boost" => 1, - ], - ), - ], - ], - ]); - - language: curl - code: - 'curl -X POST -H "Authorization: ApiKey $ELASTIC_API_KEY" -H "Content-Type: application/json" -d - ''{"params":{"query_string":"my first - query","text_fields":[{"name":"title","boost":5},{"name":"description","boost":1}]}}'' - "$ELASTICSEARCH_URL/_application/search_application/my-app/_search"' - - language: Java - code: > - client.searchApplication().search(s -> s - .name("my-app") - .params(Map.of("text_fields", JsonData.fromJson("[{\"name\":\"title\",\"boost\":5},{\"name\":\"description\",\"boost\":1}]"),"query_string", JsonData.fromJson("\"my first query\""))) - ); diff --git a/specification/searchable_snapshots/cache_stats/examples/request/CacheStatsRequestExample1.yaml b/specification/searchable_snapshots/cache_stats/examples/request/CacheStatsRequestExample1.yaml index e7decf4f76..f42d35458a 100644 --- a/specification/searchable_snapshots/cache_stats/examples/request/CacheStatsRequestExample1.yaml +++ b/specification/searchable_snapshots/cache_stats/examples/request/CacheStatsRequestExample1.yaml @@ -1,15 +1 @@ method_request: GET /_searchable_snapshots/cache/stats -alternatives: - - language: Python - code: resp = client.searchable_snapshots.cache_stats() - - language: JavaScript - code: const response = await client.searchableSnapshots.cacheStats(); - - language: Ruby - code: response = client.searchable_snapshots.cache_stats - - language: PHP - code: $resp = $client->searchableSnapshots()->cacheStats(); - - language: curl - code: 'curl -X GET -H "Authorization: ApiKey $ELASTIC_API_KEY" "$ELASTICSEARCH_URL/_searchable_snapshots/cache/stats"' - - language: Java - code: | - client.searchableSnapshots().cacheStats(c -> c); diff --git a/specification/searchable_snapshots/clear_cache/examples/request/SearchableSnapshotsClearCacheExample1.yaml b/specification/searchable_snapshots/clear_cache/examples/request/SearchableSnapshotsClearCacheExample1.yaml index e66a380c03..39b7c88abf 100644 --- a/specification/searchable_snapshots/clear_cache/examples/request/SearchableSnapshotsClearCacheExample1.yaml +++ b/specification/searchable_snapshots/clear_cache/examples/request/SearchableSnapshotsClearCacheExample1.yaml @@ -1,29 +1 @@ method_request: POST /my-index/_searchable_snapshots/cache/clear -alternatives: - - language: Python - code: |- - resp = client.searchable_snapshots.clear_cache( - index="my-index", - ) - - language: JavaScript - code: |- - const response = await client.searchableSnapshots.clearCache({ - index: "my-index", - }); - - language: Ruby - code: |- - response = client.searchable_snapshots.clear_cache( - index: "my-index" - ) - - language: PHP - code: |- - $resp = $client->searchableSnapshots()->clearCache([ - "index" => "my-index", - ]); - - language: curl - code: 'curl -X POST -H "Authorization: ApiKey $ELASTIC_API_KEY" "$ELASTICSEARCH_URL/my-index/_searchable_snapshots/cache/clear"' - - language: Java - code: | - client.searchableSnapshots().clearCache(c -> c - .index("my-index") - ); diff --git a/specification/searchable_snapshots/mount/examples/request/SearchableSnapshotsMountSnapshotRequestExample1.yaml b/specification/searchable_snapshots/mount/examples/request/SearchableSnapshotsMountSnapshotRequestExample1.yaml index e87ec14a2c..cc79de9fce 100644 --- a/specification/searchable_snapshots/mount/examples/request/SearchableSnapshotsMountSnapshotRequestExample1.yaml +++ b/specification/searchable_snapshots/mount/examples/request/SearchableSnapshotsMountSnapshotRequestExample1.yaml @@ -19,82 +19,3 @@ value: "{ \ \"ignore_index_settings\": [ \"index.refresh_interval\" ] }" -alternatives: - - language: Python - code: |- - resp = client.searchable_snapshots.mount( - repository="my_repository", - snapshot="my_snapshot", - wait_for_completion=True, - index="my_docs", - renamed_index="docs", - index_settings={ - "index.number_of_replicas": 0 - }, - ignore_index_settings=[ - "index.refresh_interval" - ], - ) - - language: JavaScript - code: |- - const response = await client.searchableSnapshots.mount({ - repository: "my_repository", - snapshot: "my_snapshot", - wait_for_completion: "true", - index: "my_docs", - renamed_index: "docs", - index_settings: { - "index.number_of_replicas": 0, - }, - ignore_index_settings: ["index.refresh_interval"], - }); - - language: Ruby - code: |- - response = client.searchable_snapshots.mount( - repository: "my_repository", - snapshot: "my_snapshot", - wait_for_completion: "true", - body: { - "index": "my_docs", - "renamed_index": "docs", - "index_settings": { - "index.number_of_replicas": 0 - }, - "ignore_index_settings": [ - "index.refresh_interval" - ] - } - ) - - language: PHP - code: |- - $resp = $client->searchableSnapshots()->mount([ - "repository" => "my_repository", - "snapshot" => "my_snapshot", - "wait_for_completion" => "true", - "body" => [ - "index" => "my_docs", - "renamed_index" => "docs", - "index_settings" => [ - "index.number_of_replicas" => 0, - ], - "ignore_index_settings" => array( - "index.refresh_interval", - ), - ], - ]); - - language: curl - code: - "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d - '{\"index\":\"my_docs\",\"renamed_index\":\"docs\",\"index_settings\":{\"index.number_of_replicas\":0},\"ignore_index_settings\ - \":[\"index.refresh_interval\"]}' \"$ELASTICSEARCH_URL/_snapshot/my_repository/my_snapshot/_mount?wait_for_completion=true\"" - - language: Java - code: | - client.searchableSnapshots().mount(m -> m - .ignoreIndexSettings("index.refresh_interval") - .index("my_docs") - .indexSettings("index.number_of_replicas", JsonData.fromJson("0")) - .renamedIndex("docs") - .repository("my_repository") - .snapshot("my_snapshot") - .waitForCompletion(true) - ); diff --git a/specification/searchable_snapshots/stats/examples/request/SearchableSnapshotsStatsExample1.yaml b/specification/searchable_snapshots/stats/examples/request/SearchableSnapshotsStatsExample1.yaml index 15b9363e97..b87278903e 100644 --- a/specification/searchable_snapshots/stats/examples/request/SearchableSnapshotsStatsExample1.yaml +++ b/specification/searchable_snapshots/stats/examples/request/SearchableSnapshotsStatsExample1.yaml @@ -1,29 +1 @@ method_request: GET /my-index/_searchable_snapshots/stats -alternatives: - - language: Python - code: |- - resp = client.searchable_snapshots.stats( - index="my-index", - ) - - language: JavaScript - code: |- - const response = await client.searchableSnapshots.stats({ - index: "my-index", - }); - - language: Ruby - code: |- - response = client.searchable_snapshots.stats( - index: "my-index" - ) - - language: PHP - code: |- - $resp = $client->searchableSnapshots()->stats([ - "index" => "my-index", - ]); - - language: curl - code: 'curl -X GET -H "Authorization: ApiKey $ELASTIC_API_KEY" "$ELASTICSEARCH_URL/my-index/_searchable_snapshots/stats"' - - language: Java - code: | - client.searchableSnapshots().stats(s -> s - .index("my-index") - ); diff --git a/specification/security/activate_user_profile/examples/request/ActivateUserProfileRequestExample1.yaml b/specification/security/activate_user_profile/examples/request/ActivateUserProfileRequestExample1.yaml index f36dfcec8e..203118735a 100644 --- a/specification/security/activate_user_profile/examples/request/ActivateUserProfileRequestExample1.yaml +++ b/specification/security/activate_user_profile/examples/request/ActivateUserProfileRequestExample1.yaml @@ -9,48 +9,3 @@ value: |- "username" : "jacknich", "password" : "l0ng-r4nd0m-p@ssw0rd" } -alternatives: - - language: Python - code: |- - resp = client.security.activate_user_profile( - grant_type="password", - username="jacknich", - password="l0ng-r4nd0m-p@ssw0rd", - ) - - language: JavaScript - code: |- - const response = await client.security.activateUserProfile({ - grant_type: "password", - username: "jacknich", - password: "l0ng-r4nd0m-p@ssw0rd", - }); - - language: Ruby - code: |- - response = client.security.activate_user_profile( - body: { - "grant_type": "password", - "username": "jacknich", - "password": "l0ng-r4nd0m-p@ssw0rd" - } - ) - - language: PHP - code: |- - $resp = $client->security()->activateUserProfile([ - "body" => [ - "grant_type" => "password", - "username" => "jacknich", - "password" => "l0ng-r4nd0m-p@ssw0rd", - ], - ]); - - language: curl - code: - 'curl -X POST -H "Authorization: ApiKey $ELASTIC_API_KEY" -H "Content-Type: application/json" -d - ''{"grant_type":"password","username":"jacknich","password":"l0ng-r4nd0m-p@ssw0rd"}'' - "$ELASTICSEARCH_URL/_security/profile/_activate"' - - language: Java - code: | - client.security().activateUserProfile(a -> a - .grantType(GrantType.Password) - .password("l0ng-r4nd0m-p@ssw0rd") - .username("jacknich") - ); diff --git a/specification/security/authenticate/examples/request/SecurityAuthenticateRequestExample1.yaml b/specification/security/authenticate/examples/request/SecurityAuthenticateRequestExample1.yaml index d5a3393892..ac8802f5a3 100644 --- a/specification/security/authenticate/examples/request/SecurityAuthenticateRequestExample1.yaml +++ b/specification/security/authenticate/examples/request/SecurityAuthenticateRequestExample1.yaml @@ -1,15 +1 @@ method_request: GET /_security/_authenticate -alternatives: - - language: Python - code: resp = client.security.authenticate() - - language: JavaScript - code: const response = await client.security.authenticate(); - - language: Ruby - code: response = client.security.authenticate - - language: PHP - code: $resp = $client->security()->authenticate(); - - language: curl - code: 'curl -X GET -H "Authorization: ApiKey $ELASTIC_API_KEY" "$ELASTICSEARCH_URL/_security/_authenticate"' - - language: Java - code: | - client.security().authenticate(); diff --git a/specification/security/bulk_delete_role/examples/request/SecurityBulkDeleteRoleRequestExample1.yaml b/specification/security/bulk_delete_role/examples/request/SecurityBulkDeleteRoleRequestExample1.yaml index d8914050e4..be41eb1684 100644 --- a/specification/security/bulk_delete_role/examples/request/SecurityBulkDeleteRoleRequestExample1.yaml +++ b/specification/security/bulk_delete_role/examples/request/SecurityBulkDeleteRoleRequestExample1.yaml @@ -7,46 +7,3 @@ value: |- { "names": ["my_admin_role", "my_user_role"] } -alternatives: - - language: Python - code: |- - resp = client.security.bulk_delete_role( - names=[ - "my_admin_role", - "my_user_role" - ], - ) - - language: JavaScript - code: |- - const response = await client.security.bulkDeleteRole({ - names: ["my_admin_role", "my_user_role"], - }); - - language: Ruby - code: |- - response = client.security.bulk_delete_role( - body: { - "names": [ - "my_admin_role", - "my_user_role" - ] - } - ) - - language: PHP - code: |- - $resp = $client->security()->bulkDeleteRole([ - "body" => [ - "names" => array( - "my_admin_role", - "my_user_role", - ), - ], - ]); - - language: curl - code: - 'curl -X DELETE -H "Authorization: ApiKey $ELASTIC_API_KEY" -H "Content-Type: application/json" -d - ''{"names":["my_admin_role","my_user_role"]}'' "$ELASTICSEARCH_URL/_security/role"' - - language: Java - code: | - client.security().bulkDeleteRole(b -> b - .names(List.of("my_admin_role","my_user_role")) - ); diff --git a/specification/security/bulk_put_role/examples/request/SecurityBulkPutRoleRequestExample1.yaml b/specification/security/bulk_put_role/examples/request/SecurityBulkPutRoleRequestExample1.yaml index 13fb34b351..3e72b3ad2a 100644 --- a/specification/security/bulk_put_role/examples/request/SecurityBulkPutRoleRequestExample1.yaml +++ b/specification/security/bulk_put_role/examples/request/SecurityBulkPutRoleRequestExample1.yaml @@ -89,381 +89,3 @@ value: |- } } } -alternatives: - - language: Python - code: |- - resp = client.security.bulk_put_role( - roles={ - "my_admin_role": { - "cluster": [ - "all" - ], - "indices": [ - { - "names": [ - "index1", - "index2" - ], - "privileges": [ - "all" - ], - "field_security": { - "grant": [ - "title", - "body" - ] - }, - "query": "{\"match\": {\"title\": \"foo\"}}" - } - ], - "applications": [ - { - "application": "myapp", - "privileges": [ - "admin", - "read" - ], - "resources": [ - "*" - ] - } - ], - "run_as": [ - "other_user" - ], - "metadata": { - "version": 1 - } - }, - "my_user_role": { - "cluster": [ - "all" - ], - "indices": [ - { - "names": [ - "index1" - ], - "privileges": [ - "read" - ], - "field_security": { - "grant": [ - "title", - "body" - ] - }, - "query": "{\"match\": {\"title\": \"foo\"}}" - } - ], - "applications": [ - { - "application": "myapp", - "privileges": [ - "admin", - "read" - ], - "resources": [ - "*" - ] - } - ], - "run_as": [ - "other_user" - ], - "metadata": { - "version": 1 - } - } - }, - ) - - language: JavaScript - code: |- - const response = await client.security.bulkPutRole({ - roles: { - my_admin_role: { - cluster: ["all"], - indices: [ - { - names: ["index1", "index2"], - privileges: ["all"], - field_security: { - grant: ["title", "body"], - }, - query: '{"match": {"title": "foo"}}', - }, - ], - applications: [ - { - application: "myapp", - privileges: ["admin", "read"], - resources: ["*"], - }, - ], - run_as: ["other_user"], - metadata: { - version: 1, - }, - }, - my_user_role: { - cluster: ["all"], - indices: [ - { - names: ["index1"], - privileges: ["read"], - field_security: { - grant: ["title", "body"], - }, - query: '{"match": {"title": "foo"}}', - }, - ], - applications: [ - { - application: "myapp", - privileges: ["admin", "read"], - resources: ["*"], - }, - ], - run_as: ["other_user"], - metadata: { - version: 1, - }, - }, - }, - }); - - language: Ruby - code: |- - response = client.security.bulk_put_role( - body: { - "roles": { - "my_admin_role": { - "cluster": [ - "all" - ], - "indices": [ - { - "names": [ - "index1", - "index2" - ], - "privileges": [ - "all" - ], - "field_security": { - "grant": [ - "title", - "body" - ] - }, - "query": "{\"match\": {\"title\": \"foo\"}}" - } - ], - "applications": [ - { - "application": "myapp", - "privileges": [ - "admin", - "read" - ], - "resources": [ - "*" - ] - } - ], - "run_as": [ - "other_user" - ], - "metadata": { - "version": 1 - } - }, - "my_user_role": { - "cluster": [ - "all" - ], - "indices": [ - { - "names": [ - "index1" - ], - "privileges": [ - "read" - ], - "field_security": { - "grant": [ - "title", - "body" - ] - }, - "query": "{\"match\": {\"title\": \"foo\"}}" - } - ], - "applications": [ - { - "application": "myapp", - "privileges": [ - "admin", - "read" - ], - "resources": [ - "*" - ] - } - ], - "run_as": [ - "other_user" - ], - "metadata": { - "version": 1 - } - } - } - } - ) - - language: PHP - code: |- - $resp = $client->security()->bulkPutRole([ - "body" => [ - "roles" => [ - "my_admin_role" => [ - "cluster" => array( - "all", - ), - "indices" => array( - [ - "names" => array( - "index1", - "index2", - ), - "privileges" => array( - "all", - ), - "field_security" => [ - "grant" => array( - "title", - "body", - ), - ], - "query" => "{\"match\": {\"title\": \"foo\"}}", - ], - ), - "applications" => array( - [ - "application" => "myapp", - "privileges" => array( - "admin", - "read", - ), - "resources" => array( - "*", - ), - ], - ), - "run_as" => array( - "other_user", - ), - "metadata" => [ - "version" => 1, - ], - ], - "my_user_role" => [ - "cluster" => array( - "all", - ), - "indices" => array( - [ - "names" => array( - "index1", - ), - "privileges" => array( - "read", - ), - "field_security" => [ - "grant" => array( - "title", - "body", - ), - ], - "query" => "{\"match\": {\"title\": \"foo\"}}", - ], - ), - "applications" => array( - [ - "application" => "myapp", - "privileges" => array( - "admin", - "read", - ), - "resources" => array( - "*", - ), - ], - ), - "run_as" => array( - "other_user", - ), - "metadata" => [ - "version" => 1, - ], - ], - ], - ], - ]); - - language: curl - code: - "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d - '{\"roles\":{\"my_admin_role\":{\"cluster\":[\"all\"],\"indices\":[{\"names\":[\"index1\",\"index2\"],\"privileges\":[\"all\"\ - ],\"field_security\":{\"grant\":[\"title\",\"body\"]},\"query\":\"{\\\"match\\\": {\\\"title\\\": - \\\"foo\\\"}}\"}],\"applications\":[{\"application\":\"myapp\",\"privileges\":[\"admin\",\"read\"],\"resources\":[\"*\"]}],\"\ - run_as\":[\"other_user\"],\"metadata\":{\"version\":1}},\"my_user_role\":{\"cluster\":[\"all\"],\"indices\":[{\"names\":[\"in\ - dex1\"],\"privileges\":[\"read\"],\"field_security\":{\"grant\":[\"title\",\"body\"]},\"query\":\"{\\\"match\\\": - {\\\"title\\\": - \\\"foo\\\"}}\"}],\"applications\":[{\"application\":\"myapp\",\"privileges\":[\"admin\",\"read\"],\"resources\":[\"*\"]}],\"\ - run_as\":[\"other_user\"],\"metadata\":{\"version\":1}}}}' \"$ELASTICSEARCH_URL/_security/role\"" - - language: Java - code: | - client.security().bulkPutRole(b -> b - .roles(Map.of("my_admin_role", RoleDescriptor.of(r -> r - .cluster("all") - .indices(i -> i - .fieldSecurity(f -> f - .grant(List.of("title","body")) - ) - .names(List.of("index1","index2")) - .privileges("all") - .query(q -> q - .match(m -> m - .field("title") - .query(FieldValue.of("foo")) - ) - ) - ) - .applications(a -> a - .application("myapp") - .privileges(List.of("admin","read")) - .resources("*") - ) - .metadata("version", JsonData.fromJson("1")) - .runAs("other_user")),"my_user_role", RoleDescriptor.of(ro -> ro - .cluster("all") - .indices(i -> i - .fieldSecurity(f -> f - .grant(List.of("title","body")) - ) - .names("index1") - .privileges("read") - .query(q -> q - .match(m -> m - .field("title") - .query(FieldValue.of("foo")) - ) - ) - ) - .applications(a -> a - .application("myapp") - .privileges(List.of("admin","read")) - .resources("*") - ) - .metadata("version", JsonData.fromJson("1")) - .runAs("other_user")))) - ); diff --git a/specification/security/bulk_put_role/examples/request/SecurityBulkPutRoleRequestExample2.yaml b/specification/security/bulk_put_role/examples/request/SecurityBulkPutRoleRequestExample2.yaml index c9900bd3f4..e45f838b2d 100644 --- a/specification/security/bulk_put_role/examples/request/SecurityBulkPutRoleRequestExample2.yaml +++ b/specification/security/bulk_put_role/examples/request/SecurityBulkPutRoleRequestExample2.yaml @@ -89,381 +89,3 @@ value: |- } } } -alternatives: - - language: Python - code: |- - resp = client.security.bulk_put_role( - roles={ - "my_admin_role": { - "cluster": [ - "bad_cluster_privilege" - ], - "indices": [ - { - "names": [ - "index1", - "index2" - ], - "privileges": [ - "all" - ], - "field_security": { - "grant": [ - "title", - "body" - ] - }, - "query": "{\"match\": {\"title\": \"foo\"}}" - } - ], - "applications": [ - { - "application": "myapp", - "privileges": [ - "admin", - "read" - ], - "resources": [ - "*" - ] - } - ], - "run_as": [ - "other_user" - ], - "metadata": { - "version": 1 - } - }, - "my_user_role": { - "cluster": [ - "all" - ], - "indices": [ - { - "names": [ - "index1" - ], - "privileges": [ - "read" - ], - "field_security": { - "grant": [ - "title", - "body" - ] - }, - "query": "{\"match\": {\"title\": \"foo\"}}" - } - ], - "applications": [ - { - "application": "myapp", - "privileges": [ - "admin", - "read" - ], - "resources": [ - "*" - ] - } - ], - "run_as": [ - "other_user" - ], - "metadata": { - "version": 1 - } - } - }, - ) - - language: JavaScript - code: |- - const response = await client.security.bulkPutRole({ - roles: { - my_admin_role: { - cluster: ["bad_cluster_privilege"], - indices: [ - { - names: ["index1", "index2"], - privileges: ["all"], - field_security: { - grant: ["title", "body"], - }, - query: '{"match": {"title": "foo"}}', - }, - ], - applications: [ - { - application: "myapp", - privileges: ["admin", "read"], - resources: ["*"], - }, - ], - run_as: ["other_user"], - metadata: { - version: 1, - }, - }, - my_user_role: { - cluster: ["all"], - indices: [ - { - names: ["index1"], - privileges: ["read"], - field_security: { - grant: ["title", "body"], - }, - query: '{"match": {"title": "foo"}}', - }, - ], - applications: [ - { - application: "myapp", - privileges: ["admin", "read"], - resources: ["*"], - }, - ], - run_as: ["other_user"], - metadata: { - version: 1, - }, - }, - }, - }); - - language: Ruby - code: |- - response = client.security.bulk_put_role( - body: { - "roles": { - "my_admin_role": { - "cluster": [ - "bad_cluster_privilege" - ], - "indices": [ - { - "names": [ - "index1", - "index2" - ], - "privileges": [ - "all" - ], - "field_security": { - "grant": [ - "title", - "body" - ] - }, - "query": "{\"match\": {\"title\": \"foo\"}}" - } - ], - "applications": [ - { - "application": "myapp", - "privileges": [ - "admin", - "read" - ], - "resources": [ - "*" - ] - } - ], - "run_as": [ - "other_user" - ], - "metadata": { - "version": 1 - } - }, - "my_user_role": { - "cluster": [ - "all" - ], - "indices": [ - { - "names": [ - "index1" - ], - "privileges": [ - "read" - ], - "field_security": { - "grant": [ - "title", - "body" - ] - }, - "query": "{\"match\": {\"title\": \"foo\"}}" - } - ], - "applications": [ - { - "application": "myapp", - "privileges": [ - "admin", - "read" - ], - "resources": [ - "*" - ] - } - ], - "run_as": [ - "other_user" - ], - "metadata": { - "version": 1 - } - } - } - } - ) - - language: PHP - code: |- - $resp = $client->security()->bulkPutRole([ - "body" => [ - "roles" => [ - "my_admin_role" => [ - "cluster" => array( - "bad_cluster_privilege", - ), - "indices" => array( - [ - "names" => array( - "index1", - "index2", - ), - "privileges" => array( - "all", - ), - "field_security" => [ - "grant" => array( - "title", - "body", - ), - ], - "query" => "{\"match\": {\"title\": \"foo\"}}", - ], - ), - "applications" => array( - [ - "application" => "myapp", - "privileges" => array( - "admin", - "read", - ), - "resources" => array( - "*", - ), - ], - ), - "run_as" => array( - "other_user", - ), - "metadata" => [ - "version" => 1, - ], - ], - "my_user_role" => [ - "cluster" => array( - "all", - ), - "indices" => array( - [ - "names" => array( - "index1", - ), - "privileges" => array( - "read", - ), - "field_security" => [ - "grant" => array( - "title", - "body", - ), - ], - "query" => "{\"match\": {\"title\": \"foo\"}}", - ], - ), - "applications" => array( - [ - "application" => "myapp", - "privileges" => array( - "admin", - "read", - ), - "resources" => array( - "*", - ), - ], - ), - "run_as" => array( - "other_user", - ), - "metadata" => [ - "version" => 1, - ], - ], - ], - ], - ]); - - language: curl - code: - "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d - '{\"roles\":{\"my_admin_role\":{\"cluster\":[\"bad_cluster_privilege\"],\"indices\":[{\"names\":[\"index1\",\"index2\"],\"pri\ - vileges\":[\"all\"],\"field_security\":{\"grant\":[\"title\",\"body\"]},\"query\":\"{\\\"match\\\": {\\\"title\\\": - \\\"foo\\\"}}\"}],\"applications\":[{\"application\":\"myapp\",\"privileges\":[\"admin\",\"read\"],\"resources\":[\"*\"]}],\"\ - run_as\":[\"other_user\"],\"metadata\":{\"version\":1}},\"my_user_role\":{\"cluster\":[\"all\"],\"indices\":[{\"names\":[\"in\ - dex1\"],\"privileges\":[\"read\"],\"field_security\":{\"grant\":[\"title\",\"body\"]},\"query\":\"{\\\"match\\\": - {\\\"title\\\": - \\\"foo\\\"}}\"}],\"applications\":[{\"application\":\"myapp\",\"privileges\":[\"admin\",\"read\"],\"resources\":[\"*\"]}],\"\ - run_as\":[\"other_user\"],\"metadata\":{\"version\":1}}}}' \"$ELASTICSEARCH_URL/_security/role\"" - - language: Java - code: | - client.security().bulkPutRole(b -> b - .roles(Map.of("my_admin_role", RoleDescriptor.of(r -> r - .cluster("bad_cluster_privilege") - .indices(i -> i - .fieldSecurity(f -> f - .grant(List.of("title","body")) - ) - .names(List.of("index1","index2")) - .privileges("all") - .query(q -> q - .match(m -> m - .field("title") - .query(FieldValue.of("foo")) - ) - ) - ) - .applications(a -> a - .application("myapp") - .privileges(List.of("admin","read")) - .resources("*") - ) - .metadata("version", JsonData.fromJson("1")) - .runAs("other_user")),"my_user_role", RoleDescriptor.of(ro -> ro - .cluster("all") - .indices(i -> i - .fieldSecurity(f -> f - .grant(List.of("title","body")) - ) - .names("index1") - .privileges("read") - .query(q -> q - .match(m -> m - .field("title") - .query(FieldValue.of("foo")) - ) - ) - ) - .applications(a -> a - .application("myapp") - .privileges(List.of("admin","read")) - .resources("*") - ) - .metadata("version", JsonData.fromJson("1")) - .runAs("other_user")))) - ); diff --git a/specification/security/bulk_put_role/examples/request/SecurityBulkPutRoleRequestExample3.yaml b/specification/security/bulk_put_role/examples/request/SecurityBulkPutRoleRequestExample3.yaml index d9eb94eb0e..74ec03f870 100644 --- a/specification/security/bulk_put_role/examples/request/SecurityBulkPutRoleRequestExample3.yaml +++ b/specification/security/bulk_put_role/examples/request/SecurityBulkPutRoleRequestExample3.yaml @@ -20,136 +20,3 @@ value: |- } ] } -alternatives: - - language: Python - code: |- - resp = client.security.put_role( - name="only_remote_access_role", - remote_indices=[ - { - "clusters": [ - "my_remote" - ], - "names": [ - "logs*" - ], - "privileges": [ - "read", - "read_cross_cluster", - "view_index_metadata" - ] - } - ], - remote_cluster=[ - { - "clusters": [ - "my_remote" - ], - "privileges": [ - "monitor_stats" - ] - } - ], - ) - - language: JavaScript - code: |- - const response = await client.security.putRole({ - name: "only_remote_access_role", - remote_indices: [ - { - clusters: ["my_remote"], - names: ["logs*"], - privileges: ["read", "read_cross_cluster", "view_index_metadata"], - }, - ], - remote_cluster: [ - { - clusters: ["my_remote"], - privileges: ["monitor_stats"], - }, - ], - }); - - language: Ruby - code: |- - response = client.security.put_role( - name: "only_remote_access_role", - body: { - "remote_indices": [ - { - "clusters": [ - "my_remote" - ], - "names": [ - "logs*" - ], - "privileges": [ - "read", - "read_cross_cluster", - "view_index_metadata" - ] - } - ], - "remote_cluster": [ - { - "clusters": [ - "my_remote" - ], - "privileges": [ - "monitor_stats" - ] - } - ] - } - ) - - language: PHP - code: |- - $resp = $client->security()->putRole([ - "name" => "only_remote_access_role", - "body" => [ - "remote_indices" => array( - [ - "clusters" => array( - "my_remote", - ), - "names" => array( - "logs*", - ), - "privileges" => array( - "read", - "read_cross_cluster", - "view_index_metadata", - ), - ], - ), - "remote_cluster" => array( - [ - "clusters" => array( - "my_remote", - ), - "privileges" => array( - "monitor_stats", - ), - ], - ), - ], - ]); - - language: curl - code: - "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d - '{\"remote_indices\":[{\"clusters\":[\"my_remote\"],\"names\":[\"logs*\"],\"privileges\":[\"read\",\"read_cross_cluster\",\"v\ - iew_index_metadata\"]}],\"remote_cluster\":[{\"clusters\":[\"my_remote\"],\"privileges\":[\"monitor_stats\"]}]}' - \"$ELASTICSEARCH_URL/_security/role/only_remote_access_role\"" - - language: Java - code: | - client.security().putRole(p -> p - .name("only_remote_access_role") - .remoteCluster(r -> r - .clusters("my_remote") - .privileges(RemoteClusterPrivilege.MonitorStats) - ) - .remoteIndices(r -> r - .clusters("my_remote") - .names("logs*") - .privileges(List.of("read","read_cross_cluster","view_index_metadata")) - ) - ); diff --git a/specification/security/bulk_update_api_keys/examples/request/SecurityBulkUpdateApiKeysRequestExample1.yaml b/specification/security/bulk_update_api_keys/examples/request/SecurityBulkUpdateApiKeysRequestExample1.yaml index a8c91131a9..0bac538f41 100644 --- a/specification/security/bulk_update_api_keys/examples/request/SecurityBulkUpdateApiKeysRequestExample1.yaml +++ b/specification/security/bulk_update_api_keys/examples/request/SecurityBulkUpdateApiKeysRequestExample1.yaml @@ -21,148 +21,3 @@ value: tags: - production expiration: 30d -alternatives: - - language: Python - code: |- - resp = client.security.bulk_update_api_keys( - ids=[ - "VuaCfGcBCdbkQm-e5aOx", - "H3_AhoIBA9hmeQJdg7ij" - ], - role_descriptors={ - "role-a": { - "indices": [ - { - "names": [ - "*" - ], - "privileges": [ - "write" - ] - } - ] - } - }, - metadata={ - "environment": { - "level": 2, - "trusted": True, - "tags": [ - "production" - ] - } - }, - expiration="30d", - ) - - language: JavaScript - code: |- - const response = await client.security.bulkUpdateApiKeys({ - ids: ["VuaCfGcBCdbkQm-e5aOx", "H3_AhoIBA9hmeQJdg7ij"], - role_descriptors: { - "role-a": { - indices: [ - { - names: ["*"], - privileges: ["write"], - }, - ], - }, - }, - metadata: { - environment: { - level: 2, - trusted: true, - tags: ["production"], - }, - }, - expiration: "30d", - }); - - language: Ruby - code: |- - response = client.security.bulk_update_api_keys( - body: { - "ids": [ - "VuaCfGcBCdbkQm-e5aOx", - "H3_AhoIBA9hmeQJdg7ij" - ], - "role_descriptors": { - "role-a": { - "indices": [ - { - "names": [ - "*" - ], - "privileges": [ - "write" - ] - } - ] - } - }, - "metadata": { - "environment": { - "level": 2, - "trusted": true, - "tags": [ - "production" - ] - } - }, - "expiration": "30d" - } - ) - - language: PHP - code: |- - $resp = $client->security()->bulkUpdateApiKeys([ - "body" => [ - "ids" => array( - "VuaCfGcBCdbkQm-e5aOx", - "H3_AhoIBA9hmeQJdg7ij", - ), - "role_descriptors" => [ - "role-a" => [ - "indices" => array( - [ - "names" => array( - "*", - ), - "privileges" => array( - "write", - ), - ], - ), - ], - ], - "metadata" => [ - "environment" => [ - "level" => 2, - "trusted" => true, - "tags" => array( - "production", - ), - ], - ], - "expiration" => "30d", - ], - ]); - - language: curl - code: - "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d - '{\"ids\":[\"VuaCfGcBCdbkQm-e5aOx\",\"H3_AhoIBA9hmeQJdg7ij\"],\"role_descriptors\":{\"role-a\":{\"indices\":[{\"names\":[\"*\ - \"],\"privileges\":[\"write\"]}]}},\"metadata\":{\"environment\":{\"level\":2,\"trusted\":true,\"tags\":[\"production\"]}},\"\ - expiration\":\"30d\"}' \"$ELASTICSEARCH_URL/_security/api_key/_bulk_update\"" - - language: Java - code: | - client.security().bulkUpdateApiKeys(b -> b - .expiration(e -> e - .time("30d") - ) - .ids(List.of("VuaCfGcBCdbkQm-e5aOx","H3_AhoIBA9hmeQJdg7ij")) - .metadata("environment", JsonData.fromJson("{\"level\":2,\"trusted\":true,\"tags\":[\"production\"]}")) - .roleDescriptors("role-a", r -> r - .indices(i -> i - .names("*") - .privileges("write") - ) - ) - ); diff --git a/specification/security/bulk_update_api_keys/examples/request/SecurityBulkUpdateApiKeysRequestExample2.yaml b/specification/security/bulk_update_api_keys/examples/request/SecurityBulkUpdateApiKeysRequestExample2.yaml index 2f37d7db5d..52284a6e11 100644 --- a/specification/security/bulk_update_api_keys/examples/request/SecurityBulkUpdateApiKeysRequestExample2.yaml +++ b/specification/security/bulk_update_api_keys/examples/request/SecurityBulkUpdateApiKeysRequestExample2.yaml @@ -8,51 +8,3 @@ value: - VuaCfGcBCdbkQm-e5aOx - H3_AhoIBA9hmeQJdg7ij role_descriptors: {} -alternatives: - - language: Python - code: |- - resp = client.security.bulk_update_api_keys( - ids=[ - "VuaCfGcBCdbkQm-e5aOx", - "H3_AhoIBA9hmeQJdg7ij" - ], - role_descriptors={}, - ) - - language: JavaScript - code: |- - const response = await client.security.bulkUpdateApiKeys({ - ids: ["VuaCfGcBCdbkQm-e5aOx", "H3_AhoIBA9hmeQJdg7ij"], - role_descriptors: {}, - }); - - language: Ruby - code: |- - response = client.security.bulk_update_api_keys( - body: { - "ids": [ - "VuaCfGcBCdbkQm-e5aOx", - "H3_AhoIBA9hmeQJdg7ij" - ], - "role_descriptors": {} - } - ) - - language: PHP - code: |- - $resp = $client->security()->bulkUpdateApiKeys([ - "body" => [ - "ids" => array( - "VuaCfGcBCdbkQm-e5aOx", - "H3_AhoIBA9hmeQJdg7ij", - ), - "role_descriptors" => new ArrayObject([]), - ], - ]); - - language: curl - code: - 'curl -X POST -H "Authorization: ApiKey $ELASTIC_API_KEY" -H "Content-Type: application/json" -d - ''{"ids":["VuaCfGcBCdbkQm-e5aOx","H3_AhoIBA9hmeQJdg7ij"],"role_descriptors":{}}'' - "$ELASTICSEARCH_URL/_security/api_key/_bulk_update"' - - language: Java - code: | - client.security().bulkUpdateApiKeys(b -> b - .ids(List.of("VuaCfGcBCdbkQm-e5aOx","H3_AhoIBA9hmeQJdg7ij")) - ); diff --git a/specification/security/change_password/examples/request/SecurityChangePasswordRequestExample1.yaml b/specification/security/change_password/examples/request/SecurityChangePasswordRequestExample1.yaml index 742dca7bba..2d593453db 100644 --- a/specification/security/change_password/examples/request/SecurityChangePasswordRequestExample1.yaml +++ b/specification/security/change_password/examples/request/SecurityChangePasswordRequestExample1.yaml @@ -7,42 +7,3 @@ value: |- { "password" : "new-test-password" } -alternatives: - - language: Python - code: |- - resp = client.security.change_password( - username="jacknich", - password="new-test-password", - ) - - language: JavaScript - code: |- - const response = await client.security.changePassword({ - username: "jacknich", - password: "new-test-password", - }); - - language: Ruby - code: |- - response = client.security.change_password( - username: "jacknich", - body: { - "password": "new-test-password" - } - ) - - language: PHP - code: |- - $resp = $client->security()->changePassword([ - "username" => "jacknich", - "body" => [ - "password" => "new-test-password", - ], - ]); - - language: curl - code: - 'curl -X POST -H "Authorization: ApiKey $ELASTIC_API_KEY" -H "Content-Type: application/json" -d - ''{"password":"new-test-password"}'' "$ELASTICSEARCH_URL/_security/user/jacknich/_password"' - - language: Java - code: | - client.security().changePassword(c -> c - .password("new-test-password") - .username("jacknich") - ); diff --git a/specification/security/clear_api_key_cache/examples/request/SecurityClearApiKeyCacheExample1.yaml b/specification/security/clear_api_key_cache/examples/request/SecurityClearApiKeyCacheExample1.yaml index 615cea1f15..19ca296a6b 100644 --- a/specification/security/clear_api_key_cache/examples/request/SecurityClearApiKeyCacheExample1.yaml +++ b/specification/security/clear_api_key_cache/examples/request/SecurityClearApiKeyCacheExample1.yaml @@ -1,30 +1 @@ method_request: POST /_security/api_key/yVGMr3QByxdh1MSaicYx/_clear_cache -alternatives: - - language: Python - code: |- - resp = client.security.clear_api_key_cache( - ids="yVGMr3QByxdh1MSaicYx", - ) - - language: JavaScript - code: |- - const response = await client.security.clearApiKeyCache({ - ids: "yVGMr3QByxdh1MSaicYx", - }); - - language: Ruby - code: |- - response = client.security.clear_api_key_cache( - ids: "yVGMr3QByxdh1MSaicYx" - ) - - language: PHP - code: |- - $resp = $client->security()->clearApiKeyCache([ - "ids" => "yVGMr3QByxdh1MSaicYx", - ]); - - language: curl - code: 'curl -X POST -H "Authorization: ApiKey $ELASTIC_API_KEY" - "$ELASTICSEARCH_URL/_security/api_key/yVGMr3QByxdh1MSaicYx/_clear_cache"' - - language: Java - code: | - client.security().clearApiKeyCache(c -> c - .ids("yVGMr3QByxdh1MSaicYx") - ); diff --git a/specification/security/clear_cached_privileges/examples/request/SecurityClearCachedPrivilegesExample1.yaml b/specification/security/clear_cached_privileges/examples/request/SecurityClearCachedPrivilegesExample1.yaml index 90b5cfdddc..b824f2eb42 100644 --- a/specification/security/clear_cached_privileges/examples/request/SecurityClearCachedPrivilegesExample1.yaml +++ b/specification/security/clear_cached_privileges/examples/request/SecurityClearCachedPrivilegesExample1.yaml @@ -1,29 +1 @@ method_request: POST /_security/privilege/myapp/_clear_cache -alternatives: - - language: Python - code: |- - resp = client.security.clear_cached_privileges( - application="myapp", - ) - - language: JavaScript - code: |- - const response = await client.security.clearCachedPrivileges({ - application: "myapp", - }); - - language: Ruby - code: |- - response = client.security.clear_cached_privileges( - application: "myapp" - ) - - language: PHP - code: |- - $resp = $client->security()->clearCachedPrivileges([ - "application" => "myapp", - ]); - - language: curl - code: 'curl -X POST -H "Authorization: ApiKey $ELASTIC_API_KEY" "$ELASTICSEARCH_URL/_security/privilege/myapp/_clear_cache"' - - language: Java - code: | - client.security().clearCachedPrivileges(c -> c - .application("myapp") - ); diff --git a/specification/security/clear_cached_realms/examples/request/SecurityClearCachedRealmsExample1.yaml b/specification/security/clear_cached_realms/examples/request/SecurityClearCachedRealmsExample1.yaml index 16855651ef..d47612457f 100644 --- a/specification/security/clear_cached_realms/examples/request/SecurityClearCachedRealmsExample1.yaml +++ b/specification/security/clear_cached_realms/examples/request/SecurityClearCachedRealmsExample1.yaml @@ -1,29 +1 @@ method_request: POST /_security/realm/default_file/_clear_cache -alternatives: - - language: Python - code: |- - resp = client.security.clear_cached_realms( - realms="default_file", - ) - - language: JavaScript - code: |- - const response = await client.security.clearCachedRealms({ - realms: "default_file", - }); - - language: Ruby - code: |- - response = client.security.clear_cached_realms( - realms: "default_file" - ) - - language: PHP - code: |- - $resp = $client->security()->clearCachedRealms([ - "realms" => "default_file", - ]); - - language: curl - code: 'curl -X POST -H "Authorization: ApiKey $ELASTIC_API_KEY" "$ELASTICSEARCH_URL/_security/realm/default_file/_clear_cache"' - - language: Java - code: | - client.security().clearCachedRealms(c -> c - .realms("default_file") - ); diff --git a/specification/security/clear_cached_roles/examples/request/SecurityClearCachedRolesExample1.yaml b/specification/security/clear_cached_roles/examples/request/SecurityClearCachedRolesExample1.yaml index f0d251c0c0..d98c3ab756 100644 --- a/specification/security/clear_cached_roles/examples/request/SecurityClearCachedRolesExample1.yaml +++ b/specification/security/clear_cached_roles/examples/request/SecurityClearCachedRolesExample1.yaml @@ -1,29 +1 @@ method_request: POST /_security/role/my_admin_role/_clear_cache -alternatives: - - language: Python - code: |- - resp = client.security.clear_cached_roles( - name="my_admin_role", - ) - - language: JavaScript - code: |- - const response = await client.security.clearCachedRoles({ - name: "my_admin_role", - }); - - language: Ruby - code: |- - response = client.security.clear_cached_roles( - name: "my_admin_role" - ) - - language: PHP - code: |- - $resp = $client->security()->clearCachedRoles([ - "name" => "my_admin_role", - ]); - - language: curl - code: 'curl -X POST -H "Authorization: ApiKey $ELASTIC_API_KEY" "$ELASTICSEARCH_URL/_security/role/my_admin_role/_clear_cache"' - - language: Java - code: | - client.security().clearCachedRoles(c -> c - .name("my_admin_role") - ); diff --git a/specification/security/clear_cached_service_tokens/examples/request/SecurityClearCachedServiceTokensExample1.yaml b/specification/security/clear_cached_service_tokens/examples/request/SecurityClearCachedServiceTokensExample1.yaml index d4f8b2cc28..717478f44a 100644 --- a/specification/security/clear_cached_service_tokens/examples/request/SecurityClearCachedServiceTokensExample1.yaml +++ b/specification/security/clear_cached_service_tokens/examples/request/SecurityClearCachedServiceTokensExample1.yaml @@ -1,40 +1 @@ method_request: POST /_security/service/elastic/fleet-server/credential/token/token1/_clear_cache -alternatives: - - language: Python - code: |- - resp = client.security.clear_cached_service_tokens( - namespace="elastic", - service="fleet-server", - name="token1", - ) - - language: JavaScript - code: |- - const response = await client.security.clearCachedServiceTokens({ - namespace: "elastic", - service: "fleet-server", - name: "token1", - }); - - language: Ruby - code: |- - response = client.security.clear_cached_service_tokens( - namespace: "elastic", - service: "fleet-server", - name: "token1" - ) - - language: PHP - code: |- - $resp = $client->security()->clearCachedServiceTokens([ - "namespace" => "elastic", - "service" => "fleet-server", - "name" => "token1", - ]); - - language: curl - code: 'curl -X POST -H "Authorization: ApiKey $ELASTIC_API_KEY" - "$ELASTICSEARCH_URL/_security/service/elastic/fleet-server/credential/token/token1/_clear_cache"' - - language: Java - code: | - client.security().clearCachedServiceTokens(c -> c - .name("token1") - .namespace("elastic") - .service("fleet-server") - ); diff --git a/specification/security/create_api_key/examples/request/SecurityCreateApiKeyRequestExample1.yaml b/specification/security/create_api_key/examples/request/SecurityCreateApiKeyRequestExample1.yaml index 5a923a382b..875e2301c8 100644 --- a/specification/security/create_api_key/examples/request/SecurityCreateApiKeyRequestExample1.yaml +++ b/specification/security/create_api_key/examples/request/SecurityCreateApiKeyRequestExample1.yaml @@ -37,216 +37,3 @@ value: |- } } } -alternatives: - - language: Python - code: |- - resp = client.security.create_api_key( - name="my-api-key", - expiration="1d", - role_descriptors={ - "role-a": { - "cluster": [ - "all" - ], - "indices": [ - { - "names": [ - "index-a*" - ], - "privileges": [ - "read" - ] - } - ] - }, - "role-b": { - "cluster": [ - "all" - ], - "indices": [ - { - "names": [ - "index-b*" - ], - "privileges": [ - "all" - ] - } - ] - } - }, - metadata={ - "application": "my-application", - "environment": { - "level": 1, - "trusted": True, - "tags": [ - "dev", - "staging" - ] - } - }, - ) - - language: JavaScript - code: |- - const response = await client.security.createApiKey({ - name: "my-api-key", - expiration: "1d", - role_descriptors: { - "role-a": { - cluster: ["all"], - indices: [ - { - names: ["index-a*"], - privileges: ["read"], - }, - ], - }, - "role-b": { - cluster: ["all"], - indices: [ - { - names: ["index-b*"], - privileges: ["all"], - }, - ], - }, - }, - metadata: { - application: "my-application", - environment: { - level: 1, - trusted: true, - tags: ["dev", "staging"], - }, - }, - }); - - language: Ruby - code: |- - response = client.security.create_api_key( - body: { - "name": "my-api-key", - "expiration": "1d", - "role_descriptors": { - "role-a": { - "cluster": [ - "all" - ], - "indices": [ - { - "names": [ - "index-a*" - ], - "privileges": [ - "read" - ] - } - ] - }, - "role-b": { - "cluster": [ - "all" - ], - "indices": [ - { - "names": [ - "index-b*" - ], - "privileges": [ - "all" - ] - } - ] - } - }, - "metadata": { - "application": "my-application", - "environment": { - "level": 1, - "trusted": true, - "tags": [ - "dev", - "staging" - ] - } - } - } - ) - - language: PHP - code: |- - $resp = $client->security()->createApiKey([ - "body" => [ - "name" => "my-api-key", - "expiration" => "1d", - "role_descriptors" => [ - "role-a" => [ - "cluster" => array( - "all", - ), - "indices" => array( - [ - "names" => array( - "index-a*", - ), - "privileges" => array( - "read", - ), - ], - ), - ], - "role-b" => [ - "cluster" => array( - "all", - ), - "indices" => array( - [ - "names" => array( - "index-b*", - ), - "privileges" => array( - "all", - ), - ], - ), - ], - ], - "metadata" => [ - "application" => "my-application", - "environment" => [ - "level" => 1, - "trusted" => true, - "tags" => array( - "dev", - "staging", - ), - ], - ], - ], - ]); - - language: curl - code: - "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d - '{\"name\":\"my-api-key\",\"expiration\":\"1d\",\"role_descriptors\":{\"role-a\":{\"cluster\":[\"all\"],\"indices\":[{\"names\ - \":[\"index-a*\"],\"privileges\":[\"read\"]}]},\"role-b\":{\"cluster\":[\"all\"],\"indices\":[{\"names\":[\"index-b*\"],\"pri\ - vileges\":[\"all\"]}]}},\"metadata\":{\"application\":\"my-application\",\"environment\":{\"level\":1,\"trusted\":true,\"tags\ - \":[\"dev\",\"staging\"]}}}' \"$ELASTICSEARCH_URL/_security/api_key\"" - - language: Java - code: > - client.security().createApiKey(c -> c - .expiration(e -> e - .time("1d") - ) - .metadata(Map.of("environment", JsonData.fromJson("{\"level\":1,\"trusted\":true,\"tags\":[\"dev\",\"staging\"]}"),"application", JsonData.fromJson("\"my-application\""))) - .name("my-api-key") - .roleDescriptors(Map.of("role-b", RoleDescriptor.of(r -> r - .cluster("all") - .indices(i -> i - .names("index-b*") - .privileges("all") - )),"role-a", RoleDescriptor.of(r -> r - .cluster("all") - .indices(i -> i - .names("index-a*") - .privileges("read") - )))) - ); diff --git a/specification/security/create_cross_cluster_api_key/examples/request/CreateCrossClusterApiKeyRequestExample1.yaml b/specification/security/create_cross_cluster_api_key/examples/request/CreateCrossClusterApiKeyRequestExample1.yaml index 703024bea3..49ca31a042 100644 --- a/specification/security/create_cross_cluster_api_key/examples/request/CreateCrossClusterApiKeyRequestExample1.yaml +++ b/specification/security/create_cross_cluster_api_key/examples/request/CreateCrossClusterApiKeyRequestExample1.yaml @@ -28,157 +28,3 @@ value: |- } } } -alternatives: - - language: Python - code: |- - resp = client.security.create_cross_cluster_api_key( - name="my-cross-cluster-api-key", - expiration="1d", - access={ - "search": [ - { - "names": [ - "logs*" - ] - } - ], - "replication": [ - { - "names": [ - "archive*" - ] - } - ] - }, - metadata={ - "description": "phase one", - "environment": { - "level": 1, - "trusted": True, - "tags": [ - "dev", - "staging" - ] - } - }, - ) - - language: JavaScript - code: |- - const response = await client.security.createCrossClusterApiKey({ - name: "my-cross-cluster-api-key", - expiration: "1d", - access: { - search: [ - { - names: ["logs*"], - }, - ], - replication: [ - { - names: ["archive*"], - }, - ], - }, - metadata: { - description: "phase one", - environment: { - level: 1, - trusted: true, - tags: ["dev", "staging"], - }, - }, - }); - - language: Ruby - code: |- - response = client.security.create_cross_cluster_api_key( - body: { - "name": "my-cross-cluster-api-key", - "expiration": "1d", - "access": { - "search": [ - { - "names": [ - "logs*" - ] - } - ], - "replication": [ - { - "names": [ - "archive*" - ] - } - ] - }, - "metadata": { - "description": "phase one", - "environment": { - "level": 1, - "trusted": true, - "tags": [ - "dev", - "staging" - ] - } - } - } - ) - - language: PHP - code: |- - $resp = $client->security()->createCrossClusterApiKey([ - "body" => [ - "name" => "my-cross-cluster-api-key", - "expiration" => "1d", - "access" => [ - "search" => array( - [ - "names" => array( - "logs*", - ), - ], - ), - "replication" => array( - [ - "names" => array( - "archive*", - ), - ], - ), - ], - "metadata" => [ - "description" => "phase one", - "environment" => [ - "level" => 1, - "trusted" => true, - "tags" => array( - "dev", - "staging", - ), - ], - ], - ], - ]); - - language: curl - code: - "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d - '{\"name\":\"my-cross-cluster-api-key\",\"expiration\":\"1d\",\"access\":{\"search\":[{\"names\":[\"logs*\"]}],\"replication\ - \":[{\"names\":[\"archive*\"]}]},\"metadata\":{\"description\":\"phase - one\",\"environment\":{\"level\":1,\"trusted\":true,\"tags\":[\"dev\",\"staging\"]}}}' - \"$ELASTICSEARCH_URL/_security/cross_cluster/api_key\"" - - language: Java - code: > - client.security().createCrossClusterApiKey(c -> c - .access(a -> a - .replication(r -> r - .names("archive*") - ) - .search(s -> s - .names("logs*") - ) - ) - .expiration(e -> e - .time("1d") - ) - .metadata(Map.of("environment", JsonData.fromJson("{\"level\":1,\"trusted\":true,\"tags\":[\"dev\",\"staging\"]}"),"description", JsonData.fromJson("\"phase one\""))) - .name("my-cross-cluster-api-key") - ); diff --git a/specification/security/create_service_token/examples/request/CreateServiceTokenRequestExample1.yaml b/specification/security/create_service_token/examples/request/CreateServiceTokenRequestExample1.yaml index b32b52428b..a7e9b60c85 100644 --- a/specification/security/create_service_token/examples/request/CreateServiceTokenRequestExample1.yaml +++ b/specification/security/create_service_token/examples/request/CreateServiceTokenRequestExample1.yaml @@ -1,40 +1 @@ method_request: POST /_security/service/elastic/fleet-server/credential/token/token1 -alternatives: - - language: Python - code: |- - resp = client.security.create_service_token( - namespace="elastic", - service="fleet-server", - name="token1", - ) - - language: JavaScript - code: |- - const response = await client.security.createServiceToken({ - namespace: "elastic", - service: "fleet-server", - name: "token1", - }); - - language: Ruby - code: |- - response = client.security.create_service_token( - namespace: "elastic", - service: "fleet-server", - name: "token1" - ) - - language: PHP - code: |- - $resp = $client->security()->createServiceToken([ - "namespace" => "elastic", - "service" => "fleet-server", - "name" => "token1", - ]); - - language: curl - code: 'curl -X POST -H "Authorization: ApiKey $ELASTIC_API_KEY" - "$ELASTICSEARCH_URL/_security/service/elastic/fleet-server/credential/token/token1"' - - language: Java - code: | - client.security().createServiceToken(c -> c - .name("token1") - .namespace("elastic") - .service("fleet-server") - ); diff --git a/specification/security/delegate_pki/examples/request/SecurityDelegatePkiRequestExample1.yaml b/specification/security/delegate_pki/examples/request/SecurityDelegatePkiRequestExample1.yaml index f6e6fa973f..fced198508 100644 --- a/specification/security/delegate_pki/examples/request/SecurityDelegatePkiRequestExample1.yaml +++ b/specification/security/delegate_pki/examples/request/SecurityDelegatePkiRequestExample1.yaml @@ -18,81 +18,3 @@ value: "{ 4ka+KNPCbSfwazmJrt4XNiivPR4hwH5g==\"] }" -alternatives: - - language: Python - code: >- - resp = client.perform_request( - "POST", - "/_security/delegate_pki", - headers={"Content-Type": "application/json"}, - body={ - "x509_certificate_chain": [ - "MIIDeDCCAmCgAwIBAgIUBzj/nGGKxP2iXawsSquHmQjCJmMwDQYJKoZIhvcNAQELBQAwUzErMCkGA1UEAxMiRWxhc3RpY3NlYXJjaCBUZXN0IEludGVybWVkaWF0ZSBDQTEWMBQGA1UECxMNRWxhc3RpY3NlYXJjaDEMMAoGA1UEChMDb3JnMB4XDTIzMDcxODE5MjkwNloXDTQzMDcxMzE5MjkwNlowSjEiMCAGA1UEAxMZRWxhc3RpY3NlYXJjaCBUZXN0IENsaWVudDEWMBQGA1UECxMNRWxhc3RpY3NlYXJjaDEMMAoGA1UEChMDb3JnMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAllHL4pQkkfwAm/oLkxYYO+r950DEy1bjH+4viCHzNADLCTWO+lOZJVlNx7QEzJE3QGMdif9CCBBxQFMapA7oUFCLq84fPSQQu5AnvvbltVD9nwVtCs+9ZGDjMKsz98RhSLMFIkxdxi6HkQ3Lfa4ZSI4lvba4oo+T/GveazBDS+NgmKyq00EOXt3tWi1G9vEVItommzXWfv0agJWzVnLMldwkPqsw0W7zrpyT7FZS4iLbQADGceOW8fiauOGMkscu9zAnDR/SbWl/chYioQOdw6ndFLn1YIFPd37xL0WsdsldTpn0vH3YfzgLMffT/3P6YlwBegWzsx6FnM/93Ecb4wIDAQABo00wSzAJBgNVHRMEAjAAMB0GA1UdDgQWBBQKNRwjW+Ad/FN1Rpoqme/5+jrFWzAfBgNVHSMEGDAWgBRcya0c0x/PaI7MbmJVIylWgLqXNjANBgkqhkiG9w0BAQsFAAOCAQEACZ3PF7Uqu47lplXHP6YlzYL2jL0D28hpj5lGtdha4Muw1m/BjDb0Pu8l0NQ1z3AP6AVcvjNDkQq6Y5jeSz0bwQlealQpYfo7EMXjOidrft1GbqOMFmTBLpLA9SvwYGobSTXWTkJzonqVaTcf80HpMgM2uEhodwTcvz6v1WEfeT/HMjmdIsq4ImrOL9RNrcZG6nWfw0HR3JNOgrbfyEztEI471jHznZ336OEcyX7gQuvHE8tOv5+oD1d7s3Xg1yuFp+Ynh+FfOi3hPCuaHA+7F6fLmzMDLVUBAllugst1C3U+L/paD7tqIa4ka+KNPCbSfwazmJrt4XNiivPR4hwH5g==" - ] - }, - ) - - language: JavaScript - code: >- - const response = await client.transport.request({ - method: "POST", - path: "/_security/delegate_pki", - body: { - x509_certificate_chain: [ - "MIIDeDCCAmCgAwIBAgIUBzj/nGGKxP2iXawsSquHmQjCJmMwDQYJKoZIhvcNAQELBQAwUzErMCkGA1UEAxMiRWxhc3RpY3NlYXJjaCBUZXN0IEludGVybWVkaWF0ZSBDQTEWMBQGA1UECxMNRWxhc3RpY3NlYXJjaDEMMAoGA1UEChMDb3JnMB4XDTIzMDcxODE5MjkwNloXDTQzMDcxMzE5MjkwNlowSjEiMCAGA1UEAxMZRWxhc3RpY3NlYXJjaCBUZXN0IENsaWVudDEWMBQGA1UECxMNRWxhc3RpY3NlYXJjaDEMMAoGA1UEChMDb3JnMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAllHL4pQkkfwAm/oLkxYYO+r950DEy1bjH+4viCHzNADLCTWO+lOZJVlNx7QEzJE3QGMdif9CCBBxQFMapA7oUFCLq84fPSQQu5AnvvbltVD9nwVtCs+9ZGDjMKsz98RhSLMFIkxdxi6HkQ3Lfa4ZSI4lvba4oo+T/GveazBDS+NgmKyq00EOXt3tWi1G9vEVItommzXWfv0agJWzVnLMldwkPqsw0W7zrpyT7FZS4iLbQADGceOW8fiauOGMkscu9zAnDR/SbWl/chYioQOdw6ndFLn1YIFPd37xL0WsdsldTpn0vH3YfzgLMffT/3P6YlwBegWzsx6FnM/93Ecb4wIDAQABo00wSzAJBgNVHRMEAjAAMB0GA1UdDgQWBBQKNRwjW+Ad/FN1Rpoqme/5+jrFWzAfBgNVHSMEGDAWgBRcya0c0x/PaI7MbmJVIylWgLqXNjANBgkqhkiG9w0BAQsFAAOCAQEACZ3PF7Uqu47lplXHP6YlzYL2jL0D28hpj5lGtdha4Muw1m/BjDb0Pu8l0NQ1z3AP6AVcvjNDkQq6Y5jeSz0bwQlealQpYfo7EMXjOidrft1GbqOMFmTBLpLA9SvwYGobSTXWTkJzonqVaTcf80HpMgM2uEhodwTcvz6v1WEfeT/HMjmdIsq4ImrOL9RNrcZG6nWfw0HR3JNOgrbfyEztEI471jHznZ336OEcyX7gQuvHE8tOv5+oD1d7s3Xg1yuFp+Ynh+FfOi3hPCuaHA+7F6fLmzMDLVUBAllugst1C3U+L/paD7tqIa4ka+KNPCbSfwazmJrt4XNiivPR4hwH5g==", - ], - }, - }); - - language: Ruby - code: >- - response = client.perform_request( - "POST", - "/_security/delegate_pki", - {}, - { - "x509_certificate_chain": [ - "MIIDeDCCAmCgAwIBAgIUBzj/nGGKxP2iXawsSquHmQjCJmMwDQYJKoZIhvcNAQELBQAwUzErMCkGA1UEAxMiRWxhc3RpY3NlYXJjaCBUZXN0IEludGVybWVkaWF0ZSBDQTEWMBQGA1UECxMNRWxhc3RpY3NlYXJjaDEMMAoGA1UEChMDb3JnMB4XDTIzMDcxODE5MjkwNloXDTQzMDcxMzE5MjkwNlowSjEiMCAGA1UEAxMZRWxhc3RpY3NlYXJjaCBUZXN0IENsaWVudDEWMBQGA1UECxMNRWxhc3RpY3NlYXJjaDEMMAoGA1UEChMDb3JnMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAllHL4pQkkfwAm/oLkxYYO+r950DEy1bjH+4viCHzNADLCTWO+lOZJVlNx7QEzJE3QGMdif9CCBBxQFMapA7oUFCLq84fPSQQu5AnvvbltVD9nwVtCs+9ZGDjMKsz98RhSLMFIkxdxi6HkQ3Lfa4ZSI4lvba4oo+T/GveazBDS+NgmKyq00EOXt3tWi1G9vEVItommzXWfv0agJWzVnLMldwkPqsw0W7zrpyT7FZS4iLbQADGceOW8fiauOGMkscu9zAnDR/SbWl/chYioQOdw6ndFLn1YIFPd37xL0WsdsldTpn0vH3YfzgLMffT/3P6YlwBegWzsx6FnM/93Ecb4wIDAQABo00wSzAJBgNVHRMEAjAAMB0GA1UdDgQWBBQKNRwjW+Ad/FN1Rpoqme/5+jrFWzAfBgNVHSMEGDAWgBRcya0c0x/PaI7MbmJVIylWgLqXNjANBgkqhkiG9w0BAQsFAAOCAQEACZ3PF7Uqu47lplXHP6YlzYL2jL0D28hpj5lGtdha4Muw1m/BjDb0Pu8l0NQ1z3AP6AVcvjNDkQq6Y5jeSz0bwQlealQpYfo7EMXjOidrft1GbqOMFmTBLpLA9SvwYGobSTXWTkJzonqVaTcf80HpMgM2uEhodwTcvz6v1WEfeT/HMjmdIsq4ImrOL9RNrcZG6nWfw0HR3JNOgrbfyEztEI471jHznZ336OEcyX7gQuvHE8tOv5+oD1d7s3Xg1yuFp+Ynh+FfOi3hPCuaHA+7F6fLmzMDLVUBAllugst1C3U+L/paD7tqIa4ka+KNPCbSfwazmJrt4XNiivPR4hwH5g==" - ] - }, - { "Content-Type": "application/json" }, - ) - - language: PHP - code: >- - $requestFactory = Psr17FactoryDiscovery::findRequestFactory(); - - $streamFactory = Psr17FactoryDiscovery::findStreamFactory(); - - $request = $requestFactory->createRequest( - "POST", - "/_security/delegate_pki", - ); - - $request = $request->withHeader("Content-Type", "application/json"); - - $request = $request->withBody($streamFactory->createStream( - json_encode([ - "x509_certificate_chain" => array( - "MIIDeDCCAmCgAwIBAgIUBzj/nGGKxP2iXawsSquHmQjCJmMwDQYJKoZIhvcNAQELBQAwUzErMCkGA1UEAxMiRWxhc3RpY3NlYXJjaCBUZXN0IEludGVybWVkaWF0ZSBDQTEWMBQGA1UECxMNRWxhc3RpY3NlYXJjaDEMMAoGA1UEChMDb3JnMB4XDTIzMDcxODE5MjkwNloXDTQzMDcxMzE5MjkwNlowSjEiMCAGA1UEAxMZRWxhc3RpY3NlYXJjaCBUZXN0IENsaWVudDEWMBQGA1UECxMNRWxhc3RpY3NlYXJjaDEMMAoGA1UEChMDb3JnMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAllHL4pQkkfwAm/oLkxYYO+r950DEy1bjH+4viCHzNADLCTWO+lOZJVlNx7QEzJE3QGMdif9CCBBxQFMapA7oUFCLq84fPSQQu5AnvvbltVD9nwVtCs+9ZGDjMKsz98RhSLMFIkxdxi6HkQ3Lfa4ZSI4lvba4oo+T/GveazBDS+NgmKyq00EOXt3tWi1G9vEVItommzXWfv0agJWzVnLMldwkPqsw0W7zrpyT7FZS4iLbQADGceOW8fiauOGMkscu9zAnDR/SbWl/chYioQOdw6ndFLn1YIFPd37xL0WsdsldTpn0vH3YfzgLMffT/3P6YlwBegWzsx6FnM/93Ecb4wIDAQABo00wSzAJBgNVHRMEAjAAMB0GA1UdDgQWBBQKNRwjW+Ad/FN1Rpoqme/5+jrFWzAfBgNVHSMEGDAWgBRcya0c0x/PaI7MbmJVIylWgLqXNjANBgkqhkiG9w0BAQsFAAOCAQEACZ3PF7Uqu47lplXHP6YlzYL2jL0D28hpj5lGtdha4Muw1m/BjDb0Pu8l0NQ1z3AP6AVcvjNDkQq6Y5jeSz0bwQlealQpYfo7EMXjOidrft1GbqOMFmTBLpLA9SvwYGobSTXWTkJzonqVaTcf80HpMgM2uEhodwTcvz6v1WEfeT/HMjmdIsq4ImrOL9RNrcZG6nWfw0HR3JNOgrbfyEztEI471jHznZ336OEcyX7gQuvHE8tOv5+oD1d7s3Xg1yuFp+Ynh+FfOi3hPCuaHA+7F6fLmzMDLVUBAllugst1C3U+L/paD7tqIa4ka+KNPCbSfwazmJrt4XNiivPR4hwH5g==", - ), - ]), - )); - - $resp = $client->sendRequest($request); - - language: curl - code: - "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d - '{\"x509_certificate_chain\":[\"MIIDeDCCAmCgAwIBAgIUBzj/nGGKxP2iXawsSquHmQjCJmMwDQYJKoZIhvcNAQELBQAwUzErMCkGA1UEAxMiRWxhc3RpY\ - 3NlYXJjaCBUZXN0IEludGVybWVkaWF0ZSBDQTEWMBQGA1UECxMNRWxhc3RpY3NlYXJjaDEMMAoGA1UEChMDb3JnMB4XDTIzMDcxODE5MjkwNloXDTQzMDcxMzE5Mj\ - kwNlowSjEiMCAGA1UEAxMZRWxhc3RpY3NlYXJjaCBUZXN0IENsaWVudDEWMBQGA1UECxMNRWxhc3RpY3NlYXJjaDEMMAoGA1UEChMDb3JnMIIBIjANBgkqhkiG9w0\ - BAQEFAAOCAQ8AMIIBCgKCAQEAllHL4pQkkfwAm/oLkxYYO+r950DEy1bjH+4viCHzNADLCTWO+lOZJVlNx7QEzJE3QGMdif9CCBBxQFMapA7oUFCLq84fPSQQu5An\ - vvbltVD9nwVtCs+9ZGDjMKsz98RhSLMFIkxdxi6HkQ3Lfa4ZSI4lvba4oo+T/GveazBDS+NgmKyq00EOXt3tWi1G9vEVItommzXWfv0agJWzVnLMldwkPqsw0W7zr\ - pyT7FZS4iLbQADGceOW8fiauOGMkscu9zAnDR/SbWl/chYioQOdw6ndFLn1YIFPd37xL0WsdsldTpn0vH3YfzgLMffT/3P6YlwBegWzsx6FnM/93Ecb4wIDAQABo0\ - 0wSzAJBgNVHRMEAjAAMB0GA1UdDgQWBBQKNRwjW+Ad/FN1Rpoqme/5+jrFWzAfBgNVHSMEGDAWgBRcya0c0x/PaI7MbmJVIylWgLqXNjANBgkqhkiG9w0BAQsFAAO\ - CAQEACZ3PF7Uqu47lplXHP6YlzYL2jL0D28hpj5lGtdha4Muw1m/BjDb0Pu8l0NQ1z3AP6AVcvjNDkQq6Y5jeSz0bwQlealQpYfo7EMXjOidrft1GbqOMFmTBLpLA\ - 9SvwYGobSTXWTkJzonqVaTcf80HpMgM2uEhodwTcvz6v1WEfeT/HMjmdIsq4ImrOL9RNrcZG6nWfw0HR3JNOgrbfyEztEI471jHznZ336OEcyX7gQuvHE8tOv5+oD\ - 1d7s3Xg1yuFp+Ynh+FfOi3hPCuaHA+7F6fLmzMDLVUBAllugst1C3U+L/paD7tqIa4ka+KNPCbSfwazmJrt4XNiivPR4hwH5g==\"]}' - \"$ELASTICSEARCH_URL/_security/delegate_pki\"" - - language: Java - code: > - client.security().delegatePki(d -> d - .x509CertificateChain("MIIDeDCCAmCgAwIBAgIUBzj/nGGKxP2iXawsSquHmQjCJmMwDQYJKoZIhvcNAQELBQAwUzErMCkGA1UEAxMiRWxhc3RpY3NlYXJjaCBUZXN0IEludGVybWVkaWF0ZSBDQTEWMBQGA1UECxMNRWxhc3RpY3NlYXJjaDEMMAoGA1UEChMDb3JnMB4XDTIzMDcxODE5MjkwNloXDTQzMDcxMzE5MjkwNlowSjEiMCAGA1UEAxMZRWxhc3RpY3NlYXJjaCBUZXN0IENsaWVudDEWMBQGA1UECxMNRWxhc3RpY3NlYXJjaDEMMAoGA1UEChMDb3JnMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAllHL4pQkkfwAm/oLkxYYO+r950DEy1bjH+4viCHzNADLCTWO+lOZJVlNx7QEzJE3QGMdif9CCBBxQFMapA7oUFCLq84fPSQQu5AnvvbltVD9nwVtCs+9ZGDjMKsz98RhSLMFIkxdxi6HkQ3Lfa4ZSI4lvba4oo+T/GveazBDS+NgmKyq00EOXt3tWi1G9vEVItommzXWfv0agJWzVnLMldwkPqsw0W7zrpyT7FZS4iLbQADGceOW8fiauOGMkscu9zAnDR/SbWl/chYioQOdw6ndFLn1YIFPd37xL0WsdsldTpn0vH3YfzgLMffT/3P6YlwBegWzsx6FnM/93Ecb4wIDAQABo00wSzAJBgNVHRMEAjAAMB0GA1UdDgQWBBQKNRwjW+Ad/FN1Rpoqme/5+jrFWzAfBgNVHSMEGDAWgBRcya0c0x/PaI7MbmJVIylWgLqXNjANBgkqhkiG9w0BAQsFAAOCAQEACZ3PF7Uqu47lplXHP6YlzYL2jL0D28hpj5lGtdha4Muw1m/BjDb0Pu8l0NQ1z3AP6AVcvjNDkQq6Y5jeSz0bwQlealQpYfo7EMXjOidrft1GbqOMFmTBLpLA9SvwYGobSTXWTkJzonqVaTcf80HpMgM2uEhodwTcvz6v1WEfeT/HMjmdIsq4ImrOL9RNrcZG6nWfw0HR3JNOgrbfyEztEI471jHznZ336OEcyX7gQuvHE8tOv5+oD1d7s3Xg1yuFp+Ynh+FfOi3hPCuaHA+7F6fLmzMDLVUBAllugst1C3U+L/paD7tqIa4ka+KNPCbSfwazmJrt4XNiivPR4hwH5g==") - ); diff --git a/specification/security/delete_privileges/examples/request/SecurityDeletePrivilegesRequestExample1.yaml b/specification/security/delete_privileges/examples/request/SecurityDeletePrivilegesRequestExample1.yaml index 164766b7ae..82493c1cf2 100644 --- a/specification/security/delete_privileges/examples/request/SecurityDeletePrivilegesRequestExample1.yaml +++ b/specification/security/delete_privileges/examples/request/SecurityDeletePrivilegesRequestExample1.yaml @@ -1,34 +1 @@ method_request: DELETE /_security/privilege/myapp/read -alternatives: - - language: Python - code: |- - resp = client.security.delete_privileges( - application="myapp", - name="read", - ) - - language: JavaScript - code: |- - const response = await client.security.deletePrivileges({ - application: "myapp", - name: "read", - }); - - language: Ruby - code: |- - response = client.security.delete_privileges( - application: "myapp", - name: "read" - ) - - language: PHP - code: |- - $resp = $client->security()->deletePrivileges([ - "application" => "myapp", - "name" => "read", - ]); - - language: curl - code: 'curl -X DELETE -H "Authorization: ApiKey $ELASTIC_API_KEY" "$ELASTICSEARCH_URL/_security/privilege/myapp/read"' - - language: Java - code: | - client.security().deletePrivileges(d -> d - .application("myapp") - .name("read") - ); diff --git a/specification/security/delete_role/examples/request/SecurityDeleteRoleRequestExample1.yaml b/specification/security/delete_role/examples/request/SecurityDeleteRoleRequestExample1.yaml index 4c660873e3..2d33c5033a 100644 --- a/specification/security/delete_role/examples/request/SecurityDeleteRoleRequestExample1.yaml +++ b/specification/security/delete_role/examples/request/SecurityDeleteRoleRequestExample1.yaml @@ -1,29 +1 @@ method_request: DELETE /_security/role/my_admin_role -alternatives: - - language: Python - code: |- - resp = client.security.delete_role( - name="my_admin_role", - ) - - language: JavaScript - code: |- - const response = await client.security.deleteRole({ - name: "my_admin_role", - }); - - language: Ruby - code: |- - response = client.security.delete_role( - name: "my_admin_role" - ) - - language: PHP - code: |- - $resp = $client->security()->deleteRole([ - "name" => "my_admin_role", - ]); - - language: curl - code: 'curl -X DELETE -H "Authorization: ApiKey $ELASTIC_API_KEY" "$ELASTICSEARCH_URL/_security/role/my_admin_role"' - - language: Java - code: | - client.security().deleteRole(d -> d - .name("my_admin_role") - ); diff --git a/specification/security/delete_role_mapping/examples/request/SecurityDeleteRoleMappingRequestExample1.yaml b/specification/security/delete_role_mapping/examples/request/SecurityDeleteRoleMappingRequestExample1.yaml index d868afbb0f..0844e2ce99 100644 --- a/specification/security/delete_role_mapping/examples/request/SecurityDeleteRoleMappingRequestExample1.yaml +++ b/specification/security/delete_role_mapping/examples/request/SecurityDeleteRoleMappingRequestExample1.yaml @@ -1,29 +1 @@ method_request: DELETE /_security/role_mapping/mapping1 -alternatives: - - language: Python - code: |- - resp = client.security.delete_role_mapping( - name="mapping1", - ) - - language: JavaScript - code: |- - const response = await client.security.deleteRoleMapping({ - name: "mapping1", - }); - - language: Ruby - code: |- - response = client.security.delete_role_mapping( - name: "mapping1" - ) - - language: PHP - code: |- - $resp = $client->security()->deleteRoleMapping([ - "name" => "mapping1", - ]); - - language: curl - code: 'curl -X DELETE -H "Authorization: ApiKey $ELASTIC_API_KEY" "$ELASTICSEARCH_URL/_security/role_mapping/mapping1"' - - language: Java - code: | - client.security().deleteRoleMapping(d -> d - .name("mapping1") - ); diff --git a/specification/security/delete_service_token/examples/request/DeleteServiceTokenRequestExample1.yaml b/specification/security/delete_service_token/examples/request/DeleteServiceTokenRequestExample1.yaml index efcae991c9..e072e81aa8 100644 --- a/specification/security/delete_service_token/examples/request/DeleteServiceTokenRequestExample1.yaml +++ b/specification/security/delete_service_token/examples/request/DeleteServiceTokenRequestExample1.yaml @@ -1,40 +1 @@ method_request: DELETE /_security/service/elastic/fleet-server/credential/token/token42 -alternatives: - - language: Python - code: |- - resp = client.security.delete_service_token( - namespace="elastic", - service="fleet-server", - name="token42", - ) - - language: JavaScript - code: |- - const response = await client.security.deleteServiceToken({ - namespace: "elastic", - service: "fleet-server", - name: "token42", - }); - - language: Ruby - code: |- - response = client.security.delete_service_token( - namespace: "elastic", - service: "fleet-server", - name: "token42" - ) - - language: PHP - code: |- - $resp = $client->security()->deleteServiceToken([ - "namespace" => "elastic", - "service" => "fleet-server", - "name" => "token42", - ]); - - language: curl - code: 'curl -X DELETE -H "Authorization: ApiKey $ELASTIC_API_KEY" - "$ELASTICSEARCH_URL/_security/service/elastic/fleet-server/credential/token/token42"' - - language: Java - code: | - client.security().deleteServiceToken(d -> d - .name("token42") - .namespace("elastic") - .service("fleet-server") - ); diff --git a/specification/security/delete_user/examples/request/SecurityDeleteUserRequestExample1.yaml b/specification/security/delete_user/examples/request/SecurityDeleteUserRequestExample1.yaml index 83368844df..51f768bda3 100644 --- a/specification/security/delete_user/examples/request/SecurityDeleteUserRequestExample1.yaml +++ b/specification/security/delete_user/examples/request/SecurityDeleteUserRequestExample1.yaml @@ -1,29 +1 @@ method_request: DELETE /_security/user/jacknich -alternatives: - - language: Python - code: |- - resp = client.security.delete_user( - username="jacknich", - ) - - language: JavaScript - code: |- - const response = await client.security.deleteUser({ - username: "jacknich", - }); - - language: Ruby - code: |- - response = client.security.delete_user( - username: "jacknich" - ) - - language: PHP - code: |- - $resp = $client->security()->deleteUser([ - "username" => "jacknich", - ]); - - language: curl - code: 'curl -X DELETE -H "Authorization: ApiKey $ELASTIC_API_KEY" "$ELASTICSEARCH_URL/_security/user/jacknich"' - - language: Java - code: | - client.security().deleteUser(d -> d - .username("jacknich") - ); diff --git a/specification/security/disable_user/examples/request/SecurityDisableUserExample1.yaml b/specification/security/disable_user/examples/request/SecurityDisableUserExample1.yaml index 1677c68d01..9b277ada09 100644 --- a/specification/security/disable_user/examples/request/SecurityDisableUserExample1.yaml +++ b/specification/security/disable_user/examples/request/SecurityDisableUserExample1.yaml @@ -1,29 +1 @@ method_request: PUT /_security/user/jacknich/_disable -alternatives: - - language: Python - code: |- - resp = client.security.disable_user( - username="jacknich", - ) - - language: JavaScript - code: |- - const response = await client.security.disableUser({ - username: "jacknich", - }); - - language: Ruby - code: |- - response = client.security.disable_user( - username: "jacknich" - ) - - language: PHP - code: |- - $resp = $client->security()->disableUser([ - "username" => "jacknich", - ]); - - language: curl - code: 'curl -X PUT -H "Authorization: ApiKey $ELASTIC_API_KEY" "$ELASTICSEARCH_URL/_security/user/jacknich/_disable"' - - language: Java - code: | - client.security().disableUser(d -> d - .username("jacknich") - ); diff --git a/specification/security/disable_user_profile/examples/request/SecurityDisableUserProfileExample1.yaml b/specification/security/disable_user_profile/examples/request/SecurityDisableUserProfileExample1.yaml index c98f6e4e96..5a913badc6 100644 --- a/specification/security/disable_user_profile/examples/request/SecurityDisableUserProfileExample1.yaml +++ b/specification/security/disable_user_profile/examples/request/SecurityDisableUserProfileExample1.yaml @@ -1,30 +1 @@ method_request: POST /_security/profile/u_79HkWkwmnBH5gqFKwoxggWPjEBOur1zLPXQPEl1VBW0_0/_disable -alternatives: - - language: Python - code: |- - resp = client.security.disable_user_profile( - uid="u_79HkWkwmnBH5gqFKwoxggWPjEBOur1zLPXQPEl1VBW0_0", - ) - - language: JavaScript - code: |- - const response = await client.security.disableUserProfile({ - uid: "u_79HkWkwmnBH5gqFKwoxggWPjEBOur1zLPXQPEl1VBW0_0", - }); - - language: Ruby - code: |- - response = client.security.disable_user_profile( - uid: "u_79HkWkwmnBH5gqFKwoxggWPjEBOur1zLPXQPEl1VBW0_0" - ) - - language: PHP - code: |- - $resp = $client->security()->disableUserProfile([ - "uid" => "u_79HkWkwmnBH5gqFKwoxggWPjEBOur1zLPXQPEl1VBW0_0", - ]); - - language: curl - code: 'curl -X POST -H "Authorization: ApiKey $ELASTIC_API_KEY" - "$ELASTICSEARCH_URL/_security/profile/u_79HkWkwmnBH5gqFKwoxggWPjEBOur1zLPXQPEl1VBW0_0/_disable"' - - language: Java - code: | - client.security().disableUserProfile(d -> d - .uid("u_79HkWkwmnBH5gqFKwoxggWPjEBOur1zLPXQPEl1VBW0_0") - ); diff --git a/specification/security/enable_user/examples/request/SecurityEnableUserExample1.yaml b/specification/security/enable_user/examples/request/SecurityEnableUserExample1.yaml index bf94a1ed6c..4e9a5b5a4b 100644 --- a/specification/security/enable_user/examples/request/SecurityEnableUserExample1.yaml +++ b/specification/security/enable_user/examples/request/SecurityEnableUserExample1.yaml @@ -1,29 +1 @@ method_request: PUT _security/user/logstash_system/_enable -alternatives: - - language: Python - code: |- - resp = client.security.enable_user( - username="logstash_system", - ) - - language: JavaScript - code: |- - const response = await client.security.enableUser({ - username: "logstash_system", - }); - - language: Ruby - code: |- - response = client.security.enable_user( - username: "logstash_system" - ) - - language: PHP - code: |- - $resp = $client->security()->enableUser([ - "username" => "logstash_system", - ]); - - language: curl - code: 'curl -X PUT -H "Authorization: ApiKey $ELASTIC_API_KEY" "$ELASTICSEARCH_URL/_security/user/logstash_system/_enable"' - - language: Java - code: | - client.security().enableUser(e -> e - .username("logstash_system") - ); diff --git a/specification/security/enable_user_profile/examples/request/SecurityEnableUserProfileExample1.yaml b/specification/security/enable_user_profile/examples/request/SecurityEnableUserProfileExample1.yaml index d85ffdb2cd..0eb63f53b1 100644 --- a/specification/security/enable_user_profile/examples/request/SecurityEnableUserProfileExample1.yaml +++ b/specification/security/enable_user_profile/examples/request/SecurityEnableUserProfileExample1.yaml @@ -1,30 +1 @@ method_request: POST /_security/profile/u_79HkWkwmnBH5gqFKwoxggWPjEBOur1zLPXQPEl1VBW0_0/_enable -alternatives: - - language: Python - code: |- - resp = client.security.enable_user_profile( - uid="u_79HkWkwmnBH5gqFKwoxggWPjEBOur1zLPXQPEl1VBW0_0", - ) - - language: JavaScript - code: |- - const response = await client.security.enableUserProfile({ - uid: "u_79HkWkwmnBH5gqFKwoxggWPjEBOur1zLPXQPEl1VBW0_0", - }); - - language: Ruby - code: |- - response = client.security.enable_user_profile( - uid: "u_79HkWkwmnBH5gqFKwoxggWPjEBOur1zLPXQPEl1VBW0_0" - ) - - language: PHP - code: |- - $resp = $client->security()->enableUserProfile([ - "uid" => "u_79HkWkwmnBH5gqFKwoxggWPjEBOur1zLPXQPEl1VBW0_0", - ]); - - language: curl - code: 'curl -X POST -H "Authorization: ApiKey $ELASTIC_API_KEY" - "$ELASTICSEARCH_URL/_security/profile/u_79HkWkwmnBH5gqFKwoxggWPjEBOur1zLPXQPEl1VBW0_0/_enable"' - - language: Java - code: | - client.security().enableUserProfile(e -> e - .uid("u_79HkWkwmnBH5gqFKwoxggWPjEBOur1zLPXQPEl1VBW0_0") - ); diff --git a/specification/security/enroll_kibana/examples/request/EnrollKibanaRequestExample1.yaml b/specification/security/enroll_kibana/examples/request/EnrollKibanaRequestExample1.yaml index e1c5a346f7..f9d13d8221 100644 --- a/specification/security/enroll_kibana/examples/request/EnrollKibanaRequestExample1.yaml +++ b/specification/security/enroll_kibana/examples/request/EnrollKibanaRequestExample1.yaml @@ -1,15 +1 @@ method_request: GET /_security/enroll/kibana -alternatives: - - language: Python - code: resp = client.security.enroll_kibana() - - language: JavaScript - code: const response = await client.security.enrollKibana(); - - language: Ruby - code: response = client.security.enroll_kibana - - language: PHP - code: $resp = $client->security()->enrollKibana(); - - language: curl - code: 'curl -X GET -H "Authorization: ApiKey $ELASTIC_API_KEY" "$ELASTICSEARCH_URL/_security/enroll/kibana"' - - language: Java - code: | - client.security().enrollKibana(); diff --git a/specification/security/get_api_key/examples/request/SecurityGetApiKeyRequestExample2.yaml b/specification/security/get_api_key/examples/request/SecurityGetApiKeyRequestExample2.yaml index dec2ee0a15..d01a5d4562 100644 --- a/specification/security/get_api_key/examples/request/SecurityGetApiKeyRequestExample2.yaml +++ b/specification/security/get_api_key/examples/request/SecurityGetApiKeyRequestExample2.yaml @@ -1,35 +1 @@ method_request: GET /_security/api_key?username=myuser&realm_name=native1 -alternatives: - - language: Python - code: |- - resp = client.security.get_api_key( - username="myuser", - realm_name="native1", - ) - - language: JavaScript - code: |- - const response = await client.security.getApiKey({ - username: "myuser", - realm_name: "native1", - }); - - language: Ruby - code: |- - response = client.security.get_api_key( - username: "myuser", - realm_name: "native1" - ) - - language: PHP - code: |- - $resp = $client->security()->getApiKey([ - "username" => "myuser", - "realm_name" => "native1", - ]); - - language: curl - code: 'curl -X GET -H "Authorization: ApiKey $ELASTIC_API_KEY" - "$ELASTICSEARCH_URL/_security/api_key?username=myuser&realm_name=native1"' - - language: Java - code: | - client.security().getApiKey(g -> g - .realmName("native1") - .username("myuser") - ); diff --git a/specification/security/get_builtin_privileges/examples/request/SecurityGetBuiltinPrivilegesRequestExample1.yaml b/specification/security/get_builtin_privileges/examples/request/SecurityGetBuiltinPrivilegesRequestExample1.yaml index 0b7e107530..f2787c15c6 100644 --- a/specification/security/get_builtin_privileges/examples/request/SecurityGetBuiltinPrivilegesRequestExample1.yaml +++ b/specification/security/get_builtin_privileges/examples/request/SecurityGetBuiltinPrivilegesRequestExample1.yaml @@ -1,15 +1 @@ method_request: GET /_security/privilege/_builtin -alternatives: - - language: Python - code: resp = client.security.get_builtin_privileges() - - language: JavaScript - code: const response = await client.security.getBuiltinPrivileges(); - - language: Ruby - code: response = client.security.get_builtin_privileges - - language: PHP - code: $resp = $client->security()->getBuiltinPrivileges(); - - language: curl - code: 'curl -X GET -H "Authorization: ApiKey $ELASTIC_API_KEY" "$ELASTICSEARCH_URL/_security/privilege/_builtin"' - - language: Java - code: | - client.security().getBuiltinPrivileges(); diff --git a/specification/security/get_privileges/examples/request/SecurityGetPrivilegesRequestExample1.yaml b/specification/security/get_privileges/examples/request/SecurityGetPrivilegesRequestExample1.yaml index a5b4e53c35..e88cd1e08d 100644 --- a/specification/security/get_privileges/examples/request/SecurityGetPrivilegesRequestExample1.yaml +++ b/specification/security/get_privileges/examples/request/SecurityGetPrivilegesRequestExample1.yaml @@ -1,34 +1 @@ method_request: GET /_security/privilege/myapp/read -alternatives: - - language: Python - code: |- - resp = client.security.get_privileges( - application="myapp", - name="read", - ) - - language: JavaScript - code: |- - const response = await client.security.getPrivileges({ - application: "myapp", - name: "read", - }); - - language: Ruby - code: |- - response = client.security.get_privileges( - application: "myapp", - name: "read" - ) - - language: PHP - code: |- - $resp = $client->security()->getPrivileges([ - "application" => "myapp", - "name" => "read", - ]); - - language: curl - code: 'curl -X GET -H "Authorization: ApiKey $ELASTIC_API_KEY" "$ELASTICSEARCH_URL/_security/privilege/myapp/read"' - - language: Java - code: | - client.security().getPrivileges(g -> g - .application("myapp") - .name("read") - ); diff --git a/specification/security/get_role/examples/request/SecurityGetRoleRequestExample1.yaml b/specification/security/get_role/examples/request/SecurityGetRoleRequestExample1.yaml index 7e80d08d53..49df6d76a6 100644 --- a/specification/security/get_role/examples/request/SecurityGetRoleRequestExample1.yaml +++ b/specification/security/get_role/examples/request/SecurityGetRoleRequestExample1.yaml @@ -1,29 +1 @@ method_request: GET /_security/role/my_admin_role -alternatives: - - language: Python - code: |- - resp = client.security.get_role( - name="my_admin_role", - ) - - language: JavaScript - code: |- - const response = await client.security.getRole({ - name: "my_admin_role", - }); - - language: Ruby - code: |- - response = client.security.get_role( - name: "my_admin_role" - ) - - language: PHP - code: |- - $resp = $client->security()->getRole([ - "name" => "my_admin_role", - ]); - - language: curl - code: 'curl -X GET -H "Authorization: ApiKey $ELASTIC_API_KEY" "$ELASTICSEARCH_URL/_security/role/my_admin_role"' - - language: Java - code: | - client.security().getRole(g -> g - .name("my_admin_role") - ); diff --git a/specification/security/get_role_mapping/examples/request/SecurityGetRoleMappingRequestExample1.yaml b/specification/security/get_role_mapping/examples/request/SecurityGetRoleMappingRequestExample1.yaml index 34ef6c9a40..49a6a976b2 100644 --- a/specification/security/get_role_mapping/examples/request/SecurityGetRoleMappingRequestExample1.yaml +++ b/specification/security/get_role_mapping/examples/request/SecurityGetRoleMappingRequestExample1.yaml @@ -1,29 +1 @@ method_request: GET /_security/role_mapping/mapping1 -alternatives: - - language: Python - code: |- - resp = client.security.get_role_mapping( - name="mapping1", - ) - - language: JavaScript - code: |- - const response = await client.security.getRoleMapping({ - name: "mapping1", - }); - - language: Ruby - code: |- - response = client.security.get_role_mapping( - name: "mapping1" - ) - - language: PHP - code: |- - $resp = $client->security()->getRoleMapping([ - "name" => "mapping1", - ]); - - language: curl - code: 'curl -X GET -H "Authorization: ApiKey $ELASTIC_API_KEY" "$ELASTICSEARCH_URL/_security/role_mapping/mapping1"' - - language: Java - code: | - client.security().getRoleMapping(g -> g - .name("mapping1") - ); diff --git a/specification/security/get_service_accounts/examples/request/GetServiceAccountsRequestExample1.yaml b/specification/security/get_service_accounts/examples/request/GetServiceAccountsRequestExample1.yaml index 3622609813..93531186a5 100644 --- a/specification/security/get_service_accounts/examples/request/GetServiceAccountsRequestExample1.yaml +++ b/specification/security/get_service_accounts/examples/request/GetServiceAccountsRequestExample1.yaml @@ -1,34 +1 @@ method_request: GET /_security/service/elastic/fleet-server -alternatives: - - language: Python - code: |- - resp = client.security.get_service_accounts( - namespace="elastic", - service="fleet-server", - ) - - language: JavaScript - code: |- - const response = await client.security.getServiceAccounts({ - namespace: "elastic", - service: "fleet-server", - }); - - language: Ruby - code: |- - response = client.security.get_service_accounts( - namespace: "elastic", - service: "fleet-server" - ) - - language: PHP - code: |- - $resp = $client->security()->getServiceAccounts([ - "namespace" => "elastic", - "service" => "fleet-server", - ]); - - language: curl - code: 'curl -X GET -H "Authorization: ApiKey $ELASTIC_API_KEY" "$ELASTICSEARCH_URL/_security/service/elastic/fleet-server"' - - language: Java - code: | - client.security().getServiceAccounts(g -> g - .namespace("elastic") - .service("fleet-server") - ); diff --git a/specification/security/get_service_credentials/examples/request/GetServiceCredentialsRequestExample1.yaml b/specification/security/get_service_credentials/examples/request/GetServiceCredentialsRequestExample1.yaml index 9edb57a158..40c009c1a9 100644 --- a/specification/security/get_service_credentials/examples/request/GetServiceCredentialsRequestExample1.yaml +++ b/specification/security/get_service_credentials/examples/request/GetServiceCredentialsRequestExample1.yaml @@ -1,35 +1 @@ method_request: GET /_security/service/elastic/fleet-server/credential -alternatives: - - language: Python - code: |- - resp = client.security.get_service_credentials( - namespace="elastic", - service="fleet-server", - ) - - language: JavaScript - code: |- - const response = await client.security.getServiceCredentials({ - namespace: "elastic", - service: "fleet-server", - }); - - language: Ruby - code: |- - response = client.security.get_service_credentials( - namespace: "elastic", - service: "fleet-server" - ) - - language: PHP - code: |- - $resp = $client->security()->getServiceCredentials([ - "namespace" => "elastic", - "service" => "fleet-server", - ]); - - language: curl - code: 'curl -X GET -H "Authorization: ApiKey $ELASTIC_API_KEY" - "$ELASTICSEARCH_URL/_security/service/elastic/fleet-server/credential"' - - language: Java - code: | - client.security().getServiceCredentials(g -> g - .namespace("elastic") - .service("fleet-server") - ); diff --git a/specification/security/get_settings/examples/request/SecurityGetSettingsExample1.yaml b/specification/security/get_settings/examples/request/SecurityGetSettingsExample1.yaml index 83c295d324..db30177b6a 100644 --- a/specification/security/get_settings/examples/request/SecurityGetSettingsExample1.yaml +++ b/specification/security/get_settings/examples/request/SecurityGetSettingsExample1.yaml @@ -1,15 +1 @@ method_request: GET /_security/settings -alternatives: - - language: Python - code: resp = client.security.get_settings() - - language: JavaScript - code: const response = await client.security.getSettings(); - - language: Ruby - code: response = client.security.get_settings - - language: PHP - code: $resp = $client->security()->getSettings(); - - language: curl - code: 'curl -X GET -H "Authorization: ApiKey $ELASTIC_API_KEY" "$ELASTICSEARCH_URL/_security/settings"' - - language: Java - code: | - client.security().getSettings(g -> g); diff --git a/specification/security/get_token/examples/request/GetUserAccessTokenRequestExample1.yaml b/specification/security/get_token/examples/request/GetUserAccessTokenRequestExample1.yaml index ebb4b9f89a..f776ae108e 100644 --- a/specification/security/get_token/examples/request/GetUserAccessTokenRequestExample1.yaml +++ b/specification/security/get_token/examples/request/GetUserAccessTokenRequestExample1.yaml @@ -8,37 +8,3 @@ value: |- { "grant_type" : "client_credentials" } -alternatives: - - language: Python - code: |- - resp = client.security.get_token( - grant_type="client_credentials", - ) - - language: JavaScript - code: |- - const response = await client.security.getToken({ - grant_type: "client_credentials", - }); - - language: Ruby - code: |- - response = client.security.get_token( - body: { - "grant_type": "client_credentials" - } - ) - - language: PHP - code: |- - $resp = $client->security()->getToken([ - "body" => [ - "grant_type" => "client_credentials", - ], - ]); - - language: curl - code: - 'curl -X POST -H "Authorization: ApiKey $ELASTIC_API_KEY" -H "Content-Type: application/json" -d - ''{"grant_type":"client_credentials"}'' "$ELASTICSEARCH_URL/_security/oauth2/token"' - - language: Java - code: | - client.security().getToken(g -> g - .grantType(AccessTokenGrantType.ClientCredentials) - ); diff --git a/specification/security/get_token/examples/request/GetUserAccessTokenRequestExample2.yaml b/specification/security/get_token/examples/request/GetUserAccessTokenRequestExample2.yaml index b33982cd33..d627cb6507 100644 --- a/specification/security/get_token/examples/request/GetUserAccessTokenRequestExample2.yaml +++ b/specification/security/get_token/examples/request/GetUserAccessTokenRequestExample2.yaml @@ -11,48 +11,3 @@ value: |- "username" : "test_admin", "password" : "x-pack-test-password" } -alternatives: - - language: Python - code: |- - resp = client.security.get_token( - grant_type="password", - username="test_admin", - password="x-pack-test-password", - ) - - language: JavaScript - code: |- - const response = await client.security.getToken({ - grant_type: "password", - username: "test_admin", - password: "x-pack-test-password", - }); - - language: Ruby - code: |- - response = client.security.get_token( - body: { - "grant_type": "password", - "username": "test_admin", - "password": "x-pack-test-password" - } - ) - - language: PHP - code: |- - $resp = $client->security()->getToken([ - "body" => [ - "grant_type" => "password", - "username" => "test_admin", - "password" => "x-pack-test-password", - ], - ]); - - language: curl - code: - 'curl -X POST -H "Authorization: ApiKey $ELASTIC_API_KEY" -H "Content-Type: application/json" -d - ''{"grant_type":"password","username":"test_admin","password":"x-pack-test-password"}'' - "$ELASTICSEARCH_URL/_security/oauth2/token"' - - language: Java - code: | - client.security().getToken(g -> g - .grantType(AccessTokenGrantType.Password) - .password("x-pack-test-password") - .username("test_admin") - ); diff --git a/specification/security/get_user/examples/request/SecurityGetUserRequestExample1.yaml b/specification/security/get_user/examples/request/SecurityGetUserRequestExample1.yaml index d109f5799b..71eb4c9b92 100644 --- a/specification/security/get_user/examples/request/SecurityGetUserRequestExample1.yaml +++ b/specification/security/get_user/examples/request/SecurityGetUserRequestExample1.yaml @@ -1,34 +1 @@ method_request: GET /_security/user/jacknich?with_profile_uid=true -alternatives: - - language: Python - code: |- - resp = client.security.get_user( - username="jacknich", - with_profile_uid=True, - ) - - language: JavaScript - code: |- - const response = await client.security.getUser({ - username: "jacknich", - with_profile_uid: "true", - }); - - language: Ruby - code: |- - response = client.security.get_user( - username: "jacknich", - with_profile_uid: "true" - ) - - language: PHP - code: |- - $resp = $client->security()->getUser([ - "username" => "jacknich", - "with_profile_uid" => "true", - ]); - - language: curl - code: 'curl -X GET -H "Authorization: ApiKey $ELASTIC_API_KEY" "$ELASTICSEARCH_URL/_security/user/jacknich?with_profile_uid=true"' - - language: Java - code: | - client.security().getUser(g -> g - .username("jacknich") - .withProfileUid(true) - ); diff --git a/specification/security/get_user_privileges/SecurityGetUserPrivilegesRequest.ts b/specification/security/get_user_privileges/SecurityGetUserPrivilegesRequest.ts index cfc693fa57..6d92d4ce9a 100644 --- a/specification/security/get_user_privileges/SecurityGetUserPrivilegesRequest.ts +++ b/specification/security/get_user_privileges/SecurityGetUserPrivilegesRequest.ts @@ -18,7 +18,6 @@ */ import { RequestBase } from '@_types/Base' -import { Name } from '@_types/common' /** * Get user privileges. @@ -39,11 +38,4 @@ export interface Request extends RequestBase { methods: ['GET'] } ] - query_parameters: { - /** The name of the application. Application privileges are always associated with exactly one application. If you do not specify this parameter, the API returns information about all privileges for all applications. */ - application?: Name - /** The name of the privilege. If you do not specify this parameter, the API returns information about all privileges for the requested application. */ - priviledge?: Name - username?: Name | null - } } diff --git a/specification/security/get_user_privileges/examples/request/SecurityGetUserPrivilegesRequestExample1.yaml b/specification/security/get_user_privileges/examples/request/SecurityGetUserPrivilegesRequestExample1.yaml index df1209dd40..d5b5273802 100644 --- a/specification/security/get_user_privileges/examples/request/SecurityGetUserPrivilegesRequestExample1.yaml +++ b/specification/security/get_user_privileges/examples/request/SecurityGetUserPrivilegesRequestExample1.yaml @@ -1,15 +1 @@ method_request: GET /_security/user/_privileges -alternatives: - - language: Python - code: resp = client.security.get_user_privileges() - - language: JavaScript - code: const response = await client.security.getUserPrivileges(); - - language: Ruby - code: response = client.security.get_user_privileges - - language: PHP - code: $resp = $client->security()->getUserPrivileges(); - - language: curl - code: 'curl -X GET -H "Authorization: ApiKey $ELASTIC_API_KEY" "$ELASTICSEARCH_URL/_security/user/_privileges"' - - language: Java - code: | - client.security().getUserPrivileges(g -> g); diff --git a/specification/security/get_user_profile/examples/request/GetUserProfileRequestExample1.yaml b/specification/security/get_user_profile/examples/request/GetUserProfileRequestExample1.yaml index 9f13784e8e..2c54c0f69d 100644 --- a/specification/security/get_user_profile/examples/request/GetUserProfileRequestExample1.yaml +++ b/specification/security/get_user_profile/examples/request/GetUserProfileRequestExample1.yaml @@ -1,30 +1 @@ method_request: GET /_security/profile/u_79HkWkwmnBH5gqFKwoxggWPjEBOur1zLPXQPEl1VBW0_0 -alternatives: - - language: Python - code: |- - resp = client.security.get_user_profile( - uid="u_79HkWkwmnBH5gqFKwoxggWPjEBOur1zLPXQPEl1VBW0_0", - ) - - language: JavaScript - code: |- - const response = await client.security.getUserProfile({ - uid: "u_79HkWkwmnBH5gqFKwoxggWPjEBOur1zLPXQPEl1VBW0_0", - }); - - language: Ruby - code: |- - response = client.security.get_user_profile( - uid: "u_79HkWkwmnBH5gqFKwoxggWPjEBOur1zLPXQPEl1VBW0_0" - ) - - language: PHP - code: |- - $resp = $client->security()->getUserProfile([ - "uid" => "u_79HkWkwmnBH5gqFKwoxggWPjEBOur1zLPXQPEl1VBW0_0", - ]); - - language: curl - code: 'curl -X GET -H "Authorization: ApiKey $ELASTIC_API_KEY" - "$ELASTICSEARCH_URL/_security/profile/u_79HkWkwmnBH5gqFKwoxggWPjEBOur1zLPXQPEl1VBW0_0"' - - language: Java - code: | - client.security().getUserProfile(g -> g - .uid("u_79HkWkwmnBH5gqFKwoxggWPjEBOur1zLPXQPEl1VBW0_0") - ); diff --git a/specification/security/grant_api_key/SecurityGrantApiKeyRequest.ts b/specification/security/grant_api_key/SecurityGrantApiKeyRequest.ts index 5d1e227e80..259a522781 100644 --- a/specification/security/grant_api_key/SecurityGrantApiKeyRequest.ts +++ b/specification/security/grant_api_key/SecurityGrantApiKeyRequest.ts @@ -18,7 +18,7 @@ */ import { RequestBase } from '@_types/Base' -import { Password, Username } from '@_types/common' +import { Password, Refresh, Username } from '@_types/common' import { ApiKeyGrantType, GrantApiKey } from './types' /** @@ -57,6 +57,16 @@ export interface Request extends RequestBase { methods: ['POST'] } ] + query_parameters: { + /** + * If 'true', Elasticsearch refreshes the affected shards to make this operation + * visible to search. + * If 'wait_for', it waits for a refresh to make this operation visible to search. + * If 'false', nothing is done with refreshes. + * @server_default false + */ + refresh?: Refresh + } body: { /** * The API key. diff --git a/specification/security/grant_api_key/examples/request/SecurityGrantApiKeyRequestExample1.yaml b/specification/security/grant_api_key/examples/request/SecurityGrantApiKeyRequestExample1.yaml index b1e119fe2e..098e51e7d9 100644 --- a/specification/security/grant_api_key/examples/request/SecurityGrantApiKeyRequestExample1.yaml +++ b/specification/security/grant_api_key/examples/request/SecurityGrantApiKeyRequestExample1.yaml @@ -41,242 +41,3 @@ value: |- } } } -alternatives: - - language: Python - code: |- - resp = client.security.grant_api_key( - grant_type="password", - username="test_admin", - password="x-pack-test-password", - api_key={ - "name": "my-api-key", - "expiration": "1d", - "role_descriptors": { - "role-a": { - "cluster": [ - "all" - ], - "indices": [ - { - "names": [ - "index-a*" - ], - "privileges": [ - "read" - ] - } - ] - }, - "role-b": { - "cluster": [ - "all" - ], - "indices": [ - { - "names": [ - "index-b*" - ], - "privileges": [ - "all" - ] - } - ] - } - }, - "metadata": { - "application": "my-application", - "environment": { - "level": 1, - "trusted": True, - "tags": [ - "dev", - "staging" - ] - } - } - }, - ) - - language: JavaScript - code: |- - const response = await client.security.grantApiKey({ - grant_type: "password", - username: "test_admin", - password: "x-pack-test-password", - api_key: { - name: "my-api-key", - expiration: "1d", - role_descriptors: { - "role-a": { - cluster: ["all"], - indices: [ - { - names: ["index-a*"], - privileges: ["read"], - }, - ], - }, - "role-b": { - cluster: ["all"], - indices: [ - { - names: ["index-b*"], - privileges: ["all"], - }, - ], - }, - }, - metadata: { - application: "my-application", - environment: { - level: 1, - trusted: true, - tags: ["dev", "staging"], - }, - }, - }, - }); - - language: Ruby - code: |- - response = client.security.grant_api_key( - body: { - "grant_type": "password", - "username": "test_admin", - "password": "x-pack-test-password", - "api_key": { - "name": "my-api-key", - "expiration": "1d", - "role_descriptors": { - "role-a": { - "cluster": [ - "all" - ], - "indices": [ - { - "names": [ - "index-a*" - ], - "privileges": [ - "read" - ] - } - ] - }, - "role-b": { - "cluster": [ - "all" - ], - "indices": [ - { - "names": [ - "index-b*" - ], - "privileges": [ - "all" - ] - } - ] - } - }, - "metadata": { - "application": "my-application", - "environment": { - "level": 1, - "trusted": true, - "tags": [ - "dev", - "staging" - ] - } - } - } - } - ) - - language: PHP - code: |- - $resp = $client->security()->grantApiKey([ - "body" => [ - "grant_type" => "password", - "username" => "test_admin", - "password" => "x-pack-test-password", - "api_key" => [ - "name" => "my-api-key", - "expiration" => "1d", - "role_descriptors" => [ - "role-a" => [ - "cluster" => array( - "all", - ), - "indices" => array( - [ - "names" => array( - "index-a*", - ), - "privileges" => array( - "read", - ), - ], - ), - ], - "role-b" => [ - "cluster" => array( - "all", - ), - "indices" => array( - [ - "names" => array( - "index-b*", - ), - "privileges" => array( - "all", - ), - ], - ), - ], - ], - "metadata" => [ - "application" => "my-application", - "environment" => [ - "level" => 1, - "trusted" => true, - "tags" => array( - "dev", - "staging", - ), - ], - ], - ], - ], - ]); - - language: curl - code: - "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d - '{\"grant_type\":\"password\",\"username\":\"test_admin\",\"password\":\"x-pack-test-password\",\"api_key\":{\"name\":\"my-ap\ - i-key\",\"expiration\":\"1d\",\"role_descriptors\":{\"role-a\":{\"cluster\":[\"all\"],\"indices\":[{\"names\":[\"index-a*\"],\ - \"privileges\":[\"read\"]}]},\"role-b\":{\"cluster\":[\"all\"],\"indices\":[{\"names\":[\"index-b*\"],\"privileges\":[\"all\"\ - ]}]}},\"metadata\":{\"application\":\"my-application\",\"environment\":{\"level\":1,\"trusted\":true,\"tags\":[\"dev\",\"stag\ - ing\"]}}}}' \"$ELASTICSEARCH_URL/_security/api_key/grant\"" - - language: Java - code: > - client.security().grantApiKey(g -> g - .apiKey(a -> a - .name("my-api-key") - .expiration(e -> e - .time("1d") - ) - .roleDescriptors(Map.of("role-b", RoleDescriptor.of(r -> r - .cluster("all") - .indices(i -> i - .names("index-b*") - .privileges("all") - )),"role-a", RoleDescriptor.of(r -> r - .cluster("all") - .indices(i -> i - .names("index-a*") - .privileges("read") - )))) - .metadata(Map.of("environment", JsonData.fromJson("{\"level\":1,\"trusted\":true,\"tags\":[\"dev\",\"staging\"]}"),"application", JsonData.fromJson("\"my-application\""))) - ) - .grantType(ApiKeyGrantType.Password) - .password("x-pack-test-password") - .username("test_admin") - ); diff --git a/specification/security/grant_api_key/examples/request/SecurityGrantApiKeyRequestExample2.yaml b/specification/security/grant_api_key/examples/request/SecurityGrantApiKeyRequestExample2.yaml index eb6ea7c222..87d0eb83c7 100644 --- a/specification/security/grant_api_key/examples/request/SecurityGrantApiKeyRequestExample2.yaml +++ b/specification/security/grant_api_key/examples/request/SecurityGrantApiKeyRequestExample2.yaml @@ -14,68 +14,3 @@ value: |- "name": "another-api-key" } } -alternatives: - - language: Python - code: |- - resp = client.security.grant_api_key( - grant_type="password", - username="test_admin", - password="x-pack-test-password", - run_as="test_user", - api_key={ - "name": "another-api-key" - }, - ) - - language: JavaScript - code: |- - const response = await client.security.grantApiKey({ - grant_type: "password", - username: "test_admin", - password: "x-pack-test-password", - run_as: "test_user", - api_key: { - name: "another-api-key", - }, - }); - - language: Ruby - code: |- - response = client.security.grant_api_key( - body: { - "grant_type": "password", - "username": "test_admin", - "password": "x-pack-test-password", - "run_as": "test_user", - "api_key": { - "name": "another-api-key" - } - } - ) - - language: PHP - code: |- - $resp = $client->security()->grantApiKey([ - "body" => [ - "grant_type" => "password", - "username" => "test_admin", - "password" => "x-pack-test-password", - "run_as" => "test_user", - "api_key" => [ - "name" => "another-api-key", - ], - ], - ]); - - language: curl - code: - "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d - '{\"grant_type\":\"password\",\"username\":\"test_admin\",\"password\":\"x-pack-test-password\",\"run_as\":\"test_user\",\"ap\ - i_key\":{\"name\":\"another-api-key\"}}' \"$ELASTICSEARCH_URL/_security/api_key/grant\"" - - language: Java - code: | - client.security().grantApiKey(g -> g - .apiKey(a -> a - .name("another-api-key") - ) - .grantType(ApiKeyGrantType.Password) - .password("x-pack-test-password") - .runAs("test_user") - .username("test_admin") - ); diff --git a/specification/security/has_privileges/examples/request/SecurityHasPrivilegesRequestExample1.yaml b/specification/security/has_privileges/examples/request/SecurityHasPrivilegesRequestExample1.yaml index ce8bcfc7a8..2dfde26ee4 100644 --- a/specification/security/has_privileges/examples/request/SecurityHasPrivilegesRequestExample1.yaml +++ b/specification/security/has_privileges/examples/request/SecurityHasPrivilegesRequestExample1.yaml @@ -25,172 +25,3 @@ value: |- } ] } -alternatives: - - language: Python - code: |- - resp = client.security.has_privileges( - cluster=[ - "monitor", - "manage" - ], - index=[ - { - "names": [ - "suppliers", - "products" - ], - "privileges": [ - "read" - ] - }, - { - "names": [ - "inventory" - ], - "privileges": [ - "read", - "write" - ] - } - ], - application=[ - { - "application": "inventory_manager", - "privileges": [ - "read", - "data:write/inventory" - ], - "resources": [ - "product/1852563" - ] - } - ], - ) - - language: JavaScript - code: |- - const response = await client.security.hasPrivileges({ - cluster: ["monitor", "manage"], - index: [ - { - names: ["suppliers", "products"], - privileges: ["read"], - }, - { - names: ["inventory"], - privileges: ["read", "write"], - }, - ], - application: [ - { - application: "inventory_manager", - privileges: ["read", "data:write/inventory"], - resources: ["product/1852563"], - }, - ], - }); - - language: Ruby - code: |- - response = client.security.has_privileges( - body: { - "cluster": [ - "monitor", - "manage" - ], - "index": [ - { - "names": [ - "suppliers", - "products" - ], - "privileges": [ - "read" - ] - }, - { - "names": [ - "inventory" - ], - "privileges": [ - "read", - "write" - ] - } - ], - "application": [ - { - "application": "inventory_manager", - "privileges": [ - "read", - "data:write/inventory" - ], - "resources": [ - "product/1852563" - ] - } - ] - } - ) - - language: PHP - code: |- - $resp = $client->security()->hasPrivileges([ - "body" => [ - "cluster" => array( - "monitor", - "manage", - ), - "index" => array( - [ - "names" => array( - "suppliers", - "products", - ), - "privileges" => array( - "read", - ), - ], - [ - "names" => array( - "inventory", - ), - "privileges" => array( - "read", - "write", - ), - ], - ), - "application" => array( - [ - "application" => "inventory_manager", - "privileges" => array( - "read", - "data:write/inventory", - ), - "resources" => array( - "product/1852563", - ), - ], - ), - ], - ]); - - language: curl - code: - "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d - '{\"cluster\":[\"monitor\",\"manage\"],\"index\":[{\"names\":[\"suppliers\",\"products\"],\"privileges\":[\"read\"]},{\"names\ - \":[\"inventory\"],\"privileges\":[\"read\",\"write\"]}],\"application\":[{\"application\":\"inventory_manager\",\"privileges\ - \":[\"read\",\"data:write/inventory\"],\"resources\":[\"product/1852563\"]}]}' - \"$ELASTICSEARCH_URL/_security/user/_has_privileges\"" - - language: Java - code: | - client.security().hasPrivileges(h -> h - .application(a -> a - .application("inventory_manager") - .privileges(List.of("read","data:write/inventory")) - .resources("product/1852563") - ) - .cluster(List.of("monitor","manage")) - .index(List.of(IndexPrivilegesCheck.of(i -> i - .names(List.of("suppliers","products")) - .privileges("read")),IndexPrivilegesCheck.of(i -> i - .names("inventory") - .privileges(List.of("read","write"))))) - ); diff --git a/specification/security/has_privileges_user_profile/examples/request/HasPrivilegesUserProfileRequestExample1.yaml b/specification/security/has_privileges_user_profile/examples/request/HasPrivilegesUserProfileRequestExample1.yaml index ac947427f8..0b72ee49a1 100644 --- a/specification/security/has_privileges_user_profile/examples/request/HasPrivilegesUserProfileRequestExample1.yaml +++ b/specification/security/has_privileges_user_profile/examples/request/HasPrivilegesUserProfileRequestExample1.yaml @@ -32,207 +32,3 @@ value: |- ] } } -alternatives: - - language: Python - code: |- - resp = client.security.has_privileges_user_profile( - uids=[ - "u_LQPnxDxEjIH0GOUoFkZr5Y57YUwSkL9Joiq-g4OCbPc_0", - "u_rzRnxDgEHIH0GOUoFkZr5Y27YUwSk19Joiq=g4OCxxB_1", - "u_does-not-exist_0" - ], - privileges={ - "cluster": [ - "monitor", - "create_snapshot", - "manage_ml" - ], - "index": [ - { - "names": [ - "suppliers", - "products" - ], - "privileges": [ - "create_doc" - ] - }, - { - "names": [ - "inventory" - ], - "privileges": [ - "read", - "write" - ] - } - ], - "application": [ - { - "application": "inventory_manager", - "privileges": [ - "read", - "data:write/inventory" - ], - "resources": [ - "product/1852563" - ] - } - ] - }, - ) - - language: JavaScript - code: |- - const response = await client.security.hasPrivilegesUserProfile({ - uids: [ - "u_LQPnxDxEjIH0GOUoFkZr5Y57YUwSkL9Joiq-g4OCbPc_0", - "u_rzRnxDgEHIH0GOUoFkZr5Y27YUwSk19Joiq=g4OCxxB_1", - "u_does-not-exist_0", - ], - privileges: { - cluster: ["monitor", "create_snapshot", "manage_ml"], - index: [ - { - names: ["suppliers", "products"], - privileges: ["create_doc"], - }, - { - names: ["inventory"], - privileges: ["read", "write"], - }, - ], - application: [ - { - application: "inventory_manager", - privileges: ["read", "data:write/inventory"], - resources: ["product/1852563"], - }, - ], - }, - }); - - language: Ruby - code: |- - response = client.security.has_privileges_user_profile( - body: { - "uids": [ - "u_LQPnxDxEjIH0GOUoFkZr5Y57YUwSkL9Joiq-g4OCbPc_0", - "u_rzRnxDgEHIH0GOUoFkZr5Y27YUwSk19Joiq=g4OCxxB_1", - "u_does-not-exist_0" - ], - "privileges": { - "cluster": [ - "monitor", - "create_snapshot", - "manage_ml" - ], - "index": [ - { - "names": [ - "suppliers", - "products" - ], - "privileges": [ - "create_doc" - ] - }, - { - "names": [ - "inventory" - ], - "privileges": [ - "read", - "write" - ] - } - ], - "application": [ - { - "application": "inventory_manager", - "privileges": [ - "read", - "data:write/inventory" - ], - "resources": [ - "product/1852563" - ] - } - ] - } - } - ) - - language: PHP - code: |- - $resp = $client->security()->hasPrivilegesUserProfile([ - "body" => [ - "uids" => array( - "u_LQPnxDxEjIH0GOUoFkZr5Y57YUwSkL9Joiq-g4OCbPc_0", - "u_rzRnxDgEHIH0GOUoFkZr5Y27YUwSk19Joiq=g4OCxxB_1", - "u_does-not-exist_0", - ), - "privileges" => [ - "cluster" => array( - "monitor", - "create_snapshot", - "manage_ml", - ), - "index" => array( - [ - "names" => array( - "suppliers", - "products", - ), - "privileges" => array( - "create_doc", - ), - ], - [ - "names" => array( - "inventory", - ), - "privileges" => array( - "read", - "write", - ), - ], - ), - "application" => array( - [ - "application" => "inventory_manager", - "privileges" => array( - "read", - "data:write/inventory", - ), - "resources" => array( - "product/1852563", - ), - ], - ), - ], - ], - ]); - - language: curl - code: - "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d - '{\"uids\":[\"u_LQPnxDxEjIH0GOUoFkZr5Y57YUwSkL9Joiq-g4OCbPc_0\",\"u_rzRnxDgEHIH0GOUoFkZr5Y27YUwSk19Joiq=g4OCxxB_1\",\"u_does-\ - not-exist_0\"],\"privileges\":{\"cluster\":[\"monitor\",\"create_snapshot\",\"manage_ml\"],\"index\":[{\"names\":[\"suppliers\ - \",\"products\"],\"privileges\":[\"create_doc\"]},{\"names\":[\"inventory\"],\"privileges\":[\"read\",\"write\"]}],\"applicat\ - ion\":[{\"application\":\"inventory_manager\",\"privileges\":[\"read\",\"data:write/inventory\"],\"resources\":[\"product/185\ - 2563\"]}]}}' \"$ELASTICSEARCH_URL/_security/profile/_has_privileges\"" - - language: Java - code: > - client.security().hasPrivilegesUserProfile(h -> h - .privileges(p -> p - .application(a -> a - .application("inventory_manager") - .privileges(List.of("read","data:write/inventory")) - .resources("product/1852563") - ) - .cluster(List.of("monitor","create_snapshot","manage_ml")) - .index(List.of(IndexPrivilegesCheck.of(i -> i - .names(List.of("suppliers","products")) - .privileges("create_doc")),IndexPrivilegesCheck.of(i -> i - .names("inventory") - .privileges(List.of("read","write"))))) - ) - .uids(List.of("u_LQPnxDxEjIH0GOUoFkZr5Y57YUwSkL9Joiq-g4OCbPc_0","u_rzRnxDgEHIH0GOUoFkZr5Y27YUwSk19Joiq=g4OCxxB_1","u_does-not-exist_0")) - ); diff --git a/specification/security/invalidate_api_key/examples/request/SecurityInvalidateApiKeyRequestExample1.yaml b/specification/security/invalidate_api_key/examples/request/SecurityInvalidateApiKeyRequestExample1.yaml index 876c5a2e1f..8178b35106 100644 --- a/specification/security/invalidate_api_key/examples/request/SecurityInvalidateApiKeyRequestExample1.yaml +++ b/specification/security/invalidate_api_key/examples/request/SecurityInvalidateApiKeyRequestExample1.yaml @@ -6,43 +6,3 @@ value: |- { "ids" : [ "VuaCfGcBCdbkQm-e5aOx" ] } -alternatives: - - language: Python - code: |- - resp = client.security.invalidate_api_key( - ids=[ - "VuaCfGcBCdbkQm-e5aOx" - ], - ) - - language: JavaScript - code: |- - const response = await client.security.invalidateApiKey({ - ids: ["VuaCfGcBCdbkQm-e5aOx"], - }); - - language: Ruby - code: |- - response = client.security.invalidate_api_key( - body: { - "ids": [ - "VuaCfGcBCdbkQm-e5aOx" - ] - } - ) - - language: PHP - code: |- - $resp = $client->security()->invalidateApiKey([ - "body" => [ - "ids" => array( - "VuaCfGcBCdbkQm-e5aOx", - ), - ], - ]); - - language: curl - code: - 'curl -X DELETE -H "Authorization: ApiKey $ELASTIC_API_KEY" -H "Content-Type: application/json" -d - ''{"ids":["VuaCfGcBCdbkQm-e5aOx"]}'' "$ELASTICSEARCH_URL/_security/api_key"' - - language: Java - code: | - client.security().invalidateApiKey(i -> i - .ids("VuaCfGcBCdbkQm-e5aOx") - ); diff --git a/specification/security/invalidate_api_key/examples/request/SecurityInvalidateApiKeyRequestExample2.yaml b/specification/security/invalidate_api_key/examples/request/SecurityInvalidateApiKeyRequestExample2.yaml index 38f30b5781..47d23583f6 100644 --- a/specification/security/invalidate_api_key/examples/request/SecurityInvalidateApiKeyRequestExample2.yaml +++ b/specification/security/invalidate_api_key/examples/request/SecurityInvalidateApiKeyRequestExample2.yaml @@ -6,37 +6,3 @@ value: |- { "name" : "my-api-key" } -alternatives: - - language: Python - code: |- - resp = client.security.invalidate_api_key( - name="my-api-key", - ) - - language: JavaScript - code: |- - const response = await client.security.invalidateApiKey({ - name: "my-api-key", - }); - - language: Ruby - code: |- - response = client.security.invalidate_api_key( - body: { - "name": "my-api-key" - } - ) - - language: PHP - code: |- - $resp = $client->security()->invalidateApiKey([ - "body" => [ - "name" => "my-api-key", - ], - ]); - - language: curl - code: - 'curl -X DELETE -H "Authorization: ApiKey $ELASTIC_API_KEY" -H "Content-Type: application/json" -d - ''{"name":"my-api-key"}'' "$ELASTICSEARCH_URL/_security/api_key"' - - language: Java - code: | - client.security().invalidateApiKey(i -> i - .name("my-api-key") - ); diff --git a/specification/security/invalidate_api_key/examples/request/SecurityInvalidateApiKeyRequestExample3.yaml b/specification/security/invalidate_api_key/examples/request/SecurityInvalidateApiKeyRequestExample3.yaml index e0a9f45d98..ec726f5570 100644 --- a/specification/security/invalidate_api_key/examples/request/SecurityInvalidateApiKeyRequestExample3.yaml +++ b/specification/security/invalidate_api_key/examples/request/SecurityInvalidateApiKeyRequestExample3.yaml @@ -6,37 +6,3 @@ value: |- { "realm_name" : "native1" } -alternatives: - - language: Python - code: |- - resp = client.security.invalidate_api_key( - realm_name="native1", - ) - - language: JavaScript - code: |- - const response = await client.security.invalidateApiKey({ - realm_name: "native1", - }); - - language: Ruby - code: |- - response = client.security.invalidate_api_key( - body: { - "realm_name": "native1" - } - ) - - language: PHP - code: |- - $resp = $client->security()->invalidateApiKey([ - "body" => [ - "realm_name" => "native1", - ], - ]); - - language: curl - code: - 'curl -X DELETE -H "Authorization: ApiKey $ELASTIC_API_KEY" -H "Content-Type: application/json" -d - ''{"realm_name":"native1"}'' "$ELASTICSEARCH_URL/_security/api_key"' - - language: Java - code: | - client.security().invalidateApiKey(i -> i - .realmName("native1") - ); diff --git a/specification/security/invalidate_api_key/examples/request/SecurityInvalidateApiKeyRequestExample4.yaml b/specification/security/invalidate_api_key/examples/request/SecurityInvalidateApiKeyRequestExample4.yaml index bf032bf505..fdfcf4f9d4 100644 --- a/specification/security/invalidate_api_key/examples/request/SecurityInvalidateApiKeyRequestExample4.yaml +++ b/specification/security/invalidate_api_key/examples/request/SecurityInvalidateApiKeyRequestExample4.yaml @@ -6,37 +6,3 @@ value: |- { "username" : "myuser" } -alternatives: - - language: Python - code: |- - resp = client.security.invalidate_api_key( - username="myuser", - ) - - language: JavaScript - code: |- - const response = await client.security.invalidateApiKey({ - username: "myuser", - }); - - language: Ruby - code: |- - response = client.security.invalidate_api_key( - body: { - "username": "myuser" - } - ) - - language: PHP - code: |- - $resp = $client->security()->invalidateApiKey([ - "body" => [ - "username" => "myuser", - ], - ]); - - language: curl - code: - 'curl -X DELETE -H "Authorization: ApiKey $ELASTIC_API_KEY" -H "Content-Type: application/json" -d - ''{"username":"myuser"}'' "$ELASTICSEARCH_URL/_security/api_key"' - - language: Java - code: | - client.security().invalidateApiKey(i -> i - .username("myuser") - ); diff --git a/specification/security/invalidate_api_key/examples/request/SecurityInvalidateApiKeyRequestExample5.yaml b/specification/security/invalidate_api_key/examples/request/SecurityInvalidateApiKeyRequestExample5.yaml index 59da02e605..58b4bc8490 100644 --- a/specification/security/invalidate_api_key/examples/request/SecurityInvalidateApiKeyRequestExample5.yaml +++ b/specification/security/invalidate_api_key/examples/request/SecurityInvalidateApiKeyRequestExample5.yaml @@ -7,48 +7,3 @@ value: |- "ids" : ["VuaCfGcBCdbkQm-e5aOx"], "owner" : "true" } -alternatives: - - language: Python - code: |- - resp = client.security.invalidate_api_key( - ids=[ - "VuaCfGcBCdbkQm-e5aOx" - ], - owner=True, - ) - - language: JavaScript - code: |- - const response = await client.security.invalidateApiKey({ - ids: ["VuaCfGcBCdbkQm-e5aOx"], - owner: "true", - }); - - language: Ruby - code: |- - response = client.security.invalidate_api_key( - body: { - "ids": [ - "VuaCfGcBCdbkQm-e5aOx" - ], - "owner": "true" - } - ) - - language: PHP - code: |- - $resp = $client->security()->invalidateApiKey([ - "body" => [ - "ids" => array( - "VuaCfGcBCdbkQm-e5aOx", - ), - "owner" => "true", - ], - ]); - - language: curl - code: - 'curl -X DELETE -H "Authorization: ApiKey $ELASTIC_API_KEY" -H "Content-Type: application/json" -d - ''{"ids":["VuaCfGcBCdbkQm-e5aOx"],"owner":"true"}'' "$ELASTICSEARCH_URL/_security/api_key"' - - language: Java - code: | - client.security().invalidateApiKey(i -> i - .ids("VuaCfGcBCdbkQm-e5aOx") - .owner(true) - ); diff --git a/specification/security/invalidate_api_key/examples/request/SecurityInvalidateApiKeyRequestExample6.yaml b/specification/security/invalidate_api_key/examples/request/SecurityInvalidateApiKeyRequestExample6.yaml index 4e1ca7a69b..e14be85655 100644 --- a/specification/security/invalidate_api_key/examples/request/SecurityInvalidateApiKeyRequestExample6.yaml +++ b/specification/security/invalidate_api_key/examples/request/SecurityInvalidateApiKeyRequestExample6.yaml @@ -7,42 +7,3 @@ value: |- "username" : "myuser", "realm_name" : "native1" } -alternatives: - - language: Python - code: |- - resp = client.security.invalidate_api_key( - username="myuser", - realm_name="native1", - ) - - language: JavaScript - code: |- - const response = await client.security.invalidateApiKey({ - username: "myuser", - realm_name: "native1", - }); - - language: Ruby - code: |- - response = client.security.invalidate_api_key( - body: { - "username": "myuser", - "realm_name": "native1" - } - ) - - language: PHP - code: |- - $resp = $client->security()->invalidateApiKey([ - "body" => [ - "username" => "myuser", - "realm_name" => "native1", - ], - ]); - - language: curl - code: - 'curl -X DELETE -H "Authorization: ApiKey $ELASTIC_API_KEY" -H "Content-Type: application/json" -d - ''{"username":"myuser","realm_name":"native1"}'' "$ELASTICSEARCH_URL/_security/api_key"' - - language: Java - code: | - client.security().invalidateApiKey(i -> i - .realmName("native1") - .username("myuser") - ); diff --git a/specification/security/invalidate_token/examples/request/SecurityInvalidateTokenRequestExample1.yaml b/specification/security/invalidate_token/examples/request/SecurityInvalidateTokenRequestExample1.yaml index 03a3377aab..afba06ea7f 100644 --- a/specification/security/invalidate_token/examples/request/SecurityInvalidateTokenRequestExample1.yaml +++ b/specification/security/invalidate_token/examples/request/SecurityInvalidateTokenRequestExample1.yaml @@ -7,39 +7,3 @@ value: |- { "token" : "dGhpcyBpcyBub3QgYSByZWFsIHRva2VuIGJ1dCBpdCBpcyBvbmx5IHRlc3QgZGF0YS4gZG8gbm90IHRyeSB0byByZWFkIHRva2VuIQ==" } -alternatives: - - language: Python - code: |- - resp = client.security.invalidate_token( - token="dGhpcyBpcyBub3QgYSByZWFsIHRva2VuIGJ1dCBpdCBpcyBvbmx5IHRlc3QgZGF0YS4gZG8gbm90IHRyeSB0byByZWFkIHRva2VuIQ==", - ) - - language: JavaScript - code: |- - const response = await client.security.invalidateToken({ - token: - "dGhpcyBpcyBub3QgYSByZWFsIHRva2VuIGJ1dCBpdCBpcyBvbmx5IHRlc3QgZGF0YS4gZG8gbm90IHRyeSB0byByZWFkIHRva2VuIQ==", - }); - - language: Ruby - code: |- - response = client.security.invalidate_token( - body: { - "token": "dGhpcyBpcyBub3QgYSByZWFsIHRva2VuIGJ1dCBpdCBpcyBvbmx5IHRlc3QgZGF0YS4gZG8gbm90IHRyeSB0byByZWFkIHRva2VuIQ==" - } - ) - - language: PHP - code: |- - $resp = $client->security()->invalidateToken([ - "body" => [ - "token" => "dGhpcyBpcyBub3QgYSByZWFsIHRva2VuIGJ1dCBpdCBpcyBvbmx5IHRlc3QgZGF0YS4gZG8gbm90IHRyeSB0byByZWFkIHRva2VuIQ==", - ], - ]); - - language: curl - code: - 'curl -X DELETE -H "Authorization: ApiKey $ELASTIC_API_KEY" -H "Content-Type: application/json" -d - ''{"token":"dGhpcyBpcyBub3QgYSByZWFsIHRva2VuIGJ1dCBpdCBpcyBvbmx5IHRlc3QgZGF0YS4gZG8gbm90IHRyeSB0byByZWFkIHRva2VuIQ=="}'' - "$ELASTICSEARCH_URL/_security/oauth2/token"' - - language: Java - code: | - client.security().invalidateToken(i -> i - .token("dGhpcyBpcyBub3QgYSByZWFsIHRva2VuIGJ1dCBpdCBpcyBvbmx5IHRlc3QgZGF0YS4gZG8gbm90IHRyeSB0byByZWFkIHRva2VuIQ==") - ); diff --git a/specification/security/invalidate_token/examples/request/SecurityInvalidateTokenRequestExample2.yaml b/specification/security/invalidate_token/examples/request/SecurityInvalidateTokenRequestExample2.yaml index 4178e2ad85..e96cc83ecf 100644 --- a/specification/security/invalidate_token/examples/request/SecurityInvalidateTokenRequestExample2.yaml +++ b/specification/security/invalidate_token/examples/request/SecurityInvalidateTokenRequestExample2.yaml @@ -7,37 +7,3 @@ value: |- { "refresh_token" : "vLBPvmAB6KvwvJZr27cS" } -alternatives: - - language: Python - code: |- - resp = client.security.invalidate_token( - refresh_token="vLBPvmAB6KvwvJZr27cS", - ) - - language: JavaScript - code: |- - const response = await client.security.invalidateToken({ - refresh_token: "vLBPvmAB6KvwvJZr27cS", - }); - - language: Ruby - code: |- - response = client.security.invalidate_token( - body: { - "refresh_token": "vLBPvmAB6KvwvJZr27cS" - } - ) - - language: PHP - code: |- - $resp = $client->security()->invalidateToken([ - "body" => [ - "refresh_token" => "vLBPvmAB6KvwvJZr27cS", - ], - ]); - - language: curl - code: - 'curl -X DELETE -H "Authorization: ApiKey $ELASTIC_API_KEY" -H "Content-Type: application/json" -d - ''{"refresh_token":"vLBPvmAB6KvwvJZr27cS"}'' "$ELASTICSEARCH_URL/_security/oauth2/token"' - - language: Java - code: | - client.security().invalidateToken(i -> i - .refreshToken("vLBPvmAB6KvwvJZr27cS") - ); diff --git a/specification/security/invalidate_token/examples/request/SecurityInvalidateTokenRequestExample3.yaml b/specification/security/invalidate_token/examples/request/SecurityInvalidateTokenRequestExample3.yaml index 56be7892b4..73f9627844 100644 --- a/specification/security/invalidate_token/examples/request/SecurityInvalidateTokenRequestExample3.yaml +++ b/specification/security/invalidate_token/examples/request/SecurityInvalidateTokenRequestExample3.yaml @@ -6,37 +6,3 @@ value: |- { "realm_name" : "saml1" } -alternatives: - - language: Python - code: |- - resp = client.security.invalidate_token( - realm_name="saml1", - ) - - language: JavaScript - code: |- - const response = await client.security.invalidateToken({ - realm_name: "saml1", - }); - - language: Ruby - code: |- - response = client.security.invalidate_token( - body: { - "realm_name": "saml1" - } - ) - - language: PHP - code: |- - $resp = $client->security()->invalidateToken([ - "body" => [ - "realm_name" => "saml1", - ], - ]); - - language: curl - code: - 'curl -X DELETE -H "Authorization: ApiKey $ELASTIC_API_KEY" -H "Content-Type: application/json" -d - ''{"realm_name":"saml1"}'' "$ELASTICSEARCH_URL/_security/oauth2/token"' - - language: Java - code: | - client.security().invalidateToken(i -> i - .realmName("saml1") - ); diff --git a/specification/security/invalidate_token/examples/request/SecurityInvalidateTokenRequestExample4.yaml b/specification/security/invalidate_token/examples/request/SecurityInvalidateTokenRequestExample4.yaml index 394b3fe35b..176f328e65 100644 --- a/specification/security/invalidate_token/examples/request/SecurityInvalidateTokenRequestExample4.yaml +++ b/specification/security/invalidate_token/examples/request/SecurityInvalidateTokenRequestExample4.yaml @@ -6,37 +6,3 @@ value: |- { "username" : "myuser" } -alternatives: - - language: Python - code: |- - resp = client.security.invalidate_token( - username="myuser", - ) - - language: JavaScript - code: |- - const response = await client.security.invalidateToken({ - username: "myuser", - }); - - language: Ruby - code: |- - response = client.security.invalidate_token( - body: { - "username": "myuser" - } - ) - - language: PHP - code: |- - $resp = $client->security()->invalidateToken([ - "body" => [ - "username" => "myuser", - ], - ]); - - language: curl - code: - 'curl -X DELETE -H "Authorization: ApiKey $ELASTIC_API_KEY" -H "Content-Type: application/json" -d - ''{"username":"myuser"}'' "$ELASTICSEARCH_URL/_security/oauth2/token"' - - language: Java - code: | - client.security().invalidateToken(i -> i - .username("myuser") - ); diff --git a/specification/security/invalidate_token/examples/request/SecurityInvalidateTokenRequestExample5.yaml b/specification/security/invalidate_token/examples/request/SecurityInvalidateTokenRequestExample5.yaml index 22096cc198..3941357e67 100644 --- a/specification/security/invalidate_token/examples/request/SecurityInvalidateTokenRequestExample5.yaml +++ b/specification/security/invalidate_token/examples/request/SecurityInvalidateTokenRequestExample5.yaml @@ -7,42 +7,3 @@ value: |- "username" : "myuser", "realm_name" : "saml1" } -alternatives: - - language: Python - code: |- - resp = client.security.invalidate_token( - username="myuser", - realm_name="saml1", - ) - - language: JavaScript - code: |- - const response = await client.security.invalidateToken({ - username: "myuser", - realm_name: "saml1", - }); - - language: Ruby - code: |- - response = client.security.invalidate_token( - body: { - "username": "myuser", - "realm_name": "saml1" - } - ) - - language: PHP - code: |- - $resp = $client->security()->invalidateToken([ - "body" => [ - "username" => "myuser", - "realm_name" => "saml1", - ], - ]); - - language: curl - code: - 'curl -X DELETE -H "Authorization: ApiKey $ELASTIC_API_KEY" -H "Content-Type: application/json" -d - ''{"username":"myuser","realm_name":"saml1"}'' "$ELASTICSEARCH_URL/_security/oauth2/token"' - - language: Java - code: | - client.security().invalidateToken(i -> i - .realmName("saml1") - .username("myuser") - ); diff --git a/specification/security/oidc_authenticate/examples/request/OidcAuthenticateRequestExample1.yaml b/specification/security/oidc_authenticate/examples/request/OidcAuthenticateRequestExample1.yaml index f992ece613..4bb5d4b600 100644 --- a/specification/security/oidc_authenticate/examples/request/OidcAuthenticateRequestExample1.yaml +++ b/specification/security/oidc_authenticate/examples/request/OidcAuthenticateRequestExample1.yaml @@ -12,55 +12,3 @@ value: |- "nonce" : "WaBPH0KqPVdG5HHdSxPRjfoZbXMCicm5v1OiAj0DUFM", "realm" : "oidc1" } -alternatives: - - language: Python - code: >- - resp = client.security.oidc_authenticate( - redirect_uri="https://oidc-kibana.elastic.co:5603/api/security/oidc/callback?code=jtI3Ntt8v3_XvcLzCFGq&state=4dbrihtIAt3wBTwo6DxK-vdk-sSyDBV8Yf0AjdkdT5I", - state="4dbrihtIAt3wBTwo6DxK-vdk-sSyDBV8Yf0AjdkdT5I", - nonce="WaBPH0KqPVdG5HHdSxPRjfoZbXMCicm5v1OiAj0DUFM", - realm="oidc1", - ) - - language: JavaScript - code: >- - const response = await client.security.oidcAuthenticate({ - redirect_uri: - "https://oidc-kibana.elastic.co:5603/api/security/oidc/callback?code=jtI3Ntt8v3_XvcLzCFGq&state=4dbrihtIAt3wBTwo6DxK-vdk-sSyDBV8Yf0AjdkdT5I", - state: "4dbrihtIAt3wBTwo6DxK-vdk-sSyDBV8Yf0AjdkdT5I", - nonce: "WaBPH0KqPVdG5HHdSxPRjfoZbXMCicm5v1OiAj0DUFM", - realm: "oidc1", - }); - - language: Ruby - code: >- - response = client.security.oidc_authenticate( - body: { - "redirect_uri": "https://oidc-kibana.elastic.co:5603/api/security/oidc/callback?code=jtI3Ntt8v3_XvcLzCFGq&state=4dbrihtIAt3wBTwo6DxK-vdk-sSyDBV8Yf0AjdkdT5I", - "state": "4dbrihtIAt3wBTwo6DxK-vdk-sSyDBV8Yf0AjdkdT5I", - "nonce": "WaBPH0KqPVdG5HHdSxPRjfoZbXMCicm5v1OiAj0DUFM", - "realm": "oidc1" - } - ) - - language: PHP - code: >- - $resp = $client->security()->oidcAuthenticate([ - "body" => [ - "redirect_uri" => "https://oidc-kibana.elastic.co:5603/api/security/oidc/callback?code=jtI3Ntt8v3_XvcLzCFGq&state=4dbrihtIAt3wBTwo6DxK-vdk-sSyDBV8Yf0AjdkdT5I", - "state" => "4dbrihtIAt3wBTwo6DxK-vdk-sSyDBV8Yf0AjdkdT5I", - "nonce" => "WaBPH0KqPVdG5HHdSxPRjfoZbXMCicm5v1OiAj0DUFM", - "realm" => "oidc1", - ], - ]); - - language: curl - code: - "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d - '{\"redirect_uri\":\"https://oidc-kibana.elastic.co:5603/api/security/oidc/callback?code=jtI3Ntt8v3_XvcLzCFGq&state=4dbrihtIA\ - t3wBTwo6DxK-vdk-sSyDBV8Yf0AjdkdT5I\",\"state\":\"4dbrihtIAt3wBTwo6DxK-vdk-sSyDBV8Yf0AjdkdT5I\",\"nonce\":\"WaBPH0KqPVdG5HHdSx\ - PRjfoZbXMCicm5v1OiAj0DUFM\",\"realm\":\"oidc1\"}' \"$ELASTICSEARCH_URL/_security/oidc/authenticate\"" - - language: Java - code: > - client.security().oidcAuthenticate(o -> o - .nonce("WaBPH0KqPVdG5HHdSxPRjfoZbXMCicm5v1OiAj0DUFM") - .realm("oidc1") - .redirectUri("https://oidc-kibana.elastic.co:5603/api/security/oidc/callback?code=jtI3Ntt8v3_XvcLzCFGq&state=4dbrihtIAt3wBTwo6DxK-vdk-sSyDBV8Yf0AjdkdT5I") - .state("4dbrihtIAt3wBTwo6DxK-vdk-sSyDBV8Yf0AjdkdT5I") - ); diff --git a/specification/security/oidc_logout/examples/request/OidcLogoutRequestExample1.yaml b/specification/security/oidc_logout/examples/request/OidcLogoutRequestExample1.yaml index e845727c8e..f41ea4c820 100644 --- a/specification/security/oidc_logout/examples/request/OidcLogoutRequestExample1.yaml +++ b/specification/security/oidc_logout/examples/request/OidcLogoutRequestExample1.yaml @@ -7,44 +7,3 @@ value: |- "token" : "dGhpcyBpcyBub3QgYSByZWFsIHRva2VuIGJ1dCBpdCBpcyBvbmx5IHRlc3QgZGF0YS4gZG8gbm90IHRyeSB0byByZWFkIHRva2VuIQ==", "refresh_token": "vLBPvmAB6KvwvJZr27cS" } -alternatives: - - language: Python - code: |- - resp = client.security.oidc_logout( - token="dGhpcyBpcyBub3QgYSByZWFsIHRva2VuIGJ1dCBpdCBpcyBvbmx5IHRlc3QgZGF0YS4gZG8gbm90IHRyeSB0byByZWFkIHRva2VuIQ==", - refresh_token="vLBPvmAB6KvwvJZr27cS", - ) - - language: JavaScript - code: |- - const response = await client.security.oidcLogout({ - token: - "dGhpcyBpcyBub3QgYSByZWFsIHRva2VuIGJ1dCBpdCBpcyBvbmx5IHRlc3QgZGF0YS4gZG8gbm90IHRyeSB0byByZWFkIHRva2VuIQ==", - refresh_token: "vLBPvmAB6KvwvJZr27cS", - }); - - language: Ruby - code: |- - response = client.security.oidc_logout( - body: { - "token": "dGhpcyBpcyBub3QgYSByZWFsIHRva2VuIGJ1dCBpdCBpcyBvbmx5IHRlc3QgZGF0YS4gZG8gbm90IHRyeSB0byByZWFkIHRva2VuIQ==", - "refresh_token": "vLBPvmAB6KvwvJZr27cS" - } - ) - - language: PHP - code: |- - $resp = $client->security()->oidcLogout([ - "body" => [ - "token" => "dGhpcyBpcyBub3QgYSByZWFsIHRva2VuIGJ1dCBpdCBpcyBvbmx5IHRlc3QgZGF0YS4gZG8gbm90IHRyeSB0byByZWFkIHRva2VuIQ==", - "refresh_token" => "vLBPvmAB6KvwvJZr27cS", - ], - ]); - - language: curl - code: - "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d - '{\"token\":\"dGhpcyBpcyBub3QgYSByZWFsIHRva2VuIGJ1dCBpdCBpcyBvbmx5IHRlc3QgZGF0YS4gZG8gbm90IHRyeSB0byByZWFkIHRva2VuIQ==\",\"re\ - fresh_token\":\"vLBPvmAB6KvwvJZr27cS\"}' \"$ELASTICSEARCH_URL/_security/oidc/logout\"" - - language: Java - code: | - client.security().oidcLogout(o -> o - .refreshToken("vLBPvmAB6KvwvJZr27cS") - .token("dGhpcyBpcyBub3QgYSByZWFsIHRva2VuIGJ1dCBpdCBpcyBvbmx5IHRlc3QgZGF0YS4gZG8gbm90IHRyeSB0byByZWFkIHRva2VuIQ==") - ); diff --git a/specification/security/oidc_prepare_authentication/examples/request/OidcPrepareAuthenticationRequestExample1.yaml b/specification/security/oidc_prepare_authentication/examples/request/OidcPrepareAuthenticationRequestExample1.yaml index 9c23cb51f5..4f788b839c 100644 --- a/specification/security/oidc_prepare_authentication/examples/request/OidcPrepareAuthenticationRequestExample1.yaml +++ b/specification/security/oidc_prepare_authentication/examples/request/OidcPrepareAuthenticationRequestExample1.yaml @@ -7,37 +7,3 @@ value: |- { "realm" : "oidc1" } -alternatives: - - language: Python - code: |- - resp = client.security.oidc_prepare_authentication( - realm="oidc1", - ) - - language: JavaScript - code: |- - const response = await client.security.oidcPrepareAuthentication({ - realm: "oidc1", - }); - - language: Ruby - code: |- - response = client.security.oidc_prepare_authentication( - body: { - "realm": "oidc1" - } - ) - - language: PHP - code: |- - $resp = $client->security()->oidcPrepareAuthentication([ - "body" => [ - "realm" => "oidc1", - ], - ]); - - language: curl - code: - 'curl -X POST -H "Authorization: ApiKey $ELASTIC_API_KEY" -H "Content-Type: application/json" -d ''{"realm":"oidc1"}'' - "$ELASTICSEARCH_URL/_security/oidc/prepare"' - - language: Java - code: | - client.security().oidcPrepareAuthentication(o -> o - .realm("oidc1") - ); diff --git a/specification/security/oidc_prepare_authentication/examples/request/OidcPrepareAuthenticationRequestExample2.yaml b/specification/security/oidc_prepare_authentication/examples/request/OidcPrepareAuthenticationRequestExample2.yaml index e07f48c4ec..b84512551d 100644 --- a/specification/security/oidc_prepare_authentication/examples/request/OidcPrepareAuthenticationRequestExample2.yaml +++ b/specification/security/oidc_prepare_authentication/examples/request/OidcPrepareAuthenticationRequestExample2.yaml @@ -10,48 +10,3 @@ value: |- "state" : "lGYK0EcSLjqH6pkT5EVZjC6eIW5YCGgywj2sxROO", "nonce" : "zOBXLJGUooRrbLbQk5YCcyC8AXw3iloynvluYhZ5" } -alternatives: - - language: Python - code: |- - resp = client.security.oidc_prepare_authentication( - realm="oidc1", - state="lGYK0EcSLjqH6pkT5EVZjC6eIW5YCGgywj2sxROO", - nonce="zOBXLJGUooRrbLbQk5YCcyC8AXw3iloynvluYhZ5", - ) - - language: JavaScript - code: |- - const response = await client.security.oidcPrepareAuthentication({ - realm: "oidc1", - state: "lGYK0EcSLjqH6pkT5EVZjC6eIW5YCGgywj2sxROO", - nonce: "zOBXLJGUooRrbLbQk5YCcyC8AXw3iloynvluYhZ5", - }); - - language: Ruby - code: |- - response = client.security.oidc_prepare_authentication( - body: { - "realm": "oidc1", - "state": "lGYK0EcSLjqH6pkT5EVZjC6eIW5YCGgywj2sxROO", - "nonce": "zOBXLJGUooRrbLbQk5YCcyC8AXw3iloynvluYhZ5" - } - ) - - language: PHP - code: |- - $resp = $client->security()->oidcPrepareAuthentication([ - "body" => [ - "realm" => "oidc1", - "state" => "lGYK0EcSLjqH6pkT5EVZjC6eIW5YCGgywj2sxROO", - "nonce" => "zOBXLJGUooRrbLbQk5YCcyC8AXw3iloynvluYhZ5", - ], - ]); - - language: curl - code: - "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d - '{\"realm\":\"oidc1\",\"state\":\"lGYK0EcSLjqH6pkT5EVZjC6eIW5YCGgywj2sxROO\",\"nonce\":\"zOBXLJGUooRrbLbQk5YCcyC8AXw3iloynvlu\ - YhZ5\"}' \"$ELASTICSEARCH_URL/_security/oidc/prepare\"" - - language: Java - code: | - client.security().oidcPrepareAuthentication(o -> o - .nonce("zOBXLJGUooRrbLbQk5YCcyC8AXw3iloynvluYhZ5") - .realm("oidc1") - .state("lGYK0EcSLjqH6pkT5EVZjC6eIW5YCGgywj2sxROO") - ); diff --git a/specification/security/oidc_prepare_authentication/examples/request/OidcPrepareAuthenticationRequestExample3.yaml b/specification/security/oidc_prepare_authentication/examples/request/OidcPrepareAuthenticationRequestExample3.yaml index 91b15b4f9d..9b0208d45d 100644 --- a/specification/security/oidc_prepare_authentication/examples/request/OidcPrepareAuthenticationRequestExample3.yaml +++ b/specification/security/oidc_prepare_authentication/examples/request/OidcPrepareAuthenticationRequestExample3.yaml @@ -9,43 +9,3 @@ value: |- "iss" : "http://127.0.0.1:8080", "login_hint": "this_is_an_opaque_string" } -alternatives: - - language: Python - code: |- - resp = client.security.oidc_prepare_authentication( - iss="http://127.0.0.1:8080", - login_hint="this_is_an_opaque_string", - ) - - language: JavaScript - code: |- - const response = await client.security.oidcPrepareAuthentication({ - iss: "http://127.0.0.1:8080", - login_hint: "this_is_an_opaque_string", - }); - - language: Ruby - code: |- - response = client.security.oidc_prepare_authentication( - body: { - "iss": "http://127.0.0.1:8080", - "login_hint": "this_is_an_opaque_string" - } - ) - - language: PHP - code: |- - $resp = $client->security()->oidcPrepareAuthentication([ - "body" => [ - "iss" => "http://127.0.0.1:8080", - "login_hint" => "this_is_an_opaque_string", - ], - ]); - - language: curl - code: - 'curl -X POST -H "Authorization: ApiKey $ELASTIC_API_KEY" -H "Content-Type: application/json" -d - ''{"iss":"http://127.0.0.1:8080","login_hint":"this_is_an_opaque_string"}'' - "$ELASTICSEARCH_URL/_security/oidc/prepare"' - - language: Java - code: | - client.security().oidcPrepareAuthentication(o -> o - .iss("http://127.0.0.1:8080") - .loginHint("this_is_an_opaque_string") - ); diff --git a/specification/security/put_privileges/examples/request/SecurityPutPrivilegesRequestExample1.yaml b/specification/security/put_privileges/examples/request/SecurityPutPrivilegesRequestExample1.yaml index 79ada2eea4..ff6678bd3d 100644 --- a/specification/security/put_privileges/examples/request/SecurityPutPrivilegesRequestExample1.yaml +++ b/specification/security/put_privileges/examples/request/SecurityPutPrivilegesRequestExample1.yaml @@ -19,82 +19,3 @@ value: |- } } } -alternatives: - - language: Python - code: |- - resp = client.security.put_privileges( - privileges={ - "myapp": { - "read": { - "actions": [ - "data:read/*", - "action:login" - ], - "metadata": { - "description": "Read access to myapp" - } - } - } - }, - ) - - language: JavaScript - code: |- - const response = await client.security.putPrivileges({ - privileges: { - myapp: { - read: { - actions: ["data:read/*", "action:login"], - metadata: { - description: "Read access to myapp", - }, - }, - }, - }, - }); - - language: Ruby - code: |- - response = client.security.put_privileges( - body: { - "myapp": { - "read": { - "actions": [ - "data:read/*", - "action:login" - ], - "metadata": { - "description": "Read access to myapp" - } - } - } - } - ) - - language: PHP - code: |- - $resp = $client->security()->putPrivileges([ - "body" => [ - "myapp" => [ - "read" => [ - "actions" => array( - "data:read/*", - "action:login", - ), - "metadata" => [ - "description" => "Read access to myapp", - ], - ], - ], - ], - ]); - - language: curl - code: - 'curl -X PUT -H "Authorization: ApiKey $ELASTIC_API_KEY" -H "Content-Type: application/json" -d - ''{"myapp":{"read":{"actions":["data:read/*","action:login"],"metadata":{"description":"Read access to - myapp"}}}}'' "$ELASTICSEARCH_URL/_security/privilege"' - - language: Java - code: | - client.security().putPrivileges(p -> p - .privileges("myapp", "read", pr -> pr - .actions(List.of("data:read/*","action:login")) - .metadata("description", JsonData.fromJson("\"Read access to myapp\"")) - ) - ); diff --git a/specification/security/put_privileges/examples/request/SecurityPutPrivilegesRequestExample2.yaml b/specification/security/put_privileges/examples/request/SecurityPutPrivilegesRequestExample2.yaml index 647b36f6e6..50b41c054b 100644 --- a/specification/security/put_privileges/examples/request/SecurityPutPrivilegesRequestExample2.yaml +++ b/specification/security/put_privileges/examples/request/SecurityPutPrivilegesRequestExample2.yaml @@ -19,117 +19,3 @@ value: |- } } } -alternatives: - - language: Python - code: |- - resp = client.security.put_privileges( - privileges={ - "app01": { - "read": { - "actions": [ - "action:login", - "data:read/*" - ] - }, - "write": { - "actions": [ - "action:login", - "data:write/*" - ] - } - }, - "app02": { - "all": { - "actions": [ - "*" - ] - } - } - }, - ) - - language: JavaScript - code: |- - const response = await client.security.putPrivileges({ - privileges: { - app01: { - read: { - actions: ["action:login", "data:read/*"], - }, - write: { - actions: ["action:login", "data:write/*"], - }, - }, - app02: { - all: { - actions: ["*"], - }, - }, - }, - }); - - language: Ruby - code: |- - response = client.security.put_privileges( - body: { - "app01": { - "read": { - "actions": [ - "action:login", - "data:read/*" - ] - }, - "write": { - "actions": [ - "action:login", - "data:write/*" - ] - } - }, - "app02": { - "all": { - "actions": [ - "*" - ] - } - } - } - ) - - language: PHP - code: |- - $resp = $client->security()->putPrivileges([ - "body" => [ - "app01" => [ - "read" => [ - "actions" => array( - "action:login", - "data:read/*", - ), - ], - "write" => [ - "actions" => array( - "action:login", - "data:write/*", - ), - ], - ], - "app02" => [ - "all" => [ - "actions" => array( - "*", - ), - ], - ], - ], - ]); - - language: curl - code: - "curl -X PUT -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d - '{\"app01\":{\"read\":{\"actions\":[\"action:login\",\"data:read/*\"]},\"write\":{\"actions\":[\"action:login\",\"data:write/*\ - \"]}},\"app02\":{\"all\":{\"actions\":[\"*\"]}}}' \"$ELASTICSEARCH_URL/_security/privilege\"" - - language: Java - code: | - client.security().putPrivileges(p -> p - .privileges(Map.of("app02", "all", pr -> pr - .actions("*"),"app01", Map.of("read", Actions.of(a -> a - .actions(List.of("action:login","data:read/*"))),"write", Actions.of(a -> a - .actions(List.of("action:login","data:write/*")))))) - ); diff --git a/specification/security/put_role/examples/request/SecurityPutRoleRequestExample1.yaml b/specification/security/put_role/examples/request/SecurityPutRoleRequestExample1.yaml index 428adb69ab..3f54366fb4 100644 --- a/specification/security/put_role/examples/request/SecurityPutRoleRequestExample1.yaml +++ b/specification/security/put_role/examples/request/SecurityPutRoleRequestExample1.yaml @@ -28,207 +28,3 @@ value: |- "version" : 1 } } -alternatives: - - language: Python - code: |- - resp = client.security.put_role( - name="my_admin_role", - description="Grants full access to all management features within the cluster.", - cluster=[ - "all" - ], - indices=[ - { - "names": [ - "index1", - "index2" - ], - "privileges": [ - "all" - ], - "field_security": { - "grant": [ - "title", - "body" - ] - }, - "query": "{\"match\": {\"title\": \"foo\"}}" - } - ], - applications=[ - { - "application": "myapp", - "privileges": [ - "admin", - "read" - ], - "resources": [ - "*" - ] - } - ], - run_as=[ - "other_user" - ], - metadata={ - "version": 1 - }, - ) - - language: JavaScript - code: |- - const response = await client.security.putRole({ - name: "my_admin_role", - description: - "Grants full access to all management features within the cluster.", - cluster: ["all"], - indices: [ - { - names: ["index1", "index2"], - privileges: ["all"], - field_security: { - grant: ["title", "body"], - }, - query: '{"match": {"title": "foo"}}', - }, - ], - applications: [ - { - application: "myapp", - privileges: ["admin", "read"], - resources: ["*"], - }, - ], - run_as: ["other_user"], - metadata: { - version: 1, - }, - }); - - language: Ruby - code: |- - response = client.security.put_role( - name: "my_admin_role", - body: { - "description": "Grants full access to all management features within the cluster.", - "cluster": [ - "all" - ], - "indices": [ - { - "names": [ - "index1", - "index2" - ], - "privileges": [ - "all" - ], - "field_security": { - "grant": [ - "title", - "body" - ] - }, - "query": "{\"match\": {\"title\": \"foo\"}}" - } - ], - "applications": [ - { - "application": "myapp", - "privileges": [ - "admin", - "read" - ], - "resources": [ - "*" - ] - } - ], - "run_as": [ - "other_user" - ], - "metadata": { - "version": 1 - } - } - ) - - language: PHP - code: |- - $resp = $client->security()->putRole([ - "name" => "my_admin_role", - "body" => [ - "description" => "Grants full access to all management features within the cluster.", - "cluster" => array( - "all", - ), - "indices" => array( - [ - "names" => array( - "index1", - "index2", - ), - "privileges" => array( - "all", - ), - "field_security" => [ - "grant" => array( - "title", - "body", - ), - ], - "query" => "{\"match\": {\"title\": \"foo\"}}", - ], - ), - "applications" => array( - [ - "application" => "myapp", - "privileges" => array( - "admin", - "read", - ), - "resources" => array( - "*", - ), - ], - ), - "run_as" => array( - "other_user", - ), - "metadata" => [ - "version" => 1, - ], - ], - ]); - - language: curl - code: - "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d - '{\"description\":\"Grants full access to all management features within the - cluster.\",\"cluster\":[\"all\"],\"indices\":[{\"names\":[\"index1\",\"index2\"],\"privileges\":[\"all\"],\"field_security\":{\ - \"grant\":[\"title\",\"body\"]},\"query\":\"{\\\"match\\\": {\\\"title\\\": - \\\"foo\\\"}}\"}],\"applications\":[{\"application\":\"myapp\",\"privileges\":[\"admin\",\"read\"],\"resources\":[\"*\"]}],\"\ - run_as\":[\"other_user\"],\"metadata\":{\"version\":1}}' \"$ELASTICSEARCH_URL/_security/role/my_admin_role\"" - - language: Java - code: | - client.security().putRole(p -> p - .applications(a -> a - .application("myapp") - .privileges(List.of("admin","read")) - .resources("*") - ) - .cluster("all") - .description("Grants full access to all management features within the cluster.") - .indices(i -> i - .fieldSecurity(f -> f - .grant(List.of("title","body")) - ) - .names(List.of("index1","index2")) - .privileges("all") - .query(q -> q - .match(m -> m - .field("title") - .query(FieldValue.of("foo")) - ) - ) - ) - .metadata("version", JsonData.fromJson("1")) - .name("my_admin_role") - .runAs("other_user") - ); diff --git a/specification/security/put_role/examples/request/SecurityPutRoleRequestExample2.yaml b/specification/security/put_role/examples/request/SecurityPutRoleRequestExample2.yaml index 2c278e2b53..531cb552ba 100644 --- a/specification/security/put_role/examples/request/SecurityPutRoleRequestExample2.yaml +++ b/specification/security/put_role/examples/request/SecurityPutRoleRequestExample2.yaml @@ -12,92 +12,3 @@ value: |- } ] } -alternatives: - - language: Python - code: |- - resp = client.security.put_role( - name="cli_or_drivers_minimal", - cluster=[ - "cluster:monitor/main" - ], - indices=[ - { - "names": [ - "test" - ], - "privileges": [ - "read", - "indices:admin/get" - ] - } - ], - ) - - language: JavaScript - code: |- - const response = await client.security.putRole({ - name: "cli_or_drivers_minimal", - cluster: ["cluster:monitor/main"], - indices: [ - { - names: ["test"], - privileges: ["read", "indices:admin/get"], - }, - ], - }); - - language: Ruby - code: |- - response = client.security.put_role( - name: "cli_or_drivers_minimal", - body: { - "cluster": [ - "cluster:monitor/main" - ], - "indices": [ - { - "names": [ - "test" - ], - "privileges": [ - "read", - "indices:admin/get" - ] - } - ] - } - ) - - language: PHP - code: |- - $resp = $client->security()->putRole([ - "name" => "cli_or_drivers_minimal", - "body" => [ - "cluster" => array( - "cluster:monitor/main", - ), - "indices" => array( - [ - "names" => array( - "test", - ), - "privileges" => array( - "read", - "indices:admin/get", - ), - ], - ), - ], - ]); - - language: curl - code: - "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d - '{\"cluster\":[\"cluster:monitor/main\"],\"indices\":[{\"names\":[\"test\"],\"privileges\":[\"read\",\"indices:admin/get\"]}]\ - }' \"$ELASTICSEARCH_URL/_security/role/cli_or_drivers_minimal\"" - - language: Java - code: | - client.security().putRole(p -> p - .cluster("cluster:monitor/main") - .indices(i -> i - .names("test") - .privileges(List.of("read","indices:admin/get")) - ) - .name("cli_or_drivers_minimal") - ); diff --git a/specification/security/put_role/examples/request/SecurityPutRoleRequestExample3.yaml b/specification/security/put_role/examples/request/SecurityPutRoleRequestExample3.yaml index d9eb94eb0e..74ec03f870 100644 --- a/specification/security/put_role/examples/request/SecurityPutRoleRequestExample3.yaml +++ b/specification/security/put_role/examples/request/SecurityPutRoleRequestExample3.yaml @@ -20,136 +20,3 @@ value: |- } ] } -alternatives: - - language: Python - code: |- - resp = client.security.put_role( - name="only_remote_access_role", - remote_indices=[ - { - "clusters": [ - "my_remote" - ], - "names": [ - "logs*" - ], - "privileges": [ - "read", - "read_cross_cluster", - "view_index_metadata" - ] - } - ], - remote_cluster=[ - { - "clusters": [ - "my_remote" - ], - "privileges": [ - "monitor_stats" - ] - } - ], - ) - - language: JavaScript - code: |- - const response = await client.security.putRole({ - name: "only_remote_access_role", - remote_indices: [ - { - clusters: ["my_remote"], - names: ["logs*"], - privileges: ["read", "read_cross_cluster", "view_index_metadata"], - }, - ], - remote_cluster: [ - { - clusters: ["my_remote"], - privileges: ["monitor_stats"], - }, - ], - }); - - language: Ruby - code: |- - response = client.security.put_role( - name: "only_remote_access_role", - body: { - "remote_indices": [ - { - "clusters": [ - "my_remote" - ], - "names": [ - "logs*" - ], - "privileges": [ - "read", - "read_cross_cluster", - "view_index_metadata" - ] - } - ], - "remote_cluster": [ - { - "clusters": [ - "my_remote" - ], - "privileges": [ - "monitor_stats" - ] - } - ] - } - ) - - language: PHP - code: |- - $resp = $client->security()->putRole([ - "name" => "only_remote_access_role", - "body" => [ - "remote_indices" => array( - [ - "clusters" => array( - "my_remote", - ), - "names" => array( - "logs*", - ), - "privileges" => array( - "read", - "read_cross_cluster", - "view_index_metadata", - ), - ], - ), - "remote_cluster" => array( - [ - "clusters" => array( - "my_remote", - ), - "privileges" => array( - "monitor_stats", - ), - ], - ), - ], - ]); - - language: curl - code: - "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d - '{\"remote_indices\":[{\"clusters\":[\"my_remote\"],\"names\":[\"logs*\"],\"privileges\":[\"read\",\"read_cross_cluster\",\"v\ - iew_index_metadata\"]}],\"remote_cluster\":[{\"clusters\":[\"my_remote\"],\"privileges\":[\"monitor_stats\"]}]}' - \"$ELASTICSEARCH_URL/_security/role/only_remote_access_role\"" - - language: Java - code: | - client.security().putRole(p -> p - .name("only_remote_access_role") - .remoteCluster(r -> r - .clusters("my_remote") - .privileges(RemoteClusterPrivilege.MonitorStats) - ) - .remoteIndices(r -> r - .clusters("my_remote") - .names("logs*") - .privileges(List.of("read","read_cross_cluster","view_index_metadata")) - ) - ); diff --git a/specification/security/put_role_mapping/examples/request/SecurityPutRoleMappingRequestExample1.yaml b/specification/security/put_role_mapping/examples/request/SecurityPutRoleMappingRequestExample1.yaml index fefeee3de3..1f3359b130 100644 --- a/specification/security/put_role_mapping/examples/request/SecurityPutRoleMappingRequestExample1.yaml +++ b/specification/security/put_role_mapping/examples/request/SecurityPutRoleMappingRequestExample1.yaml @@ -14,90 +14,3 @@ value: |- "version" : 1 } } -alternatives: - - language: Python - code: |- - resp = client.security.put_role_mapping( - name="mapping1", - roles=[ - "user" - ], - enabled=True, - rules={ - "field": { - "username": "*" - } - }, - metadata={ - "version": 1 - }, - ) - - language: JavaScript - code: |- - const response = await client.security.putRoleMapping({ - name: "mapping1", - roles: ["user"], - enabled: true, - rules: { - field: { - username: "*", - }, - }, - metadata: { - version: 1, - }, - }); - - language: Ruby - code: |- - response = client.security.put_role_mapping( - name: "mapping1", - body: { - "roles": [ - "user" - ], - "enabled": true, - "rules": { - "field": { - "username": "*" - } - }, - "metadata": { - "version": 1 - } - } - ) - - language: PHP - code: |- - $resp = $client->security()->putRoleMapping([ - "name" => "mapping1", - "body" => [ - "roles" => array( - "user", - ), - "enabled" => true, - "rules" => [ - "field" => [ - "username" => "*", - ], - ], - "metadata" => [ - "version" => 1, - ], - ], - ]); - - language: curl - code: - 'curl -X POST -H "Authorization: ApiKey $ELASTIC_API_KEY" -H "Content-Type: application/json" -d - ''{"roles":["user"],"enabled":true,"rules":{"field":{"username":"*"}},"metadata":{"version":1}}'' - "$ELASTICSEARCH_URL/_security/role_mapping/mapping1"' - - language: Java - code: | - client.security().putRoleMapping(p -> p - .enabled(true) - .metadata("version", JsonData.fromJson("1")) - .name("mapping1") - .roles("user") - .rules(r -> r - .field(NamedValue.of("username",List.of(FieldValue.of("*")))) - ) - ); diff --git a/specification/security/put_role_mapping/examples/request/SecurityPutRoleMappingRequestExample2.yaml b/specification/security/put_role_mapping/examples/request/SecurityPutRoleMappingRequestExample2.yaml index f8318bbac3..ab7b53ca08 100644 --- a/specification/security/put_role_mapping/examples/request/SecurityPutRoleMappingRequestExample2.yaml +++ b/specification/security/put_role_mapping/examples/request/SecurityPutRoleMappingRequestExample2.yaml @@ -11,89 +11,3 @@ value: |- "field" : { "username" : [ "esadmin01", "esadmin02" ] } } } -alternatives: - - language: Python - code: |- - resp = client.security.put_role_mapping( - name="mapping2", - roles=[ - "user", - "admin" - ], - enabled=True, - rules={ - "field": { - "username": [ - "esadmin01", - "esadmin02" - ] - } - }, - ) - - language: JavaScript - code: |- - const response = await client.security.putRoleMapping({ - name: "mapping2", - roles: ["user", "admin"], - enabled: true, - rules: { - field: { - username: ["esadmin01", "esadmin02"], - }, - }, - }); - - language: Ruby - code: |- - response = client.security.put_role_mapping( - name: "mapping2", - body: { - "roles": [ - "user", - "admin" - ], - "enabled": true, - "rules": { - "field": { - "username": [ - "esadmin01", - "esadmin02" - ] - } - } - } - ) - - language: PHP - code: |- - $resp = $client->security()->putRoleMapping([ - "name" => "mapping2", - "body" => [ - "roles" => array( - "user", - "admin", - ), - "enabled" => true, - "rules" => [ - "field" => [ - "username" => array( - "esadmin01", - "esadmin02", - ), - ], - ], - ], - ]); - - language: curl - code: - 'curl -X POST -H "Authorization: ApiKey $ELASTIC_API_KEY" -H "Content-Type: application/json" -d - ''{"roles":["user","admin"],"enabled":true,"rules":{"field":{"username":["esadmin01","esadmin02"]}}}'' - "$ELASTICSEARCH_URL/_security/role_mapping/mapping2"' - - language: Java - code: | - client.security().putRoleMapping(p -> p - .enabled(true) - .name("mapping2") - .roles(List.of("user","admin")) - .rules(r -> r - .field(NamedValue.of("username",List.of(FieldValue.of("esadmin01"),FieldValue.of("esadmin02")))) - ) - ); diff --git a/specification/security/put_role_mapping/examples/request/SecurityPutRoleMappingRequestExample3.yaml b/specification/security/put_role_mapping/examples/request/SecurityPutRoleMappingRequestExample3.yaml index a5c21b5cc5..8419cd938e 100644 --- a/specification/security/put_role_mapping/examples/request/SecurityPutRoleMappingRequestExample3.yaml +++ b/specification/security/put_role_mapping/examples/request/SecurityPutRoleMappingRequestExample3.yaml @@ -11,77 +11,3 @@ value: |- "field" : { "realm.name" : "ldap1" } } } -alternatives: - - language: Python - code: |- - resp = client.security.put_role_mapping( - name="mapping3", - roles=[ - "ldap-user" - ], - enabled=True, - rules={ - "field": { - "realm.name": "ldap1" - } - }, - ) - - language: JavaScript - code: |- - const response = await client.security.putRoleMapping({ - name: "mapping3", - roles: ["ldap-user"], - enabled: true, - rules: { - field: { - "realm.name": "ldap1", - }, - }, - }); - - language: Ruby - code: |- - response = client.security.put_role_mapping( - name: "mapping3", - body: { - "roles": [ - "ldap-user" - ], - "enabled": true, - "rules": { - "field": { - "realm.name": "ldap1" - } - } - } - ) - - language: PHP - code: |- - $resp = $client->security()->putRoleMapping([ - "name" => "mapping3", - "body" => [ - "roles" => array( - "ldap-user", - ), - "enabled" => true, - "rules" => [ - "field" => [ - "realm.name" => "ldap1", - ], - ], - ], - ]); - - language: curl - code: - 'curl -X POST -H "Authorization: ApiKey $ELASTIC_API_KEY" -H "Content-Type: application/json" -d - ''{"roles":["ldap-user"],"enabled":true,"rules":{"field":{"realm.name":"ldap1"}}}'' - "$ELASTICSEARCH_URL/_security/role_mapping/mapping3"' - - language: Java - code: | - client.security().putRoleMapping(p -> p - .enabled(true) - .name("mapping3") - .roles("ldap-user") - .rules(r -> r - .field(NamedValue.of("realm.name",List.of(FieldValue.of("ldap1")))) - ) - ); diff --git a/specification/security/put_role_mapping/examples/request/SecurityPutRoleMappingRequestExample4.yaml b/specification/security/put_role_mapping/examples/request/SecurityPutRoleMappingRequestExample4.yaml index d0986c0443..06b4d74c76 100644 --- a/specification/security/put_role_mapping/examples/request/SecurityPutRoleMappingRequestExample4.yaml +++ b/specification/security/put_role_mapping/examples/request/SecurityPutRoleMappingRequestExample4.yaml @@ -25,119 +25,3 @@ value: |- ] } } -alternatives: - - language: Python - code: |- - resp = client.security.put_role_mapping( - name="mapping4", - roles=[ - "superuser" - ], - enabled=True, - rules={ - "any": [ - { - "field": { - "username": "esadmin" - } - }, - { - "field": { - "groups": "cn=admins,dc=example,dc=com" - } - } - ] - }, - ) - - language: JavaScript - code: |- - const response = await client.security.putRoleMapping({ - name: "mapping4", - roles: ["superuser"], - enabled: true, - rules: { - any: [ - { - field: { - username: "esadmin", - }, - }, - { - field: { - groups: "cn=admins,dc=example,dc=com", - }, - }, - ], - }, - }); - - language: Ruby - code: |- - response = client.security.put_role_mapping( - name: "mapping4", - body: { - "roles": [ - "superuser" - ], - "enabled": true, - "rules": { - "any": [ - { - "field": { - "username": "esadmin" - } - }, - { - "field": { - "groups": "cn=admins,dc=example,dc=com" - } - } - ] - } - } - ) - - language: PHP - code: |- - $resp = $client->security()->putRoleMapping([ - "name" => "mapping4", - "body" => [ - "roles" => array( - "superuser", - ), - "enabled" => true, - "rules" => [ - "any" => array( - [ - "field" => [ - "username" => "esadmin", - ], - ], - [ - "field" => [ - "groups" => "cn=admins,dc=example,dc=com", - ], - ], - ), - ], - ], - ]); - - language: curl - code: - "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d - '{\"roles\":[\"superuser\"],\"enabled\":true,\"rules\":{\"any\":[{\"field\":{\"username\":\"esadmin\"}},{\"field\":{\"groups\ - \":\"cn=admins,dc=example,dc=com\"}}]}}' \"$ELASTICSEARCH_URL/_security/role_mapping/mapping4\"" - - language: Java - code: | - client.security().putRoleMapping(p -> p - .enabled(true) - .name("mapping4") - .roles("superuser") - .rules(r -> r - .any(List.of(RoleMappingRule.of(ro -> ro - .field(NamedValue.of("username",List.of(FieldValue.of("esadmin")) - ))), RoleMappingRule.of(rol -> rol - .field(NamedValue.of("groups",List.of(FieldValue.of("cn=admins,dc=example,dc=com")) - ))) - ) - ) - ) - ); diff --git a/specification/security/put_role_mapping/examples/request/SecurityPutRoleMappingRequestExample5.yaml b/specification/security/put_role_mapping/examples/request/SecurityPutRoleMappingRequestExample5.yaml index 461b2245f8..cf5b204804 100644 --- a/specification/security/put_role_mapping/examples/request/SecurityPutRoleMappingRequestExample5.yaml +++ b/specification/security/put_role_mapping/examples/request/SecurityPutRoleMappingRequestExample5.yaml @@ -17,106 +17,3 @@ value: |- }, "enabled": true } -alternatives: - - language: Python - code: |- - resp = client.security.put_role_mapping( - name="mapping5", - role_templates=[ - { - "template": { - "source": "{{#tojson}}groups{{/tojson}}" - }, - "format": "json" - } - ], - rules={ - "field": { - "realm.name": "saml1" - } - }, - enabled=True, - ) - - language: JavaScript - code: |- - const response = await client.security.putRoleMapping({ - name: "mapping5", - role_templates: [ - { - template: { - source: "{{#tojson}}groups{{/tojson}}", - }, - format: "json", - }, - ], - rules: { - field: { - "realm.name": "saml1", - }, - }, - enabled: true, - }); - - language: Ruby - code: |- - response = client.security.put_role_mapping( - name: "mapping5", - body: { - "role_templates": [ - { - "template": { - "source": "{{#tojson}}groups{{/tojson}}" - }, - "format": "json" - } - ], - "rules": { - "field": { - "realm.name": "saml1" - } - }, - "enabled": true - } - ) - - language: PHP - code: |- - $resp = $client->security()->putRoleMapping([ - "name" => "mapping5", - "body" => [ - "role_templates" => array( - [ - "template" => [ - "source" => "{{#tojson}}groups{{/tojson}}", - ], - "format" => "json", - ], - ), - "rules" => [ - "field" => [ - "realm.name" => "saml1", - ], - ], - "enabled" => true, - ], - ]); - - language: curl - code: - "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d - '{\"role_templates\":[{\"template\":{\"source\":\"{{#tojson}}groups{{/tojson}}\"},\"format\":\"json\"}],\"rules\":{\"field\":{\ - \"realm.name\":\"saml1\"}},\"enabled\":true}' \"$ELASTICSEARCH_URL/_security/role_mapping/mapping5\"" - - language: Java - code: | - client.security().putRoleMapping(p -> p - .enabled(true) - .name("mapping5") - .roleTemplates(r -> r - .format(TemplateFormat.Json) - .template(t -> t - .source(s -> s - .scriptString("{{#tojson}}groups{{/tojson}}") - ) - ) - ) - .rules(ru -> ru - .field(NamedValue.of("realm.name",List.of(FieldValue.of("saml1")))) - ) - ); diff --git a/specification/security/put_role_mapping/examples/request/SecurityPutRoleMappingRequestExample6.yaml b/specification/security/put_role_mapping/examples/request/SecurityPutRoleMappingRequestExample6.yaml index 22d2badaf5..7143d772ef 100644 --- a/specification/security/put_role_mapping/examples/request/SecurityPutRoleMappingRequestExample6.yaml +++ b/specification/security/put_role_mapping/examples/request/SecurityPutRoleMappingRequestExample6.yaml @@ -26,106 +26,3 @@ value: |- }, "enabled": true } -alternatives: - - language: Python - code: |- - resp = client.security.put_role_mapping( - name="mapping6", - role_templates=[ - { - "template": { - "source": "{{#tojson}}groups{{/tojson}}" - }, - "format": "json" - } - ], - rules={ - "field": { - "realm.name": "saml1" - } - }, - enabled=True, - ) - - language: JavaScript - code: |- - const response = await client.security.putRoleMapping({ - name: "mapping6", - role_templates: [ - { - template: { - source: "{{#tojson}}groups{{/tojson}}", - }, - format: "json", - }, - ], - rules: { - field: { - "realm.name": "saml1", - }, - }, - enabled: true, - }); - - language: Ruby - code: |- - response = client.security.put_role_mapping( - name: "mapping6", - body: { - "role_templates": [ - { - "template": { - "source": "{{#tojson}}groups{{/tojson}}" - }, - "format": "json" - } - ], - "rules": { - "field": { - "realm.name": "saml1" - } - }, - "enabled": true - } - ) - - language: PHP - code: |- - $resp = $client->security()->putRoleMapping([ - "name" => "mapping6", - "body" => [ - "role_templates" => array( - [ - "template" => [ - "source" => "{{#tojson}}groups{{/tojson}}", - ], - "format" => "json", - ], - ), - "rules" => [ - "field" => [ - "realm.name" => "saml1", - ], - ], - "enabled" => true, - ], - ]); - - language: curl - code: - "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d - '{\"role_templates\":[{\"template\":{\"source\":\"{{#tojson}}groups{{/tojson}}\"},\"format\":\"json\"}],\"rules\":{\"field\":{\ - \"realm.name\":\"saml1\"}},\"enabled\":true}' \"$ELASTICSEARCH_URL/_security/role_mapping/mapping6\"" - - language: Java - code: | - client.security().putRoleMapping(p -> p - .enabled(true) - .name("mapping6") - .roleTemplates(r -> r - .format(TemplateFormat.Json) - .template(t -> t - .source(s -> s - .scriptString("{{#tojson}}groups{{/tojson}}") - ) - ) - ) - .rules(ru -> ru - .field(NamedValue.of("realm.name",List.of(FieldValue.of("saml1")))) - ) - ); diff --git a/specification/security/put_role_mapping/examples/request/SecurityPutRoleMappingRequestExample7.yaml b/specification/security/put_role_mapping/examples/request/SecurityPutRoleMappingRequestExample7.yaml index 68065aad06..a553449400 100644 --- a/specification/security/put_role_mapping/examples/request/SecurityPutRoleMappingRequestExample7.yaml +++ b/specification/security/put_role_mapping/examples/request/SecurityPutRoleMappingRequestExample7.yaml @@ -14,119 +14,3 @@ value: |- ] } } -alternatives: - - language: Python - code: |- - resp = client.security.put_role_mapping( - name="mapping7", - roles=[ - "ldap-example-user" - ], - enabled=True, - rules={ - "all": [ - { - "field": { - "dn": "*,ou=subtree,dc=example,dc=com" - } - }, - { - "field": { - "realm.name": "ldap1" - } - } - ] - }, - ) - - language: JavaScript - code: |- - const response = await client.security.putRoleMapping({ - name: "mapping7", - roles: ["ldap-example-user"], - enabled: true, - rules: { - all: [ - { - field: { - dn: "*,ou=subtree,dc=example,dc=com", - }, - }, - { - field: { - "realm.name": "ldap1", - }, - }, - ], - }, - }); - - language: Ruby - code: |- - response = client.security.put_role_mapping( - name: "mapping7", - body: { - "roles": [ - "ldap-example-user" - ], - "enabled": true, - "rules": { - "all": [ - { - "field": { - "dn": "*,ou=subtree,dc=example,dc=com" - } - }, - { - "field": { - "realm.name": "ldap1" - } - } - ] - } - } - ) - - language: PHP - code: |- - $resp = $client->security()->putRoleMapping([ - "name" => "mapping7", - "body" => [ - "roles" => array( - "ldap-example-user", - ), - "enabled" => true, - "rules" => [ - "all" => array( - [ - "field" => [ - "dn" => "*,ou=subtree,dc=example,dc=com", - ], - ], - [ - "field" => [ - "realm.name" => "ldap1", - ], - ], - ), - ], - ], - ]); - - language: curl - code: - "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d - '{\"roles\":[\"ldap-example-user\"],\"enabled\":true,\"rules\":{\"all\":[{\"field\":{\"dn\":\"*,ou=subtree,dc=example,dc=com\ - \"}},{\"field\":{\"realm.name\":\"ldap1\"}}]}}' \"$ELASTICSEARCH_URL/_security/role_mapping/mapping7\"" - - language: Java - code: | - client.security().putRoleMapping(p -> p - .enabled(true) - .name("mapping7") - .roles("ldap-example-user") - .rules(r -> r - .all(List.of(RoleMappingRule.of(ro -> ro - .field(NamedValue.of("dn",List.of(FieldValue.of("*,ou=subtree,dc=example,dc=com")) - ))), RoleMappingRule.of(rol -> rol - .field(NamedValue.of("realm.name",List.of(FieldValue.of("ldap1")) - ))) - ) - ) - ) - ); diff --git a/specification/security/put_role_mapping/examples/request/SecurityPutRoleMappingRequestExample8.yaml b/specification/security/put_role_mapping/examples/request/SecurityPutRoleMappingRequestExample8.yaml index b536b8f441..5c324a7972 100644 --- a/specification/security/put_role_mapping/examples/request/SecurityPutRoleMappingRequestExample8.yaml +++ b/specification/security/put_role_mapping/examples/request/SecurityPutRoleMappingRequestExample8.yaml @@ -41,207 +41,3 @@ value: |- ] } } -alternatives: - - language: Python - code: |- - resp = client.security.put_role_mapping( - name="mapping8", - roles=[ - "superuser" - ], - enabled=True, - rules={ - "all": [ - { - "any": [ - { - "field": { - "dn": "*,ou=admin,dc=example,dc=com" - } - }, - { - "field": { - "username": [ - "es-admin", - "es-system" - ] - } - } - ] - }, - { - "field": { - "groups": "cn=people,dc=example,dc=com" - } - }, - { - "except": { - "field": { - "metadata.terminated_date": None - } - } - } - ] - }, - ) - - language: JavaScript - code: |- - const response = await client.security.putRoleMapping({ - name: "mapping8", - roles: ["superuser"], - enabled: true, - rules: { - all: [ - { - any: [ - { - field: { - dn: "*,ou=admin,dc=example,dc=com", - }, - }, - { - field: { - username: ["es-admin", "es-system"], - }, - }, - ], - }, - { - field: { - groups: "cn=people,dc=example,dc=com", - }, - }, - { - except: { - field: { - "metadata.terminated_date": null, - }, - }, - }, - ], - }, - }); - - language: Ruby - code: |- - response = client.security.put_role_mapping( - name: "mapping8", - body: { - "roles": [ - "superuser" - ], - "enabled": true, - "rules": { - "all": [ - { - "any": [ - { - "field": { - "dn": "*,ou=admin,dc=example,dc=com" - } - }, - { - "field": { - "username": [ - "es-admin", - "es-system" - ] - } - } - ] - }, - { - "field": { - "groups": "cn=people,dc=example,dc=com" - } - }, - { - "except": { - "field": { - "metadata.terminated_date": nil - } - } - } - ] - } - } - ) - - language: PHP - code: |- - $resp = $client->security()->putRoleMapping([ - "name" => "mapping8", - "body" => [ - "roles" => array( - "superuser", - ), - "enabled" => true, - "rules" => [ - "all" => array( - [ - "any" => array( - [ - "field" => [ - "dn" => "*,ou=admin,dc=example,dc=com", - ], - ], - [ - "field" => [ - "username" => array( - "es-admin", - "es-system", - ), - ], - ], - ), - ], - [ - "field" => [ - "groups" => "cn=people,dc=example,dc=com", - ], - ], - [ - "except" => [ - "field" => [ - "metadata.terminated_date" => null, - ], - ], - ], - ), - ], - ], - ]); - - language: curl - code: - "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d - '{\"roles\":[\"superuser\"],\"enabled\":true,\"rules\":{\"all\":[{\"any\":[{\"field\":{\"dn\":\"*,ou=admin,dc=example,dc=com\ - \"}},{\"field\":{\"username\":[\"es-admin\",\"es-system\"]}}]},{\"field\":{\"groups\":\"cn=people,dc=example,dc=com\"}},{\"ex\ - cept\":{\"field\":{\"metadata.terminated_date\":null}}}]}}' \"$ELASTICSEARCH_URL/_security/role_mapping/mapping8\"" - - language: Java - code: | - client.security().putRoleMapping(p -> p - .enabled(true) - .name("mapping8") - .roles("superuser") - .rules(r -> r - .all(List.of(RoleMappingRule.of(ro -> ro - .any(List.of(RoleMappingRule.of(rol -> rol - .field(NamedValue.of("dn", List.of(FieldValue.of("*,ou=admin," + - "dc=example,dc=com")) - )) - ), RoleMappingRule.of(role -> role - .field(NamedValue.of("username", List.of(FieldValue.of("es-admin"), - FieldValue.of("es-system")) - )))), RoleMappingRule.of(roleM -> roleM - .field(NamedValue.of("groups", List.of(FieldValue.of("cn=people," + - "dc=example,dc=com")) - )), RoleMappingRule.of(roleMa -> roleMa - .except(e -> e - .field(NamedValue.of("metadata.terminated_date", - List.of(FieldValue.of(null)) - ) - )))) - ) - ) - ) - ) - ) - ); diff --git a/specification/security/put_role_mapping/examples/request/SecurityPutRoleMappingRequestExample9.yaml b/specification/security/put_role_mapping/examples/request/SecurityPutRoleMappingRequestExample9.yaml index d655b3e460..db32a00bf6 100644 --- a/specification/security/put_role_mapping/examples/request/SecurityPutRoleMappingRequestExample9.yaml +++ b/specification/security/put_role_mapping/examples/request/SecurityPutRoleMappingRequestExample9.yaml @@ -15,125 +15,3 @@ value: |- ], "enabled": true } -alternatives: - - language: Python - code: |- - resp = client.security.put_role_mapping( - name="mapping9", - rules={ - "field": { - "realm.name": "cloud-saml" - } - }, - role_templates=[ - { - "template": { - "source": "saml_user" - } - }, - { - "template": { - "source": "_user_{{username}}" - } - } - ], - enabled=True, - ) - - language: JavaScript - code: |- - const response = await client.security.putRoleMapping({ - name: "mapping9", - rules: { - field: { - "realm.name": "cloud-saml", - }, - }, - role_templates: [ - { - template: { - source: "saml_user", - }, - }, - { - template: { - source: "_user_{{username}}", - }, - }, - ], - enabled: true, - }); - - language: Ruby - code: |- - response = client.security.put_role_mapping( - name: "mapping9", - body: { - "rules": { - "field": { - "realm.name": "cloud-saml" - } - }, - "role_templates": [ - { - "template": { - "source": "saml_user" - } - }, - { - "template": { - "source": "_user_{{username}}" - } - } - ], - "enabled": true - } - ) - - language: PHP - code: |- - $resp = $client->security()->putRoleMapping([ - "name" => "mapping9", - "body" => [ - "rules" => [ - "field" => [ - "realm.name" => "cloud-saml", - ], - ], - "role_templates" => array( - [ - "template" => [ - "source" => "saml_user", - ], - ], - [ - "template" => [ - "source" => "_user_{{username}}", - ], - ], - ), - "enabled" => true, - ], - ]); - - language: curl - code: - "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d - '{\"rules\":{\"field\":{\"realm.name\":\"cloud-saml\"}},\"role_templates\":[{\"template\":{\"source\":\"saml_user\"}},{\"temp\ - late\":{\"source\":\"_user_{{username}}\"}}],\"enabled\":true}' \"$ELASTICSEARCH_URL/_security/role_mapping/mapping9\"" - - language: Java - code: | - client.security().putRoleMapping(p -> p - .enabled(true) - .name("mapping9") - .roleTemplates(List.of(RoleTemplate.of(r -> r - .template(t -> t - .source(s -> s - .scriptString("saml_user") - ) - )),RoleTemplate.of(ro -> ro - .template(t -> t - .source(s -> s - .scriptString("_user_{{username}}") - ) - )))) - .rules(ru -> ru - .field(NamedValue.of("realm.name",List.of(FieldValue.of("cloud-saml")))) - ) - ); diff --git a/specification/security/put_user/examples/request/SecurityPutUserRequestExample1.yaml b/specification/security/put_user/examples/request/SecurityPutUserRequestExample1.yaml index 32e52bf8d1..5d14f8d8ba 100644 --- a/specification/security/put_user/examples/request/SecurityPutUserRequestExample1.yaml +++ b/specification/security/put_user/examples/request/SecurityPutUserRequestExample1.yaml @@ -12,81 +12,3 @@ value: |- "intelligence" : 7 } } -alternatives: - - language: Python - code: |- - resp = client.security.put_user( - username="jacknich", - password="l0ng-r4nd0m-p@ssw0rd", - roles=[ - "admin", - "other_role1" - ], - full_name="Jack Nicholson", - email="jacknich@example.com", - metadata={ - "intelligence": 7 - }, - ) - - language: JavaScript - code: |- - const response = await client.security.putUser({ - username: "jacknich", - password: "l0ng-r4nd0m-p@ssw0rd", - roles: ["admin", "other_role1"], - full_name: "Jack Nicholson", - email: "jacknich@example.com", - metadata: { - intelligence: 7, - }, - }); - - language: Ruby - code: |- - response = client.security.put_user( - username: "jacknich", - body: { - "password": "l0ng-r4nd0m-p@ssw0rd", - "roles": [ - "admin", - "other_role1" - ], - "full_name": "Jack Nicholson", - "email": "jacknich@example.com", - "metadata": { - "intelligence": 7 - } - } - ) - - language: PHP - code: |- - $resp = $client->security()->putUser([ - "username" => "jacknich", - "body" => [ - "password" => "l0ng-r4nd0m-p@ssw0rd", - "roles" => array( - "admin", - "other_role1", - ), - "full_name" => "Jack Nicholson", - "email" => "jacknich@example.com", - "metadata" => [ - "intelligence" => 7, - ], - ], - ]); - - language: curl - code: - 'curl -X POST -H "Authorization: ApiKey $ELASTIC_API_KEY" -H "Content-Type: application/json" -d - ''{"password":"l0ng-r4nd0m-p@ssw0rd","roles":["admin","other_role1"],"full_name":"Jack - Nicholson","email":"jacknich@example.com","metadata":{"intelligence":7}}'' - "$ELASTICSEARCH_URL/_security/user/jacknich"' - - language: Java - code: | - client.security().putUser(p -> p - .email("jacknich@example.com") - .fullName("Jack Nicholson") - .metadata("intelligence", JsonData.fromJson("7")) - .password("l0ng-r4nd0m-p@ssw0rd") - .roles(List.of("admin","other_role1")) - .username("jacknich") - ); diff --git a/specification/security/query_api_keys/examples/request/QueryApiKeysRequestExample1.yaml b/specification/security/query_api_keys/examples/request/QueryApiKeysRequestExample1.yaml index 11ec85a421..8a41ec3283 100644 --- a/specification/security/query_api_keys/examples/request/QueryApiKeysRequestExample1.yaml +++ b/specification/security/query_api_keys/examples/request/QueryApiKeysRequestExample1.yaml @@ -12,69 +12,3 @@ value: |- } } } -alternatives: - - language: Python - code: |- - resp = client.security.query_api_keys( - with_limited_by=True, - query={ - "ids": { - "values": [ - "VuaCfGcBCdbkQm-e5aOx" - ] - } - }, - ) - - language: JavaScript - code: |- - const response = await client.security.queryApiKeys({ - with_limited_by: "true", - query: { - ids: { - values: ["VuaCfGcBCdbkQm-e5aOx"], - }, - }, - }); - - language: Ruby - code: |- - response = client.security.query_api_keys( - with_limited_by: "true", - body: { - "query": { - "ids": { - "values": [ - "VuaCfGcBCdbkQm-e5aOx" - ] - } - } - } - ) - - language: PHP - code: |- - $resp = $client->security()->queryApiKeys([ - "with_limited_by" => "true", - "body" => [ - "query" => [ - "ids" => [ - "values" => array( - "VuaCfGcBCdbkQm-e5aOx", - ), - ], - ], - ], - ]); - - language: curl - code: - 'curl -X GET -H "Authorization: ApiKey $ELASTIC_API_KEY" -H "Content-Type: application/json" -d - ''{"query":{"ids":{"values":["VuaCfGcBCdbkQm-e5aOx"]}}}'' - "$ELASTICSEARCH_URL/_security/_query/api_key?with_limited_by=true"' - - language: Java - code: | - client.security().queryApiKeys(q -> q - .query(qu -> qu - .ids(i -> i - .values("VuaCfGcBCdbkQm-e5aOx") - ) - ) - .withLimitedBy(true) - ); diff --git a/specification/security/query_api_keys/examples/request/QueryApiKeysRequestExample2.yaml b/specification/security/query_api_keys/examples/request/QueryApiKeysRequestExample2.yaml new file mode 100644 index 0000000000..95c96610a5 --- /dev/null +++ b/specification/security/query_api_keys/examples/request/QueryApiKeysRequestExample2.yaml @@ -0,0 +1,53 @@ +summary: Query API keys with pagination +method_request: GET /_security/_query/api_key +description: > + Run `GET /_security/_query/api_key`. Use a `bool` query to issue complex logical conditions and use `from`, `size`, and `sort` to + help paginate the result. For example, the API key name must begin with `app1-key-` and must not be `app1-key-01`. It must be + owned by a username with the wildcard pattern `org-*-user` and the `environment` metadata field must have a `production` value. + The offset to begin the search result is the twentieth (zero-based index) API key. The page size of the response is 10 API keys. + The result is first sorted by creation date in descending order, then by name in ascending order. +# type: request +value: |- + { + "query": { + "bool": { + "must": [ + { + "prefix": { + "name": "app1-key-" + } + }, + { + "term": { + "invalidated": "false" + } + } + ], + "must_not": [ + { + "term": { + "name": "app1-key-01" + } + } + ], + "filter": [ + { + "wildcard": { + "username": "org-*-user" + } + }, + { + "term": { + "metadata.environment": "production" + } + } + ] + } + }, + "from": 20, + "size": 10, + "sort": [ + { "creation": { "order": "desc", "format": "date_time" } }, + "name" + ] + } diff --git a/specification/security/query_api_keys/examples/request/QueryApiKeysRequestExample3.yaml b/specification/security/query_api_keys/examples/request/QueryApiKeysRequestExample3.yaml new file mode 100644 index 0000000000..8e572b2192 --- /dev/null +++ b/specification/security/query_api_keys/examples/request/QueryApiKeysRequestExample3.yaml @@ -0,0 +1,14 @@ +summary: Query API keys by name +method_request: GET /_security/_query/api_key +description: Run `GET /_security/_query/api_key` to retrieve the API key by name. +# type: request +value: |- + { + "query": { + "term": { + "name": { + "value": "application-key-1" + } + } + } + } diff --git a/specification/security/query_api_keys/examples/response/QueryApiKeysResponseExample1.yaml b/specification/security/query_api_keys/examples/response/QueryApiKeysResponseExample1.yaml new file mode 100644 index 0000000000..8bc50ab61c --- /dev/null +++ b/specification/security/query_api_keys/examples/response/QueryApiKeysResponseExample1.yaml @@ -0,0 +1,53 @@ +summary: Query API keys by ID +description: > + A successful response from `GET /_security/_query/api_key?with_limited_by=true`. + The `limited_by` details are the owner user's permissions associated with the API key. + It is a point-in-time snapshot captured at creation and subsequent updates. + An API key's effective permissions are an intersection of its assigned privileges and the owner user's permissions. +# type: response +# response_code: +value: |- + { + "api_keys": [ + { + "id": "VuaCfGcBCdbkQm-e5aOx", + "name": "application-key-1", + "creation": 1548550550158, + "expiration": 1548551550158, + "invalidated": false, + "username": "myuser", + "realm": "native1", + "realm_type": "native", + "metadata": { + "application": "my-application" + }, + "role_descriptors": { }, + "limited_by": [ + { + "role-power-user": { + "cluster": [ + "monitor" + ], + "indices": [ + { + "names": [ + "*" + ], + "privileges": [ + "read" + ], + "allow_restricted_indices": false + } + ], + "applications": [ ], + "run_as": [ ], + "metadata": { }, + "transient_metadata": { + "enabled": true + } + } + } + ] + } + ] + } diff --git a/specification/security/query_api_keys/examples/response/QueryApiKeysResponseExample2.yaml b/specification/security/query_api_keys/examples/response/QueryApiKeysResponseExample2.yaml new file mode 100644 index 0000000000..c932dd950f --- /dev/null +++ b/specification/security/query_api_keys/examples/response/QueryApiKeysResponseExample2.yaml @@ -0,0 +1,46 @@ +summary: Query API keys with pagination +description: > + An abbreviated response from `GET /_security/_query/api_key` that contains a list of matched API keys along with their sort values. + The first sort value is creation time, which is displayed in `date_time` format. + The second sort value is the API key name. +# type: response +# response_code: +value: |- + { + "total": 100, + "count": 10, + "api_keys": [ + { + "id": "CLXgVnsBOGkf8IyjcXU7", + "name": "app1-key-79", + "creation": 1629250154811, + "invalidated": false, + "username": "org-admin-user", + "realm": "native1", + "metadata": { + "environment": "production" + }, + "role_descriptors": { }, + "_sort": [ + "2021-08-18T01:29:14.811Z", + "app1-key-79" + ] + }, + { + "id": "BrXgVnsBOGkf8IyjbXVB", + "name": "app1-key-78", + "creation": 1629250153794, + "invalidated": false, + "username": "org-admin-user", + "realm": "native1", + "metadata": { + "environment": "production" + }, + "role_descriptors": { }, + "_sort": [ + "2021-08-18T01:29:13.794Z", + "app1-key-78" + ] + } + ] + } diff --git a/specification/security/query_api_keys/examples/response/QueryApiKeysResponseExample3.yaml b/specification/security/query_api_keys/examples/response/QueryApiKeysResponseExample3.yaml new file mode 100644 index 0000000000..5108837276 --- /dev/null +++ b/specification/security/query_api_keys/examples/response/QueryApiKeysResponseExample3.yaml @@ -0,0 +1,65 @@ +summary: Query all API keys +description: > + A successful response from `GET /_security/_query/api_key`. + It includes the role descriptors that are assigned to each API key when it was created or last updated. + Note that an API key's effective permissions are an intersection of its assigned privileges and the point-in-time snapshot of the owner user's permissions. + An empty role descriptors object means the API key inherits the owner user's permissions. +# type: response +# response_code: +value: |- + { + "total": 3, + "count": 3, + "api_keys": [ + { + "id": "nkvrGXsB8w290t56q3Rg", + "name": "my-api-key-1", + "creation": 1628227480421, + "expiration": 1629091480421, + "invalidated": false, + "username": "elastic", + "realm": "reserved", + "realm_type": "reserved", + "metadata": { + "letter": "a" + }, + "role_descriptors": { + "role-a": { + "cluster": [ + "monitor" + ], + "indices": [ + { + "names": [ + "index-a" + ], + "privileges": [ + "read" + ], + "allow_restricted_indices": false + } + ], + "applications": [ ], + "run_as": [ ], + "metadata": { }, + "transient_metadata": { + "enabled": true + } + } + } + }, + { + "id": "oEvrGXsB8w290t5683TI", + "name": "my-api-key-2", + "creation": 1628227498953, + "expiration": 1628313898953, + "invalidated": false, + "username": "elastic", + "realm": "reserved", + "metadata": { + "letter": "b" + }, + "role_descriptors": { } + } + ] + } diff --git a/specification/security/query_role/examples/request/QueryRolesRequestExample1.yaml b/specification/security/query_role/examples/request/QueryRolesRequestExample1.yaml index f2495e4fb9..922ce173cd 100644 --- a/specification/security/query_role/examples/request/QueryRolesRequestExample1.yaml +++ b/specification/security/query_role/examples/request/QueryRolesRequestExample1.yaml @@ -6,47 +6,3 @@ value: |- { "sort": ["name"] } -alternatives: - - language: Python - code: |- - resp = client.security.query_role( - sort=[ - "name" - ], - ) - - language: JavaScript - code: |- - const response = await client.security.queryRole({ - sort: ["name"], - }); - - language: Ruby - code: |- - response = client.security.query_role( - body: { - "sort": [ - "name" - ] - } - ) - - language: PHP - code: |- - $resp = $client->security()->queryRole([ - "body" => [ - "sort" => array( - "name", - ), - ], - ]); - - language: curl - code: - 'curl -X POST -H "Authorization: ApiKey $ELASTIC_API_KEY" -H "Content-Type: application/json" -d ''{"sort":["name"]}'' - "$ELASTICSEARCH_URL/_security/_query/role"' - - language: Java - code: | - client.security().queryRole(q -> q - .sort(s -> s - .field(f -> f - .field("name") - ) - ) - ); diff --git a/specification/security/query_role/examples/request/QueryRolesRequestExample2.yaml b/specification/security/query_role/examples/request/QueryRolesRequestExample2.yaml index d64d48d5c0..7e4a823d05 100644 --- a/specification/security/query_role/examples/request/QueryRolesRequestExample2.yaml +++ b/specification/security/query_role/examples/request/QueryRolesRequestExample2.yaml @@ -15,72 +15,3 @@ value: |- }, "size": 1 } -alternatives: - - language: Python - code: |- - resp = client.security.query_role( - query={ - "match": { - "description": { - "query": "user access" - } - } - }, - size=1, - ) - - language: JavaScript - code: |- - const response = await client.security.queryRole({ - query: { - match: { - description: { - query: "user access", - }, - }, - }, - size: 1, - }); - - language: Ruby - code: |- - response = client.security.query_role( - body: { - "query": { - "match": { - "description": { - "query": "user access" - } - } - }, - "size": 1 - } - ) - - language: PHP - code: |- - $resp = $client->security()->queryRole([ - "body" => [ - "query" => [ - "match" => [ - "description" => [ - "query" => "user access", - ], - ], - ], - "size" => 1, - ], - ]); - - language: curl - code: - 'curl -X POST -H "Authorization: ApiKey $ELASTIC_API_KEY" -H "Content-Type: application/json" -d - ''{"query":{"match":{"description":{"query":"user access"}}},"size":1}'' - "$ELASTICSEARCH_URL/_security/_query/role"' - - language: Java - code: | - client.security().queryRole(q -> q - .query(qu -> qu - .match(m -> m - .field("description") - .query(FieldValue.of("user access")) - ) - ) - .size(1) - ); diff --git a/specification/security/query_user/examples/request/SecurityQueryUserRequestExample1.yaml b/specification/security/query_user/examples/request/SecurityQueryUserRequestExample1.yaml index ac83a0f9a7..a55f4c79fc 100644 --- a/specification/security/query_user/examples/request/SecurityQueryUserRequestExample1.yaml +++ b/specification/security/query_user/examples/request/SecurityQueryUserRequestExample1.yaml @@ -12,63 +12,3 @@ value: |- } } } -alternatives: - - language: Python - code: |- - resp = client.security.query_user( - with_profile_uid=True, - query={ - "prefix": { - "roles": "other" - } - }, - ) - - language: JavaScript - code: |- - const response = await client.security.queryUser({ - with_profile_uid: "true", - query: { - prefix: { - roles: "other", - }, - }, - }); - - language: Ruby - code: |- - response = client.security.query_user( - with_profile_uid: "true", - body: { - "query": { - "prefix": { - "roles": "other" - } - } - } - ) - - language: PHP - code: |- - $resp = $client->security()->queryUser([ - "with_profile_uid" => "true", - "body" => [ - "query" => [ - "prefix" => [ - "roles" => "other", - ], - ], - ], - ]); - - language: curl - code: - 'curl -X POST -H "Authorization: ApiKey $ELASTIC_API_KEY" -H "Content-Type: application/json" -d - ''{"query":{"prefix":{"roles":"other"}}}'' "$ELASTICSEARCH_URL/_security/_query/user?with_profile_uid=true"' - - language: Java - code: | - client.security().queryUser(q -> q - .query(qu -> qu - .prefix(p -> p - .field("roles") - .value("other") - ) - ) - .withProfileUid(true) - ); diff --git a/specification/security/query_user/examples/request/SecurityQueryUserRequestExample2.yaml b/specification/security/query_user/examples/request/SecurityQueryUserRequestExample2.yaml index 52eb6ce7ac..3f8c912928 100644 --- a/specification/security/query_user/examples/request/SecurityQueryUserRequestExample2.yaml +++ b/specification/security/query_user/examples/request/SecurityQueryUserRequestExample2.yaml @@ -37,189 +37,3 @@ value: |- { "username": { "order": "desc"} } ] } -alternatives: - - language: Python - code: |- - resp = client.security.query_user( - query={ - "bool": { - "must": [ - { - "wildcard": { - "email": "*example.com" - } - }, - { - "term": { - "enabled": True - } - } - ], - "filter": [ - { - "wildcard": { - "roles": "*other*" - } - } - ] - } - }, - from=1, - size=2, - sort=[ - { - "username": { - "order": "desc" - } - } - ], - ) - - language: JavaScript - code: |- - const response = await client.security.queryUser({ - query: { - bool: { - must: [ - { - wildcard: { - email: "*example.com", - }, - }, - { - term: { - enabled: true, - }, - }, - ], - filter: [ - { - wildcard: { - roles: "*other*", - }, - }, - ], - }, - }, - from: 1, - size: 2, - sort: [ - { - username: { - order: "desc", - }, - }, - ], - }); - - language: Ruby - code: |- - response = client.security.query_user( - body: { - "query": { - "bool": { - "must": [ - { - "wildcard": { - "email": "*example.com" - } - }, - { - "term": { - "enabled": true - } - } - ], - "filter": [ - { - "wildcard": { - "roles": "*other*" - } - } - ] - } - }, - "from": 1, - "size": 2, - "sort": [ - { - "username": { - "order": "desc" - } - } - ] - } - ) - - language: PHP - code: |- - $resp = $client->security()->queryUser([ - "body" => [ - "query" => [ - "bool" => [ - "must" => array( - [ - "wildcard" => [ - "email" => "*example.com", - ], - ], - [ - "term" => [ - "enabled" => true, - ], - ], - ), - "filter" => array( - [ - "wildcard" => [ - "roles" => "*other*", - ], - ], - ), - ], - ], - "from" => 1, - "size" => 2, - "sort" => array( - [ - "username" => [ - "order" => "desc", - ], - ], - ), - ], - ]); - - language: curl - code: - "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d - '{\"query\":{\"bool\":{\"must\":[{\"wildcard\":{\"email\":\"*example.com\"}},{\"term\":{\"enabled\":true}}],\"filter\":[{\"wi\ - ldcard\":{\"roles\":\"*other*\"}}]}},\"from\":1,\"size\":2,\"sort\":[{\"username\":{\"order\":\"desc\"}}]}' - \"$ELASTICSEARCH_URL/_security/_query/user\"" - - language: Java - code: | - client.security().queryUser(q -> q - .from(1) - .query(qu -> qu - .bool(b -> b - .filter(f -> f - .wildcard(w -> w - .field("roles") - .value("*other*") - ) - ) - .must(List.of(Query.of(que -> que - .wildcard(w -> w - .field("email") - .value("*example.com") - )),Query.of(quer -> quer - .term(t -> t - .field("enabled") - .value(FieldValue.of(true)) - )))) - ) - ) - .size(2) - .sort(s -> s - .field(fi -> fi - .field("username") - .order(SortOrder.Desc) - ) - ) - ); diff --git a/specification/security/saml_authenticate/examples/request/SamlAuthenticateRequestExample1.yaml b/specification/security/saml_authenticate/examples/request/SamlAuthenticateRequestExample1.yaml index e038bad142..b018b0b111 100644 --- a/specification/security/saml_authenticate/examples/request/SamlAuthenticateRequestExample1.yaml +++ b/specification/security/saml_authenticate/examples/request/SamlAuthenticateRequestExample1.yaml @@ -9,51 +9,3 @@ value: |- "content" : "PHNhbWxwOlJlc3BvbnNlIHhtbG5zOnNhbWxwPSJ1cm46b2FzaXM6bmFtZXM6dGM6U0FNTDoyLjA6cHJvdG9jb2wiIHhtbG5zOnNhbWw9InVybjpvYXNpczpuYW1lczp0YzpTQU1MOjIuMD.....", "ids" : ["4fee3b046395c4e751011e97f8900b5273d56685"] } -alternatives: - - language: Python - code: >- - resp = client.security.saml_authenticate( - content="PHNhbWxwOlJlc3BvbnNlIHhtbG5zOnNhbWxwPSJ1cm46b2FzaXM6bmFtZXM6dGM6U0FNTDoyLjA6cHJvdG9jb2wiIHhtbG5zOnNhbWw9InVybjpvYXNpczpuYW1lczp0YzpTQU1MOjIuMD.....", - ids=[ - "4fee3b046395c4e751011e97f8900b5273d56685" - ], - ) - - language: JavaScript - code: >- - const response = await client.security.samlAuthenticate({ - content: - "PHNhbWxwOlJlc3BvbnNlIHhtbG5zOnNhbWxwPSJ1cm46b2FzaXM6bmFtZXM6dGM6U0FNTDoyLjA6cHJvdG9jb2wiIHhtbG5zOnNhbWw9InVybjpvYXNpczpuYW1lczp0YzpTQU1MOjIuMD.....", - ids: ["4fee3b046395c4e751011e97f8900b5273d56685"], - }); - - language: Ruby - code: >- - response = client.security.saml_authenticate( - body: { - "content": "PHNhbWxwOlJlc3BvbnNlIHhtbG5zOnNhbWxwPSJ1cm46b2FzaXM6bmFtZXM6dGM6U0FNTDoyLjA6cHJvdG9jb2wiIHhtbG5zOnNhbWw9InVybjpvYXNpczpuYW1lczp0YzpTQU1MOjIuMD.....", - "ids": [ - "4fee3b046395c4e751011e97f8900b5273d56685" - ] - } - ) - - language: PHP - code: >- - $resp = $client->security()->samlAuthenticate([ - "body" => [ - "content" => "PHNhbWxwOlJlc3BvbnNlIHhtbG5zOnNhbWxwPSJ1cm46b2FzaXM6bmFtZXM6dGM6U0FNTDoyLjA6cHJvdG9jb2wiIHhtbG5zOnNhbWw9InVybjpvYXNpczpuYW1lczp0YzpTQU1MOjIuMD.....", - "ids" => array( - "4fee3b046395c4e751011e97f8900b5273d56685", - ), - ], - ]); - - language: curl - code: - "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d - '{\"content\":\"PHNhbWxwOlJlc3BvbnNlIHhtbG5zOnNhbWxwPSJ1cm46b2FzaXM6bmFtZXM6dGM6U0FNTDoyLjA6cHJvdG9jb2wiIHhtbG5zOnNhbWw9InVyb\ - jpvYXNpczpuYW1lczp0YzpTQU1MOjIuMD.....\",\"ids\":[\"4fee3b046395c4e751011e97f8900b5273d56685\"]}' - \"$ELASTICSEARCH_URL/_security/saml/authenticate\"" - - language: Java - code: > - client.security().samlAuthenticate(s -> s - .content("PHNhbWxwOlJlc3BvbnNlIHhtbG5zOnNhbWxwPSJ1cm46b2FzaXM6bmFtZXM6dGM6U0FNTDoyLjA6cHJvdG9jb2wiIHhtbG5zOnNhbWw9InVybjpvYXNpczpuYW1lczp0YzpTQU1MOjIuMD.....") - .ids("4fee3b046395c4e751011e97f8900b5273d56685") - ); diff --git a/specification/security/saml_complete_logout/examples/request/SamlCompleteLogoutRequestExample1.yaml b/specification/security/saml_complete_logout/examples/request/SamlCompleteLogoutRequestExample1.yaml index 0be3224f98..a82f894279 100644 --- a/specification/security/saml_complete_logout/examples/request/SamlCompleteLogoutRequestExample1.yaml +++ b/specification/security/saml_complete_logout/examples/request/SamlCompleteLogoutRequestExample1.yaml @@ -9,56 +9,3 @@ value: |- "ids": [ "_1c368075e0b3..." ], "query_string": "SAMLResponse=fZHLasMwEEVbfb1bf...&SigAlg=http%3A%2F%2Fwww.w3.org%2F2000%2F09%2Fxmldsig%23rsa-sha1&Signature=CuCmFn%2BLqnaZGZJqK..." } -alternatives: - - language: Python - code: >- - resp = client.security.saml_complete_logout( - realm="saml1", - ids=[ - "_1c368075e0b3..." - ], - query_string="SAMLResponse=fZHLasMwEEVbfb1bf...&SigAlg=http%3A%2F%2Fwww.w3.org%2F2000%2F09%2Fxmldsig%23rsa-sha1&Signature=CuCmFn%2BLqnaZGZJqK...", - ) - - language: JavaScript - code: >- - const response = await client.security.samlCompleteLogout({ - realm: "saml1", - ids: ["_1c368075e0b3..."], - query_string: - "SAMLResponse=fZHLasMwEEVbfb1bf...&SigAlg=http%3A%2F%2Fwww.w3.org%2F2000%2F09%2Fxmldsig%23rsa-sha1&Signature=CuCmFn%2BLqnaZGZJqK...", - }); - - language: Ruby - code: >- - response = client.security.saml_complete_logout( - body: { - "realm": "saml1", - "ids": [ - "_1c368075e0b3..." - ], - "query_string": "SAMLResponse=fZHLasMwEEVbfb1bf...&SigAlg=http%3A%2F%2Fwww.w3.org%2F2000%2F09%2Fxmldsig%23rsa-sha1&Signature=CuCmFn%2BLqnaZGZJqK..." - } - ) - - language: PHP - code: >- - $resp = $client->security()->samlCompleteLogout([ - "body" => [ - "realm" => "saml1", - "ids" => array( - "_1c368075e0b3...", - ), - "query_string" => "SAMLResponse=fZHLasMwEEVbfb1bf...&SigAlg=http%3A%2F%2Fwww.w3.org%2F2000%2F09%2Fxmldsig%23rsa-sha1&Signature=CuCmFn%2BLqnaZGZJqK...", - ], - ]); - - language: curl - code: - "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d - '{\"realm\":\"saml1\",\"ids\":[\"_1c368075e0b3...\"],\"query_string\":\"SAMLResponse=fZHLasMwEEVbfb1bf...&SigAlg=http%3A%2F%2\ - Fwww.w3.org%2F2000%2F09%2Fxmldsig%23rsa-sha1&Signature=CuCmFn%2BLqnaZGZJqK...\"}' - \"$ELASTICSEARCH_URL/_security/saml/complete_logout\"" - - language: Java - code: > - client.security().samlCompleteLogout(s -> s - .ids("_1c368075e0b3...") - .queryString("SAMLResponse=fZHLasMwEEVbfb1bf...&SigAlg=http%3A%2F%2Fwww.w3.org%2F2000%2F09%2Fxmldsig%23rsa-sha1&Signature=CuCmFn%2BLqnaZGZJqK...") - .realm("saml1") - ); diff --git a/specification/security/saml_complete_logout/examples/request/SamlCompleteLogoutRequestExample2.yaml b/specification/security/saml_complete_logout/examples/request/SamlCompleteLogoutRequestExample2.yaml index ed2f2c0189..0e5aab05da 100644 --- a/specification/security/saml_complete_logout/examples/request/SamlCompleteLogoutRequestExample2.yaml +++ b/specification/security/saml_complete_logout/examples/request/SamlCompleteLogoutRequestExample2.yaml @@ -9,54 +9,3 @@ value: |- "ids": [ "_1c368075e0b3..." ], "content": "PHNhbWxwOkxvZ291dFJlc3BvbnNlIHhtbG5zOnNhbWxwPSJ1cm46..." } -alternatives: - - language: Python - code: |- - resp = client.security.saml_complete_logout( - realm="saml1", - ids=[ - "_1c368075e0b3..." - ], - content="PHNhbWxwOkxvZ291dFJlc3BvbnNlIHhtbG5zOnNhbWxwPSJ1cm46...", - ) - - language: JavaScript - code: |- - const response = await client.security.samlCompleteLogout({ - realm: "saml1", - ids: ["_1c368075e0b3..."], - content: "PHNhbWxwOkxvZ291dFJlc3BvbnNlIHhtbG5zOnNhbWxwPSJ1cm46...", - }); - - language: Ruby - code: |- - response = client.security.saml_complete_logout( - body: { - "realm": "saml1", - "ids": [ - "_1c368075e0b3..." - ], - "content": "PHNhbWxwOkxvZ291dFJlc3BvbnNlIHhtbG5zOnNhbWxwPSJ1cm46..." - } - ) - - language: PHP - code: |- - $resp = $client->security()->samlCompleteLogout([ - "body" => [ - "realm" => "saml1", - "ids" => array( - "_1c368075e0b3...", - ), - "content" => "PHNhbWxwOkxvZ291dFJlc3BvbnNlIHhtbG5zOnNhbWxwPSJ1cm46...", - ], - ]); - - language: curl - code: - 'curl -X POST -H "Authorization: ApiKey $ELASTIC_API_KEY" -H "Content-Type: application/json" -d - ''{"realm":"saml1","ids":["_1c368075e0b3..."],"content":"PHNhbWxwOkxvZ291dFJlc3BvbnNlIHhtbG5zOnNhbWxwPSJ1cm46..."}'' - "$ELASTICSEARCH_URL/_security/saml/complete_logout"' - - language: Java - code: | - client.security().samlCompleteLogout(s -> s - .content("PHNhbWxwOkxvZ291dFJlc3BvbnNlIHhtbG5zOnNhbWxwPSJ1cm46...") - .ids("_1c368075e0b3...") - .realm("saml1") - ); diff --git a/specification/security/saml_invalidate/examples/request/SamlInvalidateRequestExample1.yaml b/specification/security/saml_invalidate/examples/request/SamlInvalidateRequestExample1.yaml index ce8506c932..2a254d1496 100644 --- a/specification/security/saml_invalidate/examples/request/SamlInvalidateRequestExample1.yaml +++ b/specification/security/saml_invalidate/examples/request/SamlInvalidateRequestExample1.yaml @@ -9,49 +9,3 @@ value: |- "query_string" : "SAMLRequest=nZFda4MwFIb%2FiuS%2BmviRpqFaClKQdbvo2g12M2KMraCJ9cRR9utnW4Wyi13sMie873MeznJ1aWrnS3VQGR0j4mLkKC1NUeljjA77zYyhVbIE0dR%2By7fmaHq7U%2BdegXWGpAZ%2B%2F4pR32luBFTAtWgUcCv56%2Fp5y30X87Yz1khTIycdgpUW9kY7WdsC9zxoXTvMvWuVV98YyMnSGH2SYE5pwALBIr9QKiwDGpW0oGVUznGeMyJZKFkQ4jBf5HnhUymjIhzCAL3KNFihbYx8TBYzzGaY7EnIyZwHzCWMfiDnbRIftkSjJr%2BFu0e9v%2B0EgOquRiiZjKpiVFp6j50T4WXoyNJ%2FEWC9fdqc1t%2F1%2B2F3aUpjzhPiXpqMz1%2FHSn4A&SigAlg=http%3A%2F%2Fwww.w3.org%2F2001%2F04%2Fxmldsig-more%23rsa-sha256&Signature=MsAYz2NFdovMG2mXf6TSpu5vlQQyEJAg%2B4KCwBqJTmrb3yGXKUtIgvjqf88eCAK32v3eN8vupjPC8LglYmke1ZnjK0%2FKxzkvSjTVA7mMQe2AQdKbkyC038zzRq%2FYHcjFDE%2Bz0qISwSHZY2NyLePmwU7SexEXnIz37jKC6NMEhus%3D", "realm" : "saml1" } -alternatives: - - language: Python - code: >- - resp = client.security.saml_invalidate( - query_string="SAMLRequest=nZFda4MwFIb%2FiuS%2BmviRpqFaClKQdbvo2g12M2KMraCJ9cRR9utnW4Wyi13sMie873MeznJ1aWrnS3VQGR0j4mLkKC1NUeljjA77zYyhVbIE0dR%2By7fmaHq7U%2BdegXWGpAZ%2B%2F4pR32luBFTAtWgUcCv56%2Fp5y30X87Yz1khTIycdgpUW9kY7WdsC9zxoXTvMvWuVV98YyMnSGH2SYE5pwALBIr9QKiwDGpW0oGVUznGeMyJZKFkQ4jBf5HnhUymjIhzCAL3KNFihbYx8TBYzzGaY7EnIyZwHzCWMfiDnbRIftkSjJr%2BFu0e9v%2B0EgOquRiiZjKpiVFp6j50T4WXoyNJ%2FEWC9fdqc1t%2F1%2B2F3aUpjzhPiXpqMz1%2FHSn4A&SigAlg=http%3A%2F%2Fwww.w3.org%2F2001%2F04%2Fxmldsig-more%23rsa-sha256&Signature=MsAYz2NFdovMG2mXf6TSpu5vlQQyEJAg%2B4KCwBqJTmrb3yGXKUtIgvjqf88eCAK32v3eN8vupjPC8LglYmke1ZnjK0%2FKxzkvSjTVA7mMQe2AQdKbkyC038zzRq%2FYHcjFDE%2Bz0qISwSHZY2NyLePmwU7SexEXnIz37jKC6NMEhus%3D", - realm="saml1", - ) - - language: JavaScript - code: >- - const response = await client.security.samlInvalidate({ - query_string: - "SAMLRequest=nZFda4MwFIb%2FiuS%2BmviRpqFaClKQdbvo2g12M2KMraCJ9cRR9utnW4Wyi13sMie873MeznJ1aWrnS3VQGR0j4mLkKC1NUeljjA77zYyhVbIE0dR%2By7fmaHq7U%2BdegXWGpAZ%2B%2F4pR32luBFTAtWgUcCv56%2Fp5y30X87Yz1khTIycdgpUW9kY7WdsC9zxoXTvMvWuVV98YyMnSGH2SYE5pwALBIr9QKiwDGpW0oGVUznGeMyJZKFkQ4jBf5HnhUymjIhzCAL3KNFihbYx8TBYzzGaY7EnIyZwHzCWMfiDnbRIftkSjJr%2BFu0e9v%2B0EgOquRiiZjKpiVFp6j50T4WXoyNJ%2FEWC9fdqc1t%2F1%2B2F3aUpjzhPiXpqMz1%2FHSn4A&SigAlg=http%3A%2F%2Fwww.w3.org%2F2001%2F04%2Fxmldsig-more%23rsa-sha256&Signature=MsAYz2NFdovMG2mXf6TSpu5vlQQyEJAg%2B4KCwBqJTmrb3yGXKUtIgvjqf88eCAK32v3eN8vupjPC8LglYmke1ZnjK0%2FKxzkvSjTVA7mMQe2AQdKbkyC038zzRq%2FYHcjFDE%2Bz0qISwSHZY2NyLePmwU7SexEXnIz37jKC6NMEhus%3D", - realm: "saml1", - }); - - language: Ruby - code: >- - response = client.security.saml_invalidate( - body: { - "query_string": "SAMLRequest=nZFda4MwFIb%2FiuS%2BmviRpqFaClKQdbvo2g12M2KMraCJ9cRR9utnW4Wyi13sMie873MeznJ1aWrnS3VQGR0j4mLkKC1NUeljjA77zYyhVbIE0dR%2By7fmaHq7U%2BdegXWGpAZ%2B%2F4pR32luBFTAtWgUcCv56%2Fp5y30X87Yz1khTIycdgpUW9kY7WdsC9zxoXTvMvWuVV98YyMnSGH2SYE5pwALBIr9QKiwDGpW0oGVUznGeMyJZKFkQ4jBf5HnhUymjIhzCAL3KNFihbYx8TBYzzGaY7EnIyZwHzCWMfiDnbRIftkSjJr%2BFu0e9v%2B0EgOquRiiZjKpiVFp6j50T4WXoyNJ%2FEWC9fdqc1t%2F1%2B2F3aUpjzhPiXpqMz1%2FHSn4A&SigAlg=http%3A%2F%2Fwww.w3.org%2F2001%2F04%2Fxmldsig-more%23rsa-sha256&Signature=MsAYz2NFdovMG2mXf6TSpu5vlQQyEJAg%2B4KCwBqJTmrb3yGXKUtIgvjqf88eCAK32v3eN8vupjPC8LglYmke1ZnjK0%2FKxzkvSjTVA7mMQe2AQdKbkyC038zzRq%2FYHcjFDE%2Bz0qISwSHZY2NyLePmwU7SexEXnIz37jKC6NMEhus%3D", - "realm": "saml1" - } - ) - - language: PHP - code: >- - $resp = $client->security()->samlInvalidate([ - "body" => [ - "query_string" => "SAMLRequest=nZFda4MwFIb%2FiuS%2BmviRpqFaClKQdbvo2g12M2KMraCJ9cRR9utnW4Wyi13sMie873MeznJ1aWrnS3VQGR0j4mLkKC1NUeljjA77zYyhVbIE0dR%2By7fmaHq7U%2BdegXWGpAZ%2B%2F4pR32luBFTAtWgUcCv56%2Fp5y30X87Yz1khTIycdgpUW9kY7WdsC9zxoXTvMvWuVV98YyMnSGH2SYE5pwALBIr9QKiwDGpW0oGVUznGeMyJZKFkQ4jBf5HnhUymjIhzCAL3KNFihbYx8TBYzzGaY7EnIyZwHzCWMfiDnbRIftkSjJr%2BFu0e9v%2B0EgOquRiiZjKpiVFp6j50T4WXoyNJ%2FEWC9fdqc1t%2F1%2B2F3aUpjzhPiXpqMz1%2FHSn4A&SigAlg=http%3A%2F%2Fwww.w3.org%2F2001%2F04%2Fxmldsig-more%23rsa-sha256&Signature=MsAYz2NFdovMG2mXf6TSpu5vlQQyEJAg%2B4KCwBqJTmrb3yGXKUtIgvjqf88eCAK32v3eN8vupjPC8LglYmke1ZnjK0%2FKxzkvSjTVA7mMQe2AQdKbkyC038zzRq%2FYHcjFDE%2Bz0qISwSHZY2NyLePmwU7SexEXnIz37jKC6NMEhus%3D", - "realm" => "saml1", - ], - ]); - - language: curl - code: - "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d - '{\"query_string\":\"SAMLRequest=nZFda4MwFIb%2FiuS%2BmviRpqFaClKQdbvo2g12M2KMraCJ9cRR9utnW4Wyi13sMie873MeznJ1aWrnS3VQGR0j4mLk\ - KC1NUeljjA77zYyhVbIE0dR%2By7fmaHq7U%2BdegXWGpAZ%2B%2F4pR32luBFTAtWgUcCv56%2Fp5y30X87Yz1khTIycdgpUW9kY7WdsC9zxoXTvMvWuVV98YyMn\ - SGH2SYE5pwALBIr9QKiwDGpW0oGVUznGeMyJZKFkQ4jBf5HnhUymjIhzCAL3KNFihbYx8TBYzzGaY7EnIyZwHzCWMfiDnbRIftkSjJr%2BFu0e9v%2B0EgOquRiiZ\ - jKpiVFp6j50T4WXoyNJ%2FEWC9fdqc1t%2F1%2B2F3aUpjzhPiXpqMz1%2FHSn4A&SigAlg=http%3A%2F%2Fwww.w3.org%2F2001%2F04%2Fxmldsig-more%23\ - rsa-sha256&Signature=MsAYz2NFdovMG2mXf6TSpu5vlQQyEJAg%2B4KCwBqJTmrb3yGXKUtIgvjqf88eCAK32v3eN8vupjPC8LglYmke1ZnjK0%2FKxzkvSjTV\ - A7mMQe2AQdKbkyC038zzRq%2FYHcjFDE%2Bz0qISwSHZY2NyLePmwU7SexEXnIz37jKC6NMEhus%3D\",\"realm\":\"saml1\"}' - \"$ELASTICSEARCH_URL/_security/saml/invalidate\"" - - language: Java - code: > - client.security().samlInvalidate(s -> s - .queryString("SAMLRequest=nZFda4MwFIb%2FiuS%2BmviRpqFaClKQdbvo2g12M2KMraCJ9cRR9utnW4Wyi13sMie873MeznJ1aWrnS3VQGR0j4mLkKC1NUeljjA77zYyhVbIE0dR%2By7fmaHq7U%2BdegXWGpAZ%2B%2F4pR32luBFTAtWgUcCv56%2Fp5y30X87Yz1khTIycdgpUW9kY7WdsC9zxoXTvMvWuVV98YyMnSGH2SYE5pwALBIr9QKiwDGpW0oGVUznGeMyJZKFkQ4jBf5HnhUymjIhzCAL3KNFihbYx8TBYzzGaY7EnIyZwHzCWMfiDnbRIftkSjJr%2BFu0e9v%2B0EgOquRiiZjKpiVFp6j50T4WXoyNJ%2FEWC9fdqc1t%2F1%2B2F3aUpjzhPiXpqMz1%2FHSn4A&SigAlg=http%3A%2F%2Fwww.w3.org%2F2001%2F04%2Fxmldsig-more%23rsa-sha256&Signature=MsAYz2NFdovMG2mXf6TSpu5vlQQyEJAg%2B4KCwBqJTmrb3yGXKUtIgvjqf88eCAK32v3eN8vupjPC8LglYmke1ZnjK0%2FKxzkvSjTVA7mMQe2AQdKbkyC038zzRq%2FYHcjFDE%2Bz0qISwSHZY2NyLePmwU7SexEXnIz37jKC6NMEhus%3D") - .realm("saml1") - ); diff --git a/specification/security/saml_logout/examples/request/SamlLogoutRequestExample1.yaml b/specification/security/saml_logout/examples/request/SamlLogoutRequestExample1.yaml index da5f7612a8..a759311d96 100644 --- a/specification/security/saml_logout/examples/request/SamlLogoutRequestExample1.yaml +++ b/specification/security/saml_logout/examples/request/SamlLogoutRequestExample1.yaml @@ -9,43 +9,3 @@ value: |- "token" : "46ToAxZVaXVVZTVKOVF5YU04ZFJVUDVSZlV3", "refresh_token" : "mJdXLtmvTUSpoLwMvdBt_w" } -alternatives: - - language: Python - code: |- - resp = client.security.saml_logout( - token="46ToAxZVaXVVZTVKOVF5YU04ZFJVUDVSZlV3", - refresh_token="mJdXLtmvTUSpoLwMvdBt_w", - ) - - language: JavaScript - code: |- - const response = await client.security.samlLogout({ - token: "46ToAxZVaXVVZTVKOVF5YU04ZFJVUDVSZlV3", - refresh_token: "mJdXLtmvTUSpoLwMvdBt_w", - }); - - language: Ruby - code: |- - response = client.security.saml_logout( - body: { - "token": "46ToAxZVaXVVZTVKOVF5YU04ZFJVUDVSZlV3", - "refresh_token": "mJdXLtmvTUSpoLwMvdBt_w" - } - ) - - language: PHP - code: |- - $resp = $client->security()->samlLogout([ - "body" => [ - "token" => "46ToAxZVaXVVZTVKOVF5YU04ZFJVUDVSZlV3", - "refresh_token" => "mJdXLtmvTUSpoLwMvdBt_w", - ], - ]); - - language: curl - code: - 'curl -X POST -H "Authorization: ApiKey $ELASTIC_API_KEY" -H "Content-Type: application/json" -d - ''{"token":"46ToAxZVaXVVZTVKOVF5YU04ZFJVUDVSZlV3","refresh_token":"mJdXLtmvTUSpoLwMvdBt_w"}'' - "$ELASTICSEARCH_URL/_security/saml/logout"' - - language: Java - code: | - client.security().samlLogout(s -> s - .refreshToken("mJdXLtmvTUSpoLwMvdBt_w") - .token("46ToAxZVaXVVZTVKOVF5YU04ZFJVUDVSZlV3") - ); diff --git a/specification/security/saml_prepare_authentication/examples/request/SamlPrepareAuthenticationRequestExample1.yaml b/specification/security/saml_prepare_authentication/examples/request/SamlPrepareAuthenticationRequestExample1.yaml index e96e9e97f6..04d4820ecf 100644 --- a/specification/security/saml_prepare_authentication/examples/request/SamlPrepareAuthenticationRequestExample1.yaml +++ b/specification/security/saml_prepare_authentication/examples/request/SamlPrepareAuthenticationRequestExample1.yaml @@ -7,37 +7,3 @@ value: |- { "realm" : "saml1" } -alternatives: - - language: Python - code: |- - resp = client.security.saml_prepare_authentication( - realm="saml1", - ) - - language: JavaScript - code: |- - const response = await client.security.samlPrepareAuthentication({ - realm: "saml1", - }); - - language: Ruby - code: |- - response = client.security.saml_prepare_authentication( - body: { - "realm": "saml1" - } - ) - - language: PHP - code: |- - $resp = $client->security()->samlPrepareAuthentication([ - "body" => [ - "realm" => "saml1", - ], - ]); - - language: curl - code: - 'curl -X POST -H "Authorization: ApiKey $ELASTIC_API_KEY" -H "Content-Type: application/json" -d ''{"realm":"saml1"}'' - "$ELASTICSEARCH_URL/_security/saml/prepare"' - - language: Java - code: | - client.security().samlPrepareAuthentication(s -> s - .realm("saml1") - ); diff --git a/specification/security/saml_prepare_authentication/examples/request/SamlPrepareAuthenticationRequestExample2.yaml b/specification/security/saml_prepare_authentication/examples/request/SamlPrepareAuthenticationRequestExample2.yaml index cf65eaba71..721520c3ec 100644 --- a/specification/security/saml_prepare_authentication/examples/request/SamlPrepareAuthenticationRequestExample2.yaml +++ b/specification/security/saml_prepare_authentication/examples/request/SamlPrepareAuthenticationRequestExample2.yaml @@ -8,37 +8,3 @@ value: |- { "acs" : "https://kibana.org/api/security/saml/callback" } -alternatives: - - language: Python - code: |- - resp = client.security.saml_prepare_authentication( - acs="https://kibana.org/api/security/saml/callback", - ) - - language: JavaScript - code: |- - const response = await client.security.samlPrepareAuthentication({ - acs: "https://kibana.org/api/security/saml/callback", - }); - - language: Ruby - code: |- - response = client.security.saml_prepare_authentication( - body: { - "acs": "https://kibana.org/api/security/saml/callback" - } - ) - - language: PHP - code: |- - $resp = $client->security()->samlPrepareAuthentication([ - "body" => [ - "acs" => "https://kibana.org/api/security/saml/callback", - ], - ]); - - language: curl - code: - 'curl -X POST -H "Authorization: ApiKey $ELASTIC_API_KEY" -H "Content-Type: application/json" -d - ''{"acs":"https://kibana.org/api/security/saml/callback"}'' "$ELASTICSEARCH_URL/_security/saml/prepare"' - - language: Java - code: | - client.security().samlPrepareAuthentication(s -> s - .acs("https://kibana.org/api/security/saml/callback") - ); diff --git a/specification/security/saml_service_provider_metadata/examples/request/SamlServiceProviderMetadataRequestExample1.yaml b/specification/security/saml_service_provider_metadata/examples/request/SamlServiceProviderMetadataRequestExample1.yaml index fece8d78cc..d19fa7f868 100644 --- a/specification/security/saml_service_provider_metadata/examples/request/SamlServiceProviderMetadataRequestExample1.yaml +++ b/specification/security/saml_service_provider_metadata/examples/request/SamlServiceProviderMetadataRequestExample1.yaml @@ -1,30 +1 @@ method_request: POST /_security/profile/u_P_0BMHgaOK3p7k-PFWUCbw9dQ-UFjt01oWJ_Dp2PmPc_0/_data -alternatives: - - language: Python - code: |- - resp = client.security.update_user_profile_data( - uid="u_P_0BMHgaOK3p7k-PFWUCbw9dQ-UFjt01oWJ_Dp2PmPc_0", - ) - - language: JavaScript - code: |- - const response = await client.security.updateUserProfileData({ - uid: "u_P_0BMHgaOK3p7k-PFWUCbw9dQ-UFjt01oWJ_Dp2PmPc_0", - }); - - language: Ruby - code: |- - response = client.security.update_user_profile_data( - uid: "u_P_0BMHgaOK3p7k-PFWUCbw9dQ-UFjt01oWJ_Dp2PmPc_0" - ) - - language: PHP - code: |- - $resp = $client->security()->updateUserProfileData([ - "uid" => "u_P_0BMHgaOK3p7k-PFWUCbw9dQ-UFjt01oWJ_Dp2PmPc_0", - ]); - - language: curl - code: 'curl -X POST -H "Authorization: ApiKey $ELASTIC_API_KEY" - "$ELASTICSEARCH_URL/_security/profile/u_P_0BMHgaOK3p7k-PFWUCbw9dQ-UFjt01oWJ_Dp2PmPc_0/_data"' - - language: Java - code: | - client.security().updateUserProfileData(u -> u - .uid("u_P_0BMHgaOK3p7k-PFWUCbw9dQ-UFjt01oWJ_Dp2PmPc_0") - ); diff --git a/specification/security/suggest_user_profiles/examples/request/SuggestUserProfilesRequestExample1.yaml b/specification/security/suggest_user_profiles/examples/request/SuggestUserProfilesRequestExample1.yaml index 7f5a719312..ff5a8290bb 100644 --- a/specification/security/suggest_user_profiles/examples/request/SuggestUserProfilesRequestExample1.yaml +++ b/specification/security/suggest_user_profiles/examples/request/SuggestUserProfilesRequestExample1.yaml @@ -18,87 +18,3 @@ value: |- } } } -alternatives: - - language: Python - code: |- - resp = client.security.suggest_user_profiles( - name="jack", - hint={ - "uids": [ - "u_8RKO7AKfEbSiIHZkZZ2LJy2MUSDPWDr3tMI_CkIGApU_0", - "u_79HkWkwmnBH5gqFKwoxggWPjEBOur1zLPXQPEl1VBW0_0" - ], - "labels": { - "direction": [ - "north", - "east" - ] - } - }, - ) - - language: JavaScript - code: |- - const response = await client.security.suggestUserProfiles({ - name: "jack", - hint: { - uids: [ - "u_8RKO7AKfEbSiIHZkZZ2LJy2MUSDPWDr3tMI_CkIGApU_0", - "u_79HkWkwmnBH5gqFKwoxggWPjEBOur1zLPXQPEl1VBW0_0", - ], - labels: { - direction: ["north", "east"], - }, - }, - }); - - language: Ruby - code: |- - response = client.security.suggest_user_profiles( - body: { - "name": "jack", - "hint": { - "uids": [ - "u_8RKO7AKfEbSiIHZkZZ2LJy2MUSDPWDr3tMI_CkIGApU_0", - "u_79HkWkwmnBH5gqFKwoxggWPjEBOur1zLPXQPEl1VBW0_0" - ], - "labels": { - "direction": [ - "north", - "east" - ] - } - } - } - ) - - language: PHP - code: |- - $resp = $client->security()->suggestUserProfiles([ - "body" => [ - "name" => "jack", - "hint" => [ - "uids" => array( - "u_8RKO7AKfEbSiIHZkZZ2LJy2MUSDPWDr3tMI_CkIGApU_0", - "u_79HkWkwmnBH5gqFKwoxggWPjEBOur1zLPXQPEl1VBW0_0", - ), - "labels" => [ - "direction" => array( - "north", - "east", - ), - ], - ], - ], - ]); - - language: curl - code: - "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d - '{\"name\":\"jack\",\"hint\":{\"uids\":[\"u_8RKO7AKfEbSiIHZkZZ2LJy2MUSDPWDr3tMI_CkIGApU_0\",\"u_79HkWkwmnBH5gqFKwoxggWPjEBOur\ - 1zLPXQPEl1VBW0_0\"],\"labels\":{\"direction\":[\"north\",\"east\"]}}}' \"$ELASTICSEARCH_URL/_security/profile/_suggest\"" - - language: Java - code: | - client.security().suggestUserProfiles(s -> s - .hint(h -> h - .uids(List.of("u_8RKO7AKfEbSiIHZkZZ2LJy2MUSDPWDr3tMI_CkIGApU_0","u_79HkWkwmnBH5gqFKwoxggWPjEBOur1zLPXQPEl1VBW0_0")) - .labels("direction", List.of("north","east")) - ) - .name("jack") - ); diff --git a/specification/security/update_api_key/examples/request/UpdateApiKeyRequestExample1.yaml b/specification/security/update_api_key/examples/request/UpdateApiKeyRequestExample1.yaml index 0c485a87f3..f2fa4492bd 100644 --- a/specification/security/update_api_key/examples/request/UpdateApiKeyRequestExample1.yaml +++ b/specification/security/update_api_key/examples/request/UpdateApiKeyRequestExample1.yaml @@ -23,131 +23,3 @@ value: |- } } } -alternatives: - - language: Python - code: |- - resp = client.security.update_api_key( - id="VuaCfGcBCdbkQm-e5aOx", - role_descriptors={ - "role-a": { - "indices": [ - { - "names": [ - "*" - ], - "privileges": [ - "write" - ] - } - ] - } - }, - metadata={ - "environment": { - "level": 2, - "trusted": True, - "tags": [ - "production" - ] - } - }, - ) - - language: JavaScript - code: |- - const response = await client.security.updateApiKey({ - id: "VuaCfGcBCdbkQm-e5aOx", - role_descriptors: { - "role-a": { - indices: [ - { - names: ["*"], - privileges: ["write"], - }, - ], - }, - }, - metadata: { - environment: { - level: 2, - trusted: true, - tags: ["production"], - }, - }, - }); - - language: Ruby - code: |- - response = client.security.update_api_key( - id: "VuaCfGcBCdbkQm-e5aOx", - body: { - "role_descriptors": { - "role-a": { - "indices": [ - { - "names": [ - "*" - ], - "privileges": [ - "write" - ] - } - ] - } - }, - "metadata": { - "environment": { - "level": 2, - "trusted": true, - "tags": [ - "production" - ] - } - } - } - ) - - language: PHP - code: |- - $resp = $client->security()->updateApiKey([ - "id" => "VuaCfGcBCdbkQm-e5aOx", - "body" => [ - "role_descriptors" => [ - "role-a" => [ - "indices" => array( - [ - "names" => array( - "*", - ), - "privileges" => array( - "write", - ), - ], - ), - ], - ], - "metadata" => [ - "environment" => [ - "level" => 2, - "trusted" => true, - "tags" => array( - "production", - ), - ], - ], - ], - ]); - - language: curl - code: - "curl -X PUT -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d - '{\"role_descriptors\":{\"role-a\":{\"indices\":[{\"names\":[\"*\"],\"privileges\":[\"write\"]}]}},\"metadata\":{\"environment\ - \":{\"level\":2,\"trusted\":true,\"tags\":[\"production\"]}}}' \"$ELASTICSEARCH_URL/_security/api_key/VuaCfGcBCdbkQm-e5aOx\"" - - language: Java - code: | - client.security().updateApiKey(u -> u - .id("VuaCfGcBCdbkQm-e5aOx") - .metadata("environment", JsonData.fromJson("{\"level\":2,\"trusted\":true,\"tags\":[\"production\"]}")) - .roleDescriptors("role-a", r -> r - .indices(i -> i - .names("*") - .privileges("write") - ) - ) - ); diff --git a/specification/security/update_api_key/examples/request/UpdateApiKeyRequestExample2.yaml b/specification/security/update_api_key/examples/request/UpdateApiKeyRequestExample2.yaml index c70a01f546..0bf7fd4922 100644 --- a/specification/security/update_api_key/examples/request/UpdateApiKeyRequestExample2.yaml +++ b/specification/security/update_api_key/examples/request/UpdateApiKeyRequestExample2.yaml @@ -8,41 +8,3 @@ value: |- { "role_descriptors": {} } -alternatives: - - language: Python - code: |- - resp = client.security.update_api_key( - id="VuaCfGcBCdbkQm-e5aOx", - role_descriptors={}, - ) - - language: JavaScript - code: |- - const response = await client.security.updateApiKey({ - id: "VuaCfGcBCdbkQm-e5aOx", - role_descriptors: {}, - }); - - language: Ruby - code: |- - response = client.security.update_api_key( - id: "VuaCfGcBCdbkQm-e5aOx", - body: { - "role_descriptors": {} - } - ) - - language: PHP - code: |- - $resp = $client->security()->updateApiKey([ - "id" => "VuaCfGcBCdbkQm-e5aOx", - "body" => [ - "role_descriptors" => new ArrayObject([]), - ], - ]); - - language: curl - code: - 'curl -X PUT -H "Authorization: ApiKey $ELASTIC_API_KEY" -H "Content-Type: application/json" -d - ''{"role_descriptors":{}}'' "$ELASTICSEARCH_URL/_security/api_key/VuaCfGcBCdbkQm-e5aOx"' - - language: Java - code: | - client.security().updateApiKey(u -> u - .id("VuaCfGcBCdbkQm-e5aOx") - ); diff --git a/specification/security/update_cross_cluster_api_key/examples/request/UpdateCrossClusterApiKeyRequestExample1.yaml b/specification/security/update_cross_cluster_api_key/examples/request/UpdateCrossClusterApiKeyRequestExample1.yaml index 02042fbef4..2928828495 100644 --- a/specification/security/update_cross_cluster_api_key/examples/request/UpdateCrossClusterApiKeyRequestExample1.yaml +++ b/specification/security/update_cross_cluster_api_key/examples/request/UpdateCrossClusterApiKeyRequestExample1.yaml @@ -17,90 +17,3 @@ value: |- "application": "replication" } } -alternatives: - - language: Python - code: |- - resp = client.security.update_cross_cluster_api_key( - id="VuaCfGcBCdbkQm-e5aOx", - access={ - "replication": [ - { - "names": [ - "archive" - ] - } - ] - }, - metadata={ - "application": "replication" - }, - ) - - language: JavaScript - code: |- - const response = await client.security.updateCrossClusterApiKey({ - id: "VuaCfGcBCdbkQm-e5aOx", - access: { - replication: [ - { - names: ["archive"], - }, - ], - }, - metadata: { - application: "replication", - }, - }); - - language: Ruby - code: |- - response = client.security.update_cross_cluster_api_key( - id: "VuaCfGcBCdbkQm-e5aOx", - body: { - "access": { - "replication": [ - { - "names": [ - "archive" - ] - } - ] - }, - "metadata": { - "application": "replication" - } - } - ) - - language: PHP - code: |- - $resp = $client->security()->updateCrossClusterApiKey([ - "id" => "VuaCfGcBCdbkQm-e5aOx", - "body" => [ - "access" => [ - "replication" => array( - [ - "names" => array( - "archive", - ), - ], - ), - ], - "metadata" => [ - "application" => "replication", - ], - ], - ]); - - language: curl - code: - 'curl -X PUT -H "Authorization: ApiKey $ELASTIC_API_KEY" -H "Content-Type: application/json" -d - ''{"access":{"replication":[{"names":["archive"]}]},"metadata":{"application":"replication"}}'' - "$ELASTICSEARCH_URL/_security/cross_cluster/api_key/VuaCfGcBCdbkQm-e5aOx"' - - language: Java - code: | - client.security().updateCrossClusterApiKey(u -> u - .access(a -> a - .replication(r -> r - .names("archive") - ) - ) - .id("VuaCfGcBCdbkQm-e5aOx") - .metadata("application", JsonData.fromJson("\"replication\"")) - ); diff --git a/specification/security/update_settings/examples/request/SecurityUpdateSettingsRequestExample1.yaml b/specification/security/update_settings/examples/request/SecurityUpdateSettingsRequestExample1.yaml index 5b0e1e14db..469d1ea0c9 100644 --- a/specification/security/update_settings/examples/request/SecurityUpdateSettingsRequestExample1.yaml +++ b/specification/security/update_settings/examples/request/SecurityUpdateSettingsRequestExample1.yaml @@ -14,72 +14,3 @@ value: |- "index.auto_expand_replicas": "0-all" } } -alternatives: - - language: Python - code: |- - resp = client.security.update_settings( - security={ - "index.auto_expand_replicas": "0-all" - }, - security-tokens={ - "index.auto_expand_replicas": "0-all" - }, - security-profile={ - "index.auto_expand_replicas": "0-all" - }, - ) - - language: JavaScript - code: |- - const response = await client.security.updateSettings({ - security: { - "index.auto_expand_replicas": "0-all", - }, - "security-tokens": { - "index.auto_expand_replicas": "0-all", - }, - "security-profile": { - "index.auto_expand_replicas": "0-all", - }, - }); - - language: Ruby - code: |- - response = client.security.update_settings( - body: { - "security": { - "index.auto_expand_replicas": "0-all" - }, - "security-tokens": { - "index.auto_expand_replicas": "0-all" - }, - "security-profile": { - "index.auto_expand_replicas": "0-all" - } - } - ) - - language: PHP - code: |- - $resp = $client->security()->updateSettings([ - "body" => [ - "security" => [ - "index.auto_expand_replicas" => "0-all", - ], - "security-tokens" => [ - "index.auto_expand_replicas" => "0-all", - ], - "security-profile" => [ - "index.auto_expand_replicas" => "0-all", - ], - ], - ]); - - language: curl - code: - "curl -X PUT -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d - '{\"security\":{\"index.auto_expand_replicas\":\"0-all\"},\"security-tokens\":{\"index.auto_expand_replicas\":\"0-all\"},\"se\ - curity-profile\":{\"index.auto_expand_replicas\":\"0-all\"}}' \"$ELASTICSEARCH_URL/_security/settings\"" - - language: Java - code: | - client.security().updateSettings(u -> u - .security(s -> s) - .securityProfile(s -> s) - .securityTokens(s -> s) - ); diff --git a/specification/security/update_user_profile_data/examples/request/UpdateUserProfileDataRequestExample1.yaml b/specification/security/update_user_profile_data/examples/request/UpdateUserProfileDataRequestExample1.yaml index 81d1a91ade..0cc16b17a0 100644 --- a/specification/security/update_user_profile_data/examples/request/UpdateUserProfileDataRequestExample1.yaml +++ b/specification/security/update_user_profile_data/examples/request/UpdateUserProfileDataRequestExample1.yaml @@ -15,72 +15,3 @@ value: |- } } } -alternatives: - - language: Python - code: |- - resp = client.security.update_user_profile_data( - uid="u_P_0BMHgaOK3p7k-PFWUCbw9dQ-UFjt01oWJ_Dp2PmPc_0", - labels={ - "direction": "east" - }, - data={ - "app1": { - "theme": "default" - } - }, - ) - - language: JavaScript - code: |- - const response = await client.security.updateUserProfileData({ - uid: "u_P_0BMHgaOK3p7k-PFWUCbw9dQ-UFjt01oWJ_Dp2PmPc_0", - labels: { - direction: "east", - }, - data: { - app1: { - theme: "default", - }, - }, - }); - - language: Ruby - code: |- - response = client.security.update_user_profile_data( - uid: "u_P_0BMHgaOK3p7k-PFWUCbw9dQ-UFjt01oWJ_Dp2PmPc_0", - body: { - "labels": { - "direction": "east" - }, - "data": { - "app1": { - "theme": "default" - } - } - } - ) - - language: PHP - code: |- - $resp = $client->security()->updateUserProfileData([ - "uid" => "u_P_0BMHgaOK3p7k-PFWUCbw9dQ-UFjt01oWJ_Dp2PmPc_0", - "body" => [ - "labels" => [ - "direction" => "east", - ], - "data" => [ - "app1" => [ - "theme" => "default", - ], - ], - ], - ]); - - language: curl - code: - 'curl -X POST -H "Authorization: ApiKey $ELASTIC_API_KEY" -H "Content-Type: application/json" -d - ''{"labels":{"direction":"east"},"data":{"app1":{"theme":"default"}}}'' - "$ELASTICSEARCH_URL/_security/profile/u_P_0BMHgaOK3p7k-PFWUCbw9dQ-UFjt01oWJ_Dp2PmPc_0/_data"' - - language: Java - code: | - client.security().updateUserProfileData(u -> u - .data("app1", JsonData.fromJson("{\"theme\":\"default\"}")) - .labels("direction", JsonData.fromJson("\"east\"")) - .uid("u_P_0BMHgaOK3p7k-PFWUCbw9dQ-UFjt01oWJ_Dp2PmPc_0") - ); diff --git a/specification/shutdown/delete_node/examples/request/ShutdownDeleteNodeRequestExample1.yaml b/specification/shutdown/delete_node/examples/request/ShutdownDeleteNodeRequestExample1.yaml index c4524d927c..cb044b354d 100644 --- a/specification/shutdown/delete_node/examples/request/ShutdownDeleteNodeRequestExample1.yaml +++ b/specification/shutdown/delete_node/examples/request/ShutdownDeleteNodeRequestExample1.yaml @@ -1,29 +1 @@ method_request: DELETE /_nodes/USpTGYaBSIKbgSUJR2Z9lg/shutdown -alternatives: - - language: Python - code: |- - resp = client.shutdown.delete_node( - node_id="USpTGYaBSIKbgSUJR2Z9lg", - ) - - language: JavaScript - code: |- - const response = await client.shutdown.deleteNode({ - node_id: "USpTGYaBSIKbgSUJR2Z9lg", - }); - - language: Ruby - code: |- - response = client.shutdown.delete_node( - node_id: "USpTGYaBSIKbgSUJR2Z9lg" - ) - - language: PHP - code: |- - $resp = $client->shutdown()->deleteNode([ - "node_id" => "USpTGYaBSIKbgSUJR2Z9lg", - ]); - - language: curl - code: 'curl -X DELETE -H "Authorization: ApiKey $ELASTIC_API_KEY" "$ELASTICSEARCH_URL/_nodes/USpTGYaBSIKbgSUJR2Z9lg/shutdown"' - - language: Java - code: | - client.shutdown().deleteNode(d -> d - .nodeId("USpTGYaBSIKbgSUJR2Z9lg") - ); diff --git a/specification/shutdown/get_node/examples/request/ShutdownGetNodeRequestExample1.yaml b/specification/shutdown/get_node/examples/request/ShutdownGetNodeRequestExample1.yaml index a75490777c..0391f2dc2b 100644 --- a/specification/shutdown/get_node/examples/request/ShutdownGetNodeRequestExample1.yaml +++ b/specification/shutdown/get_node/examples/request/ShutdownGetNodeRequestExample1.yaml @@ -1,29 +1 @@ method_request: GET /_nodes/USpTGYaBSIKbgSUJR2Z9lg/shutdown -alternatives: - - language: Python - code: |- - resp = client.shutdown.get_node( - node_id="USpTGYaBSIKbgSUJR2Z9lg", - ) - - language: JavaScript - code: |- - const response = await client.shutdown.getNode({ - node_id: "USpTGYaBSIKbgSUJR2Z9lg", - }); - - language: Ruby - code: |- - response = client.shutdown.get_node( - node_id: "USpTGYaBSIKbgSUJR2Z9lg" - ) - - language: PHP - code: |- - $resp = $client->shutdown()->getNode([ - "node_id" => "USpTGYaBSIKbgSUJR2Z9lg", - ]); - - language: curl - code: 'curl -X GET -H "Authorization: ApiKey $ELASTIC_API_KEY" "$ELASTICSEARCH_URL/_nodes/USpTGYaBSIKbgSUJR2Z9lg/shutdown"' - - language: Java - code: | - client.shutdown().getNode(g -> g - .nodeId("USpTGYaBSIKbgSUJR2Z9lg") - ); diff --git a/specification/shutdown/put_node/examples/request/ShutdownPutNodeRequestExample1.yaml b/specification/shutdown/put_node/examples/request/ShutdownPutNodeRequestExample1.yaml index 7fb729e55e..529575b949 100644 --- a/specification/shutdown/put_node/examples/request/ShutdownPutNodeRequestExample1.yaml +++ b/specification/shutdown/put_node/examples/request/ShutdownPutNodeRequestExample1.yaml @@ -13,53 +13,3 @@ value: "{ \ \"allocation_delay\": \"20m\" }" -alternatives: - - language: Python - code: |- - resp = client.shutdown.put_node( - node_id="USpTGYaBSIKbgSUJR2Z9lg", - type="restart", - reason="Demonstrating how the node shutdown API works", - allocation_delay="20m", - ) - - language: JavaScript - code: |- - const response = await client.shutdown.putNode({ - node_id: "USpTGYaBSIKbgSUJR2Z9lg", - type: "restart", - reason: "Demonstrating how the node shutdown API works", - allocation_delay: "20m", - }); - - language: Ruby - code: |- - response = client.shutdown.put_node( - node_id: "USpTGYaBSIKbgSUJR2Z9lg", - body: { - "type": "restart", - "reason": "Demonstrating how the node shutdown API works", - "allocation_delay": "20m" - } - ) - - language: PHP - code: |- - $resp = $client->shutdown()->putNode([ - "node_id" => "USpTGYaBSIKbgSUJR2Z9lg", - "body" => [ - "type" => "restart", - "reason" => "Demonstrating how the node shutdown API works", - "allocation_delay" => "20m", - ], - ]); - - language: curl - code: - 'curl -X PUT -H "Authorization: ApiKey $ELASTIC_API_KEY" -H "Content-Type: application/json" -d - ''{"type":"restart","reason":"Demonstrating how the node shutdown API works","allocation_delay":"20m"}'' - "$ELASTICSEARCH_URL/_nodes/USpTGYaBSIKbgSUJR2Z9lg/shutdown"' - - language: Java - code: | - client.shutdown().putNode(p -> p - .allocationDelay("20m") - .nodeId("USpTGYaBSIKbgSUJR2Z9lg") - .reason("Demonstrating how the node shutdown API works") - .type(Type.Restart) - ); diff --git a/specification/simulate/ingest/examples/request/SimulateIngestRequestExample1.yaml b/specification/simulate/ingest/examples/request/SimulateIngestRequestExample1.yaml index eed3a471cd..4430f4ea30 100644 --- a/specification/simulate/ingest/examples/request/SimulateIngestRequestExample1.yaml +++ b/specification/simulate/ingest/examples/request/SimulateIngestRequestExample1.yaml @@ -7,112 +7,11 @@ description: # type: request value: docs: - - _id: 123 + - _id: '123' _index: my-index _source: foo: bar - - _id: 456 + - _id: '456' _index: my-index _source: foo: rab -alternatives: - - language: Python - code: |- - resp = client.simulate.ingest( - docs=[ - { - "_id": 123, - "_index": "my-index", - "_source": { - "foo": "bar" - } - }, - { - "_id": 456, - "_index": "my-index", - "_source": { - "foo": "rab" - } - } - ], - ) - - language: JavaScript - code: |- - const response = await client.simulate.ingest({ - docs: [ - { - _id: 123, - _index: "my-index", - _source: { - foo: "bar", - }, - }, - { - _id: 456, - _index: "my-index", - _source: { - foo: "rab", - }, - }, - ], - }); - - language: Ruby - code: |- - response = client.simulate.ingest( - body: { - "docs": [ - { - "_id": 123, - "_index": "my-index", - "_source": { - "foo": "bar" - } - }, - { - "_id": 456, - "_index": "my-index", - "_source": { - "foo": "rab" - } - } - ] - } - ) - - language: PHP - code: |- - $resp = $client->simulate()->ingest([ - "body" => [ - "docs" => array( - [ - "_id" => 123, - "_index" => "my-index", - "_source" => [ - "foo" => "bar", - ], - ], - [ - "_id" => 456, - "_index" => "my-index", - "_source" => [ - "foo" => "rab", - ], - ], - ), - ], - ]); - - language: curl - code: - "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d - '{\"docs\":[{\"_id\":123,\"_index\":\"my-index\",\"_source\":{\"foo\":\"bar\"}},{\"_id\":456,\"_index\":\"my-index\",\"_source\ - \":{\"foo\":\"rab\"}}]}' \"$ELASTICSEARCH_URL/_ingest/_simulate\"" - - language: Java - code: | - client.simulate().ingest(i -> i - .docs(List.of(Document.of(d -> d - .id("123") - .index("my-index") - .source(JsonData.fromJson("{\"foo\":\"bar\"}"))),Document.of(d -> d - .id("456") - .index("my-index") - .source(JsonData.fromJson("{\"foo\":\"rab\"}"))))) - ); diff --git a/specification/simulate/ingest/examples/request/SimulateIngestRequestExample2.yaml b/specification/simulate/ingest/examples/request/SimulateIngestRequestExample2.yaml index 3aa330b5c5..d0e16875b6 100644 --- a/specification/simulate/ingest/examples/request/SimulateIngestRequestExample2.yaml +++ b/specification/simulate/ingest/examples/request/SimulateIngestRequestExample2.yaml @@ -9,11 +9,11 @@ description: value: docs: - _index: my-index - _id: 123 + _id: '123' _source: foo: bar - _index: my-index - _id: 456 + _id: '456' _source: foo: rab pipeline_substitutions: @@ -21,156 +21,3 @@ value: processors: - uppercase: field: foo -alternatives: - - language: Python - code: |- - resp = client.simulate.ingest( - docs=[ - { - "_index": "my-index", - "_id": 123, - "_source": { - "foo": "bar" - } - }, - { - "_index": "my-index", - "_id": 456, - "_source": { - "foo": "rab" - } - } - ], - pipeline_substitutions={ - "my-pipeline": { - "processors": [ - { - "uppercase": { - "field": "foo" - } - } - ] - } - }, - ) - - language: JavaScript - code: |- - const response = await client.simulate.ingest({ - docs: [ - { - _index: "my-index", - _id: 123, - _source: { - foo: "bar", - }, - }, - { - _index: "my-index", - _id: 456, - _source: { - foo: "rab", - }, - }, - ], - pipeline_substitutions: { - "my-pipeline": { - processors: [ - { - uppercase: { - field: "foo", - }, - }, - ], - }, - }, - }); - - language: Ruby - code: |- - response = client.simulate.ingest( - body: { - "docs": [ - { - "_index": "my-index", - "_id": 123, - "_source": { - "foo": "bar" - } - }, - { - "_index": "my-index", - "_id": 456, - "_source": { - "foo": "rab" - } - } - ], - "pipeline_substitutions": { - "my-pipeline": { - "processors": [ - { - "uppercase": { - "field": "foo" - } - } - ] - } - } - } - ) - - language: PHP - code: |- - $resp = $client->simulate()->ingest([ - "body" => [ - "docs" => array( - [ - "_index" => "my-index", - "_id" => 123, - "_source" => [ - "foo" => "bar", - ], - ], - [ - "_index" => "my-index", - "_id" => 456, - "_source" => [ - "foo" => "rab", - ], - ], - ), - "pipeline_substitutions" => [ - "my-pipeline" => [ - "processors" => array( - [ - "uppercase" => [ - "field" => "foo", - ], - ], - ), - ], - ], - ], - ]); - - language: curl - code: - "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d - '{\"docs\":[{\"_index\":\"my-index\",\"_id\":123,\"_source\":{\"foo\":\"bar\"}},{\"_index\":\"my-index\",\"_id\":456,\"_source\ - \":{\"foo\":\"rab\"}}],\"pipeline_substitutions\":{\"my-pipeline\":{\"processors\":[{\"uppercase\":{\"field\":\"foo\"}}]}}}' - \"$ELASTICSEARCH_URL/_ingest/_simulate\"" - - language: Java - code: | - client.simulate().ingest(i -> i - .docs(List.of(Document.of(d -> d - .id("123") - .index("my-index") - .source(JsonData.fromJson("{\"foo\":\"bar\"}"))),Document.of(d -> d - .id("456") - .index("my-index") - .source(JsonData.fromJson("{\"foo\":\"rab\"}"))))) - .pipelineSubstitutions("my-pipeline", p -> p - .processors(pr -> pr - .uppercase(u -> u - .field("foo") - ) - ) - ) - ); diff --git a/specification/simulate/ingest/examples/request/SimulateIngestRequestExample3.yaml b/specification/simulate/ingest/examples/request/SimulateIngestRequestExample3.yaml index b9f2b724a3..0b3081ff61 100644 --- a/specification/simulate/ingest/examples/request/SimulateIngestRequestExample3.yaml +++ b/specification/simulate/ingest/examples/request/SimulateIngestRequestExample3.yaml @@ -42,186 +42,3 @@ value: |- } } } -alternatives: - - language: Python - code: |- - resp = client.simulate.ingest( - docs=[ - { - "_index": "my-index", - "_id": "123", - "_source": { - "foo": "foo" - } - }, - { - "_index": "my-index", - "_id": "456", - "_source": { - "bar": "rab" - } - } - ], - component_template_substitutions={ - "my-mappings_template": { - "template": { - "mappings": { - "dynamic": "strict", - "properties": { - "foo": { - "type": "keyword" - }, - "bar": { - "type": "keyword" - } - } - } - } - } - }, - ) - - language: JavaScript - code: |- - const response = await client.simulate.ingest({ - docs: [ - { - _index: "my-index", - _id: "123", - _source: { - foo: "foo", - }, - }, - { - _index: "my-index", - _id: "456", - _source: { - bar: "rab", - }, - }, - ], - component_template_substitutions: { - "my-mappings_template": { - template: { - mappings: { - dynamic: "strict", - properties: { - foo: { - type: "keyword", - }, - bar: { - type: "keyword", - }, - }, - }, - }, - }, - }, - }); - - language: Ruby - code: |- - response = client.simulate.ingest( - body: { - "docs": [ - { - "_index": "my-index", - "_id": "123", - "_source": { - "foo": "foo" - } - }, - { - "_index": "my-index", - "_id": "456", - "_source": { - "bar": "rab" - } - } - ], - "component_template_substitutions": { - "my-mappings_template": { - "template": { - "mappings": { - "dynamic": "strict", - "properties": { - "foo": { - "type": "keyword" - }, - "bar": { - "type": "keyword" - } - } - } - } - } - } - } - ) - - language: PHP - code: |- - $resp = $client->simulate()->ingest([ - "body" => [ - "docs" => array( - [ - "_index" => "my-index", - "_id" => "123", - "_source" => [ - "foo" => "foo", - ], - ], - [ - "_index" => "my-index", - "_id" => "456", - "_source" => [ - "bar" => "rab", - ], - ], - ), - "component_template_substitutions" => [ - "my-mappings_template" => [ - "template" => [ - "mappings" => [ - "dynamic" => "strict", - "properties" => [ - "foo" => [ - "type" => "keyword", - ], - "bar" => [ - "type" => "keyword", - ], - ], - ], - ], - ], - ], - ], - ]); - - language: curl - code: - "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d - '{\"docs\":[{\"_index\":\"my-index\",\"_id\":\"123\",\"_source\":{\"foo\":\"foo\"}},{\"_index\":\"my-index\",\"_id\":\"456\",\ - \"_source\":{\"bar\":\"rab\"}}],\"component_template_substitutions\":{\"my-mappings_template\":{\"template\":{\"mappings\":{\ - \"dynamic\":\"strict\",\"properties\":{\"foo\":{\"type\":\"keyword\"},\"bar\":{\"type\":\"keyword\"}}}}}}}' - \"$ELASTICSEARCH_URL/_ingest/_simulate\"" - - language: Java - code: | - client.simulate().ingest(i -> i - .componentTemplateSubstitutions("my-mappings_template", c -> c - .template(t -> t - .mappings(m -> m - .dynamic(DynamicMapping.Strict) - .properties(Map.of("bar", Property.of(p -> p - .keyword(k -> k - )),"foo", Property.of(pr -> pr - .keyword(k -> k - )))) - ) - ) - ) - .docs(List.of(Document.of(d -> d - .id("123") - .index("my-index") - .source(JsonData.fromJson("{\"foo\":\"foo\"}"))),Document.of(d -> d - .id("456") - .index("my-index") - .source(JsonData.fromJson("{\"bar\":\"rab\"}"))))) - ); diff --git a/specification/simulate/ingest/examples/request/SimulateIngestRequestExample4.yaml b/specification/simulate/ingest/examples/request/SimulateIngestRequestExample4.yaml index 3bf9cf177e..3863b47248 100644 --- a/specification/simulate/ingest/examples/request/SimulateIngestRequestExample4.yaml +++ b/specification/simulate/ingest/examples/request/SimulateIngestRequestExample4.yaml @@ -43,335 +43,3 @@ value: properties: foo: type: keyword -alternatives: - - language: Python - code: |- - resp = client.simulate.ingest( - docs=[ - { - "_id": "id", - "_index": "my-index", - "_source": { - "foo": "bar" - } - }, - { - "_id": "id", - "_index": "my-index", - "_source": { - "foo": "rab" - } - } - ], - pipeline_substitutions={ - "my-pipeline": { - "processors": [ - { - "set": { - "field": "field3", - "value": "value3" - } - } - ] - } - }, - component_template_substitutions={ - "my-component-template": { - "template": { - "mappings": { - "dynamic": True, - "properties": { - "field3": { - "type": "keyword" - } - } - }, - "settings": { - "index": { - "default_pipeline": "my-pipeline" - } - } - } - } - }, - index_template_substitutions={ - "my-index-template": { - "index_patterns": [ - "my-index-*" - ], - "composed_of": [ - "component_template_1", - "component_template_2" - ] - } - }, - mapping_addition={ - "dynamic": "strict", - "properties": { - "foo": { - "type": "keyword" - } - } - }, - ) - - language: JavaScript - code: |- - const response = await client.simulate.ingest({ - docs: [ - { - _id: "id", - _index: "my-index", - _source: { - foo: "bar", - }, - }, - { - _id: "id", - _index: "my-index", - _source: { - foo: "rab", - }, - }, - ], - pipeline_substitutions: { - "my-pipeline": { - processors: [ - { - set: { - field: "field3", - value: "value3", - }, - }, - ], - }, - }, - component_template_substitutions: { - "my-component-template": { - template: { - mappings: { - dynamic: true, - properties: { - field3: { - type: "keyword", - }, - }, - }, - settings: { - index: { - default_pipeline: "my-pipeline", - }, - }, - }, - }, - }, - index_template_substitutions: { - "my-index-template": { - index_patterns: ["my-index-*"], - composed_of: ["component_template_1", "component_template_2"], - }, - }, - mapping_addition: { - dynamic: "strict", - properties: { - foo: { - type: "keyword", - }, - }, - }, - }); - - language: Ruby - code: |- - response = client.simulate.ingest( - body: { - "docs": [ - { - "_id": "id", - "_index": "my-index", - "_source": { - "foo": "bar" - } - }, - { - "_id": "id", - "_index": "my-index", - "_source": { - "foo": "rab" - } - } - ], - "pipeline_substitutions": { - "my-pipeline": { - "processors": [ - { - "set": { - "field": "field3", - "value": "value3" - } - } - ] - } - }, - "component_template_substitutions": { - "my-component-template": { - "template": { - "mappings": { - "dynamic": true, - "properties": { - "field3": { - "type": "keyword" - } - } - }, - "settings": { - "index": { - "default_pipeline": "my-pipeline" - } - } - } - } - }, - "index_template_substitutions": { - "my-index-template": { - "index_patterns": [ - "my-index-*" - ], - "composed_of": [ - "component_template_1", - "component_template_2" - ] - } - }, - "mapping_addition": { - "dynamic": "strict", - "properties": { - "foo": { - "type": "keyword" - } - } - } - } - ) - - language: PHP - code: |- - $resp = $client->simulate()->ingest([ - "body" => [ - "docs" => array( - [ - "_id" => "id", - "_index" => "my-index", - "_source" => [ - "foo" => "bar", - ], - ], - [ - "_id" => "id", - "_index" => "my-index", - "_source" => [ - "foo" => "rab", - ], - ], - ), - "pipeline_substitutions" => [ - "my-pipeline" => [ - "processors" => array( - [ - "set" => [ - "field" => "field3", - "value" => "value3", - ], - ], - ), - ], - ], - "component_template_substitutions" => [ - "my-component-template" => [ - "template" => [ - "mappings" => [ - "dynamic" => true, - "properties" => [ - "field3" => [ - "type" => "keyword", - ], - ], - ], - "settings" => [ - "index" => [ - "default_pipeline" => "my-pipeline", - ], - ], - ], - ], - ], - "index_template_substitutions" => [ - "my-index-template" => [ - "index_patterns" => array( - "my-index-*", - ), - "composed_of" => array( - "component_template_1", - "component_template_2", - ), - ], - ], - "mapping_addition" => [ - "dynamic" => "strict", - "properties" => [ - "foo" => [ - "type" => "keyword", - ], - ], - ], - ], - ]); - - language: curl - code: - "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d - '{\"docs\":[{\"_id\":\"id\",\"_index\":\"my-index\",\"_source\":{\"foo\":\"bar\"}},{\"_id\":\"id\",\"_index\":\"my-index\",\"\ - _source\":{\"foo\":\"rab\"}}],\"pipeline_substitutions\":{\"my-pipeline\":{\"processors\":[{\"set\":{\"field\":\"field3\",\"v\ - alue\":\"value3\"}}]}},\"component_template_substitutions\":{\"my-component-template\":{\"template\":{\"mappings\":{\"dynamic\ - \":true,\"properties\":{\"field3\":{\"type\":\"keyword\"}}},\"settings\":{\"index\":{\"default_pipeline\":\"my-pipeline\"}}}}\ - },\"index_template_substitutions\":{\"my-index-template\":{\"index_patterns\":[\"my-index-*\"],\"composed_of\":[\"component_t\ - emplate_1\",\"component_template_2\"]}},\"mapping_addition\":{\"dynamic\":\"strict\",\"properties\":{\"foo\":{\"type\":\"keyw\ - ord\"}}}}' \"$ELASTICSEARCH_URL/_ingest/_simulate\"" - - language: Java - code: | - client.simulate().ingest(i -> i - .componentTemplateSubstitutions("my-component-template", c -> c - .template(t -> t - .settings("index", s -> s - .defaultPipeline("my-pipeline") - ) - .mappings(m -> m - .dynamic(DynamicMapping.True) - .properties("field3", p -> p - .keyword(k -> k) - ) - ) - ) - ) - .docs(List.of(Document.of(d -> d - .id("id") - .index("my-index") - .source(JsonData.fromJson("{\"foo\":\"bar\"}"))),Document.of(d -> d - .id("id") - .index("my-index") - .source(JsonData.fromJson("{\"foo\":\"rab\"}"))))) - .indexTemplateSubstitutions("my-index-template", in -> in - .indexPatterns("my-index-*") - .composedOf(List.of("component_template_1","component_template_2")) - ) - .mappingAddition(m -> m - .dynamic(DynamicMapping.Strict) - .properties("foo", p -> p - .keyword(k -> k) - ) - ) - .pipelineSubstitutions("my-pipeline", p -> p - .processors(pr -> pr - .set(s -> s - .field("field3") - .value(JsonData.fromJson("\"value3\"")) - ) - ) - ) - ); diff --git a/specification/slm/delete_lifecycle/examples/request/SlmDeleteLifecycleExample1.yaml b/specification/slm/delete_lifecycle/examples/request/SlmDeleteLifecycleExample1.yaml index 7fde776d3b..b7692f83fb 100644 --- a/specification/slm/delete_lifecycle/examples/request/SlmDeleteLifecycleExample1.yaml +++ b/specification/slm/delete_lifecycle/examples/request/SlmDeleteLifecycleExample1.yaml @@ -1,29 +1 @@ method_request: DELETE /_slm/policy/daily-snapshots -alternatives: - - language: Python - code: |- - resp = client.slm.delete_lifecycle( - policy_id="daily-snapshots", - ) - - language: JavaScript - code: |- - const response = await client.slm.deleteLifecycle({ - policy_id: "daily-snapshots", - }); - - language: Ruby - code: |- - response = client.slm.delete_lifecycle( - policy_id: "daily-snapshots" - ) - - language: PHP - code: |- - $resp = $client->slm()->deleteLifecycle([ - "policy_id" => "daily-snapshots", - ]); - - language: curl - code: 'curl -X DELETE -H "Authorization: ApiKey $ELASTIC_API_KEY" "$ELASTICSEARCH_URL/_slm/policy/daily-snapshots"' - - language: Java - code: | - client.slm().deleteLifecycle(d -> d - .policyId("daily-snapshots") - ); diff --git a/specification/slm/execute_lifecycle/examples/request/ExecuteSnapshotLifecycleRequestExample1.yaml b/specification/slm/execute_lifecycle/examples/request/ExecuteSnapshotLifecycleRequestExample1.yaml index 6c60f61e90..bea4f283d2 100644 --- a/specification/slm/execute_lifecycle/examples/request/ExecuteSnapshotLifecycleRequestExample1.yaml +++ b/specification/slm/execute_lifecycle/examples/request/ExecuteSnapshotLifecycleRequestExample1.yaml @@ -1,29 +1 @@ method_request: PUT /_slm/policy/daily-snapshots/_execute -alternatives: - - language: Python - code: |- - resp = client.slm.execute_lifecycle( - policy_id="daily-snapshots", - ) - - language: JavaScript - code: |- - const response = await client.slm.executeLifecycle({ - policy_id: "daily-snapshots", - }); - - language: Ruby - code: |- - response = client.slm.execute_lifecycle( - policy_id: "daily-snapshots" - ) - - language: PHP - code: |- - $resp = $client->slm()->executeLifecycle([ - "policy_id" => "daily-snapshots", - ]); - - language: curl - code: 'curl -X PUT -H "Authorization: ApiKey $ELASTIC_API_KEY" "$ELASTICSEARCH_URL/_slm/policy/daily-snapshots/_execute"' - - language: Java - code: | - client.slm().executeLifecycle(e -> e - .policyId("daily-snapshots") - ); diff --git a/specification/slm/execute_retention/examples/request/SlmExecuteRetentionExample1.yaml b/specification/slm/execute_retention/examples/request/SlmExecuteRetentionExample1.yaml index 2e98d83de3..baa2e6b8f1 100644 --- a/specification/slm/execute_retention/examples/request/SlmExecuteRetentionExample1.yaml +++ b/specification/slm/execute_retention/examples/request/SlmExecuteRetentionExample1.yaml @@ -1,15 +1 @@ method_request: POST _slm/_execute_retention -alternatives: - - language: Python - code: resp = client.slm.execute_retention() - - language: JavaScript - code: const response = await client.slm.executeRetention(); - - language: Ruby - code: response = client.slm.execute_retention - - language: PHP - code: $resp = $client->slm()->executeRetention(); - - language: curl - code: 'curl -X POST -H "Authorization: ApiKey $ELASTIC_API_KEY" "$ELASTICSEARCH_URL/_slm/_execute_retention"' - - language: Java - code: | - client.slm().executeRetention(e -> e); diff --git a/specification/slm/get_lifecycle/examples/request/GetSnapshotLifecycleRequestExample1.yaml b/specification/slm/get_lifecycle/examples/request/GetSnapshotLifecycleRequestExample1.yaml index b0bf8ec330..9a1979971c 100644 --- a/specification/slm/get_lifecycle/examples/request/GetSnapshotLifecycleRequestExample1.yaml +++ b/specification/slm/get_lifecycle/examples/request/GetSnapshotLifecycleRequestExample1.yaml @@ -1,30 +1 @@ method_request: GET _slm/policy/daily-snapshots?human -alternatives: - - language: Python - code: |- - resp = client.slm.get_lifecycle( - policy_id="daily-snapshots", - human=True, - ) - - language: JavaScript - code: |- - const response = await client.slm.getLifecycle({ - policy_id: "daily-snapshots", - human: "true", - }); - - language: Ruby - code: |- - response = client.slm.get_lifecycle( - policy_id: "daily-snapshots", - human: "true" - ) - - language: PHP - code: |- - $resp = $client->slm()->getLifecycle([ - "policy_id" => "daily-snapshots", - "human" => "true", - ]); - - language: curl - code: 'curl -X GET -H "Authorization: ApiKey $ELASTIC_API_KEY" "$ELASTICSEARCH_URL/_slm/policy/daily-snapshots?human"' - - language: Java - code: "\n" diff --git a/specification/slm/get_stats/examples/request/GetSnapshotLifecycleManagementStatsRequestExample1.yaml b/specification/slm/get_stats/examples/request/GetSnapshotLifecycleManagementStatsRequestExample1.yaml index 4ee2c5db2b..bd0a032ae8 100644 --- a/specification/slm/get_stats/examples/request/GetSnapshotLifecycleManagementStatsRequestExample1.yaml +++ b/specification/slm/get_stats/examples/request/GetSnapshotLifecycleManagementStatsRequestExample1.yaml @@ -1,15 +1 @@ method_request: GET /_slm/stats -alternatives: - - language: Python - code: resp = client.slm.get_stats() - - language: JavaScript - code: const response = await client.slm.getStats(); - - language: Ruby - code: response = client.slm.get_stats - - language: PHP - code: $resp = $client->slm()->getStats(); - - language: curl - code: 'curl -X GET -H "Authorization: ApiKey $ELASTIC_API_KEY" "$ELASTICSEARCH_URL/_slm/stats"' - - language: Java - code: | - client.slm().getStats(g -> g); diff --git a/specification/slm/get_status/examples/request/GetSnapshotLifecycleManagementStatusRequestExample1.yaml b/specification/slm/get_status/examples/request/GetSnapshotLifecycleManagementStatusRequestExample1.yaml index a6793b6e63..7a29eec0e2 100644 --- a/specification/slm/get_status/examples/request/GetSnapshotLifecycleManagementStatusRequestExample1.yaml +++ b/specification/slm/get_status/examples/request/GetSnapshotLifecycleManagementStatusRequestExample1.yaml @@ -1,15 +1 @@ method_request: GET _slm/status -alternatives: - - language: Python - code: resp = client.slm.get_status() - - language: JavaScript - code: const response = await client.slm.getStatus(); - - language: Ruby - code: response = client.slm.get_status - - language: PHP - code: $resp = $client->slm()->getStatus(); - - language: curl - code: 'curl -X GET -H "Authorization: ApiKey $ELASTIC_API_KEY" "$ELASTICSEARCH_URL/_slm/status"' - - language: Java - code: | - client.slm().getStatus(g -> g); diff --git a/specification/slm/put_lifecycle/examples/request/PutSnapshotLifecycleRequestExample1 copy.yaml b/specification/slm/put_lifecycle/examples/request/PutSnapshotLifecycleRequestExample1 copy.yaml index 168a3eb6c9..20d2ad4e72 100644 --- a/specification/slm/put_lifecycle/examples/request/PutSnapshotLifecycleRequestExample1 copy.yaml +++ b/specification/slm/put_lifecycle/examples/request/PutSnapshotLifecycleRequestExample1 copy.yaml @@ -34,116 +34,3 @@ value: "{ \ } }" -alternatives: - - language: Python - code: |- - resp = client.slm.put_lifecycle( - policy_id="daily-snapshots", - schedule="0 30 1 * * ?", - name="", - repository="my_repository", - config={ - "indices": [ - "data-*", - "important" - ], - "ignore_unavailable": False, - "include_global_state": False - }, - retention={ - "expire_after": "30d", - "min_count": 5, - "max_count": 50 - }, - ) - - language: JavaScript - code: |- - const response = await client.slm.putLifecycle({ - policy_id: "daily-snapshots", - schedule: "0 30 1 * * ?", - name: "", - repository: "my_repository", - config: { - indices: ["data-*", "important"], - ignore_unavailable: false, - include_global_state: false, - }, - retention: { - expire_after: "30d", - min_count: 5, - max_count: 50, - }, - }); - - language: Ruby - code: |- - response = client.slm.put_lifecycle( - policy_id: "daily-snapshots", - body: { - "schedule": "0 30 1 * * ?", - "name": "", - "repository": "my_repository", - "config": { - "indices": [ - "data-*", - "important" - ], - "ignore_unavailable": false, - "include_global_state": false - }, - "retention": { - "expire_after": "30d", - "min_count": 5, - "max_count": 50 - } - } - ) - - language: PHP - code: |- - $resp = $client->slm()->putLifecycle([ - "policy_id" => "daily-snapshots", - "body" => [ - "schedule" => "0 30 1 * * ?", - "name" => "", - "repository" => "my_repository", - "config" => [ - "indices" => array( - "data-*", - "important", - ), - "ignore_unavailable" => false, - "include_global_state" => false, - ], - "retention" => [ - "expire_after" => "30d", - "min_count" => 5, - "max_count" => 50, - ], - ], - ]); - - language: curl - code: - "curl -X PUT -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"schedule\":\"0 30 1 * - * - ?\",\"name\":\"\",\"repository\":\"my_repository\",\"config\":{\"indices\":[\"data-*\",\"important\"],\"i\ - gnore_unavailable\":false,\"include_global_state\":false},\"retention\":{\"expire_after\":\"30d\",\"min_count\":5,\"max_count\ - \":50}}' \"$ELASTICSEARCH_URL/_slm/policy/daily-snapshots\"" - - language: Java - code: | - client.slm().putLifecycle(p -> p - .config(c -> c - .ignoreUnavailable(false) - .indices(List.of("data-*","important")) - .includeGlobalState(false) - ) - .name("") - .policyId("daily-snapshots") - .repository("my_repository") - .retention(r -> r - .expireAfter(e -> e - .time("30d") - ) - .maxCount(50) - .minCount(5) - ) - .schedule("0 30 1 * * ?") - ); diff --git a/specification/slm/put_lifecycle/examples/request/PutSnapshotLifecycleRequestExample2.yaml b/specification/slm/put_lifecycle/examples/request/PutSnapshotLifecycleRequestExample2.yaml index 8614799892..7aca2769da 100644 --- a/specification/slm/put_lifecycle/examples/request/PutSnapshotLifecycleRequestExample2.yaml +++ b/specification/slm/put_lifecycle/examples/request/PutSnapshotLifecycleRequestExample2.yaml @@ -14,77 +14,3 @@ value: |- "indices": ["data-*", "important"] } } -alternatives: - - language: Python - code: |- - resp = client.slm.put_lifecycle( - policy_id="hourly-snapshots", - schedule="1h", - name="", - repository="my_repository", - config={ - "indices": [ - "data-*", - "important" - ] - }, - ) - - language: JavaScript - code: |- - const response = await client.slm.putLifecycle({ - policy_id: "hourly-snapshots", - schedule: "1h", - name: "", - repository: "my_repository", - config: { - indices: ["data-*", "important"], - }, - }); - - language: Ruby - code: |- - response = client.slm.put_lifecycle( - policy_id: "hourly-snapshots", - body: { - "schedule": "1h", - "name": "", - "repository": "my_repository", - "config": { - "indices": [ - "data-*", - "important" - ] - } - } - ) - - language: PHP - code: |- - $resp = $client->slm()->putLifecycle([ - "policy_id" => "hourly-snapshots", - "body" => [ - "schedule" => "1h", - "name" => "", - "repository" => "my_repository", - "config" => [ - "indices" => array( - "data-*", - "important", - ), - ], - ], - ]); - - language: curl - code: - "curl -X PUT -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d - '{\"schedule\":\"1h\",\"name\":\"\",\"repository\":\"my_repository\",\"config\":{\"indices\":[\"data-*\",\ - \"important\"]}}' \"$ELASTICSEARCH_URL/_slm/policy/hourly-snapshots\"" - - language: Java - code: | - client.slm().putLifecycle(p -> p - .config(c -> c - .indices(List.of("data-*","important")) - ) - .name("") - .policyId("hourly-snapshots") - .repository("my_repository") - .schedule("1h") - ); diff --git a/specification/slm/start/examples/request/StartSnapshotLifecycleManagementRequestExample1.yaml b/specification/slm/start/examples/request/StartSnapshotLifecycleManagementRequestExample1.yaml index ac32aaca84..d492c9aeb5 100644 --- a/specification/slm/start/examples/request/StartSnapshotLifecycleManagementRequestExample1.yaml +++ b/specification/slm/start/examples/request/StartSnapshotLifecycleManagementRequestExample1.yaml @@ -1,15 +1 @@ method_request: POST _slm/start -alternatives: - - language: Python - code: resp = client.slm.start() - - language: JavaScript - code: const response = await client.slm.start(); - - language: Ruby - code: response = client.slm.start - - language: PHP - code: $resp = $client->slm()->start(); - - language: curl - code: 'curl -X POST -H "Authorization: ApiKey $ELASTIC_API_KEY" "$ELASTICSEARCH_URL/_slm/start"' - - language: Java - code: | - client.slm().start(s -> s); diff --git a/specification/snapshot/cleanup_repository/examples/request/SnapshotCleanupRepositoryRequestExample1.yaml b/specification/snapshot/cleanup_repository/examples/request/SnapshotCleanupRepositoryRequestExample1.yaml index afe718db0d..50442f35ae 100644 --- a/specification/snapshot/cleanup_repository/examples/request/SnapshotCleanupRepositoryRequestExample1.yaml +++ b/specification/snapshot/cleanup_repository/examples/request/SnapshotCleanupRepositoryRequestExample1.yaml @@ -1,29 +1 @@ method_request: POST /_snapshot/my_repository/_cleanup -alternatives: - - language: Python - code: |- - resp = client.snapshot.cleanup_repository( - name="my_repository", - ) - - language: JavaScript - code: |- - const response = await client.snapshot.cleanupRepository({ - name: "my_repository", - }); - - language: Ruby - code: |- - response = client.snapshot.cleanup_repository( - repository: "my_repository" - ) - - language: PHP - code: |- - $resp = $client->snapshot()->cleanupRepository([ - "repository" => "my_repository", - ]); - - language: curl - code: 'curl -X POST -H "Authorization: ApiKey $ELASTIC_API_KEY" "$ELASTICSEARCH_URL/_snapshot/my_repository/_cleanup"' - - language: Java - code: | - client.snapshot().cleanupRepository(c -> c - .name("my_repository") - ); diff --git a/specification/snapshot/clone/examples/request/SnapshotCloneRequestExample1.yaml b/specification/snapshot/clone/examples/request/SnapshotCloneRequestExample1.yaml index a9e23dd61a..229fe75fbd 100644 --- a/specification/snapshot/clone/examples/request/SnapshotCloneRequestExample1.yaml +++ b/specification/snapshot/clone/examples/request/SnapshotCloneRequestExample1.yaml @@ -9,52 +9,3 @@ value: "{ \ \"indices\": \"index_a,index_b\" }" -alternatives: - - language: Python - code: |- - resp = client.snapshot.clone( - repository="my_repository", - snapshot="source_snapshot", - target_snapshot="target_snapshot", - indices="index_a,index_b", - ) - - language: JavaScript - code: |- - const response = await client.snapshot.clone({ - repository: "my_repository", - snapshot: "source_snapshot", - target_snapshot: "target_snapshot", - indices: "index_a,index_b", - }); - - language: Ruby - code: |- - response = client.snapshot.clone( - repository: "my_repository", - snapshot: "source_snapshot", - target_snapshot: "target_snapshot", - body: { - "indices": "index_a,index_b" - } - ) - - language: PHP - code: |- - $resp = $client->snapshot()->clone([ - "repository" => "my_repository", - "snapshot" => "source_snapshot", - "target_snapshot" => "target_snapshot", - "body" => [ - "indices" => "index_a,index_b", - ], - ]); - - language: curl - code: - 'curl -X PUT -H "Authorization: ApiKey $ELASTIC_API_KEY" -H "Content-Type: application/json" -d - ''{"indices":"index_a,index_b"}'' "$ELASTICSEARCH_URL/_snapshot/my_repository/source_snapshot/_clone/target_snapshot"' - - language: Java - code: | - client.snapshot().clone(c -> c - .indices("index_a,index_b") - .repository("my_repository") - .snapshot("source_snapshot") - .targetSnapshot("target_snapshot") - ); diff --git a/specification/snapshot/create/examples/request/SnapshotCreateRequestExample1.yaml b/specification/snapshot/create/examples/request/SnapshotCreateRequestExample1.yaml index 78dd22decb..37eb858120 100644 --- a/specification/snapshot/create/examples/request/SnapshotCreateRequestExample1.yaml +++ b/specification/snapshot/create/examples/request/SnapshotCreateRequestExample1.yaml @@ -19,81 +19,3 @@ value: "{ \ } }" -alternatives: - - language: Python - code: |- - resp = client.snapshot.create( - repository="my_repository", - snapshot="snapshot_2", - wait_for_completion=True, - indices="index_1,index_2", - ignore_unavailable=True, - include_global_state=False, - metadata={ - "taken_by": "user123", - "taken_because": "backup before upgrading" - }, - ) - - language: JavaScript - code: |- - const response = await client.snapshot.create({ - repository: "my_repository", - snapshot: "snapshot_2", - wait_for_completion: "true", - indices: "index_1,index_2", - ignore_unavailable: true, - include_global_state: false, - metadata: { - taken_by: "user123", - taken_because: "backup before upgrading", - }, - }); - - language: Ruby - code: |- - response = client.snapshot.create( - repository: "my_repository", - snapshot: "snapshot_2", - wait_for_completion: "true", - body: { - "indices": "index_1,index_2", - "ignore_unavailable": true, - "include_global_state": false, - "metadata": { - "taken_by": "user123", - "taken_because": "backup before upgrading" - } - } - ) - - language: PHP - code: |- - $resp = $client->snapshot()->create([ - "repository" => "my_repository", - "snapshot" => "snapshot_2", - "wait_for_completion" => "true", - "body" => [ - "indices" => "index_1,index_2", - "ignore_unavailable" => true, - "include_global_state" => false, - "metadata" => [ - "taken_by" => "user123", - "taken_because" => "backup before upgrading", - ], - ], - ]); - - language: curl - code: - "curl -X PUT -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d - '{\"indices\":\"index_1,index_2\",\"ignore_unavailable\":true,\"include_global_state\":false,\"metadata\":{\"taken_by\":\"use\ - r123\",\"taken_because\":\"backup before upgrading\"}}' - \"$ELASTICSEARCH_URL/_snapshot/my_repository/snapshot_2?wait_for_completion=true\"" - - language: Java - code: > - client.snapshot().create(c -> c - .ignoreUnavailable(true) - .includeGlobalState(false) - .indices("index_1,index_2") - .metadata(Map.of("taken_by", JsonData.fromJson("\"user123\""),"taken_because", JsonData.fromJson("\"backup before upgrading\""))) - .repository("my_repository") - .snapshot("snapshot_2") - .waitForCompletion(true) - ); diff --git a/specification/snapshot/create_repository/examples/request/SnapshotCreateRepositoryRequestExample1.yaml b/specification/snapshot/create_repository/examples/request/SnapshotCreateRepositoryRequestExample1.yaml index 70ea0d2093..4b785ad313 100644 --- a/specification/snapshot/create_repository/examples/request/SnapshotCreateRepositoryRequestExample1.yaml +++ b/specification/snapshot/create_repository/examples/request/SnapshotCreateRepositoryRequestExample1.yaml @@ -13,64 +13,3 @@ value: "{ \ } }" -alternatives: - - language: Python - code: |- - resp = client.snapshot.create_repository( - name="my_repository", - repository={ - "type": "fs", - "settings": { - "location": "my_backup_location" - } - }, - ) - - language: JavaScript - code: |- - const response = await client.snapshot.createRepository({ - name: "my_repository", - repository: { - type: "fs", - settings: { - location: "my_backup_location", - }, - }, - }); - - language: Ruby - code: |- - response = client.snapshot.create_repository( - repository: "my_repository", - body: { - "type": "fs", - "settings": { - "location": "my_backup_location" - } - } - ) - - language: PHP - code: |- - $resp = $client->snapshot()->createRepository([ - "repository" => "my_repository", - "body" => [ - "type" => "fs", - "settings" => [ - "location" => "my_backup_location", - ], - ], - ]); - - language: curl - code: - 'curl -X PUT -H "Authorization: ApiKey $ELASTIC_API_KEY" -H "Content-Type: application/json" -d - ''{"type":"fs","settings":{"location":"my_backup_location"}}'' "$ELASTICSEARCH_URL/_snapshot/my_repository"' - - language: Java - code: | - client.snapshot().createRepository(c -> c - .name("my_repository") - .repository(r -> r - .fs(f -> f - .settings(s -> s - .location("my_backup_location") - ) - ) - ) - ); diff --git a/specification/snapshot/create_repository/examples/request/SnapshotCreateRepositoryRequestExample2.yaml b/specification/snapshot/create_repository/examples/request/SnapshotCreateRepositoryRequestExample2.yaml index 8aa32b79cc..06e68da335 100644 --- a/specification/snapshot/create_repository/examples/request/SnapshotCreateRepositoryRequestExample2.yaml +++ b/specification/snapshot/create_repository/examples/request/SnapshotCreateRepositoryRequestExample2.yaml @@ -13,64 +13,3 @@ value: "{ \ } }" -alternatives: - - language: Python - code: |- - resp = client.snapshot.create_repository( - name="my_backup", - repository={ - "type": "azure", - "settings": { - "client": "secondary" - } - }, - ) - - language: JavaScript - code: |- - const response = await client.snapshot.createRepository({ - name: "my_backup", - repository: { - type: "azure", - settings: { - client: "secondary", - }, - }, - }); - - language: Ruby - code: |- - response = client.snapshot.create_repository( - repository: "my_backup", - body: { - "type": "azure", - "settings": { - "client": "secondary" - } - } - ) - - language: PHP - code: |- - $resp = $client->snapshot()->createRepository([ - "repository" => "my_backup", - "body" => [ - "type" => "azure", - "settings" => [ - "client" => "secondary", - ], - ], - ]); - - language: curl - code: - 'curl -X PUT -H "Authorization: ApiKey $ELASTIC_API_KEY" -H "Content-Type: application/json" -d - ''{"type":"azure","settings":{"client":"secondary"}}'' "$ELASTICSEARCH_URL/_snapshot/my_backup"' - - language: Java - code: | - client.snapshot().createRepository(c -> c - .name("my_backup") - .repository(r -> r - .azure(a -> a - .settings(s -> s - .client("secondary") - ) - ) - ) - ); diff --git a/specification/snapshot/create_repository/examples/request/SnapshotCreateRepositoryRequestExample3.yaml b/specification/snapshot/create_repository/examples/request/SnapshotCreateRepositoryRequestExample3.yaml index 71ee4e27d4..296419e9a2 100644 --- a/specification/snapshot/create_repository/examples/request/SnapshotCreateRepositoryRequestExample3.yaml +++ b/specification/snapshot/create_repository/examples/request/SnapshotCreateRepositoryRequestExample3.yaml @@ -15,70 +15,3 @@ value: "{ \ } }" -alternatives: - - language: Python - code: |- - resp = client.snapshot.create_repository( - name="my_gcs_repository", - repository={ - "type": "gcs", - "settings": { - "bucket": "my_other_bucket", - "base_path": "dev" - } - }, - ) - - language: JavaScript - code: |- - const response = await client.snapshot.createRepository({ - name: "my_gcs_repository", - repository: { - type: "gcs", - settings: { - bucket: "my_other_bucket", - base_path: "dev", - }, - }, - }); - - language: Ruby - code: |- - response = client.snapshot.create_repository( - repository: "my_gcs_repository", - body: { - "type": "gcs", - "settings": { - "bucket": "my_other_bucket", - "base_path": "dev" - } - } - ) - - language: PHP - code: |- - $resp = $client->snapshot()->createRepository([ - "repository" => "my_gcs_repository", - "body" => [ - "type" => "gcs", - "settings" => [ - "bucket" => "my_other_bucket", - "base_path" => "dev", - ], - ], - ]); - - language: curl - code: - 'curl -X PUT -H "Authorization: ApiKey $ELASTIC_API_KEY" -H "Content-Type: application/json" -d - ''{"type":"gcs","settings":{"bucket":"my_other_bucket","base_path":"dev"}}'' - "$ELASTICSEARCH_URL/_snapshot/my_gcs_repository"' - - language: Java - code: | - client.snapshot().createRepository(c -> c - .name("my_gcs_repository") - .repository(r -> r - .gcs(g -> g - .settings(s -> s - .bucket("my_other_bucket") - .basePath("dev") - ) - ) - ) - ); diff --git a/specification/snapshot/create_repository/examples/request/SnapshotCreateRepositoryRequestExample4.yaml b/specification/snapshot/create_repository/examples/request/SnapshotCreateRepositoryRequestExample4.yaml index 9259b7de22..bd491f9d8e 100644 --- a/specification/snapshot/create_repository/examples/request/SnapshotCreateRepositoryRequestExample4.yaml +++ b/specification/snapshot/create_repository/examples/request/SnapshotCreateRepositoryRequestExample4.yaml @@ -13,64 +13,3 @@ value: "{ \ } }" -alternatives: - - language: Python - code: |- - resp = client.snapshot.create_repository( - name="my_s3_repository", - repository={ - "type": "s3", - "settings": { - "bucket": "my-bucket" - } - }, - ) - - language: JavaScript - code: |- - const response = await client.snapshot.createRepository({ - name: "my_s3_repository", - repository: { - type: "s3", - settings: { - bucket: "my-bucket", - }, - }, - }); - - language: Ruby - code: |- - response = client.snapshot.create_repository( - repository: "my_s3_repository", - body: { - "type": "s3", - "settings": { - "bucket": "my-bucket" - } - } - ) - - language: PHP - code: |- - $resp = $client->snapshot()->createRepository([ - "repository" => "my_s3_repository", - "body" => [ - "type" => "s3", - "settings" => [ - "bucket" => "my-bucket", - ], - ], - ]); - - language: curl - code: - 'curl -X PUT -H "Authorization: ApiKey $ELASTIC_API_KEY" -H "Content-Type: application/json" -d - ''{"type":"s3","settings":{"bucket":"my-bucket"}}'' "$ELASTICSEARCH_URL/_snapshot/my_s3_repository"' - - language: Java - code: | - client.snapshot().createRepository(c -> c - .name("my_s3_repository") - .repository(r -> r - .s3(s -> s - .settings(se -> se - .bucket("my-bucket") - ) - ) - ) - ); diff --git a/specification/snapshot/create_repository/examples/request/SnapshotCreateRepositoryRequestExample5.yaml b/specification/snapshot/create_repository/examples/request/SnapshotCreateRepositoryRequestExample5.yaml index 6123067a49..0a6daff416 100644 --- a/specification/snapshot/create_repository/examples/request/SnapshotCreateRepositoryRequestExample5.yaml +++ b/specification/snapshot/create_repository/examples/request/SnapshotCreateRepositoryRequestExample5.yaml @@ -15,69 +15,3 @@ value: "{ \ } }" -alternatives: - - language: Python - code: |- - resp = client.snapshot.create_repository( - name="my_src_only_repository", - repository={ - "type": "source", - "settings": { - "delegate_type": "fs", - "location": "my_backup_repository" - } - }, - ) - - language: JavaScript - code: |- - const response = await client.snapshot.createRepository({ - name: "my_src_only_repository", - repository: { - type: "source", - settings: { - delegate_type: "fs", - location: "my_backup_repository", - }, - }, - }); - - language: Ruby - code: |- - response = client.snapshot.create_repository( - repository: "my_src_only_repository", - body: { - "type": "source", - "settings": { - "delegate_type": "fs", - "location": "my_backup_repository" - } - } - ) - - language: PHP - code: |- - $resp = $client->snapshot()->createRepository([ - "repository" => "my_src_only_repository", - "body" => [ - "type" => "source", - "settings" => [ - "delegate_type" => "fs", - "location" => "my_backup_repository", - ], - ], - ]); - - language: curl - code: - 'curl -X PUT -H "Authorization: ApiKey $ELASTIC_API_KEY" -H "Content-Type: application/json" -d - ''{"type":"source","settings":{"delegate_type":"fs","location":"my_backup_repository"}}'' - "$ELASTICSEARCH_URL/_snapshot/my_src_only_repository"' - - language: Java - code: | - client.snapshot().createRepository(c -> c - .name("my_src_only_repository") - .repository(r -> r - .source(s -> s - .settings(se -> se - .delegateType("fs") - ) - ) - ) - ); diff --git a/specification/snapshot/create_repository/examples/request/SnapshotCreateRepositoryRequestExample6.yaml b/specification/snapshot/create_repository/examples/request/SnapshotCreateRepositoryRequestExample6.yaml index 7fb8458cdf..b7f4212f28 100644 --- a/specification/snapshot/create_repository/examples/request/SnapshotCreateRepositoryRequestExample6.yaml +++ b/specification/snapshot/create_repository/examples/request/SnapshotCreateRepositoryRequestExample6.yaml @@ -13,65 +13,3 @@ value: "{ \ } }" -alternatives: - - language: Python - code: |- - resp = client.snapshot.create_repository( - name="my_read_only_url_repository", - repository={ - "type": "url", - "settings": { - "url": "file:/mount/backups/my_fs_backup_location" - } - }, - ) - - language: JavaScript - code: |- - const response = await client.snapshot.createRepository({ - name: "my_read_only_url_repository", - repository: { - type: "url", - settings: { - url: "file:/mount/backups/my_fs_backup_location", - }, - }, - }); - - language: Ruby - code: |- - response = client.snapshot.create_repository( - repository: "my_read_only_url_repository", - body: { - "type": "url", - "settings": { - "url": "file:/mount/backups/my_fs_backup_location" - } - } - ) - - language: PHP - code: |- - $resp = $client->snapshot()->createRepository([ - "repository" => "my_read_only_url_repository", - "body" => [ - "type" => "url", - "settings" => [ - "url" => "file:/mount/backups/my_fs_backup_location", - ], - ], - ]); - - language: curl - code: - 'curl -X PUT -H "Authorization: ApiKey $ELASTIC_API_KEY" -H "Content-Type: application/json" -d - ''{"type":"url","settings":{"url":"file:/mount/backups/my_fs_backup_location"}}'' - "$ELASTICSEARCH_URL/_snapshot/my_read_only_url_repository"' - - language: Java - code: | - client.snapshot().createRepository(c -> c - .name("my_read_only_url_repository") - .repository(r -> r - .url(u -> u - .settings(s -> s - .url("file:/mount/backups/my_fs_backup_location") - ) - ) - ) - ); diff --git a/specification/snapshot/delete/SnapshotDeleteRequest.ts b/specification/snapshot/delete/SnapshotDeleteRequest.ts index 40d06c928a..299dbf6fae 100644 --- a/specification/snapshot/delete/SnapshotDeleteRequest.ts +++ b/specification/snapshot/delete/SnapshotDeleteRequest.ts @@ -55,5 +55,11 @@ export interface Request extends RequestBase { * @server_default 30s */ master_timeout?: Duration + /** + * If `true`, the request returns a response when the matching snapshots are all deleted. + * If `false`, the request returns a response as soon as the deletes are scheduled. + * @server_default true + */ + wait_for_completion?: boolean } } diff --git a/specification/snapshot/delete/examples/request/SnapshotDeleteRequestExample1.yaml b/specification/snapshot/delete/examples/request/SnapshotDeleteRequestExample1.yaml index f54f737c56..ae0b5b6df6 100644 --- a/specification/snapshot/delete/examples/request/SnapshotDeleteRequestExample1.yaml +++ b/specification/snapshot/delete/examples/request/SnapshotDeleteRequestExample1.yaml @@ -1,34 +1 @@ method_request: DELETE /_snapshot/my_repository/snapshot_2,snapshot_3 -alternatives: - - language: Python - code: |- - resp = client.snapshot.delete( - repository="my_repository", - snapshot="snapshot_2,snapshot_3", - ) - - language: JavaScript - code: |- - const response = await client.snapshot.delete({ - repository: "my_repository", - snapshot: "snapshot_2,snapshot_3", - }); - - language: Ruby - code: |- - response = client.snapshot.delete( - repository: "my_repository", - snapshot: "snapshot_2,snapshot_3" - ) - - language: PHP - code: |- - $resp = $client->snapshot()->delete([ - "repository" => "my_repository", - "snapshot" => "snapshot_2,snapshot_3", - ]); - - language: curl - code: 'curl -X DELETE -H "Authorization: ApiKey $ELASTIC_API_KEY" "$ELASTICSEARCH_URL/_snapshot/my_repository/snapshot_2,snapshot_3"' - - language: Java - code: | - client.snapshot().delete(d -> d - .repository("my_repository") - .snapshot("snapshot_2,snapshot_3") - ); diff --git a/specification/snapshot/delete_repository/examples/request/SnapshotDeleteRepositoryExample1.yaml b/specification/snapshot/delete_repository/examples/request/SnapshotDeleteRepositoryExample1.yaml index e1b9e9e10b..e60bd7a306 100644 --- a/specification/snapshot/delete_repository/examples/request/SnapshotDeleteRepositoryExample1.yaml +++ b/specification/snapshot/delete_repository/examples/request/SnapshotDeleteRepositoryExample1.yaml @@ -1,29 +1 @@ method_request: DELETE /_snapshot/my_repository -alternatives: - - language: Python - code: |- - resp = client.snapshot.delete_repository( - name="my_repository", - ) - - language: JavaScript - code: |- - const response = await client.snapshot.deleteRepository({ - name: "my_repository", - }); - - language: Ruby - code: |- - response = client.snapshot.delete_repository( - repository: "my_repository" - ) - - language: PHP - code: |- - $resp = $client->snapshot()->deleteRepository([ - "repository" => "my_repository", - ]); - - language: curl - code: 'curl -X DELETE -H "Authorization: ApiKey $ELASTIC_API_KEY" "$ELASTICSEARCH_URL/_snapshot/my_repository"' - - language: Java - code: | - client.snapshot().deleteRepository(d -> d - .name("my_repository") - ); diff --git a/specification/snapshot/get/examples/request/SnapshotGetRequestExample1.yaml b/specification/snapshot/get/examples/request/SnapshotGetRequestExample1.yaml index c31dd442c2..18780bc2f9 100644 --- a/specification/snapshot/get/examples/request/SnapshotGetRequestExample1.yaml +++ b/specification/snapshot/get/examples/request/SnapshotGetRequestExample1.yaml @@ -1,45 +1 @@ method_request: GET /_snapshot/my_repository/snapshot_*?sort=start_time&from_sort_value=1577833200000 -alternatives: - - language: Python - code: |- - resp = client.snapshot.get( - repository="my_repository", - snapshot="snapshot_*", - sort="start_time", - from_sort_value="1577833200000", - ) - - language: JavaScript - code: |- - const response = await client.snapshot.get({ - repository: "my_repository", - snapshot: "snapshot_*", - sort: "start_time", - from_sort_value: 1577833200000, - }); - - language: Ruby - code: |- - response = client.snapshot.get( - repository: "my_repository", - snapshot: "snapshot_*", - sort: "start_time", - from_sort_value: "1577833200000" - ) - - language: PHP - code: |- - $resp = $client->snapshot()->get([ - "repository" => "my_repository", - "snapshot" => "snapshot_*", - "sort" => "start_time", - "from_sort_value" => "1577833200000", - ]); - - language: curl - code: 'curl -X GET -H "Authorization: ApiKey $ELASTIC_API_KEY" - "$ELASTICSEARCH_URL/_snapshot/my_repository/snapshot_*?sort=start_time&from_sort_value=1577833200000"' - - language: Java - code: | - client.snapshot().get(g -> g - .fromSortValue("1577833200000") - .repository("my_repository") - .snapshot("snapshot_*") - .sort(SnapshotSort.StartTime) - ); diff --git a/specification/snapshot/get_repository/examples/request/SnapshotGetRepositoryRequestExample1.yaml b/specification/snapshot/get_repository/examples/request/SnapshotGetRepositoryRequestExample1.yaml index 2f35df5b8c..b327a9b4d9 100644 --- a/specification/snapshot/get_repository/examples/request/SnapshotGetRepositoryRequestExample1.yaml +++ b/specification/snapshot/get_repository/examples/request/SnapshotGetRepositoryRequestExample1.yaml @@ -1,29 +1 @@ method_request: GET /_snapshot/my_repository -alternatives: - - language: Python - code: |- - resp = client.snapshot.get_repository( - name="my_repository", - ) - - language: JavaScript - code: |- - const response = await client.snapshot.getRepository({ - name: "my_repository", - }); - - language: Ruby - code: |- - response = client.snapshot.get_repository( - repository: "my_repository" - ) - - language: PHP - code: |- - $resp = $client->snapshot()->getRepository([ - "repository" => "my_repository", - ]); - - language: curl - code: 'curl -X GET -H "Authorization: ApiKey $ELASTIC_API_KEY" "$ELASTICSEARCH_URL/_snapshot/my_repository"' - - language: Java - code: | - client.snapshot().getRepository(g -> g - .name("my_repository") - ); diff --git a/specification/snapshot/repository_analyze/examples/request/SnapshotRepositoryAnalyzeRequestExample1.yaml b/specification/snapshot/repository_analyze/examples/request/SnapshotRepositoryAnalyzeRequestExample1.yaml index bdf5060d92..d8348ca32b 100644 --- a/specification/snapshot/repository_analyze/examples/request/SnapshotRepositoryAnalyzeRequestExample1.yaml +++ b/specification/snapshot/repository_analyze/examples/request/SnapshotRepositoryAnalyzeRequestExample1.yaml @@ -2,49 +2,3 @@ summary: Analyze a repository method_request: POST /_snapshot/my_repository/_analyze?blob_count=10&max_blob_size=1mb&timeout=120s type: request description: Analyze `my_repository` by writing 10 blobs of 1mb max. Cancel the test after 2 minutes. -alternatives: - - language: Python - code: |- - resp = client.snapshot.repository_analyze( - name="my_repository", - blob_count="10", - max_blob_size="1mb", - timeout="120s", - ) - - language: JavaScript - code: |- - const response = await client.snapshot.repositoryAnalyze({ - name: "my_repository", - blob_count: 10, - max_blob_size: "1mb", - timeout: "120s", - }); - - language: Ruby - code: |- - response = client.snapshot.repository_analyze( - repository: "my_repository", - blob_count: "10", - max_blob_size: "1mb", - timeout: "120s" - ) - - language: PHP - code: |- - $resp = $client->snapshot()->repositoryAnalyze([ - "repository" => "my_repository", - "blob_count" => "10", - "max_blob_size" => "1mb", - "timeout" => "120s", - ]); - - language: curl - code: 'curl -X POST -H "Authorization: ApiKey $ELASTIC_API_KEY" - "$ELASTICSEARCH_URL/_snapshot/my_repository/_analyze?blob_count=10&max_blob_size=1mb&timeout=120s"' - - language: Java - code: | - client.snapshot().repositoryAnalyze(r -> r - .blobCount(10) - .maxBlobSize("1mb") - .name("my_repository") - .timeout(t -> t - .offset(120) - ) - ); diff --git a/specification/snapshot/repository_verify_integrity/examples/request/SnapshotRepositoryVerifyIntegrityExample1.yaml b/specification/snapshot/repository_verify_integrity/examples/request/SnapshotRepositoryVerifyIntegrityExample1.yaml index 681217fdfb..615f0c9723 100644 --- a/specification/snapshot/repository_verify_integrity/examples/request/SnapshotRepositoryVerifyIntegrityExample1.yaml +++ b/specification/snapshot/repository_verify_integrity/examples/request/SnapshotRepositoryVerifyIntegrityExample1.yaml @@ -1,29 +1 @@ method_request: POST /_snapshot/my_repository/_verify_integrity -alternatives: - - language: Python - code: |- - resp = client.snapshot.repository_verify_integrity( - name="my_repository", - ) - - language: JavaScript - code: |- - const response = await client.snapshot.repositoryVerifyIntegrity({ - name: "my_repository", - }); - - language: Ruby - code: |- - response = client.snapshot.repository_verify_integrity( - repository: "my_repository" - ) - - language: PHP - code: |- - $resp = $client->snapshot()->repositoryVerifyIntegrity([ - "repository" => "my_repository", - ]); - - language: curl - code: 'curl -X POST -H "Authorization: ApiKey $ELASTIC_API_KEY" "$ELASTICSEARCH_URL/_snapshot/my_repository/_verify_integrity"' - - language: Java - code: | - client.snapshot().repositoryVerifyIntegrity(r -> r - .name("my_repository") - ); diff --git a/specification/snapshot/restore/examples/request/SnapshotRestoreRequestExample1.yaml b/specification/snapshot/restore/examples/request/SnapshotRestoreRequestExample1.yaml index ed016c71fc..e98f7bb0da 100644 --- a/specification/snapshot/restore/examples/request/SnapshotRestoreRequestExample1.yaml +++ b/specification/snapshot/restore/examples/request/SnapshotRestoreRequestExample1.yaml @@ -20,79 +20,3 @@ value: "{ \ \"include_aliases\": false }" -alternatives: - - language: Python - code: |- - resp = client.snapshot.restore( - repository="my_repository", - snapshot="snapshot_2", - wait_for_completion=True, - indices="index_1,index_2", - ignore_unavailable=True, - include_global_state=False, - rename_pattern="index_(.+)", - rename_replacement="restored_index_$1", - include_aliases=False, - ) - - language: JavaScript - code: |- - const response = await client.snapshot.restore({ - repository: "my_repository", - snapshot: "snapshot_2", - wait_for_completion: "true", - indices: "index_1,index_2", - ignore_unavailable: true, - include_global_state: false, - rename_pattern: "index_(.+)", - rename_replacement: "restored_index_$1", - include_aliases: false, - }); - - language: Ruby - code: |- - response = client.snapshot.restore( - repository: "my_repository", - snapshot: "snapshot_2", - wait_for_completion: "true", - body: { - "indices": "index_1,index_2", - "ignore_unavailable": true, - "include_global_state": false, - "rename_pattern": "index_(.+)", - "rename_replacement": "restored_index_$1", - "include_aliases": false - } - ) - - language: PHP - code: |- - $resp = $client->snapshot()->restore([ - "repository" => "my_repository", - "snapshot" => "snapshot_2", - "wait_for_completion" => "true", - "body" => [ - "indices" => "index_1,index_2", - "ignore_unavailable" => true, - "include_global_state" => false, - "rename_pattern" => "index_(.+)", - "rename_replacement" => "restored_index_$1", - "include_aliases" => false, - ], - ]); - - language: curl - code: - "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d - '{\"indices\":\"index_1,index_2\",\"ignore_unavailable\":true,\"include_global_state\":false,\"rename_pattern\":\"index_(.+)\ - \",\"rename_replacement\":\"restored_index_$1\",\"include_aliases\":false}' - \"$ELASTICSEARCH_URL/_snapshot/my_repository/snapshot_2/_restore?wait_for_completion=true\"" - - language: Java - code: | - client.snapshot().restore(r -> r - .ignoreUnavailable(true) - .includeAliases(false) - .includeGlobalState(false) - .indices("index_1,index_2") - .renamePattern("index_(.+)") - .renameReplacement("restored_index_$1") - .repository("my_repository") - .snapshot("snapshot_2") - .waitForCompletion(true) - ); diff --git a/specification/snapshot/restore/examples/request/SnapshotRestoreRequestExample2.yaml b/specification/snapshot/restore/examples/request/SnapshotRestoreRequestExample2.yaml index d222394098..9e97f2187a 100644 --- a/specification/snapshot/restore/examples/request/SnapshotRestoreRequestExample2.yaml +++ b/specification/snapshot/restore/examples/request/SnapshotRestoreRequestExample2.yaml @@ -7,35 +7,3 @@ description: > # type: request value: indices: index_1 -alternatives: - - language: Python - code: |- - resp = client.cluster.put_settings( - indices="index_1", - ) - - language: JavaScript - code: |- - const response = await client.cluster.putSettings({ - indices: "index_1", - }); - - language: Ruby - code: |- - response = client.cluster.put_settings( - body: { - "indices": "index_1" - } - ) - - language: PHP - code: |- - $resp = $client->cluster()->putSettings([ - "body" => [ - "indices" => "index_1", - ], - ]); - - language: curl - code: - 'curl -X PUT -H "Authorization: ApiKey $ELASTIC_API_KEY" -H "Content-Type: application/json" -d - ''{"indices":"index_1"}'' "$ELASTICSEARCH_URL/_cluster/settings"' - - language: Java - code: | - client.cluster().putSettings(); diff --git a/specification/snapshot/status/examples/request/SnapshotStatusRequestExample1.yaml b/specification/snapshot/status/examples/request/SnapshotStatusRequestExample1.yaml index fedd0efb48..37d4c3b95d 100644 --- a/specification/snapshot/status/examples/request/SnapshotStatusRequestExample1.yaml +++ b/specification/snapshot/status/examples/request/SnapshotStatusRequestExample1.yaml @@ -1,34 +1 @@ method_request: GET _snapshot/my_repository/snapshot_2/_status -alternatives: - - language: Python - code: |- - resp = client.snapshot.status( - repository="my_repository", - snapshot="snapshot_2", - ) - - language: JavaScript - code: |- - const response = await client.snapshot.status({ - repository: "my_repository", - snapshot: "snapshot_2", - }); - - language: Ruby - code: |- - response = client.snapshot.status( - repository: "my_repository", - snapshot: "snapshot_2" - ) - - language: PHP - code: |- - $resp = $client->snapshot()->status([ - "repository" => "my_repository", - "snapshot" => "snapshot_2", - ]); - - language: curl - code: 'curl -X GET -H "Authorization: ApiKey $ELASTIC_API_KEY" "$ELASTICSEARCH_URL/_snapshot/my_repository/snapshot_2/_status"' - - language: Java - code: | - client.snapshot().status(s -> s - .repository("my_repository") - .snapshot("snapshot_2") - ); diff --git a/specification/snapshot/verify_repository/examples/request/SnapshotVerifyRepositoryExample1.yaml b/specification/snapshot/verify_repository/examples/request/SnapshotVerifyRepositoryExample1.yaml index c99f542fac..3ed8b23d23 100644 --- a/specification/snapshot/verify_repository/examples/request/SnapshotVerifyRepositoryExample1.yaml +++ b/specification/snapshot/verify_repository/examples/request/SnapshotVerifyRepositoryExample1.yaml @@ -1,29 +1 @@ method_request: POST _snapshot/my_unverified_backup/_verify -alternatives: - - language: Python - code: |- - resp = client.snapshot.verify_repository( - name="my_unverified_backup", - ) - - language: JavaScript - code: |- - const response = await client.snapshot.verifyRepository({ - name: "my_unverified_backup", - }); - - language: Ruby - code: |- - response = client.snapshot.verify_repository( - repository: "my_unverified_backup" - ) - - language: PHP - code: |- - $resp = $client->snapshot()->verifyRepository([ - "repository" => "my_unverified_backup", - ]); - - language: curl - code: 'curl -X POST -H "Authorization: ApiKey $ELASTIC_API_KEY" "$ELASTICSEARCH_URL/_snapshot/my_unverified_backup/_verify"' - - language: Java - code: | - client.snapshot().verifyRepository(v -> v - .name("my_unverified_backup") - ); diff --git a/specification/sql/clear_cursor/examples/request/ClearSqlCursorRequestExample1.yaml b/specification/sql/clear_cursor/examples/request/ClearSqlCursorRequestExample1.yaml index dfabd56618..98b8af7101 100644 --- a/specification/sql/clear_cursor/examples/request/ClearSqlCursorRequestExample1.yaml +++ b/specification/sql/clear_cursor/examples/request/ClearSqlCursorRequestExample1.yaml @@ -8,39 +8,3 @@ value: "{ \"sDXF1ZXJ5QW5kRmV0Y2gBAAAAAAAAAAEWYUpOYklQMHhRUEtld3RsNnFtYU1hQQ==:BAFmBGRhdGUBZgVsaWtlcwFzB21lc3NhZ2UBZgR1c2Vy9f///w8=\" }" -alternatives: - - language: Python - code: >- - resp = client.sql.clear_cursor( - cursor="sDXF1ZXJ5QW5kRmV0Y2gBAAAAAAAAAAEWYUpOYklQMHhRUEtld3RsNnFtYU1hQQ==:BAFmBGRhdGUBZgVsaWtlcwFzB21lc3NhZ2UBZgR1c2Vy9f///w8=", - ) - - language: JavaScript - code: |- - const response = await client.sql.clearCursor({ - cursor: - "sDXF1ZXJ5QW5kRmV0Y2gBAAAAAAAAAAEWYUpOYklQMHhRUEtld3RsNnFtYU1hQQ==:BAFmBGRhdGUBZgVsaWtlcwFzB21lc3NhZ2UBZgR1c2Vy9f///w8=", - }); - - language: Ruby - code: >- - response = client.sql.clear_cursor( - body: { - "cursor": "sDXF1ZXJ5QW5kRmV0Y2gBAAAAAAAAAAEWYUpOYklQMHhRUEtld3RsNnFtYU1hQQ==:BAFmBGRhdGUBZgVsaWtlcwFzB21lc3NhZ2UBZgR1c2Vy9f///w8=" - } - ) - - language: PHP - code: >- - $resp = $client->sql()->clearCursor([ - "body" => [ - "cursor" => "sDXF1ZXJ5QW5kRmV0Y2gBAAAAAAAAAAEWYUpOYklQMHhRUEtld3RsNnFtYU1hQQ==:BAFmBGRhdGUBZgVsaWtlcwFzB21lc3NhZ2UBZgR1c2Vy9f///w8=", - ], - ]); - - language: curl - code: - "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d - '{\"cursor\":\"sDXF1ZXJ5QW5kRmV0Y2gBAAAAAAAAAAEWYUpOYklQMHhRUEtld3RsNnFtYU1hQQ==:BAFmBGRhdGUBZgVsaWtlcwFzB21lc3NhZ2UBZgR1c2Vy\ - 9f///w8=\"}' \"$ELASTICSEARCH_URL/_sql/close\"" - - language: Java - code: > - client.sql().clearCursor(c -> c - .cursor("sDXF1ZXJ5QW5kRmV0Y2gBAAAAAAAAAAEWYUpOYklQMHhRUEtld3RsNnFtYU1hQQ==:BAFmBGRhdGUBZgVsaWtlcwFzB21lc3NhZ2UBZgR1c2Vy9f///w8=") - ); diff --git a/specification/sql/delete_async/examples/request/SqlDeleteAsyncExample1.yaml b/specification/sql/delete_async/examples/request/SqlDeleteAsyncExample1.yaml index e5e430e9a4..20507060b5 100644 --- a/specification/sql/delete_async/examples/request/SqlDeleteAsyncExample1.yaml +++ b/specification/sql/delete_async/examples/request/SqlDeleteAsyncExample1.yaml @@ -1,30 +1 @@ method_request: DELETE _sql/async/delete/FmdMX2pIang3UWhLRU5QS0lqdlppYncaMUpYQ05oSkpTc3kwZ21EdC1tbFJXQToxOTI= -alternatives: - - language: Python - code: |- - resp = client.sql.delete_async( - id="FmdMX2pIang3UWhLRU5QS0lqdlppYncaMUpYQ05oSkpTc3kwZ21EdC1tbFJXQToxOTI=", - ) - - language: JavaScript - code: |- - const response = await client.sql.deleteAsync({ - id: "FmdMX2pIang3UWhLRU5QS0lqdlppYncaMUpYQ05oSkpTc3kwZ21EdC1tbFJXQToxOTI=", - }); - - language: Ruby - code: |- - response = client.sql.delete_async( - id: "FmdMX2pIang3UWhLRU5QS0lqdlppYncaMUpYQ05oSkpTc3kwZ21EdC1tbFJXQToxOTI=" - ) - - language: PHP - code: |- - $resp = $client->sql()->deleteAsync([ - "id" => "FmdMX2pIang3UWhLRU5QS0lqdlppYncaMUpYQ05oSkpTc3kwZ21EdC1tbFJXQToxOTI=", - ]); - - language: curl - code: 'curl -X DELETE -H "Authorization: ApiKey $ELASTIC_API_KEY" - "$ELASTICSEARCH_URL/_sql/async/delete/FmdMX2pIang3UWhLRU5QS0lqdlppYncaMUpYQ05oSkpTc3kwZ21EdC1tbFJXQToxOTI="' - - language: Java - code: | - client.sql().deleteAsync(d -> d - .id("FmdMX2pIang3UWhLRU5QS0lqdlppYncaMUpYQ05oSkpTc3kwZ21EdC1tbFJXQToxOTI=") - ); diff --git a/specification/sql/get_async/examples/request/SqlGetAsyncExample1.yaml b/specification/sql/get_async/examples/request/SqlGetAsyncExample1.yaml index 49326703a0..24bc18cf81 100644 --- a/specification/sql/get_async/examples/request/SqlGetAsyncExample1.yaml +++ b/specification/sql/get_async/examples/request/SqlGetAsyncExample1.yaml @@ -1,42 +1 @@ method_request: GET _sql/async/FnR0TDhyWUVmUmVtWXRWZER4MXZiNFEad2F5UDk2ZVdTVHV1S0xDUy00SklUdzozMTU=?wait_for_completion_timeout=2s&format=json -alternatives: - - language: Python - code: |- - resp = client.sql.get_async( - id="FnR0TDhyWUVmUmVtWXRWZER4MXZiNFEad2F5UDk2ZVdTVHV1S0xDUy00SklUdzozMTU=", - wait_for_completion_timeout="2s", - format="json", - ) - - language: JavaScript - code: |- - const response = await client.sql.getAsync({ - id: "FnR0TDhyWUVmUmVtWXRWZER4MXZiNFEad2F5UDk2ZVdTVHV1S0xDUy00SklUdzozMTU=", - wait_for_completion_timeout: "2s", - format: "json", - }); - - language: Ruby - code: |- - response = client.sql.get_async( - id: "FnR0TDhyWUVmUmVtWXRWZER4MXZiNFEad2F5UDk2ZVdTVHV1S0xDUy00SklUdzozMTU=", - wait_for_completion_timeout: "2s", - format: "json" - ) - - language: PHP - code: |- - $resp = $client->sql()->getAsync([ - "id" => "FnR0TDhyWUVmUmVtWXRWZER4MXZiNFEad2F5UDk2ZVdTVHV1S0xDUy00SklUdzozMTU=", - "wait_for_completion_timeout" => "2s", - "format" => "json", - ]); - - language: curl - code: 'curl -X GET -H "Authorization: ApiKey $ELASTIC_API_KEY" - "$ELASTICSEARCH_URL/_sql/async/FnR0TDhyWUVmUmVtWXRWZER4MXZiNFEad2F5UDk2ZVdTVHV1S0xDUy00SklUdzozMTU=?wait_for_completion_timeout=2s&format=json"' - - language: Java - code: | - client.sql().getAsync(g -> g - .format("json") - .id("FnR0TDhyWUVmUmVtWXRWZER4MXZiNFEad2F5UDk2ZVdTVHV1S0xDUy00SklUdzozMTU=") - .waitForCompletionTimeout(w -> w - .offset(2) - ) - ); diff --git a/specification/sql/get_async_status/examples/request/SqlGetAsyncStatusExample1.yaml b/specification/sql/get_async_status/examples/request/SqlGetAsyncStatusExample1.yaml index b9f9f3efc4..26d6c9f359 100644 --- a/specification/sql/get_async_status/examples/request/SqlGetAsyncStatusExample1.yaml +++ b/specification/sql/get_async_status/examples/request/SqlGetAsyncStatusExample1.yaml @@ -1,30 +1 @@ method_request: GET _sql/async/status/FnR0TDhyWUVmUmVtWXRWZER4MXZiNFEad2F5UDk2ZVdTVHV1S0xDUy00SklUdzozMTU= -alternatives: - - language: Python - code: |- - resp = client.sql.get_async_status( - id="FnR0TDhyWUVmUmVtWXRWZER4MXZiNFEad2F5UDk2ZVdTVHV1S0xDUy00SklUdzozMTU=", - ) - - language: JavaScript - code: |- - const response = await client.sql.getAsyncStatus({ - id: "FnR0TDhyWUVmUmVtWXRWZER4MXZiNFEad2F5UDk2ZVdTVHV1S0xDUy00SklUdzozMTU=", - }); - - language: Ruby - code: |- - response = client.sql.get_async_status( - id: "FnR0TDhyWUVmUmVtWXRWZER4MXZiNFEad2F5UDk2ZVdTVHV1S0xDUy00SklUdzozMTU=" - ) - - language: PHP - code: |- - $resp = $client->sql()->getAsyncStatus([ - "id" => "FnR0TDhyWUVmUmVtWXRWZER4MXZiNFEad2F5UDk2ZVdTVHV1S0xDUy00SklUdzozMTU=", - ]); - - language: curl - code: 'curl -X GET -H "Authorization: ApiKey $ELASTIC_API_KEY" - "$ELASTICSEARCH_URL/_sql/async/status/FnR0TDhyWUVmUmVtWXRWZER4MXZiNFEad2F5UDk2ZVdTVHV1S0xDUy00SklUdzozMTU="' - - language: Java - code: | - client.sql().getAsyncStatus(g -> g - .id("FnR0TDhyWUVmUmVtWXRWZER4MXZiNFEad2F5UDk2ZVdTVHV1S0xDUy00SklUdzozMTU=") - ); diff --git a/specification/sql/query/QuerySqlRequest.ts b/specification/sql/query/QuerySqlRequest.ts index 1a8bde5974..a32c279833 100644 --- a/specification/sql/query/QuerySqlRequest.ts +++ b/specification/sql/query/QuerySqlRequest.ts @@ -22,7 +22,6 @@ import { RuntimeFields } from '@_types/mapping/RuntimeFields' import { integer } from '@_types/Numeric' import { QueryContainer } from '@_types/query_dsl/abstractions' import { Duration, TimeZone } from '@_types/Time' -import { Dictionary } from '@spec_utils/Dictionary' import { UserDefinedValue } from '@spec_utils/UserDefinedValue' /** @@ -118,7 +117,7 @@ export interface Request extends RequestBase { /** * The values for parameters in the query. */ - params?: Dictionary + params?: UserDefinedValue[] /** * The SQL query to run. * @ext_doc_id sql-spec diff --git a/specification/sql/query/examples/request/QuerySqlRequestExample1.yaml b/specification/sql/query/examples/request/QuerySqlRequestExample1.yaml index f44edbacb7..878db33a1b 100644 --- a/specification/sql/query/examples/request/QuerySqlRequestExample1.yaml +++ b/specification/sql/query/examples/request/QuerySqlRequestExample1.yaml @@ -7,42 +7,3 @@ value: "{ \ \"query\": \"SELECT * FROM library ORDER BY page_count DESC LIMIT 5\" }" -alternatives: - - language: Python - code: |- - resp = client.sql.query( - format="txt", - query="SELECT * FROM library ORDER BY page_count DESC LIMIT 5", - ) - - language: JavaScript - code: |- - const response = await client.sql.query({ - format: "txt", - query: "SELECT * FROM library ORDER BY page_count DESC LIMIT 5", - }); - - language: Ruby - code: |- - response = client.sql.query( - format: "txt", - body: { - "query": "SELECT * FROM library ORDER BY page_count DESC LIMIT 5" - } - ) - - language: PHP - code: |- - $resp = $client->sql()->query([ - "format" => "txt", - "body" => [ - "query" => "SELECT * FROM library ORDER BY page_count DESC LIMIT 5", - ], - ]); - - language: curl - code: - 'curl -X POST -H "Authorization: ApiKey $ELASTIC_API_KEY" -H "Content-Type: application/json" -d ''{"query":"SELECT * - FROM library ORDER BY page_count DESC LIMIT 5"}'' "$ELASTICSEARCH_URL/_sql?format=txt"' - - language: Java - code: | - client.sql().query(q -> q - .format(SqlFormat.Txt) - .query("SELECT * FROM library ORDER BY page_count DESC LIMIT 5") - ); diff --git a/specification/sql/translate/examples/request/TranslateSqlRequestExample1.yaml b/specification/sql/translate/examples/request/TranslateSqlRequestExample1.yaml index 1c4df256a9..e056f35250 100644 --- a/specification/sql/translate/examples/request/TranslateSqlRequestExample1.yaml +++ b/specification/sql/translate/examples/request/TranslateSqlRequestExample1.yaml @@ -9,42 +9,3 @@ value: "{ \ \"fetch_size\": 10 }" -alternatives: - - language: Python - code: |- - resp = client.sql.translate( - query="SELECT * FROM library ORDER BY page_count DESC", - fetch_size=10, - ) - - language: JavaScript - code: |- - const response = await client.sql.translate({ - query: "SELECT * FROM library ORDER BY page_count DESC", - fetch_size: 10, - }); - - language: Ruby - code: |- - response = client.sql.translate( - body: { - "query": "SELECT * FROM library ORDER BY page_count DESC", - "fetch_size": 10 - } - ) - - language: PHP - code: |- - $resp = $client->sql()->translate([ - "body" => [ - "query" => "SELECT * FROM library ORDER BY page_count DESC", - "fetch_size" => 10, - ], - ]); - - language: curl - code: - 'curl -X POST -H "Authorization: ApiKey $ELASTIC_API_KEY" -H "Content-Type: application/json" -d ''{"query":"SELECT * - FROM library ORDER BY page_count DESC","fetch_size":10}'' "$ELASTICSEARCH_URL/_sql/translate"' - - language: Java - code: | - client.sql().translate(t -> t - .fetchSize(10) - .query("SELECT * FROM library ORDER BY page_count DESC") - ); diff --git a/specification/ssl/certificates/examples/request/GetCertificatesRequestExample1.yaml b/specification/ssl/certificates/examples/request/GetCertificatesRequestExample1.yaml index 63f231f759..175c6df797 100644 --- a/specification/ssl/certificates/examples/request/GetCertificatesRequestExample1.yaml +++ b/specification/ssl/certificates/examples/request/GetCertificatesRequestExample1.yaml @@ -1,15 +1 @@ method_request: GET /_ssl/certificates -alternatives: - - language: Python - code: resp = client.ssl.certificates() - - language: JavaScript - code: const response = await client.ssl.certificates(); - - language: Ruby - code: response = client.ssl.certificates - - language: PHP - code: $resp = $client->ssl()->certificates(); - - language: curl - code: 'curl -X GET -H "Authorization: ApiKey $ELASTIC_API_KEY" "$ELASTICSEARCH_URL/_ssl/certificates"' - - language: Java - code: | - client.ssl().certificates(); diff --git a/specification/synonyms/delete_synonym/examples/request/SynonymsDeleteSynonymExample1.yaml b/specification/synonyms/delete_synonym/examples/request/SynonymsDeleteSynonymExample1.yaml index 67fc631405..6950eb1400 100644 --- a/specification/synonyms/delete_synonym/examples/request/SynonymsDeleteSynonymExample1.yaml +++ b/specification/synonyms/delete_synonym/examples/request/SynonymsDeleteSynonymExample1.yaml @@ -1,29 +1 @@ method_request: DELETE _synonyms/my-synonyms-set -alternatives: - - language: Python - code: |- - resp = client.synonyms.delete_synonym( - id="my-synonyms-set", - ) - - language: JavaScript - code: |- - const response = await client.synonyms.deleteSynonym({ - id: "my-synonyms-set", - }); - - language: Ruby - code: |- - response = client.synonyms.delete_synonym( - id: "my-synonyms-set" - ) - - language: PHP - code: |- - $resp = $client->synonyms()->deleteSynonym([ - "id" => "my-synonyms-set", - ]); - - language: curl - code: 'curl -X DELETE -H "Authorization: ApiKey $ELASTIC_API_KEY" "$ELASTICSEARCH_URL/_synonyms/my-synonyms-set"' - - language: Java - code: | - client.synonyms().deleteSynonym(d -> d - .id("my-synonyms-set") - ); diff --git a/specification/synonyms/delete_synonym_rule/examples/request/SynonymRuleDeleteRequestExample1.yaml b/specification/synonyms/delete_synonym_rule/examples/request/SynonymRuleDeleteRequestExample1.yaml index d30502fee9..c5704a7c19 100644 --- a/specification/synonyms/delete_synonym_rule/examples/request/SynonymRuleDeleteRequestExample1.yaml +++ b/specification/synonyms/delete_synonym_rule/examples/request/SynonymRuleDeleteRequestExample1.yaml @@ -1,34 +1 @@ method_request: DELETE _synonyms/my-synonyms-set/test-1 -alternatives: - - language: Python - code: |- - resp = client.synonyms.delete_synonym_rule( - set_id="my-synonyms-set", - rule_id="test-1", - ) - - language: JavaScript - code: |- - const response = await client.synonyms.deleteSynonymRule({ - set_id: "my-synonyms-set", - rule_id: "test-1", - }); - - language: Ruby - code: |- - response = client.synonyms.delete_synonym_rule( - set_id: "my-synonyms-set", - rule_id: "test-1" - ) - - language: PHP - code: |- - $resp = $client->synonyms()->deleteSynonymRule([ - "set_id" => "my-synonyms-set", - "rule_id" => "test-1", - ]); - - language: curl - code: 'curl -X DELETE -H "Authorization: ApiKey $ELASTIC_API_KEY" "$ELASTICSEARCH_URL/_synonyms/my-synonyms-set/test-1"' - - language: Java - code: | - client.synonyms().deleteSynonymRule(d -> d - .ruleId("test-1") - .setId("my-synonyms-set") - ); diff --git a/specification/synonyms/get_synonym/examples/request/SynonymsGetRequestExample1.yaml b/specification/synonyms/get_synonym/examples/request/SynonymsGetRequestExample1.yaml index 58514bb163..384a86fcc2 100644 --- a/specification/synonyms/get_synonym/examples/request/SynonymsGetRequestExample1.yaml +++ b/specification/synonyms/get_synonym/examples/request/SynonymsGetRequestExample1.yaml @@ -1,29 +1 @@ method_request: GET _synonyms/my-synonyms-set -alternatives: - - language: Python - code: |- - resp = client.synonyms.get_synonym( - id="my-synonyms-set", - ) - - language: JavaScript - code: |- - const response = await client.synonyms.getSynonym({ - id: "my-synonyms-set", - }); - - language: Ruby - code: |- - response = client.synonyms.get_synonym( - id: "my-synonyms-set" - ) - - language: PHP - code: |- - $resp = $client->synonyms()->getSynonym([ - "id" => "my-synonyms-set", - ]); - - language: curl - code: 'curl -X GET -H "Authorization: ApiKey $ELASTIC_API_KEY" "$ELASTICSEARCH_URL/_synonyms/my-synonyms-set"' - - language: Java - code: | - client.synonyms().getSynonym(g -> g - .id("my-synonyms-set") - ); diff --git a/specification/synonyms/get_synonym_rule/examples/request/SynonymRuleGetRequestExample1.yaml b/specification/synonyms/get_synonym_rule/examples/request/SynonymRuleGetRequestExample1.yaml index 803a858395..05284fc243 100644 --- a/specification/synonyms/get_synonym_rule/examples/request/SynonymRuleGetRequestExample1.yaml +++ b/specification/synonyms/get_synonym_rule/examples/request/SynonymRuleGetRequestExample1.yaml @@ -1,34 +1 @@ method_request: GET _synonyms/my-synonyms-set/test-1 -alternatives: - - language: Python - code: |- - resp = client.synonyms.get_synonym_rule( - set_id="my-synonyms-set", - rule_id="test-1", - ) - - language: JavaScript - code: |- - const response = await client.synonyms.getSynonymRule({ - set_id: "my-synonyms-set", - rule_id: "test-1", - }); - - language: Ruby - code: |- - response = client.synonyms.get_synonym_rule( - set_id: "my-synonyms-set", - rule_id: "test-1" - ) - - language: PHP - code: |- - $resp = $client->synonyms()->getSynonymRule([ - "set_id" => "my-synonyms-set", - "rule_id" => "test-1", - ]); - - language: curl - code: 'curl -X GET -H "Authorization: ApiKey $ELASTIC_API_KEY" "$ELASTICSEARCH_URL/_synonyms/my-synonyms-set/test-1"' - - language: Java - code: | - client.synonyms().getSynonymRule(g -> g - .ruleId("test-1") - .setId("my-synonyms-set") - ); diff --git a/specification/synonyms/get_synonyms_sets/examples/request/SynonymsSetsGetRequestExample1.yaml b/specification/synonyms/get_synonyms_sets/examples/request/SynonymsSetsGetRequestExample1.yaml index 35ea609fad..0b019af6ed 100644 --- a/specification/synonyms/get_synonyms_sets/examples/request/SynonymsSetsGetRequestExample1.yaml +++ b/specification/synonyms/get_synonyms_sets/examples/request/SynonymsSetsGetRequestExample1.yaml @@ -1,15 +1 @@ method_request: GET _synonyms -alternatives: - - language: Python - code: resp = client.synonyms.get_synonyms_sets() - - language: JavaScript - code: const response = await client.synonyms.getSynonymsSets(); - - language: Ruby - code: response = client.synonyms.get_synonyms_sets - - language: PHP - code: $resp = $client->synonyms()->getSynonymsSets(); - - language: curl - code: 'curl -X GET -H "Authorization: ApiKey $ELASTIC_API_KEY" "$ELASTICSEARCH_URL/_synonyms"' - - language: Java - code: | - client.synonyms().getSynonymsSets(g -> g); diff --git a/specification/synonyms/put_synonym/SynonymsPutRequest.ts b/specification/synonyms/put_synonym/SynonymsPutRequest.ts index 809c5d0a11..5408b22e6b 100644 --- a/specification/synonyms/put_synonym/SynonymsPutRequest.ts +++ b/specification/synonyms/put_synonym/SynonymsPutRequest.ts @@ -27,11 +27,14 @@ import { SynonymRule } from '../_types/SynonymRule' * * When an existing synonyms set is updated, the search analyzers that use the synonyms set are reloaded automatically for all indices. * This is equivalent to invoking the reload search analyzers API for all indices that use the synonyms set. + * + * For practical examples of how to create or update a synonyms set, refer to the External documentation. * @rest_spec_name synonyms.put_synonym * @availability stack since=8.10.0 stability=stable * @availability serverless stability=stable visibility=public * @cluster_privileges manage_search_synonyms * @doc_id synonym-set-create + * @ext_doc_id synonym-api-examples */ export interface Request extends RequestBase { urls: [ diff --git a/specification/synonyms/put_synonym/examples/request/SynonymsPutRequestExample1.yaml b/specification/synonyms/put_synonym/examples/request/SynonymsPutRequestExample1.yaml index 62e162b3c3..333ab6f65f 100644 --- a/specification/synonyms/put_synonym/examples/request/SynonymsPutRequestExample1.yaml +++ b/specification/synonyms/put_synonym/examples/request/SynonymsPutRequestExample1.yaml @@ -1,24 +1 @@ method_request: PUT _synonyms/my-synonyms-set -alternatives: - - language: Python - code: |- - resp = client.synonyms.put_synonym( - id="my-synonyms-set", - ) - - language: JavaScript - code: |- - const response = await client.synonyms.putSynonym({ - id: "my-synonyms-set", - }); - - language: Ruby - code: |- - response = client.synonyms.put_synonym( - id: "my-synonyms-set" - ) - - language: PHP - code: |- - $resp = $client->synonyms()->putSynonym([ - "id" => "my-synonyms-set", - ]); - - language: curl - code: 'curl -X PUT -H "Authorization: ApiKey $ELASTIC_API_KEY" "$ELASTICSEARCH_URL/_synonyms/my-synonyms-set"' diff --git a/specification/synonyms/put_synonym_rule/examples/request/SynonymRulePutRequestExample1.yaml b/specification/synonyms/put_synonym_rule/examples/request/SynonymRulePutRequestExample1.yaml index ce251be05c..560c2efa54 100644 --- a/specification/synonyms/put_synonym_rule/examples/request/SynonymRulePutRequestExample1.yaml +++ b/specification/synonyms/put_synonym_rule/examples/request/SynonymRulePutRequestExample1.yaml @@ -7,47 +7,3 @@ value: "{ \ \"synonyms\": \"hello, hi, howdy\" }" -alternatives: - - language: Python - code: |- - resp = client.synonyms.put_synonym_rule( - set_id="my-synonyms-set", - rule_id="test-1", - synonyms="hello, hi, howdy", - ) - - language: JavaScript - code: |- - const response = await client.synonyms.putSynonymRule({ - set_id: "my-synonyms-set", - rule_id: "test-1", - synonyms: "hello, hi, howdy", - }); - - language: Ruby - code: |- - response = client.synonyms.put_synonym_rule( - set_id: "my-synonyms-set", - rule_id: "test-1", - body: { - "synonyms": "hello, hi, howdy" - } - ) - - language: PHP - code: |- - $resp = $client->synonyms()->putSynonymRule([ - "set_id" => "my-synonyms-set", - "rule_id" => "test-1", - "body" => [ - "synonyms" => "hello, hi, howdy", - ], - ]); - - language: curl - code: - 'curl -X PUT -H "Authorization: ApiKey $ELASTIC_API_KEY" -H "Content-Type: application/json" -d ''{"synonyms":"hello, - hi, howdy"}'' "$ELASTICSEARCH_URL/_synonyms/my-synonyms-set/test-1"' - - language: Java - code: | - client.synonyms().putSynonymRule(p -> p - .ruleId("test-1") - .setId("my-synonyms-set") - .synonyms("hello, hi, howdy") - ); diff --git a/specification/tasks/cancel/examples/request/TasksCancelExample1.yaml b/specification/tasks/cancel/examples/request/TasksCancelExample1.yaml index 862aee62b6..b286e870fa 100644 --- a/specification/tasks/cancel/examples/request/TasksCancelExample1.yaml +++ b/specification/tasks/cancel/examples/request/TasksCancelExample1.yaml @@ -1,29 +1 @@ method_request: POST _tasks//_cancel -alternatives: - - language: Python - code: |- - resp = client.tasks.cancel( - task_id="", - ) - - language: JavaScript - code: |- - const response = await client.tasks.cancel({ - task_id: "", - }); - - language: Ruby - code: |- - response = client.tasks.cancel( - task_id: "" - ) - - language: PHP - code: |- - $resp = $client->tasks()->cancel([ - "task_id" => "", - ]); - - language: curl - code: 'curl -X POST -H "Authorization: ApiKey $ELASTIC_API_KEY" "$ELASTICSEARCH_URL/_tasks//_cancel"' - - language: Java - code: | - client.tasks().cancel(c -> c - .taskId("") - ); diff --git a/specification/tasks/get/examples/request/GetTaskRequestExample2.yaml b/specification/tasks/get/examples/request/GetTaskRequestExample2.yaml index 2866cc7023..7e7484325d 100644 --- a/specification/tasks/get/examples/request/GetTaskRequestExample2.yaml +++ b/specification/tasks/get/examples/request/GetTaskRequestExample2.yaml @@ -1,28 +1 @@ method_request: GET _tasks?detailed=true&actions=*/delete/byquery -alternatives: - - language: Python - code: |- - resp = client.tasks.list( - detailed=True, - actions="*/delete/byquery", - ) - - language: JavaScript - code: |- - const response = await client.tasks.list({ - detailed: "true", - actions: "*/delete/byquery", - }); - - language: Ruby - code: |- - response = client.tasks.list( - detailed: "true", - actions: "*/delete/byquery" - ) - - language: PHP - code: |- - $resp = $client->tasks()->list([ - "detailed" => "true", - "actions" => "*/delete/byquery", - ]); - - language: curl - code: 'curl -X GET -H "Authorization: ApiKey $ELASTIC_API_KEY" "$ELASTICSEARCH_URL/_tasks?detailed=true&actions=*/delete/byquery"' diff --git a/specification/tasks/list/examples/request/ListTasksRequestExample1.yaml b/specification/tasks/list/examples/request/ListTasksRequestExample1.yaml index 3caa781870..ece939dea9 100644 --- a/specification/tasks/list/examples/request/ListTasksRequestExample1.yaml +++ b/specification/tasks/list/examples/request/ListTasksRequestExample1.yaml @@ -1,28 +1 @@ method_request: GET _tasks?actions=*search&detailed -alternatives: - - language: Python - code: |- - resp = client.tasks.list( - actions="*search", - detailed=True, - ) - - language: JavaScript - code: |- - const response = await client.tasks.list({ - actions: "*search", - detailed: "true", - }); - - language: Ruby - code: |- - response = client.tasks.list( - actions: "*search", - detailed: "true" - ) - - language: PHP - code: |- - $resp = $client->tasks()->list([ - "actions" => "*search", - "detailed" => "true", - ]); - - language: curl - code: 'curl -X GET -H "Authorization: ApiKey $ELASTIC_API_KEY" "$ELASTICSEARCH_URL/_tasks?actions=*search&detailed"' diff --git a/specification/text_structure/find_field_structure/examples/request/FindFieldStructureRequestExample1.yaml b/specification/text_structure/find_field_structure/examples/request/FindFieldStructureRequestExample1.yaml index 89268c1306..eaf803b14c 100644 --- a/specification/text_structure/find_field_structure/examples/request/FindFieldStructureRequestExample1.yaml +++ b/specification/text_structure/find_field_structure/examples/request/FindFieldStructureRequestExample1.yaml @@ -1,35 +1 @@ method_request: GET _text_structure/find_field_structure?index=test-logs&field=message -alternatives: - - language: Python - code: |- - resp = client.text_structure.find_field_structure( - index="test-logs", - field="message", - ) - - language: JavaScript - code: |- - const response = await client.textStructure.findFieldStructure({ - index: "test-logs", - field: "message", - }); - - language: Ruby - code: |- - response = client.text_structure.find_field_structure( - index: "test-logs", - field: "message" - ) - - language: PHP - code: |- - $resp = $client->textStructure()->findFieldStructure([ - "index" => "test-logs", - "field" => "message", - ]); - - language: curl - code: 'curl -X GET -H "Authorization: ApiKey $ELASTIC_API_KEY" - "$ELASTICSEARCH_URL/_text_structure/find_field_structure?index=test-logs&field=message"' - - language: Java - code: | - client.textStructure().findFieldStructure(f -> f - .field("message") - .index("test-logs") - ); diff --git a/specification/text_structure/find_message_structure/examples/request/FindMessageStructureRequestExample1.yaml b/specification/text_structure/find_message_structure/examples/request/FindMessageStructureRequestExample1.yaml index 847f6bbbd6..2a58beac60 100644 --- a/specification/text_structure/find_message_structure/examples/request/FindMessageStructureRequestExample1.yaml +++ b/specification/text_structure/find_message_structure/examples/request/FindMessageStructureRequestExample1.yaml @@ -59,151 +59,3 @@ value: "{ \ ] }" -alternatives: - - language: Python - code: >- - resp = client.text_structure.find_message_structure( - messages=[ - "[2024-03-05T10:52:36,256][INFO ][o.a.l.u.VectorUtilPanamaProvider] [laptop] Java vector incubator API enabled; uses preferredBitSize=128", - "[2024-03-05T10:52:41,038][INFO ][o.e.p.PluginsService ] [laptop] loaded module [repository-url]", - "[2024-03-05T10:52:41,042][INFO ][o.e.p.PluginsService ] [laptop] loaded module [rest-root]", - "[2024-03-05T10:52:41,043][INFO ][o.e.p.PluginsService ] [laptop] loaded module [x-pack-core]", - "[2024-03-05T10:52:41,043][INFO ][o.e.p.PluginsService ] [laptop] loaded module [x-pack-redact]", - "[2024-03-05T10:52:41,043][INFO ][o.e.p.PluginsService ] [laptop] loaded module [ingest-user-agent]", - "[2024-03-05T10:52:41,044][INFO ][o.e.p.PluginsService ] [laptop] loaded module [x-pack-monitoring]", - "[2024-03-05T10:52:41,044][INFO ][o.e.p.PluginsService ] [laptop] loaded module [repository-s3]", - "[2024-03-05T10:52:41,044][INFO ][o.e.p.PluginsService ] [laptop] loaded module [x-pack-analytics]", - "[2024-03-05T10:52:41,044][INFO ][o.e.p.PluginsService ] [laptop] loaded module [x-pack-ent-search]", - "[2024-03-05T10:52:41,044][INFO ][o.e.p.PluginsService ] [laptop] loaded module [x-pack-autoscaling]", - "[2024-03-05T10:52:41,044][INFO ][o.e.p.PluginsService ] [laptop] loaded module [lang-painless]]", - "[2024-03-05T10:52:41,059][INFO ][o.e.p.PluginsService ] [laptop] loaded module [lang-expression]", - "[2024-03-05T10:52:41,059][INFO ][o.e.p.PluginsService ] [laptop] loaded module [x-pack-eql]", - "[2024-03-05T10:52:43,291][INFO ][o.e.e.NodeEnvironment ] [laptop] heap size [16gb], compressed ordinary object pointers [true]", - "[2024-03-05T10:52:46,098][INFO ][o.e.x.s.Security ] [laptop] Security is enabled", - "[2024-03-05T10:52:47,227][INFO ][o.e.x.p.ProfilingPlugin ] [laptop] Profiling is enabled", - "[2024-03-05T10:52:47,259][INFO ][o.e.x.p.ProfilingPlugin ] [laptop] profiling index templates will not be installed or reinstalled", - "[2024-03-05T10:52:47,755][INFO ][o.e.i.r.RecoverySettings ] [laptop] using rate limit [40mb] with [default=40mb, read=0b, write=0b, max=0b]", - "[2024-03-05T10:52:47,787][INFO ][o.e.d.DiscoveryModule ] [laptop] using discovery type [multi-node] and seed hosts providers [settings]", - "[2024-03-05T10:52:49,188][INFO ][o.e.n.Node ] [laptop] initialized", - "[2024-03-05T10:52:49,199][INFO ][o.e.n.Node ] [laptop] starting ..." - ], - ) - - language: JavaScript - code: >- - const response = await client.textStructure.findMessageStructure({ - messages: [ - "[2024-03-05T10:52:36,256][INFO ][o.a.l.u.VectorUtilPanamaProvider] [laptop] Java vector incubator API enabled; uses preferredBitSize=128", - "[2024-03-05T10:52:41,038][INFO ][o.e.p.PluginsService ] [laptop] loaded module [repository-url]", - "[2024-03-05T10:52:41,042][INFO ][o.e.p.PluginsService ] [laptop] loaded module [rest-root]", - "[2024-03-05T10:52:41,043][INFO ][o.e.p.PluginsService ] [laptop] loaded module [x-pack-core]", - "[2024-03-05T10:52:41,043][INFO ][o.e.p.PluginsService ] [laptop] loaded module [x-pack-redact]", - "[2024-03-05T10:52:41,043][INFO ][o.e.p.PluginsService ] [laptop] loaded module [ingest-user-agent]", - "[2024-03-05T10:52:41,044][INFO ][o.e.p.PluginsService ] [laptop] loaded module [x-pack-monitoring]", - "[2024-03-05T10:52:41,044][INFO ][o.e.p.PluginsService ] [laptop] loaded module [repository-s3]", - "[2024-03-05T10:52:41,044][INFO ][o.e.p.PluginsService ] [laptop] loaded module [x-pack-analytics]", - "[2024-03-05T10:52:41,044][INFO ][o.e.p.PluginsService ] [laptop] loaded module [x-pack-ent-search]", - "[2024-03-05T10:52:41,044][INFO ][o.e.p.PluginsService ] [laptop] loaded module [x-pack-autoscaling]", - "[2024-03-05T10:52:41,044][INFO ][o.e.p.PluginsService ] [laptop] loaded module [lang-painless]]", - "[2024-03-05T10:52:41,059][INFO ][o.e.p.PluginsService ] [laptop] loaded module [lang-expression]", - "[2024-03-05T10:52:41,059][INFO ][o.e.p.PluginsService ] [laptop] loaded module [x-pack-eql]", - "[2024-03-05T10:52:43,291][INFO ][o.e.e.NodeEnvironment ] [laptop] heap size [16gb], compressed ordinary object pointers [true]", - "[2024-03-05T10:52:46,098][INFO ][o.e.x.s.Security ] [laptop] Security is enabled", - "[2024-03-05T10:52:47,227][INFO ][o.e.x.p.ProfilingPlugin ] [laptop] Profiling is enabled", - "[2024-03-05T10:52:47,259][INFO ][o.e.x.p.ProfilingPlugin ] [laptop] profiling index templates will not be installed or reinstalled", - "[2024-03-05T10:52:47,755][INFO ][o.e.i.r.RecoverySettings ] [laptop] using rate limit [40mb] with [default=40mb, read=0b, write=0b, max=0b]", - "[2024-03-05T10:52:47,787][INFO ][o.e.d.DiscoveryModule ] [laptop] using discovery type [multi-node] and seed hosts providers [settings]", - "[2024-03-05T10:52:49,188][INFO ][o.e.n.Node ] [laptop] initialized", - "[2024-03-05T10:52:49,199][INFO ][o.e.n.Node ] [laptop] starting ...", - ], - }); - - language: Ruby - code: >- - response = client.text_structure.find_message_structure( - body: { - "messages": [ - "[2024-03-05T10:52:36,256][INFO ][o.a.l.u.VectorUtilPanamaProvider] [laptop] Java vector incubator API enabled; uses preferredBitSize=128", - "[2024-03-05T10:52:41,038][INFO ][o.e.p.PluginsService ] [laptop] loaded module [repository-url]", - "[2024-03-05T10:52:41,042][INFO ][o.e.p.PluginsService ] [laptop] loaded module [rest-root]", - "[2024-03-05T10:52:41,043][INFO ][o.e.p.PluginsService ] [laptop] loaded module [x-pack-core]", - "[2024-03-05T10:52:41,043][INFO ][o.e.p.PluginsService ] [laptop] loaded module [x-pack-redact]", - "[2024-03-05T10:52:41,043][INFO ][o.e.p.PluginsService ] [laptop] loaded module [ingest-user-agent]", - "[2024-03-05T10:52:41,044][INFO ][o.e.p.PluginsService ] [laptop] loaded module [x-pack-monitoring]", - "[2024-03-05T10:52:41,044][INFO ][o.e.p.PluginsService ] [laptop] loaded module [repository-s3]", - "[2024-03-05T10:52:41,044][INFO ][o.e.p.PluginsService ] [laptop] loaded module [x-pack-analytics]", - "[2024-03-05T10:52:41,044][INFO ][o.e.p.PluginsService ] [laptop] loaded module [x-pack-ent-search]", - "[2024-03-05T10:52:41,044][INFO ][o.e.p.PluginsService ] [laptop] loaded module [x-pack-autoscaling]", - "[2024-03-05T10:52:41,044][INFO ][o.e.p.PluginsService ] [laptop] loaded module [lang-painless]]", - "[2024-03-05T10:52:41,059][INFO ][o.e.p.PluginsService ] [laptop] loaded module [lang-expression]", - "[2024-03-05T10:52:41,059][INFO ][o.e.p.PluginsService ] [laptop] loaded module [x-pack-eql]", - "[2024-03-05T10:52:43,291][INFO ][o.e.e.NodeEnvironment ] [laptop] heap size [16gb], compressed ordinary object pointers [true]", - "[2024-03-05T10:52:46,098][INFO ][o.e.x.s.Security ] [laptop] Security is enabled", - "[2024-03-05T10:52:47,227][INFO ][o.e.x.p.ProfilingPlugin ] [laptop] Profiling is enabled", - "[2024-03-05T10:52:47,259][INFO ][o.e.x.p.ProfilingPlugin ] [laptop] profiling index templates will not be installed or reinstalled", - "[2024-03-05T10:52:47,755][INFO ][o.e.i.r.RecoverySettings ] [laptop] using rate limit [40mb] with [default=40mb, read=0b, write=0b, max=0b]", - "[2024-03-05T10:52:47,787][INFO ][o.e.d.DiscoveryModule ] [laptop] using discovery type [multi-node] and seed hosts providers [settings]", - "[2024-03-05T10:52:49,188][INFO ][o.e.n.Node ] [laptop] initialized", - "[2024-03-05T10:52:49,199][INFO ][o.e.n.Node ] [laptop] starting ..." - ] - } - ) - - language: PHP - code: >- - $resp = $client->textStructure()->findMessageStructure([ - "body" => [ - "messages" => array( - "[2024-03-05T10:52:36,256][INFO ][o.a.l.u.VectorUtilPanamaProvider] [laptop] Java vector incubator API enabled; uses preferredBitSize=128", - "[2024-03-05T10:52:41,038][INFO ][o.e.p.PluginsService ] [laptop] loaded module [repository-url]", - "[2024-03-05T10:52:41,042][INFO ][o.e.p.PluginsService ] [laptop] loaded module [rest-root]", - "[2024-03-05T10:52:41,043][INFO ][o.e.p.PluginsService ] [laptop] loaded module [x-pack-core]", - "[2024-03-05T10:52:41,043][INFO ][o.e.p.PluginsService ] [laptop] loaded module [x-pack-redact]", - "[2024-03-05T10:52:41,043][INFO ][o.e.p.PluginsService ] [laptop] loaded module [ingest-user-agent]", - "[2024-03-05T10:52:41,044][INFO ][o.e.p.PluginsService ] [laptop] loaded module [x-pack-monitoring]", - "[2024-03-05T10:52:41,044][INFO ][o.e.p.PluginsService ] [laptop] loaded module [repository-s3]", - "[2024-03-05T10:52:41,044][INFO ][o.e.p.PluginsService ] [laptop] loaded module [x-pack-analytics]", - "[2024-03-05T10:52:41,044][INFO ][o.e.p.PluginsService ] [laptop] loaded module [x-pack-ent-search]", - "[2024-03-05T10:52:41,044][INFO ][o.e.p.PluginsService ] [laptop] loaded module [x-pack-autoscaling]", - "[2024-03-05T10:52:41,044][INFO ][o.e.p.PluginsService ] [laptop] loaded module [lang-painless]]", - "[2024-03-05T10:52:41,059][INFO ][o.e.p.PluginsService ] [laptop] loaded module [lang-expression]", - "[2024-03-05T10:52:41,059][INFO ][o.e.p.PluginsService ] [laptop] loaded module [x-pack-eql]", - "[2024-03-05T10:52:43,291][INFO ][o.e.e.NodeEnvironment ] [laptop] heap size [16gb], compressed ordinary object pointers [true]", - "[2024-03-05T10:52:46,098][INFO ][o.e.x.s.Security ] [laptop] Security is enabled", - "[2024-03-05T10:52:47,227][INFO ][o.e.x.p.ProfilingPlugin ] [laptop] Profiling is enabled", - "[2024-03-05T10:52:47,259][INFO ][o.e.x.p.ProfilingPlugin ] [laptop] profiling index templates will not be installed or reinstalled", - "[2024-03-05T10:52:47,755][INFO ][o.e.i.r.RecoverySettings ] [laptop] using rate limit [40mb] with [default=40mb, read=0b, write=0b, max=0b]", - "[2024-03-05T10:52:47,787][INFO ][o.e.d.DiscoveryModule ] [laptop] using discovery type [multi-node] and seed hosts providers [settings]", - "[2024-03-05T10:52:49,188][INFO ][o.e.n.Node ] [laptop] initialized", - "[2024-03-05T10:52:49,199][INFO ][o.e.n.Node ] [laptop] starting ...", - ), - ], - ]); - - language: curl - code: - 'curl -X POST -H "Authorization: ApiKey $ELASTIC_API_KEY" -H "Content-Type: application/json" -d - ''{"messages":["[2024-03-05T10:52:36,256][INFO ][o.a.l.u.VectorUtilPanamaProvider] [laptop] Java vector incubator API - enabled; uses preferredBitSize=128","[2024-03-05T10:52:41,038][INFO ][o.e.p.PluginsService ] [laptop] loaded module - [repository-url]","[2024-03-05T10:52:41,042][INFO ][o.e.p.PluginsService ] [laptop] loaded module - [rest-root]","[2024-03-05T10:52:41,043][INFO ][o.e.p.PluginsService ] [laptop] loaded module - [x-pack-core]","[2024-03-05T10:52:41,043][INFO ][o.e.p.PluginsService ] [laptop] loaded module - [x-pack-redact]","[2024-03-05T10:52:41,043][INFO ][o.e.p.PluginsService ] [laptop] loaded module - [ingest-user-agent]","[2024-03-05T10:52:41,044][INFO ][o.e.p.PluginsService ] [laptop] loaded module - [x-pack-monitoring]","[2024-03-05T10:52:41,044][INFO ][o.e.p.PluginsService ] [laptop] loaded module - [repository-s3]","[2024-03-05T10:52:41,044][INFO ][o.e.p.PluginsService ] [laptop] loaded module - [x-pack-analytics]","[2024-03-05T10:52:41,044][INFO ][o.e.p.PluginsService ] [laptop] loaded module - [x-pack-ent-search]","[2024-03-05T10:52:41,044][INFO ][o.e.p.PluginsService ] [laptop] loaded module - [x-pack-autoscaling]","[2024-03-05T10:52:41,044][INFO ][o.e.p.PluginsService ] [laptop] loaded module - [lang-painless]]","[2024-03-05T10:52:41,059][INFO ][o.e.p.PluginsService ] [laptop] loaded module - [lang-expression]","[2024-03-05T10:52:41,059][INFO ][o.e.p.PluginsService ] [laptop] loaded module - [x-pack-eql]","[2024-03-05T10:52:43,291][INFO ][o.e.e.NodeEnvironment ] [laptop] heap size [16gb], compressed ordinary - object pointers [true]","[2024-03-05T10:52:46,098][INFO ][o.e.x.s.Security ] [laptop] Security is - enabled","[2024-03-05T10:52:47,227][INFO ][o.e.x.p.ProfilingPlugin ] [laptop] Profiling is - enabled","[2024-03-05T10:52:47,259][INFO ][o.e.x.p.ProfilingPlugin ] [laptop] profiling index templates will not be - installed or reinstalled","[2024-03-05T10:52:47,755][INFO ][o.e.i.r.RecoverySettings ] [laptop] using rate limit [40mb] with - [default=40mb, read=0b, write=0b, max=0b]","[2024-03-05T10:52:47,787][INFO ][o.e.d.DiscoveryModule ] [laptop] using - discovery type [multi-node] and seed hosts providers [settings]","[2024-03-05T10:52:49,188][INFO - ][o.e.n.Node ] [laptop] initialized","[2024-03-05T10:52:49,199][INFO ][o.e.n.Node ] [laptop] - starting ..."]}'' "$ELASTICSEARCH_URL/_text_structure/find_message_structure"' - - language: Java - code: > - client.textStructure().findMessageStructure(f -> f - .messages(List.of("[2024-03-05T10:52:36,256][INFO ][o.a.l.u.VectorUtilPanamaProvider] [laptop] Java vector incubator API enabled; uses preferredBitSize=128","[2024-03-05T10:52:41,038][INFO ][o.e.p.PluginsService ] [laptop] loaded module [repository-url]","[2024-03-05T10:52:41,042][INFO ][o.e.p.PluginsService ] [laptop] loaded module [rest-root]","[2024-03-05T10:52:41,043][INFO ][o.e.p.PluginsService ] [laptop] loaded module [x-pack-core]","[2024-03-05T10:52:41,043][INFO ][o.e.p.PluginsService ] [laptop] loaded module [x-pack-redact]","[2024-03-05T10:52:41,043][INFO ][o.e.p.PluginsService ] [laptop] loaded module [ingest-user-agent]","[2024-03-05T10:52:41,044][INFO ][o.e.p.PluginsService ] [laptop] loaded module [x-pack-monitoring]","[2024-03-05T10:52:41,044][INFO ][o.e.p.PluginsService ] [laptop] loaded module [repository-s3]","[2024-03-05T10:52:41,044][INFO ][o.e.p.PluginsService ] [laptop] loaded module [x-pack-analytics]","[2024-03-05T10:52:41,044][INFO ][o.e.p.PluginsService ] [laptop] loaded module [x-pack-ent-search]","[2024-03-05T10:52:41,044][INFO ][o.e.p.PluginsService ] [laptop] loaded module [x-pack-autoscaling]","[2024-03-05T10:52:41,044][INFO ][o.e.p.PluginsService ] [laptop] loaded module [lang-painless]]","[2024-03-05T10:52:41,059][INFO ][o.e.p.PluginsService ] [laptop] loaded module [lang-expression]","[2024-03-05T10:52:41,059][INFO ][o.e.p.PluginsService ] [laptop] loaded module [x-pack-eql]","[2024-03-05T10:52:43,291][INFO ][o.e.e.NodeEnvironment ] [laptop] heap size [16gb], compressed ordinary object pointers [true]","[2024-03-05T10:52:46,098][INFO ][o.e.x.s.Security ] [laptop] Security is enabled","[2024-03-05T10:52:47,227][INFO ][o.e.x.p.ProfilingPlugin ] [laptop] Profiling is enabled","[2024-03-05T10:52:47,259][INFO ][o.e.x.p.ProfilingPlugin ] [laptop] profiling index templates will not be installed or reinstalled","[2024-03-05T10:52:47,755][INFO ][o.e.i.r.RecoverySettings ] [laptop] using rate limit [40mb] with [default=40mb, read=0b, write=0b, max=0b]","[2024-03-05T10:52:47,787][INFO ][o.e.d.DiscoveryModule ] [laptop] using discovery type [multi-node] and seed hosts providers [settings]","[2024-03-05T10:52:49,188][INFO ][o.e.n.Node ] [laptop] initialized","[2024-03-05T10:52:49,199][INFO ][o.e.n.Node ] [laptop] starting ...")) - ); diff --git a/specification/text_structure/find_structure/examples/request/FindStructureRequestExample1.yaml b/specification/text_structure/find_structure/examples/request/FindStructureRequestExample1.yaml index d0a26b42ec..df79f34de3 100644 --- a/specification/text_structure/find_structure/examples/request/FindStructureRequestExample1.yaml +++ b/specification/text_structure/find_structure/examples/request/FindStructureRequestExample1.yaml @@ -50,633 +50,3 @@ value: {"name": "The Left Hand of Darkness", "author": "Ursula K. Le Guin", "release_date": "1969-06-01", "page_count": 304} {"name": "The Moon is a Harsh Mistress", "author": "Robert A. Heinlein", "release_date": "1966-04-01", "page_count": 288}' -alternatives: - - language: Python - code: |- - resp = client.text_structure.find_structure( - text_files=[ - { - "name": "Leviathan Wakes", - "author": "James S.A. Corey", - "release_date": "2011-06-02", - "page_count": 561 - }, - { - "name": "Hyperion", - "author": "Dan Simmons", - "release_date": "1989-05-26", - "page_count": 482 - }, - { - "name": "Dune", - "author": "Frank Herbert", - "release_date": "1965-06-01", - "page_count": 604 - }, - { - "name": "Dune Messiah", - "author": "Frank Herbert", - "release_date": "1969-10-15", - "page_count": 331 - }, - { - "name": "Children of Dune", - "author": "Frank Herbert", - "release_date": "1976-04-21", - "page_count": 408 - }, - { - "name": "God Emperor of Dune", - "author": "Frank Herbert", - "release_date": "1981-05-28", - "page_count": 454 - }, - { - "name": "Consider Phlebas", - "author": "Iain M. Banks", - "release_date": "1987-04-23", - "page_count": 471 - }, - { - "name": "Pandora's Star", - "author": "Peter F. Hamilton", - "release_date": "2004-03-02", - "page_count": 768 - }, - { - "name": "Revelation Space", - "author": "Alastair Reynolds", - "release_date": "2000-03-15", - "page_count": 585 - }, - { - "name": "A Fire Upon the Deep", - "author": "Vernor Vinge", - "release_date": "1992-06-01", - "page_count": 613 - }, - { - "name": "Ender's Game", - "author": "Orson Scott Card", - "release_date": "1985-06-01", - "page_count": 324 - }, - { - "name": "1984", - "author": "George Orwell", - "release_date": "1985-06-01", - "page_count": 328 - }, - { - "name": "Fahrenheit 451", - "author": "Ray Bradbury", - "release_date": "1953-10-15", - "page_count": 227 - }, - { - "name": "Brave New World", - "author": "Aldous Huxley", - "release_date": "1932-06-01", - "page_count": 268 - }, - { - "name": "Foundation", - "author": "Isaac Asimov", - "release_date": "1951-06-01", - "page_count": 224 - }, - { - "name": "The Giver", - "author": "Lois Lowry", - "release_date": "1993-04-26", - "page_count": 208 - }, - { - "name": "Slaughterhouse-Five", - "author": "Kurt Vonnegut", - "release_date": "1969-06-01", - "page_count": 275 - }, - { - "name": "The Hitchhiker's Guide to the Galaxy", - "author": "Douglas Adams", - "release_date": "1979-10-12", - "page_count": 180 - }, - { - "name": "Snow Crash", - "author": "Neal Stephenson", - "release_date": "1992-06-01", - "page_count": 470 - }, - { - "name": "Neuromancer", - "author": "William Gibson", - "release_date": "1984-07-01", - "page_count": 271 - }, - { - "name": "The Handmaid's Tale", - "author": "Margaret Atwood", - "release_date": "1985-06-01", - "page_count": 311 - }, - { - "name": "Starship Troopers", - "author": "Robert A. Heinlein", - "release_date": "1959-12-01", - "page_count": 335 - }, - { - "name": "The Left Hand of Darkness", - "author": "Ursula K. Le Guin", - "release_date": "1969-06-01", - "page_count": 304 - }, - { - "name": "The Moon is a Harsh Mistress", - "author": "Robert A. Heinlein", - "release_date": "1966-04-01", - "page_count": 288 - } - ], - ) - - language: JavaScript - code: |- - const response = await client.textStructure.findStructure({ - text_files: [ - { - name: "Leviathan Wakes", - author: "James S.A. Corey", - release_date: "2011-06-02", - page_count: 561, - }, - { - name: "Hyperion", - author: "Dan Simmons", - release_date: "1989-05-26", - page_count: 482, - }, - { - name: "Dune", - author: "Frank Herbert", - release_date: "1965-06-01", - page_count: 604, - }, - { - name: "Dune Messiah", - author: "Frank Herbert", - release_date: "1969-10-15", - page_count: 331, - }, - { - name: "Children of Dune", - author: "Frank Herbert", - release_date: "1976-04-21", - page_count: 408, - }, - { - name: "God Emperor of Dune", - author: "Frank Herbert", - release_date: "1981-05-28", - page_count: 454, - }, - { - name: "Consider Phlebas", - author: "Iain M. Banks", - release_date: "1987-04-23", - page_count: 471, - }, - { - name: "Pandora's Star", - author: "Peter F. Hamilton", - release_date: "2004-03-02", - page_count: 768, - }, - { - name: "Revelation Space", - author: "Alastair Reynolds", - release_date: "2000-03-15", - page_count: 585, - }, - { - name: "A Fire Upon the Deep", - author: "Vernor Vinge", - release_date: "1992-06-01", - page_count: 613, - }, - { - name: "Ender's Game", - author: "Orson Scott Card", - release_date: "1985-06-01", - page_count: 324, - }, - { - name: "1984", - author: "George Orwell", - release_date: "1985-06-01", - page_count: 328, - }, - { - name: "Fahrenheit 451", - author: "Ray Bradbury", - release_date: "1953-10-15", - page_count: 227, - }, - { - name: "Brave New World", - author: "Aldous Huxley", - release_date: "1932-06-01", - page_count: 268, - }, - { - name: "Foundation", - author: "Isaac Asimov", - release_date: "1951-06-01", - page_count: 224, - }, - { - name: "The Giver", - author: "Lois Lowry", - release_date: "1993-04-26", - page_count: 208, - }, - { - name: "Slaughterhouse-Five", - author: "Kurt Vonnegut", - release_date: "1969-06-01", - page_count: 275, - }, - { - name: "The Hitchhiker's Guide to the Galaxy", - author: "Douglas Adams", - release_date: "1979-10-12", - page_count: 180, - }, - { - name: "Snow Crash", - author: "Neal Stephenson", - release_date: "1992-06-01", - page_count: 470, - }, - { - name: "Neuromancer", - author: "William Gibson", - release_date: "1984-07-01", - page_count: 271, - }, - { - name: "The Handmaid's Tale", - author: "Margaret Atwood", - release_date: "1985-06-01", - page_count: 311, - }, - { - name: "Starship Troopers", - author: "Robert A. Heinlein", - release_date: "1959-12-01", - page_count: 335, - }, - { - name: "The Left Hand of Darkness", - author: "Ursula K. Le Guin", - release_date: "1969-06-01", - page_count: 304, - }, - { - name: "The Moon is a Harsh Mistress", - author: "Robert A. Heinlein", - release_date: "1966-04-01", - page_count: 288, - }, - ], - }); - - language: Ruby - code: |- - response = client.text_structure.find_structure( - body: [ - { - "name": "Leviathan Wakes", - "author": "James S.A. Corey", - "release_date": "2011-06-02", - "page_count": 561 - }, - { - "name": "Hyperion", - "author": "Dan Simmons", - "release_date": "1989-05-26", - "page_count": 482 - }, - { - "name": "Dune", - "author": "Frank Herbert", - "release_date": "1965-06-01", - "page_count": 604 - }, - { - "name": "Dune Messiah", - "author": "Frank Herbert", - "release_date": "1969-10-15", - "page_count": 331 - }, - { - "name": "Children of Dune", - "author": "Frank Herbert", - "release_date": "1976-04-21", - "page_count": 408 - }, - { - "name": "God Emperor of Dune", - "author": "Frank Herbert", - "release_date": "1981-05-28", - "page_count": 454 - }, - { - "name": "Consider Phlebas", - "author": "Iain M. Banks", - "release_date": "1987-04-23", - "page_count": 471 - }, - { - "name": "Pandora's Star", - "author": "Peter F. Hamilton", - "release_date": "2004-03-02", - "page_count": 768 - }, - { - "name": "Revelation Space", - "author": "Alastair Reynolds", - "release_date": "2000-03-15", - "page_count": 585 - }, - { - "name": "A Fire Upon the Deep", - "author": "Vernor Vinge", - "release_date": "1992-06-01", - "page_count": 613 - }, - { - "name": "Ender's Game", - "author": "Orson Scott Card", - "release_date": "1985-06-01", - "page_count": 324 - }, - { - "name": "1984", - "author": "George Orwell", - "release_date": "1985-06-01", - "page_count": 328 - }, - { - "name": "Fahrenheit 451", - "author": "Ray Bradbury", - "release_date": "1953-10-15", - "page_count": 227 - }, - { - "name": "Brave New World", - "author": "Aldous Huxley", - "release_date": "1932-06-01", - "page_count": 268 - }, - { - "name": "Foundation", - "author": "Isaac Asimov", - "release_date": "1951-06-01", - "page_count": 224 - }, - { - "name": "The Giver", - "author": "Lois Lowry", - "release_date": "1993-04-26", - "page_count": 208 - }, - { - "name": "Slaughterhouse-Five", - "author": "Kurt Vonnegut", - "release_date": "1969-06-01", - "page_count": 275 - }, - { - "name": "The Hitchhiker's Guide to the Galaxy", - "author": "Douglas Adams", - "release_date": "1979-10-12", - "page_count": 180 - }, - { - "name": "Snow Crash", - "author": "Neal Stephenson", - "release_date": "1992-06-01", - "page_count": 470 - }, - { - "name": "Neuromancer", - "author": "William Gibson", - "release_date": "1984-07-01", - "page_count": 271 - }, - { - "name": "The Handmaid's Tale", - "author": "Margaret Atwood", - "release_date": "1985-06-01", - "page_count": 311 - }, - { - "name": "Starship Troopers", - "author": "Robert A. Heinlein", - "release_date": "1959-12-01", - "page_count": 335 - }, - { - "name": "The Left Hand of Darkness", - "author": "Ursula K. Le Guin", - "release_date": "1969-06-01", - "page_count": 304 - }, - { - "name": "The Moon is a Harsh Mistress", - "author": "Robert A. Heinlein", - "release_date": "1966-04-01", - "page_count": 288 - } - ] - ) - - language: PHP - code: |- - $resp = $client->textStructure()->findStructure([ - "body" => array( - [ - "name" => "Leviathan Wakes", - "author" => "James S.A. Corey", - "release_date" => "2011-06-02", - "page_count" => 561, - ], - [ - "name" => "Hyperion", - "author" => "Dan Simmons", - "release_date" => "1989-05-26", - "page_count" => 482, - ], - [ - "name" => "Dune", - "author" => "Frank Herbert", - "release_date" => "1965-06-01", - "page_count" => 604, - ], - [ - "name" => "Dune Messiah", - "author" => "Frank Herbert", - "release_date" => "1969-10-15", - "page_count" => 331, - ], - [ - "name" => "Children of Dune", - "author" => "Frank Herbert", - "release_date" => "1976-04-21", - "page_count" => 408, - ], - [ - "name" => "God Emperor of Dune", - "author" => "Frank Herbert", - "release_date" => "1981-05-28", - "page_count" => 454, - ], - [ - "name" => "Consider Phlebas", - "author" => "Iain M. Banks", - "release_date" => "1987-04-23", - "page_count" => 471, - ], - [ - "name" => "Pandora's Star", - "author" => "Peter F. Hamilton", - "release_date" => "2004-03-02", - "page_count" => 768, - ], - [ - "name" => "Revelation Space", - "author" => "Alastair Reynolds", - "release_date" => "2000-03-15", - "page_count" => 585, - ], - [ - "name" => "A Fire Upon the Deep", - "author" => "Vernor Vinge", - "release_date" => "1992-06-01", - "page_count" => 613, - ], - [ - "name" => "Ender's Game", - "author" => "Orson Scott Card", - "release_date" => "1985-06-01", - "page_count" => 324, - ], - [ - "name" => "1984", - "author" => "George Orwell", - "release_date" => "1985-06-01", - "page_count" => 328, - ], - [ - "name" => "Fahrenheit 451", - "author" => "Ray Bradbury", - "release_date" => "1953-10-15", - "page_count" => 227, - ], - [ - "name" => "Brave New World", - "author" => "Aldous Huxley", - "release_date" => "1932-06-01", - "page_count" => 268, - ], - [ - "name" => "Foundation", - "author" => "Isaac Asimov", - "release_date" => "1951-06-01", - "page_count" => 224, - ], - [ - "name" => "The Giver", - "author" => "Lois Lowry", - "release_date" => "1993-04-26", - "page_count" => 208, - ], - [ - "name" => "Slaughterhouse-Five", - "author" => "Kurt Vonnegut", - "release_date" => "1969-06-01", - "page_count" => 275, - ], - [ - "name" => "The Hitchhiker's Guide to the Galaxy", - "author" => "Douglas Adams", - "release_date" => "1979-10-12", - "page_count" => 180, - ], - [ - "name" => "Snow Crash", - "author" => "Neal Stephenson", - "release_date" => "1992-06-01", - "page_count" => 470, - ], - [ - "name" => "Neuromancer", - "author" => "William Gibson", - "release_date" => "1984-07-01", - "page_count" => 271, - ], - [ - "name" => "The Handmaid's Tale", - "author" => "Margaret Atwood", - "release_date" => "1985-06-01", - "page_count" => 311, - ], - [ - "name" => "Starship Troopers", - "author" => "Robert A. Heinlein", - "release_date" => "1959-12-01", - "page_count" => 335, - ], - [ - "name" => "The Left Hand of Darkness", - "author" => "Ursula K. Le Guin", - "release_date" => "1969-06-01", - "page_count" => 304, - ], - [ - "name" => "The Moon is a Harsh Mistress", - "author" => "Robert A. Heinlein", - "release_date" => "1966-04-01", - "page_count" => 288, - ], - ), - ]); - - language: curl - code: - 'curl -X POST -H "Authorization: ApiKey $ELASTIC_API_KEY" -H "Content-Type: application/json" -d ''[{"name":"Leviathan - Wakes","author":"James S.A. - Corey","release_date":"2011-06-02","page_count":561},{"name":"Hyperion","author":"Dan - Simmons","release_date":"1989-05-26","page_count":482},{"name":"Dune","author":"Frank - Herbert","release_date":"1965-06-01","page_count":604},{"name":"Dune Messiah","author":"Frank - Herbert","release_date":"1969-10-15","page_count":331},{"name":"Children of Dune","author":"Frank - Herbert","release_date":"1976-04-21","page_count":408},{"name":"God Emperor of Dune","author":"Frank - Herbert","release_date":"1981-05-28","page_count":454},{"name":"Consider Phlebas","author":"Iain M. - Banks","release_date":"1987-04-23","page_count":471},{"name":"Pandora''"''"''s Star","author":"Peter F. - Hamilton","release_date":"2004-03-02","page_count":768},{"name":"Revelation Space","author":"Alastair - Reynolds","release_date":"2000-03-15","page_count":585},{"name":"A Fire Upon the Deep","author":"Vernor - Vinge","release_date":"1992-06-01","page_count":613},{"name":"Ender''"''"''s Game","author":"Orson Scott - Card","release_date":"1985-06-01","page_count":324},{"name":"1984","author":"George - Orwell","release_date":"1985-06-01","page_count":328},{"name":"Fahrenheit 451","author":"Ray - Bradbury","release_date":"1953-10-15","page_count":227},{"name":"Brave New World","author":"Aldous - Huxley","release_date":"1932-06-01","page_count":268},{"name":"Foundation","author":"Isaac - Asimov","release_date":"1951-06-01","page_count":224},{"name":"The Giver","author":"Lois - Lowry","release_date":"1993-04-26","page_count":208},{"name":"Slaughterhouse-Five","author":"Kurt - Vonnegut","release_date":"1969-06-01","page_count":275},{"name":"The Hitchhiker''"''"''s Guide to the - Galaxy","author":"Douglas Adams","release_date":"1979-10-12","page_count":180},{"name":"Snow - Crash","author":"Neal - Stephenson","release_date":"1992-06-01","page_count":470},{"name":"Neuromancer","author":"William - Gibson","release_date":"1984-07-01","page_count":271},{"name":"The Handmaid''"''"''s Tale","author":"Margaret - Atwood","release_date":"1985-06-01","page_count":311},{"name":"Starship Troopers","author":"Robert A. - Heinlein","release_date":"1959-12-01","page_count":335},{"name":"The Left Hand of Darkness","author":"Ursula K. - Le Guin","release_date":"1969-06-01","page_count":304},{"name":"The Moon is a Harsh Mistress","author":"Robert - A. Heinlein","release_date":"1966-04-01","page_count":288}]'' "$ELASTICSEARCH_URL/_text_structure/find_structure"' diff --git a/specification/text_structure/test_grok_pattern/examples/request/TestGrokPatternRequestExample1.yaml b/specification/text_structure/test_grok_pattern/examples/request/TestGrokPatternRequestExample1.yaml index 2d7ece0c5f..0285c46d0c 100644 --- a/specification/text_structure/test_grok_pattern/examples/request/TestGrokPatternRequestExample1.yaml +++ b/specification/text_structure/test_grok_pattern/examples/request/TestGrokPatternRequestExample1.yaml @@ -15,52 +15,3 @@ value: "{ \ ] }" -alternatives: - - language: Python - code: |- - resp = client.text_structure.test_grok_pattern( - grok_pattern="Hello %{WORD:first_name} %{WORD:last_name}", - text=[ - "Hello John Doe", - "this does not match" - ], - ) - - language: JavaScript - code: |- - const response = await client.textStructure.testGrokPattern({ - grok_pattern: "Hello %{WORD:first_name} %{WORD:last_name}", - text: ["Hello John Doe", "this does not match"], - }); - - language: Ruby - code: |- - response = client.text_structure.test_grok_pattern( - body: { - "grok_pattern": "Hello %{WORD:first_name} %{WORD:last_name}", - "text": [ - "Hello John Doe", - "this does not match" - ] - } - ) - - language: PHP - code: |- - $resp = $client->textStructure()->testGrokPattern([ - "body" => [ - "grok_pattern" => "Hello %{WORD:first_name} %{WORD:last_name}", - "text" => array( - "Hello John Doe", - "this does not match", - ), - ], - ]); - - language: curl - code: - 'curl -X GET -H "Authorization: ApiKey $ELASTIC_API_KEY" -H "Content-Type: application/json" -d ''{"grok_pattern":"Hello - %{WORD:first_name} %{WORD:last_name}","text":["Hello John Doe","this does not match"]}'' - "$ELASTICSEARCH_URL/_text_structure/test_grok_pattern"' - - language: Java - code: | - client.textStructure().testGrokPattern(t -> t - .grokPattern("Hello %{WORD:first_name} %{WORD:last_name}") - .text(List.of("Hello John Doe","this does not match")) - ); diff --git a/specification/transform/delete_transform/examples/request/TransformDeleteTransformExample1.yaml b/specification/transform/delete_transform/examples/request/TransformDeleteTransformExample1.yaml index 7bfbaa1817..fbce5ab4f5 100644 --- a/specification/transform/delete_transform/examples/request/TransformDeleteTransformExample1.yaml +++ b/specification/transform/delete_transform/examples/request/TransformDeleteTransformExample1.yaml @@ -1,29 +1 @@ method_request: DELETE _transform/ecommerce_transform -alternatives: - - language: Python - code: |- - resp = client.transform.delete_transform( - transform_id="ecommerce_transform", - ) - - language: JavaScript - code: |- - const response = await client.transform.deleteTransform({ - transform_id: "ecommerce_transform", - }); - - language: Ruby - code: |- - response = client.transform.delete_transform( - transform_id: "ecommerce_transform" - ) - - language: PHP - code: |- - $resp = $client->transform()->deleteTransform([ - "transform_id" => "ecommerce_transform", - ]); - - language: curl - code: 'curl -X DELETE -H "Authorization: ApiKey $ELASTIC_API_KEY" "$ELASTICSEARCH_URL/_transform/ecommerce_transform"' - - language: Java - code: | - client.transform().deleteTransform(d -> d - .transformId("ecommerce_transform") - ); diff --git a/specification/transform/get_transform/examples/request/TransformGetTransformExample1.yaml b/specification/transform/get_transform/examples/request/TransformGetTransformExample1.yaml index 47c7812f38..75e526a10e 100644 --- a/specification/transform/get_transform/examples/request/TransformGetTransformExample1.yaml +++ b/specification/transform/get_transform/examples/request/TransformGetTransformExample1.yaml @@ -1,29 +1 @@ method_request: GET _transform?size=10 -alternatives: - - language: Python - code: |- - resp = client.transform.get_transform( - size="10", - ) - - language: JavaScript - code: |- - const response = await client.transform.getTransform({ - size: 10, - }); - - language: Ruby - code: |- - response = client.transform.get_transform( - size: "10" - ) - - language: PHP - code: |- - $resp = $client->transform()->getTransform([ - "size" => "10", - ]); - - language: curl - code: 'curl -X GET -H "Authorization: ApiKey $ELASTIC_API_KEY" "$ELASTICSEARCH_URL/_transform?size=10"' - - language: Java - code: | - client.transform().getTransform(g -> g - .size(10) - ); diff --git a/specification/transform/get_transform_stats/examples/request/TransformGetTransformStatsExample1.yaml b/specification/transform/get_transform_stats/examples/request/TransformGetTransformStatsExample1.yaml index 88b220a2d4..a6416b60c4 100644 --- a/specification/transform/get_transform_stats/examples/request/TransformGetTransformStatsExample1.yaml +++ b/specification/transform/get_transform_stats/examples/request/TransformGetTransformStatsExample1.yaml @@ -1,29 +1 @@ method_request: GET _transform/ecommerce-customer-transform/_stats -alternatives: - - language: Python - code: |- - resp = client.transform.get_transform_stats( - transform_id="ecommerce-customer-transform", - ) - - language: JavaScript - code: |- - const response = await client.transform.getTransformStats({ - transform_id: "ecommerce-customer-transform", - }); - - language: Ruby - code: |- - response = client.transform.get_transform_stats( - transform_id: "ecommerce-customer-transform" - ) - - language: PHP - code: |- - $resp = $client->transform()->getTransformStats([ - "transform_id" => "ecommerce-customer-transform", - ]); - - language: curl - code: 'curl -X GET -H "Authorization: ApiKey $ELASTIC_API_KEY" "$ELASTICSEARCH_URL/_transform/ecommerce-customer-transform/_stats"' - - language: Java - code: | - client.transform().getTransformStats(g -> g - .transformId("ecommerce-customer-transform") - ); diff --git a/specification/transform/preview_transform/examples/request/PreviewTransformRequestExample1.yaml b/specification/transform/preview_transform/examples/request/PreviewTransformRequestExample1.yaml index fc9b79008a..010fd3e0d2 100644 --- a/specification/transform/preview_transform/examples/request/PreviewTransformRequestExample1.yaml +++ b/specification/transform/preview_transform/examples/request/PreviewTransformRequestExample1.yaml @@ -15,130 +15,3 @@ value: max_price: max: field: taxful_total_price -alternatives: - - language: Python - code: |- - resp = client.transform.preview_transform( - source={ - "index": "kibana_sample_data_ecommerce" - }, - pivot={ - "group_by": { - "customer_id": { - "terms": { - "field": "customer_id", - "missing_bucket": True - } - } - }, - "aggregations": { - "max_price": { - "max": { - "field": "taxful_total_price" - } - } - } - }, - ) - - language: JavaScript - code: |- - const response = await client.transform.previewTransform({ - source: { - index: "kibana_sample_data_ecommerce", - }, - pivot: { - group_by: { - customer_id: { - terms: { - field: "customer_id", - missing_bucket: true, - }, - }, - }, - aggregations: { - max_price: { - max: { - field: "taxful_total_price", - }, - }, - }, - }, - }); - - language: Ruby - code: |- - response = client.transform.preview_transform( - body: { - "source": { - "index": "kibana_sample_data_ecommerce" - }, - "pivot": { - "group_by": { - "customer_id": { - "terms": { - "field": "customer_id", - "missing_bucket": true - } - } - }, - "aggregations": { - "max_price": { - "max": { - "field": "taxful_total_price" - } - } - } - } - } - ) - - language: PHP - code: |- - $resp = $client->transform()->previewTransform([ - "body" => [ - "source" => [ - "index" => "kibana_sample_data_ecommerce", - ], - "pivot" => [ - "group_by" => [ - "customer_id" => [ - "terms" => [ - "field" => "customer_id", - "missing_bucket" => true, - ], - ], - ], - "aggregations" => [ - "max_price" => [ - "max" => [ - "field" => "taxful_total_price", - ], - ], - ], - ], - ], - ]); - - language: curl - code: - "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d - '{\"source\":{\"index\":\"kibana_sample_data_ecommerce\"},\"pivot\":{\"group_by\":{\"customer_id\":{\"terms\":{\"field\":\"cu\ - stomer_id\",\"missing_bucket\":true}}},\"aggregations\":{\"max_price\":{\"max\":{\"field\":\"taxful_total_price\"}}}}}' - \"$ELASTICSEARCH_URL/_transform/_preview\"" - - language: Java - code: | - client.transform().previewTransform(p -> p - .pivot(pi -> pi - .aggregations("max_price", a -> a - .max(m -> m - .field("taxful_total_price") - ) - ) - .groupBy("customer_id", g -> g - .terms(t -> t - .field("customer_id") - .missingBucket(true) - ) - ) - ) - .source(s -> s - .index("kibana_sample_data_ecommerce") - ) - ); diff --git a/specification/transform/put_transform/examples/request/PutTransformRequestExample1.yaml b/specification/transform/put_transform/examples/request/PutTransformRequestExample1.yaml index 65b0fd8809..08f479163c 100644 --- a/specification/transform/put_transform/examples/request/PutTransformRequestExample1.yaml +++ b/specification/transform/put_transform/examples/request/PutTransformRequestExample1.yaml @@ -32,268 +32,3 @@ value: time: field: order_date max_age: 30d -alternatives: - - language: Python - code: |- - resp = client.transform.put_transform( - transform_id="ecommerce_transform1", - source={ - "index": "kibana_sample_data_ecommerce", - "query": { - "term": { - "geoip.continent_name": { - "value": "Asia" - } - } - } - }, - pivot={ - "group_by": { - "customer_id": { - "terms": { - "field": "customer_id", - "missing_bucket": True - } - } - }, - "aggregations": { - "max_price": { - "max": { - "field": "taxful_total_price" - } - } - } - }, - description="Maximum priced ecommerce data by customer_id in Asia", - dest={ - "index": "kibana_sample_data_ecommerce_transform1", - "pipeline": "add_timestamp_pipeline" - }, - frequency="5m", - sync={ - "time": { - "field": "order_date", - "delay": "60s" - } - }, - retention_policy={ - "time": { - "field": "order_date", - "max_age": "30d" - } - }, - ) - - language: JavaScript - code: |- - const response = await client.transform.putTransform({ - transform_id: "ecommerce_transform1", - source: { - index: "kibana_sample_data_ecommerce", - query: { - term: { - "geoip.continent_name": { - value: "Asia", - }, - }, - }, - }, - pivot: { - group_by: { - customer_id: { - terms: { - field: "customer_id", - missing_bucket: true, - }, - }, - }, - aggregations: { - max_price: { - max: { - field: "taxful_total_price", - }, - }, - }, - }, - description: "Maximum priced ecommerce data by customer_id in Asia", - dest: { - index: "kibana_sample_data_ecommerce_transform1", - pipeline: "add_timestamp_pipeline", - }, - frequency: "5m", - sync: { - time: { - field: "order_date", - delay: "60s", - }, - }, - retention_policy: { - time: { - field: "order_date", - max_age: "30d", - }, - }, - }); - - language: Ruby - code: |- - response = client.transform.put_transform( - transform_id: "ecommerce_transform1", - body: { - "source": { - "index": "kibana_sample_data_ecommerce", - "query": { - "term": { - "geoip.continent_name": { - "value": "Asia" - } - } - } - }, - "pivot": { - "group_by": { - "customer_id": { - "terms": { - "field": "customer_id", - "missing_bucket": true - } - } - }, - "aggregations": { - "max_price": { - "max": { - "field": "taxful_total_price" - } - } - } - }, - "description": "Maximum priced ecommerce data by customer_id in Asia", - "dest": { - "index": "kibana_sample_data_ecommerce_transform1", - "pipeline": "add_timestamp_pipeline" - }, - "frequency": "5m", - "sync": { - "time": { - "field": "order_date", - "delay": "60s" - } - }, - "retention_policy": { - "time": { - "field": "order_date", - "max_age": "30d" - } - } - } - ) - - language: PHP - code: |- - $resp = $client->transform()->putTransform([ - "transform_id" => "ecommerce_transform1", - "body" => [ - "source" => [ - "index" => "kibana_sample_data_ecommerce", - "query" => [ - "term" => [ - "geoip.continent_name" => [ - "value" => "Asia", - ], - ], - ], - ], - "pivot" => [ - "group_by" => [ - "customer_id" => [ - "terms" => [ - "field" => "customer_id", - "missing_bucket" => true, - ], - ], - ], - "aggregations" => [ - "max_price" => [ - "max" => [ - "field" => "taxful_total_price", - ], - ], - ], - ], - "description" => "Maximum priced ecommerce data by customer_id in Asia", - "dest" => [ - "index" => "kibana_sample_data_ecommerce_transform1", - "pipeline" => "add_timestamp_pipeline", - ], - "frequency" => "5m", - "sync" => [ - "time" => [ - "field" => "order_date", - "delay" => "60s", - ], - ], - "retention_policy" => [ - "time" => [ - "field" => "order_date", - "max_age" => "30d", - ], - ], - ], - ]); - - language: curl - code: - "curl -X PUT -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d - '{\"source\":{\"index\":\"kibana_sample_data_ecommerce\",\"query\":{\"term\":{\"geoip.continent_name\":{\"value\":\"Asia\"}}}\ - },\"pivot\":{\"group_by\":{\"customer_id\":{\"terms\":{\"field\":\"customer_id\",\"missing_bucket\":true}}},\"aggregations\":{\ - \"max_price\":{\"max\":{\"field\":\"taxful_total_price\"}}}},\"description\":\"Maximum priced ecommerce data by customer_id in - Asia\",\"dest\":{\"index\":\"kibana_sample_data_ecommerce_transform1\",\"pipeline\":\"add_timestamp_pipeline\"},\"frequency\":\ - \"5m\",\"sync\":{\"time\":{\"field\":\"order_date\",\"delay\":\"60s\"}},\"retention_policy\":{\"time\":{\"field\":\"order_date\ - \",\"max_age\":\"30d\"}}}' \"$ELASTICSEARCH_URL/_transform/ecommerce_transform1\"" - - language: Java - code: | - client.transform().putTransform(p -> p - .description("Maximum priced ecommerce data by customer_id in Asia") - .dest(d -> d - .index("kibana_sample_data_ecommerce_transform1") - .pipeline("add_timestamp_pipeline") - ) - .frequency(f -> f - .time("5m") - ) - .pivot(pi -> pi - .aggregations("max_price", a -> a - .max(m -> m - .field("taxful_total_price") - ) - ) - .groupBy("customer_id", g -> g - .terms(t -> t - .field("customer_id") - .missingBucket(true) - ) - ) - ) - .retentionPolicy(r -> r - .time(t -> t - .field("order_date") - .maxAge(m -> m - .time("30d") - ) - ) - ) - .source(s -> s - .index("kibana_sample_data_ecommerce") - .query(q -> q - .term(te -> te - .field("geoip.continent_name") - .value(FieldValue.of("Asia")) - ) - ) - ) - .sync(sy -> sy - .time(ti -> ti - .delay(d -> d - .time("60s") - ) - .field("order_date") - ) - ) - .transformId("ecommerce_transform1") - ); diff --git a/specification/transform/put_transform/examples/request/PutTransformRequestExample2.yaml b/specification/transform/put_transform/examples/request/PutTransformRequestExample2.yaml index d321bfbcd7..003891916d 100644 --- a/specification/transform/put_transform/examples/request/PutTransformRequestExample2.yaml +++ b/specification/transform/put_transform/examples/request/PutTransformRequestExample2.yaml @@ -17,140 +17,3 @@ value: time: field: order_date delay: 60s -alternatives: - - language: Python - code: |- - resp = client.transform.put_transform( - transform_id="ecommerce_transform2", - source={ - "index": "kibana_sample_data_ecommerce" - }, - latest={ - "unique_key": [ - "customer_id" - ], - "sort": "order_date" - }, - description="Latest order for each customer", - dest={ - "index": "kibana_sample_data_ecommerce_transform2" - }, - frequency="5m", - sync={ - "time": { - "field": "order_date", - "delay": "60s" - } - }, - ) - - language: JavaScript - code: |- - const response = await client.transform.putTransform({ - transform_id: "ecommerce_transform2", - source: { - index: "kibana_sample_data_ecommerce", - }, - latest: { - unique_key: ["customer_id"], - sort: "order_date", - }, - description: "Latest order for each customer", - dest: { - index: "kibana_sample_data_ecommerce_transform2", - }, - frequency: "5m", - sync: { - time: { - field: "order_date", - delay: "60s", - }, - }, - }); - - language: Ruby - code: |- - response = client.transform.put_transform( - transform_id: "ecommerce_transform2", - body: { - "source": { - "index": "kibana_sample_data_ecommerce" - }, - "latest": { - "unique_key": [ - "customer_id" - ], - "sort": "order_date" - }, - "description": "Latest order for each customer", - "dest": { - "index": "kibana_sample_data_ecommerce_transform2" - }, - "frequency": "5m", - "sync": { - "time": { - "field": "order_date", - "delay": "60s" - } - } - } - ) - - language: PHP - code: |- - $resp = $client->transform()->putTransform([ - "transform_id" => "ecommerce_transform2", - "body" => [ - "source" => [ - "index" => "kibana_sample_data_ecommerce", - ], - "latest" => [ - "unique_key" => array( - "customer_id", - ), - "sort" => "order_date", - ], - "description" => "Latest order for each customer", - "dest" => [ - "index" => "kibana_sample_data_ecommerce_transform2", - ], - "frequency" => "5m", - "sync" => [ - "time" => [ - "field" => "order_date", - "delay" => "60s", - ], - ], - ], - ]); - - language: curl - code: - "curl -X PUT -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d - '{\"source\":{\"index\":\"kibana_sample_data_ecommerce\"},\"latest\":{\"unique_key\":[\"customer_id\"],\"sort\":\"order_date\ - \"},\"description\":\"Latest order for each - customer\",\"dest\":{\"index\":\"kibana_sample_data_ecommerce_transform2\"},\"frequency\":\"5m\",\"sync\":{\"time\":{\"field\ - \":\"order_date\",\"delay\":\"60s\"}}}' \"$ELASTICSEARCH_URL/_transform/ecommerce_transform2\"" - - language: Java - code: | - client.transform().putTransform(p -> p - .description("Latest order for each customer") - .dest(d -> d - .index("kibana_sample_data_ecommerce_transform2") - ) - .frequency(f -> f - .time("5m") - ) - .latest(l -> l - .sort("order_date") - .uniqueKey("customer_id") - ) - .source(s -> s - .index("kibana_sample_data_ecommerce") - ) - .sync(s -> s - .time(t -> t - .delay(d -> d - .time("60s") - ) - .field("order_date") - ) - ) - .transformId("ecommerce_transform2") - ); diff --git a/specification/transform/reset_transform/examples/request/TransformResetTransformExample1.yaml b/specification/transform/reset_transform/examples/request/TransformResetTransformExample1.yaml index 919b242b5e..ca1bd4d181 100644 --- a/specification/transform/reset_transform/examples/request/TransformResetTransformExample1.yaml +++ b/specification/transform/reset_transform/examples/request/TransformResetTransformExample1.yaml @@ -1,29 +1 @@ method_request: POST _transform/ecommerce_transform/_reset -alternatives: - - language: Python - code: |- - resp = client.transform.reset_transform( - transform_id="ecommerce_transform", - ) - - language: JavaScript - code: |- - const response = await client.transform.resetTransform({ - transform_id: "ecommerce_transform", - }); - - language: Ruby - code: |- - response = client.transform.reset_transform( - transform_id: "ecommerce_transform" - ) - - language: PHP - code: |- - $resp = $client->transform()->resetTransform([ - "transform_id" => "ecommerce_transform", - ]); - - language: curl - code: 'curl -X POST -H "Authorization: ApiKey $ELASTIC_API_KEY" "$ELASTICSEARCH_URL/_transform/ecommerce_transform/_reset"' - - language: Java - code: | - client.transform().resetTransform(r -> r - .transformId("ecommerce_transform") - ); diff --git a/specification/transform/schedule_now_transform/examples/request/TransformScheduleNowTransformExample1.yaml b/specification/transform/schedule_now_transform/examples/request/TransformScheduleNowTransformExample1.yaml index 03a278ff66..2d90b03137 100644 --- a/specification/transform/schedule_now_transform/examples/request/TransformScheduleNowTransformExample1.yaml +++ b/specification/transform/schedule_now_transform/examples/request/TransformScheduleNowTransformExample1.yaml @@ -1,29 +1 @@ method_request: POST _transform/ecommerce_transform/_schedule_now -alternatives: - - language: Python - code: |- - resp = client.transform.schedule_now_transform( - transform_id="ecommerce_transform", - ) - - language: JavaScript - code: |- - const response = await client.transform.scheduleNowTransform({ - transform_id: "ecommerce_transform", - }); - - language: Ruby - code: |- - response = client.transform.schedule_now_transform( - transform_id: "ecommerce_transform" - ) - - language: PHP - code: |- - $resp = $client->transform()->scheduleNowTransform([ - "transform_id" => "ecommerce_transform", - ]); - - language: curl - code: 'curl -X POST -H "Authorization: ApiKey $ELASTIC_API_KEY" "$ELASTICSEARCH_URL/_transform/ecommerce_transform/_schedule_now"' - - language: Java - code: | - client.transform().scheduleNowTransform(s -> s - .transformId("ecommerce_transform") - ); diff --git a/specification/transform/start_transform/examples/request/TransformStartTransformExample1.yaml b/specification/transform/start_transform/examples/request/TransformStartTransformExample1.yaml index cf5b554606..18bafb90ed 100644 --- a/specification/transform/start_transform/examples/request/TransformStartTransformExample1.yaml +++ b/specification/transform/start_transform/examples/request/TransformStartTransformExample1.yaml @@ -1,29 +1 @@ method_request: POST _transform/ecommerce-customer-transform/_start -alternatives: - - language: Python - code: |- - resp = client.transform.start_transform( - transform_id="ecommerce-customer-transform", - ) - - language: JavaScript - code: |- - const response = await client.transform.startTransform({ - transform_id: "ecommerce-customer-transform", - }); - - language: Ruby - code: |- - response = client.transform.start_transform( - transform_id: "ecommerce-customer-transform" - ) - - language: PHP - code: |- - $resp = $client->transform()->startTransform([ - "transform_id" => "ecommerce-customer-transform", - ]); - - language: curl - code: 'curl -X POST -H "Authorization: ApiKey $ELASTIC_API_KEY" "$ELASTICSEARCH_URL/_transform/ecommerce-customer-transform/_start"' - - language: Java - code: | - client.transform().startTransform(s -> s - .transformId("ecommerce-customer-transform") - ); diff --git a/specification/transform/stop_transform/examples/request/TransformStopTransformExample1.yaml b/specification/transform/stop_transform/examples/request/TransformStopTransformExample1.yaml index 385efa4689..12dc9d32b9 100644 --- a/specification/transform/stop_transform/examples/request/TransformStopTransformExample1.yaml +++ b/specification/transform/stop_transform/examples/request/TransformStopTransformExample1.yaml @@ -1,29 +1 @@ method_request: POST _transform/ecommerce_transform/_stop -alternatives: - - language: Python - code: |- - resp = client.transform.stop_transform( - transform_id="ecommerce_transform", - ) - - language: JavaScript - code: |- - const response = await client.transform.stopTransform({ - transform_id: "ecommerce_transform", - }); - - language: Ruby - code: |- - response = client.transform.stop_transform( - transform_id: "ecommerce_transform" - ) - - language: PHP - code: |- - $resp = $client->transform()->stopTransform([ - "transform_id" => "ecommerce_transform", - ]); - - language: curl - code: 'curl -X POST -H "Authorization: ApiKey $ELASTIC_API_KEY" "$ELASTICSEARCH_URL/_transform/ecommerce_transform/_stop"' - - language: Java - code: | - client.transform().stopTransform(s -> s - .transformId("ecommerce_transform") - ); diff --git a/specification/transform/update_transform/examples/request/UpdateTransformRequestExample1.yaml b/specification/transform/update_transform/examples/request/UpdateTransformRequestExample1.yaml index c3ae5f363f..7d3f85d99a 100644 --- a/specification/transform/update_transform/examples/request/UpdateTransformRequestExample1.yaml +++ b/specification/transform/update_transform/examples/request/UpdateTransformRequestExample1.yaml @@ -2,285 +2,28 @@ method_request: POST _transform/simple-kibana-ecomm-pivot/_update description: Run `POST _transform/simple-kibana-ecomm-pivot/_update` to update a transform that uses the pivot method. # type: request -value: - source: - index: kibana_sample_data_ecommerce - query: - term: - geoip.continent_name: - value: Asia - pivot: - group_by: - customer_id: - terms: - field: customer_id - missing_bucket: true - aggregations: - max_price: - max: - field: taxful_total_price - description: Maximum priced ecommerce data by customer_id in Asia - dest: - index: kibana_sample_data_ecommerce_transform1 - pipeline: add_timestamp_pipeline - frequency: 5m - sync: - time: - field: order_date - delay: 60s - retention_policy: - time: - field: order_date - max_age: 30d -alternatives: - - language: Python - code: |- - resp = client.transform.update_transform( - transform_id="simple-kibana-ecomm-pivot", - source={ - "index": "kibana_sample_data_ecommerce", - "query": { - "term": { - "geoip.continent_name": { - "value": "Asia" - } - } - } - }, - pivot={ - "group_by": { - "customer_id": { - "terms": { - "field": "customer_id", - "missing_bucket": True - } - } - }, - "aggregations": { - "max_price": { - "max": { - "field": "taxful_total_price" - } - } - } - }, - description="Maximum priced ecommerce data by customer_id in Asia", - dest={ - "index": "kibana_sample_data_ecommerce_transform1", - "pipeline": "add_timestamp_pipeline" - }, - frequency="5m", - sync={ - "time": { - "field": "order_date", - "delay": "60s" - } - }, - retention_policy={ - "time": { - "field": "order_date", - "max_age": "30d" - } - }, - ) - - language: JavaScript - code: |- - const response = await client.transform.updateTransform({ - transform_id: "simple-kibana-ecomm-pivot", - source: { - index: "kibana_sample_data_ecommerce", - query: { - term: { - "geoip.continent_name": { - value: "Asia", - }, - }, - }, - }, - pivot: { - group_by: { - customer_id: { - terms: { - field: "customer_id", - missing_bucket: true, - }, - }, - }, - aggregations: { - max_price: { - max: { - field: "taxful_total_price", - }, - }, - }, - }, - description: "Maximum priced ecommerce data by customer_id in Asia", - dest: { - index: "kibana_sample_data_ecommerce_transform1", - pipeline: "add_timestamp_pipeline", - }, - frequency: "5m", - sync: { - time: { - field: "order_date", - delay: "60s", - }, - }, - retention_policy: { - time: { - field: "order_date", - max_age: "30d", - }, - }, - }); - - language: Ruby - code: |- - response = client.transform.update_transform( - transform_id: "simple-kibana-ecomm-pivot", - body: { - "source": { - "index": "kibana_sample_data_ecommerce", - "query": { - "term": { - "geoip.continent_name": { - "value": "Asia" - } - } - } - }, - "pivot": { - "group_by": { - "customer_id": { - "terms": { - "field": "customer_id", - "missing_bucket": true - } - } - }, - "aggregations": { - "max_price": { - "max": { - "field": "taxful_total_price" - } - } - } - }, - "description": "Maximum priced ecommerce data by customer_id in Asia", - "dest": { - "index": "kibana_sample_data_ecommerce_transform1", - "pipeline": "add_timestamp_pipeline" - }, - "frequency": "5m", - "sync": { - "time": { - "field": "order_date", - "delay": "60s" - } - }, - "retention_policy": { - "time": { - "field": "order_date", - "max_age": "30d" - } +value: |- + { + "source": { + "index": "kibana_sample_data_ecommerce", + "query": { + "term": { + "geoip.continent_name": { + "value": "Asia" } } - ) - - language: PHP - code: |- - $resp = $client->transform()->updateTransform([ - "transform_id" => "simple-kibana-ecomm-pivot", - "body" => [ - "source" => [ - "index" => "kibana_sample_data_ecommerce", - "query" => [ - "term" => [ - "geoip.continent_name" => [ - "value" => "Asia", - ], - ], - ], - ], - "pivot" => [ - "group_by" => [ - "customer_id" => [ - "terms" => [ - "field" => "customer_id", - "missing_bucket" => true, - ], - ], - ], - "aggregations" => [ - "max_price" => [ - "max" => [ - "field" => "taxful_total_price", - ], - ], - ], - ], - "description" => "Maximum priced ecommerce data by customer_id in Asia", - "dest" => [ - "index" => "kibana_sample_data_ecommerce_transform1", - "pipeline" => "add_timestamp_pipeline", - ], - "frequency" => "5m", - "sync" => [ - "time" => [ - "field" => "order_date", - "delay" => "60s", - ], - ], - "retention_policy" => [ - "time" => [ - "field" => "order_date", - "max_age" => "30d", - ], - ], - ], - ]); - - language: curl - code: - "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d - '{\"source\":{\"index\":\"kibana_sample_data_ecommerce\",\"query\":{\"term\":{\"geoip.continent_name\":{\"value\":\"Asia\"}}}\ - },\"pivot\":{\"group_by\":{\"customer_id\":{\"terms\":{\"field\":\"customer_id\",\"missing_bucket\":true}}},\"aggregations\":{\ - \"max_price\":{\"max\":{\"field\":\"taxful_total_price\"}}}},\"description\":\"Maximum priced ecommerce data by customer_id in - Asia\",\"dest\":{\"index\":\"kibana_sample_data_ecommerce_transform1\",\"pipeline\":\"add_timestamp_pipeline\"},\"frequency\":\ - \"5m\",\"sync\":{\"time\":{\"field\":\"order_date\",\"delay\":\"60s\"}},\"retention_policy\":{\"time\":{\"field\":\"order_date\ - \",\"max_age\":\"30d\"}}}' \"$ELASTICSEARCH_URL/_transform/simple-kibana-ecomm-pivot/_update\"" - - language: Java - code: | - client.transform().updateTransform(u -> u - .description("Maximum priced ecommerce data by customer_id in Asia") - .dest(d -> d - .index("kibana_sample_data_ecommerce_transform1") - .pipeline("add_timestamp_pipeline") - ) - .frequency(f -> f - .time("5m") - ) - .retentionPolicy(r -> r - .time(t -> t - .field("order_date") - .maxAge(m -> m - .time("30d") - ) - ) - ) - .source(s -> s - .index("kibana_sample_data_ecommerce") - .query(q -> q - .term(te -> te - .field("geoip.continent_name") - .value(FieldValue.of("Asia")) - ) - ) - ) - .sync(sy -> sy - .time(ti -> ti - .delay(d -> d - .time("60s") - ) - .field("order_date") - ) - ) - .transformId("simple-kibana-ecomm-pivot") - ); + } + }, + "description": "Maximum priced ecommerce data by customer_id in Asia", + "dest": { + "index": "kibana_sample_data_ecommerce_transform_v2", + "pipeline": "add_timestamp_pipeline" + }, + "frequency": "15m", + "sync": { + "time": { + "field": "order_date", + "delay": "120s" + } + } + } diff --git a/specification/transform/upgrade_transforms/examples/request/TransformUpgradeTransformsExample1.yaml b/specification/transform/upgrade_transforms/examples/request/TransformUpgradeTransformsExample1.yaml index 892539710d..fdf4f3573b 100644 --- a/specification/transform/upgrade_transforms/examples/request/TransformUpgradeTransformsExample1.yaml +++ b/specification/transform/upgrade_transforms/examples/request/TransformUpgradeTransformsExample1.yaml @@ -1,15 +1 @@ method_request: POST _transform/_upgrade -alternatives: - - language: Python - code: resp = client.transform.upgrade_transforms() - - language: JavaScript - code: const response = await client.transform.upgradeTransforms(); - - language: Ruby - code: response = client.transform.upgrade_transforms - - language: PHP - code: $resp = $client->transform()->upgradeTransforms(); - - language: curl - code: 'curl -X POST -H "Authorization: ApiKey $ELASTIC_API_KEY" "$ELASTICSEARCH_URL/_transform/_upgrade"' - - language: Java - code: | - client.transform().upgradeTransforms(u -> u); diff --git a/specification/watcher/ack_watch/examples/request/WatcherAckWatchRequestExample1.yaml b/specification/watcher/ack_watch/examples/request/WatcherAckWatchRequestExample1.yaml index 95f7eb9b5e..458d9b7f68 100644 --- a/specification/watcher/ack_watch/examples/request/WatcherAckWatchRequestExample1.yaml +++ b/specification/watcher/ack_watch/examples/request/WatcherAckWatchRequestExample1.yaml @@ -1,29 +1 @@ method_request: POST _watcher/watch/my_watch/_ack -alternatives: - - language: Python - code: |- - resp = client.watcher.ack_watch( - watch_id="my_watch", - ) - - language: JavaScript - code: |- - const response = await client.watcher.ackWatch({ - watch_id: "my_watch", - }); - - language: Ruby - code: |- - response = client.watcher.ack_watch( - watch_id: "my_watch" - ) - - language: PHP - code: |- - $resp = $client->watcher()->ackWatch([ - "watch_id" => "my_watch", - ]); - - language: curl - code: 'curl -X POST -H "Authorization: ApiKey $ELASTIC_API_KEY" "$ELASTICSEARCH_URL/_watcher/watch/my_watch/_ack"' - - language: Java - code: | - client.watcher().ackWatch(a -> a - .watchId("my_watch") - ); diff --git a/specification/watcher/activate_watch/examples/request/WatcherActivateWatchExample1.yaml b/specification/watcher/activate_watch/examples/request/WatcherActivateWatchExample1.yaml index cdf1d281a5..902463d7c5 100644 --- a/specification/watcher/activate_watch/examples/request/WatcherActivateWatchExample1.yaml +++ b/specification/watcher/activate_watch/examples/request/WatcherActivateWatchExample1.yaml @@ -1,29 +1 @@ method_request: PUT _watcher/watch/my_watch/_activate -alternatives: - - language: Python - code: |- - resp = client.watcher.activate_watch( - watch_id="my_watch", - ) - - language: JavaScript - code: |- - const response = await client.watcher.activateWatch({ - watch_id: "my_watch", - }); - - language: Ruby - code: |- - response = client.watcher.activate_watch( - watch_id: "my_watch" - ) - - language: PHP - code: |- - $resp = $client->watcher()->activateWatch([ - "watch_id" => "my_watch", - ]); - - language: curl - code: 'curl -X PUT -H "Authorization: ApiKey $ELASTIC_API_KEY" "$ELASTICSEARCH_URL/_watcher/watch/my_watch/_activate"' - - language: Java - code: | - client.watcher().activateWatch(a -> a - .watchId("my_watch") - ); diff --git a/specification/watcher/deactivate_watch/examples/request/WatcherDeactivateWatchExample1.yaml b/specification/watcher/deactivate_watch/examples/request/WatcherDeactivateWatchExample1.yaml index 1310e48f45..1857a34e66 100644 --- a/specification/watcher/deactivate_watch/examples/request/WatcherDeactivateWatchExample1.yaml +++ b/specification/watcher/deactivate_watch/examples/request/WatcherDeactivateWatchExample1.yaml @@ -1,29 +1 @@ method_request: PUT _watcher/watch/my_watch/_deactivate -alternatives: - - language: Python - code: |- - resp = client.watcher.deactivate_watch( - watch_id="my_watch", - ) - - language: JavaScript - code: |- - const response = await client.watcher.deactivateWatch({ - watch_id: "my_watch", - }); - - language: Ruby - code: |- - response = client.watcher.deactivate_watch( - watch_id: "my_watch" - ) - - language: PHP - code: |- - $resp = $client->watcher()->deactivateWatch([ - "watch_id" => "my_watch", - ]); - - language: curl - code: 'curl -X PUT -H "Authorization: ApiKey $ELASTIC_API_KEY" "$ELASTICSEARCH_URL/_watcher/watch/my_watch/_deactivate"' - - language: Java - code: | - client.watcher().deactivateWatch(d -> d - .watchId("my_watch") - ); diff --git a/specification/watcher/delete_watch/examples/request/DeleteWatchRequestExample1.yaml b/specification/watcher/delete_watch/examples/request/DeleteWatchRequestExample1.yaml index f82fa983ee..af1cfc6370 100644 --- a/specification/watcher/delete_watch/examples/request/DeleteWatchRequestExample1.yaml +++ b/specification/watcher/delete_watch/examples/request/DeleteWatchRequestExample1.yaml @@ -1,29 +1 @@ method_request: DELETE _watcher/watch/my_watch -alternatives: - - language: Python - code: |- - resp = client.watcher.delete_watch( - id="my_watch", - ) - - language: JavaScript - code: |- - const response = await client.watcher.deleteWatch({ - id: "my_watch", - }); - - language: Ruby - code: |- - response = client.watcher.delete_watch( - id: "my_watch" - ) - - language: PHP - code: |- - $resp = $client->watcher()->deleteWatch([ - "id" => "my_watch", - ]); - - language: curl - code: 'curl -X DELETE -H "Authorization: ApiKey $ELASTIC_API_KEY" "$ELASTICSEARCH_URL/_watcher/watch/my_watch"' - - language: Java - code: | - client.watcher().deleteWatch(d -> d - .id("my_watch") - ); diff --git a/specification/watcher/execute_watch/examples/request/WatcherExecuteRequestExample1.yaml b/specification/watcher/execute_watch/examples/request/WatcherExecuteRequestExample1.yaml index 14e4abe6a6..80f1b47916 100644 --- a/specification/watcher/execute_watch/examples/request/WatcherExecuteRequestExample1.yaml +++ b/specification/watcher/execute_watch/examples/request/WatcherExecuteRequestExample1.yaml @@ -21,95 +21,3 @@ value: |- }, "record_execution" : true } -alternatives: - - language: Python - code: |- - resp = client.watcher.execute_watch( - id="my_watch", - trigger_data={ - "triggered_time": "now", - "scheduled_time": "now" - }, - alternative_input={ - "foo": "bar" - }, - ignore_condition=True, - action_modes={ - "my-action": "force_simulate" - }, - record_execution=True, - ) - - language: JavaScript - code: |- - const response = await client.watcher.executeWatch({ - id: "my_watch", - trigger_data: { - triggered_time: "now", - scheduled_time: "now", - }, - alternative_input: { - foo: "bar", - }, - ignore_condition: true, - action_modes: { - "my-action": "force_simulate", - }, - record_execution: true, - }); - - language: Ruby - code: |- - response = client.watcher.execute_watch( - id: "my_watch", - body: { - "trigger_data": { - "triggered_time": "now", - "scheduled_time": "now" - }, - "alternative_input": { - "foo": "bar" - }, - "ignore_condition": true, - "action_modes": { - "my-action": "force_simulate" - }, - "record_execution": true - } - ) - - language: PHP - code: |- - $resp = $client->watcher()->executeWatch([ - "id" => "my_watch", - "body" => [ - "trigger_data" => [ - "triggered_time" => "now", - "scheduled_time" => "now", - ], - "alternative_input" => [ - "foo" => "bar", - ], - "ignore_condition" => true, - "action_modes" => [ - "my-action" => "force_simulate", - ], - "record_execution" => true, - ], - ]); - - language: curl - code: - "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d - '{\"trigger_data\":{\"triggered_time\":\"now\",\"scheduled_time\":\"now\"},\"alternative_input\":{\"foo\":\"bar\"},\"ignore_c\ - ondition\":true,\"action_modes\":{\"my-action\":\"force_simulate\"},\"record_execution\":true}' - \"$ELASTICSEARCH_URL/_watcher/watch/my_watch/_execute\"" - - language: Java - code: | - client.watcher().executeWatch(e -> e - .actionModes("my-action", ActionExecutionMode.ForceSimulate) - .alternativeInput("foo", JsonData.fromJson("\"bar\"")) - .id("my_watch") - .ignoreCondition(true) - .recordExecution(true) - .triggerData(t -> t - .scheduledTime(DateTime.of("now")) - .triggeredTime(DateTime.of("now")) - ) - ); diff --git a/specification/watcher/execute_watch/examples/request/WatcherExecuteRequestExample2.yaml b/specification/watcher/execute_watch/examples/request/WatcherExecuteRequestExample2.yaml new file mode 100644 index 0000000000..1de0d20d82 --- /dev/null +++ b/specification/watcher/execute_watch/examples/request/WatcherExecuteRequestExample2.yaml @@ -0,0 +1,12 @@ +summary: Run a watch with multiple action modes +method_request: POST _watcher/watch/my_watch/_execute +description: > + Run `POST _watcher/watch/my_watch/_execute` and set a different mode for each action. +# type: request +value: |- + { + "action_modes" : { + "action1" : "force_simulate", + "action2" : "skip" + } + } diff --git a/specification/watcher/execute_watch/examples/request/WatcherExecuteRequestExample3.yaml b/specification/watcher/execute_watch/examples/request/WatcherExecuteRequestExample3.yaml new file mode 100644 index 0000000000..eca8437624 --- /dev/null +++ b/specification/watcher/execute_watch/examples/request/WatcherExecuteRequestExample3.yaml @@ -0,0 +1,34 @@ +summary: Run a watch inline +method_request: POST _watcher/watch/_execute +description: > + Run `POST _watcher/watch/_execute` to run a watch inline. All other settings for this API still apply when inlining a watch. In + this example, while the inline watch defines a compare condition, during the execution this condition will be ignored. +# type: request +value: |- + { + "watch" : { + "trigger" : { "schedule" : { "interval" : "10s" } }, + "input" : { + "search" : { + "request" : { + "indices" : [ "logs" ], + "body" : { + "query" : { + "match" : { "message": "error" } + } + } + } + } + }, + "condition" : { + "compare" : { "ctx.payload.hits.total" : { "gt" : 0 }} + }, + "actions" : { + "log_error" : { + "logging" : { + "text" : "Found {{ctx.payload.hits.total}} errors in the logs" + } + } + } + } + } diff --git a/specification/watcher/get_settings/examples/request/WatcherGetSettingsExample1.yaml b/specification/watcher/get_settings/examples/request/WatcherGetSettingsExample1.yaml index 253c170bb6..1ab70df900 100644 --- a/specification/watcher/get_settings/examples/request/WatcherGetSettingsExample1.yaml +++ b/specification/watcher/get_settings/examples/request/WatcherGetSettingsExample1.yaml @@ -1,15 +1 @@ method_request: GET /_watcher/settings -alternatives: - - language: Python - code: resp = client.watcher.get_settings() - - language: JavaScript - code: const response = await client.watcher.getSettings(); - - language: Ruby - code: response = client.watcher.get_settings - - language: PHP - code: $resp = $client->watcher()->getSettings(); - - language: curl - code: 'curl -X GET -H "Authorization: ApiKey $ELASTIC_API_KEY" "$ELASTICSEARCH_URL/_watcher/settings"' - - language: Java - code: | - client.watcher().getSettings(g -> g); diff --git a/specification/watcher/get_watch/examples/request/GetWatchRequestExample1.yaml b/specification/watcher/get_watch/examples/request/GetWatchRequestExample1.yaml index b0b3d735e6..6c9874e82e 100644 --- a/specification/watcher/get_watch/examples/request/GetWatchRequestExample1.yaml +++ b/specification/watcher/get_watch/examples/request/GetWatchRequestExample1.yaml @@ -1,29 +1 @@ method_request: GET _watcher/watch/my_watch -alternatives: - - language: Python - code: |- - resp = client.watcher.get_watch( - id="my_watch", - ) - - language: JavaScript - code: |- - const response = await client.watcher.getWatch({ - id: "my_watch", - }); - - language: Ruby - code: |- - response = client.watcher.get_watch( - id: "my_watch" - ) - - language: PHP - code: |- - $resp = $client->watcher()->getWatch([ - "id" => "my_watch", - ]); - - language: curl - code: 'curl -X GET -H "Authorization: ApiKey $ELASTIC_API_KEY" "$ELASTICSEARCH_URL/_watcher/watch/my_watch"' - - language: Java - code: | - client.watcher().getWatch(g -> g - .id("my_watch") - ); diff --git a/specification/watcher/put_watch/examples/request/WatcherPutWatchRequestExample1.yaml b/specification/watcher/put_watch/examples/request/WatcherPutWatchRequestExample1.yaml index 57f497c379..bf755c50bc 100644 --- a/specification/watcher/put_watch/examples/request/WatcherPutWatchRequestExample1.yaml +++ b/specification/watcher/put_watch/examples/request/WatcherPutWatchRequestExample1.yaml @@ -50,272 +50,3 @@ value: |- } } } -alternatives: - - language: Python - code: |- - resp = client.watcher.put_watch( - id="my-watch", - trigger={ - "schedule": { - "cron": "0 0/1 * * * ?" - } - }, - input={ - "search": { - "request": { - "indices": [ - "logstash*" - ], - "body": { - "query": { - "bool": { - "must": { - "match": { - "response": 404 - } - }, - "filter": { - "range": { - "@timestamp": { - "from": "{{ctx.trigger.scheduled_time}}||-5m", - "to": "{{ctx.trigger.triggered_time}}" - } - } - } - } - } - } - } - } - }, - condition={ - "compare": { - "ctx.payload.hits.total": { - "gt": 0 - } - } - }, - actions={ - "email_admin": { - "email": { - "to": "admin@domain.host.com", - "subject": "404 recently encountered" - } - } - }, - ) - - language: JavaScript - code: |- - const response = await client.watcher.putWatch({ - id: "my-watch", - trigger: { - schedule: { - cron: "0 0/1 * * * ?", - }, - }, - input: { - search: { - request: { - indices: ["logstash*"], - body: { - query: { - bool: { - must: { - match: { - response: 404, - }, - }, - filter: { - range: { - "@timestamp": { - from: "{{ctx.trigger.scheduled_time}}||-5m", - to: "{{ctx.trigger.triggered_time}}", - }, - }, - }, - }, - }, - }, - }, - }, - }, - condition: { - compare: { - "ctx.payload.hits.total": { - gt: 0, - }, - }, - }, - actions: { - email_admin: { - email: { - to: "admin@domain.host.com", - subject: "404 recently encountered", - }, - }, - }, - }); - - language: Ruby - code: |- - response = client.watcher.put_watch( - id: "my-watch", - body: { - "trigger": { - "schedule": { - "cron": "0 0/1 * * * ?" - } - }, - "input": { - "search": { - "request": { - "indices": [ - "logstash*" - ], - "body": { - "query": { - "bool": { - "must": { - "match": { - "response": 404 - } - }, - "filter": { - "range": { - "@timestamp": { - "from": "{{ctx.trigger.scheduled_time}}||-5m", - "to": "{{ctx.trigger.triggered_time}}" - } - } - } - } - } - } - } - } - }, - "condition": { - "compare": { - "ctx.payload.hits.total": { - "gt": 0 - } - } - }, - "actions": { - "email_admin": { - "email": { - "to": "admin@domain.host.com", - "subject": "404 recently encountered" - } - } - } - } - ) - - language: PHP - code: |- - $resp = $client->watcher()->putWatch([ - "id" => "my-watch", - "body" => [ - "trigger" => [ - "schedule" => [ - "cron" => "0 0/1 * * * ?", - ], - ], - "input" => [ - "search" => [ - "request" => [ - "indices" => array( - "logstash*", - ), - "body" => [ - "query" => [ - "bool" => [ - "must" => [ - "match" => [ - "response" => 404, - ], - ], - "filter" => [ - "range" => [ - "@timestamp" => [ - "from" => "{{ctx.trigger.scheduled_time}}||-5m", - "to" => "{{ctx.trigger.triggered_time}}", - ], - ], - ], - ], - ], - ], - ], - ], - ], - "condition" => [ - "compare" => [ - "ctx.payload.hits.total" => [ - "gt" => 0, - ], - ], - ], - "actions" => [ - "email_admin" => [ - "email" => [ - "to" => "admin@domain.host.com", - "subject" => "404 recently encountered", - ], - ], - ], - ], - ]); - - language: curl - code: - "curl -X PUT -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d - '{\"trigger\":{\"schedule\":{\"cron\":\"0 0/1 * * * - ?\"}},\"input\":{\"search\":{\"request\":{\"indices\":[\"logstash*\"],\"body\":{\"query\":{\"bool\":{\"must\":{\"match\":{\"r\ - esponse\":404}},\"filter\":{\"range\":{\"@timestamp\":{\"from\":\"{{ctx.trigger.scheduled_time}}||-5m\",\"to\":\"{{ctx.trigge\ - r.triggered_time}}\"}}}}}}}}},\"condition\":{\"compare\":{\"ctx.payload.hits.total\":{\"gt\":0}}},\"actions\":{\"email_admin\ - \":{\"email\":{\"to\":\"admin@domain.host.com\",\"subject\":\"404 recently encountered\"}}}}' - \"$ELASTICSEARCH_URL/_watcher/watch/my-watch\"" - - language: Java - code: | - client.watcher().putWatch(p -> p - .actions("email_admin", a -> a - .email(e -> e - .subject("404 recently encountered") - .to("admin@domain.host.com") - ) - ) - .condition(c -> c - .compare(NamedValue.of("ctx.payload.hits.total",Pair.of(ConditionOp.Gt,FieldValue.of(0)))) - ) - .id("my-watch") - .input(i -> i - .search(s -> s - .request(r -> r - .body(b -> b - .query(q -> q - .bool(bo -> bo - .filter(f -> f - .range(ra -> ra - .untyped(u -> u - .field("@timestamp") - ) - ) - ) - .must(m -> m - .match(ma -> ma - .field("response") - .query(FieldValue.of(404)) - ) - ) - ) - ) - ) - .indices("logstash*") - ) - ) - ) - .trigger(t -> t - .schedule(sc -> sc - .cron("0 0/1 * * * ?") - ) - ) - ); diff --git a/specification/watcher/query_watches/examples/request/WatcherQueryWatchesRequestExample1.yaml b/specification/watcher/query_watches/examples/request/WatcherQueryWatchesRequestExample1.yaml index 916f360cea..e3621c8fd9 100644 --- a/specification/watcher/query_watches/examples/request/WatcherQueryWatchesRequestExample1.yaml +++ b/specification/watcher/query_watches/examples/request/WatcherQueryWatchesRequestExample1.yaml @@ -1,15 +1 @@ method_request: GET /_watcher/_query/watches -alternatives: - - language: Python - code: resp = client.watcher.query_watches() - - language: JavaScript - code: const response = await client.watcher.queryWatches(); - - language: Ruby - code: response = client.watcher.query_watches - - language: PHP - code: $resp = $client->watcher()->queryWatches(); - - language: curl - code: 'curl -X GET -H "Authorization: ApiKey $ELASTIC_API_KEY" "$ELASTICSEARCH_URL/_watcher/_query/watches"' - - language: Java - code: | - client.watcher().queryWatches(); diff --git a/specification/watcher/start/examples/request/WatcherStartRequestExample1.yaml b/specification/watcher/start/examples/request/WatcherStartRequestExample1.yaml index 73f9b5906b..460c900873 100644 --- a/specification/watcher/start/examples/request/WatcherStartRequestExample1.yaml +++ b/specification/watcher/start/examples/request/WatcherStartRequestExample1.yaml @@ -1,15 +1 @@ method_request: POST _watcher/_start -alternatives: - - language: Python - code: resp = client.watcher.start() - - language: JavaScript - code: const response = await client.watcher.start(); - - language: Ruby - code: response = client.watcher.start - - language: PHP - code: $resp = $client->watcher()->start(); - - language: curl - code: 'curl -X POST -H "Authorization: ApiKey $ELASTIC_API_KEY" "$ELASTICSEARCH_URL/_watcher/_start"' - - language: Java - code: | - client.watcher().start(s -> s); diff --git a/specification/watcher/stats/examples/request/WatcherStatsRequestExample1.yaml b/specification/watcher/stats/examples/request/WatcherStatsRequestExample1.yaml index 91054d83e2..ff8b145c37 100644 --- a/specification/watcher/stats/examples/request/WatcherStatsRequestExample1.yaml +++ b/specification/watcher/stats/examples/request/WatcherStatsRequestExample1.yaml @@ -1,15 +1 @@ method_request: GET _watcher/stats -alternatives: - - language: Python - code: resp = client.watcher.stats() - - language: JavaScript - code: const response = await client.watcher.stats(); - - language: Ruby - code: response = client.watcher.stats - - language: PHP - code: $resp = $client->watcher()->stats(); - - language: curl - code: 'curl -X GET -H "Authorization: ApiKey $ELASTIC_API_KEY" "$ELASTICSEARCH_URL/_watcher/stats"' - - language: Java - code: | - client.watcher().stats(s -> s); diff --git a/specification/watcher/stop/examples/request/WatcherStopRequestExample1.yaml b/specification/watcher/stop/examples/request/WatcherStopRequestExample1.yaml index 6b3e09209c..7bc9342704 100644 --- a/specification/watcher/stop/examples/request/WatcherStopRequestExample1.yaml +++ b/specification/watcher/stop/examples/request/WatcherStopRequestExample1.yaml @@ -1,15 +1 @@ method_request: POST _watcher/_stop -alternatives: - - language: Python - code: resp = client.watcher.stop() - - language: JavaScript - code: const response = await client.watcher.stop(); - - language: Ruby - code: response = client.watcher.stop - - language: PHP - code: $resp = $client->watcher()->stop(); - - language: curl - code: 'curl -X POST -H "Authorization: ApiKey $ELASTIC_API_KEY" "$ELASTICSEARCH_URL/_watcher/_stop"' - - language: Java - code: | - client.watcher().stop(s -> s); diff --git a/specification/watcher/update_settings/examples/request/WatcherUpdateSettingsRequestExample1.yaml b/specification/watcher/update_settings/examples/request/WatcherUpdateSettingsRequestExample1.yaml index 72bb3a01c2..ea2309603b 100644 --- a/specification/watcher/update_settings/examples/request/WatcherUpdateSettingsRequestExample1.yaml +++ b/specification/watcher/update_settings/examples/request/WatcherUpdateSettingsRequestExample1.yaml @@ -4,37 +4,3 @@ method_request: PUT /_watcher/settings value: index.auto_expand_replicas: 0-4 -alternatives: - - language: Python - code: |- - resp = client.watcher.update_settings( - index.auto_expand_replicas="0-4", - ) - - language: JavaScript - code: |- - const response = await client.watcher.updateSettings({ - "index.auto_expand_replicas": "0-4", - }); - - language: Ruby - code: |- - response = client.watcher.update_settings( - body: { - "index.auto_expand_replicas": "0-4" - } - ) - - language: PHP - code: |- - $resp = $client->watcher()->updateSettings([ - "body" => [ - "index.auto_expand_replicas" => "0-4", - ], - ]); - - language: curl - code: - 'curl -X PUT -H "Authorization: ApiKey $ELASTIC_API_KEY" -H "Content-Type: application/json" -d - ''{"index.auto_expand_replicas":"0-4"}'' "$ELASTICSEARCH_URL/_watcher/settings"' - - language: Java - code: | - client.watcher().updateSettings(u -> u - .indexAutoExpandReplicas("0-4") - ); diff --git a/specification/xpack/info/examples/request/XPackInfoRequestExample1.yaml b/specification/xpack/info/examples/request/XPackInfoRequestExample1.yaml index c4f5c76cff..5a9b53dc54 100644 --- a/specification/xpack/info/examples/request/XPackInfoRequestExample1.yaml +++ b/specification/xpack/info/examples/request/XPackInfoRequestExample1.yaml @@ -1,15 +1 @@ method_request: GET /_xpack -alternatives: - - language: Python - code: resp = client.xpack.info() - - language: JavaScript - code: const response = await client.xpack.info(); - - language: Ruby - code: response = client.xpack.info - - language: PHP - code: $resp = $client->xpack()->info(); - - language: curl - code: 'curl -X GET -H "Authorization: ApiKey $ELASTIC_API_KEY" "$ELASTICSEARCH_URL/_xpack"' - - language: Java - code: | - client.xpack().info(i -> i); diff --git a/specification/xpack/usage/examples/request/XPackUsageRequestExample1.yaml b/specification/xpack/usage/examples/request/XPackUsageRequestExample1.yaml index 2d2f845070..7d5b9e797c 100644 --- a/specification/xpack/usage/examples/request/XPackUsageRequestExample1.yaml +++ b/specification/xpack/usage/examples/request/XPackUsageRequestExample1.yaml @@ -1,15 +1 @@ method_request: GET /_xpack/usage -alternatives: - - language: Python - code: resp = client.xpack.usage() - - language: JavaScript - code: const response = await client.xpack.usage(); - - language: Ruby - code: response = client.xpack.usage - - language: PHP - code: $resp = $client->xpack()->usage(); - - language: curl - code: 'curl -X GET -H "Authorization: ApiKey $ELASTIC_API_KEY" "$ELASTICSEARCH_URL/_xpack/usage"' - - language: Java - code: | - client.xpack().usage(u -> u); diff --git a/typescript-generator/src/metamodel.ts b/typescript-generator/src/metamodel.ts index a645eb8341..26f47a9895 100644 --- a/typescript-generator/src/metamodel.ts +++ b/typescript-generator/src/metamodel.ts @@ -443,6 +443,7 @@ export class Endpoint { docId?: string extDocId?: string extDocUrl?: string + extDocDescription?: string extPreviousVersionDocUrl?: string deprecation?: Deprecation availability: Availabilities