1
0

routes.php 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184
  1. <?php
  2. /**
  3. * SPDX-FileCopyrightText: 2016-2024 Nextcloud GmbH and Nextcloud contributors
  4. * SPDX-FileCopyrightText: 2016 ownCloud, Inc.
  5. * SPDX-License-Identifier: AGPL-3.0-only
  6. */
  7. return [
  8. 'resources' => [
  9. 'ExternalShares' => ['url' => '/api/externalShares'],
  10. ],
  11. 'routes' => [
  12. [
  13. 'name' => 'Share#showShare',
  14. 'url' => '/s/{token}',
  15. 'verb' => 'GET',
  16. 'root' => '',
  17. ],
  18. [
  19. 'name' => 'Share#showAuthenticate',
  20. 'url' => '/s/{token}/authenticate/{redirect}',
  21. 'verb' => 'GET',
  22. 'root' => '',
  23. ],
  24. [
  25. 'name' => 'Share#authenticate',
  26. 'url' => '/s/{token}/authenticate/{redirect}',
  27. 'verb' => 'POST',
  28. 'root' => '',
  29. ],
  30. [
  31. 'name' => 'Share#downloadShare',
  32. 'url' => '/s/{token}/download/{filename}',
  33. 'verb' => 'GET',
  34. 'root' => '',
  35. 'defaults' => ['filename' => '']
  36. ],
  37. [
  38. 'name' => 'PublicPreview#directLink',
  39. 'url' => '/s/{token}/preview',
  40. 'verb' => 'GET',
  41. 'root' => '',
  42. ],
  43. [
  44. 'name' => 'externalShares#testRemote',
  45. 'url' => '/testremote',
  46. 'verb' => 'GET'
  47. ],
  48. [
  49. 'name' => 'PublicPreview#getPreview',
  50. 'url' => '/publicpreview/{token}',
  51. 'verb' => 'GET',
  52. ],
  53. [
  54. 'name' => 'ShareInfo#info',
  55. 'url' => '/shareinfo',
  56. 'verb' => 'POST',
  57. ],
  58. [
  59. 'name' => 'Settings#setDefaultAccept',
  60. 'url' => '/settings/defaultAccept',
  61. 'verb' => 'PUT',
  62. ],
  63. [
  64. 'name' => 'Settings#setUserShareFolder',
  65. 'url' => '/settings/shareFolder',
  66. 'verb' => 'PUT',
  67. ],
  68. [
  69. 'name' => 'Settings#resetUserShareFolder',
  70. 'url' => '/settings/shareFolder',
  71. 'verb' => 'DELETE',
  72. ],
  73. [
  74. 'name' => 'Accept#accept',
  75. 'url' => '/accept/{shareId}',
  76. 'verb' => 'GET',
  77. ],
  78. ],
  79. 'ocs' => [
  80. /*
  81. * OCS Share API
  82. */
  83. [
  84. 'name' => 'ShareAPI#getShares',
  85. 'url' => '/api/v1/shares',
  86. 'verb' => 'GET',
  87. ],
  88. [
  89. 'name' => 'ShareAPI#getInheritedShares',
  90. 'url' => '/api/v1/shares/inherited',
  91. 'verb' => 'GET',
  92. ],
  93. [
  94. 'name' => 'ShareAPI#createShare',
  95. 'url' => '/api/v1/shares',
  96. 'verb' => 'POST',
  97. ],
  98. [
  99. 'name' => 'ShareAPI#pendingShares',
  100. 'url' => '/api/v1/shares/pending',
  101. 'verb' => 'GET',
  102. ],
  103. [
  104. 'name' => 'ShareAPI#getShare',
  105. 'url' => '/api/v1/shares/{id}',
  106. 'verb' => 'GET',
  107. ],
  108. [
  109. 'name' => 'ShareAPI#updateShare',
  110. 'url' => '/api/v1/shares/{id}',
  111. 'verb' => 'PUT',
  112. ],
  113. [
  114. 'name' => 'ShareAPI#deleteShare',
  115. 'url' => '/api/v1/shares/{id}',
  116. 'verb' => 'DELETE',
  117. ],
  118. [
  119. 'name' => 'ShareAPI#acceptShare',
  120. 'url' => '/api/v1/shares/pending/{id}',
  121. 'verb' => 'POST',
  122. ],
  123. /*
  124. * Deleted Shares
  125. */
  126. [
  127. 'name' => 'DeletedShareAPI#index',
  128. 'url' => '/api/v1/deletedshares',
  129. 'verb' => 'GET',
  130. ],
  131. [
  132. 'name' => 'DeletedShareAPI#undelete',
  133. 'url' => '/api/v1/deletedshares/{id}',
  134. 'verb' => 'POST',
  135. ],
  136. /*
  137. * OCS Sharee API
  138. */
  139. [
  140. 'name' => 'ShareesAPI#search',
  141. 'url' => '/api/v1/sharees',
  142. 'verb' => 'GET',
  143. ],
  144. [
  145. 'name' => 'ShareesAPI#findRecommended',
  146. 'url' => '/api/v1/sharees_recommended',
  147. 'verb' => 'GET',
  148. ],
  149. /*
  150. * Remote Shares
  151. */
  152. [
  153. 'name' => 'Remote#getShares',
  154. 'url' => '/api/v1/remote_shares',
  155. 'verb' => 'GET',
  156. ],
  157. [
  158. 'name' => 'Remote#getOpenShares',
  159. 'url' => '/api/v1/remote_shares/pending',
  160. 'verb' => 'GET',
  161. ],
  162. [
  163. 'name' => 'Remote#acceptShare',
  164. 'url' => '/api/v1/remote_shares/pending/{id}',
  165. 'verb' => 'POST',
  166. ],
  167. [
  168. 'name' => 'Remote#declineShare',
  169. 'url' => '/api/v1/remote_shares/pending/{id}',
  170. 'verb' => 'DELETE',
  171. ],
  172. [
  173. 'name' => 'Remote#getShare',
  174. 'url' => '/api/v1/remote_shares/{id}',
  175. 'verb' => 'GET',
  176. ],
  177. [
  178. 'name' => 'Remote#unshare',
  179. 'url' => '/api/v1/remote_shares/{id}',
  180. 'verb' => 'DELETE',
  181. ],
  182. ],
  183. ];