2
0

definition-apiv3.js 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162
  1. const pkg = require('../../package.json');
  2. module.exports = {
  3. openapi: '3.0.1',
  4. info: {
  5. title: 'GROWI REST API v3',
  6. version: pkg.version,
  7. },
  8. servers: [
  9. {
  10. url: '{server}/_api/v3',
  11. variables: {
  12. server: {
  13. default: 'https://demo.growi.org',
  14. description:
  15. 'The base URL for the GROWI API except for the version path (/_api/v3). This can be set to your GROWI instance URL.',
  16. },
  17. },
  18. },
  19. {
  20. url: 'https://demo.growi.org/_api/v3',
  21. },
  22. ],
  23. security: [
  24. {
  25. bearer: [],
  26. accessTokenInQuery: [],
  27. },
  28. ],
  29. components: {
  30. securitySchemes: {
  31. bearer: {
  32. type: 'http',
  33. scheme: 'bearer',
  34. description: 'Access token generated by each GROWI users',
  35. },
  36. accessTokenInQuery: {
  37. type: 'apiKey',
  38. name: 'access_token',
  39. in: 'query',
  40. description: 'Access token generated by each GROWI users',
  41. },
  42. cookieAuth: {
  43. type: 'apiKey',
  44. in: 'cookie',
  45. name: 'connect.sid',
  46. },
  47. transferHeaderAuth: {
  48. type: 'apiKey',
  49. in: 'header',
  50. name: 'x-growi-transfer-key',
  51. },
  52. },
  53. parameters: {
  54. MimeTypePathParam: {
  55. name: 'mimeType',
  56. in: 'path',
  57. required: true,
  58. description: 'Configurable MIME type (e.g., image/png, application/pdf)',
  59. schema: {
  60. type: 'string',
  61. enum: [
  62. 'image/jpeg',
  63. 'image/png',
  64. 'image/gif',
  65. 'image/webp',
  66. 'image/bmp',
  67. 'image/tiff',
  68. 'image/x-icon',
  69. 'application/pdf',
  70. 'text/plain',
  71. 'video/mp4',
  72. 'video/webm',
  73. 'video/ogg',
  74. 'audio/mpeg',
  75. 'audio/ogg',
  76. 'audio/wav',
  77. 'text/html',
  78. 'text/javascript',
  79. 'application/javascript',
  80. 'image/svg+xml',
  81. 'application/xml',
  82. 'application/json',
  83. 'application/x-sh',
  84. 'application/x-msdownload',
  85. 'application/octet-stream',
  86. 'application/msword',
  87. 'application/vnd.openxmlformats-officedocument.wordprocessingml.document',
  88. 'application/vnd.ms-excel',
  89. 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet',
  90. 'application/vnd.ms-powerpoint',
  91. 'application/vnd.openxmlformats-officedocument.presentationml.presentation',
  92. 'application/zip',
  93. 'application/x-rar-compressed',
  94. 'text/csv',
  95. ],
  96. },
  97. },
  98. },
  99. },
  100. 'x-tagGroups': [
  101. {
  102. name: 'User API',
  103. tags: [
  104. 'Attachment',
  105. 'Bookmarks',
  106. 'BookmarkFolders',
  107. 'Page',
  108. 'Pages',
  109. 'PageListing',
  110. 'Revisions',
  111. 'ShareLinks',
  112. 'Users',
  113. 'UserUISettings',
  114. ],
  115. },
  116. {
  117. name: 'User Personal Settings API',
  118. tags: [
  119. 'GeneralSetting',
  120. 'EditorSetting',
  121. 'InAppNotificationSettings',
  122. ],
  123. },
  124. {
  125. name: 'System Management API',
  126. tags: [
  127. 'Home',
  128. 'Activity',
  129. 'AdminHome',
  130. 'AppSettings',
  131. 'ExternalUserGroups',
  132. 'SecuritySetting',
  133. 'MarkDownSetting',
  134. 'CustomizeSetting',
  135. 'Import',
  136. 'Export',
  137. 'GROWI to GROWI Transfer',
  138. 'MongoDB',
  139. 'NotificationSetting',
  140. 'Plugins',
  141. 'SlackIntegration',
  142. 'SlackIntegrationSettings',
  143. 'SlackIntegrationSettings (with proxy)',
  144. 'SlackIntegrationSettings (without proxy)',
  145. 'SlackIntegrationLegacySetting',
  146. 'ShareLink Management',
  147. 'Templates',
  148. 'Staff',
  149. 'UserGroupRelations',
  150. 'UserGroups',
  151. 'Users Management',
  152. 'FullTextSearch Management',
  153. 'Install',
  154. ],
  155. },
  156. {
  157. name: 'Public API',
  158. tags: ['Healthcheck', 'Statistics', '', '', '', '', '', ''],
  159. },
  160. ],
  161. };