Container service

POST /v3.0/{NS}/container/snapshot?acct={account}&ref={container}

{
  "account":"destination account name",
  "container":"destination container name"
}

Take a snapshot of a container. Create a separate database containing all information about the contents from the original database.

WARNING: this command is not intended to be used as-is as source and destination containers will share same chunks.

Please use openio container snapshot command.

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

POST /v3.0/{NS}/container/create_many?acct={account}

For each container, you can specify system and properties value by adding them on dictionnary after container name. Syntax is same as “container create”

{
  "containers":[{"name":"cont0"}, {"name":"cont1", "properties":{"test":"1"}}]
}

Create containers with given configuration and name.

POST /v3.0/OPENIO/container/create_many?acct=my_account HTTP/1.1
Host: 127.0.0.1:6000
User-Agent: curl/7.47.0
Accept: */*
Content-Length: 78
Content-Type: application/x-www-form-urlencoded
HTTP/1.1 200 OK
Connection: Close
Content-Type: application/json
Content-Length: 106
{
  "containers":[
                 {"name":"cont0","status":201,"message":"ok"},
                 {"name":"cont1","status":201,"message":"ok"}
               ]
}

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

System and properties value are optional

{
  "system":{"sys.m2.quota": val, "sys.m2.policy.storage": policy, ...},
  "properties":{"test":"1", ...}
}

Create container with given configuration.

POST /v3.0/OPENIO/container/create?acct=my_account&ref=mycontainer HTTP/1.1
Host: 127.0.0.1:6000
User-Agent: curl/7.47.0
Accept: */*
Content-Length: 30
Content-Type: application/x-www-form-urlencoded
HTTP/1.1 201 CREATED
Connection: Close
Content-Length: 0

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

Delete container.

POST /v3.0/OPENIO/container/destroy?acct=my_account&ref=mycontainer 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

GET /v3.0/{NS}/container/list?acct={account}&ref={container}&properties={bool}&max={int}

List object of container. In this example, only 2 objects are given without their properties

GET /v3.0/OPENIO/container/list?acct=my_account&ref=mycontainer&properties=False%max=2 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: 857
x-oio-container-meta-sys-account: my_account
x-oio-container-meta-sys-m2-ctime: 1533286343746147
x-oio-container-meta-sys-m2-init: 1
x-oio-container-meta-sys-m2-objects: 2
x-oio-container-meta-sys-m2-usage: 360
x-oio-container-meta-sys-m2-version: 2
x-oio-container-meta-sys-name: B6A905025EBA78C555B4437321C176B4F9CC1EF49A45BBA8FA561D7F08592D2D.1
x-oio-container-meta-sys-ns: OPENIO
x-oio-container-meta-sys-status: 0
x-oio-container-meta-sys-type: meta2
x-oio-container-meta-sys-user-name: mycontainer
x-oio-list-marker: obj2
x-oio-list-truncated: true
{"prefixes":[], ...}

GET /v3.0/{NS}/container/show?acct={account}&ref={container}&properties={bool}

Show container information, and return container properties

GET /v3.0/OPENIO/container/show?acct=my_account&ref=mycontainer 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: 17
x-oio-container-meta-sys-account: my_account
x-oio-container-meta-sys-m2-ctime: 1533286343746147
x-oio-container-meta-sys-m2-init: 1
x-oio-container-meta-sys-m2-objects: 2
x-oio-container-meta-sys-m2-usage: 360
x-oio-container-meta-sys-m2-version: 2
x-oio-container-meta-sys-name: B6A905025EBA78C555B4437321C176B4F9CC1EF49A45BBA8FA561D7F08592D2D.1
x-oio-container-meta-sys-ns: OPENIO
x-oio-container-meta-sys-status: 0
x-oio-container-meta-sys-type: meta2
x-oio-container-meta-sys-user-name: mycontainer
x-oio-container-meta-x-schema-version: 1.8
x-oio-container-meta-x-version-main-admin: 1%3A0
x-oio-container-meta-x-version-main-aliases: 1%3A0
x-oio-container-meta-x-version-main-chunks: 1%3A0
x-oio-container-meta-x-version-main-contents: 1%3A0
x-oio-container-meta-x-version-main-properties: 1%3A0
{"properties":{}}

POST /v3.0/{NS}/container/touch?acct={account}&ref={container}

Send an event to update object and object size on container.

POST /v3.0/OPENIO/container/touch?acct=my_account&ref=mycontainer 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}/container/dedup?acct={account}&ref={container}

POST /v3.0/OPENIO/container/dedup?acct=my_account&ref=mycontainer 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}/container/purge?acct={account}&ref={container}

Purge exceeding object versions.

POST /v3.0/OPENIO/container/purge?acct=my_account&ref=mycontainer 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}/container/flush?acct={account}&ref={container}

Remove object of container.

POST /v3.0/OPENIO/container/flush?acct=my_account&ref=mycontainer 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}/container/get_properties?acct={account}&ref={container}

Get container properties.

POST /v3.0/OPENIO/container/get_properties?acct=my_account&ref=mycontainer 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: 515
{"properties":[], ...}

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

{
  "system":{},
  "properties":{"test":"1"}
}

Set container properties.

POST /v3.0/OPENIO/container/set_properties?acct=my_account&ref=mycontainer HTTP/1.1
Host: 127.0.0.1:6000
User-Agent: curl/7.47.0
Accept: */*
Content-Length: 40
Content-Type: application/x-www-form-urlencoded
HTTP/1.1 200 OK
Connection: Close
Content-Type: application/json
Content-Length: 2
{}

POST /v3.0/{NS}/container/del_properties?acct={account}&ref={container}

["test"]

Delete container properties.

POST /v3.0/OPENIO/container/del_properties?acct=my_account&ref=mycontainer HTTP/1.1
Host: 127.0.0.1:6000
User-Agent: curl/7.47.0
Accept: */*
Content-Length: 8
Content-Type: application/x-www-form-urlencoded
HTTP/1.1 200 OK
Connection: Close
Content-Type: application/json
Content-Length: 2
{}