| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356 |
- [
- {
- "type": "post",
- "url": "/accounts",
- "title": "Create account",
- "version": "1.0.0",
- "name": "Create_account",
- "group": "Accounts",
- "parameter": {
- "fields": {
- "Parameter": [
- {
- "group": "Parameter",
- "type": "<p>String</p> ",
- "optional": false,
- "field": "name",
- "description": "<p>Name for the new account</p> "
- },
- {
- "group": "Parameter",
- "type": "<p>String</p> ",
- "optional": false,
- "field": "reference",
- "description": "<p>A reference (bank account number) for the new account</p> "
- }
- ]
- },
- "examples": [
- {
- "title": "Request-Example: ",
- "content": "{\n name: 'Home',\n reference: '1234567890'\n}",
- "type": "json"
- }
- ]
- },
- "header": {
- "fields": {
- "Header": [
- {
- "group": "Header",
- "type": "String",
- "optional": false,
- "field": "Content-Type",
- "description": "<p>application/json</p> "
- },
- {
- "group": "Header",
- "type": "String",
- "optional": false,
- "field": "Authorization",
- "description": "<p>The valid JWT token provided by the {post} /users/login resource</p> "
- }
- ]
- },
- "examples": [
- {
- "title": "Authorization header example:",
- "content": "\"Authorization\": \"JWT eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoiNTVlNmU0ZTAwNTIzMGY0OTI3MWM3MDc4IiwiaWF0IjoxNDQxMTk1MjMyfQ.eWh9nuXVVSVDKKCmTMDoc9FBU55-KgkiOJH1hrdQRTQ\"",
- "type": "string"
- }
- ]
- },
- "error": {
- "fields": {
- "400": [
- {
- "group": "400",
- "type": "<p>json</p> ",
- "optional": false,
- "field": "BadRequest",
- "description": "<p>The user can't be found.</p> "
- }
- ],
- "401": [
- {
- "group": "401",
- "type": "<p>json</p> ",
- "optional": false,
- "field": "AuthenticationFailed",
- "description": "<p>The user can't be found.</p> "
- }
- ]
- },
- "examples": [
- {
- "title": "AuthenticationFailed:",
- "content": "HTTP/1.1 401 Not Found\n{\n \"message\": \"Authentication failed\"\n}",
- "type": "json"
- },
- {
- "title": "BadRequest:",
- "content": "HTTP/1.1 400 Bad Request\n [\n {\n \"field\": \"name\",\n \"rule\": \"required\",\n \"message\": \"Path `name` is required.\"\n }\n ]",
- "type": "json"
- }
- ]
- },
- "success": {
- "fields": {
- "201": [
- {
- "group": "201",
- "type": "<p>Object</p> ",
- "optional": false,
- "field": "account",
- "description": "<p>The new account with its (sub)categories.</p> "
- }
- ]
- },
- "examples": [
- {
- "title": "Success-Response:",
- "content": "HTTP/1.1 201 Created\n {\n \"name\": \"Home\",\n \"reference\": \"1234567890\",\n \"user_id\": \"55e6e4e005230f49271c7078\",\n \"_id\": \"55e8218912c65a1730c34858\",\n \"created_at\": \"2015-09-03T10:31:37.889Z\",\n \"categories\": [\n {\n \"key\": \"alimony_payments\",\n \"label\": \"Alimony Payments\",\n \"_id\": \"55e8218912c65a1730c34859\",\n \"sub_categories\": []\n },\n {\n \"key\": \"automobile_expenses\",\n \"label\": \"Automobile Expenses\",\n \"_id\": \"55e8218912c65a1730c3485a\",\n \"sub_categories\": [\n {\n \"label\": \"Car Payment\",\n \"key\": \"car_payment\",\n \"_id\": \"55e8218912c65a1730c3485d\"\n }\n ]\n }\n ]\n }",
- "type": "json"
- }
- ]
- },
- "filename": "app/routes/accounts.js",
- "groupTitle": "Accounts"
- },
- {
- "type": "delete",
- "url": "/accounts/:account_id",
- "title": "Delete account",
- "version": "1.0.0",
- "name": "Delete_account",
- "group": "Accounts",
- "parameter": {
- "fields": {
- "Parameter": [
- {
- "group": "Parameter",
- "type": "<p>String</p> ",
- "optional": false,
- "field": "account_id",
- "description": "<p>The account to delete</p> "
- }
- ]
- }
- },
- "header": {
- "fields": {
- "Header": [
- {
- "group": "Header",
- "type": "String",
- "optional": false,
- "field": "Authorization",
- "description": "<p>The valid JWT token provided by the {post} /users/login resource</p> "
- }
- ]
- },
- "examples": [
- {
- "title": "Authorization header example:",
- "content": "\"Authorization\": \"JWT eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoiNTVlNmU0ZTAwNTIzMGY0OTI3MWM3MDc4IiwiaWF0IjoxNDQxMTk1MjMyfQ.eWh9nuXVVSVDKKCmTMDoc9FBU55-KgkiOJH1hrdQRTQ\"",
- "type": "string"
- }
- ]
- },
- "error": {
- "fields": {
- "401": [
- {
- "group": "401",
- "type": "<p>json</p> ",
- "optional": false,
- "field": "AuthenticationFailed",
- "description": "<p>The user can't be found.</p> "
- }
- ],
- "404": [
- {
- "group": "404",
- "type": "<p>json</p> ",
- "optional": false,
- "field": "AccountNotFound",
- "description": "<p>The account can't be found.</p> "
- }
- ]
- },
- "examples": [
- {
- "title": "AuthenticationFailed:",
- "content": "HTTP/1.1 401 Not Found\n{\n \"message\": \"Authentication failed\"\n}",
- "type": "json"
- },
- {
- "title": "AccountNotFound:",
- "content": "HTTP/1.1 404 Not Found\n {\n \"message\": \"Unknown account\"\n }",
- "type": "json"
- }
- ]
- },
- "success": {
- "fields": {
- "204": [
- {
- "group": "204",
- "optional": false,
- "field": "-",
- "description": ""
- }
- ]
- },
- "examples": [
- {
- "title": "Success-Response:",
- "content": "HTTP/1.1 204 No Content",
- "type": "json"
- }
- ]
- },
- "filename": "app/routes/accounts.js",
- "groupTitle": "Accounts"
- },
- {
- "type": "get",
- "url": "/accounts/:account_id",
- "title": "Get account",
- "version": "1.0.0",
- "name": "Get_account",
- "group": "Accounts",
- "parameter": {
- "fields": {
- "Parameter": [
- {
- "group": "Parameter",
- "type": "<p>String</p> ",
- "optional": false,
- "field": "account_id",
- "description": "<p>The given account</p> "
- }
- ]
- }
- },
- "header": {
- "fields": {
- "Header": [
- {
- "group": "Header",
- "type": "String",
- "optional": false,
- "field": "Content-Type",
- "description": "<p>application/json</p> "
- },
- {
- "group": "Header",
- "type": "String",
- "optional": false,
- "field": "Authorization",
- "description": "<p>The valid JWT token provided by the {post} /users/login resource</p> "
- }
- ]
- },
- "examples": [
- {
- "title": "Authorization header example:",
- "content": "\"Authorization\": \"JWT eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoiNTVlNmU0ZTAwNTIzMGY0OTI3MWM3MDc4IiwiaWF0IjoxNDQxMTk1MjMyfQ.eWh9nuXVVSVDKKCmTMDoc9FBU55-KgkiOJH1hrdQRTQ\"",
- "type": "string"
- }
- ]
- },
- "error": {
- "fields": {
- "401": [
- {
- "group": "401",
- "type": "<p>json</p> ",
- "optional": false,
- "field": "AuthenticationFailed",
- "description": "<p>The user can't be found.</p> "
- }
- ],
- "404": [
- {
- "group": "404",
- "type": "<p>json</p> ",
- "optional": false,
- "field": "AccountNotFound",
- "description": "<p>The account can't be found.</p> "
- }
- ]
- },
- "examples": [
- {
- "title": "AuthenticationFailed:",
- "content": "HTTP/1.1 401 Not Found\n{\n \"message\": \"Authentication failed\"\n}",
- "type": "json"
- },
- {
- "title": "AccountNotFound:",
- "content": "HTTP/1.1 404 Not Found\n {\n \"message\": \"Unknown account\"\n }",
- "type": "json"
- }
- ]
- },
- "success": {
- "fields": {
- "200": [
- {
- "group": "200",
- "type": "<p>Object</p> ",
- "optional": false,
- "field": "account",
- "description": "<p>The account with its (sub)categories.</p> "
- }
- ]
- },
- "examples": [
- {
- "title": "Success-Response:",
- "content": "HTTP/1.1 200 OK\n {\n \"name\": \"Home\",\n \"reference\": \"1234567890\",\n \"user_id\": \"55e6e4e005230f49271c7078\",\n \"_id\": \"55e8218912c65a1730c34858\",\n \"created_at\": \"2015-09-03T10:31:37.889Z\",\n \"categories\": [\n {\n \"key\": \"alimony_payments\",\n \"label\": \"Alimony Payments\",\n \"_id\": \"55e8218912c65a1730c34859\",\n \"sub_categories\": []\n },\n {\n \"key\": \"automobile_expenses\",\n \"label\": \"Automobile Expenses\",\n \"_id\": \"55e8218912c65a1730c3485a\",\n \"sub_categories\": [\n {\n \"label\": \"Car Payment\",\n \"key\": \"car_payment\",\n \"_id\": \"55e8218912c65a1730c3485d\"\n }\n ]\n }\n ]\n }",
- "type": "json"
- }
- ]
- },
- "filename": "app/routes/accounts.js",
- "groupTitle": "Accounts"
- },
- {
- "type": "put",
- "url": "/accounts/:account_id",
- "title": "Modify account",
- "version": "1.0.0",
- "name": "Modify_account",
- "group": "Accounts",
- "parameter": {
- "fields": {
- "Parameter": [
- {
- "group": "Parameter",
- "type": "<p>String</p> ",
- "optional": false,
- "field": "account_id",
- "description": "<p>The account id to modify</p> "
- },
- {
- "group": "Parameter",
- "type": "<p>String</p> ",
- "optional": false,
- "field": "name",
- "description": "<p>Name for the new account</p> "
- },
- {
- "group": "Parameter",
- "type": "<p>String</p> ",
- "optional": false,
- "field": "reference",
- "description": "<p>A reference (bank account number) for the new account</p> "
- }
- ]
- },
- "examples": [
- {
- "title": "Request-Example: ",
- "content": "{\n name: 'Home',\n reference: '1234567890'\n}",
- "type": "json"
- }
- ]
- },
- "header": {
- "fields": {
- "Header": [
- {
- "group": "Header",
- "type": "String",
- "optional": false,
- "field": "Content-Type",
- "description": "<p>application/json</p> "
- },
- {
- "group": "Header",
- "type": "String",
- "optional": false,
- "field": "Authorization",
- "description": "<p>The valid JWT token provided by the {post} /users/login resource</p> "
- }
- ]
- },
- "examples": [
- {
- "title": "Authorization header example:",
- "content": "\"Authorization\": \"JWT eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoiNTVlNmU0ZTAwNTIzMGY0OTI3MWM3MDc4IiwiaWF0IjoxNDQxMTk1MjMyfQ.eWh9nuXVVSVDKKCmTMDoc9FBU55-KgkiOJH1hrdQRTQ\"",
- "type": "string"
- }
- ]
- },
- "error": {
- "fields": {
- "400": [
- {
- "group": "400",
- "type": "<p>json</p> ",
- "optional": false,
- "field": "BadRequest",
- "description": "<p>The user can't be found.</p> "
- }
- ],
- "401": [
- {
- "group": "401",
- "type": "<p>json</p> ",
- "optional": false,
- "field": "AuthenticationFailed",
- "description": "<p>The user can't be found.</p> "
- }
- ],
- "404": [
- {
- "group": "404",
- "type": "<p>json</p> ",
- "optional": false,
- "field": "AccountNotFound",
- "description": "<p>The account can't be found.</p> "
- }
- ]
- },
- "examples": [
- {
- "title": "AuthenticationFailed:",
- "content": "HTTP/1.1 401 Not Found\n{\n \"message\": \"Authentication failed\"\n}",
- "type": "json"
- },
- {
- "title": "BadRequest:",
- "content": "HTTP/1.1 400 Bad Request\n [\n {\n \"field\": \"name\",\n \"rule\": \"required\",\n \"message\": \"Path `name` is required.\"\n }\n ]",
- "type": "json"
- },
- {
- "title": "AccountNotFound:",
- "content": "HTTP/1.1 404 Not Found\n {\n \"message\": \"Unknown account\"\n }",
- "type": "json"
- }
- ]
- },
- "success": {
- "fields": {
- "Success 200": [
- {
- "group": "Success 200",
- "type": "<p>String</p> ",
- "optional": false,
- "field": "username",
- "description": "<p>Username of the User.</p> "
- },
- {
- "group": "Success 200",
- "type": "<p>String</p> ",
- "optional": false,
- "field": "token",
- "description": "<p>The JWT valid token.</p> "
- }
- ]
- },
- "examples": [
- {
- "title": "Success-Response:",
- "content": "HTTP/1.1 200 OK\n {\n \"name\": \"Home\",\n \"reference\": \"1234567890\",\n \"user_id\": \"55e6e4e005230f49271c7078\",\n \"_id\": \"55e8218912c65a1730c34858\",\n \"created_at\": \"2015-09-03T10:31:37.889Z\",\n \"categories\": [\n {\n \"key\": \"alimony_payments\",\n \"label\": \"Alimony Payments\",\n \"_id\": \"55e8218912c65a1730c34859\",\n \"sub_categories\": []\n },\n {\n \"key\": \"automobile_expenses\",\n \"label\": \"Automobile Expenses\",\n \"_id\": \"55e8218912c65a1730c3485a\",\n \"sub_categories\": [\n {\n \"label\": \"Car Payment\",\n \"key\": \"car_payment\",\n \"_id\": \"55e8218912c65a1730c3485d\"\n }\n ]\n }\n ]\n }",
- "type": "json"
- }
- ]
- },
- "filename": "app/routes/accounts.js",
- "groupTitle": "Accounts"
- },
- {
- "type": "get",
- "url": "/accounts",
- "title": "List accounts",
- "version": "1.0.0",
- "name": "Retrieve_accounts",
- "group": "Accounts",
- "header": {
- "fields": {
- "Header": [
- {
- "group": "Header",
- "type": "String",
- "optional": false,
- "field": "Content-Type",
- "description": "<p>application/json</p> "
- },
- {
- "group": "Header",
- "type": "String",
- "optional": false,
- "field": "Authorization",
- "description": "<p>The valid JWT token provided by the {post} /users/login resource</p> "
- }
- ]
- },
- "examples": [
- {
- "title": "Authorization header example:",
- "content": "\"Authorization\": \"JWT eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoiNTVlNmU0ZTAwNTIzMGY0OTI3MWM3MDc4IiwiaWF0IjoxNDQxMTk1MjMyfQ.eWh9nuXVVSVDKKCmTMDoc9FBU55-KgkiOJH1hrdQRTQ\"",
- "type": "string"
- }
- ]
- },
- "error": {
- "fields": {
- "401": [
- {
- "group": "401",
- "type": "<p>json</p> ",
- "optional": false,
- "field": "AuthenticationFailed",
- "description": "<p>The user can't be found.</p> "
- }
- ]
- },
- "examples": [
- {
- "title": "AuthenticationFailed:",
- "content": "HTTP/1.1 401 Not Found\n{\n \"message\": \"Authentication failed\"\n}",
- "type": "json"
- }
- ]
- },
- "success": {
- "fields": {
- "200": [
- {
- "group": "200",
- "type": "<p>json</p> ",
- "optional": false,
- "field": "accounts",
- "description": "<p>List of all accounts and their (sub)categories.</p> "
- }
- ]
- },
- "examples": [
- {
- "title": "Success-Response:",
- "content": "HTTP/1.1 200 OK\n [{\n \"name\": \"Home\",\n \"reference\": \"1234567890\",\n \"user_id\": \"55e6e4e005230f49271c7078\",\n \"_id\": \"55e8218912c65a1730c34858\",\n \"created_at\": \"2015-09-03T10:31:37.889Z\",\n \"categories\": [\n {\n \"key\": \"alimony_payments\",\n \"label\": \"Alimony Payments\",\n \"_id\": \"55e8218912c65a1730c34859\",\n \"sub_categories\": []\n },\n {\n \"key\": \"automobile_expenses\",\n \"label\": \"Automobile Expenses\",\n \"_id\": \"55e8218912c65a1730c3485a\",\n \"sub_categories\": [\n {\n \"label\": \"Car Payment\",\n \"key\": \"car_payment\",\n \"_id\": \"55e8218912c65a1730c3485d\"\n }\n ]\n }\n ]\n }]",
- "type": "json"
- }
- ]
- },
- "filename": "app/routes/accounts.js",
- "groupTitle": "Accounts"
- },
- {
- "type": "post",
- "url": "/accounts/:account_id/entries",
- "title": "Create entry",
- "version": "1.0.0",
- "name": "Create_entry",
- "group": "Entries",
- "parameter": {
- "fields": {
- "Parameter": [
- {
- "group": "Parameter",
- "type": "<p>String</p> ",
- "optional": false,
- "field": "account_id",
- "description": "<p>The account id to populate</p> "
- },
- {
- "group": "Parameter",
- "type": "<p>String</p> ",
- "optional": false,
- "field": "amount",
- "description": "<p>Amount of the entry</p> "
- },
- {
- "group": "Parameter",
- "type": "<p>String</p> ",
- "optional": false,
- "field": "date",
- "description": "<p>Date of the bill/deposit</p> "
- },
- {
- "group": "Parameter",
- "type": "<p>String</p> ",
- "optional": true,
- "field": "category",
- "description": "<p>Category id of the bill/deposit</p> "
- },
- {
- "group": "Parameter",
- "type": "<p>String</p> ",
- "optional": true,
- "field": "sub_category",
- "description": "<p>Sub category id of the bill/deposit</p> "
- },
- {
- "group": "Parameter",
- "type": "<p>String</p> ",
- "optional": true,
- "field": "label",
- "description": "<p>A label for the entry</p> "
- }
- ]
- },
- "examples": [
- {
- "title": "Request-Example: ",
- "content": "{\n amount: 1000,\n date: 2015-09-03T10:04:11.481Z\n}",
- "type": "json"
- }
- ]
- },
- "header": {
- "fields": {
- "Header": [
- {
- "group": "Header",
- "type": "String",
- "optional": false,
- "field": "Content-Type",
- "description": "<p>application/json</p> "
- },
- {
- "group": "Header",
- "type": "String",
- "optional": false,
- "field": "Authorization",
- "description": "<p>The valid JWT token provided by the {post} /users/login resource</p> "
- }
- ]
- },
- "examples": [
- {
- "title": "Authorization header example:",
- "content": "\"Authorization\": \"JWT eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoiNTVlNmU0ZTAwNTIzMGY0OTI3MWM3MDc4IiwiaWF0IjoxNDQxMTk1MjMyfQ.eWh9nuXVVSVDKKCmTMDoc9FBU55-KgkiOJH1hrdQRTQ\"",
- "type": "string"
- }
- ]
- },
- "error": {
- "fields": {
- "400": [
- {
- "group": "400",
- "type": "<p>json</p> ",
- "optional": false,
- "field": "BadRequest",
- "description": "<p>The user can't be found.</p> "
- }
- ],
- "401": [
- {
- "group": "401",
- "type": "<p>json</p> ",
- "optional": false,
- "field": "AuthenticationFailed",
- "description": "<p>The user can't be found.</p> "
- }
- ],
- "404": [
- {
- "group": "404",
- "type": "<p>json</p> ",
- "optional": false,
- "field": "AccountNotFound",
- "description": "<p>The account can't be found.</p> "
- }
- ]
- },
- "examples": [
- {
- "title": "AuthenticationFailed:",
- "content": "HTTP/1.1 401 Not Found\n{\n \"message\": \"Authentication failed\"\n}",
- "type": "json"
- },
- {
- "title": "BadRequest:",
- "content": "HTTP/1.1 400 Bad Request\n [\n {\n \"field\": \"amount\",\n \"rule\": \"required\",\n \"message\": \"Path `amount` is required.\"\n }\n ]",
- "type": "json"
- },
- {
- "title": "AccountNotFound:",
- "content": "HTTP/1.1 404 Not Found\n {\n \"message\": \"Unknown account\"\n }",
- "type": "json"
- }
- ]
- },
- "success": {
- "fields": {
- "201": [
- {
- "group": "201",
- "type": "<p>Object</p> ",
- "optional": false,
- "field": "entry",
- "description": "<p>The created entry.</p> "
- },
- {
- "group": "201",
- "type": "<p>Object[]</p> ",
- "optional": false,
- "field": "entries",
- "description": "<p>All account's entries</p> "
- },
- {
- "group": "201",
- "type": "<p>Number</p> ",
- "optional": false,
- "field": "balance",
- "description": "<p>The account's total balance</p> "
- }
- ]
- },
- "examples": [
- {
- "title": "Success-Response:",
- "content": " HTTP/1.1 201 Created\n{\n entry: {\n _id: '',\n account_id: '1000',\n type: 'DEPOSIT'\n amount: 1000,\n date: 2015-09-03T10:04:11.481Z\n },\n entries: [\n {\n _id: '',\n account_id: '1000',\n type: 'DEPOSIT'\n amount: 1000,\n date: 2015-09-03T10:04:11.481Z\n }\n ],\n balance: 1000\n}",
- "type": "json"
- }
- ]
- },
- "filename": "app/routes/accounts.js",
- "groupTitle": "Entries"
- },
- {
- "type": "delete",
- "url": "/accounts/:account_id/entries/:entry_id",
- "title": "Delete entry",
- "version": "1.0.0",
- "name": "Delete_entry",
- "group": "Entries",
- "parameter": {
- "fields": {
- "Parameter": [
- {
- "group": "Parameter",
- "type": "<p>String</p> ",
- "optional": false,
- "field": "account_id",
- "description": "<p>The owner account</p> "
- },
- {
- "group": "Parameter",
- "type": "<p>String</p> ",
- "optional": false,
- "field": "entry_id",
- "description": "<p>The entry to delete</p> "
- }
- ]
- }
- },
- "header": {
- "fields": {
- "Header": [
- {
- "group": "Header",
- "type": "String",
- "optional": false,
- "field": "Authorization",
- "description": "<p>The valid JWT token provided by the {post} /users/login resource</p> "
- }
- ]
- },
- "examples": [
- {
- "title": "Authorization header example:",
- "content": "\"Authorization\": \"JWT eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoiNTVlNmU0ZTAwNTIzMGY0OTI3MWM3MDc4IiwiaWF0IjoxNDQxMTk1MjMyfQ.eWh9nuXVVSVDKKCmTMDoc9FBU55-KgkiOJH1hrdQRTQ\"",
- "type": "string"
- }
- ]
- },
- "error": {
- "fields": {
- "401": [
- {
- "group": "401",
- "type": "<p>json</p> ",
- "optional": false,
- "field": "AuthenticationFailed",
- "description": "<p>The user can't be found.</p> "
- }
- ],
- "404": [
- {
- "group": "404",
- "type": "<p>json</p> ",
- "optional": false,
- "field": "AccountNotFound",
- "description": "<p>The account can't be found.</p> "
- },
- {
- "group": "404",
- "type": "<p>json</p> ",
- "optional": false,
- "field": "EntryNotFound",
- "description": "<p>The entry can't be found.</p> "
- }
- ]
- },
- "examples": [
- {
- "title": "AuthenticationFailed:",
- "content": "HTTP/1.1 401 Not Found\n{\n \"message\": \"Authentication failed\"\n}",
- "type": "json"
- },
- {
- "title": "AccountNotFound:",
- "content": "HTTP/1.1 404 Not Found\n {\n \"message\": \"Unknown account\"\n }",
- "type": "json"
- },
- {
- "title": "AccountNotFound:",
- "content": "HTTP/1.1 404 Not Found",
- "type": "json"
- }
- ]
- },
- "success": {
- "fields": {
- "204": [
- {
- "group": "204",
- "optional": false,
- "field": "-",
- "description": ""
- }
- ]
- },
- "examples": [
- {
- "title": "Success-Response:",
- "content": "HTTP/1.1 204 No Content",
- "type": "json"
- }
- ]
- },
- "filename": "app/routes/accounts.js",
- "groupTitle": "Entries"
- },
- {
- "type": "post",
- "url": "/accounts/:account_id/entries/:entry_id",
- "title": "Modify entry",
- "version": "1.0.0",
- "name": "Modify_entry",
- "group": "Entries",
- "parameter": {
- "fields": {
- "Parameter": [
- {
- "group": "Parameter",
- "type": "<p>String</p> ",
- "optional": false,
- "field": "account_id",
- "description": "<p>The owner account</p> "
- },
- {
- "group": "Parameter",
- "type": "<p>String</p> ",
- "optional": false,
- "field": "entry_id",
- "description": "<p>The entry to modify</p> "
- },
- {
- "group": "Parameter",
- "type": "<p>String</p> ",
- "optional": false,
- "field": "amount",
- "description": "<p>Amount of the entry</p> "
- },
- {
- "group": "Parameter",
- "type": "<p>String</p> ",
- "optional": false,
- "field": "date",
- "description": "<p>Date of the bill/deposit</p> "
- },
- {
- "group": "Parameter",
- "type": "<p>String</p> ",
- "optional": true,
- "field": "category",
- "description": "<p>Category id of the bill/deposit</p> "
- },
- {
- "group": "Parameter",
- "type": "<p>String</p> ",
- "optional": true,
- "field": "sub_category",
- "description": "<p>Sub category id of the bill/deposit</p> "
- },
- {
- "group": "Parameter",
- "type": "<p>String</p> ",
- "optional": true,
- "field": "label",
- "description": "<p>A label for the entry</p> "
- }
- ]
- },
- "examples": [
- {
- "title": "Request-Example: ",
- "content": "{\n amount: 1000,\n date: 2015-09-03T10:04:11.481Z\n}",
- "type": "json"
- }
- ]
- },
- "header": {
- "fields": {
- "Header": [
- {
- "group": "Header",
- "type": "String",
- "optional": false,
- "field": "Content-Type",
- "description": "<p>application/json</p> "
- },
- {
- "group": "Header",
- "type": "String",
- "optional": false,
- "field": "Authorization",
- "description": "<p>The valid JWT token provided by the {post} /users/login resource</p> "
- }
- ]
- },
- "examples": [
- {
- "title": "Authorization header example:",
- "content": "\"Authorization\": \"JWT eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoiNTVlNmU0ZTAwNTIzMGY0OTI3MWM3MDc4IiwiaWF0IjoxNDQxMTk1MjMyfQ.eWh9nuXVVSVDKKCmTMDoc9FBU55-KgkiOJH1hrdQRTQ\"",
- "type": "string"
- }
- ]
- },
- "error": {
- "fields": {
- "400": [
- {
- "group": "400",
- "type": "<p>json</p> ",
- "optional": false,
- "field": "BadRequest",
- "description": "<p>The user can't be found.</p> "
- }
- ],
- "401": [
- {
- "group": "401",
- "type": "<p>json</p> ",
- "optional": false,
- "field": "AuthenticationFailed",
- "description": "<p>The user can't be found.</p> "
- }
- ],
- "404": [
- {
- "group": "404",
- "type": "<p>json</p> ",
- "optional": false,
- "field": "AccountNotFound",
- "description": "<p>The account can't be found.</p> "
- },
- {
- "group": "404",
- "type": "<p>json</p> ",
- "optional": false,
- "field": "EntryNotFound",
- "description": "<p>The entry can't be found.</p> "
- }
- ]
- },
- "examples": [
- {
- "title": "AuthenticationFailed:",
- "content": "HTTP/1.1 401 Not Found\n{\n \"message\": \"Authentication failed\"\n}",
- "type": "json"
- },
- {
- "title": "BadRequest:",
- "content": "HTTP/1.1 400 Bad Request\n [\n {\n \"field\": \"amount\",\n \"rule\": \"required\",\n \"message\": \"Path `amount` is required.\"\n }\n ]",
- "type": "json"
- },
- {
- "title": "AccountNotFound:",
- "content": "HTTP/1.1 404 Not Found\n {\n \"message\": \"Unknown account\"\n }",
- "type": "json"
- },
- {
- "title": "AccountNotFound:",
- "content": "HTTP/1.1 404 Not Found",
- "type": "json"
- }
- ]
- },
- "success": {
- "fields": {
- "200": [
- {
- "group": "200",
- "type": "<p>Object</p> ",
- "optional": false,
- "field": "entry",
- "description": "<p>The created entry.</p> "
- },
- {
- "group": "200",
- "type": "<p>Object[]</p> ",
- "optional": false,
- "field": "entries",
- "description": "<p>All account's entries</p> "
- },
- {
- "group": "200",
- "type": "<p>Number</p> ",
- "optional": false,
- "field": "balance",
- "description": "<p>The account's total balance</p> "
- }
- ]
- },
- "examples": [
- {
- "title": "Success-Response:",
- "content": " HTTP/1.1 200 OK\n{\n entry: {\n _id: '',\n account_id: '1000',\n type: 'DEPOSIT'\n amount: 1000,\n date: 2015-09-03T10:04:11.481Z\n },\n entries: [\n {\n _id: '',\n account_id: '1000',\n type: 'DEPOSIT'\n amount: 1000,\n date: 2015-09-03T10:04:11.481Z\n }\n ],\n balance: 1000\n}",
- "type": "json"
- }
- ]
- },
- "filename": "app/routes/accounts.js",
- "groupTitle": "Entries"
- },
- {
- "type": "post",
- "url": "/users/login",
- "title": "Login",
- "version": "1.0.0",
- "name": "Login",
- "group": "Users",
- "header": {
- "fields": {
- "Header": [
- {
- "group": "Header",
- "type": "String",
- "optional": false,
- "field": "Content-Type",
- "description": "<p>application/json</p> "
- }
- ]
- }
- },
- "parameter": {
- "fields": {
- "Parameter": [
- {
- "group": "Parameter",
- "type": "<p>String</p> ",
- "optional": false,
- "field": "username",
- "description": "<p>User's username</p> "
- },
- {
- "group": "Parameter",
- "type": "<p>String</p> ",
- "optional": false,
- "field": "password",
- "description": "<p>User's password</p> "
- }
- ]
- },
- "examples": [
- {
- "title": "Request-Example: ",
- "content": "{ \n \"username\": \"John\", \n \"password\": \"s3cr3t\" \n}",
- "type": "json"
- }
- ]
- },
- "success": {
- "fields": {
- "Success 200": [
- {
- "group": "Success 200",
- "type": "<p>String</p> ",
- "optional": false,
- "field": "username",
- "description": "<p>Username of the User.</p> "
- },
- {
- "group": "Success 200",
- "type": "<p>String</p> ",
- "optional": false,
- "field": "token",
- "description": "<p>The JWT valid token.</p> "
- }
- ]
- },
- "examples": [
- {
- "title": "Success-Response:",
- "content": "HTTP/1.1 200 OK\n{\n \"username\": \"John\",\n \"token\": \"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoiNTVlNmU0ZTAwNTIzMGY0OTI3MWM3MDc4IiwiaWF0IjoxNDQxMTk1MjMyfQ.eWh9nuXVVSVDKKCmTMDoc9FBU55-KgkiOJH1hrdQRTQ\"\n}",
- "type": "json"
- }
- ]
- },
- "error": {
- "fields": {
- "401": [
- {
- "group": "401",
- "type": "<p>json</p> ",
- "optional": false,
- "field": "AuthenticationFailed",
- "description": "<p>The user can't be found.</p> "
- }
- ]
- },
- "examples": [
- {
- "title": "AuthenticationFailed:",
- "content": "HTTP/1.1 401 Not Found\n{\n \"message\": \"Authentication failed\"\n}",
- "type": "json"
- }
- ]
- },
- "filename": "app/routes/users.js",
- "groupTitle": "Users"
- },
- {
- "type": "delete",
- "url": "/users/login",
- "title": "Logout",
- "version": "1.0.0",
- "name": "Logout",
- "group": "Users",
- "header": {
- "fields": {
- "Header": [
- {
- "group": "Header",
- "type": "String",
- "optional": false,
- "field": "Authorization",
- "description": "<p>The valid JWT token provided by the {post} /users/login resource</p> "
- }
- ]
- },
- "examples": [
- {
- "title": "Authorization header example:",
- "content": "\"Authorization\": \"JWT eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoiNTVlNmU0ZTAwNTIzMGY0OTI3MWM3MDc4IiwiaWF0IjoxNDQxMTk1MjMyfQ.eWh9nuXVVSVDKKCmTMDoc9FBU55-KgkiOJH1hrdQRTQ\"",
- "type": "string"
- }
- ]
- },
- "success": {
- "examples": [
- {
- "title": "Success-Response:",
- "content": "HTTP/1.1 200 OK",
- "type": "json"
- }
- ]
- },
- "filename": "app/routes/users.js",
- "groupTitle": "Users"
- },
- {
- "type": "post",
- "url": "/users",
- "title": "Registration",
- "version": "1.0.0",
- "name": "Registration",
- "group": "Users",
- "header": {
- "fields": {
- "Header": [
- {
- "group": "Header",
- "type": "String",
- "optional": false,
- "field": "Content-Type",
- "description": "<p>application/json</p> "
- }
- ]
- }
- },
- "parameter": {
- "fields": {
- "Parameter": [
- {
- "group": "Parameter",
- "type": "<p>String</p> ",
- "optional": false,
- "field": "username",
- "description": "<p>User's username</p> "
- },
- {
- "group": "Parameter",
- "type": "<p>String</p> ",
- "optional": false,
- "field": "password",
- "description": "<p>User's password</p> "
- },
- {
- "group": "Parameter",
- "type": "<p>String</p> ",
- "optional": true,
- "field": "language",
- "defaultValue": "en",
- "description": "<p>User's default language</p> "
- }
- ]
- },
- "examples": [
- {
- "title": "Request-Example: ",
- "content": "{ \n \"username\": \"John\", \n \"password\": \"s3cr3t\",\n \"language\": \"en\"\n}",
- "type": "json"
- }
- ]
- },
- "success": {
- "fields": {
- "201": [
- {
- "group": "201",
- "type": "<p>String</p> ",
- "optional": false,
- "field": "username",
- "description": "<p>Username of the User.</p> "
- },
- {
- "group": "201",
- "type": "<p>String</p> ",
- "optional": false,
- "field": "token",
- "description": "<p>The JWT valid token.</p> "
- }
- ]
- },
- "examples": [
- {
- "title": "Success-Response:",
- "content": "HTTP/1.1 201 OK\n{\n \"username\": \"John\",\n \"token\": \"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoiNTVlNmU0ZTAwNTIzMGY0OTI3MWM3MDc4IiwiaWF0IjoxNDQxMTk1MjMyfQ.eWh9nuXVVSVDKKCmTMDoc9FBU55-KgkiOJH1hrdQRTQ\"\n}",
- "type": "json"
- }
- ]
- },
- "error": {
- "fields": {
- "400": [
- {
- "group": "400",
- "type": "<p>json</p> ",
- "optional": false,
- "field": "BadRequest",
- "description": "<p>Validation errors.</p> "
- }
- ],
- "409": [
- {
- "group": "409",
- "type": "<p>json</p> ",
- "optional": false,
- "field": "UserAlreadyExist",
- "description": "<p>The user can't be found.</p> "
- }
- ]
- },
- "examples": [
- {
- "title": "UserAlreadyExist:",
- "content": "HTTP/1.1 409 Not Found\n{\n \"message\": \"Account already exists\"\n}",
- "type": "json"
- },
- {
- "title": "BadRequest:",
- "content": "HTTP/1.1 400 Bad Request\n[\n {\n \"field\": \"password\",\n \"rule\": \"required\",\n \"message\": \"Path `password` is required.\"\n },\n {\n \"field\": \"username\",\n \"rule\": \"required\",\n \"message\": \"Path `username` is required.\"\n }\n ]",
- "type": "json"
- }
- ]
- },
- "filename": "app/routes/users.js",
- "groupTitle": "Users"
- },
- {
- "type": "delete",
- "url": "/users",
- "title": "Unregistration",
- "version": "1.0.0",
- "name": "Unregistration",
- "group": "Users",
- "header": {
- "fields": {
- "Header": [
- {
- "group": "Header",
- "type": "String",
- "optional": false,
- "field": "Content-Type",
- "description": "<p>application/json</p> "
- },
- {
- "group": "Header",
- "type": "String",
- "optional": false,
- "field": "Authorization",
- "description": "<p>The valid JWT token provided by the {post} /users/login resource</p> "
- }
- ]
- },
- "examples": [
- {
- "title": "Authorization header example:",
- "content": "\"Authorization\": \"JWT eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoiNTVlNmU0ZTAwNTIzMGY0OTI3MWM3MDc4IiwiaWF0IjoxNDQxMTk1MjMyfQ.eWh9nuXVVSVDKKCmTMDoc9FBU55-KgkiOJH1hrdQRTQ\"",
- "type": "string"
- }
- ]
- },
- "success": {
- "fields": {
- "204": [
- {
- "group": "204",
- "optional": false,
- "field": "-",
- "description": ""
- }
- ]
- },
- "examples": [
- {
- "title": "Success-Response:",
- "content": "HTTP/1.1 204 No Content",
- "type": "json"
- }
- ]
- },
- "error": {
- "fields": {
- "401": [
- {
- "group": "401",
- "type": "<p>json</p> ",
- "optional": false,
- "field": "AuthenticationFailed",
- "description": "<p>The user can't be found.</p> "
- }
- ]
- },
- "examples": [
- {
- "title": "AuthenticationFailed:",
- "content": "HTTP/1.1 401 Not Found\n{\n \"message\": \"Authentication failed\"\n}",
- "type": "json"
- }
- ]
- },
- "filename": "app/routes/users.js",
- "groupTitle": "Users"
- }
- ]
|