// Code generated by go-swagger; DO NOT EDIT. package rest_server_zrok // This file was generated by the swagger tool. // Editing this file might prove futile when you re-run the swagger generate command import ( "encoding/json" ) var ( // SwaggerJSON embedded version of the swagger document used at generation time SwaggerJSON json.RawMessage // FlatSwaggerJSON embedded flattened version of the swagger document used at generation time FlatSwaggerJSON json.RawMessage ) func init() { SwaggerJSON = json.RawMessage([]byte(`{ "consumes": [ "application/zrok.v1+json" ], "produces": [ "application/zrok.v1+json" ], "schemes": [ "http" ], "swagger": "2.0", "info": { "description": "zrok client access", "title": "zrok", "version": "1.0.0" }, "basePath": "/api/v1", "paths": { "/access": { "post": { "security": [ { "key": [] } ], "tags": [ "share" ], "operationId": "access", "parameters": [ { "name": "body", "in": "body", "schema": { "$ref": "#/definitions/accessRequest" } } ], "responses": { "201": { "description": "access created", "schema": { "$ref": "#/definitions/accessResponse" } }, "401": { "description": "unauthorized" }, "404": { "description": "not found" }, "500": { "description": "internal server error" } } } }, "/account": { "post": { "security": [ { "key": [] } ], "tags": [ "admin" ], "operationId": "createAccount", "parameters": [ { "name": "body", "in": "body", "schema": { "properties": { "email": { "type": "string" }, "password": { "type": "string" } } } } ], "responses": { "201": { "description": "created", "schema": { "properties": { "token": { "type": "string" } } } }, "401": { "description": "unauthorized" }, "500": { "description": "internal server error" } } } }, "/changePassword": { "post": { "security": [ { "key": [] } ], "tags": [ "account" ], "operationId": "changePassword", "parameters": [ { "name": "body", "in": "body", "schema": { "$ref": "#/definitions/changePasswordRequest" } } ], "responses": { "200": { "description": "changed password" }, "400": { "description": "password not changed" }, "401": { "description": "unauthorized" }, "422": { "description": "password validation failure", "schema": { "$ref": "#/definitions/errorMessage" } }, "500": { "description": "internal server error" } } } }, "/configuration": { "get": { "tags": [ "metadata" ], "operationId": "configuration", "responses": { "200": { "description": "current configuration", "schema": { "$ref": "#/definitions/configuration" } } } } }, "/detail/account": { "get": { "security": [ { "key": [] } ], "tags": [ "metadata" ], "operationId": "getAccountDetail", "responses": { "200": { "description": "ok", "schema": { "$ref": "#/definitions/environments" } }, "500": { "description": "internal server error" } } } }, "/detail/environment/{envZId}": { "get": { "security": [ { "key": [] } ], "tags": [ "metadata" ], "operationId": "getEnvironmentDetail", "parameters": [ { "type": "string", "name": "envZId", "in": "path", "required": true } ], "responses": { "200": { "description": "ok", "schema": { "$ref": "#/definitions/environmentAndResources" } }, "401": { "description": "unauthorized" }, "404": { "description": "not found" }, "500": { "description": "internal server error" } } } }, "/detail/frontend/{feId}": { "get": { "security": [ { "key": [] } ], "tags": [ "metadata" ], "operationId": "getFrontendDetail", "parameters": [ { "type": "integer", "name": "feId", "in": "path", "required": true } ], "responses": { "200": { "description": "ok", "schema": { "$ref": "#/definitions/frontend" } }, "401": { "description": "unauthorized" }, "404": { "description": "not found" }, "500": { "description": "internal server error" } } } }, "/detail/share/{shrToken}": { "get": { "security": [ { "key": [] } ], "tags": [ "metadata" ], "operationId": "getShareDetail", "parameters": [ { "type": "string", "name": "shrToken", "in": "path", "required": true } ], "responses": { "200": { "description": "ok", "schema": { "$ref": "#/definitions/share" } }, "401": { "description": "unauthorized" }, "404": { "description": "not found" }, "500": { "description": "internal server error" } } } }, "/disable": { "post": { "security": [ { "key": [] } ], "tags": [ "environment" ], "operationId": "disable", "parameters": [ { "name": "body", "in": "body", "schema": { "$ref": "#/definitions/disableRequest" } } ], "responses": { "200": { "description": "environment disabled" }, "401": { "description": "invalid environment" }, "500": { "description": "internal server error" } } } }, "/enable": { "post": { "security": [ { "key": [] } ], "tags": [ "environment" ], "operationId": "enable", "parameters": [ { "name": "body", "in": "body", "schema": { "$ref": "#/definitions/enableRequest" } } ], "responses": { "201": { "description": "environment enabled", "schema": { "$ref": "#/definitions/enableResponse" } }, "401": { "description": "unauthorized" }, "404": { "description": "account not found" }, "500": { "description": "internal server error" } } } }, "/frontend": { "post": { "security": [ { "key": [] } ], "tags": [ "admin" ], "operationId": "createFrontend", "parameters": [ { "name": "body", "in": "body", "schema": { "$ref": "#/definitions/createFrontendRequest" } } ], "responses": { "201": { "description": "frontend created", "schema": { "$ref": "#/definitions/createFrontendResponse" } }, "400": { "description": "bad request" }, "401": { "description": "unauthorized" }, "404": { "description": "not found" }, "500": { "description": "internal server error" } } }, "delete": { "security": [ { "key": [] } ], "tags": [ "admin" ], "operationId": "deleteFrontend", "parameters": [ { "name": "body", "in": "body", "schema": { "$ref": "#/definitions/deleteFrontendRequest" } } ], "responses": { "200": { "description": "frontend deleted" }, "401": { "description": "unauthorized" }, "404": { "description": "not found" }, "500": { "description": "internal server error" } } }, "patch": { "security": [ { "key": [] } ], "tags": [ "admin" ], "operationId": "updateFrontend", "parameters": [ { "name": "body", "in": "body", "schema": { "$ref": "#/definitions/updateFrontendRequest" } } ], "responses": { "200": { "description": "frontend updated" }, "401": { "description": "unauthorized" }, "404": { "description": "not found" }, "500": { "description": "internal server error" } } } }, "/frontends": { "get": { "security": [ { "key": [] } ], "tags": [ "admin" ], "operationId": "listFrontends", "responses": { "200": { "description": "ok", "schema": { "$ref": "#/definitions/publicFrontendList" } }, "401": { "description": "unauthorized" }, "500": { "description": "internal server error" } } } }, "/grants": { "post": { "security": [ { "key": [] } ], "tags": [ "admin" ], "operationId": "grants", "parameters": [ { "name": "body", "in": "body", "schema": { "properties": { "email": { "type": "string" } } } } ], "responses": { "200": { "description": "ok" }, "401": { "description": "unauthorized" }, "404": { "description": "not found" }, "500": { "description": "internal server error" } } } }, "/identity": { "post": { "security": [ { "key": [] } ], "tags": [ "admin" ], "operationId": "createIdentity", "parameters": [ { "name": "body", "in": "body", "schema": { "properties": { "name": { "type": "string" } } } } ], "responses": { "201": { "description": "created", "schema": { "properties": { "cfg": { "type": "string" }, "identity": { "type": "string" } } } }, "401": { "description": "unauthorized" }, "500": { "description": "internal server error" } } } }, "/invite": { "post": { "tags": [ "account" ], "operationId": "invite", "parameters": [ { "name": "body", "in": "body", "schema": { "$ref": "#/definitions/inviteRequest" } } ], "responses": { "201": { "description": "invitation created" }, "400": { "description": "invitation not created (already exists)", "schema": { "$ref": "#/definitions/errorMessage" } }, "401": { "description": "unauthorized" }, "500": { "description": "internal server error" } } } }, "/invite/token/generate": { "post": { "security": [ { "key": [] } ], "tags": [ "admin" ], "operationId": "inviteTokenGenerate", "parameters": [ { "name": "body", "in": "body", "schema": { "$ref": "#/definitions/inviteTokenGenerateRequest" } } ], "responses": { "201": { "description": "invitation tokens created" }, "400": { "description": "invitation tokens not created" }, "401": { "description": "unauthorized" }, "500": { "description": "internal server error" } } } }, "/login": { "post": { "tags": [ "account" ], "operationId": "login", "parameters": [ { "name": "body", "in": "body", "schema": { "$ref": "#/definitions/loginRequest" } } ], "responses": { "200": { "description": "login successful", "schema": { "$ref": "#/definitions/loginResponse" } }, "401": { "description": "invalid login" } } } }, "/metrics/account": { "get": { "security": [ { "key": [] } ], "tags": [ "metadata" ], "operationId": "getAccountMetrics", "parameters": [ { "type": "string", "name": "duration", "in": "query" } ], "responses": { "200": { "description": "account metrics", "schema": { "$ref": "#/definitions/metrics" } }, "400": { "description": "bad request" }, "500": { "description": "internal server error" } } } }, "/metrics/environment/{envId}": { "get": { "security": [ { "key": [] } ], "tags": [ "metadata" ], "operationId": "getEnvironmentMetrics", "parameters": [ { "type": "string", "name": "envId", "in": "path", "required": true }, { "type": "string", "name": "duration", "in": "query" } ], "responses": { "200": { "description": "environment metrics", "schema": { "$ref": "#/definitions/metrics" } }, "400": { "description": "bad request" }, "401": { "description": "unauthorized" }, "500": { "description": "internal server error" } } } }, "/metrics/share/{shrToken}": { "get": { "security": [ { "key": [] } ], "tags": [ "metadata" ], "operationId": "getShareMetrics", "parameters": [ { "type": "string", "name": "shrToken", "in": "path", "required": true }, { "type": "string", "name": "duration", "in": "query" } ], "responses": { "200": { "description": "share metrics", "schema": { "$ref": "#/definitions/metrics" } }, "400": { "description": "bad request" }, "401": { "description": "unauthorized" }, "500": { "description": "internal server error" } } } }, "/overview": { "get": { "security": [ { "key": [] } ], "tags": [ "metadata" ], "operationId": "overview", "responses": { "200": { "description": "overview returned", "schema": { "$ref": "#/definitions/overview" } }, "500": { "description": "internal server error", "schema": { "$ref": "#/definitions/errorMessage" } } } } }, "/regenerateToken": { "post": { "security": [ { "key": [] } ], "tags": [ "account" ], "operationId": "regenerateToken", "parameters": [ { "name": "body", "in": "body", "schema": { "properties": { "emailAddress": { "type": "string" } } } } ], "responses": { "200": { "description": "regenerate account token", "schema": { "properties": { "token": { "type": "string" } } } }, "404": { "description": "account not found" }, "500": { "description": "internal server error" } } } }, "/register": { "post": { "tags": [ "account" ], "operationId": "register", "parameters": [ { "name": "body", "in": "body", "schema": { "$ref": "#/definitions/registerRequest" } } ], "responses": { "200": { "description": "account created", "schema": { "$ref": "#/definitions/registerResponse" } }, "404": { "description": "request not found" }, "422": { "description": "password validation failure", "schema": { "$ref": "#/definitions/errorMessage" } }, "500": { "description": "internal server error" } } } }, "/resetPassword": { "post": { "tags": [ "account" ], "operationId": "resetPassword", "parameters": [ { "name": "body", "in": "body", "schema": { "$ref": "#/definitions/resetPasswordRequest" } } ], "responses": { "200": { "description": "password reset" }, "404": { "description": "request not found" }, "422": { "description": "password validation failure", "schema": { "$ref": "#/definitions/errorMessage" } }, "500": { "description": "internal server error" } } } }, "/resetPasswordRequest": { "post": { "tags": [ "account" ], "operationId": "resetPasswordRequest", "parameters": [ { "name": "body", "in": "body", "schema": { "properties": { "emailAddress": { "type": "string" } } } } ], "responses": { "201": { "description": "forgot password request created" }, "400": { "description": "forgot password request not created" }, "500": { "description": "internal server error" } } } }, "/share": { "post": { "security": [ { "key": [] } ], "tags": [ "share" ], "operationId": "share", "parameters": [ { "name": "body", "in": "body", "schema": { "$ref": "#/definitions/shareRequest" } } ], "responses": { "201": { "description": "share created", "schema": { "$ref": "#/definitions/shareResponse" } }, "401": { "description": "unauthorized" }, "404": { "description": "not found" }, "409": { "description": "conflict" }, "422": { "description": "unprocessable" }, "500": { "description": "internal server error", "schema": { "$ref": "#/definitions/errorMessage" } } } }, "patch": { "security": [ { "key": [] } ], "tags": [ "share" ], "operationId": "updateShare", "parameters": [ { "name": "body", "in": "body", "schema": { "$ref": "#/definitions/updateShareRequest" } } ], "responses": { "200": { "description": "share updated" }, "400": { "description": "bad request" }, "401": { "description": "unauthorized" }, "404": { "description": "not found" }, "500": { "description": "internal server error" } } } }, "/unaccess": { "delete": { "security": [ { "key": [] } ], "tags": [ "share" ], "operationId": "unaccess", "parameters": [ { "name": "body", "in": "body", "schema": { "$ref": "#/definitions/unaccessRequest" } } ], "responses": { "200": { "description": "access removed" }, "401": { "description": "unauthorized" }, "404": { "description": "not found" }, "500": { "description": "internal server error" } } } }, "/unshare": { "delete": { "security": [ { "key": [] } ], "tags": [ "share" ], "operationId": "unshare", "parameters": [ { "name": "body", "in": "body", "schema": { "$ref": "#/definitions/unshareRequest" } } ], "responses": { "200": { "description": "share removed" }, "401": { "description": "unauthorized" }, "404": { "description": "not found" }, "500": { "description": "internal server error", "schema": { "$ref": "#/definitions/errorMessage" } } } } }, "/verify": { "post": { "tags": [ "account" ], "operationId": "verify", "parameters": [ { "name": "body", "in": "body", "schema": { "$ref": "#/definitions/verifyRequest" } } ], "responses": { "200": { "description": "token ready", "schema": { "$ref": "#/definitions/verifyResponse" } }, "404": { "description": "token not found" }, "500": { "description": "internal server error" } } } }, "/version": { "get": { "tags": [ "metadata" ], "operationId": "version", "responses": { "200": { "description": "current server version", "schema": { "$ref": "#/definitions/version" } } } } } }, "definitions": { "accessRequest": { "type": "object", "properties": { "envZId": { "type": "string" }, "shrToken": { "type": "string" } } }, "accessResponse": { "type": "object", "properties": { "backendMode": { "type": "string" }, "frontendToken": { "type": "string" } } }, "authUser": { "type": "object", "properties": { "password": { "type": "string" }, "username": { "type": "string" } } }, "changePasswordRequest": { "type": "object", "properties": { "email": { "type": "string" }, "newPassword": { "type": "string" }, "oldPassword": { "type": "string" } } }, "configuration": { "type": "object", "properties": { "inviteTokenContact": { "type": "string" }, "invitesOpen": { "type": "boolean" }, "passwordRequirements": { "$ref": "#/definitions/passwordRequirements" }, "requiresInviteToken": { "type": "boolean" }, "touLink": { "type": "string" }, "version": { "type": "string" } } }, "createFrontendRequest": { "type": "object", "properties": { "permissionMode": { "type": "string", "enum": [ "open", "closed" ] }, "public_name": { "type": "string" }, "url_template": { "type": "string" }, "zId": { "type": "string" } } }, "createFrontendResponse": { "type": "object", "properties": { "token": { "type": "string" } } }, "deleteFrontendRequest": { "type": "object", "properties": { "frontendToken": { "type": "string" } } }, "disableRequest": { "type": "object", "properties": { "identity": { "type": "string" } } }, "enableRequest": { "type": "object", "properties": { "description": { "type": "string" }, "host": { "type": "string" } } }, "enableResponse": { "type": "object", "properties": { "cfg": { "type": "string" }, "identity": { "type": "string" } } }, "environment": { "type": "object", "properties": { "activity": { "$ref": "#/definitions/sparkData" }, "address": { "type": "string" }, "createdAt": { "type": "integer" }, "description": { "type": "string" }, "host": { "type": "string" }, "limited": { "type": "boolean" }, "updatedAt": { "type": "integer" }, "zId": { "type": "string" } } }, "environmentAndResources": { "type": "object", "properties": { "environment": { "$ref": "#/definitions/environment" }, "frontends": { "$ref": "#/definitions/frontends" }, "shares": { "$ref": "#/definitions/shares" } } }, "environments": { "type": "array", "items": { "$ref": "#/definitions/environment" } }, "errorMessage": { "type": "string" }, "frontend": { "type": "object", "properties": { "createdAt": { "type": "integer" }, "id": { "type": "integer" }, "shrToken": { "type": "string" }, "token": { "type": "string" }, "updatedAt": { "type": "integer" }, "zId": { "type": "string" } } }, "frontends": { "type": "array", "items": { "$ref": "#/definitions/frontend" } }, "inviteRequest": { "type": "object", "properties": { "email": { "type": "string" }, "token": { "type": "string" } } }, "inviteTokenGenerateRequest": { "type": "object", "properties": { "tokens": { "type": "array", "items": { "type": "string" } } } }, "loginRequest": { "type": "object", "properties": { "email": { "type": "string" }, "password": { "type": "string" } } }, "loginResponse": { "type": "string" }, "metrics": { "type": "object", "properties": { "id": { "type": "string" }, "period": { "type": "number" }, "samples": { "type": "array", "items": { "$ref": "#/definitions/metricsSample" } }, "scope": { "type": "string" } } }, "metricsSample": { "type": "object", "properties": { "rx": { "type": "number" }, "timestamp": { "type": "number" }, "tx": { "type": "number" } } }, "overview": { "type": "object", "properties": { "accountLimited": { "type": "boolean" }, "environments": { "type": "array", "items": { "$ref": "#/definitions/environmentAndResources" } } } }, "passwordRequirements": { "type": "object", "properties": { "length": { "type": "integer" }, "requireCapital": { "type": "boolean" }, "requireNumeric": { "type": "boolean" }, "requireSpecial": { "type": "boolean" }, "validSpecialCharacters": { "type": "string" } } }, "principal": { "type": "object", "properties": { "admin": { "type": "boolean" }, "email": { "type": "string" }, "id": { "type": "integer" }, "limitless": { "type": "boolean" }, "token": { "type": "string" } } }, "publicFrontend": { "type": "object", "properties": { "createdAt": { "type": "integer" }, "publicName": { "type": "string" }, "token": { "type": "string" }, "updatedAt": { "type": "integer" }, "urlTemplate": { "type": "string" }, "zId": { "type": "string" } } }, "publicFrontendList": { "type": "array", "items": { "$ref": "#/definitions/publicFrontend" } }, "registerRequest": { "type": "object", "properties": { "password": { "type": "string" }, "token": { "type": "string" } } }, "registerResponse": { "type": "object", "properties": { "token": { "type": "string" } } }, "resetPasswordRequest": { "type": "object", "properties": { "password": { "type": "string" }, "token": { "type": "string" } } }, "share": { "type": "object", "properties": { "activity": { "$ref": "#/definitions/sparkData" }, "backendMode": { "type": "string" }, "backendProxyEndpoint": { "type": "string" }, "createdAt": { "type": "integer" }, "frontendEndpoint": { "type": "string" }, "frontendSelection": { "type": "string" }, "limited": { "type": "boolean" }, "reserved": { "type": "boolean" }, "shareMode": { "type": "string" }, "token": { "type": "string" }, "updatedAt": { "type": "integer" }, "zId": { "type": "string" } } }, "shareRequest": { "type": "object", "properties": { "accessGrants": { "type": "array", "items": { "type": "string" } }, "authScheme": { "type": "string" }, "authUsers": { "type": "array", "items": { "$ref": "#/definitions/authUser" } }, "backendMode": { "type": "string", "enum": [ "proxy", "web", "tcpTunnel", "udpTunnel", "caddy", "drive", "socks", "vpn" ] }, "backendProxyEndpoint": { "type": "string" }, "envZId": { "type": "string" }, "frontendSelection": { "type": "array", "items": { "type": "string" } }, "oauthAuthorizationCheckInterval": { "type": "string" }, "oauthEmailDomains": { "type": "array", "items": { "type": "string" } }, "oauthProvider": { "type": "string", "enum": [ "github", "google" ] }, "permissionMode": { "type": "string", "enum": [ "open", "closed" ] }, "reserved": { "type": "boolean" }, "shareMode": { "type": "string", "enum": [ "public", "private" ] }, "uniqueName": { "type": "string" } } }, "shareResponse": { "type": "object", "properties": { "frontendProxyEndpoints": { "type": "array", "items": { "type": "string" } }, "shrToken": { "type": "string" } } }, "shares": { "type": "array", "items": { "$ref": "#/definitions/share" } }, "sparkData": { "type": "array", "items": { "$ref": "#/definitions/sparkDataSample" } }, "sparkDataSample": { "type": "object", "properties": { "rx": { "type": "number" }, "tx": { "type": "number" } } }, "unaccessRequest": { "type": "object", "properties": { "envZId": { "type": "string" }, "frontendToken": { "type": "string" }, "shrToken": { "type": "string" } } }, "unshareRequest": { "type": "object", "properties": { "envZId": { "type": "string" }, "reserved": { "type": "boolean" }, "shrToken": { "type": "string" } } }, "updateFrontendRequest": { "type": "object", "properties": { "frontendToken": { "type": "string" }, "publicName": { "type": "string" }, "urlTemplate": { "type": "string" } } }, "updateShareRequest": { "type": "object", "properties": { "addAccessGrants": { "type": "array", "items": { "type": "string" } }, "backendProxyEndpoint": { "type": "string" }, "removeAccessGrants": { "type": "array", "items": { "type": "string" } }, "shrToken": { "type": "string" } } }, "verifyRequest": { "type": "object", "properties": { "token": { "type": "string" } } }, "verifyResponse": { "type": "object", "properties": { "email": { "type": "string" } } }, "version": { "type": "string" } }, "securityDefinitions": { "key": { "type": "apiKey", "name": "x-token", "in": "header" } } }`)) FlatSwaggerJSON = json.RawMessage([]byte(`{ "consumes": [ "application/zrok.v1+json" ], "produces": [ "application/zrok.v1+json" ], "schemes": [ "http" ], "swagger": "2.0", "info": { "description": "zrok client access", "title": "zrok", "version": "1.0.0" }, "basePath": "/api/v1", "paths": { "/access": { "post": { "security": [ { "key": [] } ], "tags": [ "share" ], "operationId": "access", "parameters": [ { "name": "body", "in": "body", "schema": { "$ref": "#/definitions/accessRequest" } } ], "responses": { "201": { "description": "access created", "schema": { "$ref": "#/definitions/accessResponse" } }, "401": { "description": "unauthorized" }, "404": { "description": "not found" }, "500": { "description": "internal server error" } } } }, "/account": { "post": { "security": [ { "key": [] } ], "tags": [ "admin" ], "operationId": "createAccount", "parameters": [ { "name": "body", "in": "body", "schema": { "properties": { "email": { "type": "string" }, "password": { "type": "string" } } } } ], "responses": { "201": { "description": "created", "schema": { "properties": { "token": { "type": "string" } } } }, "401": { "description": "unauthorized" }, "500": { "description": "internal server error" } } } }, "/changePassword": { "post": { "security": [ { "key": [] } ], "tags": [ "account" ], "operationId": "changePassword", "parameters": [ { "name": "body", "in": "body", "schema": { "$ref": "#/definitions/changePasswordRequest" } } ], "responses": { "200": { "description": "changed password" }, "400": { "description": "password not changed" }, "401": { "description": "unauthorized" }, "422": { "description": "password validation failure", "schema": { "$ref": "#/definitions/errorMessage" } }, "500": { "description": "internal server error" } } } }, "/configuration": { "get": { "tags": [ "metadata" ], "operationId": "configuration", "responses": { "200": { "description": "current configuration", "schema": { "$ref": "#/definitions/configuration" } } } } }, "/detail/account": { "get": { "security": [ { "key": [] } ], "tags": [ "metadata" ], "operationId": "getAccountDetail", "responses": { "200": { "description": "ok", "schema": { "$ref": "#/definitions/environments" } }, "500": { "description": "internal server error" } } } }, "/detail/environment/{envZId}": { "get": { "security": [ { "key": [] } ], "tags": [ "metadata" ], "operationId": "getEnvironmentDetail", "parameters": [ { "type": "string", "name": "envZId", "in": "path", "required": true } ], "responses": { "200": { "description": "ok", "schema": { "$ref": "#/definitions/environmentAndResources" } }, "401": { "description": "unauthorized" }, "404": { "description": "not found" }, "500": { "description": "internal server error" } } } }, "/detail/frontend/{feId}": { "get": { "security": [ { "key": [] } ], "tags": [ "metadata" ], "operationId": "getFrontendDetail", "parameters": [ { "type": "integer", "name": "feId", "in": "path", "required": true } ], "responses": { "200": { "description": "ok", "schema": { "$ref": "#/definitions/frontend" } }, "401": { "description": "unauthorized" }, "404": { "description": "not found" }, "500": { "description": "internal server error" } } } }, "/detail/share/{shrToken}": { "get": { "security": [ { "key": [] } ], "tags": [ "metadata" ], "operationId": "getShareDetail", "parameters": [ { "type": "string", "name": "shrToken", "in": "path", "required": true } ], "responses": { "200": { "description": "ok", "schema": { "$ref": "#/definitions/share" } }, "401": { "description": "unauthorized" }, "404": { "description": "not found" }, "500": { "description": "internal server error" } } } }, "/disable": { "post": { "security": [ { "key": [] } ], "tags": [ "environment" ], "operationId": "disable", "parameters": [ { "name": "body", "in": "body", "schema": { "$ref": "#/definitions/disableRequest" } } ], "responses": { "200": { "description": "environment disabled" }, "401": { "description": "invalid environment" }, "500": { "description": "internal server error" } } } }, "/enable": { "post": { "security": [ { "key": [] } ], "tags": [ "environment" ], "operationId": "enable", "parameters": [ { "name": "body", "in": "body", "schema": { "$ref": "#/definitions/enableRequest" } } ], "responses": { "201": { "description": "environment enabled", "schema": { "$ref": "#/definitions/enableResponse" } }, "401": { "description": "unauthorized" }, "404": { "description": "account not found" }, "500": { "description": "internal server error" } } } }, "/frontend": { "post": { "security": [ { "key": [] } ], "tags": [ "admin" ], "operationId": "createFrontend", "parameters": [ { "name": "body", "in": "body", "schema": { "$ref": "#/definitions/createFrontendRequest" } } ], "responses": { "201": { "description": "frontend created", "schema": { "$ref": "#/definitions/createFrontendResponse" } }, "400": { "description": "bad request" }, "401": { "description": "unauthorized" }, "404": { "description": "not found" }, "500": { "description": "internal server error" } } }, "delete": { "security": [ { "key": [] } ], "tags": [ "admin" ], "operationId": "deleteFrontend", "parameters": [ { "name": "body", "in": "body", "schema": { "$ref": "#/definitions/deleteFrontendRequest" } } ], "responses": { "200": { "description": "frontend deleted" }, "401": { "description": "unauthorized" }, "404": { "description": "not found" }, "500": { "description": "internal server error" } } }, "patch": { "security": [ { "key": [] } ], "tags": [ "admin" ], "operationId": "updateFrontend", "parameters": [ { "name": "body", "in": "body", "schema": { "$ref": "#/definitions/updateFrontendRequest" } } ], "responses": { "200": { "description": "frontend updated" }, "401": { "description": "unauthorized" }, "404": { "description": "not found" }, "500": { "description": "internal server error" } } } }, "/frontends": { "get": { "security": [ { "key": [] } ], "tags": [ "admin" ], "operationId": "listFrontends", "responses": { "200": { "description": "ok", "schema": { "$ref": "#/definitions/publicFrontendList" } }, "401": { "description": "unauthorized" }, "500": { "description": "internal server error" } } } }, "/grants": { "post": { "security": [ { "key": [] } ], "tags": [ "admin" ], "operationId": "grants", "parameters": [ { "name": "body", "in": "body", "schema": { "properties": { "email": { "type": "string" } } } } ], "responses": { "200": { "description": "ok" }, "401": { "description": "unauthorized" }, "404": { "description": "not found" }, "500": { "description": "internal server error" } } } }, "/identity": { "post": { "security": [ { "key": [] } ], "tags": [ "admin" ], "operationId": "createIdentity", "parameters": [ { "name": "body", "in": "body", "schema": { "properties": { "name": { "type": "string" } } } } ], "responses": { "201": { "description": "created", "schema": { "properties": { "cfg": { "type": "string" }, "identity": { "type": "string" } } } }, "401": { "description": "unauthorized" }, "500": { "description": "internal server error" } } } }, "/invite": { "post": { "tags": [ "account" ], "operationId": "invite", "parameters": [ { "name": "body", "in": "body", "schema": { "$ref": "#/definitions/inviteRequest" } } ], "responses": { "201": { "description": "invitation created" }, "400": { "description": "invitation not created (already exists)", "schema": { "$ref": "#/definitions/errorMessage" } }, "401": { "description": "unauthorized" }, "500": { "description": "internal server error" } } } }, "/invite/token/generate": { "post": { "security": [ { "key": [] } ], "tags": [ "admin" ], "operationId": "inviteTokenGenerate", "parameters": [ { "name": "body", "in": "body", "schema": { "$ref": "#/definitions/inviteTokenGenerateRequest" } } ], "responses": { "201": { "description": "invitation tokens created" }, "400": { "description": "invitation tokens not created" }, "401": { "description": "unauthorized" }, "500": { "description": "internal server error" } } } }, "/login": { "post": { "tags": [ "account" ], "operationId": "login", "parameters": [ { "name": "body", "in": "body", "schema": { "$ref": "#/definitions/loginRequest" } } ], "responses": { "200": { "description": "login successful", "schema": { "$ref": "#/definitions/loginResponse" } }, "401": { "description": "invalid login" } } } }, "/metrics/account": { "get": { "security": [ { "key": [] } ], "tags": [ "metadata" ], "operationId": "getAccountMetrics", "parameters": [ { "type": "string", "name": "duration", "in": "query" } ], "responses": { "200": { "description": "account metrics", "schema": { "$ref": "#/definitions/metrics" } }, "400": { "description": "bad request" }, "500": { "description": "internal server error" } } } }, "/metrics/environment/{envId}": { "get": { "security": [ { "key": [] } ], "tags": [ "metadata" ], "operationId": "getEnvironmentMetrics", "parameters": [ { "type": "string", "name": "envId", "in": "path", "required": true }, { "type": "string", "name": "duration", "in": "query" } ], "responses": { "200": { "description": "environment metrics", "schema": { "$ref": "#/definitions/metrics" } }, "400": { "description": "bad request" }, "401": { "description": "unauthorized" }, "500": { "description": "internal server error" } } } }, "/metrics/share/{shrToken}": { "get": { "security": [ { "key": [] } ], "tags": [ "metadata" ], "operationId": "getShareMetrics", "parameters": [ { "type": "string", "name": "shrToken", "in": "path", "required": true }, { "type": "string", "name": "duration", "in": "query" } ], "responses": { "200": { "description": "share metrics", "schema": { "$ref": "#/definitions/metrics" } }, "400": { "description": "bad request" }, "401": { "description": "unauthorized" }, "500": { "description": "internal server error" } } } }, "/overview": { "get": { "security": [ { "key": [] } ], "tags": [ "metadata" ], "operationId": "overview", "responses": { "200": { "description": "overview returned", "schema": { "$ref": "#/definitions/overview" } }, "500": { "description": "internal server error", "schema": { "$ref": "#/definitions/errorMessage" } } } } }, "/regenerateToken": { "post": { "security": [ { "key": [] } ], "tags": [ "account" ], "operationId": "regenerateToken", "parameters": [ { "name": "body", "in": "body", "schema": { "properties": { "emailAddress": { "type": "string" } } } } ], "responses": { "200": { "description": "regenerate account token", "schema": { "properties": { "token": { "type": "string" } } } }, "404": { "description": "account not found" }, "500": { "description": "internal server error" } } } }, "/register": { "post": { "tags": [ "account" ], "operationId": "register", "parameters": [ { "name": "body", "in": "body", "schema": { "$ref": "#/definitions/registerRequest" } } ], "responses": { "200": { "description": "account created", "schema": { "$ref": "#/definitions/registerResponse" } }, "404": { "description": "request not found" }, "422": { "description": "password validation failure", "schema": { "$ref": "#/definitions/errorMessage" } }, "500": { "description": "internal server error" } } } }, "/resetPassword": { "post": { "tags": [ "account" ], "operationId": "resetPassword", "parameters": [ { "name": "body", "in": "body", "schema": { "$ref": "#/definitions/resetPasswordRequest" } } ], "responses": { "200": { "description": "password reset" }, "404": { "description": "request not found" }, "422": { "description": "password validation failure", "schema": { "$ref": "#/definitions/errorMessage" } }, "500": { "description": "internal server error" } } } }, "/resetPasswordRequest": { "post": { "tags": [ "account" ], "operationId": "resetPasswordRequest", "parameters": [ { "name": "body", "in": "body", "schema": { "properties": { "emailAddress": { "type": "string" } } } } ], "responses": { "201": { "description": "forgot password request created" }, "400": { "description": "forgot password request not created" }, "500": { "description": "internal server error" } } } }, "/share": { "post": { "security": [ { "key": [] } ], "tags": [ "share" ], "operationId": "share", "parameters": [ { "name": "body", "in": "body", "schema": { "$ref": "#/definitions/shareRequest" } } ], "responses": { "201": { "description": "share created", "schema": { "$ref": "#/definitions/shareResponse" } }, "401": { "description": "unauthorized" }, "404": { "description": "not found" }, "409": { "description": "conflict" }, "422": { "description": "unprocessable" }, "500": { "description": "internal server error", "schema": { "$ref": "#/definitions/errorMessage" } } } }, "patch": { "security": [ { "key": [] } ], "tags": [ "share" ], "operationId": "updateShare", "parameters": [ { "name": "body", "in": "body", "schema": { "$ref": "#/definitions/updateShareRequest" } } ], "responses": { "200": { "description": "share updated" }, "400": { "description": "bad request" }, "401": { "description": "unauthorized" }, "404": { "description": "not found" }, "500": { "description": "internal server error" } } } }, "/unaccess": { "delete": { "security": [ { "key": [] } ], "tags": [ "share" ], "operationId": "unaccess", "parameters": [ { "name": "body", "in": "body", "schema": { "$ref": "#/definitions/unaccessRequest" } } ], "responses": { "200": { "description": "access removed" }, "401": { "description": "unauthorized" }, "404": { "description": "not found" }, "500": { "description": "internal server error" } } } }, "/unshare": { "delete": { "security": [ { "key": [] } ], "tags": [ "share" ], "operationId": "unshare", "parameters": [ { "name": "body", "in": "body", "schema": { "$ref": "#/definitions/unshareRequest" } } ], "responses": { "200": { "description": "share removed" }, "401": { "description": "unauthorized" }, "404": { "description": "not found" }, "500": { "description": "internal server error", "schema": { "$ref": "#/definitions/errorMessage" } } } } }, "/verify": { "post": { "tags": [ "account" ], "operationId": "verify", "parameters": [ { "name": "body", "in": "body", "schema": { "$ref": "#/definitions/verifyRequest" } } ], "responses": { "200": { "description": "token ready", "schema": { "$ref": "#/definitions/verifyResponse" } }, "404": { "description": "token not found" }, "500": { "description": "internal server error" } } } }, "/version": { "get": { "tags": [ "metadata" ], "operationId": "version", "responses": { "200": { "description": "current server version", "schema": { "$ref": "#/definitions/version" } } } } } }, "definitions": { "accessRequest": { "type": "object", "properties": { "envZId": { "type": "string" }, "shrToken": { "type": "string" } } }, "accessResponse": { "type": "object", "properties": { "backendMode": { "type": "string" }, "frontendToken": { "type": "string" } } }, "authUser": { "type": "object", "properties": { "password": { "type": "string" }, "username": { "type": "string" } } }, "changePasswordRequest": { "type": "object", "properties": { "email": { "type": "string" }, "newPassword": { "type": "string" }, "oldPassword": { "type": "string" } } }, "configuration": { "type": "object", "properties": { "inviteTokenContact": { "type": "string" }, "invitesOpen": { "type": "boolean" }, "passwordRequirements": { "$ref": "#/definitions/passwordRequirements" }, "requiresInviteToken": { "type": "boolean" }, "touLink": { "type": "string" }, "version": { "type": "string" } } }, "createFrontendRequest": { "type": "object", "properties": { "permissionMode": { "type": "string", "enum": [ "open", "closed" ] }, "public_name": { "type": "string" }, "url_template": { "type": "string" }, "zId": { "type": "string" } } }, "createFrontendResponse": { "type": "object", "properties": { "token": { "type": "string" } } }, "deleteFrontendRequest": { "type": "object", "properties": { "frontendToken": { "type": "string" } } }, "disableRequest": { "type": "object", "properties": { "identity": { "type": "string" } } }, "enableRequest": { "type": "object", "properties": { "description": { "type": "string" }, "host": { "type": "string" } } }, "enableResponse": { "type": "object", "properties": { "cfg": { "type": "string" }, "identity": { "type": "string" } } }, "environment": { "type": "object", "properties": { "activity": { "$ref": "#/definitions/sparkData" }, "address": { "type": "string" }, "createdAt": { "type": "integer" }, "description": { "type": "string" }, "host": { "type": "string" }, "limited": { "type": "boolean" }, "updatedAt": { "type": "integer" }, "zId": { "type": "string" } } }, "environmentAndResources": { "type": "object", "properties": { "environment": { "$ref": "#/definitions/environment" }, "frontends": { "$ref": "#/definitions/frontends" }, "shares": { "$ref": "#/definitions/shares" } } }, "environments": { "type": "array", "items": { "$ref": "#/definitions/environment" } }, "errorMessage": { "type": "string" }, "frontend": { "type": "object", "properties": { "createdAt": { "type": "integer" }, "id": { "type": "integer" }, "shrToken": { "type": "string" }, "token": { "type": "string" }, "updatedAt": { "type": "integer" }, "zId": { "type": "string" } } }, "frontends": { "type": "array", "items": { "$ref": "#/definitions/frontend" } }, "inviteRequest": { "type": "object", "properties": { "email": { "type": "string" }, "token": { "type": "string" } } }, "inviteTokenGenerateRequest": { "type": "object", "properties": { "tokens": { "type": "array", "items": { "type": "string" } } } }, "loginRequest": { "type": "object", "properties": { "email": { "type": "string" }, "password": { "type": "string" } } }, "loginResponse": { "type": "string" }, "metrics": { "type": "object", "properties": { "id": { "type": "string" }, "period": { "type": "number" }, "samples": { "type": "array", "items": { "$ref": "#/definitions/metricsSample" } }, "scope": { "type": "string" } } }, "metricsSample": { "type": "object", "properties": { "rx": { "type": "number" }, "timestamp": { "type": "number" }, "tx": { "type": "number" } } }, "overview": { "type": "object", "properties": { "accountLimited": { "type": "boolean" }, "environments": { "type": "array", "items": { "$ref": "#/definitions/environmentAndResources" } } } }, "passwordRequirements": { "type": "object", "properties": { "length": { "type": "integer" }, "requireCapital": { "type": "boolean" }, "requireNumeric": { "type": "boolean" }, "requireSpecial": { "type": "boolean" }, "validSpecialCharacters": { "type": "string" } } }, "principal": { "type": "object", "properties": { "admin": { "type": "boolean" }, "email": { "type": "string" }, "id": { "type": "integer" }, "limitless": { "type": "boolean" }, "token": { "type": "string" } } }, "publicFrontend": { "type": "object", "properties": { "createdAt": { "type": "integer" }, "publicName": { "type": "string" }, "token": { "type": "string" }, "updatedAt": { "type": "integer" }, "urlTemplate": { "type": "string" }, "zId": { "type": "string" } } }, "publicFrontendList": { "type": "array", "items": { "$ref": "#/definitions/publicFrontend" } }, "registerRequest": { "type": "object", "properties": { "password": { "type": "string" }, "token": { "type": "string" } } }, "registerResponse": { "type": "object", "properties": { "token": { "type": "string" } } }, "resetPasswordRequest": { "type": "object", "properties": { "password": { "type": "string" }, "token": { "type": "string" } } }, "share": { "type": "object", "properties": { "activity": { "$ref": "#/definitions/sparkData" }, "backendMode": { "type": "string" }, "backendProxyEndpoint": { "type": "string" }, "createdAt": { "type": "integer" }, "frontendEndpoint": { "type": "string" }, "frontendSelection": { "type": "string" }, "limited": { "type": "boolean" }, "reserved": { "type": "boolean" }, "shareMode": { "type": "string" }, "token": { "type": "string" }, "updatedAt": { "type": "integer" }, "zId": { "type": "string" } } }, "shareRequest": { "type": "object", "properties": { "accessGrants": { "type": "array", "items": { "type": "string" } }, "authScheme": { "type": "string" }, "authUsers": { "type": "array", "items": { "$ref": "#/definitions/authUser" } }, "backendMode": { "type": "string", "enum": [ "proxy", "web", "tcpTunnel", "udpTunnel", "caddy", "drive", "socks", "vpn" ] }, "backendProxyEndpoint": { "type": "string" }, "envZId": { "type": "string" }, "frontendSelection": { "type": "array", "items": { "type": "string" } }, "oauthAuthorizationCheckInterval": { "type": "string" }, "oauthEmailDomains": { "type": "array", "items": { "type": "string" } }, "oauthProvider": { "type": "string", "enum": [ "github", "google" ] }, "permissionMode": { "type": "string", "enum": [ "open", "closed" ] }, "reserved": { "type": "boolean" }, "shareMode": { "type": "string", "enum": [ "public", "private" ] }, "uniqueName": { "type": "string" } } }, "shareResponse": { "type": "object", "properties": { "frontendProxyEndpoints": { "type": "array", "items": { "type": "string" } }, "shrToken": { "type": "string" } } }, "shares": { "type": "array", "items": { "$ref": "#/definitions/share" } }, "sparkData": { "type": "array", "items": { "$ref": "#/definitions/sparkDataSample" } }, "sparkDataSample": { "type": "object", "properties": { "rx": { "type": "number" }, "tx": { "type": "number" } } }, "unaccessRequest": { "type": "object", "properties": { "envZId": { "type": "string" }, "frontendToken": { "type": "string" }, "shrToken": { "type": "string" } } }, "unshareRequest": { "type": "object", "properties": { "envZId": { "type": "string" }, "reserved": { "type": "boolean" }, "shrToken": { "type": "string" } } }, "updateFrontendRequest": { "type": "object", "properties": { "frontendToken": { "type": "string" }, "publicName": { "type": "string" }, "urlTemplate": { "type": "string" } } }, "updateShareRequest": { "type": "object", "properties": { "addAccessGrants": { "type": "array", "items": { "type": "string" } }, "backendProxyEndpoint": { "type": "string" }, "removeAccessGrants": { "type": "array", "items": { "type": "string" } }, "shrToken": { "type": "string" } } }, "verifyRequest": { "type": "object", "properties": { "token": { "type": "string" } } }, "verifyResponse": { "type": "object", "properties": { "email": { "type": "string" } } }, "version": { "type": "string" } }, "securityDefinitions": { "key": { "type": "apiKey", "name": "x-token", "in": "header" } } }`)) }