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 2.9KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136
  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/{token}',
  37. 'verb' => 'GET',
  38. ],
  39. [
  40. 'name' => 'ShareInfo#info',
  41. 'url' => '/shareinfo',
  42. 'verb' => 'POST',
  43. ],
  44. ],
  45. 'ocs' => [
  46. /*
  47. * OCS Share API
  48. */
  49. [
  50. 'name' => 'ShareAPI#getShares',
  51. 'url' => '/api/v1/shares',
  52. 'verb' => 'GET',
  53. ],
  54. [
  55. 'name' => 'ShareAPI#createShare',
  56. 'url' => '/api/v1/shares',
  57. 'verb' => 'POST',
  58. ],
  59. [
  60. 'name' => 'ShareAPI#getShare',
  61. 'url' => '/api/v1/shares/{id}',
  62. 'verb' => 'GET',
  63. ],
  64. [
  65. 'name' => 'ShareAPI#updateShare',
  66. 'url' => '/api/v1/shares/{id}',
  67. 'verb' => 'PUT',
  68. ],
  69. [
  70. 'name' => 'ShareAPI#deleteShare',
  71. 'url' => '/api/v1/shares/{id}',
  72. 'verb' => 'DELETE',
  73. ],
  74. /*
  75. * Deleted Shares
  76. */
  77. [
  78. 'name' => 'DeletedShareAPI#index',
  79. 'url' => '/api/v1/deletedshares',
  80. 'verb' => 'GET',
  81. ],
  82. [
  83. 'name' => 'DeletedShareAPI#undelete',
  84. 'url' => '/api/v1/deletedshares/{id}',
  85. 'verb' => 'POST',
  86. ],
  87. /*
  88. * OCS Sharee API
  89. */
  90. [
  91. 'name' => 'ShareesAPI#search',
  92. 'url' => '/api/v1/sharees',
  93. 'verb' => 'GET',
  94. ],
  95. [
  96. 'name' => 'ShareesAPI#findRecommended',
  97. 'url' => '/api/v1/sharees_recommended',
  98. 'verb' => 'GET',
  99. ],
  100. /*
  101. * Remote Shares
  102. */
  103. [
  104. 'name' => 'Remote#getShares',
  105. 'url' => '/api/v1/remote_shares',
  106. 'verb' => 'GET',
  107. ],
  108. [
  109. 'name' => 'Remote#getOpenShares',
  110. 'url' => '/api/v1/remote_shares/pending',
  111. 'verb' => 'GET',
  112. ],
  113. [
  114. 'name' => 'Remote#acceptShare',
  115. 'url' => '/api/v1/remote_shares/pending/{id}',
  116. 'verb' => 'POST',
  117. ],
  118. [
  119. 'name' => 'Remote#declineShare',
  120. 'url' => '/api/v1/remote_shares/pending/{id}',
  121. 'verb' => 'DELETE',
  122. ],
  123. [
  124. 'name' => 'Remote#getShare',
  125. 'url' => '/api/v1/remote_shares/{id}',
  126. 'verb' => 'GET',
  127. ],
  128. [
  129. 'name' => 'Remote#unshare',
  130. 'url' => '/api/v1/remote_shares/{id}',
  131. 'verb' => 'DELETE',
  132. ],
  133. ],
  134. ];