Merge branch 'NginxProxyManager:develop' into stream-ssl

This commit is contained in:
jbowring
2024-12-02 21:29:22 +00:00
178 changed files with 7895 additions and 5240 deletions

View File

@ -0,0 +1,55 @@
{
"operationId": "getStreams",
"summary": "Get all streams",
"tags": ["Streams"],
"security": [
{
"BearerAuth": ["streams"]
}
],
"parameters": [
{
"in": "query",
"name": "expand",
"description": "Expansions",
"schema": {
"type": "string",
"enum": ["access_list", "owner", "certificate"]
}
}
],
"responses": {
"200": {
"description": "200 response",
"content": {
"application/json": {
"examples": {
"default": {
"value": [
{
"id": 1,
"created_on": "2024-10-09T02:33:45.000Z",
"modified_on": "2024-10-09T02:33:45.000Z",
"owner_user_id": 1,
"incoming_port": 9090,
"forwarding_host": "router.internal",
"forwarding_port": 80,
"tcp_forwarding": true,
"udp_forwarding": false,
"meta": {
"nginx_online": true,
"nginx_err": null
},
"enabled": true
}
]
}
},
"schema": {
"$ref": "../../../components/stream-list.json"
}
}
}
}
}
}

View File

@ -0,0 +1,95 @@
{
"operationId": "createStream",
"summary": "Create a Stream",
"tags": ["Streams"],
"security": [
{
"BearerAuth": ["streams"]
}
],
"requestBody": {
"description": "Stream Payload",
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"additionalProperties": false,
"required": ["incoming_port", "forwarding_host", "forwarding_port"],
"properties": {
"incoming_port": {
"$ref": "../../../components/stream-object.json#/properties/incoming_port"
},
"forwarding_host": {
"$ref": "../../../components/stream-object.json#/properties/forwarding_host"
},
"forwarding_port": {
"$ref": "../../../components/stream-object.json#/properties/forwarding_port"
},
"tcp_forwarding": {
"$ref": "../../../components/stream-object.json#/properties/tcp_forwarding"
},
"udp_forwarding": {
"$ref": "../../../components/stream-object.json#/properties/udp_forwarding"
},
"domain_names": {
"$ref": "../../../components/stream-object.json#/properties/domain_names"
},
"certificate_id": {
"$ref": "../../../components/stream-object.json#/properties/certificate_id"
},
"meta": {
"$ref": "../../../components/stream-object.json#/properties/meta"
}
}
}
}
}
},
"responses": {
"201": {
"description": "201 response",
"content": {
"application/json": {
"examples": {
"default": {
"value": {
"id": 1,
"created_on": "2024-10-09T02:33:45.000Z",
"modified_on": "2024-10-09T02:33:45.000Z",
"owner_user_id": 1,
"incoming_port": 9090,
"forwarding_host": "router.internal",
"forwarding_port": 80,
"tcp_forwarding": true,
"udp_forwarding": false,
"meta": {
"nginx_online": true,
"nginx_err": null
},
"enabled": true,
"owner": {
"id": 1,
"created_on": "2024-10-09T02:33:16.000Z",
"modified_on": "2024-10-09T02:33:16.000Z",
"is_deleted": false,
"is_disabled": false,
"email": "admin@example.com",
"name": "Administrator",
"nickname": "Admin",
"avatar": "",
"roles": ["admin"]
},
"certificate_id": 0,
"certificate": null
}
}
},
"schema": {
"$ref": "../../../components/stream-object.json"
}
}
}
}
}
}

View File

@ -0,0 +1,39 @@
{
"operationId": "deleteStream",
"summary": "Delete a Stream",
"tags": ["Streams"],
"security": [
{
"BearerAuth": ["streams"]
}
],
"parameters": [
{
"in": "path",
"name": "streamID",
"schema": {
"type": "integer",
"minimum": 1
},
"required": true,
"example": 2
}
],
"responses": {
"200": {
"description": "200 response",
"content": {
"application/json": {
"examples": {
"default": {
"value": true
}
},
"schema": {
"type": "boolean"
}
}
}
}
}
}

View File

@ -0,0 +1,59 @@
{
"operationId": "disableStream",
"summary": "Disable a Stream",
"tags": ["Streams"],
"security": [
{
"BearerAuth": ["streams"]
}
],
"parameters": [
{
"in": "path",
"name": "streamID",
"schema": {
"type": "integer",
"minimum": 1
},
"required": true,
"example": 2
}
],
"responses": {
"200": {
"description": "200 response",
"content": {
"application/json": {
"examples": {
"default": {
"value": true
}
},
"schema": {
"type": "boolean"
}
}
}
},
"400": {
"description": "400 response",
"content": {
"application/json": {
"examples": {
"default": {
"value": {
"error": {
"code": 400,
"message": "Host is already disabled"
}
}
}
},
"schema": {
"$ref": "../../../../../components/error.json"
}
}
}
}
}
}

