Created
February 19, 2025 16:26
-
-
Save nickva/712477c68190b0dedd6ebb90a4c8b175 to your computer and use it in GitHub Desktop.
check purge infos endpoint
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
#!/bin/sh | |
# ./dev/run --admin=adm:pass -n1 | |
# "http" is httpie (https://httpie.io) | |
DB=http://adm:[email protected]:15984 | |
http -q delete $DB/db | |
http -q put $DB/db | |
set -x | |
http -b $DB/db/_purged_infos | |
# { | |
# "purged_infos": [] | |
# } | |
http -b put $DB/db/doc1 a=b | |
# { | |
# "id": "doc1", | |
# "ok": true, | |
# "rev": "1-4b8a35d3f70a5962f86c6dd06ceb599c" | |
# } | |
http -b put $DB/db/doc2 c=d | |
# { | |
# "id": "doc2", | |
# "ok": true, | |
# "rev": "1-43ca4ac5f035a3057752750224f3c1d1" | |
# } | |
http -b post $DB/db/_purge doc1:='["1-4b8a35d3f70a5962f86c6dd06ceb599c"]' | |
# { | |
# "purge_seq": null, | |
# "purged": { | |
# "doc1": [ | |
# "1-4b8a35d3f70a5962f86c6dd06ceb599c" | |
# ] | |
# } | |
# } | |
http -b post $DB/db/_purge doc2:='["1-43ca4ac5f035a3057752750224f3c1d1"]' | |
# { | |
# "purge_seq": null, | |
# "purged": { | |
# "doc2": [ | |
# "1-43ca4ac5f035a3057752750224f3c1d1" | |
# ] | |
# } | |
# } | |
http -b $DB/db/_purged_infos | |
# { | |
# "purged_infos": [ | |
# { | |
# "id": "doc1", | |
# "revs": [ | |
# "1-4b8a35d3f70a5962f86c6dd06ceb599c" | |
# ] | |
# }, | |
# { | |
# "id": "doc2", | |
# "revs": [ | |
# "1-43ca4ac5f035a3057752750224f3c1d1" | |
# ] | |
# } | |
# ] | |
# } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Example