1
0

routes.php 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183
  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' => 'PublicPreview#getPreview',
  45. 'url' => '/publicpreview/{token}',
  46. 'verb' => 'GET',
  47. ],
  48. [
  49. 'name' => 'ShareInfo#info',
  50. 'url' => '/shareinfo',
  51. 'verb' => 'POST',
  52. ],
  53. [
  54. 'name' => 'Settings#setDefaultAccept',
  55. 'url' => '/settings/defaultAccept',
  56. 'verb' => 'PUT',
  57. ],
  58. [
  59. 'name' => 'Settings#setUserShareFolder',
  60. 'url' => '/settings/shareFolder',
  61. 'verb' => 'PUT',
  62. ],
  63. [
  64. 'name' => 'Settings#resetUserShareFolder',
  65. 'url' => '/settings/shareFolder',
  66. 'verb' => 'DELETE',
  67. ],
  68. [
  69. 'name' => 'Accept#accept',
  70. 'url' => '/accept/{shareId}',
  71. 'verb' => 'GET',
  72. ],
  73. ],
  74. 'ocs' => [
  75. /*
  76. * OCS Share API
  77. */
  78. [
  79. 'name' => 'ShareAPI#getShares',
  80. 'url' => '/api/v1/shares',
  81. 'verb' => 'GET',
  82. ],
  83. [
  84. 'name' => 'ShareAPI#getInheritedShares',
  85. 'url' => '/api/v1/shares/inherited',
  86. 'verb' => 'GET',
  87. ],
  88. [
  89. 'name' => 'ShareAPI#createShare',
  90. 'url' => '/api/v1/shares',
  91. 'verb' => 'POST',
  92. ],
  93. [
  94. 'name' => 'ShareAPI#pendingShares',
  95. 'url' => '/api/v1/shares/pending',
  96. 'verb' => 'GET',
  97. ],
  98. [
  99. 'name' => 'ShareAPI#getShare',
  100. 'url' => '/api/v1/shares/{id}',
  101. 'verb' => 'GET',
  102. ],
  103. [
  104. 'name' => 'ShareAPI#updateShare',
  105. 'url' => '/api/v1/shares/{id}',
  106. 'verb' => 'PUT',
  107. ],
  108. [
  109. 'name' => 'ShareAPI#deleteShare',
  110. 'url' => '/api/v1/shares/{id}',
  111. 'verb' => 'DELETE',
  112. ],
  113. [
  114. 'name' => 'ShareAPI#sendShareEmail',
  115. 'url' => '/api/v1/shares/{id}/send-email',
  116. 'verb' => 'POST',
  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. ];