by-slug.json 5.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210
  1. {
  2. "get": {
  3. "tags": ["Teams"],
  4. "description": "Return details on an individual team.",
  5. "operationId": "Retrieve a Team",
  6. "parameters": [
  7. {
  8. "name": "organization_slug",
  9. "in": "path",
  10. "description": "The slug of the organization the team belongs to.",
  11. "required": true,
  12. "schema": {
  13. "type": "string"
  14. }
  15. },
  16. {
  17. "name": "team_id_or_slug",
  18. "in": "path",
  19. "description": "The id or slug of the team to get.",
  20. "required": true,
  21. "schema": {
  22. "type": "string"
  23. }
  24. }
  25. ],
  26. "responses": {
  27. "200": {
  28. "description": "Success",
  29. "content": {
  30. "application/json": {
  31. "schema": {
  32. "$ref": "../../components/schemas/team.json#/TeamWithOrganization"
  33. },
  34. "example": {
  35. "avatar": {
  36. "avatarType": "letter_avatar",
  37. "avatarUuid": null
  38. },
  39. "dateCreated": "2018-11-06T21:19:55.114Z",
  40. "hasAccess": true,
  41. "id": "2",
  42. "isMember": true,
  43. "isPending": false,
  44. "memberCount": 1,
  45. "name": "Powerful Abolitionist",
  46. "organization": {
  47. "avatar": {
  48. "avatarType": "letter_avatar",
  49. "avatarUuid": null
  50. },
  51. "dateCreated": "2018-11-06T21:19:55.101Z",
  52. "id": "2",
  53. "isEarlyAdopter": false,
  54. "name": "The Interstellar Jurisdiction",
  55. "require2FA": false,
  56. "slug": "the-interstellar-jurisdiction",
  57. "status": {
  58. "id": "active",
  59. "name": "active"
  60. }
  61. },
  62. "slug": "powerful-abolitionist"
  63. }
  64. }
  65. }
  66. },
  67. "403": {
  68. "description": "Forbidden"
  69. },
  70. "404": {
  71. "description": "Team not found"
  72. }
  73. },
  74. "security": [
  75. {
  76. "auth_token": ["team:read"]
  77. }
  78. ]
  79. },
  80. "put": {
  81. "tags": ["Teams"],
  82. "description": "Update various attributes settings for the given team.",
  83. "operationId": "Update a Team",
  84. "parameters": [
  85. {
  86. "name": "organization_slug",
  87. "in": "path",
  88. "description": "The slug of the organization the team belongs to.",
  89. "required": true,
  90. "schema": {
  91. "type": "string"
  92. }
  93. },
  94. {
  95. "name": "team_id_or_slug",
  96. "in": "path",
  97. "description": "The id or slug of the team to get.",
  98. "required": true,
  99. "schema": {
  100. "type": "string"
  101. }
  102. }
  103. ],
  104. "requestBody": {
  105. "content": {
  106. "application/json": {
  107. "schema": {
  108. "type": "object",
  109. "properties": {
  110. "slug": {
  111. "type": "string",
  112. "description": "Uniquely identifies a team and is used for the interface. Must be available."
  113. },
  114. "name": {
  115. "type": "string",
  116. "description": "**`[DEPRECATED]`** The name for the team.",
  117. "deprecated": true
  118. }
  119. }
  120. },
  121. "example": {
  122. "name": "The Inflated Philosophers",
  123. "slug": "the-inflated-philosophers"
  124. }
  125. }
  126. },
  127. "required": true
  128. },
  129. "responses": {
  130. "200": {
  131. "description": "Success",
  132. "content": {
  133. "application/json": {
  134. "schema": {
  135. "$ref": "../../components/schemas/team.json#/Team"
  136. },
  137. "example": {
  138. "avatar": {
  139. "avatarType": "letter_avatar"
  140. },
  141. "dateCreated": "2018-11-06T21:20:08.115Z",
  142. "hasAccess": true,
  143. "id": "3",
  144. "isMember": false,
  145. "isPending": false,
  146. "memberCount": 1,
  147. "name": "The Inflated Philosophers",
  148. "slug": "the-inflated-philosophers"
  149. }
  150. }
  151. }
  152. },
  153. "400": {
  154. "description": "Bad Input"
  155. },
  156. "403": {
  157. "description": "Forbidden"
  158. },
  159. "404": {
  160. "description": "Team not found"
  161. }
  162. },
  163. "security": [
  164. {
  165. "auth_token": ["team:write"]
  166. }
  167. ]
  168. },
  169. "delete": {
  170. "tags": ["Teams"],
  171. "description": "Schedules a team for deletion.\n\nNote: Deletion happens asynchronously and therefore is not immediate. However once deletion has begun the state of a project changes and will be hidden from most public views.",
  172. "operationId": "Delete a Team",
  173. "parameters": [
  174. {
  175. "name": "organization_slug",
  176. "in": "path",
  177. "description": "The slug of the organization the team belongs to.",
  178. "required": true,
  179. "schema": {
  180. "type": "string"
  181. }
  182. },
  183. {
  184. "name": "team_id_or_slug",
  185. "in": "path",
  186. "description": "The id or slug of the team to get.",
  187. "required": true,
  188. "schema": {
  189. "type": "string"
  190. }
  191. }
  192. ],
  193. "responses": {
  194. "204": {
  195. "description": "Success"
  196. },
  197. "403": {
  198. "description": "Forbidden"
  199. },
  200. "404": {
  201. "description": "Team not found"
  202. }
  203. },
  204. "security": [
  205. {
  206. "auth_token": ["team:admin"]
  207. }
  208. ]
  209. }
  210. }