post.json 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128
  1. {
  2. "operationId": "createProxyHost",
  3. "summary": "Create a Proxy Host",
  4. "tags": ["Proxy Hosts"],
  5. "security": [
  6. {
  7. "BearerAuth": ["proxy_hosts"]
  8. }
  9. ],
  10. "requestBody": {
  11. "description": "Proxy Host Payload",
  12. "required": true,
  13. "content": {
  14. "application/json": {
  15. "schema": {
  16. "type": "object",
  17. "additionalProperties": false,
  18. "required": ["domain_names", "forward_scheme", "forward_host", "forward_port"],
  19. "properties": {
  20. "domain_names": {
  21. "$ref": "../../../components/proxy-host-object.json#/properties/domain_names"
  22. },
  23. "forward_scheme": {
  24. "$ref": "../../../components/proxy-host-object.json#/properties/forward_scheme"
  25. },
  26. "forward_host": {
  27. "$ref": "../../../components/proxy-host-object.json#/properties/forward_host"
  28. },
  29. "forward_port": {
  30. "$ref": "../../../components/proxy-host-object.json#/properties/forward_port"
  31. },
  32. "certificate_id": {
  33. "$ref": "../../../components/proxy-host-object.json#/properties/certificate_id"
  34. },
  35. "ssl_forced": {
  36. "$ref": "../../../components/proxy-host-object.json#/properties/ssl_forced"
  37. },
  38. "hsts_enabled": {
  39. "$ref": "../../../components/proxy-host-object.json#/properties/hsts_enabled"
  40. },
  41. "hsts_subdomains": {
  42. "$ref": "../../../components/proxy-host-object.json#/properties/hsts_subdomains"
  43. },
  44. "http2_support": {
  45. "$ref": "../../../components/proxy-host-object.json#/properties/http2_support"
  46. },
  47. "block_exploits": {
  48. "$ref": "../../../components/proxy-host-object.json#/properties/block_exploits"
  49. },
  50. "caching_enabled": {
  51. "$ref": "../../../components/proxy-host-object.json#/properties/caching_enabled"
  52. },
  53. "allow_websocket_upgrade": {
  54. "$ref": "../../../components/proxy-host-object.json#/properties/allow_websocket_upgrade"
  55. },
  56. "access_list_id": {
  57. "$ref": "../../../components/proxy-host-object.json#/properties/access_list_id"
  58. },
  59. "advanced_config": {
  60. "$ref": "../../../components/proxy-host-object.json#/properties/advanced_config"
  61. },
  62. "enabled": {
  63. "$ref": "../../../components/proxy-host-object.json#/properties/enabled"
  64. },
  65. "meta": {
  66. "$ref": "../../../components/proxy-host-object.json#/properties/meta"
  67. },
  68. "locations": {
  69. "$ref": "../../../components/proxy-host-object.json#/properties/locations"
  70. }
  71. }
  72. }
  73. }
  74. }
  75. },
  76. "responses": {
  77. "201": {
  78. "description": "201 response",
  79. "content": {
  80. "application/json": {
  81. "examples": {
  82. "default": {
  83. "value": {
  84. "id": 1,
  85. "created_on": "2024-10-08T23:23:03.000Z",
  86. "modified_on": "2024-10-08T23:23:03.000Z",
  87. "owner_user_id": 1,
  88. "domain_names": ["test.example.com"],
  89. "forward_host": "127.0.0.1",
  90. "forward_port": 8989,
  91. "access_list_id": 0,
  92. "certificate_id": 0,
  93. "ssl_forced": false,
  94. "caching_enabled": false,
  95. "block_exploits": false,
  96. "advanced_config": "",
  97. "meta": {},
  98. "allow_websocket_upgrade": false,
  99. "http2_support": false,
  100. "forward_scheme": "http",
  101. "enabled": true,
  102. "hsts_enabled": false,
  103. "hsts_subdomains": false,
  104. "certificate": null,
  105. "owner": {
  106. "id": 1,
  107. "created_on": "2024-10-07T22:43:55.000Z",
  108. "modified_on": "2024-10-08T12:52:54.000Z",
  109. "is_deleted": false,
  110. "is_disabled": false,
  111. "email": "[email protected]",
  112. "name": "Administrator",
  113. "nickname": "some guy",
  114. "avatar": "//www.gravatar.com/avatar/e64c7d89f26bd1972efa854d13d7dd61?default=mm",
  115. "roles": ["admin"]
  116. },
  117. "access_list": null
  118. }
  119. }
  120. },
  121. "schema": {
  122. "$ref": "../../../components/proxy-host-object.json"
  123. }
  124. }
  125. }
  126. }
  127. }
  128. }