Directory service

POST /v3.0/{NS}/reference/create?acct={account}&ref={reference name}

Create new reference with given properties.

Sample request:

POST /v3.0/OPENIO/reference/create?acct=my_account&ref=myreference HTTP/1.1
Host: 127.0.0.1:6000
User-Agent: curl/7.47.0
Accept: */*
Content-Length: 13
Content-Type: application/x-www-form-urlencoded
{"properties":{}}

Sample response:

HTTP/1.1 201 Created
Connection: Close
Content-Length: 0

GET /v3.0/{NS}/reference/show?acct={account}&ref={reference name}

Get information about a reference.

Sample request:

GET /v3.0/OPENIO/reference/show?acct=my_account&ref=myreference HTTP/1.1
Host: 127.0.0.1:6000
User-Agent: curl/7.47.0
Accept: */*

Sample response:

HTTP/1.1 200 OK
Connection: Close
Content-Type: application/json
Content-Length: 194
{
  "dir":[{"seq":1,"type":"meta0","host":"127.0.0.1:6006","args":""},{"seq":1,"type":"meta1","host":"127.0.0.1:6007","args":""}],
  "srv":[{"seq":1,"type":"meta2","host":"127.0.0.1:6008","args":""}],
  "cid":"13C0470DBCE55371E6BD5975EFF23A18F658CDC1656A7474DEF1ED0B0EDDA9FC",
  "account":"my_account",
  "name":"myreference"
}

POST /v3.0/{NS}/reference/destroy?acct={account}&ref={reference name}

Destroy reference.

POST /v3.0/OPENIO/reference/destroy?acct=my_account&ref=myreference HTTP/1.1
Host: 127.0.0.1:6000
User-Agent: curl/7.47.0
Accept: */*
HTTP/1.1 204 No Content
Connection: Close
Content-Length: 0

POST /v3.0/{NS}/reference/relink?acct={account}&ref={reference name}&type={type}

{
  "kept":{"seq":1,"type":"rdir","host":"","args":""},
  "replaced":{"seq":1,"type":"rdir","host":"127.0.0.1:6011,127.0.0.1:6014","args":""}
}

Find replacement for some linked services to a reference

“kept” is the description of services that must be kept. “replaced” is the description of services that must be replaced.

POST /v3.0/OPENIO/reference/relink?acct=my_account&ref=myreference&type=rdir HTTP/1.1
Host: 127.0.0.1:6000
User-Agent: curl/7.47.0
Accept: */*
Content-Length: 143
Content-Type: application/x-www-form-urlencoded
HTTP/1.1 200 OK
Connection: Close
Content-Type: application/json
Content-Length: 117
[
  {"seq":1,"type":"rdir","host":"127.0.0.1:6012","args":""},
  {"seq":1,"type":"rdir","host":"127.0.0.1:6015","args":""}
]

POST /v3.0/{NS}/reference/link?acct={account}&ref={reference name}&type={type}

Link services to a reference

POST /v3.0/OPENIO/reference/link?acct=my_account&ref=myreference&type=rdir HTTP/1.1
Host: 127.0.0.1:6000
User-Agent: curl/7.47.0
Accept: */*
HTTP/1.1 200 OK
Connection: Close
Content-Type: application/json
Content-Length: 117
[
  {"seq":1,"type":"rdir","host":"127.0.0.1:6010","args":""},
  {"seq":1,"type":"rdir","host":"127.0.0.1:6015","args":""}
]

POST /v3.0/{NS}/reference/unlink?acct={account}&ref={reference name}&type={type}

Unlink service from a reference

POST /v3.0/OPENIO/reference/unlink?acct=my_account&ref=myreference&type=rdir HTTP/1.1
Host: 127.0.0.1:6000
User-Agent: curl/7.47.0
Accept: */*
HTTP/1.1 204 No Content
Connection: Close
Content-Length: 0

POST /v3.0/{NS}/reference/renew?acct={account}&ref={reference name}&type={type}

POST /v3.0/OPENIO/reference/renew?acct=my_account&ref=myreference&type=rdir HTTP/1.1
Host: 127.0.0.1:6000
User-Agent: curl/7.47.0
Accept: */*
HTTP/1.1 200 OK
Connection: Close
Content-Type: application/json
Content-Length: 117
[
  {"seq":1,"type":"rdir","host":"127.0.0.1:6010","args":""},
  {"seq":1,"type":"rdir","host":"127.0.0.1:6015","args":""}
]

POST /v3.0/{NS}/reference/force?acct={account}&ref={reference name}&type={type}

{"seq":1,"type":"rdir","host":"127.0.0.1:6010","args":""}

Force service to be linked to a reference

POST /v3.0/OPENIO/reference/force?acct=my_account&ref=myreference&type=rdir HTTP/1.1
Host: 127.0.0.1:6000
User-Agent: curl/7.47.0
Accept: */*
Content-Length: 59
Content-Type: application/x-www-form-urlencoded
HTTP/1.1 204 No Content
Connection: Close
Content-Length: 0

POST /v3.0/{NS}/reference/get_properties?acct={account}&ref={container name}

Get reference properties.

POST /v3.0/OPENIO/reference/get_properties?acct=my_account&ref=myreference HTTP/1.1
Host: 127.0.0.1:6000
User-Agent: curl/7.47.0
Accept: */*
HTTP/1.1 200 OK
Connection: Close
Content-Type: application/json
Content-Length: 90
{
  "cid":"B6A905025EBA78C555B4437321C176B4F9CC1EF49A45BBA8FA561D7F08592D2D",
  "properties":{}
}

POST /v3.0/{NS}/reference/set_properties?acct={account}&ref={container name}

{
  "properties":{"test":"1"}
}

Set reference properties.

POST /v3.0/OPENIO/reference/set_properties?acct=my_account&ref=myreference HTTP/1.1
Host: 127.0.0.1:6000
User-Agent: curl/7.47.0
Accept: */*
Content-Length: 27
Content-Type: application/x-www-form-urlencoded
HTTP/1.1 204 No Content
Connection: Close
Content-Length: 0