post.json 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  1. {
  2. "operationId": "createStream",
  3. "summary": "Create a Stream",
  4. "tags": ["Streams"],
  5. "security": [
  6. {
  7. "BearerAuth": ["streams"]
  8. }
  9. ],
  10. "requestBody": {
  11. "description": "Stream Payload",
  12. "required": true,
  13. "content": {
  14. "application/json": {
  15. "schema": {
  16. "type": "object",
  17. "additionalProperties": false,
  18. "required": ["incoming_port", "forwarding_host", "forwarding_port"],
  19. "properties": {
  20. "incoming_port": {
  21. "$ref": "../../../components/stream-object.json#/properties/incoming_port"
  22. },
  23. "forwarding_host": {
  24. "$ref": "../../../components/stream-object.json#/properties/forwarding_host"
  25. },
  26. "forwarding_port": {
  27. "$ref": "../../../components/stream-object.json#/properties/forwarding_port"
  28. },
  29. "tcp_forwarding": {
  30. "$ref": "../../../components/stream-object.json#/properties/tcp_forwarding"
  31. },
  32. "udp_forwarding": {
  33. "$ref": "../../../components/stream-object.json#/properties/udp_forwarding"
  34. },
  35. "certificate_id": {
  36. "$ref": "../../../components/stream-object.json#/properties/certificate_id"
  37. },
  38. "meta": {
  39. "$ref": "../../../components/stream-object.json#/properties/meta"
  40. }
  41. }
  42. }
  43. }
  44. }
  45. },
  46. "responses": {
  47. "201": {
  48. "description": "201 response",
  49. "content": {
  50. "application/json": {
  51. "examples": {
  52. "default": {
  53. "value": {
  54. "id": 1,
  55. "created_on": "2024-10-09T02:33:45.000Z",
  56. "modified_on": "2024-10-09T02:33:45.000Z",
  57. "owner_user_id": 1,
  58. "incoming_port": 9090,
  59. "forwarding_host": "router.internal",
  60. "forwarding_port": 80,
  61. "tcp_forwarding": true,
  62. "udp_forwarding": false,
  63. "meta": {
  64. "nginx_online": true,
  65. "nginx_err": null
  66. },
  67. "enabled": true,
  68. "owner": {
  69. "id": 1,
  70. "created_on": "2024-10-09T02:33:16.000Z",
  71. "modified_on": "2024-10-09T02:33:16.000Z",
  72. "is_deleted": false,
  73. "is_disabled": false,
  74. "email": "[email protected]",
  75. "name": "Administrator",
  76. "nickname": "Admin",
  77. "avatar": "",
  78. "roles": ["admin"]
  79. },
  80. "certificate_id": 0
  81. }
  82. }
  83. },
  84. "schema": {
  85. "$ref": "../../../components/stream-object.json"
  86. }
  87. }
  88. }
  89. }
  90. }
  91. }