View File

@ -0,0 +1,59 @@
{
"operationId": "enableStream",
"summary": "Enable a Stream",
"tags": ["Streams"],
"security": [
{
"BearerAuth": ["streams"]
}
],
"parameters": [
{
"in": "path",
"name": "streamID",
"schema": {
"type": "integer",
"minimum": 1
},
"required": true,
"example": 2
}
],
"responses": {
"200": {
"description": "200 response",
"content": {
"application/json": {
"examples": {
"default": {
"value": true
}
},
"schema": {
"type": "boolean"
}
}
}
},
"400": {
"description": "400 response",
"content": {
"application/json": {
"examples": {
"default": {
"value": {
"error": {
"code": 400,
"message": "Host is already enabled"
}
}
}
},
"schema": {
"$ref": "../../../../../components/error.json"
}
}
}
}
}
}

View File

@ -0,0 +1,54 @@
{
"operationId": "getStream",
"summary": "Get a Stream",
"tags": ["Streams"],
"security": [
{
"BearerAuth": ["streams"]
}
],
"parameters": [
{
"in": "path",
"name": "streamID",
"schema": {
"type": "integer",
"minimum": 1
},
"required": true,
"example": 2
}
],
"responses": {
"200": {
"description": "200 response",
"content": {
"application/json": {
"examples": {
"default": {
"value": {
"id": 1,
"created_on": "2024-10-09T02:33:45.000Z",
"modified_on": "2024-10-09T02:33:45.000Z",
"owner_user_id": 1,
"incoming_port": 9090,
"forwarding_host": "router.internal",
"forwarding_port": 80,
"tcp_forwarding": true,
"udp_forwarding": false,
"meta": {
"nginx_online": true,
"nginx_err": null
},
"enabled": true
}
}
},
"schema": {
"$ref": "../../../../components/stream-object.json"
}
}
}
}
}
}

View File

@ -0,0 +1,107 @@
{
"operationId": "updateStream",
"summary": "Update a Stream",
"tags": ["Streams"],
"security": [
{
"BearerAuth": ["streams"]
}
],
"parameters": [
{
"in": "path",
"name": "streamID",
"schema": {
"type": "integer",
"minimum": 1
},
"required": true,
"example": 2
}
],
"requestBody": {
"description": "Stream Payload",
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"additionalProperties": false,
"minProperties": 1,
"properties": {
"incoming_port": {
"$ref": "../../../../components/stream-object.json#/properties/incoming_port"
},
"forwarding_host": {
"$ref": "../../../../components/stream-object.json#/properties/forwarding_host"
},
"forwarding_port": {
"$ref": "../../../../components/stream-object.json#/properties/forwarding_port"
},
"tcp_forwarding": {
"$ref": "../../../../components/stream-object.json#/properties/tcp_forwarding"
},
"udp_forwarding": {
"$ref": "../../../../components/stream-object.json#/properties/udp_forwarding"
},
"domain_names": {
"$ref": "../../../../components/stream-object.json#/properties/domain_names"
},
"certificate_id": {
"$ref": "../../../../components/stream-object.json#/properties/certificate_id"
},
"meta": {
"$ref": "../../../../components/stream-object.json#/properties/meta"
}
}
}
}
}
},
"responses": {
"200": {
"description": "200 response",
"content": {
"application/json": {
"examples": {
"default": {
"value": {
"id": 1,
"created_on": "2024-10-08T23:23:03.000Z",
"modified_on": "2024-10-08T23:26:37.000Z",
"owner_user_id": 1,
"incoming_port": 9090,
"forwarding_host": "router.internal",
"forwarding_port": 80,
"tcp_forwarding": true,
"udp_forwarding": false,
"meta": {
"nginx_online": true,
"nginx_err": null
},
"enabled": true,
"owner": {
"id": 1,
"created_on": "2024-10-07T22:43:55.000Z",
"modified_on": "2024-10-08T12:52:54.000Z",
"is_deleted": false,
"is_disabled": false,
"email": "admin@example.com",
"name": "Administrator",
"nickname": "some guy",
"avatar": "//www.gravatar.com/avatar/e64c7d89f26bd1972efa854d13d7dd61?default=mm",
"roles": ["admin"]
},
"certificate": null,
"access_list": null
}
}
},
"schema": {
"$ref": "../../../../components/stream-object.json"
}
}
}
}
}
}