spike-protection.json 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112
  1. {
  2. "post": {
  3. "tags": ["Projects"],
  4. "description": "Enables Spike Protection feature for some of the projects within the organization.",
  5. "operationId": "Enable Spike Protection",
  6. "parameters": [
  7. {
  8. "name": "organization_slug",
  9. "in": "path",
  10. "description": "The slug of the organization the projects belong to",
  11. "required": true,
  12. "schema": {
  13. "type": "string"
  14. }
  15. }
  16. ],
  17. "requestBody": {
  18. "content": {
  19. "application/json": {
  20. "schema": {
  21. "type": "object",
  22. "description": "Django Rest Framework serializer for incoming Spike Protection API payloads",
  23. "properties": {
  24. "projects": {
  25. "description": "Slugs of projects to enable Spike Protection for. Set to `$all` to enable Spike Protection for all the projects in the organization.",
  26. "type": "array",
  27. "items": {
  28. "type": "string"
  29. }
  30. }
  31. },
  32. "required": [
  33. "projects"
  34. ]
  35. }
  36. }
  37. },
  38. "required": true
  39. },
  40. "responses": {
  41. "201": {
  42. "description": "Success"
  43. },
  44. "400": {
  45. "description": "Bad Request"
  46. },
  47. "403": {
  48. "description": "Forbidden"
  49. }
  50. },
  51. "security": [
  52. {
  53. "auth_token": ["project:read", "project:write", "project:admin"]
  54. }
  55. ]
  56. },
  57. "delete": {
  58. "tags": ["Projects"],
  59. "description": "Disables Spike Protection feature for some of the projects within the organization.",
  60. "operationId": "Disable Spike Protection",
  61. "parameters": [
  62. {
  63. "name": "organization_slug",
  64. "in": "path",
  65. "description": "The slug of the organization the projects belong to",
  66. "required": true,
  67. "schema": {
  68. "type": "string"
  69. }
  70. }
  71. ],
  72. "requestBody": {
  73. "content": {
  74. "application/json": {
  75. "schema": {
  76. "type": "object",
  77. "description": "Django Rest Framework serializer for incoming Spike Protection API payloads",
  78. "properties": {
  79. "projects": {
  80. "description": "Slugs of projects to disable Spike Protection for. Set to `$all` to disable Spike Protection for all the projects in the organization.",
  81. "type": "array",
  82. "items": {
  83. "type": "string"
  84. }
  85. }
  86. },
  87. "required": [
  88. "projects"
  89. ]
  90. }
  91. }
  92. },
  93. "required": true
  94. },
  95. "responses": {
  96. "200": {
  97. "description": "Success"
  98. },
  99. "400": {
  100. "description": "Bad Request"
  101. },
  102. "403": {
  103. "description": "Forbidden"
  104. }
  105. },
  106. "security": [
  107. {
  108. "auth_token": ["project:read", "project:write", "project:admin"]
  109. }
  110. ]
  111. }
  112. }