Commit graph

5 commits

Author SHA1 Message Date
natasha-moore-elastic
f0f1775632
[DOCS ]Direct users to new API reference site (#195909)
## Summary

Contributes to
https://github.com/elastic/security-docs-internal/issues/48.

Add callouts to the asciidoc Osquery API docs to direct users to the new
API reference site, in preparation for retiring the asciidoc API docs.

NOTE: The api-kibana variable is defined in version-specific files. In
[8.15.asciidoc](873ec2c47f/shared/versions/stack/8.15.asciidoc (L74))
and
[8.x.asciidoc](873ec2c47f/shared/versions/stack/8.x.asciidoc (L75)),
the variable points to the [v8
branch](https://www.elastic.co/docs/api/doc/kibana/v8) of the API
reference, which currently doesn't include Security API docs. The v8
branch is derived from the "current" Kibana branch, which is currently
8.15. This likely means that we can only backport the callouts to 8.16
once 8.16 becomes the "current" docs version.

Preview: [Osquery manager
API](https://kibana_bk_195909.docs-preview.app.elstc.co/guide/en/kibana/master/osquery-manager-api.html)
and all its child pages
2024-10-15 16:29:05 +01:00
natasha-moore-elastic
86a31db057
[DOCS] Documents Osquery Timeout setting (#174595)
Contributes to https://github.com/elastic/security-docs/issues/4536 by
documenting the new **Timeout** setting and `timeout` API parameter in
Osquery docs.

---------

Co-authored-by: nastasha.solomon <nastasha.solomon@elastic.co>
Co-authored-by: Benjamin Ironside Goldstein <91905639+benironside@users.noreply.github.com>
2024-01-17 15:29:23 +00:00
Konrad Szwarc
ee26923aab
[Defend Workflows] Fix saved queries 500 (#150426)
**Bug** 
Calling `/api/osquery/saved_queries` with `sortOrder` but without `sort`
field (`/api/osquery/saved_queries?sortOrder=desc`) was causing 500
server error. Same with calls without any parameters
(`/api/osquery/saved_queries`)

**Cause**
We had defaults failover set for `sortOrder` but not for `sort`. Sorting
logic required both fields to be defined. All schema params were set to
optional and we were validating them ourselves.

**Fix** 
I've tightened the schema by making all the params required and provided
default values if not provided.
`page: schema.number({ defaultValue: 1 }),
sort: schema.string({ defaultValue: 'id' }),
sortOrder: schema.oneOf([schema.literal('asc'), schema.literal('desc')],
{defaultValue: 'desc',}),`

**Additionally** 
Outdated osQuery API docs - `perPage` became `pageSize` and `sortField`
became `sort`. Also, minor spelling fixes.

---------

Co-authored-by: Patryk Kopyciński <contact@patrykkopycinski.com>
2023-02-14 16:11:14 +01:00
Kaarina Tungseth
be498a5c58
[DOCS] Fixes formatting in the Osquery manager APIs (#149871)
## Summary

Fixes the formatting of the rogue `Query parameters` sections.
2023-01-30 12:41:10 -06:00
Patryk Kopyciński
33689abc77
[Osquery] Add docs for Osquery API (#137162) 2022-08-09 18:43:31 +02:00