Account service
GET /status
Return a summary of the target ACCOUNT service. The body of the reply will present a count of the objects in the databse, formatted as a JSON object.
GET /status HTTP/1.1
Host: 127.0.0.1:6021
User-Agent: curl/7.55.1
Accept: */*
HTTP/1.1 200 OK
Server: gunicorn/19.7.1
Date: Wed, 22 Nov 2017 09:45:03 GMT
Connection: keep-alive
Content-Type: text/json; charset=utf-8
Content-Length: 20
{"account_count": 0}
PUT /v1.0/account/create?id=<account_name>
Create new account named account_name
PUT /v1.0/account/create?id=myaccount HTTP/1.1
Host: 127.0.0.1:6013
User-Agent: curl/7.47.0
Accept: */*
HTTP/1.1 201 CREATED
Server: gunicorn/19.9.0
Date: Wed, 01 Aug 2018 12:17:25 GMT
Connection: keep-alive
Content-Type: text/plain; charset=utf-8
Content-Length: 9
myaccount
GET /v1.0/account/list
Get list of existing accounts
GET /v1.0/account/list HTTP/1.1
Host: 127.0.0.1:6013
User-Agent: curl/7.47.0
Accept: */*
HTTP/1.1 200 OK
Server: gunicorn/19.9.0
Date: Wed, 01 Aug 2018 12:17:25 GMT
Connection: keep-alive
Content-Type: text/json; charset=utf-8
Content-Length: 13
["myaccount"]
PUT /v1.0/account/delete?id=<account_name>
Delete account named account_name
PUT /v1.0/account/delete?id=myaccount HTTP/1.1
Host: 127.0.0.1:6013
User-Agent: curl/7.47.0
Accept: */*
HTTP/1.1 204 NO CONTENT
Server: gunicorn/19.9.0
Date: Wed, 01 Aug 2018 12:17:25 GMT
Connection: keep-alive
Content-Type: text/plain; charset=utf-8
PUT /v1.0/account/update?id=<account_name>
{
"metadata": {"key":"value"},
"to_delete": ["key"]
}
Update metadata of account named account_name
PUT /v1.0/account/update?id=myaccount HTTP/1.1
Host: 127.0.0.1:6013
User-Agent: curl/7.47.0
Accept: */*
Content-Length: 41
Content-Type: application/x-www-for-urlencoded
HTTP/1.1 204 NO CONTENT
Server: gunicorn/19.9.0
Date: Wed, 01 Aug 2018 12:17:25 GMT
Connection: keep-alive
Content-Type: text/plain; charset=utf-8
GET /v1.0/account/show?id=<account_name>
Get information about an account named account_name
GET /v1.0/account/show?id=myaccount HTTP/1.1
Host: 127.0.0.1:6013
User-Agent: curl/7.47.0
Accept: */*
HTTP/1.1 200 OK
Server: gunicorn/19.9.0
Date: Wed, 01 Aug 2018 12:17:25 GMT
Connection: keep-alive
Content-Type: text/plain; charset=utf-8
Content-Length: 107
{
"ctime": "1533127401.08165",
"bytes": 0,
"objects": 0,
"id": "myaccount",
"containers": 0,
"metadata": {}
}
GET /v1.0/account/containers?id=<account_name>
Get information about containers on account named account_name
GET /v1.0/account/containers?id=myaccount HTTP/1.1
Host: 127.0.0.1:6013
User-Agent: curl/7.47.0
Accept: */*
HTTP/1.1 200 OK
Server: gunicorn/19.9.0
Date: Wed, 01 Aug 2018 12:17:25 GMT
Connection: keep-alive
Content-Type: text/plain; charset=utf-8
Content-Length: 122
{
"ctime": "1533127401.08165",
"bytes": 0,
"objects": 0,
"listing": [],
"id": "account",
"containers": 0,
"metadata": {}
}
POST /v1.0/account/container/update?id=<account_name>
{
"mtime": "123456789",
"dtime": "1223456789",
"name": "container name",
"objects": 0,
"bytes": 0
}
Update account with container-related metadata.
POST /v1.0/account/container/update?id=myaccount HTTP/1.1
Host: 127.0.0.1:6013
User-Agent: curl/7.47.0
Accept: */*
Content-Length: 84
Content-Type: application/x-www-form-urlencoded
HTTP/1.1 200 OK
Server: gunicorn/19.9.0
Date: Wed, 01 Aug 2018 12:17:25 GMT
Connection: keep-alive
Content-Type: text/plain; charset=utf-8
Content-Length: 117
GET /v1.0/account/container/reset?id=<account_name>
{
"name": "container name",
"mtime": 1234567891011
}
Reset container of an account named account_name
GET /v1.0/account/container/reset?id=myaccount HTTP/1.1
Host: 127.0.0.1:6013
User-Agent: curl/7.47.0
Accept: */*
Content-Length: 45
Content-Type: application/x-www-form-urlencoded
HTTP/1.1 204 NO CONTENT
Server: gunicorn/19.9.0
Date: Wed, 01 Aug 2018 12:17:25 GMT
Connection: keep-alive
Content-Type: text/plain; charset=utf-8
POST /v1.0/account/refresh?id=<account_name>
Refresh counter of an account named account_name
POST /v1.0/account/refresh?id=myaccount HTTP/1.1
Host: 127.0.0.1:6013
User-Agent: curl/7.47.0
Accept: */*
HTTP/1.1 204 NO CONTENT
Server: gunicorn/19.9.0
Date: Wed, 01 Aug 2018 12:17:25 GMT
Connection: keep-alive
Content-Type: text/plain; charset=utf-8
POST /v1.0/account/flush?id=<account_name>
Flush all container of an account named account_name
POST /v1.0/account/flush?id=myaccount HTTP/1.1
Host: 127.0.0.1:6013
User-Agent: curl/7.47.0
Accept: */*
HTTP/1.1 204 NO CONTENT
Server: gunicorn/19.9.0
Date: Wed, 01 Aug 2018 12:17:25 GMT
Connection: keep-alive
Content-Type: text/plain; charset=utf-8