warpgate/warpgate-web/src/admin/lib/openapi-schema.json
2025-03-20 16:11:14 +01:00

3016 lines
68 KiB
JSON

{
"openapi": "3.0.0",
"info": {
"title": "Warpgate Web Admin",
"version": "0.13.2"
},
"servers": [
{
"url": "/@warpgate/admin/api"
}
],
"tags": [],
"paths": {
"/sessions": {
"get": {
"parameters": [
{
"name": "offset",
"schema": {
"type": "integer",
"format": "uint64"
},
"in": "query",
"required": false,
"deprecated": false,
"explode": true
},
{
"name": "limit",
"schema": {
"type": "integer",
"format": "uint64"
},
"in": "query",
"required": false,
"deprecated": false,
"explode": true
},
{
"name": "active_only",
"schema": {
"type": "boolean"
},
"in": "query",
"required": false,
"deprecated": false,
"explode": true
},
{
"name": "logged_in_only",
"schema": {
"type": "boolean"
},
"in": "query",
"required": false,
"deprecated": false,
"explode": true
}
],
"responses": {
"200": {
"description": "",
"content": {
"application/json; charset=utf-8": {
"schema": {
"$ref": "#/components/schemas/PaginatedResponse_SessionSnapshot"
}
}
}
}
},
"security": [
{
"TokenSecurityScheme": []
},
{
"CookieSecurityScheme": []
}
],
"operationId": "get_sessions"
},
"delete": {
"responses": {
"201": {
"description": ""
}
},
"security": [
{
"TokenSecurityScheme": []
},
{
"CookieSecurityScheme": []
}
],
"operationId": "close_all_sessions"
}
},
"/sessions/{id}": {
"get": {
"parameters": [
{
"name": "id",
"schema": {
"type": "string",
"format": "uuid"
},
"in": "path",
"required": true,
"deprecated": false,
"explode": true
}
],
"responses": {
"200": {
"description": "",
"content": {
"application/json; charset=utf-8": {
"schema": {
"$ref": "#/components/schemas/SessionSnapshot"
}
}
}
},
"404": {
"description": ""
}
},
"security": [
{
"TokenSecurityScheme": []
},
{
"CookieSecurityScheme": []
}
],
"operationId": "get_session"
}
},
"/sessions/{id}/recordings": {
"get": {
"parameters": [
{
"name": "id",
"schema": {
"type": "string",
"format": "uuid"
},
"in": "path",
"required": true,
"deprecated": false,
"explode": true
}
],
"responses": {
"200": {
"description": "",
"content": {
"application/json; charset=utf-8": {
"schema": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Recording"
}
}
}
}
}
},
"security": [
{
"TokenSecurityScheme": []
},
{
"CookieSecurityScheme": []
}
],
"operationId": "get_session_recordings"
}
},
"/sessions/{id}/close": {
"post": {
"parameters": [
{
"name": "id",
"schema": {
"type": "string",
"format": "uuid"
},
"in": "path",
"required": true,
"deprecated": false,
"explode": true
}
],
"responses": {
"201": {
"description": ""
},
"404": {
"description": ""
}
},
"security": [
{
"TokenSecurityScheme": []
},
{
"CookieSecurityScheme": []
}
],
"operationId": "close_session"
}
},
"/recordings/{id}": {
"get": {
"parameters": [
{
"name": "id",
"schema": {
"type": "string",
"format": "uuid"
},
"in": "path",
"required": true,
"deprecated": false,
"explode": true
}
],
"responses": {
"200": {
"description": "",
"content": {
"application/json; charset=utf-8": {
"schema": {
"$ref": "#/components/schemas/Recording"
}
}
}
},
"404": {
"description": ""
}
},
"security": [
{
"TokenSecurityScheme": []
},
{
"CookieSecurityScheme": []
}
],
"operationId": "get_recording"
}
},
"/roles": {
"get": {
"parameters": [
{
"name": "search",
"schema": {
"type": "string"
},
"in": "query",
"required": false,
"deprecated": false,
"explode": true
}
],
"responses": {
"200": {
"description": "",
"content": {
"application/json; charset=utf-8": {
"schema": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Role"
}
}
}
}
}
},
"security": [
{
"TokenSecurityScheme": []
},
{
"CookieSecurityScheme": []
}
],
"operationId": "get_roles"
},
"post": {
"requestBody": {
"content": {
"application/json; charset=utf-8": {
"schema": {
"$ref": "#/components/schemas/RoleDataRequest"
}
}
},
"required": true
},
"responses": {
"201": {
"description": "",
"content": {
"application/json; charset=utf-8": {
"schema": {
"$ref": "#/components/schemas/Role"
}
}
}
},
"400": {
"description": "",
"content": {
"application/json; charset=utf-8": {
"schema": {
"type": "string"
}
}
}
}
},
"security": [
{
"TokenSecurityScheme": []
},
{
"CookieSecurityScheme": []
}
],
"operationId": "create_role"
}
},
"/role/{id}": {
"get": {
"parameters": [
{
"name": "id",
"schema": {
"type": "string",
"format": "uuid"
},
"in": "path",
"required": true,
"deprecated": false,
"explode": true
}
],
"responses": {
"200": {
"description": "",
"content": {
"application/json; charset=utf-8": {
"schema": {
"$ref": "#/components/schemas/Role"
}
}
}
},
"404": {
"description": ""
}
},
"security": [
{
"TokenSecurityScheme": []
},
{
"CookieSecurityScheme": []
}
],
"operationId": "get_role"
},
"put": {
"parameters": [
{
"name": "id",
"schema": {
"type": "string",
"format": "uuid"
},
"in": "path",
"required": true,
"deprecated": false,
"explode": true
}
],
"requestBody": {
"content": {
"application/json; charset=utf-8": {
"schema": {
"$ref": "#/components/schemas/RoleDataRequest"
}
}
},
"required": true
},
"responses": {
"200": {
"description": "",
"content": {
"application/json; charset=utf-8": {
"schema": {
"$ref": "#/components/schemas/Role"
}
}
}
},
"403": {
"description": ""
},
"404": {
"description": ""
}
},
"security": [
{
"TokenSecurityScheme": []
},
{
"CookieSecurityScheme": []
}
],
"operationId": "update_role"
},
"delete": {
"parameters": [
{
"name": "id",
"schema": {
"type": "string",
"format": "uuid"
},
"in": "path",
"required": true,
"deprecated": false,
"explode": true
}
],
"responses": {
"204": {
"description": ""
},
"403": {
"description": ""
},
"404": {
"description": ""
}
},
"security": [
{
"TokenSecurityScheme": []
},
{
"CookieSecurityScheme": []
}
],
"operationId": "delete_role"
}
},
"/tickets": {
"get": {
"responses": {
"200": {
"description": "",
"content": {
"application/json; charset=utf-8": {
"schema": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Ticket"
}
}
}
}
}
},
"security": [
{
"TokenSecurityScheme": []
},
{
"CookieSecurityScheme": []
}
],
"operationId": "get_tickets"
},
"post": {
"requestBody": {
"content": {
"application/json; charset=utf-8": {
"schema": {
"$ref": "#/components/schemas/CreateTicketRequest"
}
}
},
"required": true
},
"responses": {
"201": {
"description": "",
"content": {
"application/json; charset=utf-8": {
"schema": {
"$ref": "#/components/schemas/TicketAndSecret"
}
}
}
},
"400": {
"description": "",
"content": {
"application/json; charset=utf-8": {
"schema": {
"type": "string"
}
}
}
}
},
"security": [
{
"TokenSecurityScheme": []
},
{
"CookieSecurityScheme": []
}
],
"operationId": "create_ticket"
}
},
"/tickets/{id}": {
"delete": {
"parameters": [
{
"name": "id",
"schema": {
"type": "string",
"format": "uuid"
},
"in": "path",
"required": true,
"deprecated": false,
"explode": true
}
],
"responses": {
"204": {
"description": ""
},
"404": {
"description": ""
}
},
"security": [
{
"TokenSecurityScheme": []
},
{
"CookieSecurityScheme": []
}
],
"operationId": "delete_ticket"
}
},
"/ssh/known-hosts": {
"get": {
"responses": {
"200": {
"description": "",
"content": {
"application/json; charset=utf-8": {
"schema": {
"type": "array",
"items": {
"$ref": "#/components/schemas/SSHKnownHost"
}
}
}
}
}
},
"security": [
{
"TokenSecurityScheme": []
},
{
"CookieSecurityScheme": []
}
],
"operationId": "get_ssh_known_hosts"
}
},
"/ssh/known-hosts/{id}": {
"delete": {
"parameters": [
{
"name": "id",
"schema": {
"type": "string",
"format": "uuid"
},
"in": "path",
"required": true,
"deprecated": false,
"explode": true
}
],
"responses": {
"204": {
"description": ""
},
"404": {
"description": ""
}
},
"security": [
{
"TokenSecurityScheme": []
},
{
"CookieSecurityScheme": []
}
],
"operationId": "delete_ssh_known_host"
}
},
"/ssh/own-keys": {
"get": {
"responses": {
"200": {
"description": "",
"content": {
"application/json; charset=utf-8": {
"schema": {
"type": "array",
"items": {
"$ref": "#/components/schemas/SSHKey"
}
}
}
}
}
},
"security": [
{
"TokenSecurityScheme": []
},
{
"CookieSecurityScheme": []
}
],
"operationId": "get_ssh_own_keys"
}
},
"/logs": {
"post": {
"requestBody": {
"content": {
"application/json; charset=utf-8": {
"schema": {
"$ref": "#/components/schemas/GetLogsRequest"
}
}
},
"required": true
},
"responses": {
"200": {
"description": "",
"content": {
"application/json; charset=utf-8": {
"schema": {
"type": "array",
"items": {
"$ref": "#/components/schemas/LogEntry"
}
}
}
}
}
},
"security": [
{
"TokenSecurityScheme": []
},
{
"CookieSecurityScheme": []
}
],
"operationId": "get_logs"
}
},
"/targets": {
"get": {
"parameters": [
{
"name": "search",
"schema": {
"type": "string"
},
"in": "query",
"required": false,
"deprecated": false,
"explode": true
}
],
"responses": {
"200": {
"description": "",
"content": {
"application/json; charset=utf-8": {
"schema": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Target"
}
}
}
}
}
},
"security": [
{
"TokenSecurityScheme": []
},
{
"CookieSecurityScheme": []
}
],
"operationId": "get_targets"
},
"post": {
"requestBody": {
"content": {
"application/json; charset=utf-8": {
"schema": {
"$ref": "#/components/schemas/TargetDataRequest"
}
}
},
"required": true
},
"responses": {
"201": {
"description": "",
"content": {
"application/json; charset=utf-8": {
"schema": {
"$ref": "#/components/schemas/Target"
}
}
}
},
"400": {
"description": "",
"content": {
"application/json; charset=utf-8": {
"schema": {
"type": "string"
}
}
}
}
},
"security": [
{
"TokenSecurityScheme": []
},
{
"CookieSecurityScheme": []
}
],
"operationId": "create_target"
}
},
"/targets/{id}": {
"get": {
"parameters": [
{
"name": "id",
"schema": {
"type": "string",
"format": "uuid"
},
"in": "path",
"required": true,
"deprecated": false,
"explode": true
}
],
"responses": {
"200": {
"description": "",
"content": {
"application/json; charset=utf-8": {
"schema": {
"$ref": "#/components/schemas/Target"
}
}
}
},
"404": {
"description": ""
}
},
"security": [
{
"TokenSecurityScheme": []
},
{
"CookieSecurityScheme": []
}
],
"operationId": "get_target"
},
"put": {
"parameters": [
{
"name": "id",
"schema": {
"type": "string",
"format": "uuid"
},
"in": "path",
"required": true,
"deprecated": false,
"explode": true
}
],
"requestBody": {
"content": {
"application/json; charset=utf-8": {
"schema": {
"$ref": "#/components/schemas/TargetDataRequest"
}
}
},
"required": true
},
"responses": {
"200": {
"description": "",
"content": {
"application/json; charset=utf-8": {
"schema": {
"$ref": "#/components/schemas/Target"
}
}
}
},
"400": {
"description": ""
},
"404": {
"description": ""
}
},
"security": [
{
"TokenSecurityScheme": []
},
{
"CookieSecurityScheme": []
}
],
"operationId": "update_target"
},
"delete": {
"parameters": [
{
"name": "id",
"schema": {
"type": "string",
"format": "uuid"
},
"in": "path",
"required": true,
"deprecated": false,
"explode": true
}
],
"responses": {
"204": {
"description": ""
},
"403": {
"description": ""
},
"404": {
"description": ""
}
},
"security": [
{
"TokenSecurityScheme": []
},
{
"CookieSecurityScheme": []
}
],
"operationId": "delete_target"
}
},
"/targets/{id}/roles": {
"get": {
"parameters": [
{
"name": "id",
"schema": {
"type": "string",
"format": "uuid"
},
"in": "path",
"required": true,
"deprecated": false,
"explode": true
}
],
"responses": {
"200": {
"description": "",
"content": {
"application/json; charset=utf-8": {
"schema": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Role"
}
}
}
}
},
"404": {
"description": ""
}
},
"security": [
{
"TokenSecurityScheme": []
},
{
"CookieSecurityScheme": []
}
],
"operationId": "get_target_roles"
}
},
"/targets/{id}/roles/{role_id}": {
"post": {
"parameters": [
{
"name": "id",
"schema": {
"type": "string",
"format": "uuid"
},
"in": "path",
"required": true,
"deprecated": false,
"explode": true
},
{
"name": "role_id",
"schema": {
"type": "string",
"format": "uuid"
},
"in": "path",
"required": true,
"deprecated": false,
"explode": true
}
],
"responses": {
"201": {
"description": ""
},
"409": {
"description": ""
}
},
"security": [
{
"TokenSecurityScheme": []
},
{
"CookieSecurityScheme": []
}
],
"operationId": "add_target_role"
},
"delete": {
"parameters": [
{
"name": "id",
"schema": {
"type": "string",
"format": "uuid"
},
"in": "path",
"required": true,
"deprecated": false,
"explode": true
},
{
"name": "role_id",
"schema": {
"type": "string",
"format": "uuid"
},
"in": "path",
"required": true,
"deprecated": false,
"explode": true
}
],
"responses": {
"204": {
"description": ""
},
"403": {
"description": ""
},
"404": {
"description": ""
}
},
"security": [
{
"TokenSecurityScheme": []
},
{
"CookieSecurityScheme": []
}
],
"operationId": "delete_target_role"
}
},
"/users": {
"get": {
"parameters": [
{
"name": "search",
"schema": {
"type": "string"
},
"in": "query",
"required": false,
"deprecated": false,
"explode": true
}
],
"responses": {
"200": {
"description": "",
"content": {
"application/json; charset=utf-8": {
"schema": {
"type": "array",
"items": {
"$ref": "#/components/schemas/User"
}
}
}
}
}
},
"security": [
{
"TokenSecurityScheme": []
},
{
"CookieSecurityScheme": []
}
],
"operationId": "get_users"
},
"post": {
"requestBody": {
"content": {
"application/json; charset=utf-8": {
"schema": {
"$ref": "#/components/schemas/CreateUserRequest"
}
}
},
"required": true
},
"responses": {
"201": {
"description": "",
"content": {
"application/json; charset=utf-8": {
"schema": {
"$ref": "#/components/schemas/User"
}
}
}
},
"400": {
"description": "",
"content": {
"application/json; charset=utf-8": {
"schema": {
"type": "string"
}
}
}
}
},
"security": [
{
"TokenSecurityScheme": []
},
{
"CookieSecurityScheme": []
}
],
"operationId": "create_user"
}
},
"/users/{id}": {
"get": {
"parameters": [
{
"name": "id",
"schema": {
"type": "string",
"format": "uuid"
},
"in": "path",
"required": true,
"deprecated": false,
"explode": true
}
],
"responses": {
"200": {
"description": "",
"content": {
"application/json; charset=utf-8": {
"schema": {
"$ref": "#/components/schemas/User"
}
}
}
},
"404": {
"description": ""
}
},
"security": [
{
"TokenSecurityScheme": []
},
{
"CookieSecurityScheme": []
}
],
"operationId": "get_user"
},
"put": {
"parameters": [
{
"name": "id",
"schema": {
"type": "string",
"format": "uuid"
},
"in": "path",
"required": true,
"deprecated": false,
"explode": true
}
],
"requestBody": {
"content": {
"application/json; charset=utf-8": {
"schema": {
"$ref": "#/components/schemas/UserDataRequest"
}
}
},
"required": true
},
"responses": {
"200": {
"description": "",
"content": {
"application/json; charset=utf-8": {
"schema": {
"$ref": "#/components/schemas/User"
}
}
}
},
"404": {
"description": ""
}
},
"security": [
{
"TokenSecurityScheme": []
},
{
"CookieSecurityScheme": []
}
],
"operationId": "update_user"
},
"delete": {
"parameters": [
{
"name": "id",
"schema": {
"type": "string",
"format": "uuid"
},
"in": "path",
"required": true,
"deprecated": false,
"explode": true
}
],
"responses": {
"204": {
"description": ""
},
"404": {
"description": ""
}
},
"security": [
{
"TokenSecurityScheme": []
},
{
"CookieSecurityScheme": []
}
],
"operationId": "delete_user"
}
},
"/users/{id}/roles": {
"get": {
"parameters": [
{
"name": "id",
"schema": {
"type": "string",
"format": "uuid"
},
"in": "path",
"required": true,
"deprecated": false,
"explode": true
}
],
"responses": {
"200": {
"description": "",
"content": {
"application/json; charset=utf-8": {
"schema": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Role"
}
}
}
}
},
"404": {
"description": ""
}
},
"security": [
{
"TokenSecurityScheme": []
},
{
"CookieSecurityScheme": []
}
],
"operationId": "get_user_roles"
}
},
"/users/{id}/roles/{role_id}": {
"post": {
"parameters": [
{
"name": "id",
"schema": {
"type": "string",
"format": "uuid"
},
"in": "path",
"required": true,
"deprecated": false,
"explode": true
},
{
"name": "role_id",
"schema": {
"type": "string",
"format": "uuid"
},
"in": "path",
"required": true,
"deprecated": false,
"explode": true
}
],
"responses": {
"201": {
"description": ""
},
"409": {
"description": ""
}
},
"security": [
{
"TokenSecurityScheme": []
},
{
"CookieSecurityScheme": []
}
],
"operationId": "add_user_role"
},
"delete": {
"parameters": [
{
"name": "id",
"schema": {
"type": "string",
"format": "uuid"
},
"in": "path",
"required": true,
"deprecated": false,
"explode": true
},
{
"name": "role_id",
"schema": {
"type": "string",
"format": "uuid"
},
"in": "path",
"required": true,
"deprecated": false,
"explode": true
}
],
"responses": {
"204": {
"description": ""
},
"404": {
"description": ""
}
},
"security": [
{
"TokenSecurityScheme": []
},
{
"CookieSecurityScheme": []
}
],
"operationId": "delete_user_role"
}
},
"/users/{user_id}/credentials/passwords": {
"get": {
"parameters": [
{
"name": "user_id",
"schema": {
"type": "string",
"format": "uuid"
},
"in": "path",
"required": true,
"deprecated": false,
"explode": true
}
],
"responses": {
"200": {
"description": "",
"content": {
"application/json; charset=utf-8": {
"schema": {
"type": "array",
"items": {
"$ref": "#/components/schemas/ExistingPasswordCredential"
}
}
}
}
}
},
"security": [
{
"TokenSecurityScheme": []
},
{
"CookieSecurityScheme": []
}
],
"operationId": "get_password_credentials"
},
"post": {
"parameters": [
{
"name": "user_id",
"schema": {
"type": "string",
"format": "uuid"
},
"in": "path",
"required": true,
"deprecated": false,
"explode": true
}
],
"requestBody": {
"content": {
"application/json; charset=utf-8": {
"schema": {
"$ref": "#/components/schemas/NewPasswordCredential"
}
}
},
"required": true
},
"responses": {
"201": {
"description": "",
"content": {
"application/json; charset=utf-8": {
"schema": {
"$ref": "#/components/schemas/ExistingPasswordCredential"
}
}
}
}
},
"security": [
{
"TokenSecurityScheme": []
},
{
"CookieSecurityScheme": []
}
],
"operationId": "create_password_credential"
}
},
"/users/{user_id}/credentials/passwords/{id}": {
"delete": {
"parameters": [
{
"name": "user_id",
"schema": {
"type": "string",
"format": "uuid"
},
"in": "path",
"required": true,
"deprecated": false,
"explode": true
},
{
"name": "id",
"schema": {
"type": "string",
"format": "uuid"
},
"in": "path",
"required": true,
"deprecated": false,
"explode": true
}
],
"responses": {
"204": {
"description": ""
},
"404": {
"description": ""
}
},
"security": [
{
"TokenSecurityScheme": []
},
{
"CookieSecurityScheme": []
}
],
"operationId": "delete_password_credential"
}
},
"/users/{user_id}/credentials/sso": {
"get": {
"parameters": [
{
"name": "user_id",
"schema": {
"type": "string",
"format": "uuid"
},
"in": "path",
"required": true,
"deprecated": false,
"explode": true
}
],
"responses": {
"200": {
"description": "",
"content": {
"application/json; charset=utf-8": {
"schema": {
"type": "array",
"items": {
"$ref": "#/components/schemas/ExistingSsoCredential"
}
}
}
}
}
},
"security": [
{
"TokenSecurityScheme": []
},
{
"CookieSecurityScheme": []
}
],
"operationId": "get_sso_credentials"
},
"post": {
"parameters": [
{
"name": "user_id",
"schema": {
"type": "string",
"format": "uuid"
},
"in": "path",
"required": true,
"deprecated": false,
"explode": true
}
],
"requestBody": {
"content": {
"application/json; charset=utf-8": {
"schema": {
"$ref": "#/components/schemas/NewSsoCredential"
}
}
},
"required": true
},
"responses": {
"201": {
"description": "",
"content": {
"application/json; charset=utf-8": {
"schema": {
"$ref": "#/components/schemas/ExistingSsoCredential"
}
}
}
}
},
"security": [
{
"TokenSecurityScheme": []
},
{
"CookieSecurityScheme": []
}
],
"operationId": "create_sso_credential"
}
},
"/users/{user_id}/credentials/sso/{id}": {
"put": {
"parameters": [
{
"name": "user_id",
"schema": {
"type": "string",
"format": "uuid"
},
"in": "path",
"required": true,
"deprecated": false,
"explode": true
},
{
"name": "id",
"schema": {
"type": "string",
"format": "uuid"
},
"in": "path",
"required": true,
"deprecated": false,
"explode": true
}
],
"requestBody": {
"content": {
"application/json; charset=utf-8": {
"schema": {
"$ref": "#/components/schemas/NewSsoCredential"
}
}
},
"required": true
},
"responses": {
"200": {
"description": "",
"content": {
"application/json; charset=utf-8": {
"schema": {
"$ref": "#/components/schemas/ExistingSsoCredential"
}
}
}
},
"404": {
"description": ""
}
},
"security": [
{
"TokenSecurityScheme": []
},
{
"CookieSecurityScheme": []
}
],
"operationId": "update_sso_credential"
},
"delete": {
"parameters": [
{
"name": "user_id",
"schema": {
"type": "string",
"format": "uuid"
},
"in": "path",
"required": true,
"deprecated": false,
"explode": true
},
{
"name": "id",
"schema": {
"type": "string",
"format": "uuid"
},
"in": "path",
"required": true,
"deprecated": false,
"explode": true
}
],
"responses": {
"204": {
"description": ""
},
"404": {
"description": ""
}
},
"security": [
{
"TokenSecurityScheme": []
},
{
"CookieSecurityScheme": []
}
],
"operationId": "delete_sso_credential"
}
},
"/users/{user_id}/credentials/public-keys": {
"get": {
"parameters": [
{
"name": "user_id",
"schema": {
"type": "string",
"format": "uuid"
},
"in": "path",
"required": true,
"deprecated": false,
"explode": true
}
],
"responses": {
"200": {
"description": "",
"content": {
"application/json; charset=utf-8": {
"schema": {
"type": "array",
"items": {
"$ref": "#/components/schemas/ExistingPublicKeyCredential"
}
}
}
}
}
},
"security": [
{
"TokenSecurityScheme": []
},
{
"CookieSecurityScheme": []
}
],
"operationId": "get_public_key_credentials"
},
"post": {
"parameters": [
{
"name": "user_id",
"schema": {
"type": "string",
"format": "uuid"
},
"in": "path",
"required": true,
"deprecated": false,
"explode": true
}
],
"requestBody": {
"content": {
"application/json; charset=utf-8": {
"schema": {
"$ref": "#/components/schemas/NewPublicKeyCredential"
}
}
},
"required": true
},
"responses": {
"201": {
"description": "",
"content": {
"application/json; charset=utf-8": {
"schema": {
"$ref": "#/components/schemas/ExistingPublicKeyCredential"
}
}
}
}
},
"security": [
{
"TokenSecurityScheme": []
},
{
"CookieSecurityScheme": []
}
],
"operationId": "create_public_key_credential"
}
},
"/users/{user_id}/credentials/public-keys/{id}": {
"put": {
"parameters": [
{
"name": "user_id",
"schema": {
"type": "string",
"format": "uuid"
},
"in": "path",
"required": true,
"deprecated": false,
"explode": true
},
{
"name": "id",
"schema": {
"type": "string",
"format": "uuid"
},
"in": "path",
"required": true,
"deprecated": false,
"explode": true
}
],
"requestBody": {
"content": {
"application/json; charset=utf-8": {
"schema": {
"$ref": "#/components/schemas/NewPublicKeyCredential"
}
}
},
"required": true
},
"responses": {
"200": {
"description": "",
"content": {
"application/json; charset=utf-8": {
"schema": {
"$ref": "#/components/schemas/ExistingPublicKeyCredential"
}
}
}
},
"404": {
"description": ""
}
},
"security": [
{
"TokenSecurityScheme": []
},
{
"CookieSecurityScheme": []
}
],
"operationId": "update_public_key_credential"
},
"delete": {
"parameters": [
{
"name": "user_id",
"schema": {
"type": "string",
"format": "uuid"
},
"in": "path",
"required": true,
"deprecated": false,
"explode": true
},
{
"name": "id",
"schema": {
"type": "string",
"format": "uuid"
},
"in": "path",
"required": true,
"deprecated": false,
"explode": true
}
],
"responses": {
"204": {
"description": ""
},
"404": {
"description": ""
}
},
"security": [
{
"TokenSecurityScheme": []
},
{
"CookieSecurityScheme": []
}
],
"operationId": "delete_public_key_credential"
}
},
"/users/{user_id}/credentials/otp": {
"get": {
"parameters": [
{
"name": "user_id",
"schema": {
"type": "string",
"format": "uuid"
},
"in": "path",
"required": true,
"deprecated": false,
"explode": true
}
],
"responses": {
"200": {
"description": "",
"content": {
"application/json; charset=utf-8": {
"schema": {
"type": "array",
"items": {
"$ref": "#/components/schemas/ExistingOtpCredential"
}
}
}
}
}
},
"security": [
{
"TokenSecurityScheme": []
},
{
"CookieSecurityScheme": []
}
],
"operationId": "get_otp_credentials"
},
"post": {
"parameters": [
{
"name": "user_id",
"schema": {
"type": "string",
"format": "uuid"
},
"in": "path",
"required": true,
"deprecated": false,
"explode": true
}
],
"requestBody": {
"content": {
"application/json; charset=utf-8": {
"schema": {
"$ref": "#/components/schemas/NewOtpCredential"
}
}
},
"required": true
},
"responses": {
"201": {
"description": "",
"content": {
"application/json; charset=utf-8": {
"schema": {
"$ref": "#/components/schemas/ExistingOtpCredential"
}
}
}
}
},
"security": [
{
"TokenSecurityScheme": []
},
{
"CookieSecurityScheme": []
}
],
"operationId": "create_otp_credential"
}
},
"/users/{user_id}/credentials/otp/{id}": {
"delete": {
"parameters": [
{
"name": "user_id",
"schema": {
"type": "string",
"format": "uuid"
},
"in": "path",
"required": true,
"deprecated": false,
"explode": true
},
{
"name": "id",
"schema": {
"type": "string",
"format": "uuid"
},
"in": "path",
"required": true,
"deprecated": false,
"explode": true
}
],
"responses": {
"204": {
"description": ""
},
"404": {
"description": ""
}
},
"security": [
{
"TokenSecurityScheme": []
},
{
"CookieSecurityScheme": []
}
],
"operationId": "delete_otp_credential"
}
},
"/parameters": {
"get": {
"responses": {
"200": {
"description": "",
"content": {
"application/json; charset=utf-8": {
"schema": {
"$ref": "#/components/schemas/ParameterValues"
}
}
}
}
},
"security": [
{
"TokenSecurityScheme": []
},
{
"CookieSecurityScheme": []
}
],
"operationId": "get_parameters"
},
"patch": {
"requestBody": {
"content": {
"application/json; charset=utf-8": {
"schema": {
"$ref": "#/components/schemas/ParameterUpdate"
}
}
},
"required": true
},
"responses": {
"201": {
"description": ""
}
},
"security": [
{
"TokenSecurityScheme": []
},
{
"CookieSecurityScheme": []
}
],
"operationId": "update_parameters"
}
}
},
"components": {
"schemas": {
"CreateTicketRequest": {
"type": "object",
"required": [
"username",
"target_name"
],
"properties": {
"username": {
"type": "string"
},
"target_name": {
"type": "string"
},
"expiry": {
"type": "string",
"format": "date-time"
},
"number_of_uses": {
"type": "integer",
"format": "int16"
}
}
},
"CreateUserRequest": {
"type": "object",
"required": [
"username"
],
"properties": {
"username": {
"type": "string"
}
}
},
"CredentialKind": {
"type": "string",
"enum": [
"Password",
"PublicKey",
"Totp",
"Sso",
"WebUserApproval"
]
},
"ExistingOtpCredential": {
"type": "object",
"required": [
"id"
],
"properties": {
"id": {
"type": "string",
"format": "uuid"
}
}
},
"ExistingPasswordCredential": {
"type": "object",
"required": [
"id"
],
"properties": {
"id": {
"type": "string",
"format": "uuid"
}
}
},
"ExistingPublicKeyCredential": {
"type": "object",
"required": [
"id",
"label",
"openssh_public_key"
],
"properties": {
"id": {
"type": "string",
"format": "uuid"
},
"label": {
"type": "string"
},
"date_added": {
"type": "string",
"format": "date-time"
},
"last_used": {
"type": "string",
"format": "date-time"
},
"openssh_public_key": {
"type": "string"
}
}
},
"ExistingSsoCredential": {
"type": "object",
"required": [
"id",
"email"
],
"properties": {
"id": {
"type": "string",
"format": "uuid"
},
"provider": {
"type": "string"
},
"email": {
"type": "string"
}
}
},
"GetLogsRequest": {
"type": "object",
"properties": {
"before": {
"type": "string",
"format": "date-time"
},
"after": {
"type": "string",
"format": "date-time"
},
"limit": {
"type": "integer",
"format": "uint64"
},
"session_id": {
"type": "string",
"format": "uuid"
},
"username": {
"type": "string"
},
"search": {
"type": "string"
}
}
},
"LogEntry": {
"type": "object",
"required": [
"id",
"text",
"values",
"timestamp",
"session_id"
],
"properties": {
"id": {
"type": "string",
"format": "uuid"
},
"text": {
"type": "string"
},
"values": {},
"timestamp": {
"type": "string",
"format": "date-time"
},
"session_id": {
"type": "string",
"format": "uuid"
},
"username": {
"type": "string"
}
}
},
"NewOtpCredential": {
"type": "object",
"required": [
"secret_key"
],
"properties": {
"secret_key": {
"type": "array",
"items": {
"type": "integer",
"format": "uint8"
}
}
}
},
"NewPasswordCredential": {
"type": "object",
"required": [
"password"
],
"properties": {
"password": {
"type": "string"
}
}
},
"NewPublicKeyCredential": {
"type": "object",
"required": [
"label",
"openssh_public_key"
],
"properties": {
"label": {
"type": "string"
},
"openssh_public_key": {
"type": "string"
}
}
},
"NewSsoCredential": {
"type": "object",
"required": [
"email"
],
"properties": {
"provider": {
"type": "string"
},
"email": {
"type": "string"
}
}
},
"PaginatedResponse_SessionSnapshot": {
"type": "object",
"required": [
"items",
"offset",
"total"
],
"properties": {
"items": {
"type": "array",
"items": {
"$ref": "#/components/schemas/SessionSnapshot"
}
},
"offset": {
"type": "integer",
"format": "uint64"
},
"total": {
"type": "integer",
"format": "uint64"
}
}
},
"ParameterUpdate": {
"type": "object",
"properties": {
"allow_own_credential_management": {
"type": "boolean"
}
}
},
"ParameterValues": {
"type": "object",
"required": [
"allow_own_credential_management"
],
"properties": {
"allow_own_credential_management": {
"type": "boolean"
}
}
},
"Recording": {
"type": "object",
"required": [
"id",
"name",
"started",
"session_id",
"kind"
],
"properties": {
"id": {
"type": "string",
"format": "uuid"
},
"name": {
"type": "string"
},
"started": {
"type": "string",
"format": "date-time"
},
"ended": {
"type": "string",
"format": "date-time"
},
"session_id": {
"type": "string",
"format": "uuid"
},
"kind": {
"$ref": "#/components/schemas/RecordingKind"
}
}
},
"RecordingKind": {
"type": "string",
"enum": [
"Terminal",
"Traffic"
]
},
"Role": {
"type": "object",
"required": [
"id",
"name"
],
"properties": {
"id": {
"type": "string",
"format": "uuid"
},
"name": {
"type": "string"
}
}
},
"RoleDataRequest": {
"type": "object",
"required": [
"name"
],
"properties": {
"name": {
"type": "string"
}
}
},
"SSHKey": {
"type": "object",
"required": [
"kind",
"public_key_base64"
],
"properties": {
"kind": {
"type": "string"
},
"public_key_base64": {
"type": "string"
}
}
},
"SSHKnownHost": {
"type": "object",
"required": [
"id",
"host",
"port",
"key_type",
"key_base64"
],
"properties": {
"id": {
"type": "string",
"format": "uuid"
},
"host": {
"type": "string"
},
"port": {
"type": "integer",
"format": "int32"
},
"key_type": {
"type": "string"
},
"key_base64": {
"type": "string"
}
}
},
"SSHTargetAuth": {
"type": "object",
"oneOf": [
{
"$ref": "#/components/schemas/SSHTargetAuth_SshTargetPasswordAuth"
},
{
"$ref": "#/components/schemas/SSHTargetAuth_SshTargetPublicKeyAuth"
}
],
"discriminator": {
"propertyName": "kind",
"mapping": {
"Password": "#/components/schemas/SSHTargetAuth_SshTargetPasswordAuth",
"PublicKey": "#/components/schemas/SSHTargetAuth_SshTargetPublicKeyAuth"
}
}
},
"SSHTargetAuth_SshTargetPasswordAuth": {
"allOf": [
{
"type": "object",
"required": [
"kind"
],
"properties": {
"kind": {
"type": "string",
"enum": [
"Password"
],
"example": "Password"
}
}
},
{
"$ref": "#/components/schemas/SshTargetPasswordAuth"
}
]
},
"SSHTargetAuth_SshTargetPublicKeyAuth": {
"allOf": [
{
"type": "object",
"required": [
"kind"
],
"properties": {
"kind": {
"type": "string",
"enum": [
"PublicKey"
],
"example": "PublicKey"
}
}
},
{
"$ref": "#/components/schemas/SshTargetPublicKeyAuth"
}
]
},
"SessionSnapshot": {
"type": "object",
"required": [
"id",
"started",
"protocol"
],
"properties": {
"id": {
"type": "string",
"format": "uuid"
},
"username": {
"type": "string"
},
"target": {
"$ref": "#/components/schemas/Target"
},
"started": {
"type": "string",
"format": "date-time"
},
"ended": {
"type": "string",
"format": "date-time"
},
"ticket_id": {
"type": "string",
"format": "uuid"
},
"protocol": {
"type": "string"
}
}
},
"SshTargetPasswordAuth": {
"type": "object",
"required": [
"password"
],
"properties": {
"password": {
"type": "string"
}
}
},
"SshTargetPublicKeyAuth": {
"type": "object"
},
"Target": {
"type": "object",
"required": [
"id",
"name",
"allow_roles",
"options"
],
"properties": {
"id": {
"type": "string",
"format": "uuid"
},
"name": {
"type": "string"
},
"allow_roles": {
"type": "array",
"items": {
"type": "string"
}
},
"options": {
"$ref": "#/components/schemas/TargetOptions"
}
}
},
"TargetDataRequest": {
"type": "object",
"required": [
"name",
"options"
],
"properties": {
"name": {
"type": "string"
},
"options": {
"$ref": "#/components/schemas/TargetOptions"
}
}
},
"TargetHTTPOptions": {
"type": "object",
"required": [
"url",
"tls"
],
"properties": {
"url": {
"type": "string"
},
"tls": {
"$ref": "#/components/schemas/Tls"
},
"headers": {
"type": "object",
"additionalProperties": {
"type": "string"
}
},
"external_host": {
"type": "string"
}
}
},
"TargetMySqlOptions": {
"type": "object",
"required": [
"host",
"port",
"username",
"tls"
],
"properties": {
"host": {
"type": "string"
},
"port": {
"type": "integer",
"format": "uint16"
},
"username": {
"type": "string"
},
"password": {
"type": "string"
},
"tls": {
"$ref": "#/components/schemas/Tls"
}
}
},
"TargetOptions": {
"type": "object",
"oneOf": [
{
"$ref": "#/components/schemas/TargetOptions_TargetSSHOptions"
},
{
"$ref": "#/components/schemas/TargetOptions_TargetHTTPOptions"
},
{
"$ref": "#/components/schemas/TargetOptions_TargetMySqlOptions"
},
{
"$ref": "#/components/schemas/TargetOptions_TargetPostgresOptions"
},
{
"$ref": "#/components/schemas/TargetOptions_TargetWebAdminOptions"
}
],
"discriminator": {
"propertyName": "kind",
"mapping": {
"Ssh": "#/components/schemas/TargetOptions_TargetSSHOptions",
"Http": "#/components/schemas/TargetOptions_TargetHTTPOptions",
"MySql": "#/components/schemas/TargetOptions_TargetMySqlOptions",
"Postgres": "#/components/schemas/TargetOptions_TargetPostgresOptions",
"WebAdmin": "#/components/schemas/TargetOptions_TargetWebAdminOptions"
}
}
},
"TargetOptions_TargetHTTPOptions": {
"allOf": [
{
"type": "object",
"required": [
"kind"
],
"properties": {
"kind": {
"type": "string",
"enum": [
"Http"
],
"example": "Http"
}
}
},
{
"$ref": "#/components/schemas/TargetHTTPOptions"
}
]
},
"TargetOptions_TargetMySqlOptions": {
"allOf": [
{
"type": "object",
"required": [
"kind"
],
"properties": {
"kind": {
"type": "string",
"enum": [
"MySql"
],
"example": "MySql"
}
}
},
{
"$ref": "#/components/schemas/TargetMySqlOptions"
}
]
},
"TargetOptions_TargetPostgresOptions": {
"allOf": [
{
"type": "object",
"required": [
"kind"
],
"properties": {
"kind": {
"type": "string",
"enum": [
"Postgres"
],
"example": "Postgres"
}
}
},
{
"$ref": "#/components/schemas/TargetPostgresOptions"
}
]
},
"TargetOptions_TargetSSHOptions": {
"allOf": [
{
"type": "object",
"required": [
"kind"
],
"properties": {
"kind": {
"type": "string",
"enum": [
"Ssh"
],
"example": "Ssh"
}
}
},
{
"$ref": "#/components/schemas/TargetSSHOptions"
}
]
},
"TargetOptions_TargetWebAdminOptions": {
"allOf": [
{
"type": "object",
"required": [
"kind"
],
"properties": {
"kind": {
"type": "string",
"enum": [
"WebAdmin"
],
"example": "WebAdmin"
}
}
},
{
"$ref": "#/components/schemas/TargetWebAdminOptions"
}
]
},
"TargetPostgresOptions": {
"type": "object",
"required": [
"host",
"port",
"username",
"tls"
],
"properties": {
"host": {
"type": "string"
},
"port": {
"type": "integer",
"format": "uint16"
},
"username": {
"type": "string"
},
"password": {
"type": "string"
},
"tls": {
"$ref": "#/components/schemas/Tls"
}
}
},
"TargetSSHOptions": {
"type": "object",
"required": [
"host",
"port",
"username",
"auth"
],
"properties": {
"host": {
"type": "string"
},
"port": {
"type": "integer",
"format": "uint16"
},
"username": {
"type": "string"
},
"allow_insecure_algos": {
"type": "boolean"
},
"auth": {
"$ref": "#/components/schemas/SSHTargetAuth"
}
}
},
"TargetWebAdminOptions": {
"type": "object"
},
"Ticket": {
"type": "object",
"required": [
"id",
"username",
"target",
"created"
],
"properties": {
"id": {
"type": "string",
"format": "uuid"
},
"username": {
"type": "string"
},
"target": {
"type": "string"
},
"uses_left": {
"type": "integer",
"format": "int16"
},
"expiry": {
"type": "string",
"format": "date-time"
},
"created": {
"type": "string",
"format": "date-time"
}
}
},
"TicketAndSecret": {
"type": "object",
"required": [
"ticket",
"secret"
],
"properties": {
"ticket": {
"$ref": "#/components/schemas/Ticket"
},
"secret": {
"type": "string"
}
}
},
"Tls": {
"type": "object",
"required": [
"mode",
"verify"
],
"properties": {
"mode": {
"$ref": "#/components/schemas/TlsMode"
},
"verify": {
"type": "boolean"
}
}
},
"TlsMode": {
"type": "string",
"enum": [
"Disabled",
"Preferred",
"Required"
]
},
"User": {
"type": "object",
"required": [
"id",
"username"
],
"properties": {
"id": {
"type": "string",
"format": "uuid"
},
"username": {
"type": "string"
},
"credential_policy": {
"$ref": "#/components/schemas/UserRequireCredentialsPolicy"
}
}
},
"UserDataRequest": {
"type": "object",
"required": [
"username"
],
"properties": {
"username": {
"type": "string"
},
"credential_policy": {
"$ref": "#/components/schemas/UserRequireCredentialsPolicy"
}
}
},
"UserRequireCredentialsPolicy": {
"type": "object",
"properties": {
"http": {
"type": "array",
"items": {
"$ref": "#/components/schemas/CredentialKind"
}
},
"ssh": {
"type": "array",
"items": {
"$ref": "#/components/schemas/CredentialKind"
}
},
"mysql": {
"type": "array",
"items": {
"$ref": "#/components/schemas/CredentialKind"
}
},
"postgres": {
"type": "array",
"items": {
"$ref": "#/components/schemas/CredentialKind"
}
}
}
}
},
"securitySchemes": {
"CookieSecurityScheme": {
"type": "apiKey",
"name": "warpgate-http-session",
"in": "cookie"
},
"TokenSecurityScheme": {
"type": "apiKey",
"name": "X-Warpgate-Token",
"in": "header"
}
}
}
}