post.json 2.7 KB

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