Commit Graph
427 Commits
Author SHA1 Message Date
Gray Williams 5370bd2283 Update rest-api.md list hosts targeted in batch script (#50291)
Adds required to `status`

Resolves #50290
2026-07-31 17:21:37 -05:00
Rachael ShawandJuan Fernandez 56653202b4 #38670 API design: Policy status page (#46791)
> WIP

For user story:
+ #38670

---------

Co-authored-by: Juan Fernandez <juan@fleetdm.com>
2026-07-28 14:16:07 -05:00
Noah TalermanandRachael Shaw 42c0e4f408 Move "Install self-service software" endpoint to public REST API docs (#49618)
<!-- Add the related story/sub-task/bug number, like Resolves #123, or
remove if NA -->
**Related issue:** N/A

# Checklist for submitter

- [ ] Input data is properly validated, `SELECT *` is avoided, SQL
injection is prevented (using placeholders for values in statements), JS
inline code is prevented especially for url redirects, and untrusted
data interpolated into shell scripts/commands is validated against shell
metacharacters.

## Summary

Moves the `POST
/api/v1/fleet/device/{token}/software/install/{software_title_id}`
("Install self-service software") endpoint out of the contributor-only
API reference (`docs/Contributing/reference/api-for-contributors.md`)
and into the public REST API docs (`docs/REST API/rest-api.md`), nested
under the existing `## Software` section.

- Added `### Install self-service software` to `docs/REST
API/rest-api.md`, right after `### Uninstall software`, with a TOC entry
and a note that it uses the device's authentication token instead of the
usual Fleet API token.
- Removed the TOC entry and body section for this endpoint from
`docs/Contributing/reference/api-for-contributors.md`. Sibling
device-authenticated self-service endpoints were left in place there
since only this one endpoint was moved.

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

* **New Features**
* Added an API route allowing Fleet Desktop users to initiate
self-service software installations using a device token and software
title.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Co-authored-by: Rachael Shaw <r@rachael.wtf>
2026-07-22 18:51:50 -05:00
Nico b10642be3c 44954 custom host vitals (#49334)
<!-- Add the related story/sub-task/bug number, like Resolves #123, or
remove if NA -->
**Related issue:** Resolves #44954 

# Checklist for submitter

- [x] Changes file added for user-visible changes in `changes/`,
`orbit/changes/` or `ee/fleetd-chrome/changes`.
See [Changes
files](https://github.com/fleetdm/fleet/blob/main/docs/Contributing/guides/committing-changes.md#changes-files)
for more information.

## Testing

- [x] Added/updated automated tests
- [x] QA'd all new/changed functionality manually


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

* **New Features**
* Added Custom Host Vitals management (create/edit/delete, search) with
copyable variable tokens and per-host values.
* Show Custom Host Vitals on host details, including role-based editing.
* Enabled Custom Host Vitals in host-vitals labels and the activity
feed.
* Extended GitOps to manage global Custom Host Vitals declaratively
(including dry-run behavior).
* Split Controls → Variables into Global Variables and Custom Host
Vitals, including routing updates.

* **Bug Fixes**
* Improved validation and expansion of Custom Host Vital references
across scripts, profiles, installers, and deployments, with clearer
failures when values are missing or invalid.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2026-07-15 19:35:27 -03:00
5f1d694782 v4.89.0 doc changes (#48668)
Documentation changes for 4.89.0

---------

Co-authored-by: Noah Talerman <47070608+noahtalerman@users.noreply.github.com>
Co-authored-by: melpike <79950145+melpike@users.noreply.github.com>
Co-authored-by: Lucas Manuel Rodriguez <lucas@fleetdm.com>
Co-authored-by: Mike Thomas <78363703+mike-j-thomas@users.noreply.github.com>
Co-authored-by: Carlo <1778532+cdcme@users.noreply.github.com>
Co-authored-by: Marko Lisica <83164494+marko-lisica@users.noreply.github.com>
2026-07-15 11:22:35 -07:00
Rachael Shaw f712491a48 Docs: Fix formatting for features config (#49310) 2026-07-14 17:06:59 -05:00
+3 c9803c2a8f Docs: non-proxied cert renewal (#45695)
**Related issue:** Resolves #44348

**Base branch:** `docs-v4.86.0` (not `main`) per the docs release
process.

## What this PR does

Updates four customer-facing guides and adds a release-notes entry for
Phase 2's opt-in cert renewal feature (shipped via #45696). Frames the
marker as an opt-in enhancement: profiles without it continue to work as
in 4.85; profiles with it activate auto-renewal.

| Guide | Change |
|-------|--------|
| `connect-end-user-to-wifi-with-certificate.md` | Migrated 11 legacy
`\$FLEET_VAR_SCEP_RENEWAL_ID` refs to the preferred name; added
back-compat callout. |
| `okta-conditional-access-integration.md` | Removed "Automatic renewal
coming soon" line; added one-time upgrade-redeploy callout for existing
customers. |
| `enable-okta-verify-on-macOS-with-configuration-profile.md` | Added
marker to example profile OU; added opt-in note and CA-side
OU-preservation verification step. Coordinated with the earlier
example-profile update from #43293 already on `docs-v4.86.0`. |
| `enable-okta-verify-on-windows-using-a-scep-configuration-profile.md`
| Replaced manual-redeployment narrative with auto-renewal guidance.
Kept the policy-based expiry-monitoring SQL as an optional safeguard. |

Release-notes entry (`changes/40639-non-proxied-cert-renewal`)
consolidates Phase 2 customer-visible behavior in three bullets.

## Dependencies

The Conditional Access guide's "new setups: no extra action needed"
framing assumes #45662 (the Fleet-side template marker addition) has
landed — it has, merged into the feature branch and onward into main via
#45696.

# Checklist for submitter

- [x] Changes file added for user-visible changes

## Testing

- [x] Doc review only — no code changes

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

* **New Features**
* Automatic certificate renewal is now supported for SCEP and ACME
certificates from external certificate authorities, enabled by default
for new deployments with an opt-in path for existing customers
* macOS devices with ACME-bearing configuration profiles will now
surface hardware-bound certificates in device vitals

<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Co-authored-by: Rachael Shaw <r@rachael.wtf>
Co-authored-by: Marko Lisica <83164494+marko-lisica@users.noreply.github.com>
Co-authored-by: kilo-code-bot[bot] <240665456+kilo-code-bot[bot]@users.noreply.github.com>
Co-authored-by: kiloconnect[bot] <240665456+kiloconnect[bot]@users.noreply.github.com>
Co-authored-by: melpike <79950145+melpike@users.noreply.github.com>
Co-authored-by: Noah Talerman <47070608+noahtalerman@users.noreply.github.com>
Co-authored-by: Jordan Montgomery <elijah.jordan.montgomery@gmail.com>
Co-authored-by: Jonathan Katz <44128041+jkatz01@users.noreply.github.com>
Co-authored-by: Victor Lyuboslavsky <2685025+getvictor@users.noreply.github.com>
Co-authored-by: Magnus Jensen <magnus@fleetdm.com>
Co-authored-by: RachelElysia <71795832+RachelElysia@users.noreply.github.com>
Co-authored-by: Scott Gress <scottmgress@gmail.com>
2026-07-10 17:37:50 -05:00
078fbc0f40 Add Targeted platforms column and platform filter to Policies page (#44125)
- @noahtalerman: For the following quick win:
  - https://github.com/fleetdm/fleet/issues/23737

## Summary

Adds a "Targeted platforms" column and a platform filter dropdown to the
Policies page (`/policies/manage`), matching the pattern already used on
the Reports page (`/queries/manage`, `ManageQueriesPage`).

### Frontend
- New non-sortable **Targeted platforms** column rendered via
`PlatformCell`, sourced from each policy's comma-separated `platform`
field.
- New platform filter dropdown (All / macOS / Windows / Linux /
ChromeOS) wired as a `customControl` on the Policies table, alongside
the existing automation filter. Selecting a value pushes a new URL (not
a replace), resets `page` to 0, and updates the `platform` query param.
- `ManagePoliciesPage` reads `location.query.platform` and threads it
through to both `globalPoliciesAPI.loadAll` / `teamPoliciesAPI.loadAll`
and the react-query keys, plus the count endpoints. The
automation-filter and count "hide" conditions now include the platform
filter so they remain visible when only a platform filter is active.
- `frontend/services/entities/global_policies.ts` and `team_policies.ts`
accept an optional `platform` param (with `"all"` normalized to
`undefined`).
- Added tests for the new column and dropdown in
`PoliciesTable.tests.tsx`.

### Backend
- Added `Platform string ` + `` `query:"platform,optional"` `` to
`ListGlobalPoliciesRequest`, `CountGlobalPoliciesRequest`,
`ListTeamPoliciesRequest`, `CountTeamPoliciesRequest`.
- Extended datastore and service signatures (`ListGlobalPolicies`,
`ListTeamPolicies`, `ListMergedTeamPolicies`, `CountPolicies`,
`CountMergedTeamPolicies`, `ListGlobalPolicies`/`ListTeamPolicies` on
the service) to accept a `platform string` arg. Mocks and all call sites
updated.
- Platform filtering in SQL uses a new helper `platformFilterClause`:
  ```sql
  AND (p.platforms = '' OR FIND_IN_SET(?, p.platforms))
  ```
so policies targeting "all platforms" (empty `platforms` field) always
match regardless of the selected filter. `FIND_IN_SET` uses a bound
parameter (no injection risk).
- Added a new MySQL integration test `testPoliciesPlatformFilter`
covering empty-platform (match-all), per-platform filter, and
team/merged paths.

### Docs
- REST API docs for `GET /api/v1/fleet/global/policies`, `GET
/api/v1/fleet/fleets/:id/policies`, and the corresponding `/count`
endpoints now document the `platform` query param.
- Added `changes/policies-targeted-platforms-filter`.

## Behavior

- `platform=all` (or missing) returns all policies.
- Selecting a specific platform returns policies whose `platforms`
column is empty OR contains the selected token.
- The dropdown only renders when the table is searchable (results exist
OR any filter is active).
- Changing the filter pushes a new URL and resets the page.

# Checklist for submitter

- [x] Changes file added for user-visible changes in `changes/`.

- [x] Input data is properly validated, `SELECT *` is avoided, SQL
injection is prevented (using placeholders for values in statements), JS
inline code is prevented especially for url redirects, and untrusted
data interpolated into shell scripts/commands is validated against shell
metacharacters.
- [x] If paths of existing endpoints are modified without backwards
compatibility, checked the frontend/CLI for any necessary changes

## Testing

- [x] Added/updated automated tests
- [ ] QA'd all new/changed functionality manually

Local verification:
- `go build ./...` — clean
- `go vet ./server/... ./cmd/... ./ee/...` — clean
- `make lint-go-incremental` — 0 issues
- Go service-level policy tests pass. MySQL integration tests compile
but could not be run locally (no Docker); CI will exercise the new
`testPoliciesPlatformFilter` test.

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

* **New Features**
* Added a "Targeted platforms" column with platform icons and an "All
platforms" option.
* Added a platform filter dropdown to scope policy lists; counts,
last-updated, and controls adapt when a platform filter is active.
Backend now honors an optional platform query parameter so filtering
returns matching policies.

* **Tests**
* Added and updated unit and integration tests covering the new column,
filter UI, and platform-filtered policy listings.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: nulmete <nicoulmete1@gmail.com>
2026-07-10 13:32:16 -05:00
Gray Williams 2090cdbe43 Improve readability of required field (#48684)
Improves the readability for the password field requirement when
creating a non-sso user.
2026-07-03 18:21:17 -05:00
480847b7f5 v4.88.0 doc changes (#46357)
Documentation changes for 4.88.0

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

* **New Features**
* Added a new chart data API endpoint for retrieving metric-based chart
information.
* **Tests**
* Updated test server setup so chart-related routes are included in
endpoint validation, improving coverage and consistency.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Co-authored-by: Jordan Montgomery <elijah.jordan.montgomery@gmail.com>
Co-authored-by: Victor Lyuboslavsky <2685025+getvictor@users.noreply.github.com>
Co-authored-by: Marko Lisica <83164494+marko-lisica@users.noreply.github.com>
Co-authored-by: Mike Thomas <78363703+mike-j-thomas@users.noreply.github.com>
Co-authored-by: Scott Gress <scottmgress@gmail.com>
Co-authored-by: melpike <79950145+melpike@users.noreply.github.com>
2026-07-03 17:22:51 -05:00
Noah Talerman 3ee8c7aa8e API: Fix "Get host by Fleet Desktop token" description for iOS/iPadOS (#48517)
- @noahtalerman: For iOS/iPadOS we decided to go w/ UUID instead of
certificate
2026-07-02 17:58:23 -05:00
37689fbd67 Warn users about file carving size limits (#47376)
- Also move contributing doc to a guide. If we're linking to learn more
from the API reference I think it should live in an official page on
fleetdm.com (another reference page or a guide).

---------

Co-authored-by: Rachael Shaw <r@rachael.wtf>
Co-authored-by: Sharon Katz <121527325+sharon-fdm@users.noreply.github.com>
Co-authored-by: Steven Palmesano <3100993+spalmesano0@users.noreply.github.com>
Co-authored-by: Mike Thomas <78363703+mike-j-thomas@users.noreply.github.com>
2026-07-02 17:52:56 -05:00
Noah TalermanandRachael Shaw 2c3e38b737 Foreign vitals mapping: Update SCIM integration instructions (#48413)
- Update the best practice is to create an API-only user w/ the admin
role and access only to necessary SCIM API endpoints
- These doc updates require [this
bug](https://github.com/fleetdm/fleet/issues/48062) to be fixed because
the `/scim/*` API endpoints aren't exposed as API endpoints one can pick
when creating an API only user
- Document the `/scim/*` API endpoints


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

* **New Features**
  * Added SCIM API endpoints for managing users and groups.
* Supported actions include listing, creating, viewing, replacing,
updating, and deleting SCIM users and groups.
* Added read-only endpoints for SCIM schemas, service provider
configuration, and resource types.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Co-authored-by: Rachael Shaw <r@rachael.wtf>
2026-06-29 17:56:35 -05:00
Marko LisicaandRachael Shaw b2550aa83a [Docs update] Android commands: Lock, wipe, & clear passcode (#47993)
Related to:

- #41683

---------

Co-authored-by: Rachael Shaw <r@rachael.wtf>
2026-06-24 23:14:39 -05:00
Noah Talerman 0a6c007d70 API fix: Incorrect key name (#48017)
`authtype_username_password` is right. `authtype_username_and_password`
is not.

For the following bug:
- https://github.com/fleetdm/fleet/issues/47844
2026-06-22 10:47:30 -05:00
Rachael Shaw f72325d81c v4.87.0 doc changes (#44709) 2026-06-19 17:47:50 -07:00
Rachael Shaw e44d6f0136 Miscellaneous API doc fixes (#47884)
A bunch of little things I found while working on an unrelated PR awhile
back (handled here to reduce API design diff):

+ Fix broken link formatting
+ Finish up incomplete "Cancel batch script docs"
+ Fix ordering of "Get vulnerability" sections
+ Remove note about feature being GitOps-only (no longer true)
+ Add missing link to section contents
+ Add missing endpoint to `api_endpoints.yml`

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

* **New Features**
  * Added ability to cancel running batch script executions.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2026-06-18 18:22:22 -05:00
Rachael Shaw ad22a31d96 Docs: Mark remaining experimental endpoints/parameters as stable (#47848)
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

## Summary by CodeRabbit

* **`api_endpoints.yml`**
* Added new Fleet API documentation entries for creating configuration
profiles and updating setup experience.
  * Added documentation for creating Android web apps.
* Expanded Android Enterprise coverage by adding a new “Get Android
Enterprise” entry (kept disabled).
* Added complete documentation for certificate authority management,
including list, retrieve, update, and delete.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2026-06-18 13:48:07 -05:00
Allen Houchins ec1d8fb30c Paginate Fleet-maintained apps and filters (#47615)
Fix the Fleet-maintained apps list being cut off by adding server-side
pagination and applying platform / "hide added apps" filters across the
full library. Introduces MaintainedAppListOptions (with Platform and
AvailableOnly) and changes the ListAvailableFleetMaintainedApps /
ListFleetMaintainedApps signatures. Datastore now paginates and counts
by distinct app name, fetches all platform rows for apps on a page, and
returns a count and pagination metadata; default client page size set to
500. Frontend no longer performs client-side filtering or local
status/platform state; it relies on the API and uses data.count for
totals. Docs, tests, mocks, and various call sites updated (including a
new test that verifies pagination, platform and availability filters).

<!-- Add the related story/sub-task/bug number, like Resolves #123, or
remove if NA -->
**Related issue:** Resolves #

# Checklist for submitter

If some of the following don't apply, delete the relevant line.

- [x] Changes file added for user-visible changes in `changes/`,
`orbit/changes/` or `ee/fleetd-chrome/changes`.
See [Changes
files](https://github.com/fleetdm/fleet/blob/main/docs/Contributing/guides/committing-changes.md#changes-files)
for more information.

- [ ] Input data is properly validated, `SELECT *` is avoided, SQL
injection is prevented (using placeholders for values in statements), JS
inline code is prevented especially for url redirects, and untrusted
data interpolated into shell scripts/commands is validated against shell
metacharacters.
- [ ] Timeouts are implemented and retries are limited to avoid infinite
loops
- [ ] If paths of existing endpoints are modified without backwards
compatibility, checked the frontend/CLI for any necessary changes

## Testing

- [x] Added/updated automated tests
- [ ] Where appropriate, [automated tests simulate multiple hosts and
test for host
isolation](https://github.com/fleetdm/fleet/blob/main/docs/Contributing/reference/patterns-backend.md#unit-testing)
(updates to one hosts's records do not affect another)

- [x] QA'd all new/changed functionality manually

For unreleased bug fixes in a release candidate, one of:

- [ ] Confirmed that the fix is not expected to adversely impact load
test results
- [ ] Alerted the release DRI if additional load testing is needed

## Database migrations

- [ ] Checked schema for all modified table for columns that will
auto-update timestamps during migration.
- [ ] Confirmed that updating the timestamps is acceptable, and will not
cause unwanted side effects.
- [ ] Ensured the correct collation is explicitly set for character
columns (`COLLATE utf8mb4_unicode_ci`).

## New Fleet configuration settings

- [ ] Setting(s) is/are explicitly excluded from GitOps

If you didn't check the box above, follow this checklist for
GitOps-enabled settings:

- [ ] Verified that the setting is exported via `fleetctl
generate-gitops`
- [ ] Verified the setting is documented in a separate PR to [the GitOps
documentation](https://github.com/fleetdm/fleet/blob/main/docs/Configuration/yaml-files.md#L485)
- [ ] Verified that the setting is cleared on the server if it is not
supplied in a YAML file (or that it is documented as being optional)
- [ ] Verified that any relevant UI is disabled when GitOps mode is
enabled

## fleetd/orbit/Fleet Desktop

- [ ] Verified compatibility with the latest released version of Fleet
(see [Must
rule](https://github.com/fleetdm/fleet/blob/main/docs/Contributing/workflows/fleetd-development-and-release-strategy.md))
- [ ] If the change applies to only one platform, confirmed that
`runtime.GOOS` is used as needed to isolate changes
- [ ] Verified that fleetd runs on macOS, Linux and Windows
- [ ] Verified auto-update works from the released version of component
to the new version (see [tools/tuf/test](../tools/tuf/test/README.md))


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

* **Bug Fixes**
* Fleet-maintained apps listing now paginates server-side (100 per page)
so entries near the end of the alphabet are reachable.
* Platform and “Hide added apps” filters are applied across the entire
library, not just the currently loaded subset.
* The displayed count now matches results by counting macOS and Windows
versions separately.

* **New Features**
* Listing now supports URL-driven platform and “available” filtering,
and the UI consistently reflects the active filter state.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2026-06-16 15:58:24 -05:00
Rachael Shaw 265706027c Fix policy labels_include_any documentation (#47643)
Label-scoping policies is a Fleet Premium feature according to the
[original spec](https://github.com/fleetdm/fleet/issues/24097) and
[docs](https://github.com/fleetdm/fleet/pull/27196/changes). I
accidentally got rid of the "Available in Fleet Premium" note when I did
a recent pass through this file trying to make these descriptions
consistent.
2026-06-15 17:54:27 -05:00
Rachael Shaw 3b782c5a3a Software API is no longer experimental (#47473)
For #32765 

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

* **New Features**
* Added Fleet software package management (add/update) and download for
software titles.
* Added Apple App Store app management, including listing, adding, and
linking apps to titles.
  * Added Fleet-maintained app support for titles.
* Enabled host software uninstalls and retrieval of install/uninstall
results via `install_uuid`.
  * Added ability to remove a title’s “available for install” status.
* **Bug Fixes**
  * Updated software title icon labeling to indicate download.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2026-06-15 17:12:34 -05:00
Rachael Shaw f3034ab1de Revert "[API] Add multiple custom packages for the same software title in the same fleet" (#47464)
Reverts fleetdm/fleet#46890

(Accidentally merged this to `main`, PR should have been to 4.89
according to the milestone)
2026-06-11 16:30:31 -05:00
Marko Lisica 6ab205e15d [API] Add multiple custom packages for the same software title in the same fleet (#46890)
Related to:

- #28108
2026-06-11 16:08:13 -05:00
Noah Talerman d01a670700 Remove performance note for IdP variable in API docs (#47379)
- @noahtalerman: We shipped the improvement
2026-06-10 18:03:52 -05:00
Noah Talerman 4e1279b403 API: Rename "live query" => "live report" (#47378) 2026-06-10 18:03:16 -05:00
Lucas Manuel Rodriguez 99136d48ae Update docs windows hosts filtering (#45884)
Resolves #45711 (the bug was in Android, Windows filtering works but
this explains how to)
2026-06-10 15:22:06 -05:00
Dante Catalfamo 8cb7f8af67 Add macos_applications filter for host software list (#46223)
Adds a `macos_applications` boolean query parameter to the list host
software endpoint (`GET /api/_version_/fleet/hosts/{id}/software`). When
true, results are restricted to apps installed at the top level of the
macOS /Applications folder, hiding helper apps, system apps,
command-line tools, and user-local apps. The filter applies only to
macOS hosts and is ignored on other platforms.

The filter is applied by pruning the in-memory software maps in
ListHostSoftware down to the title IDs that have a top-level
`/Applications` bundle, so the count and paginated queries stay
consistent and the filter applies uniformly across regular, VPP, and
in-house apps. Top-level is determined from
`host_software_installed_paths` via
`installed_path LIKE '/Applications/%' AND NOT LIKE '/Applications/%/%'
on source 'apps'`.

**Related issue:** Resolves #39017
2026-06-05 11:59:43 -04:00
Marko LisicaandRachael Shaw 5c5cd448f0 Update software API response examples to be accurate (#46833)
Examples for software API endpoints are outdated. They are missing many
fields.

---------

Co-authored-by: Rachael Shaw <r@rachael.wtf>
2026-06-04 17:59:47 -05:00
Dale Ribeiro f564718780 Update JSON example for Create Fleet-maintained app endpoint in REST API documentation (#46732)
Added 'automatic_install' field to JSON example.

The example for the [Create Fleet-maintained
app](https://fleetdm.com/docs/rest-api/rest-api#create-fleet-maintained-app)
endpoint previously showed `"ensure": "present"`, which is not a
parameter listed for this endpoint. `ensure` appears to only be
supported in the [Add app store
app](https://fleetdm.com/docs/rest-api/rest-api#add-app-store-app)
endpoint.
2026-06-04 17:46:04 -05:00
Noah Talerman 4b191314a9 Display names for API endpoints are inconsistent w/ API reference (#45721)
- Add @rachaelshaw as reviewer to every PR against the API endpoints
YAML
- "fleet-level X" v. "a fleet's X" 
  - Up to @rachaelshaw
2026-06-04 10:31:59 -04:00
Rachael Shaw c45ff9f029 Preview of v4.86.0 doc changes (merge conflicts resolved) (#42428) 2026-05-29 17:37:53 -05:00
Noah Talerman e642e6af15 Removed "experimental" warning for POST /hosts/:id/software/:software_title_id/install (#45910)
- `numa` is about to use this endpoint.
2026-05-27 18:25:43 -05:00
Steven Palmesano 55f4faf034 Add note for when fleet_id is not specified (#46047)
Related to #45969 and #45978.
2026-05-25 06:59:43 -05:00
Noah Talerman 351f064f97 Update guidance on transferring hosts in Fleet (#45940)
- @noahtalerman: Performance improvements coming in 4.86 that lets us
remove this.
2026-05-21 13:21:15 -05:00
Sharon Katz 8bb59b71cb Fix List certificate templates API docs: parameter name is fleet_id, not fleet (#45969) (#45978)
Closes #45969

## Summary

The `List certificate templates` API endpoint returned `null` for
certificates because the **API docs documented the wrong query parameter
name**. The docs said `fleet` but the code accepts `fleet_id` (or the
deprecated `team_id`). Customers following the docs used `?fleet=11`,
which was silently ignored, causing the endpoint to default to team 0
(unassigned) -- which typically has no certificates.

- **Docs fix**: Changed the parameter name from `fleet` (string) to
`fleet_id` (integer) in the REST API docs, matching how all other list
endpoints document this parameter.
- **API quality fix**: Initialize the `templates` slice in
`GetCertificateTemplatesByTeamID` so that when no templates exist, the
JSON response returns `"certificates": []` instead of `"certificates":
null`.

## Root cause

In `docs/REST API/rest-api.md`, the "List certificate templates"
endpoint documented the query parameter as `fleet` (string), but the
request struct accepts `fleet_id` or `team_id`:

```go
type listCertificateTemplatesRequest struct {
    TeamID uint `query:"team_id,optional" renameto:"fleet_id"`
}
```

When the customer used `?fleet=11` (as documented), the parameter was
unrecognized and silently ignored. The endpoint defaulted to `team_id=0`
(unassigned), which had no certificates. The nil Go slice then
serialized to JSON `null`.

Credit to Andrey Kizimenko for identifying the docs mismatch.

## Changes

- `docs/REST API/rest-api.md` -- Fix parameter name from `fleet`
(string) to `fleet_id` (integer)
- `server/datastore/mysql/certificate_templates.go:174` -- Initialize
slice to avoid `null` in JSON
- `server/datastore/mysql/certificate_templates_test.go:489` -- Add
`require.NotNil` regression test

## Testing

All tests run locally against a real MySQL (Docker) and Redis instance:

| Test suite | Command | Result |
|---|---|---|
| Datastore integration (all certificate tests) | `MYSQL_TEST=1 go test
-run TestCertificates ./server/datastore/mysql/...` | 11 suites, 33
subtests, all PASS |
| Service unit tests | `go test -run
"TestCreateCertificateTemplate\|TestApplyCertificateTemplateSpecs\|..."`
| 4 suites, all PASS |
| Enterprise integration (full HTTP) | `MYSQL_TEST=1 REDIS_TEST=1 go
test -run "TestIntegrationsEnterprise/TestCertificatesSpecs"` | PASS |
| Enterprise integration (team delete) | `MYSQL_TEST=1 REDIS_TEST=1 go
test -run
"TestIntegrationsEnterprise/TestDeleteTeamCertificateTemplates"` | PASS
|
| Static analysis | `go build`, `go vet` | Clean |

Andrey's reproduction confirmed via screenshots:
- `?fleet_id=11` returns certificates correctly
- `?fleet=11` (the documented param) returns `null` -- the bug
- No param returns results when "unassigned" team has certificates

## QA steps

1. Follow the API docs to list certificate templates using
`?fleet_id=<id>`
2. Verify the response contains `"certificates": [...]` with the correct
data
3. Call without `fleet_id` and verify `"certificates": []` (not `null`)
for a team with no templates

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

* **Bug Fixes**
* Fixed the "List certificate templates" API documentation with the
correct query parameter name, enabling proper filtering of results.

<!-- review_stack_entry_start -->

[![Review Change
Stack](https://storage.googleapis.com/coderabbit_public_assets/review-stack-in-coderabbit-ui.svg)](https://app.coderabbit.ai/change-stack/fleetdm/fleet/pull/45978?utm_source=github_walkthrough&utm_medium=github&utm_campaign=change_stack)

<!-- review_stack_entry_end -->

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2026-05-21 11:09:19 -04:00
48b32e6b96 Deprecate using GET /api/v1/fleet/commands w/o host_identifier (#44392)
<!-- Add the related story/sub-task/bug number, like Resolves #123, or
remove if NA -->
**Related issue:** Resolves #44170 

Immediately deprecate unscoped calls to this endpoint as discussed in
2026/04/29 g-power-to-pc standup.

---------

Co-authored-by: Marko Lisica <83164494+marko-lisica@users.noreply.github.com>
Co-authored-by: Noah Talerman <47070608+noahtalerman@users.noreply.github.com>
2026-05-20 18:39:36 -05:00
6becc62393 Add bundle_identifier to top-level host software API response (#42188)
- @noahtalerman: For the following story:
  - https://github.com/fleetdm/fleet/issues/43557

## Summary

- Adds `bundle_identifier` as a top-level field on
`HostSoftwareWithInstaller` struct, which is the response type for all
host software API endpoints (`GET /api/v1/fleet/hosts/{id}/software`,
`GET /api/v1/fleet/device/{token}/software`, etc.)
- The value is sourced directly from `software_titles.bundle_identifier`
via the SQL query, so it is always present even when
`installed_versions` is empty (e.g., software that has never been
installed on a host)
- Falls back to `installed_versions[0].bundle_identifier` if the
title-level value is not available
- The field is retained inside `installed_versions` for full backwards
compatibility

## Changes

### `server/fleet/software_installer.go`
- Added `BundleIdentifier string` field with
`json:"bundle_identifier,omitempty" db:"-"` tag to
`HostSoftwareWithInstaller` struct

### `server/datastore/mysql/software.go`
- Added `TitleBundleIdentifier` field to internal `hostSoftware` struct
mapped to `title_bundle_identifier` DB column
- Added `software_titles.bundle_identifier AS title_bundle_identifier`
to all four SQL query branches:
  - Software installers SELECT
  - VPP apps SELECT
  - In-house apps SELECT
  - Available-for-install SELECT (`stmtAvailable`)
- Added `software_titles.bundle_identifier` to GROUP BY clauses for
software installers and VPP apps
- In the return path, populates `BundleIdentifier` from
`TitleBundleIdentifier` (with fallback to first installed version)

### `server/datastore/mysql/software_test.go`
- Added `BundleIdentifier` assertion to both `compareResults` helper
functions (macOS/Linux and iOS/iPadOS test suites)
- Added explicit top-level `BundleIdentifier` assertions in
`testListHostSoftwareWithVPPApps` where the installed version bundle
identifier is already verified

## Example response shape

```json
{
  "id": 121,
  "name": "Google Chrome.app",
  "bundle_identifier": "com.google.Chrome",
  "icon_url": null,
  "software_package": { ... },
  "app_store_app": null,
  "source": "apps",
  "status": "failed_install",
  "installed_versions": [
    {
      "version": "121.0",
      "bundle_identifier": "com.google.Chrome",
      ...
    }
  ]
}
```

Built for
[ntalerman](https://fleetdm.slack.com/archives/D0AEA6U4SM9/p1774036621198819?thread_ts=1774035719.384099&cid=D0AEA6U4SM9)
by [Kilo for Slack](https://kilo.ai/features/slack-integration)

---------

Co-authored-by: kiloconnect[bot] <240665456+kiloconnect[bot]@users.noreply.github.com>
Co-authored-by: Kilo Code <kilo@kilo.ai>
Co-authored-by: Noah Talerman <47070608+noahtalerman@users.noreply.github.com>
Co-authored-by: jkatz01 <yehonatankatz@gmail.com>
2026-05-19 12:51:32 -04:00
Noah Talerman 3618b0c810 API reference: Fix headers (#45701)
<img width="256" height="393" alt="Screenshot 2026-05-18 at 10 43 35 AM"
src="https://github.com/user-attachments/assets/59770a53-a4ee-4811-8363-3fa75b88943f"
/>
2026-05-18 17:30:58 -05:00
Noah Talerman c18096f779 API reference: Bulk hosts w/ 10k hosts and 10 configuration profiles (#45708)
- @noahtalerman: We saw [performance
issues](https://github.com/fleetdm/fleet/issues/44656#issuecomment-4478731163)
w/ transferring 10k+ hosts at once.
- Potential performance improvements coming soon:
  - https://github.com/fleetdm/fleet/issues/45650
  - https://github.com/fleetdm/fleet/issues/45635
  - https://github.com/fleetdm/fleet/issues/45657
2026-05-18 17:30:13 -05:00
Tim Lee bbfbea8de2 Cert renewal for non-proxied SCEP and ACME (Phase 1 + Phase 2) (#45696) 2026-05-18 11:41:02 -06:00
Rachael Shaw 2a58bbef38 v4.85.0 doc changes (#41153) 2026-05-14 17:44:17 -05:00
Noah Talerman 71f156733c API docs: Fix formatting bug (#45436) 2026-05-14 14:01:30 -05:00
Mason Buettner 38f99e362a Remove bad comma from connect CA example (#45332)
Documentation only change, removes comma that causes JSON decoder error.
2026-05-13 13:33:09 -05:00
Rachael Shaw 471eb00970 Missing docs for "List host's reports" endpoint (#44768)
Add missing docs for https://github.com/fleetdm/fleet/issues/40187

(The [original PR](https://github.com/fleetdm/fleet/pull/41569) was
accidentally closed instead of merged, and since I used Kilo for the
initial draft, I don't have permission to re-open it.)
2026-05-05 14:29:20 -05:00
Rachael Shaw 3f67416ee1 Update titles in policy docs, and remove unused parameter (#44766)
+ Remove unused `conditional_access_bypass_enabled` parameter that was
still documented
+ Rename "fleet policy" endpoints to "fleet-level policy" for clarity
2026-05-05 14:09:37 -05:00
Noah Talerman 48ccdbab13 Reference docs: Multi-platform names for macos_setup and macos_settings (#43565)
Update reference docs for the following story:
- https://github.com/fleetdm/fleet/issues/40488
2026-05-04 18:51:54 -04:00
Eric e71b8cdd3b Docs: add keywordsForDocsearch meta tags (#44544)
Related to: https://github.com/fleetdm/fleet/issues/12704

Changes:
- Added `keywordsForDocsearch` meta tags to documentation pages.
2026-05-04 16:21:18 -05:00
Juan Fernandez 96e81f72ba Removed invalid routes from docs (#44096)
Removes some invalid routes that were discovered in
https://github.com/fleetdm/fleet/pull/44093
2026-05-04 14:58:02 -05:00
Noah TalermanandRachael Shaw b4ea787db9 API reference typo and missing parameter (#44586)
- Typo: Double "fleets"

---------

Co-authored-by: Rachael Shaw <r@rachael.wtf>
2026-05-01 18:01:21 -05:00
Victor Lyuboslavsky 8d0dc27d97 Updated disk encryption docs to match code. (#44420)
<!-- Add the related story/sub-task/bug number, like Resolves #123, or
remove if NA -->
**Related issue:** Resolves #44194
2026-04-29 13:52:21 -05:00