For software/titles and software/versions endpoints, the browser property is no longer included in the response when empty. (#16126)

For `software/titles` and `software/versions` endpoints, the `browser`
property is no longer included in the response when empty.
#16056

# Checklist for submitter
<!-- Note that API documentation changes are now addressed by the
product design team. -->

- [x] Changes file added for user-visible changes in `changes/` or
`orbit/changes/`.
See [Changes
files](https://fleetdm.com/docs/contributing/committing-changes#changes-files)
for more information.
- [x] Added/updated tests
- [x] Manual QA for all new/changed functionality
This commit is contained in:
Victor Lyuboslavsky 2024-01-16 10:33:03 -06:00 committed by GitHub
parent ac068f85c8
commit f0154608fd
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 2 additions and 5 deletions

View file

@ -0,0 +1 @@
For `software/titles` and `software/versions` endpoints, the `browser` property is no longer included in the response when empty.

View file

@ -667,7 +667,6 @@ spec:
id: 0
name: foo
source: chrome_extensions
browser: ""
versions:
- id: 0
version: 0.0.1
@ -687,7 +686,6 @@ spec:
id: 0
name: bar
source: deb_packages
browser: ""
versions:
- id: 0
version: 0.0.3
@ -704,7 +702,6 @@ spec:
"id": 0,
"name": "foo",
"source": "chrome_extensions",
"browser": "",
"hosts_count": 2,
"versions_count": 3,
"versions": [
@ -736,7 +733,6 @@ spec:
"id": 0,
"name": "bar",
"source": "deb_packages",
"browser": "",
"hosts_count": 0,
"versions_count": 1,
"versions": [

View file

@ -137,7 +137,7 @@ type SoftwareTitle struct {
// Source is the source reported by osquery.
Source string `json:"source" db:"source"`
// Browser is the browser type (e.g., "chrome", "firefox", "safari")
Browser string `json:"browser" db:"browser"`
Browser string `json:"browser,omitempty" db:"browser"`
// HostsCount is the number of hosts that use this software title.
HostsCount uint `json:"hosts_count" db:"hosts_count"`
// VesionsCount is the number of versions that have the same title.