Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#14415 API design: Per-host query report endpoint #14805

Merged
merged 9 commits into from
Dec 15, 2023

Conversation

rachaelshaw
Copy link
Member

@rachaelshaw rachaelshaw commented Oct 30, 2023

Adds new API endpoint to enable displaying query reports per-host (#14415).

fleet-release
fleet-release previously approved these changes Oct 30, 2023
@rachaelshaw rachaelshaw temporarily deployed to Docker Hub October 30, 2023 21:26 — with GitHub Actions Inactive
@rachaelshaw rachaelshaw marked this pull request as draft October 30, 2023 21:26
@Sampfluger88 Sampfluger88 removed the request for review from mikermcneil October 30, 2023 23:04
| Name | Type | In | Description |
| --------- | ------- | ---- | ------------------------------------------ |
| id | integer | path | **Required**. The ID of the desired query. |
| host_id | integer | path | If provided, filters to only include results for the specified host. |
Copy link
Contributor

@mostlikelee mostlikelee Nov 28, 2023

Choose a reason for hiding this comment

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

@rachaelshaw we may need an example for clarity, but to confirm: will it look like this?

GET /api/v1/fleet/queries/31/report/439

Copy link
Member Author

@rachaelshaw rachaelshaw Nov 28, 2023

Choose a reason for hiding this comment

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

@mostlikelee whoops, I totally meant for host_id to be a query parameter, forgot to change the "In" when I duplicated that line. I just updated the PR; would be weird to have an optional parameter in the path 🤦‍♀️
So should look like: GET /api/v1/fleet/queries/31/report?host_id=439

fleet-release
fleet-release previously approved these changes Nov 28, 2023
fleet-release
fleet-release previously approved these changes Nov 29, 2023
Co-authored-by: Tim Lee <timlee@fleetdm.com>
fleet-release
fleet-release previously approved these changes Nov 29, 2023
fleet-release
fleet-release previously approved these changes Nov 30, 2023
fleet-release
fleet-release previously approved these changes Nov 30, 2023
docs/REST API/rest-api.md Outdated Show resolved Hide resolved
fleet-release
fleet-release previously approved these changes Dec 8, 2023
docs/REST API/rest-api.md Outdated Show resolved Hide resolved
@rachaelshaw rachaelshaw marked this pull request as ready for review December 8, 2023 22:57
@rachaelshaw rachaelshaw changed the title Proposed API changes for #14415 #14415 API design Dec 8, 2023
@rachaelshaw rachaelshaw changed the title #14415 API design #14415 API design: Per-host query report endpoint Dec 8, 2023
@rachaelshaw rachaelshaw merged commit 5e3f501 into main Dec 15, 2023
6 checks passed
@rachaelshaw rachaelshaw deleted the 14415-rest-api-proposal branch December 15, 2023 18:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

5 participants