Skip to content

Commit 25ccb72

Browse files
committed
Fleshed out description of deregistration in the README.
1 parent 233f82e commit 25ccb72

File tree

1 file changed

+24
-2
lines changed

1 file changed

+24
-2
lines changed

README.md

Lines changed: 24 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -127,9 +127,31 @@ Currently, this can only be resolved by deleting all affected symbolic links, re
127127

128128
### Deregistering
129129

130-
To remove files from the index, we use the same procedure but replacing the `/register/*` endpoints with `/deregister/*`.
130+
To remove files from the index, we use a [initialization](#initialization) and [verification](#verification) procedure similar to that described for registration.
131+
The only difference is that we replace the `/register/*` endpoints with `/deregister/*`.
132+
133+
```shell
134+
PWD=$(pwd)
135+
curl -X POST -L ${SEWER_RAT_URL}/deregister/start \
136+
-H "Content-Type: application/json" \
137+
-d '{ "path": "'${PWD}'/test" }' | jq
138+
## {
139+
## "code": ".sewer_HCx4lnvIpkGt6HuWQtl0zhJE41epL1-kS7Jzv1pTw9k",
140+
## "status": "PENDING"
141+
## }
142+
143+
# .. Add the code file to the directory to be deregistered...
144+
145+
curl -X POST -L ${SEWER_RAT_URL}/deregister/finish \
146+
-H "Content-Type: application/json" \
147+
-d '{ "path": "'${PWD}'/test", }' | jq
148+
## {
149+
## "status": "SUCCESS"
150+
## }
151+
```
152+
131153
The only potential difference is when the caller requests deregistration of a directory that does not exist.
132-
In this case, `/deregister/start` may return a `SUCCESS` status instead of `PENDING`, after which `/deregister/finish` does not need to be called.
154+
In this case, `/deregister/start` will directly return a `SUCCESS` status instead of `PENDING`, after which `/deregister/finish` does not need to be called.
133155

134156
By default, the `/deregister/finish` endpoint will block until the deregistration is complete.
135157
Users can set `"block": false` in the request body to perform the deregistration asynchronously, in which case the endpoint will return immediately with a `status` of `PENDING`.

0 commit comments

Comments
 (0)