-
Notifications
You must be signed in to change notification settings - Fork 145
CBG-5327: Wire up REST API to document channel history compaction #8275
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
Changes from all commits
Commits
Show all changes
16 commits
Select commit
Hold shift + click to select a range
bfedcc6
wire up the rest api to document channel history compaction
RIT3shSapata 70b8917
wire up post request to compact channel history
RIT3shSapata 9cfef82
add documentation
RIT3shSapata b12b927
lint fix
RIT3shSapata 56e319e
fixes based on copilot comments
RIT3shSapata d3522da
fix the path in the documentation for post request
RIT3shSapata 46e17c0
Revert "fix the path in the documentation for post request"
RIT3shSapata a955944
changes to api
RIT3shSapata 82affc4
fixes based on pr comments
RIT3shSapata 62132c2
change the assertion from equal to ElementsMatch
RIT3shSapata 45d0775
fixes based on co pilot comments
RIT3shSapata 1cd59b9
fixes based on pr comments
RIT3shSapata 7e006a5
Revert "fixes based on pr comments"
RIT3shSapata e81fc85
rename functions and remove enablexattr check from handler
RIT3shSapata ba9e696
sort the sequences
RIT3shSapata 19d9166
sort channels by name
RIT3shSapata File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
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
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,62 @@ | ||
| # Copyright 2026-Present Couchbase, Inc. | ||
| # | ||
| # Use of this software is governed by the Business Source License included | ||
| # in the file licenses/BSL-Couchbase.txt. As of the Change Date specified | ||
| # in that file, in accordance with the Business Source License, use of this | ||
| # software will be governed by the Apache License, Version 2.0, included in | ||
| # the file licenses/APL2.txt. | ||
| parameters: | ||
| - $ref: ../../components/parameters.yaml#/keyspace | ||
| - $ref: ../../components/parameters.yaml#/docid | ||
|
RIT3shSapata marked this conversation as resolved.
|
||
| get: | ||
| summary: Get Channel History of Document | ||
| description: |- | ||
| Returns the channel revocation history for the specified document as a map of channel | ||
| names to the array of sequences at which the document was removed from each channel. Only channels | ||
| that have been revoked at least once are included; channels the document is currently | ||
| assigned may be included if they were previously revoked. | ||
|
|
||
| Multiple sequences for a given channel indicate that the document has lost access to that channel | ||
| more than once — each sequence represents a point in time at which the document was removed from | ||
| the channel. | ||
|
|
||
| Required Sync Gateway RBAC roles: | ||
|
|
||
| * Sync Gateway Application | ||
| * Sync Gateway Application Read Only | ||
| responses: | ||
| '200': | ||
| description: |- | ||
| Successfully retrieved the channel revocation history for the specified document. | ||
| Returns a JSON object mapping each channel name to an array of sequences at which | ||
| the document was removed from that channel. | ||
| content: | ||
| application/json: | ||
| schema: | ||
| type: object | ||
| additionalProperties: | ||
| type: array | ||
| items: | ||
| type: integer | ||
| format: int64 | ||
| minimum: 1 | ||
| description: Sequences at which the document was removed from this channel. | ||
|
Comment on lines
+37
to
+43
|
||
| description: Map of channel names to their revocation sequences. | ||
|
Comment on lines
+35
to
+44
|
||
| example: | ||
| channel1: | ||
| - 3 | ||
| - 7 | ||
| channel2: | ||
| - 5 | ||
| '404': | ||
| description: Document not found. | ||
| content: | ||
| application/json: | ||
| schema: | ||
| $ref: ../../components/schemas.yaml#/HTTP-Error | ||
| '403': | ||
| $ref: ../../components/responses.yaml#/Unauthorized-database | ||
|
|
||
| tags: | ||
| - Document | ||
| operationId: get_keyspace-_channel_history | ||
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.