Skip to content

Fix POST query endpoint request body property names in Enterprise API… #6247

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

Merged
merged 3 commits into from
Jul 28, 2025

Conversation

MeelahMe
Copy link
Contributor

@MeelahMe MeelahMe commented Jul 25, 2025

… spec

fix: align POST /api/v3/query_sql property names with GET params in Enterprise

Update QueryRequestObject schema to use 'db' and 'q' instead of
'database' and 'query_str' for consistency with GET endpoint.

Closes #6223

@MeelahMe MeelahMe requested a review from Copilot July 25, 2025 17:19
Copilot

This comment was marked as outdated.

@MeelahMe MeelahMe requested review from jstirnaman and Copilot July 25, 2025 17:38
Copilot

This comment was marked as outdated.

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.

ref.yml looks good. Can you restore helper-scripts/common/config/influxdb3-core-enterprise.json (or only commit ref.yml) and update the PR branch--for example:

git checkout -t origin/fix/api-enterprise-docs-query-sql-field-names
git reset origin/master
git add api-docs
git commit -C 6b7ca8b
git push -f origin fix/api-enterprise-docs-query-sql-field-names

@MeelahMe MeelahMe force-pushed the fix/api-enterprise-docs-query-sql-field-names branch from 58ed29d to 80cb646 Compare July 25, 2025 21:45
@MeelahMe MeelahMe requested a review from Copilot July 25, 2025 21:46
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 updates the InfluxDB Enterprise API specification to align POST endpoint request body property names with the corresponding GET endpoint parameters. The change ensures consistency between the /api/v3/query_sql POST and GET endpoints by standardizing on shorter parameter names.

Key Changes

  • Updated QueryRequestObject schema property names from database to db and query_str to q
  • Updated all references and examples to use the new consistent naming

Comment on lines 2028 to 2030
type: string
query_str:
q:
description: The query to execute.
Copy link
Preview

Copilot AI Jul 25, 2025

Choose a reason for hiding this comment

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

This API change modifies the request body property names from 'database' to 'db' and 'query_str' to 'q'. This is a breaking change that will affect existing API consumers who are using the POST endpoint with the old property names. Consider documenting this as a breaking change and providing migration guidance.

Copilot uses AI. Check for mistakes.

@MeelahMe MeelahMe requested a review from jstirnaman July 25, 2025 21:50
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.

👍

@MeelahMe MeelahMe merged commit 1ca63a2 into master Jul 28, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Documentation for POST /api/v3/query_sql is incorrect
2 participants