Reverse-Directory service

Configuration

See Configure an Rdir Service.

API

DELETE /v1/rdir/delete?vol=<volume ip>%3A<volume port>

{
  "container_id":"<container id>",
  "content_id":"<object content id>",
  "chunk_id":"chunk id"
}

Unreference a chunk from the volume.

DELETE /v1/rdir/delete?vol=127.0.0.1%3A6020 HTTP/1.1
Host: 127.0.0.1:15
User-Agent: curl/7.47.0
Accept: */*
Content-Length: 135
Content-Type: application/x-www-form-urlencoded
HTTP/1.1 204 OK
Connection: Close
Content-Length: 0

POST /v1/rdir/push?vol=<volume ip>%3A<volume port>

{
  "container_id":"<container id>",
  "content_id":"<object content id>",
  "chunk_id":"chunk id"
}

Push the target volume.

POST /v1/rdir/push?vol=127.0.0.1%3A6020 HTTP/1.1
Host: 127.0.0.1:15
User-Agent: curl/7.47.0
Accept: */*
Content-Length: 150
Content-Type: application/x-www-form-urlencoded
HTTP/1.1 204 OK
Connection: Close
Content-Length: 0

POST /v1/rdir/fetch?vol=<volume ip>%3A<volume port>

Fetch the target volume.

POST /v1/rdir/fetch?vol=127.0.0.1%3A6020 HTTP/1.1
Host: 127.0.0.1:15
User-Agent: curl/7.47.0
Accept: */*
HTTP/1.1 200 OK
Connection: Close
Content-Length: 2

POST /v1/rdir/create?vol=<volume ip>%3A<volume port>

Create the target volume.

POST /v1/rdir/create?vol=127.0.0.1%3A6020 HTTP/1.1
Host: 127.0.0.1:15
User-Agent: curl/7.47.0
Accept: */*
HTTP/1.1 201 Base Created
Connection: Close
Content-Length: 0

POST /v1/rdir/status?vol=<volume ip>%3A<volume port>

Show the target volume status

POST /v1/rdir/status?vol=127.0.0.1%3A6020 HTTP/1.1
Host: 127.0.0.1:15
User-Agent: curl/7.47.0
Accept: */*
HTTP/1.1 200 OK
Connection: Close
Content-Type: application/json
Content-Length: 36

{"chunk":{"total":0},"container":{}}

POST /v1/rdir/admin/show?vol=<volume ip>%3A<volume port>

Show the target service.

POST /v1/rdir/admin/show?vol=127.0.0.1%3A6020 HTTP/1.1
Host: 127.0.0.1:15
User-Agent: curl/7.47.0
Accept: */*
HTTP/1.1 200 OK
Connection: Close
Content-Type: application/json
Content-Length: 2

POST /v1/rdir/admin/unlock?vol=<volume ip>%3A<volume port>

Unlock the target service.

POST /v1/rdir/admin/unlock?vol=127.0.0.1%3A6020 HTTP/1.1
Host: 127.0.0.1:15
User-Agent: curl/7.47.0
Accept: */*
HTTP/1.1 204 OK
Connection: Close
Content-Length: 0

POST /v1/rdir/admin/lock?vol=<volume ip>%3A<volume port>

{
  "who": "<volume address>"
  "key": 0
}

Lock the target service with given key.

POST /v1/rdir/admin/lock?vol=127.0.0.1%3A6020 HTTP/1.1
Host: 127.0.0.1:15
User-Agent: curl/7.47.0
Accept: */*
Content-Length: 34
Content-Type: application/x-www-form-urlencoded
HTTP/1.1 204 OK
Connection: Close
Content-Length: 0

POST /v1/rdir/admin/clear?vol=<volume ip>%3A<volume port>

Clear the target service.

POST /v1/rdir/admin/clear?vol=127.0.0.1%3A6020 HTTP/1.1
Host: 127.0.0.1:15
User-Agent: curl/7.47.0
Accept: */*
HTTP/1.1 200 OK
Connection: Close
Content-Type: application/json
Content-Length: 13

{"removed":0}

GET /v1/rdir/admin/incident?vol=<volume ip>%3A<volume port>

Return target service incident.

GET /v1/rdir/admin/incident?vol=127.0.0.1%3A6020 HTTP/1.1
Host: 127.0.0.1:15
User-Agent: curl/7.47.0
Accept: */*
HTTP/1.1 200 OK
Connection: Close
Content-Type: application/json
Content-Length: 11

{"date":1533039131}

POST /v1/rdir/admin/incident?vol=<volume ip>%3A<volume port>

{
  "date": 123456789
}

Set target service incident.

POST /v1/rdir/admin/incident?vol=127.0.0.1%3A6020 HTTP/1.1
Host: 127.0.0.1:15
User-Agent: curl/7.47.0
Accept: */*
Content-Length: 11
Content-Type: application/x-www-form-urlencoded
HTTP/1.1 204 OK
Connection: Close
Content-Type: application/json
Content-Length: 0

GET /status

Return a brief summary of the usage on the target service.

GET /status HTTP/1.1
Host: 127.0.0.1:6022
User-Agent: curl/7.55.1
Accept: */*
HTTP/1.1 200 OK
Connection: Close
Content-Type: application/json
Content-Length: 21

{"opened_db_count":6}

GET /config

Return the live configuration of the target RDIR service.

GET /config HTTP/1.1
Host: 127.0.0.1:6022
User-Agent: curl/7.55.1
Accept: */*
HTTP/1.1 200 OK
Connection: Close
Content-Type: application/json
Content-Length: 2015
{"core.http.user_agent":"", ...}