Added/updated snippets for docs (#2318)
This commit is contained in:
41
docs/doc_examples/2b5c69778eb3daba9fbd7242bcc2daf9.asciidoc
Normal file
41
docs/doc_examples/2b5c69778eb3daba9fbd7242bcc2daf9.asciidoc
Normal file
@ -0,0 +1,41 @@
|
||||
// This file is autogenerated, DO NOT EDIT
|
||||
// Use `node scripts/generate-docs-examples.js` to generate the docs examples
|
||||
|
||||
[source, js]
|
||||
----
|
||||
const response = await client.security.queryApiKeys({
|
||||
size: 0,
|
||||
query: {
|
||||
bool: {
|
||||
filter: {
|
||||
term: {
|
||||
invalidated: true,
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
aggs: {
|
||||
invalidated_keys: {
|
||||
composite: {
|
||||
sources: [
|
||||
{
|
||||
username: {
|
||||
terms: {
|
||||
field: "username",
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
key_name: {
|
||||
terms: {
|
||||
field: "name",
|
||||
},
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
},
|
||||
},
|
||||
});
|
||||
console.log(response);
|
||||
----
|
||||
Reference in New Issue
Block a user