From a85379ae4542cde656875e3c832b35cc7f28afd8 Mon Sep 17 00:00:00 2001 From: Alexandr Dubovikov Date: Wed, 19 Aug 2015 11:07:22 +0200 Subject: [PATCH] updated api --- apidoc/doc.php | 154 +++++++++++++++++++------------------- apidoc/html/api_data.js | 48 ++++++------ apidoc/html/api_data.json | 48 ++++++------ 3 files changed, 125 insertions(+), 125 deletions(-) diff --git a/apidoc/doc.php b/apidoc/doc.php index 2db6d7a..07b62dd 100644 --- a/apidoc/doc.php +++ b/apidoc/doc.php @@ -1,11 +1,11 @@ setDebugMode(true) //prints the debug trace, line number and file if a exception has been thrown. /** -* @api {get} /api/session get current session +* @api {get} /api/v1/session get current session * @apiName get session * @apiGroup Auth * @@ -13,7 +13,7 @@ * * @apiExample Example usage: * curl -v --cookie "HOMERSESSID=tcuass65ejl2lifoopuuurpmq7; path=/" -X GET \ -* "http://localhost/api/session" +* "http://localhost/api/v1/session" * * @apiSuccessTitle (700) Response * @@ -50,10 +50,10 @@ * **/ - ->addGetRoute('session', 'getSession') // => /api/session + ->addGetRoute('session', 'getSession') // => /api/v1/session /** -* @api {post} /api/session create a session +* @api {post} /api/v1/session create a session * @apiName create session * @apiGroup Auth * @@ -62,7 +62,7 @@ * @apiExample Example usage: * curl -v --cookie "HOMERSESSID=tcuass65ejl2lifoopuuurpmq7; path=/" -X POST -H "Content-Type: application/json" \ * -d '{"username":"admin","password":"test123"}' \ -* http://localhost/api/session +* http://localhost/api/v1/session * * @apiParam {String} username Login for session creation. * @apiParam {String} password Password for session creation. @@ -115,9 +115,9 @@ - ->addPostRoute('session', 'doSession') // => /api/session + ->addPostRoute('session', 'doSession') // => /api/v1/session /* -* @api {delete} /api/session delete current session +* @api {delete} /api/v1/session delete current session * @apiName delete session * @apiGroup Auth * @@ -125,7 +125,7 @@ * * @apiExample Example usage: * curl -v --cookie "HOMERSESSID=tcuass65ejl2lifoopuuurpmq7; path=/" -X DELETE \ -* "http://localhost/api/session" +* "http://localhost/api/v1/session" * * @apiSuccessTitle (700) Response * @@ -158,7 +158,7 @@ ->addDeleteRoute('session', 'doLogout') // => /admin/logout /** -* @api {get} /api/logout delete current session +* @api {get} /api/v1/logout delete current session * @apiName logout of session * @apiGroup Auth * @@ -166,7 +166,7 @@ * * @apiExample Example usage: * curl -v --cookie "HOMERSESSID=tcuass65ejl2lifoopuuurpmq7; path=/" -X GET \ -* "http://localhost/api/logout" +* "http://localhost/api/v1/logout" * * @apiSuccessTitle (700) Response * @@ -201,7 +201,7 @@ ->addSubController('search', 'RestApi\Search') //adds a new sub entry point 'tools' => admin/tools /** -* @api {post} /api/search/data do search +* @api {post} /api/v1/search/data do search * @apiName search data * @apiGroup Search * @@ -210,7 +210,7 @@ * @apiExample Example usage: * curl -v --cookie "HOMERSESSID=tcuass65ejl2lifoopuuurpmq7; path=/" -X POST -H "Content-Type: application/json" \ * -d '{"param":{"transaction":{"call":true},"limit":200,"search":{"ruri_user":"108"},"node":[{"id":"1","name":"homer01"}]},"timestamp":{"from":1433521859738,"to":1433529659738}}' \ -* http://localhost/api/search/data +* http://localhost/api/v1/search/data * * @apiParam {String[]} timestamp array * @apiParam {Number} timestamp.from search from this time @@ -372,9 +372,9 @@ **/ - ->addPostRoute('data', 'doSearchData') // => /api/session + ->addPostRoute('data', 'doSearchData') // => /api/v1/session /** -* @api {post} /api/search/method method by id +* @api {post} /api/v1/search/method method by id * @apiName search method * @apiGroup Search * @@ -383,7 +383,7 @@ * @apiExample Example usage: * curl -v --cookie "HOMERSESSID=tcuass65ejl2lifoopuuurpmq7; path=/" -X POST -H "Content-Type: application/json" \ * -d '{"timestamp":{"from":1433529542283,"to":1433529542283},"param":{"search":{"id":14588,"callid":"426690302"},"location":{"node":"single"},"transaction":{"call":true,"registration":false,"rest":false}}}' \ -* http://localhost/api/search/method +* http://localhost/api/v1/search/method * * @apiParam {String[]} timestamp array * @apiParam {Number} timestamp.from search from this time @@ -521,9 +521,9 @@ **/ - ->addPostRoute('method', 'doSearchMethod') // => /api/session + ->addPostRoute('method', 'doSearchMethod') // => /api/v1/session /** -* @api {post} /api/search/message message by callid +* @api {post} /api/v1/search/message message by callid * @apiName search message(s) * @apiGroup Search * @@ -532,7 +532,7 @@ * @apiExample Example usage: * curl -v --cookie "HOMERSESSID=tcuass65ejl2lifoopuuurpmq7; path=/" -X POST -H "Content-Type: application/json" \ * -d '{"timestamp":{"from":1433529542283,"to":1433529542283},"param":{"search":{"id":14588,"callid":"426690302"},"location":{"node":"single"},"transaction":{"call":true,"registration":false,"rest":false}}}' \ -* http://localhost/api/search/message +* http://localhost/api/v1/search/message * * @apiParam {String[]} timestamp array * @apiParam {Number} timestamp.from search from this time @@ -670,9 +670,9 @@ * } **/ - ->addPostRoute('message', 'doSearchMessage') // => /api/session + ->addPostRoute('message', 'doSearchMessage') // => /api/v1/session /** -* @api {post} /api/search/transaction search trasaction +* @api {post} /api/v1/search/transaction search trasaction * @apiName search transaction(s) * @apiGroup Search * @@ -681,7 +681,7 @@ * @apiExample Example usage: * curl -v --cookie "HOMERSESSID=tcuass65ejl2lifoopuuurpmq7; path=/" -X POST -H "Content-Type: application/json" \ * -d '{"timestamp":{"from":1433529545834,"to":1433529659738},"param":{"search":{"id":14600,"callid":["188735396@127.0.1.1"]},"location":{"node":[]},"transaction":{"call":true,"registration":false,"rest":false}}}' \ -* http://localhost/api/search/transaction +* http://localhost/api/v1/search/transaction * * @apiParam {String[]} timestamp array * @apiParam {Number} timestamp.from search from this time @@ -800,13 +800,13 @@ * } **/ - ->addPostRoute('transaction', 'doSearchTransaction') // => /api/session - ->addPostRoute('sharelink', 'doShareLink') // => /api/session - ->addPostRoute('share/transaction', 'doSearchShareTransaction') // => /api/session - ->addPostRoute('share/export/pcap', 'doPcapExportById') // => /api/session - ->addPostRoute('share/export/text', 'doTextExportById') // => /api/session + ->addPostRoute('transaction', 'doSearchTransaction') // => /api/v1/session + ->addPostRoute('sharelink', 'doShareLink') // => /api/v1/session + ->addPostRoute('share/transaction', 'doSearchShareTransaction') // => /api/v1/session + ->addPostRoute('share/export/pcap', 'doPcapExportById') // => /api/v1/session + ->addPostRoute('share/export/text', 'doTextExportById') // => /api/v1/session /** -* @api {post} /api/search/export/pcap pcap export +* @api {post} /api/v1/search/export/pcap pcap export * @apiName pcap of transaction * @apiGroup Search * @@ -815,7 +815,7 @@ * @apiExample Example usage: * curl -v --cookie "HOMERSESSID=tcuass65ejl2lifoopuuurpmq7; path=/" -X POST -H "Content-Type: application/json" \ * -d '{"timestamp":{"from":1433529545834,"to":1433529659738},"param":{"search":{"id":14600,"callid":["188735396@127.0.1.1"]},"location":{"node":[]},"transaction":{"call":true,"registration":false,"rest":false}}}' \ -* http://localhost/api/search/export/pcap +* http://localhost/api/v1/search/export/pcap * * @apiParam {String[]} timestamp array * @apiParam {Number} timestamp.from search from this time @@ -855,9 +855,9 @@ **/ - ->addPostRoute('export/pcap', 'doPcapExport') // => /api/session + ->addPostRoute('export/pcap', 'doPcapExport') // => /api/v1/session /** -* @api {post} /api/search/export/text text export +* @api {post} /api/v1/search/export/text text export * @apiName text of transaction * @apiGroup Search * @@ -866,7 +866,7 @@ * @apiExample Example usage: * curl -v --cookie "HOMERSESSID=tcuass65ejl2lifoopuuurpmq7; path=/" -X POST -H "Content-Type: application/json" \ * -d '{"timestamp":{"from":1433529545834,"to":1433529659738},"param":{"search":{"id":14600,"callid":["188735396@127.0.1.1"]},"location":{"node":[]},"transaction":{"call":true,"registration":false,"rest":false}}}' \ -* http://localhost/api/search/export/text +* http://localhost/api/v1/search/export/text * * @apiParam {String[]} timestamp array * @apiParam {Number} timestamp.from search from this time @@ -907,9 +907,9 @@ - ->addPostRoute('export/text', 'doTextExport') // => /api/session + ->addPostRoute('export/text', 'doTextExport') // => /api/v1/session /** -* @api {post} /api/search/export/data/pcap pcap export of messages +* @api {post} /api/v1/search/export/data/pcap pcap export of messages * @apiName pcap export of messages * @apiGroup Search * @@ -918,7 +918,7 @@ * @apiExample Example usage: * curl -v --cookie "HOMERSESSID=tcuass65ejl2lifoopuuurpmq7; path=/" -X POST -H "Content-Type: application/json" \ * -d '{"param":{"transaction":{"call":true},"limit":200,"search":{"ruri_user":"108"},"node":[{"id":"1","name":"homer01"}]},"timestamp":{"from":1433521859738,"to":1433529659738}}' \ -* http://localhost/api/search/export/data/pcap +* http://localhost/api/v1/search/export/data/pcap * * @apiParam {String[]} timestamp array * @apiParam {Number} timestamp.from search from this time @@ -980,9 +980,9 @@ * } **/ - ->addPostRoute('export/data/pcap', 'doPcapExportData') // => /api/session + ->addPostRoute('export/data/pcap', 'doPcapExportData') // => /api/v1/session /** -* @api {post} /api/search/export/data/text text export of messages +* @api {post} /api/v1/search/export/data/text text export of messages * @apiName text export of messages * @apiGroup Search * @@ -991,7 +991,7 @@ * @apiExample Example usage: * curl -v --cookie "HOMERSESSID=tcuass65ejl2lifoopuuurpmq7; path=/" -X POST -H "Content-Type: application/json" \ * -d '{"param":{"transaction":{"call":true},"limit":200,"search":{"ruri_user":"108"},"node":[{"id":"1","name":"homer01"}]},"timestamp":{"from":1433521859738,"to":1433529659738}}' \ -* http://localhost/api/search/export/data/text +* http://localhost/api/v1/search/export/data/text * * @apiParam {String[]} timestamp array * @apiParam {Number} timestamp.from search from this time @@ -1053,9 +1053,9 @@ * } **/ - ->addPostRoute('export/data/text', 'doTextExportData') // => /api/session + ->addPostRoute('export/data/text', 'doTextExportData') // => /api/v1/session /** -* @api {get} /api/search/data get search +* @api {get} /api/v1/search/data get search * @apiName get search data * @apiGroup Search * @@ -1064,7 +1064,7 @@ * @apiExample Example usage: * curl -v --cookie "HOMERSESSID=tcuass65ejl2lifoopuuurpmq7; path=/" -X GET -H "Content-Type: application/json" \ * -d '{"param":{"transaction":{"call":true},"limit":200,"node":[{"id":"1","name":"homer01"}]},"timestamp":{"from":1433521859738,"to":1433529659738}}' \ -* http://localhost/api/search/data +* http://localhost/api/v1/search/data * * @apiParam {String[]} timestamp array * @apiParam {Number} timestamp.from search from this time @@ -1198,66 +1198,66 @@ * } **/ - ->addGetRoute('data', 'getSearchData') // => /api/session + ->addGetRoute('data', 'getSearchData') // => /api/v1/session ->done() /* statistic */ ->addSubController('statistic', 'RestApi\Statistic') //adds a new sub entry point 'tools' => admin/tools - ->addGetRoute('method', 'getStatisticMethod') // => /api/session - ->addPostRoute('method', 'doStatisticMethod') // => /api/session - ->addPostRoute('data', 'doStatisticData') // => /api/session - ->addGetRoute('data', 'getStatisticData') // => /api/session - ->addPostRoute('ip', 'doStatisticIP') // => /api/session - ->addGetRoute('ip', 'getStatisticIP') // => /api/session - ->addPostRoute('useragent', 'doStatisticUserAgent') // => /api/session - ->addGetRoute('useragent', 'getStatisticUserAgent') // => /api/session + ->addGetRoute('method', 'getStatisticMethod') // => /api/v1/session + ->addPostRoute('method', 'doStatisticMethod') // => /api/v1/session + ->addPostRoute('data', 'doStatisticData') // => /api/v1/session + ->addGetRoute('data', 'getStatisticData') // => /api/v1/session + ->addPostRoute('ip', 'doStatisticIP') // => /api/v1/session + ->addGetRoute('ip', 'getStatisticIP') // => /api/v1/session + ->addPostRoute('useragent', 'doStatisticUserAgent') // => /api/v1/session + ->addGetRoute('useragent', 'getStatisticUserAgent') // => /api/v1/session ->done() /* alarm */ ->addSubController('alarm', 'RestApi\Alarm') //adds a new sub entry point 'tools' => admin/tools - ->addGetRoute('config/get', 'getAlarmConfig') // => /api/session - ->addPostRoute('config/new', 'doNewAlarmConfig') // => /api/session - ->addPostRoute('config/edit', 'doEditAlarmConfig') // => /api/session + ->addGetRoute('config/get', 'getAlarmConfig') // => /api/v1/session + ->addPostRoute('config/new', 'doNewAlarmConfig') // => /api/v1/session + ->addPostRoute('config/edit', 'doEditAlarmConfig') // => /api/v1/session ->addDeleteRoute('config/delete/([0-9]+)', 'deleteAlarmConfig') - ->addGetRoute('list/get', 'getAlarmList') // => /api/session - ->addPostRoute('list/edit', 'doEditAlarmList') // => /api/session - ->addGetRoute('method', 'getAlarmMethod') // => /api/session - ->addPostRoute('method', 'doAlarmMethod') // => /api/session - ->addPostRoute('ip', 'doAlarmIP') // => /api/session - ->addGetRoute('ip', 'getAlarmIP') // => /api/session - ->addPostRoute('useragent', 'doAlarmUserAgent') // => /api/session - ->addGetRoute('useragent', 'getAlarmUserAgent') // => /api/session + ->addGetRoute('list/get', 'getAlarmList') // => /api/v1/session + ->addPostRoute('list/edit', 'doEditAlarmList') // => /api/v1/session + ->addGetRoute('method', 'getAlarmMethod') // => /api/v1/session + ->addPostRoute('method', 'doAlarmMethod') // => /api/v1/session + ->addPostRoute('ip', 'doAlarmIP') // => /api/v1/session + ->addGetRoute('ip', 'getAlarmIP') // => /api/v1/session + ->addPostRoute('useragent', 'doAlarmUserAgent') // => /api/v1/session + ->addGetRoute('useragent', 'getAlarmUserAgent') // => /api/v1/session ->done() /* report */ ->addSubController('report', 'RestApi\Report') //adds a new sub entry point 'tools' => admin/tools - ->addPostRoute('rtcp', 'doRTCPReport') // => /api/session - ->addPostRoute('log', 'doLogReport') // => /api/session - ->addPostRoute('quality/([A-Za-z]+)', 'doQualityReport') // => /api/session + ->addPostRoute('rtcp', 'doRTCPReport') // => /api/v1/session + ->addPostRoute('log', 'doLogReport') // => /api/v1/session + ->addPostRoute('quality/([A-Za-z]+)', 'doQualityReport') // => /api/v1/session ->done() /* admin */ ->addSubController('admin', 'RestApi\Admin') //adds a new sub entry point 'tools' => admin/tools - ->addGetRoute('user/get', 'getUser') // => /api/session - ->addGetRoute('user/get/([0-9A-Za-z_])', 'getUserById') // => /api/session - ->addPostRoute('user/new', 'doNewUser') // => /api/session - ->addPostRoute('user/edit', 'doEditUser') // => /api/session + ->addGetRoute('user/get', 'getUser') // => /api/v1/session + ->addGetRoute('user/get/([0-9A-Za-z_])', 'getUserById') // => /api/v1/session + ->addPostRoute('user/new', 'doNewUser') // => /api/v1/session + ->addPostRoute('user/edit', 'doEditUser') // => /api/v1/session ->addDeleteRoute('user/delete/([0-9]+)', 'deleteUser') /* alias */ - ->addGetRoute('alias/get', 'getAlias') // => /api/session - ->addGetRoute('user/get/([0-9A-Za-z_])', 'getAliasById') // => /api/session - ->addPostRoute('alias/new', 'doNewAlias') // => /api/session - ->addPostRoute('alias/edit', 'doEditAlias') // => /api/session + ->addGetRoute('alias/get', 'getAlias') // => /api/v1/session + ->addGetRoute('user/get/([0-9A-Za-z_])', 'getAliasById') // => /api/v1/session + ->addPostRoute('alias/new', 'doNewAlias') // => /api/v1/session + ->addPostRoute('alias/edit', 'doEditAlias') // => /api/v1/session ->addDeleteRoute('user/delete/([0-9]+)', 'deleteAlias') /* nodes */ - ->addGetRoute('node/get', 'getNode') // => /api/session - ->addGetRoute('node/get/([0-9A-Za-z_])', 'getNodeById') // => /api/session - ->addPostRoute('node/new', 'doNewNode') // => /api/session - ->addPostRoute('node/edit', 'doEditNode') // => /api/session + ->addGetRoute('node/get', 'getNode') // => /api/v1/session + ->addGetRoute('node/get/([0-9A-Za-z_])', 'getNodeById') // => /api/v1/session + ->addPostRoute('node/new', 'doNewNode') // => /api/v1/session + ->addPostRoute('node/edit', 'doEditNode') // => /api/v1/session ->addDeleteRoute('node/delete/([0-9]+)', 'deleteNode') /* alarms */ - ->addGetRoute('useragent', 'getAlarmUserAgent') // => /api/session + ->addGetRoute('useragent', 'getAlarmUserAgent') // => /api/v1/session ->done() diff --git a/apidoc/html/api_data.js b/apidoc/html/api_data.js index ca71879..af0cae5 100644 --- a/apidoc/html/api_data.js +++ b/apidoc/html/api_data.js @@ -1,7 +1,7 @@ define({ "api": [ { "type": "post", - "url": "/api/session", + "url": "/api/v1/session", "title": "create a session", "name": "create_session", "group": "Auth", @@ -37,7 +37,7 @@ define({ "api": [ "examples": [ { "title": "Example usage:", - "content": "curl -v --cookie \"HOMERSESSID=tcuass65ejl2lifoopuuurpmq7; path=/\" -X POST -H \"Content-Type: application/json\" \\\n-d '{\"username\":\"admin\",\"password\":\"test123\"}' \\\nhttp://localhost/api/session", + "content": "curl -v --cookie \"HOMERSESSID=tcuass65ejl2lifoopuuurpmq7; path=/\" -X POST -H \"Content-Type: application/json\" \\\n-d '{\"username\":\"admin\",\"password\":\"test123\"}' \\\nhttp://localhost/api/v1/session", "type": "json" } ], @@ -160,7 +160,7 @@ define({ "api": [ }, { "type": "get", - "url": "/api/session", + "url": "/api/v1/session", "title": "get current session", "name": "get_session", "group": "Auth", @@ -180,7 +180,7 @@ define({ "api": [ "examples": [ { "title": "Example usage:", - "content": "curl -v --cookie \"HOMERSESSID=tcuass65ejl2lifoopuuurpmq7; path=/\" -X GET \\\n\"http://localhost/api/session\"", + "content": "curl -v --cookie \"HOMERSESSID=tcuass65ejl2lifoopuuurpmq7; path=/\" -X GET \\\n\"http://localhost/api/v1/session\"", "type": "json" } ], @@ -261,7 +261,7 @@ define({ "api": [ }, { "type": "get", - "url": "/api/logout", + "url": "/api/v1/logout", "title": "delete current session", "name": "logout_of_session", "group": "Auth", @@ -281,7 +281,7 @@ define({ "api": [ "examples": [ { "title": "Example usage:", - "content": "curl -v --cookie \"HOMERSESSID=tcuass65ejl2lifoopuuurpmq7; path=/\" -X GET \\\n\"http://localhost/api/logout\"", + "content": "curl -v --cookie \"HOMERSESSID=tcuass65ejl2lifoopuuurpmq7; path=/\" -X GET \\\n\"http://localhost/api/v1/logout\"", "type": "json" } ], @@ -334,7 +334,7 @@ define({ "api": [ }, { "type": "get", - "url": "/api/search/data", + "url": "/api/v1/search/data", "title": "get search", "name": "get_search_data", "group": "Search", @@ -419,7 +419,7 @@ define({ "api": [ "examples": [ { "title": "Example usage:", - "content": "curl -v --cookie \"HOMERSESSID=tcuass65ejl2lifoopuuurpmq7; path=/\" -X GET -H \"Content-Type: application/json\" \\\n-d '{\"param\":{\"transaction\":{\"call\":true},\"limit\":200,\"node\":[{\"id\":\"1\",\"name\":\"homer01\"}]},\"timestamp\":{\"from\":1433521859738,\"to\":1433529659738}}' \\\nhttp://localhost/api/search/data", + "content": "curl -v --cookie \"HOMERSESSID=tcuass65ejl2lifoopuuurpmq7; path=/\" -X GET -H \"Content-Type: application/json\" \\\n-d '{\"param\":{\"transaction\":{\"call\":true},\"limit\":200,\"node\":[{\"id\":\"1\",\"name\":\"homer01\"}]},\"timestamp\":{\"from\":1433521859738,\"to\":1433529659738}}' \\\nhttp://localhost/api/v1/search/data", "type": "json" } ], @@ -773,7 +773,7 @@ define({ "api": [ }, { "type": "post", - "url": "/api/search/export/data/pcap", + "url": "/api/v1/search/export/data/pcap", "title": "pcap export of messages", "name": "pcap_export_of_messages", "group": "Search", @@ -1047,7 +1047,7 @@ define({ "api": [ "examples": [ { "title": "Example usage:", - "content": "curl -v --cookie \"HOMERSESSID=tcuass65ejl2lifoopuuurpmq7; path=/\" -X POST -H \"Content-Type: application/json\" \\\n-d '{\"param\":{\"transaction\":{\"call\":true},\"limit\":200,\"search\":{\"ruri_user\":\"108\"},\"node\":[{\"id\":\"1\",\"name\":\"homer01\"}]},\"timestamp\":{\"from\":1433521859738,\"to\":1433529659738}}' \\\nhttp://localhost/api/search/export/data/pcap", + "content": "curl -v --cookie \"HOMERSESSID=tcuass65ejl2lifoopuuurpmq7; path=/\" -X POST -H \"Content-Type: application/json\" \\\n-d '{\"param\":{\"transaction\":{\"call\":true},\"limit\":200,\"search\":{\"ruri_user\":\"108\"},\"node\":[{\"id\":\"1\",\"name\":\"homer01\"}]},\"timestamp\":{\"from\":1433521859738,\"to\":1433529659738}}' \\\nhttp://localhost/api/v1/search/export/data/pcap", "type": "json" } ], @@ -1086,7 +1086,7 @@ define({ "api": [ }, { "type": "post", - "url": "/api/search/export/pcap", + "url": "/api/v1/search/export/pcap", "title": "pcap export", "name": "pcap_of_transaction", "group": "Search", @@ -1199,7 +1199,7 @@ define({ "api": [ "examples": [ { "title": "Example usage:", - "content": "curl -v --cookie \"HOMERSESSID=tcuass65ejl2lifoopuuurpmq7; path=/\" -X POST -H \"Content-Type: application/json\" \\\n-d '{\"timestamp\":{\"from\":1433529545834,\"to\":1433529659738},\"param\":{\"search\":{\"id\":14600,\"callid\":[\"188735396@127.0.1.1\"]},\"location\":{\"node\":[]},\"transaction\":{\"call\":true,\"registration\":false,\"rest\":false}}}' \\\nhttp://localhost/api/search/export/pcap", + "content": "curl -v --cookie \"HOMERSESSID=tcuass65ejl2lifoopuuurpmq7; path=/\" -X POST -H \"Content-Type: application/json\" \\\n-d '{\"timestamp\":{\"from\":1433529545834,\"to\":1433529659738},\"param\":{\"search\":{\"id\":14600,\"callid\":[\"188735396@127.0.1.1\"]},\"location\":{\"node\":[]},\"transaction\":{\"call\":true,\"registration\":false,\"rest\":false}}}' \\\nhttp://localhost/api/v1/search/export/pcap", "type": "json" } ], @@ -1238,7 +1238,7 @@ define({ "api": [ }, { "type": "post", - "url": "/api/search/data", + "url": "/api/v1/search/data", "title": "do search", "name": "search_data", "group": "Search", @@ -1512,7 +1512,7 @@ define({ "api": [ "examples": [ { "title": "Example usage:", - "content": "curl -v --cookie \"HOMERSESSID=tcuass65ejl2lifoopuuurpmq7; path=/\" -X POST -H \"Content-Type: application/json\" \\\n-d '{\"param\":{\"transaction\":{\"call\":true},\"limit\":200,\"search\":{\"ruri_user\":\"108\"},\"node\":[{\"id\":\"1\",\"name\":\"homer01\"}]},\"timestamp\":{\"from\":1433521859738,\"to\":1433529659738}}' \\\nhttp://localhost/api/search/data", + "content": "curl -v --cookie \"HOMERSESSID=tcuass65ejl2lifoopuuurpmq7; path=/\" -X POST -H \"Content-Type: application/json\" \\\n-d '{\"param\":{\"transaction\":{\"call\":true},\"limit\":200,\"search\":{\"ruri_user\":\"108\"},\"node\":[{\"id\":\"1\",\"name\":\"homer01\"}]},\"timestamp\":{\"from\":1433521859738,\"to\":1433529659738}}' \\\nhttp://localhost/api/v1/search/data", "type": "json" } ], @@ -1866,7 +1866,7 @@ define({ "api": [ }, { "type": "post", - "url": "/api/search/message", + "url": "/api/v1/search/message", "title": "message by callid", "name": "search_message_s_", "group": "Search", @@ -1979,7 +1979,7 @@ define({ "api": [ "examples": [ { "title": "Example usage:", - "content": "curl -v --cookie \"HOMERSESSID=tcuass65ejl2lifoopuuurpmq7; path=/\" -X POST -H \"Content-Type: application/json\" \\\n-d '{\"timestamp\":{\"from\":1433529542283,\"to\":1433529542283},\"param\":{\"search\":{\"id\":14588,\"callid\":\"426690302\"},\"location\":{\"node\":\"single\"},\"transaction\":{\"call\":true,\"registration\":false,\"rest\":false}}}' \\\nhttp://localhost/api/search/message", + "content": "curl -v --cookie \"HOMERSESSID=tcuass65ejl2lifoopuuurpmq7; path=/\" -X POST -H \"Content-Type: application/json\" \\\n-d '{\"timestamp\":{\"from\":1433529542283,\"to\":1433529542283},\"param\":{\"search\":{\"id\":14588,\"callid\":\"426690302\"},\"location\":{\"node\":\"single\"},\"transaction\":{\"call\":true,\"registration\":false,\"rest\":false}}}' \\\nhttp://localhost/api/v1/search/message", "type": "json" } ], @@ -2333,7 +2333,7 @@ define({ "api": [ }, { "type": "post", - "url": "/api/search/method", + "url": "/api/v1/search/method", "title": "method by id", "name": "search_method", "group": "Search", @@ -2446,7 +2446,7 @@ define({ "api": [ "examples": [ { "title": "Example usage:", - "content": "curl -v --cookie \"HOMERSESSID=tcuass65ejl2lifoopuuurpmq7; path=/\" -X POST -H \"Content-Type: application/json\" \\\n-d '{\"timestamp\":{\"from\":1433529542283,\"to\":1433529542283},\"param\":{\"search\":{\"id\":14588,\"callid\":\"426690302\"},\"location\":{\"node\":\"single\"},\"transaction\":{\"call\":true,\"registration\":false,\"rest\":false}}}' \\\nhttp://localhost/api/search/method", + "content": "curl -v --cookie \"HOMERSESSID=tcuass65ejl2lifoopuuurpmq7; path=/\" -X POST -H \"Content-Type: application/json\" \\\n-d '{\"timestamp\":{\"from\":1433529542283,\"to\":1433529542283},\"param\":{\"search\":{\"id\":14588,\"callid\":\"426690302\"},\"location\":{\"node\":\"single\"},\"transaction\":{\"call\":true,\"registration\":false,\"rest\":false}}}' \\\nhttp://localhost/api/v1/search/method", "type": "json" } ], @@ -2800,7 +2800,7 @@ define({ "api": [ }, { "type": "post", - "url": "/api/search/transaction", + "url": "/api/v1/search/transaction", "title": "search trasaction", "name": "search_transaction_s_", "group": "Search", @@ -2913,7 +2913,7 @@ define({ "api": [ "examples": [ { "title": "Example usage:", - "content": "curl -v --cookie \"HOMERSESSID=tcuass65ejl2lifoopuuurpmq7; path=/\" -X POST -H \"Content-Type: application/json\" \\\n-d '{\"timestamp\":{\"from\":1433529545834,\"to\":1433529659738},\"param\":{\"search\":{\"id\":14600,\"callid\":[\"188735396@127.0.1.1\"]},\"location\":{\"node\":[]},\"transaction\":{\"call\":true,\"registration\":false,\"rest\":false}}}' \\\nhttp://localhost/api/search/transaction", + "content": "curl -v --cookie \"HOMERSESSID=tcuass65ejl2lifoopuuurpmq7; path=/\" -X POST -H \"Content-Type: application/json\" \\\n-d '{\"timestamp\":{\"from\":1433529545834,\"to\":1433529659738},\"param\":{\"search\":{\"id\":14600,\"callid\":[\"188735396@127.0.1.1\"]},\"location\":{\"node\":[]},\"transaction\":{\"call\":true,\"registration\":false,\"rest\":false}}}' \\\nhttp://localhost/api/v1/search/transaction", "type": "json" } ], @@ -3148,7 +3148,7 @@ define({ "api": [ }, { "type": "post", - "url": "/api/search/export/data/text", + "url": "/api/v1/search/export/data/text", "title": "text export of messages", "name": "text_export_of_messages", "group": "Search", @@ -3422,7 +3422,7 @@ define({ "api": [ "examples": [ { "title": "Example usage:", - "content": "curl -v --cookie \"HOMERSESSID=tcuass65ejl2lifoopuuurpmq7; path=/\" -X POST -H \"Content-Type: application/json\" \\\n-d '{\"param\":{\"transaction\":{\"call\":true},\"limit\":200,\"search\":{\"ruri_user\":\"108\"},\"node\":[{\"id\":\"1\",\"name\":\"homer01\"}]},\"timestamp\":{\"from\":1433521859738,\"to\":1433529659738}}' \\\nhttp://localhost/api/search/export/data/text", + "content": "curl -v --cookie \"HOMERSESSID=tcuass65ejl2lifoopuuurpmq7; path=/\" -X POST -H \"Content-Type: application/json\" \\\n-d '{\"param\":{\"transaction\":{\"call\":true},\"limit\":200,\"search\":{\"ruri_user\":\"108\"},\"node\":[{\"id\":\"1\",\"name\":\"homer01\"}]},\"timestamp\":{\"from\":1433521859738,\"to\":1433529659738}}' \\\nhttp://localhost/api/v1/search/export/data/text", "type": "json" } ], @@ -3461,7 +3461,7 @@ define({ "api": [ }, { "type": "post", - "url": "/api/search/export/text", + "url": "/api/v1/search/export/text", "title": "text export", "name": "text_of_transaction", "group": "Search", @@ -3574,7 +3574,7 @@ define({ "api": [ "examples": [ { "title": "Example usage:", - "content": "curl -v --cookie \"HOMERSESSID=tcuass65ejl2lifoopuuurpmq7; path=/\" -X POST -H \"Content-Type: application/json\" \\\n-d '{\"timestamp\":{\"from\":1433529545834,\"to\":1433529659738},\"param\":{\"search\":{\"id\":14600,\"callid\":[\"188735396@127.0.1.1\"]},\"location\":{\"node\":[]},\"transaction\":{\"call\":true,\"registration\":false,\"rest\":false}}}' \\\nhttp://localhost/api/search/export/text", + "content": "curl -v --cookie \"HOMERSESSID=tcuass65ejl2lifoopuuurpmq7; path=/\" -X POST -H \"Content-Type: application/json\" \\\n-d '{\"timestamp\":{\"from\":1433529545834,\"to\":1433529659738},\"param\":{\"search\":{\"id\":14600,\"callid\":[\"188735396@127.0.1.1\"]},\"location\":{\"node\":[]},\"transaction\":{\"call\":true,\"registration\":false,\"rest\":false}}}' \\\nhttp://localhost/api/v1/search/export/text", "type": "json" } ], diff --git a/apidoc/html/api_data.json b/apidoc/html/api_data.json index 89700e3..802500c 100644 --- a/apidoc/html/api_data.json +++ b/apidoc/html/api_data.json @@ -1,7 +1,7 @@ [ { "type": "post", - "url": "/api/session", + "url": "/api/v1/session", "title": "create a session", "name": "create_session", "group": "Auth", @@ -37,7 +37,7 @@ "examples": [ { "title": "Example usage:", - "content": "curl -v --cookie \"HOMERSESSID=tcuass65ejl2lifoopuuurpmq7; path=/\" -X POST -H \"Content-Type: application/json\" \\\n-d '{\"username\":\"admin\",\"password\":\"test123\"}' \\\nhttp://localhost/api/session", + "content": "curl -v --cookie \"HOMERSESSID=tcuass65ejl2lifoopuuurpmq7; path=/\" -X POST -H \"Content-Type: application/json\" \\\n-d '{\"username\":\"admin\",\"password\":\"test123\"}' \\\nhttp://localhost/api/v1/session", "type": "json" } ], @@ -160,7 +160,7 @@ }, { "type": "get", - "url": "/api/session", + "url": "/api/v1/session", "title": "get current session", "name": "get_session", "group": "Auth", @@ -180,7 +180,7 @@ "examples": [ { "title": "Example usage:", - "content": "curl -v --cookie \"HOMERSESSID=tcuass65ejl2lifoopuuurpmq7; path=/\" -X GET \\\n\"http://localhost/api/session\"", + "content": "curl -v --cookie \"HOMERSESSID=tcuass65ejl2lifoopuuurpmq7; path=/\" -X GET \\\n\"http://localhost/api/v1/session\"", "type": "json" } ], @@ -261,7 +261,7 @@ }, { "type": "get", - "url": "/api/logout", + "url": "/api/v1/logout", "title": "delete current session", "name": "logout_of_session", "group": "Auth", @@ -281,7 +281,7 @@ "examples": [ { "title": "Example usage:", - "content": "curl -v --cookie \"HOMERSESSID=tcuass65ejl2lifoopuuurpmq7; path=/\" -X GET \\\n\"http://localhost/api/logout\"", + "content": "curl -v --cookie \"HOMERSESSID=tcuass65ejl2lifoopuuurpmq7; path=/\" -X GET \\\n\"http://localhost/api/v1/logout\"", "type": "json" } ], @@ -334,7 +334,7 @@ }, { "type": "get", - "url": "/api/search/data", + "url": "/api/v1/search/data", "title": "get search", "name": "get_search_data", "group": "Search", @@ -419,7 +419,7 @@ "examples": [ { "title": "Example usage:", - "content": "curl -v --cookie \"HOMERSESSID=tcuass65ejl2lifoopuuurpmq7; path=/\" -X GET -H \"Content-Type: application/json\" \\\n-d '{\"param\":{\"transaction\":{\"call\":true},\"limit\":200,\"node\":[{\"id\":\"1\",\"name\":\"homer01\"}]},\"timestamp\":{\"from\":1433521859738,\"to\":1433529659738}}' \\\nhttp://localhost/api/search/data", + "content": "curl -v --cookie \"HOMERSESSID=tcuass65ejl2lifoopuuurpmq7; path=/\" -X GET -H \"Content-Type: application/json\" \\\n-d '{\"param\":{\"transaction\":{\"call\":true},\"limit\":200,\"node\":[{\"id\":\"1\",\"name\":\"homer01\"}]},\"timestamp\":{\"from\":1433521859738,\"to\":1433529659738}}' \\\nhttp://localhost/api/v1/search/data", "type": "json" } ], @@ -773,7 +773,7 @@ }, { "type": "post", - "url": "/api/search/export/data/pcap", + "url": "/api/v1/search/export/data/pcap", "title": "pcap export of messages", "name": "pcap_export_of_messages", "group": "Search", @@ -1047,7 +1047,7 @@ "examples": [ { "title": "Example usage:", - "content": "curl -v --cookie \"HOMERSESSID=tcuass65ejl2lifoopuuurpmq7; path=/\" -X POST -H \"Content-Type: application/json\" \\\n-d '{\"param\":{\"transaction\":{\"call\":true},\"limit\":200,\"search\":{\"ruri_user\":\"108\"},\"node\":[{\"id\":\"1\",\"name\":\"homer01\"}]},\"timestamp\":{\"from\":1433521859738,\"to\":1433529659738}}' \\\nhttp://localhost/api/search/export/data/pcap", + "content": "curl -v --cookie \"HOMERSESSID=tcuass65ejl2lifoopuuurpmq7; path=/\" -X POST -H \"Content-Type: application/json\" \\\n-d '{\"param\":{\"transaction\":{\"call\":true},\"limit\":200,\"search\":{\"ruri_user\":\"108\"},\"node\":[{\"id\":\"1\",\"name\":\"homer01\"}]},\"timestamp\":{\"from\":1433521859738,\"to\":1433529659738}}' \\\nhttp://localhost/api/v1/search/export/data/pcap", "type": "json" } ], @@ -1086,7 +1086,7 @@ }, { "type": "post", - "url": "/api/search/export/pcap", + "url": "/api/v1/search/export/pcap", "title": "pcap export", "name": "pcap_of_transaction", "group": "Search", @@ -1199,7 +1199,7 @@ "examples": [ { "title": "Example usage:", - "content": "curl -v --cookie \"HOMERSESSID=tcuass65ejl2lifoopuuurpmq7; path=/\" -X POST -H \"Content-Type: application/json\" \\\n-d '{\"timestamp\":{\"from\":1433529545834,\"to\":1433529659738},\"param\":{\"search\":{\"id\":14600,\"callid\":[\"188735396@127.0.1.1\"]},\"location\":{\"node\":[]},\"transaction\":{\"call\":true,\"registration\":false,\"rest\":false}}}' \\\nhttp://localhost/api/search/export/pcap", + "content": "curl -v --cookie \"HOMERSESSID=tcuass65ejl2lifoopuuurpmq7; path=/\" -X POST -H \"Content-Type: application/json\" \\\n-d '{\"timestamp\":{\"from\":1433529545834,\"to\":1433529659738},\"param\":{\"search\":{\"id\":14600,\"callid\":[\"188735396@127.0.1.1\"]},\"location\":{\"node\":[]},\"transaction\":{\"call\":true,\"registration\":false,\"rest\":false}}}' \\\nhttp://localhost/api/v1/search/export/pcap", "type": "json" } ], @@ -1238,7 +1238,7 @@ }, { "type": "post", - "url": "/api/search/data", + "url": "/api/v1/search/data", "title": "do search", "name": "search_data", "group": "Search", @@ -1512,7 +1512,7 @@ "examples": [ { "title": "Example usage:", - "content": "curl -v --cookie \"HOMERSESSID=tcuass65ejl2lifoopuuurpmq7; path=/\" -X POST -H \"Content-Type: application/json\" \\\n-d '{\"param\":{\"transaction\":{\"call\":true},\"limit\":200,\"search\":{\"ruri_user\":\"108\"},\"node\":[{\"id\":\"1\",\"name\":\"homer01\"}]},\"timestamp\":{\"from\":1433521859738,\"to\":1433529659738}}' \\\nhttp://localhost/api/search/data", + "content": "curl -v --cookie \"HOMERSESSID=tcuass65ejl2lifoopuuurpmq7; path=/\" -X POST -H \"Content-Type: application/json\" \\\n-d '{\"param\":{\"transaction\":{\"call\":true},\"limit\":200,\"search\":{\"ruri_user\":\"108\"},\"node\":[{\"id\":\"1\",\"name\":\"homer01\"}]},\"timestamp\":{\"from\":1433521859738,\"to\":1433529659738}}' \\\nhttp://localhost/api/v1/search/data", "type": "json" } ], @@ -1866,7 +1866,7 @@ }, { "type": "post", - "url": "/api/search/message", + "url": "/api/v1/search/message", "title": "message by callid", "name": "search_message_s_", "group": "Search", @@ -1979,7 +1979,7 @@ "examples": [ { "title": "Example usage:", - "content": "curl -v --cookie \"HOMERSESSID=tcuass65ejl2lifoopuuurpmq7; path=/\" -X POST -H \"Content-Type: application/json\" \\\n-d '{\"timestamp\":{\"from\":1433529542283,\"to\":1433529542283},\"param\":{\"search\":{\"id\":14588,\"callid\":\"426690302\"},\"location\":{\"node\":\"single\"},\"transaction\":{\"call\":true,\"registration\":false,\"rest\":false}}}' \\\nhttp://localhost/api/search/message", + "content": "curl -v --cookie \"HOMERSESSID=tcuass65ejl2lifoopuuurpmq7; path=/\" -X POST -H \"Content-Type: application/json\" \\\n-d '{\"timestamp\":{\"from\":1433529542283,\"to\":1433529542283},\"param\":{\"search\":{\"id\":14588,\"callid\":\"426690302\"},\"location\":{\"node\":\"single\"},\"transaction\":{\"call\":true,\"registration\":false,\"rest\":false}}}' \\\nhttp://localhost/api/v1/search/message", "type": "json" } ], @@ -2333,7 +2333,7 @@ }, { "type": "post", - "url": "/api/search/method", + "url": "/api/v1/search/method", "title": "method by id", "name": "search_method", "group": "Search", @@ -2446,7 +2446,7 @@ "examples": [ { "title": "Example usage:", - "content": "curl -v --cookie \"HOMERSESSID=tcuass65ejl2lifoopuuurpmq7; path=/\" -X POST -H \"Content-Type: application/json\" \\\n-d '{\"timestamp\":{\"from\":1433529542283,\"to\":1433529542283},\"param\":{\"search\":{\"id\":14588,\"callid\":\"426690302\"},\"location\":{\"node\":\"single\"},\"transaction\":{\"call\":true,\"registration\":false,\"rest\":false}}}' \\\nhttp://localhost/api/search/method", + "content": "curl -v --cookie \"HOMERSESSID=tcuass65ejl2lifoopuuurpmq7; path=/\" -X POST -H \"Content-Type: application/json\" \\\n-d '{\"timestamp\":{\"from\":1433529542283,\"to\":1433529542283},\"param\":{\"search\":{\"id\":14588,\"callid\":\"426690302\"},\"location\":{\"node\":\"single\"},\"transaction\":{\"call\":true,\"registration\":false,\"rest\":false}}}' \\\nhttp://localhost/api/v1/search/method", "type": "json" } ], @@ -2800,7 +2800,7 @@ }, { "type": "post", - "url": "/api/search/transaction", + "url": "/api/v1/search/transaction", "title": "search trasaction", "name": "search_transaction_s_", "group": "Search", @@ -2913,7 +2913,7 @@ "examples": [ { "title": "Example usage:", - "content": "curl -v --cookie \"HOMERSESSID=tcuass65ejl2lifoopuuurpmq7; path=/\" -X POST -H \"Content-Type: application/json\" \\\n-d '{\"timestamp\":{\"from\":1433529545834,\"to\":1433529659738},\"param\":{\"search\":{\"id\":14600,\"callid\":[\"188735396@127.0.1.1\"]},\"location\":{\"node\":[]},\"transaction\":{\"call\":true,\"registration\":false,\"rest\":false}}}' \\\nhttp://localhost/api/search/transaction", + "content": "curl -v --cookie \"HOMERSESSID=tcuass65ejl2lifoopuuurpmq7; path=/\" -X POST -H \"Content-Type: application/json\" \\\n-d '{\"timestamp\":{\"from\":1433529545834,\"to\":1433529659738},\"param\":{\"search\":{\"id\":14600,\"callid\":[\"188735396@127.0.1.1\"]},\"location\":{\"node\":[]},\"transaction\":{\"call\":true,\"registration\":false,\"rest\":false}}}' \\\nhttp://localhost/api/v1/search/transaction", "type": "json" } ], @@ -3148,7 +3148,7 @@ }, { "type": "post", - "url": "/api/search/export/data/text", + "url": "/api/v1/search/export/data/text", "title": "text export of messages", "name": "text_export_of_messages", "group": "Search", @@ -3422,7 +3422,7 @@ "examples": [ { "title": "Example usage:", - "content": "curl -v --cookie \"HOMERSESSID=tcuass65ejl2lifoopuuurpmq7; path=/\" -X POST -H \"Content-Type: application/json\" \\\n-d '{\"param\":{\"transaction\":{\"call\":true},\"limit\":200,\"search\":{\"ruri_user\":\"108\"},\"node\":[{\"id\":\"1\",\"name\":\"homer01\"}]},\"timestamp\":{\"from\":1433521859738,\"to\":1433529659738}}' \\\nhttp://localhost/api/search/export/data/text", + "content": "curl -v --cookie \"HOMERSESSID=tcuass65ejl2lifoopuuurpmq7; path=/\" -X POST -H \"Content-Type: application/json\" \\\n-d '{\"param\":{\"transaction\":{\"call\":true},\"limit\":200,\"search\":{\"ruri_user\":\"108\"},\"node\":[{\"id\":\"1\",\"name\":\"homer01\"}]},\"timestamp\":{\"from\":1433521859738,\"to\":1433529659738}}' \\\nhttp://localhost/api/v1/search/export/data/text", "type": "json" } ], @@ -3461,7 +3461,7 @@ }, { "type": "post", - "url": "/api/search/export/text", + "url": "/api/v1/search/export/text", "title": "text export", "name": "text_of_transaction", "group": "Search", @@ -3574,7 +3574,7 @@ "examples": [ { "title": "Example usage:", - "content": "curl -v --cookie \"HOMERSESSID=tcuass65ejl2lifoopuuurpmq7; path=/\" -X POST -H \"Content-Type: application/json\" \\\n-d '{\"timestamp\":{\"from\":1433529545834,\"to\":1433529659738},\"param\":{\"search\":{\"id\":14600,\"callid\":[\"188735396@127.0.1.1\"]},\"location\":{\"node\":[]},\"transaction\":{\"call\":true,\"registration\":false,\"rest\":false}}}' \\\nhttp://localhost/api/search/export/text", + "content": "curl -v --cookie \"HOMERSESSID=tcuass65ejl2lifoopuuurpmq7; path=/\" -X POST -H \"Content-Type: application/json\" \\\n-d '{\"timestamp\":{\"from\":1433529545834,\"to\":1433529659738},\"param\":{\"search\":{\"id\":14600,\"callid\":[\"188735396@127.0.1.1\"]},\"location\":{\"node\":[]},\"transaction\":{\"call\":true,\"registration\":false,\"rest\":false}}}' \\\nhttp://localhost/api/v1/search/export/text", "type": "json" } ],