{ "swagger": "2.0", "info": { "description": "Infinite OS API", "title": "OsApi", "termsOfService": "https://goinfinite.net/tos/", "contact": { "name": "Infinite Engineering", "url": "https://goinfinite.net/", "email": "eng+swagger@goinfinite.net" }, "license": { "name": "Eclipse Public License v2.0", "url": "https://www.eclipse.org/legal/epl-2.0/" }, "version": "0.3.2" }, "host": "localhost:1618", "basePath": "/api", "paths": { "/v1/account/": { "get": { "security": [ { "Bearer": [] } ], "description": "List accounts.", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "account" ], "summary": "ReadAccounts", "parameters": [ { "type": "string", "description": "Id", "name": "id", "in": "query" }, { "type": "string", "description": "Username", "name": "username", "in": "query" }, { "type": "boolean", "description": "ShouldIncludeSecureAccessPublicKeys (only works if OpenSSH service is installed)", "name": "shouldIncludeSecureAccessPublicKeys", "in": "query" }, { "type": "integer", "description": "PageNumber (Pagination)", "name": "pageNumber", "in": "query" }, { "type": "integer", "description": "ItemsPerPage (Pagination)", "name": "itemsPerPage", "in": "query" }, { "type": "string", "description": "SortBy (Pagination)", "name": "sortBy", "in": "query" }, { "type": "string", "description": "SortDirection (Pagination)", "name": "sortDirection", "in": "query" }, { "type": "string", "description": "LastSeenId (Pagination)", "name": "lastSeenId", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/dto.ReadAccountsResponse" } } } }, "put": { "security": [ { "Bearer": [] } ], "description": "Update an account.", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "account" ], "summary": "UpdateAccount", "parameters": [ { "description": "Only id or username is required.", "name": "updateDto", "in": "body", "required": true, "schema": { "$ref": "#/definitions/dto.UpdateAccount" } } ], "responses": { "200": { "description": "'AccountUpdated' message or new API key in string format", "schema": { "type": "object" } } } }, "post": { "security": [ { "Bearer": [] } ], "description": "Create a new account.", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "account" ], "summary": "CreateAccount", "parameters": [ { "description": "All props are required.", "name": "createAccountDto", "in": "body", "required": true, "schema": { "$ref": "#/definitions/dto.CreateAccount" } } ], "responses": { "201": { "description": "AccountCreated", "schema": { "type": "object" } } } } }, "/v1/account/secure-access-public-key/": { "post": { "security": [ { "Bearer": [] } ], "description": "Create a new secure access public key.", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "account" ], "summary": "CreateSecureAccessPublicKey", "parameters": [ { "description": "'name' is optional. Will only become required if there is no name in 'content'. If the 'name' is provided, it will overwrite the name in the 'content'.", "name": "createSecureAccessPublicKey", "in": "body", "required": true, "schema": { "$ref": "#/definitions/dto.CreateSecureAccessPublicKey" } } ], "responses": { "201": { "description": "SecureAccessPublicKeyCreated", "schema": { "type": "object" } } } } }, "/v1/account/secure-access-public-key/{secureAccessPublicKeyId}/": { "delete": { "security": [ { "Bearer": [] } ], "description": "Delete a secure access public key.", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "account" ], "summary": "DeleteSecureAccessPublicKey", "parameters": [ { "type": "string", "description": "SecureAccessPublicKeyId to delete.", "name": "secureAccessPublicKeyId", "in": "path", "required": true } ], "responses": { "200": { "description": "SecureAccessPublicKeyDeleted", "schema": { "type": "object" } } } } }, "/v1/account/{accountId}/": { "delete": { "security": [ { "Bearer": [] } ], "description": "Delete an account.", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "account" ], "summary": "DeleteAccount", "parameters": [ { "type": "string", "description": "AccountId to delete.", "name": "accountId", "in": "path", "required": true } ], "responses": { "200": { "description": "AccountDeleted", "schema": { "type": "object" } } } } }, "/v1/auth/login/": { "post": { "description": "Create a new session token with the provided credentials.", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "auth" ], "summary": "CreateSessionTokenWithCredentials", "parameters": [ { "description": "CreateSessionToken", "name": "createSessionToken", "in": "body", "required": true, "schema": { "$ref": "#/definitions/dto.CreateSessionToken" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/entity.AccessToken" } }, "401": { "description": "Unauthorized", "schema": { "type": "string" } } } } }, "/v1/cron/": { "get": { "security": [ { "Bearer": [] } ], "description": "List crons.", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "cron" ], "summary": "ReadCrons", "parameters": [ { "type": "integer", "description": "Id", "name": "id", "in": "query" }, { "type": "string", "description": "Comment", "name": "comment", "in": "query" }, { "type": "integer", "description": "PageNumber (Pagination)", "name": "pageNumber", "in": "query" }, { "type": "integer", "description": "ItemsPerPage (Pagination)", "name": "itemsPerPage", "in": "query" }, { "type": "string", "description": "SortBy (Pagination)", "name": "sortBy", "in": "query" }, { "type": "string", "description": "SortDirection (Pagination)", "name": "sortDirection", "in": "query" }, { "type": "string", "description": "LastSeenId (Pagination)", "name": "lastSeenId", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/dto.ReadCronsResponse" } } } }, "put": { "security": [ { "Bearer": [] } ], "description": "Update a cron.", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "cron" ], "summary": "UpdateCron", "parameters": [ { "description": "Only id is required.", "name": "updateCronDto", "in": "body", "required": true, "schema": { "$ref": "#/definitions/dto.UpdateCron" } } ], "responses": { "200": { "description": "CronUpdated message", "schema": { "type": "object" } } } }, "post": { "security": [ { "Bearer": [] } ], "description": "Create a new cron.", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "cron" ], "summary": "CreateCron", "parameters": [ { "description": "comment is optional.", "name": "createCronDto", "in": "body", "required": true, "schema": { "$ref": "#/definitions/dto.CreateCron" } } ], "responses": { "201": { "description": "CronCreated", "schema": { "type": "object" } } } } }, "/v1/cron/{cronId}/": { "delete": { "security": [ { "Bearer": [] } ], "description": "Delete a cron.", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "cron" ], "summary": "DeleteCron", "parameters": [ { "type": "string", "description": "CronId to delete.", "name": "cronId", "in": "path", "required": true } ], "responses": { "200": { "description": "CronDeleted", "schema": { "type": "object" } } } } }, "/v1/database/{dbType}/": { "get": { "security": [ { "Bearer": [] } ], "description": "List databases names, users and sizes.", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "database" ], "summary": "ReadDatabases", "parameters": [ { "type": "string", "description": "DatabaseType (like mysql, postgres)", "name": "dbType", "in": "path", "required": true }, { "type": "string", "description": "DatabaseName", "name": "name", "in": "query" }, { "type": "string", "description": "DatabaseUsername", "name": "username", "in": "query" }, { "type": "integer", "description": "PageNumber (Pagination)", "name": "pageNumber", "in": "query" }, { "type": "integer", "description": "ItemsPerPage (Pagination)", "name": "itemsPerPage", "in": "query" }, { "type": "string", "description": "SortBy (Pagination)", "name": "sortBy", "in": "query" }, { "type": "string", "description": "SortDirection (Pagination)", "name": "sortDirection", "in": "query" }, { "type": "string", "description": "LastSeenId (Pagination)", "name": "lastSeenId", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/dto.ReadDatabasesResponse" } } } }, "post": { "security": [ { "Bearer": [] } ], "description": "Create a new database.", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "database" ], "summary": "CreateDatabase", "parameters": [ { "type": "string", "description": "DatabaseType (like mysql, postgres)", "name": "dbType", "in": "path", "required": true }, { "description": "All props are required.", "name": "createDatabaseDto", "in": "body", "required": true, "schema": { "$ref": "#/definitions/dto.CreateDatabase" } } ], "responses": { "201": { "description": "DatabaseCreated", "schema": { "type": "object" } } } } }, "/v1/database/{dbType}/{dbName}/": { "delete": { "security": [ { "Bearer": [] } ], "description": "Delete a database.", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "database" ], "summary": "DeleteDatabase", "parameters": [ { "type": "string", "description": "DatabaseType (like mysql, postgres)", "name": "dbType", "in": "path", "required": true }, { "type": "string", "description": "DatabaseName", "name": "dbName", "in": "path", "required": true } ], "responses": { "200": { "description": "DatabaseDeleted", "schema": { "type": "object" } } } } }, "/v1/database/{dbType}/{dbName}/user/": { "post": { "security": [ { "Bearer": [] } ], "description": "Create a new database user.", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "database" ], "summary": "CreateDatabaseUser", "parameters": [ { "type": "string", "description": "DatabaseType (like mysql, postgres)", "name": "dbType", "in": "path", "required": true }, { "type": "string", "description": "DatabaseName", "name": "dbName", "in": "path", "required": true }, { "description": "privileges is optional. When not provided, privileges will be 'ALL'.", "name": "createDatabaseUserDto", "in": "body", "required": true, "schema": { "$ref": "#/definitions/dto.CreateDatabaseUser" } } ], "responses": { "201": { "description": "DatabaseUserCreated", "schema": { "type": "object" } } } } }, "/v1/database/{dbType}/{dbName}/user/{dbUser}/": { "delete": { "security": [ { "Bearer": [] } ], "description": "Delete a database user.", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "database" ], "summary": "DeleteDatabaseUser", "parameters": [ { "type": "string", "description": "DatabaseType (like mysql, postgres)", "name": "dbType", "in": "path", "required": true }, { "type": "string", "description": "DatabaseName", "name": "dbName", "in": "path", "required": true }, { "type": "string", "description": "DatabaseUsername to delete.", "name": "dbUser", "in": "path", "required": true } ], "responses": { "200": { "description": "DatabaseUserDeleted", "schema": { "type": "object" } } } } }, "/v1/files/": { "get": { "security": [ { "Bearer": [] } ], "description": "List dir/files.", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "files" ], "summary": "ReadFiles", "parameters": [ { "type": "string", "description": "SourcePath", "name": "sourcePath", "in": "query", "required": true }, { "type": "boolean", "description": "ShouldIncludeFileTree", "name": "shouldIncludeFileTree", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "type": "array", "items": { "$ref": "#/definitions/dto.ReadFilesResponse" } } } } }, "put": { "security": [ { "Bearer": [] } ], "description": "Move a dir/file, update name and/or permissions (Only sourcePath is required).", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "files" ], "summary": "UpdateFile", "parameters": [ { "description": "Only sourcePaths are required.", "name": "updateUnixFilesDto", "in": "body", "required": true, "schema": { "$ref": "#/definitions/dto.UpdateUnixFiles" } } ], "responses": { "200": { "description": "FileUpdated", "schema": { "type": "object" } }, "207": { "description": "FilesArePartialUpdated", "schema": { "type": "object" } } } }, "post": { "security": [ { "Bearer": [] } ], "description": "Create a new dir/file.", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "files" ], "summary": "CreateNewFile", "parameters": [ { "description": "permissions is optional. When not provided, permissions will be '644' for files and '755' for directories.", "name": "createFileDto", "in": "body", "required": true, "schema": { "$ref": "#/definitions/dto.CreateUnixFile" } } ], "responses": { "201": { "description": "FileCreated/DirectoryCreated", "schema": { "type": "object" } } } } }, "/v1/files/compress/": { "post": { "security": [ { "Bearer": [] } ], "description": "Compress directories and files.", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "files" ], "summary": "CompressFiles", "parameters": [ { "description": "All props are required.", "name": "compressFilesDto", "in": "body", "required": true, "schema": { "$ref": "#/definitions/dto.CompressUnixFiles" } } ], "responses": { "200": { "description": "FilesCompressed", "schema": { "type": "object" } }, "207": { "description": "FilesArePartialCompressed", "schema": { "type": "object" } } } } }, "/v1/files/copy/": { "post": { "security": [ { "Bearer": [] } ], "description": "Copy a dir/file.", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "files" ], "summary": "CopyFile", "parameters": [ { "description": "All props are required.", "name": "copyFileDto", "in": "body", "required": true, "schema": { "$ref": "#/definitions/dto.CopyUnixFile" } } ], "responses": { "201": { "description": "FileCopied", "schema": { "type": "object" } } } } }, "/v1/files/delete/": { "put": { "security": [ { "Bearer": [] } ], "description": "Delete one or more directories/files.", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "files" ], "summary": "DeleteFiles", "parameters": [ { "description": "FilePaths to deleted.", "name": "sourcePaths", "in": "body", "required": true, "schema": { "type": "array", "items": { "type": "string" } } } ], "responses": { "200": { "description": "FilesDeleted", "schema": { "type": "object" } } } } }, "/v1/files/download/": { "get": { "security": [ { "Bearer": [] } ], "description": "Download a file.", "consumes": [ "application/json" ], "produces": [ "application/octet-stream" ], "tags": [ "files" ], "summary": "DownloadFile", "parameters": [ { "type": "string", "description": "SourcePath", "name": "sourcePath", "in": "query", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "type": "file" } } } } }, "/v1/files/extract/": { "put": { "security": [ { "Bearer": [] } ], "description": "Extract directories and files.", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "files" ], "summary": "ExtractFiles", "parameters": [ { "description": "All props are required.", "name": "extractFilesDto", "in": "body", "required": true, "schema": { "$ref": "#/definitions/dto.ExtractUnixFiles" } } ], "responses": { "200": { "description": "FilesExtracted", "schema": { "type": "object" } } } } }, "/v1/files/upload/": { "post": { "security": [ { "Bearer": [] } ], "description": "Upload files.", "consumes": [ "multipart/form-data" ], "produces": [ "application/json" ], "tags": [ "files" ], "summary": "UploadFiles", "parameters": [ { "type": "string", "description": "DestinationPath", "name": "destinationPath", "in": "formData", "required": true }, { "type": "file", "description": "FileToUpload", "name": "file", "in": "formData", "required": true } ], "responses": { "200": { "description": "FilesUploaded", "schema": { "type": "object" } }, "207": { "description": "FilesPartialUploaded", "schema": { "type": "object" } } } } }, "/v1/marketplace/catalog/": { "get": { "security": [ { "Bearer": [] } ], "description": "List marketplace catalog items.", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "marketplace" ], "summary": "ReadCatalog", "parameters": [ { "type": "integer", "description": "Id", "name": "id", "in": "query" }, { "type": "string", "description": "Slug", "name": "slug", "in": "query" }, { "type": "string", "description": "Name", "name": "name", "in": "query" }, { "type": "string", "description": "Type", "name": "type", "in": "query" }, { "type": "integer", "description": "PageNumber (Pagination)", "name": "pageNumber", "in": "query" }, { "type": "integer", "description": "ItemsPerPage (Pagination)", "name": "itemsPerPage", "in": "query" }, { "type": "string", "description": "SortBy (Pagination)", "name": "sortBy", "in": "query" }, { "type": "string", "description": "SortDirection (Pagination)", "name": "sortDirection", "in": "query" }, { "type": "string", "description": "LastSeenId (Pagination)", "name": "lastSeenId", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/dto.ReadMarketplaceCatalogItemsResponse" } } } }, "post": { "description": "Install a marketplace catalog item.", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "marketplace" ], "summary": "InstallCatalogItem", "parameters": [ { "description": "urlPath is both the install directory and HTTP sub-directory.", "name": "InstallMarketplaceCatalogItem", "in": "body", "required": true, "schema": { "$ref": "#/definitions/dto.InstallMarketplaceCatalogItem" } } ], "responses": { "201": { "description": "MarketplaceCatalogItemInstallationScheduled", "schema": { "type": "object" } } } } }, "/v1/marketplace/installed/": { "get": { "security": [ { "Bearer": [] } ], "description": "List marketplace installed items.", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "marketplace" ], "summary": "ReadInstalledItems", "parameters": [ { "type": "integer", "description": "Id", "name": "id", "in": "query" }, { "type": "string", "description": "Hostname", "name": "hostname", "in": "query" }, { "type": "string", "description": "Type", "name": "type", "in": "query" }, { "type": "string", "description": "InstallUuid", "name": "installationUuid", "in": "query" }, { "type": "integer", "description": "PageNumber (Pagination)", "name": "pageNumber", "in": "query" }, { "type": "integer", "description": "ItemsPerPage (Pagination)", "name": "itemsPerPage", "in": "query" }, { "type": "string", "description": "SortBy (Pagination)", "name": "sortBy", "in": "query" }, { "type": "string", "description": "SortDirection (Pagination)", "name": "sortDirection", "in": "query" }, { "type": "string", "description": "LastSeenId (Pagination)", "name": "lastSeenId", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/dto.ReadMarketplaceInstalledItemsResponse" } } } } }, "/v1/marketplace/installed/{installedId}/": { "delete": { "security": [ { "Bearer": [] } ], "description": "Delete/Uninstall an installed item.", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "marketplace" ], "summary": "DeleteInstalledItem", "parameters": [ { "type": "integer", "description": "MarketplaceInstalledItemId to delete.", "name": "installedId", "in": "path", "required": true }, { "type": "boolean", "description": "Should uninstall all services not being used? Default is 'true'.", "name": "shouldUninstallServices", "in": "query" } ], "responses": { "200": { "description": "MarketplaceInstalledItemDeleted", "schema": { "type": "object" } } } } }, "/v1/o11y/overview/": { "get": { "security": [ { "Bearer": [] } ], "description": "Show system information and resource usage.", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "o11y" ], "summary": "O11yOverview", "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/entity.O11yOverview" } } } } }, "/v1/runtime/php/run/": { "post": { "security": [ { "Bearer": [] } ], "description": "Run a php command as the webserver user for a given hostname. \u003cbr /\u003eCAUTION: This endpoint allows for arbitrary code execution (ACE) and is therefore disabled by default. \u003cbr /\u003eTo enable this endpoint, set the \"ENABLE_API_RUNTIME_PHP_RUN_CMD\" environment variable to \"true\" when starting the API/container.\u003cbr /\u003eOnly super admin accounts can use this endpoint.", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "runtime" ], "summary": "RunPhpCommand", "parameters": [ { "description": "Hostname and command are required. Timeout is optional.", "name": "runPhpCmdDto", "in": "body", "required": true, "schema": { "$ref": "#/definitions/dto.RunPhpCommandRequest" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/dto.RunPhpCommandResponse" } } } } }, "/v1/runtime/php/{hostname}/": { "get": { "security": [ { "Bearer": [] } ], "description": "Get php version, modules and settings for a hostname.", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "runtime" ], "summary": "ReadPhpConfigs", "parameters": [ { "type": "string", "description": "Hostname", "name": "hostname", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/entity.PhpConfigs" } } } }, "put": { "security": [ { "Bearer": [] } ], "description": "Update php version, modules and settings for a hostname.", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "runtime" ], "summary": "UpdatePhpConfigs", "parameters": [ { "type": "string", "description": "Hostname", "name": "hostname", "in": "path", "required": true }, { "description": "modules and settings are optional.", "name": "updatePhpConfigsDto", "in": "body", "required": true, "schema": { "$ref": "#/definitions/dto.UpdatePhpConfigs" } } ], "responses": { "200": { "description": "PhpConfigsUpdated", "schema": { "type": "object" } } } } }, "/v1/scheduled-task/": { "get": { "security": [ { "Bearer": [] } ], "description": "List scheduled tasks.", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "scheduled-task" ], "summary": "ReadScheduledTasks", "parameters": [ { "type": "string", "description": "TaskId", "name": "taskId", "in": "query" }, { "type": "string", "description": "TaskName", "name": "taskName", "in": "query" }, { "type": "string", "description": "TaskStatus", "name": "taskStatus", "in": "query" }, { "type": "string", "description": "TaskTags (semicolon separated)", "name": "taskTags", "in": "query" }, { "type": "string", "description": "StartedBeforeAt", "name": "startedBeforeAt", "in": "query" }, { "type": "string", "description": "StartedAfterAt", "name": "startedAfterAt", "in": "query" }, { "type": "string", "description": "FinishedBeforeAt", "name": "finishedBeforeAt", "in": "query" }, { "type": "string", "description": "FinishedAfterAt", "name": "finishedAfterAt", "in": "query" }, { "type": "string", "description": "CreatedBeforeAt", "name": "createdBeforeAt", "in": "query" }, { "type": "string", "description": "CreatedAfterAt", "name": "createdAfterAt", "in": "query" }, { "type": "integer", "description": "PageNumber (Pagination)", "name": "pageNumber", "in": "query" }, { "type": "integer", "description": "ItemsPerPage (Pagination)", "name": "itemsPerPage", "in": "query" }, { "type": "string", "description": "SortBy (Pagination)", "name": "sortBy", "in": "query" }, { "type": "string", "description": "SortDirection (Pagination)", "name": "sortDirection", "in": "query" }, { "type": "string", "description": "LastSeenId (Pagination)", "name": "lastSeenId", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/dto.ReadScheduledTasksResponse" } } } }, "put": { "security": [ { "Bearer": [] } ], "description": "Reschedule a task or change its status.", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "scheduled-task" ], "summary": "UpdateScheduledTask", "parameters": [ { "description": "UpdateScheduledTask (Only id is required.)", "name": "updateScheduledTaskDto", "in": "body", "required": true, "schema": { "$ref": "#/definitions/dto.UpdateScheduledTask" } } ], "responses": { "200": { "description": "ScheduledTaskUpdated", "schema": { "type": "object" } } } } }, "/v1/services/": { "get": { "security": [ { "Bearer": [] } ], "description": "List installed services and their status.", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "services" ], "summary": "ReadInstalledItems", "parameters": [ { "type": "integer", "description": "Id", "name": "id", "in": "query" }, { "type": "string", "description": "Name", "name": "name", "in": "query" }, { "type": "string", "description": "Nature", "name": "nature", "in": "query" }, { "type": "string", "description": "Type", "name": "type", "in": "query" }, { "type": "integer", "description": "PageNumber (Pagination)", "name": "pageNumber", "in": "query" }, { "type": "integer", "description": "ItemsPerPage (Pagination)", "name": "itemsPerPage", "in": "query" }, { "type": "string", "description": "SortBy (Pagination)", "name": "sortBy", "in": "query" }, { "type": "string", "description": "SortDirection (Pagination)", "name": "sortDirection", "in": "query" }, { "type": "string", "description": "LastSeenId (Pagination)", "name": "lastSeenId", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/dto.ReadInstalledServicesItemsResponse" } } } }, "put": { "security": [ { "Bearer": [] } ], "description": "Update service details.", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "services" ], "summary": "UpdateService", "parameters": [ { "description": "Only name is required.\u003cbr /\u003eSolo services can only change status.\u003cbr /\u003estatus may be 'running', 'stopped', 'uninstalled' or 'restarting'.", "name": "updateServiceDto", "in": "body", "required": true, "schema": { "$ref": "#/definitions/dto.UpdateService" } } ], "responses": { "200": { "description": "ServiceUpdated", "schema": { "type": "object" } } } } }, "/v1/services/custom/": { "post": { "security": [ { "Bearer": [] } ], "description": "Install a new custom service.", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "services" ], "summary": "CreateCustomService", "parameters": [ { "description": "name, type and startCmd is required.\u003cbr /\u003eIf version is not provided, it will be 'lts'.\u003cbr /\u003eIf portBindings is not provided, it wil be default service port bindings.\u003cbr /\u003eIf autoCreateMapping is not provided, it will be 'true'.", "name": "createCustomServiceDto", "in": "body", "required": true, "schema": { "$ref": "#/definitions/dto.CreateCustomService" } } ], "responses": { "201": { "description": "CustomServiceCreated", "schema": { "type": "object" } } } } }, "/v1/services/installables/": { "get": { "security": [ { "Bearer": [] } ], "description": "List installable services.", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "services" ], "summary": "ReadInstallableItems", "parameters": [ { "type": "integer", "description": "Id", "name": "id", "in": "query" }, { "type": "string", "description": "Name", "name": "name", "in": "query" }, { "type": "string", "description": "Nature", "name": "nature", "in": "query" }, { "type": "string", "description": "Type", "name": "type", "in": "query" }, { "type": "integer", "description": "PageNumber (Pagination)", "name": "pageNumber", "in": "query" }, { "type": "integer", "description": "ItemsPerPage (Pagination)", "name": "itemsPerPage", "in": "query" }, { "type": "string", "description": "SortBy (Pagination)", "name": "sortBy", "in": "query" }, { "type": "string", "description": "SortDirection (Pagination)", "name": "sortDirection", "in": "query" }, { "type": "string", "description": "LastSeenId (Pagination)", "name": "lastSeenId", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/dto.ReadInstallableServicesItemsResponse" } } } }, "post": { "security": [ { "Bearer": [] } ], "description": "Install a new installable service.", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "services" ], "summary": "CreateInstallableService", "parameters": [ { "description": "Only name is required.\u003cbr /\u003eIf version is not provided, it will be 'lts'.\u003cbr /\u003eIf portBindings is not provided, it wil be default service port bindings.\u003cbr /\u003eIf autoCreateMapping is not provided, it will be 'true'.", "name": "createInstallableServiceDto", "in": "body", "required": true, "schema": { "$ref": "#/definitions/dto.CreateInstallableService" } } ], "responses": { "201": { "description": "InstallableServiceCreated", "schema": { "type": "object" } } } } }, "/v1/services/{svcName}/": { "delete": { "security": [ { "Bearer": [] } ], "description": "Delete/Uninstall a service.", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "services" ], "summary": "DeleteService", "parameters": [ { "type": "string", "description": "ServiceName to delete", "name": "svcName", "in": "path", "required": true } ], "responses": { "200": { "description": "ServiceDeleted", "schema": { "type": "object" } } } } }, "/v1/setup/": { "post": { "description": "Creates the first Infinite OS account without requiring authentication.\u003cbr /\u003eThis can only be used when the Infinite OS interface is accessed for the first time with no accounts created.", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "setup" ], "summary": "SetupInfiniteOs", "parameters": [ { "description": "CreateFirstAccount", "name": "createFirstAccount", "in": "body", "required": true, "schema": { "$ref": "#/definitions/dto.CreateAccount" } } ], "responses": { "201": { "description": "FirstAccountCreated", "schema": { "type": "object" } } } } }, "/v1/ssl/": { "get": { "security": [ { "Bearer": [] } ], "description": "List ssl pairs.", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "ssl" ], "summary": "ReadSslPairs", "parameters": [ { "type": "string", "description": "SslPairId", "name": "sslPairId", "in": "query" }, { "type": "string", "description": "VirtualHostHostname", "name": "virtualHostHostname", "in": "query" }, { "type": "string", "description": "AltNames", "name": "altNames", "in": "query" }, { "type": "string", "description": "IssuedBeforeAt", "name": "issuedBeforeAt", "in": "query" }, { "type": "string", "description": "IssuedAfterAt", "name": "issuedAfterAt", "in": "query" }, { "type": "string", "description": "ExpiresBeforeAt", "name": "expiresBeforeAt", "in": "query" }, { "type": "string", "description": "ExpiresAfterAt", "name": "expiresAfterAt", "in": "query" }, { "type": "integer", "description": "PageNumber (Pagination)", "name": "pageNumber", "in": "query" }, { "type": "integer", "description": "ItemsPerPage (Pagination)", "name": "itemsPerPage", "in": "query" }, { "type": "string", "description": "SortBy (Pagination)", "name": "sortBy", "in": "query" }, { "type": "string", "description": "SortDirection (Pagination)", "name": "sortDirection", "in": "query" }, { "type": "string", "description": "LastSeenId (Pagination)", "name": "lastSeenId", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/dto.ReadSslPairsResponse" } } } }, "post": { "security": [ { "Bearer": [] } ], "description": "Create a new ssl pair.", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "ssl" ], "summary": "CreateSslPair", "parameters": [ { "description": "All props are required.\u003cbr /\u003evirtualHosts may be string or []string. Alias is not allowed.\u003cbr /\u003ecertificate is a string field, i.e. ignore the structure shown.\u003cbr /\u003ecertificate and key must be base64 encoded.\u003cbr /\u003ecertificate should include the CA chain/bundle if not provided in the certificate field.", "name": "createSslPairDto", "in": "body", "required": true, "schema": { "$ref": "#/definitions/dto.CreateSslPair" } } ], "responses": { "201": { "description": "SslPairCreated", "schema": { "type": "object" } } } } }, "/v1/ssl/trusted/": { "post": { "security": [ { "Bearer": [] } ], "description": "Create a new publicly trusted ssl pair.", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "ssl" ], "summary": "CreatePubliclyTrusted", "parameters": [ { "description": "All props are required.", "name": "createPubliclyTrustedDto", "in": "body", "required": true, "schema": { "$ref": "#/definitions/dto.CreatePubliclyTrustedSslPair" } } ], "responses": { "201": { "description": "PubliclyTrustedSslPairCreationScheduled", "schema": { "type": "object" } } } } }, "/v1/ssl/{sslPairId}/": { "delete": { "security": [ { "Bearer": [] } ], "description": "Delete a ssl pair.", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "ssl" ], "summary": "DeleteSslPair", "parameters": [ { "type": "string", "description": "SslPairId to delete.", "name": "sslPairId", "in": "path", "required": true } ], "responses": { "200": { "description": "SslPairDeleted", "schema": { "type": "object" } } } } }, "/v1/vhost/": { "get": { "security": [ { "Bearer": [] } ], "description": "List virtual hosts.", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "vhosts" ], "summary": "ReadVirtualHosts", "parameters": [ { "type": "string", "description": "Hostname", "name": "hostname", "in": "query" }, { "type": "string", "description": "Type", "name": "type", "in": "query" }, { "type": "string", "description": "RootDirectory", "name": "rootDirectory", "in": "query" }, { "type": "string", "description": "ParentHostname", "name": "parentHostname", "in": "query" }, { "type": "boolean", "description": "WithMappings", "name": "withMappings", "in": "query" }, { "type": "string", "description": "CreatedBeforeAt", "name": "createdBeforeAt", "in": "query" }, { "type": "string", "description": "CreatedAfterAt", "name": "createdAfterAt", "in": "query" }, { "type": "integer", "description": "PageNumber (Pagination)", "name": "pageNumber", "in": "query" }, { "type": "integer", "description": "ItemsPerPage (Pagination)", "name": "itemsPerPage", "in": "query" }, { "type": "string", "description": "SortBy (Pagination)", "name": "sortBy", "in": "query" }, { "type": "string", "description": "SortDirection (Pagination)", "name": "sortDirection", "in": "query" }, { "type": "string", "description": "LastSeenId (Pagination)", "name": "lastSeenId", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/dto.ReadVirtualHostsResponse" } } } }, "put": { "security": [ { "Bearer": [] } ], "description": "Update a vhost.", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "vhosts" ], "summary": "UpdateVirtualHost", "parameters": [ { "description": "Only hostname is required.", "name": "updateVirtualHostDto", "in": "body", "required": true, "schema": { "$ref": "#/definitions/dto.UpdateVirtualHost" } } ], "responses": { "200": { "description": "VirtualHostUpdated", "schema": { "type": "object" } } } }, "post": { "security": [ { "Bearer": [] } ], "description": "Create a new vhost.", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "vhosts" ], "summary": "CreateVirtualHost", "parameters": [ { "description": "Only hostname is required.\u003cbr /\u003etype may be 'top-level', 'subdomain', 'wildcard' or 'alias'. If is not provided, it will be 'top-level'. If type is 'alias', 'parentHostname' will be required.", "name": "createVirtualHostDto", "in": "body", "required": true, "schema": { "$ref": "#/definitions/dto.CreateVirtualHost" } } ], "responses": { "201": { "description": "VirtualHostCreated", "schema": { "type": "object" } } } } }, "/v1/vhost/mapping/": { "get": { "security": [ { "Bearer": [] } ], "description": "List virtual hosts with mappings.", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "vhosts" ], "summary": "ReadVirtualHostsWithMappings", "parameters": [ { "type": "string", "description": "Hostname", "name": "hostname", "in": "query" }, { "type": "string", "description": "Type", "name": "type", "in": "query" }, { "type": "string", "description": "RootDirectory", "name": "rootDirectory", "in": "query" }, { "type": "string", "description": "ParentHostname", "name": "parentHostname", "in": "query" }, { "type": "boolean", "description": "WithMappings", "name": "withMappings", "in": "query" }, { "type": "integer", "description": "CreatedBeforeAt (Unix timestamp)", "name": "createdBeforeAt", "in": "query" }, { "type": "integer", "description": "CreatedAfterAt (Unix timestamp)", "name": "createdAfterAt", "in": "query" }, { "type": "integer", "description": "PageNumber (Pagination)", "name": "pageNumber", "in": "query" }, { "type": "integer", "description": "ItemsPerPage (Pagination)", "name": "itemsPerPage", "in": "query" }, { "type": "string", "description": "SortBy (Pagination)", "name": "sortBy", "in": "query" }, { "type": "string", "description": "SortDirection (Pagination)", "name": "sortDirection", "in": "query" }, { "type": "string", "description": "LastSeenId (Pagination)", "name": "lastSeenId", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/dto.VirtualHostWithMappings" } } } }, "put": { "security": [ { "Bearer": [] } ], "description": "Update a vhost mapping.", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "vhosts" ], "summary": "UpdateVirtualHostMapping", "parameters": [ { "description": "Only id is required. Other fields are optional and will only be updated if provided.", "name": "updateMappingDto", "in": "body", "required": true, "schema": { "$ref": "#/definitions/dto.UpdateMapping" } } ], "responses": { "200": { "description": "MappingUpdated", "schema": { "type": "object" } } } }, "post": { "security": [ { "Bearer": [] } ], "description": "Create a new vhost mapping.", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "vhosts" ], "summary": "CreateVirtualHostMapping", "parameters": [ { "description": "hostname, path and targetType are required.\u003cbr /\u003ematchPattern may be 'begins-with', 'contains', 'equals' or 'ends-with'. If is not provided, it will be 'begins-with'.\u003cbr /\u003etargetType may be 'url', 'service', 'response-code', 'inline-html' or 'static-files'. If targetType is 'url', targetHttpResponseCode may be provided. If is not provided, targetHttpResponseCode will be '200'. If targetType is 'response-code', targetHttpResponseCode may be provided. If is not provided, targetValue will be required. If both were provided, targetValue will have priority.\u003cbr /\u003etargetValue must have the same value as the targetType requires.", "name": "createMappingDto", "in": "body", "required": true, "schema": { "$ref": "#/definitions/dto.CreateMapping" } } ], "responses": { "201": { "description": "MappingCreated", "schema": { "type": "object" } } } } }, "/v1/vhost/mapping/security-rule/": { "get": { "security": [ { "Bearer": [] } ], "description": "List mapping security rules.", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "vhosts" ], "summary": "ReadMappingSecurityRules", "parameters": [ { "type": "string", "description": "MappingSecurityRuleId", "name": "id", "in": "query" }, { "type": "string", "description": "MappingSecurityRuleName", "name": "name", "in": "query" }, { "type": "string", "description": "AllowedIpAddress", "name": "allowedIp", "in": "query" }, { "type": "string", "description": "BlockedIpAddress", "name": "blockedIp", "in": "query" }, { "type": "integer", "description": "CreatedBeforeAt (Unix timestamp)", "name": "createdBeforeAt", "in": "query" }, { "type": "integer", "description": "CreatedAfterAt (Unix timestamp)", "name": "createdAfterAt", "in": "query" }, { "type": "integer", "description": "PageNumber (Pagination)", "name": "pageNumber", "in": "query" }, { "type": "integer", "description": "ItemsPerPage (Pagination)", "name": "itemsPerPage", "in": "query" }, { "type": "string", "description": "SortBy (Pagination)", "name": "sortBy", "in": "query" }, { "type": "string", "description": "SortDirection (Pagination)", "name": "sortDirection", "in": "query" }, { "type": "string", "description": "LastSeenId (Pagination)", "name": "lastSeenId", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/dto.ReadMappingSecurityRulesResponse" } } } }, "put": { "security": [ { "Bearer": [] } ], "description": "Update a mapping security rule.", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "vhosts" ], "summary": "UpdateMappingSecurityRule", "parameters": [ { "description": "Only id is required.", "name": "updateMappingSecurityRuleDto", "in": "body", "required": true, "schema": { "$ref": "#/definitions/dto.UpdateMappingSecurityRule" } } ], "responses": { "200": { "description": "MappingSecurityRuleUpdated", "schema": { "type": "object" } } } }, "post": { "security": [ { "Bearer": [] } ], "description": "Create a new mapping security rule.", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "vhosts" ], "summary": "CreateMappingSecurityRule", "parameters": [ { "description": "Only name is required.", "name": "createMappingSecurityRuleDto", "in": "body", "required": true, "schema": { "$ref": "#/definitions/dto.CreateMappingSecurityRule" } } ], "responses": { "201": { "description": "MappingSecurityRuleCreated", "schema": { "type": "object" } } } } }, "/v1/vhost/mapping/security-rule/{id}/": { "delete": { "security": [ { "Bearer": [] } ], "description": "Delete a mapping security rule.", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "vhosts" ], "summary": "DeleteMappingSecurityRule", "parameters": [ { "type": "integer", "description": "MappingSecurityRuleId to delete.", "name": "id", "in": "path", "required": true } ], "responses": { "200": { "description": "MappingSecurityRuleDeleted", "schema": { "type": "object" } } } } }, "/v1/vhost/mapping/{mappingId}/": { "delete": { "security": [ { "Bearer": [] } ], "description": "Delete a vhost mapping.", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "vhosts" ], "summary": "DeleteVirtualHostMapping", "parameters": [ { "type": "integer", "description": "MappingId to delete.", "name": "mappingId", "in": "path", "required": true } ], "responses": { "200": { "description": "MappingDeleted", "schema": { "type": "object" } } } } }, "/v1/vhost/{hostname}/": { "delete": { "security": [ { "Bearer": [] } ], "description": "Delete a vhost.", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "vhosts" ], "summary": "DeleteVirtualHost", "parameters": [ { "type": "string", "description": "Hostname to delete", "name": "hostname", "in": "path", "required": true } ], "responses": { "200": { "description": "VirtualHostDeleted", "schema": { "type": "object" } } } } } }, "definitions": { "dto.CompressUnixFiles": { "type": "object", "properties": { "compressionType": { "type": "string" }, "destinationPath": { "type": "string" }, "sourcePaths": { "type": "array", "items": { "type": "string" } } } }, "dto.CopyUnixFile": { "type": "object", "properties": { "destinationPath": { "type": "string" }, "shouldOverwrite": { "type": "boolean" }, "sourcePath": { "type": "string" } } }, "dto.CreateAccount": { "type": "object", "properties": { "isSuperAdmin": { "type": "boolean" }, "password": { "type": "string" }, "username": { "type": "string" } } }, "dto.CreateCron": { "type": "object", "properties": { "command": { "type": "string" }, "comment": { "type": "string" }, "schedule": { "type": "string" } } }, "dto.CreateCustomService": { "type": "object", "properties": { "autoCreateMapping": { "type": "boolean" }, "autoRestart": { "type": "boolean" }, "autoStart": { "type": "boolean" }, "avatarUrl": { "type": "string" }, "envs": { "type": "array", "items": { "type": "string" } }, "execUser": { "type": "string" }, "logErrorPath": { "type": "string" }, "logOutputPath": { "type": "string" }, "mappingHostname": { "type": "string" }, "mappingPath": { "type": "string" }, "mappingUpgradeInsecureRequests": { "type": "boolean" }, "maxStartRetries": { "type": "integer" }, "name": { "type": "string" }, "portBindings": { "type": "array", "items": { "$ref": "#/definitions/valueObject.PortBinding" } }, "postStartCmdSteps": { "type": "array", "items": { "type": "string" } }, "postStopCmdSteps": { "type": "array", "items": { "type": "string" } }, "preStartCmdSteps": { "type": "array", "items": { "type": "string" } }, "preStopCmdSteps": { "type": "array", "items": { "type": "string" } }, "startCmd": { "type": "string" }, "stopCmdSteps": { "type": "array", "items": { "type": "string" } }, "timeoutStartSecs": { "type": "integer" }, "type": { "$ref": "#/definitions/valueObject.ServiceType" }, "version": { "type": "string" }, "workingDirectory": { "type": "string" } } }, "dto.CreateDatabase": { "type": "object", "properties": { "dbName": { "type": "string" } } }, "dto.CreateDatabaseUser": { "type": "object", "properties": { "dbName": { "type": "string" }, "password": { "type": "string" }, "privileges": { "type": "array", "items": { "type": "string" } }, "username": { "type": "string" } } }, "dto.CreateInstallableService": { "type": "object", "properties": { "autoCreateMapping": { "type": "boolean" }, "autoRestart": { "type": "boolean" }, "autoStart": { "type": "boolean" }, "envs": { "type": "array", "items": { "type": "string" } }, "mappingHostname": { "type": "string" }, "mappingPath": { "type": "string" }, "mappingUpgradeInsecureRequests": { "type": "boolean" }, "maxStartRetries": { "type": "integer" }, "name": { "type": "string" }, "portBindings": { "type": "array", "items": { "$ref": "#/definitions/valueObject.PortBinding" } }, "startupFile": { "type": "string" }, "timeoutStartSecs": { "type": "integer" }, "version": { "type": "string" }, "workingDir": { "type": "string" } } }, "dto.CreateMapping": { "type": "object", "properties": { "hostname": { "type": "string" }, "mappingSecurityRuleId": { "type": "integer" }, "matchPattern": { "$ref": "#/definitions/valueObject.MappingMatchPattern" }, "path": { "type": "string" }, "shouldUpgradeInsecureRequests": { "type": "boolean" }, "targetHttpResponseCode": { "type": "integer" }, "targetType": { "$ref": "#/definitions/valueObject.MappingTargetType" }, "targetValue": { "type": "string" } } }, "dto.CreateMappingSecurityRule": { "type": "object", "properties": { "allowedIps": { "type": "array", "items": { "type": "string" } }, "bandwidthBpsLimitPerConnection": { "type": "integer" }, "bandwidthLimitOnlyAfterBytes": { "type": "integer" }, "blockedIps": { "type": "array", "items": { "type": "string" } }, "description": { "type": "string" }, "maxConnectionsPerIp": { "type": "integer" }, "name": { "type": "string" }, "responseCodeOnMaxConnections": { "type": "integer" }, "responseCodeOnMaxRequests": { "type": "integer" }, "rpsHardLimitPerIp": { "type": "integer" }, "rpsSoftLimitPerIp": { "type": "integer" } } }, "dto.CreatePubliclyTrustedSslPair": { "type": "object", "properties": { "virtualHostHostname": { "type": "string" } } }, "dto.CreateSecureAccessPublicKey": { "type": "object", "properties": { "accountId": { "type": "integer" }, "content": { "type": "string" }, "name": { "type": "string" } } }, "dto.CreateSessionToken": { "type": "object", "properties": { "password": { "type": "string" }, "username": { "type": "string" } } }, "dto.CreateSslPair": { "type": "object", "properties": { "certificate": { "$ref": "#/definitions/entity.SslCertificate" }, "chainCertificates": { "$ref": "#/definitions/entity.SslCertificate" }, "key": { "type": "string" }, "virtualHostsHostnames": { "type": "array", "items": { "type": "string" } } } }, "dto.CreateUnixFile": { "type": "object", "properties": { "filePath": { "type": "string" }, "mimeType": { "type": "string" }, "permissions": { "type": "string" } } }, "dto.CreateVirtualHost": { "type": "object", "properties": { "hostname": { "type": "string" }, "isWildcard": { "type": "boolean" }, "parentHostname": { "type": "string" }, "type": { "$ref": "#/definitions/valueObject.VirtualHostType" } } }, "dto.ExtractUnixFiles": { "type": "object", "properties": { "destinationPath": { "type": "string" }, "sourcePath": { "type": "string" } } }, "dto.InstallMarketplaceCatalogItem": { "type": "object", "properties": { "dataFields": { "type": "array", "items": { "$ref": "#/definitions/valueObject.MarketplaceInstallableItemDataField" } }, "hostname": { "type": "string" }, "id": { "type": "integer" }, "slug": { "type": "string" }, "urlPath": { "type": "string" } } }, "dto.InstalledServiceWithMetrics": { "type": "object", "properties": { "autoRestart": { "type": "boolean" }, "autoStart": { "type": "boolean" }, "avatarUrl": { "type": "string" }, "createdAt": { "type": "integer" }, "envs": { "type": "array", "items": { "type": "string" } }, "execUser": { "type": "string" }, "logErrorPath": { "type": "string" }, "logOutputPath": { "type": "string" }, "maxStartRetries": { "type": "integer" }, "metrics": { "$ref": "#/definitions/valueObject.ServiceMetrics" }, "name": { "type": "string" }, "nature": { "$ref": "#/definitions/valueObject.ServiceNature" }, "portBindings": { "type": "array", "items": { "$ref": "#/definitions/valueObject.PortBinding" } }, "startCmd": { "type": "string" }, "startupFile": { "type": "string" }, "status": { "type": "string" }, "timeoutStartSecs": { "type": "integer" }, "type": { "$ref": "#/definitions/valueObject.ServiceType" }, "updatedAt": { "type": "integer" }, "version": { "type": "string" }, "workingDirectory": { "type": "string" } } }, "dto.ReadAccountsResponse": { "type": "object", "properties": { "accounts": { "type": "array", "items": { "$ref": "#/definitions/entity.Account" } }, "pagination": { "$ref": "#/definitions/github_com_goinfinite_tk_src_domain_dto.Pagination" } } }, "dto.ReadCronsResponse": { "type": "object", "properties": { "crons": { "type": "array", "items": { "$ref": "#/definitions/entity.Cron" } }, "pagination": { "$ref": "#/definitions/github_com_goinfinite_tk_src_domain_dto.Pagination" } } }, "dto.ReadDatabasesResponse": { "type": "object", "properties": { "databases": { "type": "array", "items": { "$ref": "#/definitions/entity.Database" } }, "pagination": { "$ref": "#/definitions/github_com_goinfinite_tk_src_domain_dto.Pagination" } } }, "dto.ReadFilesResponse": { "type": "object", "properties": { "fileTree": { "$ref": "#/definitions/dto.UnixFileBranch" }, "files": { "type": "array", "items": { "$ref": "#/definitions/entity.UnixFile" } } } }, "dto.ReadInstallableServicesItemsResponse": { "type": "object", "properties": { "installableServices": { "type": "array", "items": { "$ref": "#/definitions/entity.InstallableService" } }, "pagination": { "$ref": "#/definitions/github_com_goinfinite_tk_src_domain_dto.Pagination" } } }, "dto.ReadInstalledServicesItemsResponse": { "type": "object", "properties": { "installedServices": { "type": "array", "items": { "$ref": "#/definitions/entity.InstalledService" } }, "installedServicesWithMetrics": { "type": "array", "items": { "$ref": "#/definitions/dto.InstalledServiceWithMetrics" } }, "pagination": { "$ref": "#/definitions/github_com_goinfinite_tk_src_domain_dto.Pagination" } } }, "dto.ReadMappingSecurityRulesResponse": { "type": "object", "properties": { "mappingSecurityRules": { "type": "array", "items": { "$ref": "#/definitions/entity.MappingSecurityRule" } }, "pagination": { "$ref": "#/definitions/github_com_goinfinite_tk_src_domain_dto.Pagination" } } }, "dto.ReadMarketplaceCatalogItemsResponse": { "type": "object", "properties": { "marketplaceCatalogItems": { "type": "array", "items": { "$ref": "#/definitions/entity.MarketplaceCatalogItem" } }, "pagination": { "$ref": "#/definitions/github_com_goinfinite_tk_src_domain_dto.Pagination" } } }, "dto.ReadMarketplaceInstalledItemsResponse": { "type": "object", "properties": { "marketplaceInstalledItems": { "type": "array", "items": { "$ref": "#/definitions/entity.MarketplaceInstalledItem" } }, "pagination": { "$ref": "#/definitions/github_com_goinfinite_tk_src_domain_dto.Pagination" } } }, "dto.ReadScheduledTasksResponse": { "type": "object", "properties": { "pagination": { "$ref": "#/definitions/github_com_goinfinite_tk_src_domain_dto.Pagination" }, "tasks": { "type": "array", "items": { "$ref": "#/definitions/entity.ScheduledTask" } } } }, "dto.ReadSslPairsResponse": { "type": "object", "properties": { "pagination": { "$ref": "#/definitions/github_com_goinfinite_tk_src_domain_dto.Pagination" }, "sslPairs": { "type": "array", "items": { "$ref": "#/definitions/entity.SslPair" } } } }, "dto.ReadVirtualHostsResponse": { "type": "object", "properties": { "pagination": { "$ref": "#/definitions/github_com_goinfinite_tk_src_domain_dto.Pagination" }, "virtualHostWithMappings": { "type": "array", "items": { "$ref": "#/definitions/dto.VirtualHostWithMappings" } }, "virtualHosts": { "type": "array", "items": { "$ref": "#/definitions/entity.VirtualHost" } } } }, "dto.RunPhpCommandRequest": { "type": "object", "properties": { "command": { "type": "string" }, "hostname": { "type": "string" }, "timeoutSecs": { "type": "integer" } } }, "dto.RunPhpCommandResponse": { "type": "object", "properties": { "exitCode": { "type": "integer" }, "stdErr": { "type": "string" }, "stdOut": { "type": "string" } } }, "dto.UnixFileBranch": { "type": "object", "properties": { "branches": { "type": "object", "additionalProperties": { "$ref": "#/definitions/dto.UnixFileBranch" } }, "mimeType": { "type": "string" }, "name": { "type": "string" }, "path": { "type": "string" } } }, "dto.UpdateAccount": { "type": "object", "properties": { "accountId": { "type": "integer" }, "accountUsername": { "type": "string" }, "isSuperAdmin": { "type": "boolean" }, "password": { "type": "string" }, "shouldUpdateApiKey": { "type": "boolean" } } }, "dto.UpdateCron": { "type": "object", "properties": { "command": { "type": "string" }, "comment": { "type": "string" }, "id": { "type": "integer" }, "schedule": { "type": "string" } } }, "dto.UpdateMapping": { "type": "object", "properties": { "id": { "type": "integer" }, "mappingSecurityRuleId": { "type": "integer" }, "matchPattern": { "$ref": "#/definitions/valueObject.MappingMatchPattern" }, "path": { "type": "string" }, "shouldUpgradeInsecureRequests": { "type": "boolean" }, "targetHttpResponseCode": { "type": "integer" }, "targetType": { "$ref": "#/definitions/valueObject.MappingTargetType" }, "targetValue": { "type": "string" } } }, "dto.UpdateMappingSecurityRule": { "type": "object", "properties": { "allowedIps": { "type": "array", "items": { "type": "string" } }, "bandwidthBpsLimitPerConnection": { "type": "integer" }, "bandwidthLimitOnlyAfterBytes": { "type": "integer" }, "blockedIps": { "type": "array", "items": { "type": "string" } }, "description": { "type": "string" }, "id": { "type": "integer" }, "maxConnectionsPerIp": { "type": "integer" }, "name": { "type": "string" }, "responseCodeOnMaxConnections": { "type": "integer" }, "responseCodeOnMaxRequests": { "type": "integer" }, "rpsHardLimitPerIp": { "type": "integer" }, "rpsSoftLimitPerIp": { "type": "integer" } } }, "dto.UpdatePhpConfigs": { "type": "object", "properties": { "hostname": { "type": "string" }, "modules": { "type": "array", "items": { "$ref": "#/definitions/entity.PhpModule" } }, "settings": { "type": "array", "items": { "$ref": "#/definitions/entity.PhpSetting" } }, "version": { "type": "string" } } }, "dto.UpdateScheduledTask": { "type": "object", "properties": { "runAt": { "type": "integer" }, "status": { "type": "string" }, "taskId": { "type": "integer" } } }, "dto.UpdateService": { "type": "object", "properties": { "autoRestart": { "type": "boolean" }, "autoStart": { "type": "boolean" }, "avatarUrl": { "type": "string" }, "envs": { "type": "array", "items": { "type": "string" } }, "execUser": { "type": "string" }, "logErrorPath": { "type": "string" }, "logOutputPath": { "type": "string" }, "maxStartRetries": { "type": "integer" }, "name": { "type": "string" }, "portBindings": { "type": "array", "items": { "$ref": "#/definitions/valueObject.PortBinding" } }, "postStartCmdSteps": { "type": "array", "items": { "type": "string" } }, "postStopCmdSteps": { "type": "array", "items": { "type": "string" } }, "preStartCmdSteps": { "type": "array", "items": { "type": "string" } }, "preStopCmdSteps": { "type": "array", "items": { "type": "string" } }, "startCmd": { "type": "string" }, "startupFile": { "type": "string" }, "status": { "type": "string" }, "stopCmdSteps": { "type": "array", "items": { "type": "string" } }, "timeoutStartSecs": { "type": "integer" }, "type": { "$ref": "#/definitions/valueObject.ServiceType" }, "version": { "type": "string" }, "workingDirectory": { "type": "string" } } }, "dto.UpdateUnixFiles": { "type": "object", "properties": { "destinationPath": { "type": "string" }, "encodedContent": { "type": "string" }, "ownership": { "type": "string" }, "permissions": { "type": "string" }, "shouldFixPermissions": { "type": "boolean" }, "sourcePaths": { "type": "array", "items": { "type": "string" } } } }, "dto.UpdateVirtualHost": { "type": "object", "properties": { "hostname": { "type": "string" }, "isWildcard": { "type": "boolean" } } }, "dto.VirtualHostWithMappings": { "type": "object", "properties": { "aliasesHostnames": { "type": "array", "items": { "type": "string" } }, "createdAt": { "type": "integer" }, "hostname": { "type": "string" }, "isPrimary": { "type": "boolean" }, "isWildcard": { "type": "boolean" }, "mappings": { "type": "array", "items": { "$ref": "#/definitions/entity.Mapping" } }, "parentHostname": { "type": "string" }, "rootDirectory": { "type": "string" }, "type": { "$ref": "#/definitions/valueObject.VirtualHostType" } } }, "entity.AccessToken": { "type": "object", "properties": { "expiresIn": { "type": "integer" }, "tokenStr": { "type": "string" }, "type": { "type": "string" } } }, "entity.Account": { "type": "object", "properties": { "createdAt": { "type": "integer" }, "groupId": { "type": "integer" }, "homeDirectory": { "type": "string" }, "id": { "type": "integer" }, "isSuperAdmin": { "type": "boolean" }, "secureAccessPublicKeys": { "type": "array", "items": { "$ref": "#/definitions/entity.SecureAccessPublicKey" } }, "updatedAt": { "type": "integer" }, "username": { "type": "string" } } }, "entity.Cron": { "type": "object", "properties": { "command": { "type": "string" }, "comment": { "type": "string" }, "id": { "type": "integer" }, "schedule": { "type": "string" } } }, "entity.Database": { "type": "object", "properties": { "name": { "type": "string" }, "size": { "type": "integer" }, "type": { "type": "string" }, "users": { "type": "array", "items": { "$ref": "#/definitions/entity.DatabaseUser" } } } }, "entity.DatabaseUser": { "type": "object", "properties": { "dbName": { "type": "string" }, "dbType": { "type": "string" }, "privileges": { "type": "array", "items": { "type": "string" } }, "username": { "type": "string" } } }, "entity.InstallableService": { "type": "object", "properties": { "avatarUrl": { "type": "string" }, "description": { "type": "string" }, "envs": { "type": "array", "items": { "type": "string" } }, "estimatedSizeBytes": { "type": "integer" }, "execUser": { "type": "string" }, "logErrorPath": { "type": "string" }, "logOutputPath": { "type": "string" }, "manifestVersion": { "type": "string" }, "name": { "type": "string" }, "nature": { "$ref": "#/definitions/valueObject.ServiceNature" }, "portBindings": { "type": "array", "items": { "$ref": "#/definitions/valueObject.PortBinding" } }, "startCmd": { "type": "string" }, "startupFile": { "type": "string" }, "type": { "$ref": "#/definitions/valueObject.ServiceType" }, "versions": { "type": "array", "items": { "type": "string" } }, "workingDirectory": { "type": "string" } } }, "entity.InstalledService": { "type": "object", "properties": { "autoRestart": { "type": "boolean" }, "autoStart": { "type": "boolean" }, "avatarUrl": { "type": "string" }, "createdAt": { "type": "integer" }, "envs": { "type": "array", "items": { "type": "string" } }, "execUser": { "type": "string" }, "logErrorPath": { "type": "string" }, "logOutputPath": { "type": "string" }, "maxStartRetries": { "type": "integer" }, "name": { "type": "string" }, "nature": { "$ref": "#/definitions/valueObject.ServiceNature" }, "portBindings": { "type": "array", "items": { "$ref": "#/definitions/valueObject.PortBinding" } }, "startCmd": { "type": "string" }, "startupFile": { "type": "string" }, "status": { "type": "string" }, "timeoutStartSecs": { "type": "integer" }, "type": { "$ref": "#/definitions/valueObject.ServiceType" }, "updatedAt": { "type": "integer" }, "version": { "type": "string" }, "workingDirectory": { "type": "string" } } }, "entity.Mapping": { "type": "object", "properties": { "createdAt": { "type": "integer" }, "hostname": { "type": "string" }, "id": { "type": "integer" }, "mappingSecurityRuleId": { "type": "integer" }, "marketplaceInstalledItemId": { "type": "integer" }, "marketplaceInstalledItemName": { "type": "string" }, "matchPattern": { "$ref": "#/definitions/valueObject.MappingMatchPattern" }, "path": { "type": "string" }, "shouldUpgradeInsecureRequests": { "type": "boolean" }, "targetHttpResponseCode": { "type": "integer" }, "targetType": { "$ref": "#/definitions/valueObject.MappingTargetType" }, "targetValue": { "type": "string" }, "updatedAt": { "type": "integer" } } }, "entity.MappingSecurityRule": { "type": "object", "properties": { "allowedIps": { "type": "array", "items": { "type": "string" } }, "bandwidthBpsLimitPerConnection": { "type": "integer" }, "bandwidthLimitOnlyAfterBytes": { "type": "integer" }, "blockedIps": { "type": "array", "items": { "type": "string" } }, "createdAt": { "type": "integer" }, "description": { "type": "string" }, "id": { "type": "integer" }, "maxConnectionsPerIp": { "type": "integer" }, "name": { "type": "string" }, "responseCodeOnMaxConnections": { "type": "integer" }, "responseCodeOnMaxRequests": { "type": "integer" }, "rpsHardLimitPerIp": { "type": "integer" }, "rpsSoftLimitPerIp": { "type": "integer" }, "updatedAt": { "type": "integer" } } }, "entity.MarketplaceCatalogItem": { "type": "object", "properties": { "avatarUrl": { "type": "string" }, "dataFields": { "type": "array", "items": { "$ref": "#/definitions/valueObject.MarketplaceCatalogItemDataField" } }, "description": { "type": "string" }, "estimatedSizeBytes": { "type": "integer" }, "id": { "type": "integer" }, "manifestVersion": { "type": "string" }, "mappings": { "type": "array", "items": { "$ref": "#/definitions/valueObject.MarketplaceItemMapping" } }, "name": { "type": "string" }, "screenshotUrls": { "type": "array", "items": { "type": "string" } }, "services": { "type": "array", "items": { "$ref": "#/definitions/valueObject.ServiceNameWithVersion" } }, "slugs": { "type": "array", "items": { "type": "string" } }, "type": { "type": "string" } } }, "entity.MarketplaceInstalledItem": { "type": "object", "properties": { "avatarUrl": { "type": "string" }, "createdAt": { "type": "integer" }, "hostname": { "type": "string" }, "id": { "type": "integer" }, "installDirectory": { "type": "string" }, "installUuid": { "type": "string" }, "mappings": { "type": "array", "items": { "$ref": "#/definitions/entity.Mapping" } }, "name": { "type": "string" }, "services": { "type": "array", "items": { "$ref": "#/definitions/valueObject.ServiceNameWithVersion" } }, "type": { "type": "string" }, "updatedAt": { "type": "integer" }, "urlPath": { "type": "string" } } }, "entity.O11yOverview": { "type": "object", "properties": { "currentUsage": { "$ref": "#/definitions/valueObject.CurrentResourceUsage" }, "hostname": { "type": "string" }, "publicIp": { "type": "string" }, "specs": { "$ref": "#/definitions/valueObject.HardwareSpecs" }, "uptimeRelative": { "type": "string" }, "uptimeSecs": { "type": "integer" } } }, "entity.PhpConfigs": { "type": "object", "properties": { "hostname": { "type": "string" }, "modules": { "type": "array", "items": { "$ref": "#/definitions/entity.PhpModule" } }, "settings": { "type": "array", "items": { "$ref": "#/definitions/entity.PhpSetting" } }, "version": { "$ref": "#/definitions/entity.PhpVersion" } } }, "entity.PhpModule": { "type": "object", "properties": { "name": { "type": "string" }, "status": { "type": "boolean" } } }, "entity.PhpSetting": { "type": "object", "properties": { "name": { "type": "string" }, "options": { "type": "array", "items": { "type": "string" } }, "type": { "type": "string" }, "value": { "type": "string" } } }, "entity.PhpVersion": { "type": "object", "properties": { "options": { "type": "array", "items": { "type": "string" } }, "value": { "type": "string" } } }, "entity.ScheduledTask": { "type": "object", "properties": { "command": { "type": "string" }, "createdAt": { "type": "integer" }, "elapsedSecs": { "type": "integer" }, "err": { "type": "string" }, "finishedAt": { "type": "integer" }, "id": { "type": "integer" }, "name": { "type": "string" }, "output": { "type": "string" }, "runAt": { "type": "integer" }, "startedAt": { "type": "integer" }, "status": { "type": "string" }, "tags": { "type": "array", "items": { "type": "string" } }, "timeoutSecs": { "type": "integer" }, "updatedAt": { "type": "integer" } } }, "entity.SecureAccessPublicKey": { "type": "object", "properties": { "accountId": { "type": "integer" }, "createdAt": { "type": "integer" }, "fingerprint": { "type": "string" }, "id": { "type": "integer" }, "name": { "type": "string" }, "updatedAt": { "type": "integer" } } }, "entity.SslCertificate": { "type": "object", "properties": { "altNames": { "type": "array", "items": { "type": "string" } }, "certificateAuthority": { "type": "string" }, "certificateContent": { "type": "string" }, "commonName": { "type": "string" }, "expiresAt": { "type": "integer" }, "id": { "type": "string" }, "issuedAt": { "type": "integer" } } }, "entity.SslPair": { "type": "object", "properties": { "certificate": { "$ref": "#/definitions/entity.SslCertificate" }, "chainCertificates": { "type": "array", "items": { "$ref": "#/definitions/entity.SslCertificate" } }, "key": { "type": "string" }, "sslPairId": { "type": "string" }, "virtualHostHostname": { "type": "string" } } }, "entity.UnixFile": { "type": "object", "properties": { "content": { "type": "string" }, "extension": { "type": "string" }, "gid": { "type": "integer" }, "group": { "type": "string" }, "mimeType": { "type": "string" }, "name": { "type": "string" }, "owner": { "type": "string" }, "path": { "type": "string" }, "permissions": { "type": "string" }, "size": { "type": "integer" }, "uid": { "type": "integer" }, "updatedAt": { "type": "integer" } } }, "entity.VirtualHost": { "type": "object", "properties": { "aliasesHostnames": { "type": "array", "items": { "type": "string" } }, "createdAt": { "type": "integer" }, "hostname": { "type": "string" }, "isPrimary": { "type": "boolean" }, "isWildcard": { "type": "boolean" }, "parentHostname": { "type": "string" }, "rootDirectory": { "type": "string" }, "type": { "$ref": "#/definitions/valueObject.VirtualHostType" } } }, "github_com_goinfinite_tk_src_domain_dto.Pagination": { "type": "object", "properties": { "itemsPerPage": { "type": "integer" }, "itemsTotal": { "type": "integer" }, "lastSeenId": { "type": "string" }, "pageNumber": { "type": "integer" }, "pagesTotal": { "type": "integer" }, "sortBy": { "type": "string" }, "sortDirection": { "type": "string" } } }, "valueObject.CurrentResourceUsage": { "type": "object", "properties": { "cpuUsagePercent": { "type": "number" }, "cpuUsagePercentStr": { "type": "string" }, "memUsagePercent": { "type": "number" }, "memUsagePercentStr": { "type": "string" }, "storageUsage": { "type": "number" }, "storageUsagePercentStr": { "type": "string" } } }, "valueObject.HardwareSpecs": { "type": "object", "properties": { "cpuCores": { "type": "number" }, "cpuFrequency": { "type": "number" }, "cpuModel": { "type": "string" }, "memoryTotal": { "type": "integer" }, "storageTotal": { "type": "integer" } } }, "valueObject.MappingMatchPattern": { "type": "string", "enum": [ "begins-with", "contains", "equals", "ends-with" ], "x-enum-varnames": [ "MappingMatchPatternBeginsWith", "MappingMatchPatternContains", "MappingMatchPatternEquals", "MappingMatchPatternEndsWith" ] }, "valueObject.MappingTargetType": { "type": "string", "enum": [ "url", "service", "response-code", "inline-html", "static-files" ], "x-enum-varnames": [ "MappingTargetTypeUrl", "MappingTargetTypeService", "MappingTargetTypeResponseCode", "MappingTargetTypeInlineHtml", "MappingTargetTypeStaticFiles" ] }, "valueObject.MarketplaceCatalogItemDataField": { "type": "object", "properties": { "defaultValue": { "type": "string" }, "isRequired": { "type": "boolean" }, "label": { "type": "string" }, "name": { "type": "string" }, "options": { "type": "array", "items": { "type": "string" } }, "specificType": { "type": "string" }, "type": { "type": "string" } } }, "valueObject.MarketplaceInstallableItemDataField": { "type": "object", "properties": { "name": { "type": "string" }, "value": { "type": "string" } } }, "valueObject.MarketplaceItemMapping": { "type": "object", "properties": { "matchPattern": { "$ref": "#/definitions/valueObject.MappingMatchPattern" }, "path": { "type": "string" }, "shouldUpgradeInsecureRequests": { "type": "boolean" }, "targetHttpResponseCode": { "type": "integer" }, "targetType": { "$ref": "#/definitions/valueObject.MappingTargetType" }, "targetValue": { "type": "string" } } }, "valueObject.PortBinding": { "type": "object", "properties": { "port": { "type": "integer" }, "protocol": { "type": "string" } } }, "valueObject.ServiceMetrics": { "type": "object", "properties": { "cpuUsagePercent": { "type": "number" }, "memUsagePercent": { "type": "number" }, "pids": { "type": "array", "items": { "type": "integer" } }, "uptimeSecs": { "type": "integer" } } }, "valueObject.ServiceNameWithVersion": { "type": "object", "properties": { "name": { "type": "string" }, "version": { "type": "string" } } }, "valueObject.ServiceNature": { "type": "string", "enum": [ "solo", "multi", "custom" ], "x-enum-varnames": [ "ServiceNatureSolo", "ServiceNatureMulti", "ServiceNatureCustom" ] }, "valueObject.ServiceType": { "type": "string", "enum": [ "system", "database", "runtime", "webserver", "other" ], "x-enum-varnames": [ "ServiceTypeSystem", "ServiceTypeDatabase", "ServiceTypeRuntime", "ServiceTypeWebServer", "ServiceTypeOther" ] }, "valueObject.VirtualHostType": { "type": "string", "enum": [ "top-level", "subdomain", "alias", "wildcard", "primary" ], "x-enum-varnames": [ "VirtualHostTypeTopLevel", "VirtualHostTypeSubdomain", "VirtualHostTypeAlias", "VirtualHostTypeWildcard", "VirtualHostTypePrimary" ] } }, "securityDefinitions": { "Bearer": { "description": "Type \"Bearer\" + JWT token or API key.", "type": "apiKey", "name": "Authorization", "in": "header" } } }