Skip to content

docs(api): adding api examples to DVC and LVC #6277

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

Open
wants to merge 27 commits into
base: master
Choose a base branch
from

Conversation

MeelahMe
Copy link
Contributor

@MeelahMe MeelahMe commented Jul 31, 2025

Closes #5974

  • Added HTTP API section to Last Value Cache create.md (POST /api/v3/configure/last_cache)
  • Added API delete instructions to Last Value Cache delete.md (DELETE /api/v3/configure/last_cache)
  • Added API query examples for both cache types in show.md (system tables) and query.md (cache functions)

@MeelahMe MeelahMe requested a review from Copilot July 31, 2025 19:00
@MeelahMe MeelahMe marked this pull request as draft July 31, 2025 19:00
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR adds comprehensive HTTP API documentation for both Last Value Cache (LVC) and Distinct Value Cache (DVC) operations in InfluxDB 3. The changes provide API alternatives to CLI commands, enabling users to manage caches via REST endpoints.

Key changes:

  • Added HTTP API examples for creating, deleting, and querying caches
  • Documented API parameter differences from CLI (JSON arrays vs comma-delimited, seconds vs humantime)
  • Included response codes and example requests/responses for better usability

Reviewed Changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
content/shared/influxdb3-admin/last-value-cache/create.md Added POST API endpoint documentation with JSON payload examples
content/shared/influxdb3-admin/last-value-cache/delete.md Added DELETE API endpoint with query parameters and response codes
content/shared/influxdb3-admin/last-value-cache/show.md Added SQL query API examples for viewing cache information
content/shared/influxdb3-admin/distinct-value-cache/create.md Added POST API endpoint for DVC creation with parameter format notes
content/shared/influxdb3-admin/distinct-value-cache/show.md Added SQL query API examples (incorrectly references last_caches table)
content/shared/influxdb3-admin/distinct-value-cache/query.md Added API examples for querying cached data using last_cache function

@MeelahMe MeelahMe added the API label Jul 31, 2025
@MeelahMe MeelahMe self-assigned this Jul 31, 2025
@MeelahMe MeelahMe requested review from sanderson and jstirnaman July 31, 2025 19:52
@MeelahMe MeelahMe marked this pull request as ready for review July 31, 2025 19:52
Copy link
Contributor

@jstirnaman jstirnaman left a comment

Choose a reason for hiding this comment

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

Overall, this is really good. I added in the endpoint shortcodes, which include reference links.
We need to add paragraphs to introduce the CLI and API, and then update the frontmatter descriptions with them as well.
Thanks for picking this up!

@MeelahMe MeelahMe removed the request for review from sanderson August 1, 2025 20:20
@MeelahMe
Copy link
Contributor Author

MeelahMe commented Aug 1, 2025

@jstirnaman do you think we should "add paragraphs to introduce the CLI and API, and then update the frontmatter descriptions with them as well." under this PR or create a new issue for it?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Core and Enterprise: Add API instructions to the caching guides
2 participants