Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions docs/REST API/rest-api.md
Original file line number Diff line number Diff line change
Expand Up @@ -9681,6 +9681,7 @@ Returns a list of all operating systems.
| platform | string | query | Filters the hosts to the specified platform |
| os_name | string | query | The name of the operating system to filter hosts by. `os_version` must also be specified with `os_name` |
| os_version | string | query | The version of the operating system to filter hosts by. `os_name` must also be specified with `os_version` |
| max_vulnerabilities | integer | query | Limits the number of `vulnerabilities` returned per OS version. (If omitted, returns all vulnerabilities.) |
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Dev note

New optional parameter. The UI sets this to 3.

If 0, vulnerabilities list is an empty array.

If <0, returns an error: "max_vulnerabilities must be >= 0"

| page | integer | query | Page number of the results to fetch. |
| per_page | integer | query | Results per page. |
| order_key | string | query | What to order results by. Allowed fields are: `hosts_count`. Default is `hosts_count` (descending). |
Expand All @@ -9704,6 +9705,7 @@ Returns a list of all operating systems.
"version": "10.0.22621.1234",
"platform": "windows",
"generated_cpes": [],
"vulnerabilities_count": 1,
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Dev note

Add count.

The UI uses this number for the vuln counts in the table, and for calculating the "+ ___ more" text in the tooltip
image

"vulnerabilities": [
Comment thread
rachaelshaw marked this conversation as resolved.
{
"cve": "CVE-2022-30190",
Expand Down Expand Up @@ -10003,6 +10005,7 @@ Retrieves information about the specified operating system (OS) version.
| ---- | ---- | -- | ----------- |
| id | integer | path | **Required.** The OS version's ID. |
| team_id | integer | query | _Available in Fleet Premium_. Filters response data to the specified team. Use `0` to filter by hosts assigned to "No team". |
| max_vulnerabilities | integer | query | Limits the number of `vulnerabilities` returned. (If omitted, returns all vulnerabilities.) For Linux OS's, doesn't limit the number of vulnerabilities returned in the `kernels` array. |

##### Default response

Expand Down
Loading