feat: enable Org search joined with billing Details#877
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
Pull Request Test Coverage Report for Build 13717957148Details
💛 - Coveralls |
7ccfdb2 to
8d90ea9
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do?
This PR introduces a new search functionality for organizations with their associated billing information using RQL (REST Query Language) filters. The feature allows administrators to perform advanced searches across organizations with billing-related attributes through a new endpoint
POST /v1beta1/admin/organizations/search.Key Features
API Specification
Request Schema
{ "filters": [ { "name": "id", "operator": "neq", "value": 20 }, { "name": "title", "operator": "like", "value": "xyz" } ], "group_by": ["plan_name"], "offset": 40, "limit": 1, "search": "abcd", "sort": [ { "name": "title", "order": "desc" } ] }Response Schema
{ "organizations": [ { "id": "1f0d68fc-ee7d-420b-8b02-eb1479f77f0c", "name": "BillingTestOrg15April2024", "title": "BillingTestOrg15April2024", "created_at": "2024-04-15T12:12:11.893873Z", "updated_at": "2024-04-15T12:12:11.893873Z", "state": "enabled", "avatar": "", "created_by": "\"abhi.sah.97@gmail.com\"", "plan_name": "enterprise_plan", "payment_mode": "", "subscription_cycle_end_at": "2025-03-15T12:17:09Z", "country": "", "subscription_state": "past_due", "plan_interval": "month", "plan_id": "48d3ef79-3872-46ca-9759-e90a6d397f51" } ], "pagination": { "offset": 40, "limit": 1, "total_count": 0 }, "group": { "name": "plan_name", "data": [ { "name": "enterprise_plan", "count": 59 }, { "name": "standard_plan", "count": 300 }, { "name": "N/A", "count": 50 } ] } }Supported Fields for Operations
Filterable Fields
Group By Fields
Searchable Fields
Implementation Details
goqufor dynamic SQL query buildingTesting Done