proxy-hosts.json 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429
  1. {
  2. "$schema": "http://json-schema.org/draft-07/schema#",
  3. "$id": "endpoints/proxy-hosts",
  4. "title": "Proxy Hosts",
  5. "description": "Endpoints relating to Proxy Hosts",
  6. "stability": "stable",
  7. "type": "object",
  8. "definitions": {
  9. "id": {
  10. "$ref": "../definitions.json#/definitions/id"
  11. },
  12. "created_on": {
  13. "$ref": "../definitions.json#/definitions/created_on"
  14. },
  15. "modified_on": {
  16. "$ref": "../definitions.json#/definitions/modified_on"
  17. },
  18. "domain_names": {
  19. "$ref": "../definitions.json#/definitions/domain_names"
  20. },
  21. "forward_scheme": {
  22. "type": "string",
  23. "enum": ["http", "https"]
  24. },
  25. "forward_host": {
  26. "type": "string",
  27. "minLength": 0,
  28. "maxLength": 255
  29. },
  30. "forward_port": {
  31. "type": "integer",
  32. "minimum": 0,
  33. "maximum": 65535
  34. },
  35. "root_dir": {
  36. "type": "string",
  37. "minLength": 0,
  38. },
  39. "index_file": {
  40. "type": "string",
  41. "minLength": 0,
  42. },
  43. "certificate_id": {
  44. "$ref": "../definitions.json#/definitions/certificate_id"
  45. },
  46. "ssl_forced": {
  47. "$ref": "../definitions.json#/definitions/ssl_forced"
  48. },
  49. "hsts_enabled": {
  50. "$ref": "../definitions.json#/definitions/hsts_enabled"
  51. },
  52. "hsts_subdomains": {
  53. "$ref": "../definitions.json#/definitions/hsts_subdomains"
  54. },
  55. "http2_support": {
  56. "$ref": "../definitions.json#/definitions/http2_support"
  57. },
  58. "block_exploits": {
  59. "$ref": "../definitions.json#/definitions/block_exploits"
  60. },
  61. "caching_enabled": {
  62. "$ref": "../definitions.json#/definitions/caching_enabled"
  63. },
  64. "static": {
  65. "$ref": "../definitions.json#/definitions/static"
  66. },
  67. "allow_websocket_upgrade": {
  68. "description": "Allow Websocket Upgrade for all paths",
  69. "example": true,
  70. "type": "boolean"
  71. },
  72. "access_list_id": {
  73. "$ref": "../definitions.json#/definitions/access_list_id"
  74. },
  75. "advanced_config": {
  76. "type": "string"
  77. },
  78. "enabled": {
  79. "$ref": "../definitions.json#/definitions/enabled"
  80. },
  81. "meta": {
  82. "type": "object"
  83. },
  84. "locations": {
  85. "type": "array",
  86. "minItems": 0,
  87. "items": {
  88. "type": "object",
  89. "required": [
  90. "forward_scheme"
  91. ],
  92. "additionalProperties": false,
  93. "properties": {
  94. "id": {
  95. "type": ["integer", "null"]
  96. },
  97. "path": {
  98. "type": "string",
  99. "minLength": 1
  100. },
  101. "forward_scheme": {
  102. "$ref": "#/definitions/forward_scheme"
  103. },
  104. "forward_host": {
  105. "$ref": "#/definitions/forward_host"
  106. },
  107. "forward_port": {
  108. "$ref": "#/definitions/forward_port"
  109. },
  110. "root_dir": {
  111. "$ref": "#/definitions/root_dir"
  112. },
  113. "index_file": {
  114. "$ref": "#/definitions/index_file"
  115. },
  116. "static": {
  117. "$ref": "#/definitions/static"
  118. },
  119. "forward_path": {
  120. "type": "string"
  121. },
  122. "advanced_config": {
  123. "type": "string"
  124. }
  125. }
  126. }
  127. }
  128. },
  129. "properties": {
  130. "id": {
  131. "$ref": "#/definitions/id"
  132. },
  133. "created_on": {
  134. "$ref": "#/definitions/created_on"
  135. },
  136. "modified_on": {
  137. "$ref": "#/definitions/modified_on"
  138. },
  139. "domain_names": {
  140. "$ref": "#/definitions/domain_names"
  141. },
  142. "forward_scheme": {
  143. "$ref": "#/definitions/forward_scheme"
  144. },
  145. "forward_host": {
  146. "$ref": "#/definitions/forward_host"
  147. },
  148. "forward_port": {
  149. "$ref": "#/definitions/forward_port"
  150. },
  151. "root_dir": {
  152. "$ref": "#/definitions/root_dir"
  153. },
  154. "index_file": {
  155. "$ref": "#/definitions/index_file"
  156. },
  157. "certificate_id": {
  158. "$ref": "#/definitions/certificate_id"
  159. },
  160. "ssl_forced": {
  161. "$ref": "#/definitions/ssl_forced"
  162. },
  163. "hsts_enabled": {
  164. "$ref": "#/definitions/hsts_enabled"
  165. },
  166. "hsts_subdomains": {
  167. "$ref": "#/definitions/hsts_subdomains"
  168. },
  169. "http2_support": {
  170. "$ref": "#/definitions/http2_support"
  171. },
  172. "block_exploits": {
  173. "$ref": "#/definitions/block_exploits"
  174. },
  175. "caching_enabled": {
  176. "$ref": "#/definitions/caching_enabled"
  177. },
  178. "static": {
  179. "$ref": "#/definitions/static"
  180. },
  181. "allow_websocket_upgrade": {
  182. "$ref": "#/definitions/allow_websocket_upgrade"
  183. },
  184. "access_list_id": {
  185. "$ref": "#/definitions/access_list_id"
  186. },
  187. "advanced_config": {
  188. "$ref": "#/definitions/advanced_config"
  189. },
  190. "enabled": {
  191. "$ref": "#/definitions/enabled"
  192. },
  193. "meta": {
  194. "$ref": "#/definitions/meta"
  195. },
  196. "locations": {
  197. "$ref": "#/definitions/locations"
  198. }
  199. },
  200. "links": [
  201. {
  202. "title": "List",
  203. "description": "Returns a list of Proxy Hosts",
  204. "href": "/nginx/proxy-hosts",
  205. "access": "private",
  206. "method": "GET",
  207. "rel": "self",
  208. "http_header": {
  209. "$ref": "../examples.json#/definitions/auth_header"
  210. },
  211. "targetSchema": {
  212. "type": "array",
  213. "items": {
  214. "$ref": "#/properties"
  215. }
  216. }
  217. },
  218. {
  219. "title": "Create",
  220. "description": "Creates a new Proxy Host",
  221. "href": "/nginx/proxy-hosts",
  222. "access": "private",
  223. "method": "POST",
  224. "rel": "create",
  225. "http_header": {
  226. "$ref": "../examples.json#/definitions/auth_header"
  227. },
  228. "schema": {
  229. "type": "object",
  230. "additionalProperties": false,
  231. "required": [
  232. "domain_names",
  233. "forward_scheme"
  234. ],
  235. "properties": {
  236. "domain_names": {
  237. "$ref": "#/definitions/domain_names"
  238. },
  239. "forward_scheme": {
  240. "$ref": "#/definitions/forward_scheme"
  241. },
  242. "forward_host": {
  243. "$ref": "#/definitions/forward_host"
  244. },
  245. "forward_port": {
  246. "$ref": "#/definitions/forward_port"
  247. },
  248. "root_dir": {
  249. "$ref": "#/definitions/root_dir"
  250. },
  251. "index_file": {
  252. "$ref": "#/definitions/index_file"
  253. },
  254. "certificate_id": {
  255. "$ref": "#/definitions/certificate_id"
  256. },
  257. "ssl_forced": {
  258. "$ref": "#/definitions/ssl_forced"
  259. },
  260. "hsts_enabled": {
  261. "$ref": "#/definitions/hsts_enabled"
  262. },
  263. "hsts_subdomains": {
  264. "$ref": "#/definitions/hsts_enabled"
  265. },
  266. "http2_support": {
  267. "$ref": "#/definitions/http2_support"
  268. },
  269. "block_exploits": {
  270. "$ref": "#/definitions/block_exploits"
  271. },
  272. "caching_enabled": {
  273. "$ref": "#/definitions/caching_enabled"
  274. },
  275. "static": {
  276. "$ref": "#/definitions/static"
  277. },
  278. "allow_websocket_upgrade": {
  279. "$ref": "#/definitions/allow_websocket_upgrade"
  280. },
  281. "access_list_id": {
  282. "$ref": "#/definitions/access_list_id"
  283. },
  284. "advanced_config": {
  285. "$ref": "#/definitions/advanced_config"
  286. },
  287. "enabled": {
  288. "$ref": "#/definitions/enabled"
  289. },
  290. "meta": {
  291. "$ref": "#/definitions/meta"
  292. },
  293. "locations": {
  294. "$ref": "#/definitions/locations"
  295. }
  296. }
  297. },
  298. "targetSchema": {
  299. "properties": {
  300. "$ref": "#/properties"
  301. }
  302. }
  303. },
  304. {
  305. "title": "Update",
  306. "description": "Updates a existing Proxy Host",
  307. "href": "/nginx/proxy-hosts/{definitions.identity.example}",
  308. "access": "private",
  309. "method": "PUT",
  310. "rel": "update",
  311. "http_header": {
  312. "$ref": "../examples.json#/definitions/auth_header"
  313. },
  314. "schema": {
  315. "type": "object",
  316. "additionalProperties": false,
  317. "properties": {
  318. "domain_names": {
  319. "$ref": "#/definitions/domain_names"
  320. },
  321. "forward_scheme": {
  322. "$ref": "#/definitions/forward_scheme"
  323. },
  324. "forward_host": {
  325. "$ref": "#/definitions/forward_host"
  326. },
  327. "forward_port": {
  328. "$ref": "#/definitions/forward_port"
  329. },
  330. "root_dir": {
  331. "$ref": "#/definitions/root_dir"
  332. },
  333. "index_file": {
  334. "$ref": "#/definitions/index_file"
  335. },
  336. "certificate_id": {
  337. "$ref": "#/definitions/certificate_id"
  338. },
  339. "ssl_forced": {
  340. "$ref": "#/definitions/ssl_forced"
  341. },
  342. "hsts_enabled": {
  343. "$ref": "#/definitions/hsts_enabled"
  344. },
  345. "hsts_subdomains": {
  346. "$ref": "#/definitions/hsts_enabled"
  347. },
  348. "http2_support": {
  349. "$ref": "#/definitions/http2_support"
  350. },
  351. "block_exploits": {
  352. "$ref": "#/definitions/block_exploits"
  353. },
  354. "caching_enabled": {
  355. "$ref": "#/definitions/caching_enabled"
  356. },
  357. "static": {
  358. "$ref": "#/definitions/static"
  359. },
  360. "allow_websocket_upgrade": {
  361. "$ref": "#/definitions/allow_websocket_upgrade"
  362. },
  363. "access_list_id": {
  364. "$ref": "#/definitions/access_list_id"
  365. },
  366. "advanced_config": {
  367. "$ref": "#/definitions/advanced_config"
  368. },
  369. "enabled": {
  370. "$ref": "#/definitions/enabled"
  371. },
  372. "meta": {
  373. "$ref": "#/definitions/meta"
  374. },
  375. "locations": {
  376. "$ref": "#/definitions/locations"
  377. }
  378. }
  379. },
  380. "targetSchema": {
  381. "properties": {
  382. "$ref": "#/properties"
  383. }
  384. }
  385. },
  386. {
  387. "title": "Delete",
  388. "description": "Deletes a existing Proxy Host",
  389. "href": "/nginx/proxy-hosts/{definitions.identity.example}",
  390. "access": "private",
  391. "method": "DELETE",
  392. "rel": "delete",
  393. "http_header": {
  394. "$ref": "../examples.json#/definitions/auth_header"
  395. },
  396. "targetSchema": {
  397. "type": "boolean"
  398. }
  399. },
  400. {
  401. "title": "Enable",
  402. "description": "Enables a existing Proxy Host",
  403. "href": "/nginx/proxy-hosts/{definitions.identity.example}/enable",
  404. "access": "private",
  405. "method": "POST",
  406. "rel": "update",
  407. "http_header": {
  408. "$ref": "../examples.json#/definitions/auth_header"
  409. },
  410. "targetSchema": {
  411. "type": "boolean"
  412. }
  413. },
  414. {
  415. "title": "Disable",
  416. "description": "Disables a existing Proxy Host",
  417. "href": "/nginx/proxy-hosts/{definitions.identity.example}/disable",
  418. "access": "private",
  419. "method": "POST",
  420. "rel": "update",
  421. "http_header": {
  422. "$ref": "../examples.json#/definitions/auth_header"
  423. },
  424. "targetSchema": {
  425. "type": "boolean"
  426. }
  427. }
  428. ]
  429. }