release-file.json 5.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218
  1. {
  2. "get": {
  3. "tags": ["Releases"],
  4. "description": "Retrieve a file for a given release.",
  5. "operationId": "Retrieve an Organization Release's File",
  6. "parameters": [
  7. {
  8. "name": "organization_id_or_slug",
  9. "in": "path",
  10. "description": "The ID or slug of the organization.",
  11. "required": true,
  12. "schema": {
  13. "type": "string"
  14. }
  15. },
  16. {
  17. "name": "version",
  18. "in": "path",
  19. "description": "The version identifier of the release.",
  20. "required": true,
  21. "schema": {
  22. "type": "string"
  23. }
  24. },
  25. {
  26. "name": "file_id",
  27. "in": "path",
  28. "description": "The ID of the file to retrieve.",
  29. "required": true,
  30. "schema": {
  31. "type": "string"
  32. }
  33. },
  34. {
  35. "name": "download",
  36. "in": "query",
  37. "description": "If this is set to true, then the response payload will be the raw file contents. Otherwise, the response will be the file metadata as JSON.",
  38. "schema": {
  39. "type": "boolean"
  40. }
  41. }
  42. ],
  43. "responses": {
  44. "200": {
  45. "description": "Success",
  46. "content": {
  47. "application/json": {
  48. "schema": {
  49. "$ref": "../../components/schemas/releases/release-file.json#/ReleaseFile"
  50. },
  51. "example": {
  52. "dateCreated": "2018-11-06T21:20:19.150Z",
  53. "dist": null,
  54. "headers": {
  55. "Content-Type": "text/plain; encoding=utf-8"
  56. },
  57. "id": "1",
  58. "name": "/demo/message-for-you.txt",
  59. "sha1": "2ef7bde608ce5404e97d5f042f95f89f1c232871",
  60. "size": 12
  61. }
  62. }
  63. }
  64. },
  65. "403": {
  66. "description": "Forbidden"
  67. },
  68. "404": {
  69. "description": "Not Found"
  70. }
  71. },
  72. "security": [
  73. {
  74. "auth_token": ["project:releases"]
  75. }
  76. ]
  77. },
  78. "put": {
  79. "tags": ["Releases"],
  80. "description": "Update an organization release file.",
  81. "operationId": "Update an Organization Release File",
  82. "parameters": [
  83. {
  84. "name": "organization_id_or_slug",
  85. "in": "path",
  86. "description": "The ID or slug of the organization.",
  87. "required": true,
  88. "schema": {
  89. "type": "string"
  90. }
  91. },
  92. {
  93. "name": "version",
  94. "in": "path",
  95. "description": "The version identifier of the release.",
  96. "required": true,
  97. "schema": {
  98. "type": "string"
  99. }
  100. },
  101. {
  102. "name": "file_id",
  103. "in": "path",
  104. "description": "The ID of the file to retrieve.",
  105. "required": true,
  106. "schema": {
  107. "type": "string"
  108. }
  109. }
  110. ],
  111. "requestBody": {
  112. "content": {
  113. "application/json": {
  114. "schema": {
  115. "type": "object",
  116. "properties": {
  117. "name": {
  118. "type": "string",
  119. "description": "The new name (full path) of the file."
  120. },
  121. "dist": {
  122. "type": "string",
  123. "description": "The new name of the dist."
  124. }
  125. }
  126. },
  127. "example": {
  128. "name": "/demo/goodbye.txt"
  129. }
  130. }
  131. }
  132. },
  133. "responses": {
  134. "200": {
  135. "description": "Success",
  136. "content": {
  137. "application/json": {
  138. "schema": {
  139. "$ref": "../../components/schemas/releases/release-file.json#/ReleaseFile"
  140. },
  141. "example": {
  142. "dateCreated": "2018-11-06T21:20:22.894Z",
  143. "dist": null,
  144. "headers": {
  145. "Content-Type": "text/plain; encoding=utf-8"
  146. },
  147. "id": "3",
  148. "name": "/demo/goodbye.txt",
  149. "sha1": "94d6b21e962a9fc65889617ec1f17a1e2fe11b65",
  150. "size": 15
  151. }
  152. }
  153. }
  154. },
  155. "403": {
  156. "description": "Forbidden"
  157. },
  158. "404": {
  159. "description": "Not Found"
  160. }
  161. },
  162. "security": [
  163. {
  164. "auth_token": ["project:releases"]
  165. }
  166. ]
  167. },
  168. "delete": {
  169. "tags": ["Releases"],
  170. "description": "Delete a file for a given release.",
  171. "operationId": "Delete an Organization Release's File",
  172. "parameters": [
  173. {
  174. "name": "organization_id_or_slug",
  175. "in": "path",
  176. "description": "The ID or slug of the organization the release belongs to.",
  177. "required": true,
  178. "schema": {
  179. "type": "string"
  180. }
  181. },
  182. {
  183. "name": "version",
  184. "in": "path",
  185. "description": "The version identifier of the release.",
  186. "required": true,
  187. "schema": {
  188. "type": "string"
  189. }
  190. },
  191. {
  192. "name": "file_id",
  193. "in": "path",
  194. "description": "The ID of the file to delete.",
  195. "required": true,
  196. "schema": {
  197. "type": "string"
  198. }
  199. }
  200. ],
  201. "responses": {
  202. "204": {
  203. "description": "Success"
  204. },
  205. "403": {
  206. "description": "Forbidden"
  207. },
  208. "404": {
  209. "description": "Not Found"
  210. }
  211. },
  212. "security": [
  213. {
  214. "auth_token": ["project:releases"]
  215. }
  216. ]
  217. }
  218. }