routes.php 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124
  1. <?php
  2. /**
  3. * @copyright Copyright (c) 2016, ownCloud, Inc.
  4. *
  5. * @author Björn Schießle <bjoern@schiessle.org>
  6. * @author Lukas Reschke <lukas@statuscode.ch>
  7. * @author Roeland Jago Douma <roeland@famdouma.nl>
  8. *
  9. * @license AGPL-3.0
  10. *
  11. * This code is free software: you can redistribute it and/or modify
  12. * it under the terms of the GNU Affero General Public License, version 3,
  13. * as published by the Free Software Foundation.
  14. *
  15. * This program is distributed in the hope that it will be useful,
  16. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  17. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  18. * GNU Affero General Public License for more details.
  19. *
  20. * You should have received a copy of the GNU Affero General Public License, version 3,
  21. * along with this program. If not, see <http://www.gnu.org/licenses/>
  22. *
  23. */
  24. return [
  25. 'resources' => [
  26. 'ExternalShares' => ['url' => '/api/externalShares'],
  27. ],
  28. 'routes' => [
  29. [
  30. 'name' => 'externalShares#testRemote',
  31. 'url' => '/testremote',
  32. 'verb' => 'GET'
  33. ],
  34. [
  35. 'name' => 'PublicPreview#getPreview',
  36. 'url' => '/publicpreview',
  37. 'verb' => 'GET',
  38. ],
  39. [
  40. 'name' => 'PublicPreview#getPreview',
  41. 'url' => '/ajax/publicpreview.php',
  42. 'verb' => 'GET',
  43. ],
  44. [
  45. 'name' => 'ShareInfo#info',
  46. 'url' => '/shareinfo',
  47. 'verb' => 'POST',
  48. ],
  49. ],
  50. 'ocs' => [
  51. /*
  52. * OCS Share API
  53. */
  54. [
  55. 'name' => 'ShareAPI#getShares',
  56. 'url' => '/api/v1/shares',
  57. 'verb' => 'GET',
  58. ],
  59. [
  60. 'name' => 'ShareAPI#createShare',
  61. 'url' => '/api/v1/shares',
  62. 'verb' => 'POST',
  63. ],
  64. [
  65. 'name' => 'ShareAPI#getShare',
  66. 'url' => '/api/v1/shares/{id}',
  67. 'verb' => 'GET',
  68. ],
  69. [
  70. 'name' => 'ShareAPI#updateShare',
  71. 'url' => '/api/v1/shares/{id}',
  72. 'verb' => 'PUT',
  73. ],
  74. [
  75. 'name' => 'ShareAPI#deleteShare',
  76. 'url' => '/api/v1/shares/{id}',
  77. 'verb' => 'DELETE',
  78. ],
  79. /*
  80. * OCS Sharee API
  81. */
  82. [
  83. 'name' => 'ShareesAPI#search',
  84. 'url' => '/api/v1/sharees',
  85. 'verb' => 'GET',
  86. ],
  87. /*
  88. * Remote Shares
  89. */
  90. [
  91. 'name' => 'Remote#getShares',
  92. 'url' => '/api/v1/remote_shares',
  93. 'verb' => 'GET',
  94. ],
  95. [
  96. 'name' => 'Remote#getOpenShares',
  97. 'url' => '/api/v1/remote_shares/pending',
  98. 'verb' => 'GET',
  99. ],
  100. [
  101. 'name' => 'Remote#acceptShare',
  102. 'url' => '/api/v1/remote_shares/pending/{id}',
  103. 'verb' => 'POST',
  104. ],
  105. [
  106. 'name' => 'Remote#declineShare',
  107. 'url' => '/api/v1/remote_shares/pending/{id}',
  108. 'verb' => 'DELETE',
  109. ],
  110. [
  111. 'name' => 'Remote#getShare',
  112. 'url' => '/api/v1/remote_shares/{id}',
  113. 'verb' => 'GET',
  114. ],
  115. [
  116. 'name' => 'Remote#unshare',
  117. 'url' => '/api/v1/remote_shares/{id}',
  118. 'verb' => 'DELETE',
  119. ],
  120. ],
  121. ];