Skip to content

Conversation

@StefosGeo
Copy link
Contributor

@StefosGeo StefosGeo commented Sep 24, 2025

Introducing a new endpoint called quote. Users with the write:cluster permission will be able to get the pricing for the cluster included any available discounts.

@github-actions
Copy link

github-actions bot commented Sep 24, 2025

PR Packages Published

Python Package:

  • Version: 0.59.0.dev208+e67b7c0
  • Package: qdrant-cloud-public-api
  • Registry: https://us-python.pkg.dev/qdrant-cloud/python/
  • To update run: uv add qdrant-cloud-public-api==0.59.0.dev208+e67b7c0

NPM Package:

  • Version: 0.59.0-dev208.e67b7c0
  • Package: @qdrant/qdrant-cloud-public-api
  • Registry: https://us-npm.pkg.dev/qdrant-cloud/npm/
  • To update run: npm install @qdrant/[email protected]

@github-actions
Copy link

github-actions bot commented Sep 24, 2025

The latest Buf updates on your PR. Results from workflow Pull Request / linting (pull_request).

BuildFormatLintBreakingUpdated (UTC)
✅ passed✅ passed✅ passed✅ passedOct 2, 2025, 1:30 PM

@StefosGeo StefosGeo force-pushed the feature/CF-1190-introduce-quote-endpoint branch from fe6a33e to eda6b6e Compare September 24, 2025 09:01
Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

It looks like the PR doesn't include updates for the generated code.

Please make sure you've run the following commands from the root directory:

make generate

Once you've added them, you can dismiss this review.

@StefosGeo StefosGeo force-pushed the feature/CF-1190-introduce-quote-endpoint branch from eda6b6e to 39412da Compare September 24, 2025 09:05
@StefosGeo StefosGeo requested a review from areina September 26, 2025 13:53
@StefosGeo StefosGeo marked this pull request as ready for review September 29, 2025 12:17
@StefosGeo StefosGeo requested a review from a team as a code owner September 29, 2025 12:17
// This endpoint calculates pricing information including hourly and monthly costs,
// and any applicable discounts for the specified cluster configuration.
// Required permissions:
// - None (authenticated only)
Copy link
Contributor

Choose a reason for hiding this comment

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

IMO We should have a proper permission, I don't like we leak endpoints which in enterprises should not be able to be called unless allowed.

Copy link
Contributor

Choose a reason for hiding this comment

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

Now the api requires authentication but does not require the permission.

I would go with public api - without authentication and permission. It can be useful for calculator page for example.

or If we want it to be authenticated, then we should add a permission for it.

Since the response may has info about discounts, I would go with authenticated and permission checked api.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

how does it sound if I add a read:discounts permission, and if the user has it he will see the discounted price, if not he will see the prices with zero discount

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I drafted the following implementation:
• The getquote endpoint will be public in general, but discounts will only be applied if the user has the read:discount permission. Otherwise, the user will see the quote without discounts, even if they exist.

After discussing this with the team, a few concerns were raised:
• Some felt it’s not clean to have different behavior in the same endpoint depending on permissions. An alternative would be to expose two separate endpoints (getquote and getquote_withdiscounts), letting the client decide based on permissions. At the very least, the response should make it explicit whether no discounts exist versus the user not being allowed to see them.
• Others argued that permissions might not be the right tool for this, and that a more fine-grained ABAC approach would be preferable (though we don’t have such a system in place yet).
• It was also mentioned that we could start with no permissions for this at all.

cc @pansen @Rendez
What do you think @Robert-Stam @lomidzemikheili?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

New update, we believe that if the user has the write to create cluster he should see the price including any discounts

Copy link
Contributor

@lomidzemikheili lomidzemikheili left a comment

Choose a reason for hiding this comment

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

Nice work!

Left two comments

// This endpoint calculates pricing information including hourly and monthly costs,
// and any applicable discounts for the specified cluster configuration.
// Required permissions:
// - None (authenticated only)
Copy link
Contributor

Choose a reason for hiding this comment

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

Now the api requires authentication but does not require the permission.

I would go with public api - without authentication and permission. It can be useful for calculator page for example.

or If we want it to be authenticated, then we should add a permission for it.

Since the response may has info about discounts, I would go with authenticated and permission checked api.

@StefosGeo StefosGeo force-pushed the feature/CF-1190-introduce-quote-endpoint branch from fc3b846 to 3e6cc27 Compare October 1, 2025 08:06
Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

It looks like the PR doesn't include updates for the generated code.

Please make sure you've run the following commands from the root directory:

make generate

Once you've added them, you can dismiss this review.

Copy link
Contributor

@lomidzemikheili lomidzemikheili left a comment

Choose a reason for hiding this comment

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

Nice!

Thanks for addressing the feedback

@StefosGeo StefosGeo merged commit d1e996b into main Oct 3, 2025
15 checks passed
@StefosGeo StefosGeo deleted the feature/CF-1190-introduce-quote-endpoint branch October 3, 2025 11:01
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.

4 participants