put.json 2.5 KB

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