index.json 7.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244
  1. {
  2. "get": {
  3. "tags": ["Teams"],
  4. "description": "Returns a list of teams bound to a organization.",
  5. "operationId": "List an Organization's Teams",
  6. "parameters": [
  7. {
  8. "name": "organization_slug",
  9. "in": "path",
  10. "description": "The slug of the organization for which the teams should be listed.",
  11. "required": true,
  12. "schema": {
  13. "type": "string"
  14. }
  15. },
  16. {
  17. "$ref": "../../components/parameters/pagination-cursor.json#/PaginationCursor"
  18. }
  19. ],
  20. "responses": {
  21. "200": {
  22. "description": "Success",
  23. "content": {
  24. "application/json": {
  25. "schema": {
  26. "type": "array",
  27. "items": {
  28. "$ref": "../../components/schemas/team.json#/TeamWithProjects"
  29. }
  30. },
  31. "example": [
  32. {
  33. "avatar": {
  34. "avatarType": "letter_avatar",
  35. "avatarUuid": null
  36. },
  37. "dateCreated": "2018-11-06T21:20:08.115Z",
  38. "hasAccess": true,
  39. "id": "3",
  40. "isMember": true,
  41. "isPending": false,
  42. "memberCount": 1,
  43. "name": "Ancient Gabelers",
  44. "projects": [],
  45. "slug": "ancient-gabelers"
  46. },
  47. {
  48. "avatar": {
  49. "avatarType": "letter_avatar",
  50. "avatarUuid": null
  51. },
  52. "dateCreated": "2018-11-06T21:19:55.114Z",
  53. "hasAccess": true,
  54. "id": "2",
  55. "isMember": true,
  56. "isPending": false,
  57. "memberCount": 1,
  58. "name": "Powerful Abolitionist",
  59. "projects": [
  60. {
  61. "avatar": {
  62. "avatarType": "letter_avatar",
  63. "avatarUuid": null
  64. },
  65. "color": "#bf5b3f",
  66. "dateCreated": "2018-11-06T21:19:58.536Z",
  67. "features": [
  68. "releases",
  69. "sample-events",
  70. "minidump",
  71. "servicehooks",
  72. "rate-limits",
  73. "data-forwarding"
  74. ],
  75. "firstEvent": null,
  76. "hasAccess": true,
  77. "id": "3",
  78. "isBookmarked": false,
  79. "isInternal": false,
  80. "isMember": true,
  81. "isPublic": false,
  82. "name": "Prime Mover",
  83. "platform": null,
  84. "slug": "prime-mover",
  85. "status": "active"
  86. },
  87. {
  88. "avatar": {
  89. "avatarType": "letter_avatar",
  90. "avatarUuid": null
  91. },
  92. "color": "#3fbf7f",
  93. "dateCreated": "2018-11-06T21:19:55.121Z",
  94. "features": [
  95. "releases",
  96. "sample-events",
  97. "minidump",
  98. "servicehooks",
  99. "rate-limits",
  100. "data-forwarding"
  101. ],
  102. "firstEvent": null,
  103. "hasAccess": true,
  104. "id": "2",
  105. "isBookmarked": false,
  106. "isInternal": false,
  107. "isMember": true,
  108. "isPublic": false,
  109. "name": "Pump Station",
  110. "platform": null,
  111. "slug": "pump-station",
  112. "status": "active"
  113. },
  114. {
  115. "avatar": {
  116. "avatarType": "letter_avatar",
  117. "avatarUuid": null
  118. },
  119. "color": "#bf6e3f",
  120. "dateCreated": "2018-11-06T21:20:08.064Z",
  121. "features": [
  122. "servicehooks",
  123. "sample-events",
  124. "data-forwarding",
  125. "rate-limits",
  126. "minidump"
  127. ],
  128. "firstEvent": null,
  129. "hasAccess": true,
  130. "id": "4",
  131. "isBookmarked": false,
  132. "isInternal": false,
  133. "isMember": true,
  134. "isPublic": false,
  135. "name": "The Spoiled Yoghurt",
  136. "platform": null,
  137. "slug": "the-spoiled-yoghurt",
  138. "status": "active"
  139. }
  140. ],
  141. "slug": "powerful-abolitionist"
  142. }
  143. ]
  144. }
  145. }
  146. },
  147. "401": {
  148. "description": "Permission Denied"
  149. },
  150. "403": {
  151. "description": "Forbidden"
  152. },
  153. "404": {
  154. "description": "Not Found"
  155. }
  156. },
  157. "security": [
  158. {
  159. "auth_token": ["team:read"]
  160. }
  161. ]
  162. },
  163. "post": {
  164. "tags": ["Teams"],
  165. "description": "Create a new team bound to an organization. Only the name of the team is needed to create it, the slug can be auto generated.",
  166. "operationId": "Create a New Team",
  167. "parameters": [
  168. {
  169. "name": "organization_slug",
  170. "in": "path",
  171. "description": "The slug of the organization the team should be created for.",
  172. "required": true,
  173. "schema": {
  174. "type": "string"
  175. }
  176. }
  177. ],
  178. "requestBody": {
  179. "content": {
  180. "application/json": {
  181. "schema": {
  182. "required": ["name"],
  183. "type": "object",
  184. "properties": {
  185. "name": {
  186. "type": "string",
  187. "description": "The name of the team.",
  188. },
  189. "slug": {
  190. "type": "string",
  191. "description": "The optional slug for this team. If not provided it will be auto generated from the name.",
  192. }
  193. }
  194. },
  195. "example": {
  196. "name": "Ancient Gabelers",
  197. "slug":"ancient-gabelers"
  198. }
  199. }
  200. },
  201. "required": true
  202. },
  203. "responses": {
  204. "201": {
  205. "description": "Success",
  206. "content": {
  207. "application/json": {
  208. "schema": {
  209. "$ref": "../../components/schemas/team.json#/Team"
  210. },
  211. "example": {
  212. "memberCount": 0,
  213. "name": "Ancient Gabelers",
  214. "isMember": false,
  215. "hasAccess": true,
  216. "isPending": false,
  217. "dateCreated": "2020-08-19T21:46:47.877073Z",
  218. "id": "542610",
  219. "avatar": {
  220. "avatarUuid": null,
  221. "avatarType": "letter_avatar"
  222. },
  223. "slug": "ancient-gabelers"
  224. }
  225. }
  226. }
  227. },
  228. "400": {
  229. "description": "Bad input"
  230. },
  231. "403": {
  232. "description": "Forbidden"
  233. },
  234. "409": {
  235. "description": "Team slug already exists"
  236. }
  237. },
  238. "security": [
  239. {
  240. "auth_token": ["team:write"]
  241. }
  242. ]
  243. }
  244. }