put.json 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108
  1. {
  2. "operationId": "updateDeadHost",
  3. "summary": "Update a 404 Host",
  4. "tags": ["404-hosts"],
  5. "security": [
  6. {
  7. "bearerAuth": ["dead_hosts.manage"]
  8. }
  9. ],
  10. "parameters": [
  11. {
  12. "in": "path",
  13. "name": "hostID",
  14. "description": "The ID of the 404 Host",
  15. "schema": {
  16. "type": "integer",
  17. "minimum": 1
  18. },
  19. "required": true,
  20. "example": 2
  21. }
  22. ],
  23. "requestBody": {
  24. "description": "404 Host Payload",
  25. "required": true,
  26. "content": {
  27. "application/json": {
  28. "schema": {
  29. "type": "object",
  30. "additionalProperties": false,
  31. "minProperties": 1,
  32. "properties": {
  33. "domain_names": {
  34. "$ref": "../../../../components/dead-host-object.json#/properties/domain_names"
  35. },
  36. "certificate_id": {
  37. "$ref": "../../../../components/dead-host-object.json#/properties/certificate_id"
  38. },
  39. "ssl_forced": {
  40. "$ref": "../../../../components/dead-host-object.json#/properties/ssl_forced"
  41. },
  42. "hsts_enabled": {
  43. "$ref": "../../../../components/dead-host-object.json#/properties/hsts_enabled"
  44. },
  45. "hsts_subdomains": {
  46. "$ref": "../../../../components/dead-host-object.json#/properties/hsts_subdomains"
  47. },
  48. "http2_support": {
  49. "$ref": "../../../../components/dead-host-object.json#/properties/http2_support"
  50. },
  51. "advanced_config": {
  52. "$ref": "../../../../components/dead-host-object.json#/properties/advanced_config"
  53. },
  54. "meta": {
  55. "$ref": "../../../../components/dead-host-object.json#/properties/meta"
  56. }
  57. }
  58. }
  59. }
  60. }
  61. },
  62. "responses": {
  63. "200": {
  64. "description": "200 response",
  65. "content": {
  66. "application/json": {
  67. "examples": {
  68. "default": {
  69. "value": {
  70. "id": 1,
  71. "created_on": "2024-10-09T01:38:52.000Z",
  72. "modified_on": "2024-10-09T01:46:06.000Z",
  73. "owner_user_id": 1,
  74. "domain_names": ["test.example.com"],
  75. "certificate_id": 0,
  76. "ssl_forced": false,
  77. "advanced_config": "",
  78. "meta": {
  79. "nginx_online": true,
  80. "nginx_err": null
  81. },
  82. "http2_support": false,
  83. "enabled": true,
  84. "hsts_enabled": false,
  85. "hsts_subdomains": false,
  86. "owner": {
  87. "id": 1,
  88. "created_on": "2024-10-09T00:59:56.000Z",
  89. "modified_on": "2024-10-09T00:59:56.000Z",
  90. "is_disabled": false,
  91. "email": "[email protected]",
  92. "name": "Administrator",
  93. "nickname": "Admin",
  94. "avatar": "",
  95. "roles": ["admin"]
  96. },
  97. "certificate": null
  98. }
  99. }
  100. },
  101. "schema": {
  102. "$ref": "../../../../components/dead-host-object.json"
  103. }
  104. }
  105. }
  106. }
  107. }
  108. }