apiv2.php 9.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123
  1. <?php
  2. $routes = array();
  3. $routes['/programs'] = array('response' => 'programs(array),pager');
  4. $routes['/programs/:programID'] = array('redirect' => '/programs/:programID/edit', 'response' => 'program');
  5. $routes['/programs/:programID/projects'] = array('redirect' => '/programs/:programID/project', 'response' => 'projectStats(array)|projects,pager');
  6. $routes['/programs/:programID/products'] = array('redirect' => '/programs/:programID/product', 'response' => 'products(array),pager');
  7. $routes['/products'] = array('redirect' => '/products/all');
  8. $routes['/products/all'] = array('response' => 'productStats|products,pager');
  9. $routes['/products/browse'] = array('response' => 'stories,pager', 'response' => 'stories(array),pager'); // stories
  10. $routes['/products/:productID'] = array('response' => 'product,dynamics,members,branches,reviewers');
  11. $routes['/products/:productID/stories'] = array('redirect' => '/products/browse?productID=:productID');
  12. $routes['/projects/:projectID/stories'] = array('redirect' => '/projectstories/story?projectID=:projectID', 'response' => 'stories(array),pager');
  13. $routes['/executions/:executionID/stories'] = array('redirect' => '/executions/story?executionID=:executionID');
  14. $routes['/stories/:storyID'] = array('response' => 'story,actions(array)');
  15. $routes['/products/:productID/epics'] = array('redirect' => '/products/browse?productID=:productID&storyType=epic', 'response' => 'stories(array)|epics,pager');
  16. $routes['/epics/:storyID'] = array('response' => 'story|epic,actions(array)');
  17. $routes['/products/:productID/requirements'] = array('redirect' => '/products/browse?productID=:productID&storyType=requirement', 'response' => 'stories(array)|requirements,pager');
  18. $routes['/requirements/:storyID'] = array('response' => 'story|requirement,actions(array)');
  19. $routes['/products/:productID/productplans'] = array('redirect' => '/productplans?productID=:productID', 'response' => 'plans(array)|productplans,pager');
  20. $routes['/productplans/:planID'] = array('response' => 'plan|productplan,actions(array)');
  21. $routes['/products/:productID/releases'] = array('redirect' => '/releases?productID=:productID', 'response' => 'releases,pager');
  22. $routes['/projects/:projectID/releases'] = array('redirect' => '/projectreleases?projectID=:projectID', 'response' => 'releases,pager');
  23. $routes['/releases/:releaseID'] = array('response' => 'release,actions(array)');
  24. $routes['/projects'] = array('response' => 'projectStats|projects,pager');
  25. $routes['/projects/list/:browseType'] = array('redirect' => '/projects?browseType=:browseType');
  26. $routes['/projects/execution'] = array('response' => 'executionStats|executions,pager');
  27. $routes['/projects/build'] = array('response' => 'builds,pager');
  28. $routes['/projects/bug'] = array('response' => 'bugs,pager', 'response' => 'bugs(array),pager');
  29. $routes['/projects/testcase'] = array('response' => 'cases(array)|testcases,pager');
  30. $routes['/projects/testtask'] = array('response' => 'tasks(array)|testtasks,pager');
  31. $routes['/projects/testreport'] = array('response' => 'reports(array)|testreports,pager');
  32. $routes['/projects/:projectID'] = array('response' => 'project');
  33. $routes['/executions'] = array('method' => 'all', 'response' => 'executionStats|executions,pager');
  34. $routes['/projects/:projectID/executions'] = array('redirect' => '/projects/execution?projectID=:projectID');
  35. $routes['/executions/task'] = array('response' => 'tasks(array),pager');
  36. $routes['/executions/story'] = array('response' => 'stories(array),pager');
  37. $routes['/executions/build'] = array('response' => 'builds,pager');
  38. $routes['/executions/bug'] = array('response' => 'bugs(array),pager');
  39. $routes['/executions/testcase'] = array('response' => 'cases(array)|testcases,pager');
  40. $routes['/executions/testtask'] = array('response' => 'tasks(array)|testtasks,pager');
  41. $routes['/executions/testreport'] = array('response' => 'reports(array)|testreports,pager');
  42. $routes['/executions/:executionID'] = array('response' => 'execution');
  43. $routes['/executions/:executionID/tasks'] = array('redirect' => '/executions/task?executionID=:executionID');
  44. $routes['/tasks/:taskID'] = array('response' => 'task,actions(array)');
  45. $routes['/projects/:projectID/builds'] = array('redirect' => '/projects/build?projectID=:projectID');
  46. $routes['/executions/:executionID/builds'] = array('redirect' => '/executions/build?executionID=:executionID');
  47. $routes['/builds/:buildID'] = array('response' => 'build,actions(array)');
  48. $routes['/products/:productID/bugs'] = array('redirect' => '/bugs?productID=:productID', 'response' => 'bugs(array),pager');
  49. $routes['/projects/:projectID/bugs'] = array('redirect' => '/projects/bug?projectID=:projectID');
  50. $routes['/executions/:executionID/bugs'] = array('redirect' => '/executions/bug?executionID=:executionID');
  51. $routes['/bugs/:bugID'] = array('response' => 'bug,actions(array)');
  52. $routes['/products/:productID/testcases'] = array('redirect' => '/testcases?productID=:productID', 'response' => 'cases(array)|testcases,pager');
  53. $routes['/projects/:projectID/testcases'] = array('redirect' => '/projects/testcase?projectID=:projectID');
  54. $routes['/executions/:executionID/testcases'] = array('redirect' => '/executions/testcase?executionID=:executionID');
  55. $routes['/testcases/:caseID'] = array('response' => 'testcase,actions(array)');
  56. $routes['/products/:productID/testtasks'] = array('redirect' => '/testtasks?productID=:productID', 'response' => 'tasks(array)|testtasks,pager');
  57. $routes['/projects/:projectID/testtasks'] = array('redirect' => '/projects/testtask?projectID=:projectID');
  58. $routes['/executions/:executionID/testtasks'] = array('redirect' => '/executions/testtask?executionID=:executionID');
  59. $routes['/testtasks/:testtaskID'] = array('response' => 'task|testtask,actions(array)');
  60. $routes['/products/:productID/testreports'] = array('redirect' => '/testreports?objectID=:productID', 'response' => 'reports(array)|testreports,pager');
  61. $routes['/projects/:projectID/testreports'] = array('redirect' => '/projects/testreport?projectID=:projectID');
  62. $routes['/executions/:executionID/testreports'] = array('redirect' => '/executions/testreport?executionID=:executionID');
  63. $routes['/testreports/:reportID'] = array('response' => 'report|testreport,actions(array)');
  64. $routes['/projects/:projectID/builds'] = array('redirect' => '/projects/build?projectID=:projectID');
  65. $routes['/executions/:executionID/builds'] = array('redirect' => '/executions/build?executionID=:executionID');
  66. $routes['/builds/:buildID'] = array('response' => 'build,actions(array)');
  67. $routes['/issues'] = array('response' => 'issueList(array)|issues,pager');
  68. $routes['/projects/:projectID/issues'] = array('redirect' => '/issues?objectID=:projectID');
  69. $routes['/executions/:executionID/issues'] = array('redirect' => '/issues?objectID=:executionID&from=execution');
  70. $routes['/issues/:issueID'] = array('response' => 'issue,actions(array)');
  71. $routes['/risks'] = array('response' => 'risks(array),pager');
  72. $routes['/projects/:projectID/risks'] = array('redirect' => '/risks?projectID=:projectID');
  73. $routes['/executions/:executionID/risks'] = array('redirect' => '/risks?executionID=:executionID&from=execution');
  74. $routes['/risks/:riskID'] = array('response' => 'risk,actions(array)');
  75. $routes['/opportunities'] = array('response' => 'opportunities(array),pager');
  76. $routes['/projects/:projectID/opportunities'] = array('redirect' => '/opportunities?projectID=:projectID');
  77. $routes['/executions/:executionID/opportunities'] = array('redirect' => '/opportunities?executionID=:executionID&from=execution');
  78. $routes['/opportunities/:opportunityID'] = array('response' => 'opportunity,actions(array)');
  79. $routes['/auditplans'] = array('response' => 'auditplans(array),pager');
  80. $routes['/projects/:projectID/auditplans'] = array('redirect' => '/auditplans?projectID=:projectID');
  81. $routes['/executions/:executionID/auditplans'] = array('redirect' => '/auditplans?executionID=:executionID&from=execution');
  82. $routes['/feedbacks'] = array('method' => 'admin', 'response' => 'feedbacks(array),pager');
  83. $routes['/products/:productID/feedbacks'] = array('redirect' => '/feedbacks?param=:productID');
  84. $routes['/feedbacks/:feedbackID'] = array('response' => 'feedback,actions(array)');
  85. $routes['/tickets'] = array('response' => 'tickets(array),pager');
  86. $routes['/products/:productID/tickets'] = array('redirect' => '/tickets?param=:productID');
  87. $routes['/tickets/:ticketID'] = array('response' => 'ticket,actions(array)');
  88. $routes['/systems'] = array('response' => 'appList(array)|systems,pager');
  89. $routes['/products/:productID/systems'] = array('redirect' => '/systems?productID=:productID');
  90. $routes['/systems/:systemID'] = array('response' => 'system,actions(array)');
  91. $routes['/depts'] = array('response' => 'sons|depts');
  92. $routes['/depts/browse'] = array();
  93. $routes['/depts/:deptID'] = array('redirect' => '/depts/browse?deptID=:deptID', 'response' => 'sons');
  94. $routes['/users'] = array('redirect' => '/companies/browse', 'response' => 'users,pager');
  95. $routes['/users/:userID'] = array('redirect' => '/users/:userID/profile', 'response' => 'user');
  96. $routes['/files/:fileID'] = array('redirect' => '/files/:fileID/ajaxQuery');
  97. $routes['/files/:fileID/download'] = array('method' => 'download');