definition-apiv3.js 4.0 KB

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