spike-protection.json 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108
  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_id_or_slug",
  9. "in": "path",
  10. "description": "The ID or 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": ["projects"]
  33. }
  34. }
  35. },
  36. "required": true
  37. },
  38. "responses": {
  39. "201": {
  40. "description": "Success"
  41. },
  42. "400": {
  43. "description": "Bad Request"
  44. },
  45. "403": {
  46. "description": "Forbidden"
  47. }
  48. },
  49. "security": [
  50. {
  51. "auth_token": ["project:read", "project:write", "project:admin"]
  52. }
  53. ]
  54. },
  55. "delete": {
  56. "tags": ["Projects"],
  57. "description": "Disables Spike Protection feature for some of the projects within the organization.",
  58. "operationId": "Disable Spike Protection",
  59. "parameters": [
  60. {
  61. "name": "organization_id_or_slug",
  62. "in": "path",
  63. "description": "The ID or slug of the organization the projects belong to",
  64. "required": true,
  65. "schema": {
  66. "type": "string"
  67. }
  68. }
  69. ],
  70. "requestBody": {
  71. "content": {
  72. "application/json": {
  73. "schema": {
  74. "type": "object",
  75. "description": "Django Rest Framework serializer for incoming Spike Protection API payloads",
  76. "properties": {
  77. "projects": {
  78. "description": "Slugs of projects to disable Spike Protection for. Set to `$all` to disable Spike Protection for all the projects in the organization.",
  79. "type": "array",
  80. "items": {
  81. "type": "string"
  82. }
  83. }
  84. },
  85. "required": ["projects"]
  86. }
  87. }
  88. },
  89. "required": true
  90. },
  91. "responses": {
  92. "200": {
  93. "description": "Success"
  94. },
  95. "400": {
  96. "description": "Bad Request"
  97. },
  98. "403": {
  99. "description": "Forbidden"
  100. }
  101. },
  102. "security": [
  103. {
  104. "auth_token": ["project:read", "project:write", "project:admin"]
  105. }
  106. ]
  107. }
  108. }