Skip to content

REST API

xMartin edited this page Jul 4, 2014 · 1 revision

REST API

/tabs
GET
list of all accessible tabs for the user
empty list while not authenticated (better HTTP error code? --> check)

PUT
not allowed

POST
create new tab and return tab ID

DELETE
not allowed (better allow DELETE if tab has no transactions?)


/tabs/<tab ID>

GET
access tab with <tab ID>
~~<tab ID> is int or long (to be decided) encoded as ascii string (like doodle links)~~
--> a random 16-character string is stored alongside the tab ID as key for external access

PUT
change tab properties (tab name)

POST
not allowed

DELETE
delete tab for user


/tabs/<tab ID>/transactions[?since=YYYY-MM-DD]
--> better user paging parameters "from" and "to"

GET
get all transactions in tab

PUT
not allowed

POST
create new transaction in tab

DELETE
not allowed


/tabs/<tab ID>/transactions/<transaction ID>

GET
get single transaction with <transaction ID>

PUT
modify transaction with <transaction ID>

POST
not allowed

DELETE
delete transaction with <transaction ID>


/users/

GET
get all users

PUT
not allowed

POST
create new user and return ID

DELETE
not allowed


/users/<user ID>

GET
get user data for user with <user ID>

PUT
modify user with <user ID>

POST
not allowed

DELETE
delete user with <user ID>



Data Structures

User
- ID
- e-mail address
- tab-id: local name,

Tab
- ID
- (default) name

Transaction
- ID
- timestamp
- date
- participants: name, amount
- title
- type ["shared" or "direct"]
Clone this wiki locally