put.json 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103
  1. {
  2. "operationId": "updateStream",
  3. "summary": "Update a Stream",
  4. "tags": ["streams"],
  5. "security": [
  6. {
  7. "bearerAuth": ["streams.manage"]
  8. }
  9. ],
  10. "parameters": [
  11. {
  12. "in": "path",
  13. "name": "streamID",
  14. "description": "The ID of the Stream",
  15. "schema": {
  16. "type": "integer",
  17. "minimum": 1
  18. },
  19. "required": true,
  20. "example": 2
  21. }
  22. ],
  23. "requestBody": {
  24. "description": "Stream Payload",
  25. "required": true,
  26. "content": {
  27. "application/json": {
  28. "schema": {
  29. "type": "object",
  30. "additionalProperties": false,
  31. "minProperties": 1,
  32. "properties": {
  33. "incoming_port": {
  34. "$ref": "../../../../components/stream-object.json#/properties/incoming_port"
  35. },
  36. "forwarding_host": {
  37. "$ref": "../../../../components/stream-object.json#/properties/forwarding_host"
  38. },
  39. "forwarding_port": {
  40. "$ref": "../../../../components/stream-object.json#/properties/forwarding_port"
  41. },
  42. "tcp_forwarding": {
  43. "$ref": "../../../../components/stream-object.json#/properties/tcp_forwarding"
  44. },
  45. "udp_forwarding": {
  46. "$ref": "../../../../components/stream-object.json#/properties/udp_forwarding"
  47. },
  48. "certificate_id": {
  49. "$ref": "../../../../components/stream-object.json#/properties/certificate_id"
  50. },
  51. "meta": {
  52. "$ref": "../../../../components/stream-object.json#/properties/meta"
  53. }
  54. }
  55. }
  56. }
  57. }
  58. },
  59. "responses": {
  60. "200": {
  61. "description": "200 response",
  62. "content": {
  63. "application/json": {
  64. "examples": {
  65. "default": {
  66. "value": {
  67. "id": 1,
  68. "created_on": "2024-10-09T02:33:45.000Z",
  69. "modified_on": "2024-10-09T02:33:45.000Z",
  70. "owner_user_id": 1,
  71. "incoming_port": 9090,
  72. "forwarding_host": "router.internal",
  73. "forwarding_port": 80,
  74. "tcp_forwarding": true,
  75. "udp_forwarding": false,
  76. "meta": {
  77. "nginx_online": true,
  78. "nginx_err": null
  79. },
  80. "enabled": true,
  81. "owner": {
  82. "id": 1,
  83. "created_on": "2024-10-09T02:33:16.000Z",
  84. "modified_on": "2024-10-09T02:33:16.000Z",
  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. }