You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

routes.php 4.2KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195
  1. <?php
  2. /**
  3. * @copyright Copyright (c) 2016, ownCloud, Inc.
  4. *
  5. * @author Björn Schießle <bjoern@schiessle.org>
  6. * @author Christoph Wurst <christoph@winzerhof-wurst.at>
  7. * @author Joas Schilling <coding@schilljs.com>
  8. * @author Lukas Reschke <lukas@statuscode.ch>
  9. * @author Maxence Lange <maxence@artificial-owl.com>
  10. * @author Roeland Jago Douma <roeland@famdouma.nl>
  11. *
  12. * @license AGPL-3.0
  13. *
  14. * This code is free software: you can redistribute it and/or modify
  15. * it under the terms of the GNU Affero General Public License, version 3,
  16. * as published by the Free Software Foundation.
  17. *
  18. * This program is distributed in the hope that it will be useful,
  19. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  20. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  21. * GNU Affero General Public License for more details.
  22. *
  23. * You should have received a copy of the GNU Affero General Public License, version 3,
  24. * along with this program. If not, see <http://www.gnu.org/licenses/>
  25. *
  26. */
  27. return [
  28. 'resources' => [
  29. 'ExternalShares' => ['url' => '/api/externalShares'],
  30. ],
  31. 'routes' => [
  32. [
  33. 'name' => 'Share#showShare',
  34. 'url' => '/s/{token}',
  35. 'verb' => 'GET',
  36. 'root' => '',
  37. ],
  38. [
  39. 'name' => 'Share#showAuthenticate',
  40. 'url' => '/s/{token}/authenticate/{redirect}',
  41. 'verb' => 'GET',
  42. 'root' => '',
  43. ],
  44. [
  45. 'name' => 'Share#authenticate',
  46. 'url' => '/s/{token}/authenticate/{redirect}',
  47. 'verb' => 'POST',
  48. 'root' => '',
  49. ],
  50. [
  51. 'name' => 'Share#downloadShare',
  52. 'url' => '/s/{token}/download/{filename}',
  53. 'verb' => 'GET',
  54. 'root' => '',
  55. 'defaults' => ['filename' => '']
  56. ],
  57. [
  58. 'name' => 'PublicPreview#directLink',
  59. 'url' => '/s/{token}/preview',
  60. 'verb' => 'GET',
  61. 'root' => '',
  62. ],
  63. [
  64. 'name' => 'externalShares#testRemote',
  65. 'url' => '/testremote',
  66. 'verb' => 'GET'
  67. ],
  68. [
  69. 'name' => 'PublicPreview#getPreview',
  70. 'url' => '/publicpreview/{token}',
  71. 'verb' => 'GET',
  72. ],
  73. [
  74. 'name' => 'ShareInfo#info',
  75. 'url' => '/shareinfo',
  76. 'verb' => 'POST',
  77. ],
  78. [
  79. 'name' => 'Settings#setDefaultAccept',
  80. 'url' => '/settings/defaultAccept',
  81. 'verb' => 'PUT',
  82. ],
  83. [
  84. 'name' => 'Accept#accept',
  85. 'url' => '/accept/{shareId}',
  86. 'verb' => 'GET',
  87. ],
  88. ],
  89. 'ocs' => [
  90. /*
  91. * OCS Share API
  92. */
  93. [
  94. 'name' => 'ShareAPI#getShares',
  95. 'url' => '/api/v1/shares',
  96. 'verb' => 'GET',
  97. ],
  98. [
  99. 'name' => 'ShareAPI#getInheritedShares',
  100. 'url' => '/api/v1/shares/inherited',
  101. 'verb' => 'GET',
  102. ],
  103. [
  104. 'name' => 'ShareAPI#createShare',
  105. 'url' => '/api/v1/shares',
  106. 'verb' => 'POST',
  107. ],
  108. [
  109. 'name' => 'ShareAPI#pendingShares',
  110. 'url' => '/api/v1/shares/pending',
  111. 'verb' => 'GET',
  112. ],
  113. [
  114. 'name' => 'ShareAPI#getShare',
  115. 'url' => '/api/v1/shares/{id}',
  116. 'verb' => 'GET',
  117. ],
  118. [
  119. 'name' => 'ShareAPI#updateShare',
  120. 'url' => '/api/v1/shares/{id}',
  121. 'verb' => 'PUT',
  122. ],
  123. [
  124. 'name' => 'ShareAPI#deleteShare',
  125. 'url' => '/api/v1/shares/{id}',
  126. 'verb' => 'DELETE',
  127. ],
  128. [
  129. 'name' => 'ShareAPI#acceptShare',
  130. 'url' => '/api/v1/shares/pending/{id}',
  131. 'verb' => 'POST',
  132. ],
  133. /*
  134. * Deleted Shares
  135. */
  136. [
  137. 'name' => 'DeletedShareAPI#index',
  138. 'url' => '/api/v1/deletedshares',
  139. 'verb' => 'GET',
  140. ],
  141. [
  142. 'name' => 'DeletedShareAPI#undelete',
  143. 'url' => '/api/v1/deletedshares/{id}',
  144. 'verb' => 'POST',
  145. ],
  146. /*
  147. * OCS Sharee API
  148. */
  149. [
  150. 'name' => 'ShareesAPI#search',
  151. 'url' => '/api/v1/sharees',
  152. 'verb' => 'GET',
  153. ],
  154. [
  155. 'name' => 'ShareesAPI#findRecommended',
  156. 'url' => '/api/v1/sharees_recommended',
  157. 'verb' => 'GET',
  158. ],
  159. /*
  160. * Remote Shares
  161. */
  162. [
  163. 'name' => 'Remote#getShares',
  164. 'url' => '/api/v1/remote_shares',
  165. 'verb' => 'GET',
  166. ],
  167. [
  168. 'name' => 'Remote#getOpenShares',
  169. 'url' => '/api/v1/remote_shares/pending',
  170. 'verb' => 'GET',
  171. ],
  172. [
  173. 'name' => 'Remote#acceptShare',
  174. 'url' => '/api/v1/remote_shares/pending/{id}',
  175. 'verb' => 'POST',
  176. ],
  177. [
  178. 'name' => 'Remote#declineShare',
  179. 'url' => '/api/v1/remote_shares/pending/{id}',
  180. 'verb' => 'DELETE',
  181. ],
  182. [
  183. 'name' => 'Remote#getShare',
  184. 'url' => '/api/v1/remote_shares/{id}',
  185. 'verb' => 'GET',
  186. ],
  187. [
  188. 'name' => 'Remote#unshare',
  189. 'url' => '/api/v1/remote_shares/{id}',
  190. 'verb' => 'DELETE',
  191. ],
  192. ],
  193. ];