project-release-file.json 5.8 KB

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