Skip to content
wsourdeau edited this page Apr 12, 2013 · 6 revisions
GET /
The command returns the list of available commands in JSON format. This can be used as a reference card for basic commands as it is easily readable by a human.
GET /ping
This command enables to check whether the Banker service is available via HTTP. When everything is running, the response will be an immediate "pong".
GET /v1/accounts

This command returns the hierachical list of available accounts as a JSON array of arrays of strings.

parameters:
maxDepth: an integer describing the maximum length at which keys will be
sought (default: unlimited)
accountPrefix: a string that specifies the prefix against which the
returned account names will be matched
POST /v1/accounts

This command is used to create a new account in the Banker database.

parameters:
accountType: a string describing the account type to be created ("spend" or
"budget")

accountName: a string describing the account name to be created

GET /v1/accounts/<accountName>

parameters:

description:

"/v1/accounts/<accountName> GET": {
"arguments": {
"resourceParams": [
{
"cppType": "RTBKIT::AccountKey", "description": "account to operate on", "encoding": "URI encoded", "location": "URI", "name": "<account>"

}

], "result": "Representation of the named account"

}, "description": "Return a representation of the given account", "path": "", "verbs": [

"GET"

]

},

"/v1/accounts/<accountName>/balance POST,PUT": {
"arguments": {
"jsonParams": [
{
"cppType": "RTBKIT::CurrencyPool", "description": "amount to set balance to", "encoding": "JSON", "location": "Request Body"

}

], "requestParams": [

{
"cppType": "RTBKIT::AccountType", "defaultValue": "0", "description": "type of account for implicit creation (default no creation)", "encoding": "URI encoded", "location": "query string", "name": "accountType"

}

], "resourceParams": [

{
"cppType": "RTBKIT::AccountKey", "description": "account to operate on", "encoding": "URI encoded", "location": "URI", "name": "<account>"

}

], "result": "Account: Representation of the modified account"

}, "description": "Transfer budget from the parent such that account's balance amount matches the parameter", "path": "/balance", "verbs": [

"POST", "PUT"

]

},

"/v1/accounts/<accountName>/budget POST,PUT": {
"arguments": {
"jsonParams": [
{
"cppType": "RTBKIT::CurrencyPool", "description": "amount to set budget to", "encoding": "JSON", "location": "Request Body"

}

], "resourceParams": [

{
"cppType": "RTBKIT::AccountKey", "description": "account to operate on", "encoding": "URI encoded", "location": "URI", "name": "<account>"

}

], "result": "Status of the account after the operation"

}, "description": "Set a top level account's budget to match the given amount. ", "path": "/budget", "verbs": [

"POST", "PUT"

]

},

"/v1/accounts/<accountName>/children GET": {
"arguments": {
"requestParams": [
{
"cppType": "int", "defaultValue": "0", "description": "depth of children (default = 0)", "encoding": "URI encoded", "location": "query string", "name": "depth"

}

], "resourceParams": [

{
"cppType": "RTBKIT::AccountKey", "description": "account to operate on", "encoding": "URI encoded", "location": "URI", "name": "<account>"

}

], "result": "Array of names of child accounts"

}, "description": "Return a list of the children of a given account", "path": "/children", "verbs": [

"GET"

]

},

"/v1/accounts/<accountName>/shadow POST,PUT": {
"arguments": {
"jsonParams": [
{
"cppType": "RTBKIT::ShadowAccount", "description": "Representation of the shadow account", "encoding": "JSON", "location": "Request Body"

}

], "resourceParams": [

{
"cppType": "RTBKIT::AccountKey", "description": "account to operate on", "encoding": "URI encoded", "location": "URI", "name": "<account>"

}

], "result": "Account: Representation of the modified account"

}, "description": "Update a spend account's spend and commitments", "path": "/shadow", "verbs": [

"POST", "PUT"

]

}, "/v1/accounts/<accountName>/subtree GET": {

"arguments": {
"requestParams": [
{
"cppType": "int", "defaultValue": "0", "description": "depth of children (default = 0)", "encoding": "URI encoded", "location": "query string", "name": "depth"

}

], "resourceParams": [

{
"cppType": "RTBKIT::AccountKey", "description": "account to operate on", "encoding": "URI encoded", "location": "URI", "name": "<account>"

}

], "result": "Representation of the given subtree"

}, "description": "Return a representation of the given account and its children", "path": "/subtree", "verbs": [

"GET"

]

}, "/v1/accounts/<accountName>/summary GET": {

"arguments": {
"requestParams": [
{
"cppType": "int", "defaultValue": "3", "description": "maximum depth to traverse", "encoding": "URI encoded", "location": "query string", "name": "maxDepth"

}

], "resourceParams": [

{
"cppType": "RTBKIT::AccountKey", "description": "account to operate on", "encoding": "URI encoded", "location": "URI", "name": "<account>"

}

], "result": "AccountSummary: aggregation of the given account and its children"

}, "description": "Return the aggregated summary of the given account", "path": "/summary", "verbs": [

"GET"

]

},

"/v1/summary GET": {
"arguments": {
"requestParams": [
{
"cppType": "int", "defaultValue": "3", "description": "maximum depth to traverse", "encoding": "URI encoded", "location": "query string", "name": "maxDepth"

}

], "result": ""

}, "description": "Return the simplified summaries of all existing accounts", "path": "/summary", "verbs": [

"GET"

]

}

}

Clone this wiki locally