// Code generated by go-swagger; DO NOT EDIT.

package rest_server_zrok

import (
	"encoding/json"
)

var (
	// SwaggerJSON embedded version of the swagger document used at generation time
	SwaggerJSON json.RawMessage
	// FlatSwaggerJSON embedded flattened version of the swagger document used at generation time
	FlatSwaggerJSON json.RawMessage
)

func init() {
	SwaggerJSON = json.RawMessage([]byte(`{
  "consumes": [
    "application/zrok.v1+json"
  ],
  "produces": [
    "application/zrok.v1+json"
  ],
  "schemes": [
    "http"
  ],
  "swagger": "2.0",
  "info": {
    "description": "zrok client access",
    "title": "zrok",
    "version": "2.0.0"
  },
  "basePath": "/api/v2",
  "paths": {
    "/access": {
      "post": {
        "tags": [
          "share"
        ],
        "operationId": "access",
        "parameters": [
          {
            "name": "body",
            "in": "body",
            "schema": {
              "properties": {
                "bindAddress": {
                  "type": "string"
                },
                "description": {
                  "type": "string"
                },
                "envZId": {
                  "type": "string"
                },
                "shareToken": {
                  "type": "string"
                }
              }
            }
          }
        ],
        "responses": {
          "201": {
            "description": "access created",
            "schema": {
              "properties": {
                "backendMode": {
                  "type": "string"
                },
                "frontendToken": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "description": "unauthorized"
          },
          "404": {
            "description": "not found"
          },
          "500": {
            "description": "internal server error"
          },
          "503": {
            "description": "service unavailable",
            "headers": {
              "Retry-After": {
                "type": "integer",
                "description": "seconds to wait before retrying"
              }
            }
          }
        },
        "security": [
          {
            "key": []
          }
        ]
      },
      "patch": {
        "tags": [
          "share"
        ],
        "operationId": "updateAccess",
        "parameters": [
          {
            "name": "body",
            "in": "body",
            "schema": {
              "properties": {
                "bindAddress": {
                  "type": "string"
                },
                "description": {
                  "type": "string"
                },
                "frontendToken": {
                  "type": "string"
                }
              }
            }
          }
        ],
        "responses": {
          "200": {
            "description": "access updated"
          },
          "401": {
            "description": "unauthorized"
          },
          "404": {
            "description": "not found"
          },
          "500": {
            "description": "internal server error"
          }
        },
        "security": [
          {
            "key": []
          }
        ]
      }
    },
    "/accesses": {
      "get": {
        "tags": [
          "metadata"
        ],
        "operationId": "listAccesses",
        "parameters": [
          {
            "type": "string",
            "description": "filter by environment ziti identity",
            "name": "envZId",
            "in": "query"
          },
          {
            "type": "string",
            "description": "filter by associated share token",
            "name": "shareToken",
            "in": "query"
          },
          {
            "type": "string",
            "description": "filter by bind address (substring match)",
            "name": "bindAddress",
            "in": "query"
          },
          {
            "type": "string",
            "description": "filter by description (substring match)",
            "name": "description",
            "in": "query"
          },
          {
            "type": "string",
            "description": "filter by created date (RFC3339 format)",
            "name": "createdAfter",
            "in": "query"
          },
          {
            "type": "string",
            "description": "filter by created date (RFC3339 format)",
            "name": "createdBefore",
            "in": "query"
          },
          {
            "type": "string",
            "description": "filter by updated date (RFC3339 format)",
            "name": "updatedAfter",
            "in": "query"
          },
          {
            "type": "string",
            "description": "filter by updated date (RFC3339 format)",
            "name": "updatedBefore",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "list of accesses",
            "schema": {
              "$ref": "#/definitions/accessesList"
            }
          },
          "400": {
            "description": "bad request (e.g., activityDuration exceeds 30d, invalid date format)",
            "schema": {
              "$ref": "#/definitions/errorMessage"
            }
          },
          "401": {
            "description": "unauthorized"
          },
          "500": {
            "description": "internal server error",
            "schema": {
              "$ref": "#/definitions/errorMessage"
            }
          }
        },
        "security": [
          {
            "key": []
          }
        ]
      }
    },
    "/account": {
      "post": {
        "tags": [
          "admin"
        ],
        "operationId": "createAccount",
        "parameters": [
          {
            "name": "body",
            "in": "body",
            "schema": {
              "properties": {
                "email": {
                  "type": "string"
                },
                "password": {
                  "type": "string"
                }
              }
            }
          }
        ],
        "responses": {
          "201": {
            "description": "created",
            "schema": {
              "properties": {
                "accountToken": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "description": "unauthorized"
          },
          "500": {
            "description": "internal server error"
          }
        },
        "security": [
          {
            "key": []
          }
        ]
      },
      "delete": {
        "tags": [
          "admin"
        ],
        "operationId": "deleteAccount",
        "parameters": [
          {
            "name": "body",
            "in": "body",
            "schema": {
              "properties": {
                "email": {
                  "type": "string"
                }
              }
            }
          }
        ],
        "responses": {
          "200": {
            "description": "ok"
          },
          "401": {
            "description": "unauthorized"
          },
          "404": {
            "description": "not found"
          },
          "500": {
            "description": "internal server error"
          }
        },
        "security": [
          {
            "key": []
          }
        ]
      },
      "patch": {
        "tags": [
          "admin"
        ],
        "operationId": "updateAccountPassword",
        "parameters": [
          {
            "name": "body",
            "in": "body",
            "schema": {
              "properties": {
                "email": {
                  "type": "string"
                },
                "password": {
                  "type": "string"
                }
              }
            }
          }
        ],
        "responses": {
          "200": {
            "description": "ok"
          },
          "401": {
            "description": "unauthorized"
          },
          "404": {
            "description": "not found"
          },
          "422": {
            "description": "password validation failure",
            "schema": {
              "$ref": "#/definitions/errorMessage"
            }
          },
          "500": {
            "description": "internal server error"
          }
        },
        "security": [
          {
            "key": []
          }
        ]
      }
    },
    "/agent/access": {
      "post": {
        "tags": [
          "agent"
        ],
        "operationId": "remoteAccess",
        "parameters": [
          {
            "name": "body",
            "in": "body",
            "schema": {
              "properties": {
                "autoAddress": {
                  "type": "string"
                },
                "autoEndPort": {
                  "type": "integer",
                  "maximum": 65535,
                  "minimum": 1
                },
                "autoMode": {
                  "type": "boolean"
                },
                "autoStartPort": {
                  "type": "integer",
                  "maximum": 65535,
                  "minimum": 1
                },
                "bindAddress": {
                  "type": "string"
                },
                "envZId": {
                  "type": "string"
                },
                "responseHeaders": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "token": {
                  "type": "string"
                }
              }
            }
          }
        ],
        "responses": {
          "200": {
            "description": "ok",
            "schema": {
              "properties": {
                "frontendToken": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "description": "unauthorized"
          },
          "500": {
            "description": "internal server error"
          },
          "502": {
            "description": "bad gateway; agent not reachable"
          }
        },
        "security": [
          {
            "key": []
          }
        ]
      }
    },
    "/agent/enroll": {
      "post": {
        "tags": [
          "agent"
        ],
        "operationId": "enroll",
        "parameters": [
          {
            "name": "body",
            "in": "body",
            "schema": {
              "properties": {
                "envZId": {
                  "type": "string"
                }
              }
            }
          }
        ],
        "responses": {
          "200": {
            "description": "ok",
            "schema": {
              "properties": {
                "token": {
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "description": "bad request; already enrolled"
          },
          "401": {
            "description": "unauthorized"
          },
          "500": {
            "description": "internal server error"
          }
        },
        "security": [
          {
            "key": []
          }
        ]
      }
    },
    "/agent/ping": {
      "post": {
        "tags": [
          "agent"
        ],
        "operationId": "ping",
        "parameters": [
          {
            "name": "body",
            "in": "body",
            "schema": {
              "properties": {
                "envZId": {
                  "type": "string"
                }
              }
            }
          }
        ],
        "responses": {
          "200": {
            "description": "ok",
            "schema": {
              "properties": {
                "version": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "description": "unauthorized"
          },
          "500": {
            "description": "internal server error"
          },
          "502": {
            "description": "bad gateway; agent not reachable"
          }
        },
        "security": [
          {
            "key": []
          }
        ]
      }
    },
    "/agent/share": {
      "post": {
        "tags": [
          "agent"
        ],
        "operationId": "remoteShare",
        "parameters": [
          {
            "name": "body",
            "in": "body",
            "schema": {
              "properties": {
                "accessGrants": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "backendMode": {
                  "type": "string",
                  "enum": [
                    "proxy",
                    "web",
                    "tcpTunnel",
                    "udpTunnel",
                    "caddy",
                    "drive",
                    "socks"
                  ]
                },
                "basicAuth": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "envZId": {
                  "type": "string"
                },
                "insecure": {
                  "type": "boolean"
                },
                "nameSelections": {
                  "type": "array",
                  "items": {
                    "$ref": "#/definitions/nameSelection"
                  }
                },
                "oauthEmailDomains": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "oauthProvider": {
                  "type": "string"
                },
                "oauthRefreshInterval": {
                  "type": "string"
                },
                "open": {
                  "type": "boolean"
                },
                "privateShareToken": {
                  "type": "string"
                },
                "shareMode": {
                  "type": "string",
                  "enum": [
                    "public",
                    "private"
                  ]
                },
                "target": {
                  "type": "string"
                },
                "token": {
                  "type": "string"
                }
              }
            }
          }
        ],
        "responses": {
          "200": {
            "description": "ok",
            "schema": {
              "properties": {
                "frontendEndpoints": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "token": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "description": "unauthorized"
          },
          "500": {
            "description": "internal server error"
          },
          "502": {
            "description": "bad gateway; agent not reachable"
          }
        },
        "security": [
          {
            "key": []
          }
        ]
      }
    },
    "/agent/share/http-healthcheck": {
      "post": {
        "tags": [
          "agent"
        ],
        "operationId": "shareHttpHealthcheck",
        "parameters": [
          {
            "name": "body",
            "in": "body",
            "schema": {
              "properties": {
                "endpoint": {
                  "type": "string"
                },
                "envZId": {
                  "type": "string"
                },
                "expectedHttpResponse": {
                  "type": "number"
                },
                "httpVerb": {
                  "type": "string"
                },
                "shareToken": {
                  "type": "string"
                },
                "timeoutMs": {
                  "type": "number"
                }
              }
            }
          }
        ],
        "responses": {
          "200": {
            "description": "ok",
            "schema": {
              "properties": {
                "error": {
                  "type": "string"
                },
                "healthy": {
                  "type": "boolean"
                }
              }
            }
          },
          "401": {
            "description": "unauthorized"
          },
          "500": {
            "description": "internal server error"
          },
          "502": {
            "description": "bad gateway; agent not reachable"
          }
        },
        "security": [
          {
            "key": []
          }
        ]
      }
    },
    "/agent/status": {
      "post": {
        "tags": [
          "agent"
        ],
        "operationId": "remoteStatus",
        "parameters": [
          {
            "name": "body",
            "in": "body",
            "schema": {
              "properties": {
                "envZId": {
                  "type": "string"
                }
              }
            }
          }
        ],
        "responses": {
          "200": {
            "description": "ok",
            "schema": {
              "properties": {
                "accesses": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "bindAddress": {
                        "type": "string"
                      },
                      "failure": {
                        "type": "object",
                        "properties": {
                          "count": {
                            "type": "integer"
                          },
                          "id": {
                            "type": "string"
                          },
                          "lastError": {
                            "type": "string"
                          },
                          "nextRetry": {
                            "type": "string"
                          }
                        }
                      },
                      "frontendToken": {
                        "type": "string"
                      },
                      "responseHeaders": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      },
                      "status": {
                        "type": "string"
                      },
                      "token": {
                        "type": "string"
                      }
                    }
                  }
                },
                "shares": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "backendEndpoint": {
                        "type": "string"
                      },
                      "backendMode": {
                        "type": "string"
                      },
                      "failure": {
                        "type": "object",
                        "properties": {
                          "count": {
                            "type": "integer"
                          },
                          "id": {
                            "type": "string"
                          },
                          "lastError": {
                            "type": "string"
                          },
                          "nextRetry": {
                            "type": "string"
                          }
                        }
                      },
                      "frontendEndpoints": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      },
                      "open": {
                        "type": "boolean"
                      },
                      "shareMode": {
                        "type": "string"
                      },
                      "status": {
                        "type": "string"
                      },
                      "token": {
                        "type": "string"
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "unauthorized"
          },
          "500": {
            "description": "internal server error"
          },
          "502": {
            "description": "bad gateway; agent not reachable"
          }
        },
        "security": [
          {
            "key": []
          }
        ]
      }
    },
    "/agent/unaccess": {
      "post": {
        "tags": [
          "agent"
        ],
        "operationId": "remoteUnaccess",
        "parameters": [
          {
            "name": "body",
            "in": "body",
            "schema": {
              "properties": {
                "envZId": {
                  "type": "string"
                },
                "frontendToken": {
                  "type": "string"
                }
              }
            }
          }
        ],
        "responses": {
          "200": {
            "description": "ok"
          },
          "401": {
            "description": "unauthorized"
          },
          "500": {
            "description": "internal server error"
          },
          "502": {
            "description": "bad gateway; agent not reachable"
          }
        },
        "security": [
          {
            "key": []
          }
        ]
      }
    },
    "/agent/unenroll": {
      "post": {
        "tags": [
          "agent"
        ],
        "operationId": "unenroll",
        "parameters": [
          {
            "name": "body",
            "in": "body",
            "schema": {
              "properties": {
                "envZId": {
                  "type": "string"
                }
              }
            }
          }
        ],
        "responses": {
          "200": {
            "description": "ok"
          },
          "400": {
            "description": "bad request; not enrolled"
          },
          "401": {
            "description": "unauthorized"
          },
          "500": {
            "description": "internal server error"
          }
        },
        "security": [
          {
            "key": []
          }
        ]
      }
    },
    "/agent/unshare": {
      "post": {
        "tags": [
          "agent"
        ],
        "operationId": "remoteUnshare",
        "parameters": [
          {
            "name": "body",
            "in": "body",
            "schema": {
              "properties": {
                "envZId": {
                  "type": "string"
                },
                "token": {
                  "type": "string"
                }
              }
            }
          }
        ],
        "responses": {
          "200": {
            "description": "ok"
          },
          "401": {
            "description": "unauthorized"
          },
          "500": {
            "description": "internal server error"
          },
          "502": {
            "description": "bad gateway; agent not reachable"
          }
        },
        "security": [
          {
            "key": []
          }
        ]
      }
    },
    "/applied-limit-class": {
      "post": {
        "tags": [
          "admin"
        ],
        "operationId": "applyLimitClasses",
        "parameters": [
          {
            "name": "body",
            "in": "body",
            "schema": {
              "properties": {
                "email": {
                  "type": "string"
                },
                "limitClassIds": {
                  "type": "array",
                  "items": {
                    "type": "integer"
                  }
                }
              }
            }
          }
        ],
        "responses": {
          "200": {
            "description": "applied"
          },
          "401": {
            "description": "unauthorized"
          },
          "404": {
            "description": "account or limit class not found"
          },
          "500": {
            "description": "internal server error"
          }
        },
        "security": [
          {
            "key": []
          }
        ]
      },
      "delete": {
        "tags": [
          "admin"
        ],
        "operationId": "removeAppliedLimitClasses",
        "parameters": [
          {
            "name": "body",
            "in": "body",
            "schema": {
              "properties": {
                "email": {
                  "type": "string"
                },
                "limitClassIds": {
                  "type": "array",
                  "items": {
                    "type": "integer"
                  }
                }
              }
            }
          }
        ],
        "responses": {
          "200": {
            "description": "removed"
          },
          "401": {
            "description": "unauthorized"
          },
          "404": {
            "description": "account not found"
          },
          "500": {
            "description": "internal server error"
          }
        },
        "security": [
          {
            "key": []
          }
        ]
      }
    },
    "/applied-limit-class/list": {
      "post": {
        "tags": [
          "admin"
        ],
        "operationId": "listAppliedLimitClasses",
        "parameters": [
          {
            "name": "body",
            "in": "body",
            "schema": {
              "properties": {
                "email": {
                  "type": "string"
                }
              }
            }
          }
        ],
        "responses": {
          "200": {
            "description": "applied limit classes",
            "schema": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/limitClass"
              }
            }
          },
          "401": {
            "description": "unauthorized"
          },
          "404": {
            "description": "account not found"
          },
          "500": {
            "description": "internal server error"
          }
        },
        "security": [
          {
            "key": []
          }
        ]
      }
    },
    "/changePassword": {
      "post": {
        "tags": [
          "account"
        ],
        "operationId": "changePassword",
        "parameters": [
          {
            "name": "body",
            "in": "body",
            "schema": {
              "properties": {
                "email": {
                  "type": "string"
                },
                "newPassword": {
                  "type": "string"
                },
                "oldPassword": {
                  "type": "string"
                }
              }
            }
          }
        ],
        "responses": {
          "200": {
            "description": "password changed"
          },
          "400": {
            "description": "password not changed"
          },
          "401": {
            "description": "unauthorized"
          },
          "422": {
            "description": "password validation failure",
            "schema": {
              "$ref": "#/definitions/errorMessage"
            }
          },
          "500": {
            "description": "internal server error"
          }
        },
        "security": [
          {
            "key": []
          }
        ]
      }
    },
    "/clientVersionCheck": {
      "post": {
        "tags": [
          "metadata"
        ],
        "operationId": "clientVersionCheck",
        "parameters": [
          {
            "name": "body",
            "in": "body",
            "schema": {
              "properties": {
                "clientVersion": {
                  "type": "string"
                }
              }
            }
          }
        ],
        "responses": {
          "200": {
            "description": "compatible"
          },
          "400": {
            "description": "not compatible",
            "schema": {
              "type": "string"
            }
          }
        }
      }
    },
    "/configuration": {
      "get": {
        "tags": [
          "metadata"
        ],
        "operationId": "configuration",
        "responses": {
          "200": {
            "description": "current configuration",
            "schema": {
              "$ref": "#/definitions/configuration"
            }
          }
        }
      }
    },
    "/detail/account": {
      "get": {
        "tags": [
          "metadata"
        ],
        "operationId": "getAccountDetail",
        "responses": {
          "200": {
            "description": "ok",
            "schema": {
              "$ref": "#/definitions/environments"
            }
          },
          "500": {
            "description": "internal server error"
          }
        },
        "security": [
          {
            "key": []
          }
        ]
      }
    },
    "/detail/environment/{envZId}": {
      "get": {
        "tags": [
          "metadata"
        ],
        "operationId": "getEnvironmentDetail",
        "parameters": [
          {
            "type": "string",
            "name": "envZId",
            "in": "path",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "ok",
            "schema": {
              "$ref": "#/definitions/environmentAndResources"
            }
          },
          "401": {
            "description": "unauthorized"
          },
          "404": {
            "description": "not found"
          },
          "500": {
            "description": "internal server error"
          }
        },
        "security": [
          {
            "key": []
          }
        ]
      }
    },
    "/detail/frontend/{frontendId}": {
      "get": {
        "tags": [
          "metadata"
        ],
        "operationId": "getFrontendDetail",
        "parameters": [
          {
            "type": "integer",
            "name": "frontendId",
            "in": "path",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "ok",
            "schema": {
              "$ref": "#/definitions/frontend"
            }
          },
          "401": {
            "description": "unauthorized"
          },
          "404": {
            "description": "not found"
          },
          "500": {
            "description": "internal server error"
          }
        },
        "security": [
          {
            "key": []
          }
        ]
      }
    },
    "/detail/share/{shareToken}": {
      "get": {
        "tags": [
          "metadata"
        ],
        "operationId": "getShareDetail",
        "parameters": [
          {
            "type": "string",
            "name": "shareToken",
            "in": "path",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "ok",
            "schema": {
              "$ref": "#/definitions/share"
            }
          },
          "401": {
            "description": "unauthorized"
          },
          "404": {
            "description": "not found"
          },
          "500": {
            "description": "internal server error"
          }
        },
        "security": [
          {
            "key": []
          }
        ]
      }
    },
    "/disable": {
      "post": {
        "tags": [
          "environment"
        ],
        "operationId": "disable",
        "parameters": [
          {
            "name": "body",
            "in": "body",
            "schema": {
              "properties": {
                "identity": {
                  "type": "string"
                }
              }
            }
          }
        ],
        "responses": {
          "200": {
            "description": "environment disabled"
          },
          "401": {
            "description": "invalid environment"
          },
          "500": {
            "description": "internal server error"
          },
          "503": {
            "description": "service unavailable",
            "headers": {
              "Retry-After": {
                "type": "integer",
                "description": "seconds to wait before retrying"
              }
            }
          }
        },
        "security": [
          {
            "key": []
          }
        ]
      }
    },
    "/enable": {
      "post": {
        "tags": [
          "environment"
        ],
        "operationId": "enable",
        "parameters": [
          {
            "name": "body",
            "in": "body",
            "schema": {
              "properties": {
                "description": {
                  "type": "string"
                },
                "host": {
                  "type": "string"
                }
              }
            }
          }
        ],
        "responses": {
          "201": {
            "description": "environment enabled",
            "schema": {
              "properties": {
                "cfg": {
                  "type": "string"
                },
                "identity": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "description": "unauthorized"
          },
          "404": {
            "description": "account not found"
          },
          "500": {
            "description": "internal server error"
          },
          "503": {
            "description": "service unavailable",
            "headers": {
              "Retry-After": {
                "type": "integer",
                "description": "seconds to wait before retrying"
              }
            }
          }
        },
        "security": [
          {
            "key": []
          }
        ]
      }
    },
    "/environments": {
      "get": {
        "tags": [
          "metadata"
        ],
        "operationId": "listEnvironments",
        "parameters": [
          {
            "type": "string",
            "description": "filter by description (case-insensitive substring match)",
            "name": "description",
            "in": "query"
          },
          {
            "type": "string",
            "description": "filter by host (case-insensitive substring match)",
            "name": "host",
            "in": "query"
          },
          {
            "type": "string",
            "description": "filter by address (exact match)",
            "name": "address",
            "in": "query"
          },
          {
            "type": "boolean",
            "description": "filter by whether agent is enrolled",
            "name": "remoteAgent",
            "in": "query"
          },
          {
            "type": "boolean",
            "description": "filter by whether environment has active shares",
            "name": "hasShares",
            "in": "query"
          },
          {
            "type": "boolean",
            "description": "filter by whether environment has active accesses",
            "name": "hasAccesses",
            "in": "query"
          },
          {
            "type": "boolean",
            "description": "filter by whether environment has metrics within activityDuration timeframe",
            "name": "hasActivity",
            "in": "query"
          },
          {
            "type": "boolean",
            "description": "filter environments WITHOUT recent activity (inverse of hasActivity)",
            "name": "idle",
            "in": "query"
          },
          {
            "type": "string",
            "description": "filter by share count with operator (e.g., \"\u003e0\", \"\u003e=5\", \"=0\", \"\u003c10\", \"\u003c=3\")",
            "name": "shareCount",
            "in": "query"
          },
          {
            "type": "string",
            "description": "filter by access count with operator (e.g., \"\u003e0\", \"\u003e=5\", \"=0\", \"\u003c10\", \"\u003c=3\")",
            "name": "accessCount",
            "in": "query"
          },
          {
            "type": "string",
            "description": "filter by created date (RFC3339 datetime, inclusive)",
            "name": "createdAfter",
            "in": "query"
          },
          {
            "type": "string",
            "description": "filter by created date (RFC3339 datetime, inclusive)",
            "name": "createdBefore",
            "in": "query"
          },
          {
            "type": "string",
            "description": "filter by updated date (RFC3339 datetime, inclusive)",
            "name": "updatedAfter",
            "in": "query"
          },
          {
            "type": "string",
            "description": "filter by updated date (RFC3339 datetime, inclusive)",
            "name": "updatedBefore",
            "in": "query"
          },
          {
            "type": "string",
            "description": "duration for hasActivity filter (e.g., \"24h\", \"7d\", \"30d\"). default \"24h\", maximum \"30d\" (720h)",
            "name": "activityDuration",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "list of environments",
            "schema": {
              "$ref": "#/definitions/environmentsList"
            }
          },
          "400": {
            "description": "bad request (e.g., activityDuration exceeds 30d, invalid date format, invalid operator)",
            "schema": {
              "$ref": "#/definitions/errorMessage"
            }
          },
          "401": {
            "description": "unauthorized"
          },
          "500": {
            "description": "internal server error",
            "schema": {
              "$ref": "#/definitions/errorMessage"
            }
          }
        },
        "security": [
          {
            "key": []
          }
        ]
      }
    },
    "/frontend": {
      "post": {
        "tags": [
          "admin"
        ],
        "operationId": "createFrontend",
        "parameters": [
          {
            "name": "body",
            "in": "body",
            "schema": {
              "type": "object",
              "properties": {
                "dynamic": {
                  "type": "boolean"
                },
                "permissionMode": {
                  "type": "string",
                  "enum": [
                    "open",
                    "closed"
                  ]
                },
                "public_name": {
                  "type": "string"
                },
                "url_template": {
                  "type": "string"
                },
                "zId": {
                  "type": "string"
                }
              }
            }
          }
        ],
        "responses": {
          "201": {
            "description": "frontend created",
            "schema": {
              "type": "object",
              "properties": {
                "frontendToken": {
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "description": "bad request"
          },
          "401": {
            "description": "unauthorized"
          },
          "404": {
            "description": "not found"
          },
          "500": {
            "description": "internal server error"
          }
        },
        "security": [
          {
            "key": []
          }
        ]
      },
      "delete": {
        "tags": [
          "admin"
        ],
        "operationId": "deleteFrontend",
        "parameters": [
          {
            "name": "body",
            "in": "body",
            "schema": {
              "type": "object",
              "properties": {
                "frontendToken": {
                  "type": "string"
                }
              }
            }
          }
        ],
        "responses": {
          "200": {
            "description": "frontend deleted"
          },
          "401": {
            "description": "unauthorized"
          },
          "404": {
            "description": "not found"
          },
          "500": {
            "description": "internal server error"
          }
        },
        "security": [
          {
            "key": []
          }
        ]
      },
      "patch": {
        "tags": [
          "admin"
        ],
        "operationId": "updateFrontend",
        "parameters": [
          {
            "name": "body",
            "in": "body",
            "schema": {
              "type": "object",
              "properties": {
                "dynamic": {
                  "type": "boolean"
                },
                "dynamicSet": {
                  "type": "boolean"
                },
                "frontendToken": {
                  "type": "string"
                },
                "publicName": {
                  "type": "string"
                },
                "urlTemplate": {
                  "type": "string"
                }
              }
            }
          }
        ],
        "responses": {
          "200": {
            "description": "frontend updated"
          },
          "401": {
            "description": "unauthorized"
          },
          "404": {
            "description": "not found"
          },
          "500": {
            "description": "internal server error"
          }
        },
        "security": [
          {
            "key": []
          }
        ]
      }
    },
    "/frontend/grant": {
      "post": {
        "tags": [
          "admin"
        ],
        "operationId": "addFrontendGrant",
        "parameters": [
          {
            "name": "body",
            "in": "body",
            "schema": {
              "type": "object",
              "properties": {
                "email": {
                  "type": "string"
                },
                "frontendToken": {
                  "type": "string"
                }
              }
            }
          }
        ],
        "responses": {
          "200": {
            "description": "ok"
          },
          "401": {
            "description": "unauthorized"
          },
          "404": {
            "description": "not found",
            "schema": {
              "$ref": "#/definitions/errorMessage"
            }
          },
          "500": {
            "description": "internal server error"
          }
        },
        "security": [
          {
            "key": []
          }
        ]
      },
      "delete": {
        "tags": [
          "admin"
        ],
        "operationId": "deleteFrontendGrant",
        "parameters": [
          {
            "name": "body",
            "in": "body",
            "schema": {
              "type": "object",
              "properties": {
                "email": {
                  "type": "string"
                },
                "frontendToken": {
                  "type": "string"
                }
              }
            }
          }
        ],
        "responses": {
          "200": {
            "description": "ok"
          },
          "401": {
            "description": "unauthorized"
          },
          "404": {
            "description": "not found",
            "schema": {
              "$ref": "#/definitions/errorMessage"
            }
          },
          "500": {
            "description": "internal server error"
          }
        },
        "security": [
          {
            "key": []
          }
        ]
      }
    },
    "/frontend/namespace/mapping/{frontendToken}": {
      "get": {
        "tags": [
          "admin"
        ],
        "operationId": "listFrontendNamespaceMappings",
        "parameters": [
          {
            "type": "string",
            "name": "frontendToken",
            "in": "path",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "frontend namespace mappings listed",
            "schema": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "createdAt": {
                    "type": "integer"
                  },
                  "frontendToken": {
                    "type": "string"
                  },
                  "isDefault": {
                    "type": "boolean"
                  },
                  "namespaceToken": {
                    "type": "string"
                  }
                }
              }
            }
          },
          "401": {
            "description": "unauthorized"
          },
          "404": {
            "description": "frontend not found"
          },
          "500": {
            "description": "internal server error"
          }
        },
        "security": [
          {
            "key": []
          }
        ]
      }
    },
    "/frontends": {
      "get": {
        "tags": [
          "admin"
        ],
        "operationId": "listFrontends",
        "responses": {
          "200": {
            "description": "ok",
            "schema": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "createdAt": {
                    "type": "integer"
                  },
                  "dynamic": {
                    "type": "boolean"
                  },
                  "frontendToken": {
                    "type": "string"
                  },
                  "permissionMode": {
                    "type": "string"
                  },
                  "publicName": {
                    "type": "string"
                  },
                  "updatedAt": {
                    "type": "integer"
                  },
                  "urlTemplate": {
                    "type": "string"
                  },
                  "zId": {
                    "type": "string"
                  }
                }
              }
            }
          },
          "401": {
            "description": "unauthorized"
          },
          "500": {
            "description": "internal server error"
          }
        },
        "security": [
          {
            "key": []
          }
        ]
      }
    },
    "/identity": {
      "post": {
        "tags": [
          "admin"
        ],
        "operationId": "createIdentity",
        "parameters": [
          {
            "name": "body",
            "in": "body",
            "schema": {
              "properties": {
                "name": {
                  "type": "string"
                }
              }
            }
          }
        ],
        "responses": {
          "201": {
            "description": "created",
            "schema": {
              "properties": {
                "cfg": {
                  "type": "string"
                },
                "identity": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "description": "unauthorized"
          },
          "500": {
            "description": "internal server error"
          }
        },
        "security": [
          {
            "key": []
          }
        ]
      },
      "delete": {
        "tags": [
          "admin"
        ],
        "operationId": "deleteIdentity",
        "parameters": [
          {
            "name": "body",
            "in": "body",
            "schema": {
              "properties": {
                "zId": {
                  "type": "string"
                }
              }
            }
          }
        ],
        "responses": {
          "200": {
            "description": "deleted"
          },
          "401": {
            "description": "unauthorized"
          },
          "404": {
            "description": "not found"
          },
          "500": {
            "description": "internal server error"
          }
        },
        "security": [
          {
            "key": []
          }
        ]
      }
    },
    "/invite": {
      "post": {
        "tags": [
          "account"
        ],
        "operationId": "invite",
        "parameters": [
          {
            "name": "body",
            "in": "body",
            "schema": {
              "properties": {
                "email": {
                  "type": "string"
                },
                "inviteToken": {
                  "type": "string"
                }
              }
            }
          }
        ],
        "responses": {
          "201": {
            "description": "invitation created"
          },
          "400": {
            "description": "invitation not created (already exists)",
            "schema": {
              "$ref": "#/definitions/errorMessage"
            }
          },
          "401": {
            "description": "unauthorized"
          },
          "500": {
            "description": "internal server error"
          }
        }
      }
    },
    "/invite/token/generate": {
      "post": {
        "tags": [
          "admin"
        ],
        "operationId": "inviteTokenGenerate",
        "parameters": [
          {
            "name": "body",
            "in": "body",
            "schema": {
              "properties": {
                "inviteTokens": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                }
              }
            }
          }
        ],
        "responses": {
          "201": {
            "description": "invite tokens created"
          },
          "400": {
            "description": "invite tokens not created"
          },
          "401": {
            "description": "unauthorized"
          },
          "500": {
            "description": "internal server error"
          }
        },
        "security": [
          {
            "key": []
          }
        ]
      }
    },
    "/limit-class/list": {
      "post": {
        "tags": [
          "admin"
        ],
        "operationId": "listLimitClasses",
        "parameters": [
          {
            "name": "body",
            "in": "body",
            "schema": {
              "properties": {
                "label": {
                  "type": "string"
                }
              }
            }
          }
        ],
        "responses": {
          "200": {
            "description": "limit classes",
            "schema": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/limitClass"
              }
            }
          },
          "401": {
            "description": "unauthorized"
          },
          "500": {
            "description": "internal server error"
          }
        },
        "security": [
          {
            "key": []
          }
        ]
      }
    },
    "/login": {
      "post": {
        "tags": [
          "account"
        ],
        "operationId": "login",
        "parameters": [
          {
            "name": "body",
            "in": "body",
            "schema": {
              "properties": {
                "email": {
                  "type": "string"
                },
                "password": {
                  "type": "string"
                }
              }
            }
          }
        ],
        "responses": {
          "200": {
            "description": "login successful",
            "schema": {
              "type": "string"
            }
          },
          "401": {
            "description": "invalid login"
          }
        }
      }
    },
    "/members/{organizationToken}": {
      "get": {
        "tags": [
          "metadata"
        ],
        "operationId": "listOrgMembers",
        "parameters": [
          {
            "type": "string",
            "name": "organizationToken",
            "in": "path",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "ok",
            "schema": {
              "properties": {
                "members": {
                  "type": "array",
                  "items": {
                    "properties": {
                      "admin": {
                        "type": "boolean"
                      },
                      "email": {
                        "type": "string"
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "not found"
          },
          "500": {
            "description": "internal server error"
          }
        },
        "security": [
          {
            "key": []
          }
        ]
      }
    },
    "/memberships": {
      "get": {
        "tags": [
          "metadata"
        ],
        "operationId": "listMemberships",
        "responses": {
          "200": {
            "description": "ok",
            "schema": {
              "properties": {
                "memberships": {
                  "type": "array",
                  "items": {
                    "properties": {
                      "admin": {
                        "type": "boolean"
                      },
                      "description": {
                        "type": "string"
                      },
                      "organizationToken": {
                        "type": "string"
                      }
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "internal server error"
          }
        },
        "security": [
          {
            "key": []
          }
        ]
      }
    },
    "/metrics/account": {
      "get": {
        "tags": [
          "metadata"
        ],
        "operationId": "getAccountMetrics",
        "parameters": [
          {
            "type": "string",
            "name": "duration",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "account metrics",
            "schema": {
              "$ref": "#/definitions/metrics"
            }
          },
          "400": {
            "description": "bad request"
          },
          "500": {
            "description": "internal server error"
          }
        },
        "security": [
          {
            "key": []
          }
        ]
      }
    },
    "/metrics/environment/{envId}": {
      "get": {
        "tags": [
          "metadata"
        ],
        "operationId": "getEnvironmentMetrics",
        "parameters": [
          {
            "type": "string",
            "name": "envId",
            "in": "path",
            "required": true
          },
          {
            "type": "string",
            "name": "duration",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "environment metrics",
            "schema": {
              "$ref": "#/definitions/metrics"
            }
          },
          "400": {
            "description": "bad request"
          },
          "401": {
            "description": "unauthorized"
          },
          "500": {
            "description": "internal server error"
          }
        },
        "security": [
          {
            "key": []
          }
        ]
      }
    },
    "/metrics/share/{shareToken}": {
      "get": {
        "tags": [
          "metadata"
        ],
        "operationId": "getShareMetrics",
        "parameters": [
          {
            "type": "string",
            "name": "shareToken",
            "in": "path",
            "required": true
          },
          {
            "type": "string",
            "name": "duration",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "share metrics",
            "schema": {
              "$ref": "#/definitions/metrics"
            }
          },
          "400": {
            "description": "bad request"
          },
          "401": {
            "description": "unauthorized"
          },
          "500": {
            "description": "internal server error"
          }
        },
        "security": [
          {
            "key": []
          }
        ]
      }
    },
    "/name/{namespaceToken}/{name}": {
      "get": {
        "tags": [
          "admin"
        ],
        "operationId": "getName",
        "parameters": [
          {
            "type": "string",
            "name": "namespaceToken",
            "in": "path",
            "required": true
          },
          {
            "type": "string",
            "name": "name",
            "in": "path",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "ok",
            "schema": {
              "type": "object",
              "required": [
                "namespaceToken",
                "namespaceName",
                "name",
                "accountEmail",
                "shareToken",
                "reserved",
                "createdAt"
              ],
              "properties": {
                "accountEmail": {
                  "type": "string"
                },
                "createdAt": {
                  "type": "integer"
                },
                "name": {
                  "type": "string"
                },
                "namespaceName": {
                  "type": "string"
                },
                "namespaceToken": {
                  "type": "string"
                },
                "reserved": {
                  "type": "boolean"
                },
                "shareToken": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "description": "unauthorized"
          },
          "404": {
            "description": "not found"
          },
          "500": {
            "description": "internal server error"
          }
        },
        "security": [
          {
            "key": []
          }
        ]
      }
    },
    "/namespace": {
      "post": {
        "tags": [
          "admin"
        ],
        "operationId": "createNamespace",
        "parameters": [
          {
            "name": "body",
            "in": "body",
            "schema": {
              "properties": {
                "description": {
                  "type": "string"
                },
                "name": {
                  "type": "string"
                },
                "open": {
                  "type": "boolean"
                },
                "token": {
                  "type": "string"
                }
              }
            }
          }
        ],
        "responses": {
          "201": {
            "description": "namespace created",
            "schema": {
              "properties": {
                "namespaceToken": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "description": "unauthorized"
          },
          "409": {
            "description": "namespace already exists"
          },
          "500": {
            "description": "internal server error"
          }
        },
        "security": [
          {
            "key": []
          }
        ]
      },
      "delete": {
        "tags": [
          "admin"
        ],
        "operationId": "deleteNamespace",
        "parameters": [
          {
            "name": "body",
            "in": "body",
            "schema": {
              "properties": {
                "namespaceToken": {
                  "type": "string"
                }
              }
            }
          }
        ],
        "responses": {
          "200": {
            "description": "namespace deleted"
          },
          "401": {
            "description": "unauthorized"
          },
          "404": {
            "description": "not found"
          },
          "500": {
            "description": "internal server error"
          }
        },
        "security": [
          {
            "key": []
          }
        ]
      },
      "patch": {
        "tags": [
          "admin"
        ],
        "operationId": "updateNamespace",
        "parameters": [
          {
            "name": "body",
            "in": "body",
            "schema": {
              "properties": {
                "description": {
                  "type": "string"
                },
                "name": {
                  "type": "string"
                },
                "namespaceToken": {
                  "type": "string"
                },
                "open": {
                  "type": "boolean"
                },
                "openSet": {
                  "type": "boolean"
                }
              }
            }
          }
        ],
        "responses": {
          "200": {
            "description": "namespace updated"
          },
          "401": {
            "description": "unauthorized"
          },
          "404": {
            "description": "not found"
          },
          "500": {
            "description": "internal server error"
          }
        },
        "security": [
          {
            "key": []
          }
        ]
      }
    },
    "/namespace/frontend/mapping": {
      "post": {
        "tags": [
          "admin"
        ],
        "operationId": "addNamespaceFrontendMapping",
        "parameters": [
          {
            "name": "body",
            "in": "body",
            "schema": {
              "type": "object",
              "properties": {
                "frontendToken": {
                  "type": "string"
                },
                "isDefault": {
                  "type": "boolean"
                },
                "namespaceToken": {
                  "type": "string"
                }
              }
            }
          }
        ],
        "responses": {
          "200": {
            "description": "namespace frontend mapping added"
          },
          "401": {
            "description": "unauthorized"
          },
          "404": {
            "description": "not found"
          },
          "500": {
            "description": "internal server error"
          }
        },
        "security": [
          {
            "key": []
          }
        ]
      },
      "delete": {
        "tags": [
          "admin"
        ],
        "operationId": "removeNamespaceFrontendMapping",
        "parameters": [
          {
            "name": "body",
            "in": "body",
            "schema": {
              "type": "object",
              "properties": {
                "frontendToken": {
                  "type": "string"
                },
                "namespaceToken": {
                  "type": "string"
                }
              }
            }
          }
        ],
        "responses": {
          "200": {
            "description": "namespace frontend mapping removed"
          },
          "401": {
            "description": "unauthorized"
          },
          "404": {
            "description": "not found"
          },
          "500": {
            "description": "internal server error"
          }
        },
        "security": [
          {
            "key": []
          }
        ]
      }
    },
    "/namespace/frontend/mapping/{namespaceToken}": {
      "get": {
        "tags": [
          "admin"
        ],
        "operationId": "listNamespaceFrontendMappings",
        "parameters": [
          {
            "type": "string",
            "name": "namespaceToken",
            "in": "path",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "namespace frontend mappings listed",
            "schema": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "createdAt": {
                    "type": "integer"
                  },
                  "frontendToken": {
                    "type": "string"
                  },
                  "isDefault": {
                    "type": "boolean"
                  },
                  "namespaceToken": {
                    "type": "string"
                  }
                }
              }
            }
          },
          "401": {
            "description": "unauthorized"
          },
          "404": {
            "description": "namespace not found"
          },
          "500": {
            "description": "internal server error"
          }
        },
        "security": [
          {
            "key": []
          }
        ]
      }
    },
    "/namespace/grant": {
      "post": {
        "tags": [
          "admin"
        ],
        "operationId": "addNamespaceGrant",
        "parameters": [
          {
            "name": "body",
            "in": "body",
            "schema": {
              "type": "object",
              "properties": {
                "email": {
                  "type": "string"
                },
                "namespaceToken": {
                  "type": "string"
                }
              }
            }
          }
        ],
        "responses": {
          "200": {
            "description": "namespace grant added"
          },
          "401": {
            "description": "unauthorized"
          },
          "404": {
            "description": "not found"
          },
          "500": {
            "description": "internal server error"
          }
        },
        "security": [
          {
            "key": []
          }
        ]
      },
      "delete": {
        "tags": [
          "admin"
        ],
        "operationId": "removeNamespaceGrant",
        "parameters": [
          {
            "name": "body",
            "in": "body",
            "schema": {
              "type": "object",
              "properties": {
                "email": {
                  "type": "string"
                },
                "namespaceToken": {
                  "type": "string"
                }
              }
            }
          }
        ],
        "responses": {
          "200": {
            "description": "namespace grant removed"
          },
          "401": {
            "description": "unauthorized"
          },
          "404": {
            "description": "not found"
          },
          "500": {
            "description": "internal server error"
          }
        },
        "security": [
          {
            "key": []
          }
        ]
      }
    },
    "/namespaces": {
      "get": {
        "tags": [
          "admin"
        ],
        "operationId": "listNamespaces",
        "responses": {
          "200": {
            "description": "ok",
            "schema": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "createdAt": {
                    "type": "integer"
                  },
                  "description": {
                    "type": "string"
                  },
                  "name": {
                    "type": "string"
                  },
                  "namespaceToken": {
                    "type": "string"
                  },
                  "open": {
                    "type": "boolean"
                  },
                  "updatedAt": {
                    "type": "integer"
                  }
                }
              }
            }
          },
          "401": {
            "description": "unauthorized"
          },
          "500": {
            "description": "internal server error"
          }
        },
        "security": [
          {
            "key": []
          }
        ]
      }
    },
    "/organization": {
      "post": {
        "tags": [
          "admin"
        ],
        "operationId": "createOrganization",
        "parameters": [
          {
            "name": "body",
            "in": "body",
            "schema": {
              "properties": {
                "description": {
                  "type": "string"
                }
              }
            }
          }
        ],
        "responses": {
          "201": {
            "description": "organization created",
            "schema": {
              "properties": {
                "organizationToken": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "description": "unauthorized"
          },
          "500": {
            "description": "internal server error"
          }
        },
        "security": [
          {
            "key": []
          }
        ]
      },
      "delete": {
        "tags": [
          "admin"
        ],
        "operationId": "deleteOrganization",
        "parameters": [
          {
            "name": "body",
            "in": "body",
            "schema": {
              "properties": {
                "organizationToken": {
                  "type": "string"
                }
              }
            }
          }
        ],
        "responses": {
          "200": {
            "description": "organization deleted"
          },
          "401": {
            "description": "unauthorized"
          },
          "404": {
            "description": "organization not found"
          },
          "500": {
            "description": "internal server error"
          }
        },
        "security": [
          {
            "key": []
          }
        ]
      }
    },
    "/organization/add": {
      "post": {
        "tags": [
          "admin"
        ],
        "operationId": "addOrganizationMember",
        "parameters": [
          {
            "name": "body",
            "in": "body",
            "schema": {
              "properties": {
                "admin": {
                  "type": "boolean"
                },
                "email": {
                  "type": "string"
                },
                "organizationToken": {
                  "type": "string"
                }
              }
            }
          }
        ],
        "responses": {
          "201": {
            "description": "member added"
          },
          "401": {
            "description": "unauthorized"
          },
          "404": {
            "description": "not found"
          },
          "500": {
            "description": "internal server error"
          }
        },
        "security": [
          {
            "key": []
          }
        ]
      }
    },
    "/organization/list": {
      "post": {
        "tags": [
          "admin"
        ],
        "operationId": "listOrganizationMembers",
        "parameters": [
          {
            "name": "body",
            "in": "body",
            "schema": {
              "properties": {
                "organizationToken": {
                  "type": "string"
                }
              }
            }
          }
        ],
        "responses": {
          "200": {
            "description": "list organization members",
            "schema": {
              "properties": {
                "members": {
                  "type": "array",
                  "items": {
                    "properties": {
                      "admin": {
                        "type": "boolean"
                      },
                      "email": {
                        "type": "string"
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "unauthorized"
          },
          "404": {
            "description": "not found"
          },
          "500": {
            "description": "internal server error"
          }
        },
        "security": [
          {
            "key": []
          }
        ]
      }
    },
    "/organization/remove": {
      "post": {
        "tags": [
          "admin"
        ],
        "operationId": "removeOrganizationMember",
        "parameters": [
          {
            "name": "body",
            "in": "body",
            "schema": {
              "properties": {
                "email": {
                  "type": "string"
                },
                "organizationToken": {
                  "type": "string"
                }
              }
            }
          }
        ],
        "responses": {
          "200": {
            "description": "member removed"
          },
          "401": {
            "description": "unauthorized"
          },
          "404": {
            "description": "not found"
          },
          "500": {
            "description": "internal server error"
          }
        },
        "security": [
          {
            "key": []
          }
        ]
      }
    },
    "/organizations": {
      "get": {
        "tags": [
          "admin"
        ],
        "operationId": "listOrganizations",
        "responses": {
          "200": {
            "description": "ok",
            "schema": {
              "properties": {
                "organizations": {
                  "type": "array",
                  "items": {
                    "properties": {
                      "description": {
                        "type": "string"
                      },
                      "organizationToken": {
                        "type": "string"
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "unauthorized"
          },
          "500": {
            "description": "internal server error"
          }
        },
        "security": [
          {
            "key": []
          }
        ]
      }
    },
    "/overview": {
      "get": {
        "tags": [
          "metadata"
        ],
        "operationId": "overview",
        "responses": {
          "200": {
            "description": "overview returned",
            "schema": {
              "$ref": "#/definitions/overview"
            }
          },
          "500": {
            "description": "internal server error",
            "schema": {
              "$ref": "#/definitions/errorMessage"
            }
          }
        },
        "security": [
          {
            "key": []
          }
        ]
      }
    },
    "/overview/{organizationToken}/{accountEmail}": {
      "get": {
        "tags": [
          "metadata"
        ],
        "operationId": "orgAccountOverview",
        "parameters": [
          {
            "type": "string",
            "name": "organizationToken",
            "in": "path",
            "required": true
          },
          {
            "type": "string",
            "name": "accountEmail",
            "in": "path",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "ok",
            "schema": {
              "$ref": "#/definitions/overview"
            }
          },
          "404": {
            "description": "not found"
          },
          "500": {
            "description": "internal server error"
          }
        },
        "security": [
          {
            "key": []
          }
        ]
      }
    },
    "/regenerateAccountToken": {
      "post": {
        "tags": [
          "account"
        ],
        "operationId": "regenerateAccountToken",
        "parameters": [
          {
            "name": "body",
            "in": "body",
            "schema": {
              "properties": {
                "emailAddress": {
                  "type": "string"
                }
              }
            }
          }
        ],
        "responses": {
          "200": {
            "description": "regenerate account token",
            "schema": {
              "properties": {
                "accountToken": {
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "description": "account not found"
          },
          "500": {
            "description": "internal server error"
          }
        },
        "security": [
          {
            "key": []
          }
        ]
      }
    },
    "/register": {
      "post": {
        "tags": [
          "account"
        ],
        "operationId": "register",
        "parameters": [
          {
            "name": "body",
            "in": "body",
            "schema": {
              "properties": {
                "password": {
                  "type": "string"
                },
                "registerToken": {
                  "type": "string"
                }
              }
            }
          }
        ],
        "responses": {
          "200": {
            "description": "account created",
            "schema": {
              "properties": {
                "accountToken": {
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "description": "request not found"
          },
          "422": {
            "description": "password validation failure",
            "schema": {
              "$ref": "#/definitions/errorMessage"
            }
          },
          "500": {
            "description": "internal server error"
          }
        }
      }
    },
    "/resetPassword": {
      "post": {
        "tags": [
          "account"
        ],
        "operationId": "resetPassword",
        "parameters": [
          {
            "name": "body",
            "in": "body",
            "schema": {
              "properties": {
                "password": {
                  "type": "string"
                },
                "resetToken": {
                  "type": "string"
                }
              }
            }
          }
        ],
        "responses": {
          "200": {
            "description": "password reset"
          },
          "404": {
            "description": "request not found"
          },
          "422": {
            "description": "password validation failure",
            "schema": {
              "$ref": "#/definitions/errorMessage"
            }
          },
          "500": {
            "description": "internal server error"
          }
        }
      }
    },
    "/resetPasswordRequest": {
      "post": {
        "tags": [
          "account"
        ],
        "operationId": "resetPasswordRequest",
        "parameters": [
          {
            "name": "body",
            "in": "body",
            "schema": {
              "properties": {
                "emailAddress": {
                  "type": "string"
                }
              }
            }
          }
        ],
        "responses": {
          "201": {
            "description": "reset password request created"
          },
          "400": {
            "description": "reset password request not created"
          },
          "500": {
            "description": "internal server error"
          }
        }
      }
    },
    "/share": {
      "post": {
        "tags": [
          "share"
        ],
        "operationId": "share",
        "parameters": [
          {
            "name": "body",
            "in": "body",
            "schema": {
              "$ref": "#/definitions/shareRequest"
            }
          }
        ],
        "responses": {
          "201": {
            "description": "share created",
            "schema": {
              "$ref": "#/definitions/shareResponse"
            }
          },
          "401": {
            "description": "unauthorized"
          },
          "404": {
            "description": "not found"
          },
          "409": {
            "description": "conflict",
            "schema": {
              "$ref": "#/definitions/errorMessage"
            }
          },
          "422": {
            "description": "unprocessable"
          },
          "500": {
            "description": "internal server error",
            "schema": {
              "$ref": "#/definitions/errorMessage"
            }
          },
          "503": {
            "description": "service unavailable",
            "headers": {
              "Retry-After": {
                "type": "integer",
                "description": "seconds to wait before retrying"
              }
            }
          }
        },
        "security": [
          {
            "key": []
          }
        ]
      },
      "patch": {
        "tags": [
          "share"
        ],
        "operationId": "updateShare",
        "parameters": [
          {
            "name": "body",
            "in": "body",
            "schema": {
              "properties": {
                "addAccessGrants": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "removeAccessGrants": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "shareToken": {
                  "type": "string"
                }
              }
            }
          }
        ],
        "responses": {
          "200": {
            "description": "share updated"
          },
          "400": {
            "description": "bad request"
          },
          "401": {
            "description": "unauthorized"
          },
          "404": {
            "description": "not found"
          },
          "500": {
            "description": "internal server error"
          }
        },
        "security": [
          {
            "key": []
          }
        ]
      }
    },
    "/share/name": {
      "post": {
        "tags": [
          "share"
        ],
        "operationId": "createShareName",
        "parameters": [
          {
            "name": "body",
            "in": "body",
            "schema": {
              "properties": {
                "name": {
                  "type": "string"
                },
                "namespaceToken": {
                  "type": "string"
                }
              }
            }
          }
        ],
        "responses": {
          "201": {
            "description": "name created"
          },
          "401": {
            "description": "unauthorized"
          },
          "404": {
            "description": "namespace not found"
          },
          "409": {
            "description": "name already exists",
            "schema": {
              "$ref": "#/definitions/errorMessage"
            }
          },
          "500": {
            "description": "internal server error"
          }
        },
        "security": [
          {
            "key": []
          }
        ]
      },
      "delete": {
        "tags": [
          "share"
        ],
        "operationId": "deleteShareName",
        "parameters": [
          {
            "name": "body",
            "in": "body",
            "schema": {
              "properties": {
                "name": {
                  "type": "string"
                },
                "namespaceToken": {
                  "type": "string"
                }
              }
            }
          }
        ],
        "responses": {
          "200": {
            "description": "name deleted"
          },
          "401": {
            "description": "unauthorized"
          },
          "404": {
            "description": "name not found"
          },
          "409": {
            "description": "name is still attached to an active share",
            "schema": {
              "$ref": "#/definitions/errorMessage"
            }
          },
          "500": {
            "description": "internal server error"
          }
        },
        "security": [
          {
            "key": []
          }
        ]
      },
      "patch": {
        "tags": [
          "share"
        ],
        "operationId": "updateShareName",
        "parameters": [
          {
            "name": "body",
            "in": "body",
            "schema": {
              "properties": {
                "name": {
                  "type": "string"
                },
                "namespaceToken": {
                  "type": "string"
                },
                "reserved": {
                  "description": "whether the name should be reserved (true) or released (false)",
                  "type": "boolean"
                }
              }
            }
          }
        ],
        "responses": {
          "200": {
            "description": "name updated successfully"
          },
          "401": {
            "description": "unauthorized"
          },
          "404": {
            "description": "name not found"
          },
          "409": {
            "description": "conflict - cannot change reservation state",
            "schema": {
              "$ref": "#/definitions/errorMessage"
            }
          },
          "500": {
            "description": "internal server error"
          }
        },
        "security": [
          {
            "key": []
          }
        ]
      }
    },
    "/share/names": {
      "get": {
        "tags": [
          "share"
        ],
        "operationId": "listAllNames",
        "responses": {
          "200": {
            "description": "ok",
            "schema": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/name"
              }
            }
          },
          "401": {
            "description": "unauthorized"
          },
          "500": {
            "description": "internal server error"
          }
        },
        "security": [
          {
            "key": []
          }
        ]
      }
    },
    "/share/names/{namespaceToken}": {
      "get": {
        "tags": [
          "share"
        ],
        "operationId": "listNamesForNamespace",
        "parameters": [
          {
            "type": "string",
            "name": "namespaceToken",
            "in": "path",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "ok",
            "schema": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/name"
              }
            }
          },
          "401": {
            "description": "unauthorized"
          },
          "404": {
            "description": "namespace not found"
          },
          "500": {
            "description": "internal server error"
          }
        },
        "security": [
          {
            "key": []
          }
        ]
      }
    },
    "/share/namespaces": {
      "get": {
        "tags": [
          "share"
        ],
        "operationId": "listShareNamespaces",
        "responses": {
          "200": {
            "description": "ok",
            "schema": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "description": {
                    "type": "string"
                  },
                  "name": {
                    "type": "string"
                  },
                  "namespaceToken": {
                    "type": "string"
                  }
                }
              }
            }
          },
          "401": {
            "description": "unauthorized"
          },
          "500": {
            "description": "internal server error"
          }
        },
        "security": [
          {
            "key": []
          }
        ]
      }
    },
    "/shares": {
      "get": {
        "tags": [
          "metadata"
        ],
        "operationId": "listShares",
        "parameters": [
          {
            "type": "string",
            "description": "filter by environment ziti identity",
            "name": "envZId",
            "in": "query"
          },
          {
            "type": "string",
            "description": "filter by share mode (public/private)",
            "name": "shareMode",
            "in": "query"
          },
          {
            "type": "string",
            "description": "filter by backend mode",
            "name": "backendMode",
            "in": "query"
          },
          {
            "type": "string",
            "description": "filter by share token (substring match)",
            "name": "shareToken",
            "in": "query"
          },
          {
            "type": "string",
            "description": "filter by target (substring match)",
            "name": "target",
            "in": "query"
          },
          {
            "type": "string",
            "description": "filter by permission mode (open/closed)",
            "name": "permissionMode",
            "in": "query"
          },
          {
            "type": "boolean",
            "description": "filter shares with recent activity",
            "name": "hasActivity",
            "in": "query"
          },
          {
            "type": "boolean",
            "description": "filter shares WITHOUT recent activity (inverse of hasActivity)",
            "name": "idle",
            "in": "query"
          },
          {
            "type": "string",
            "description": "duration for hasActivity filter (e.g., \"24h\", \"7d\", \"30d\"). default \"24h\", maximum \"30d\" (720h)",
            "name": "activityDuration",
            "in": "query"
          },
          {
            "type": "string",
            "description": "filter by created date (RFC3339 format)",
            "name": "createdAfter",
            "in": "query"
          },
          {
            "type": "string",
            "description": "filter by created date (RFC3339 format)",
            "name": "createdBefore",
            "in": "query"
          },
          {
            "type": "string",
            "description": "filter by updated date (RFC3339 format)",
            "name": "updatedAfter",
            "in": "query"
          },
          {
            "type": "string",
            "description": "filter by updated date (RFC3339 format)",
            "name": "updatedBefore",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "list of shares",
            "schema": {
              "$ref": "#/definitions/sharesList"
            }
          },
          "400": {
            "description": "bad request (e.g., activityDuration exceeds 30d, invalid date format)",
            "schema": {
              "$ref": "#/definitions/errorMessage"
            }
          },
          "401": {
            "description": "unauthorized"
          },
          "500": {
            "description": "internal server error",
            "schema": {
              "$ref": "#/definitions/errorMessage"
            }
          }
        },
        "security": [
          {
            "key": []
          }
        ]
      }
    },
    "/skip-interstitial-grant": {
      "get": {
        "tags": [
          "admin"
        ],
        "operationId": "getSkipInterstitialGrant",
        "parameters": [
          {
            "type": "string",
            "name": "email",
            "in": "query",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "ok",
            "schema": {
              "type": "object",
              "properties": {
                "email": {
                  "type": "string"
                },
                "granted": {
                  "type": "boolean"
                }
              }
            }
          },
          "401": {
            "description": "unauthorized"
          },
          "404": {
            "description": "account not found"
          },
          "500": {
            "description": "internal server error"
          }
        },
        "security": [
          {
            "key": []
          }
        ]
      },
      "post": {
        "tags": [
          "admin"
        ],
        "operationId": "grantSkipInterstitial",
        "parameters": [
          {
            "name": "body",
            "in": "body",
            "schema": {
              "properties": {
                "email": {
                  "type": "string"
                }
              }
            }
          }
        ],
        "responses": {
          "200": {
            "description": "ok"
          },
          "401": {
            "description": "unauthorized"
          },
          "404": {
            "description": "account not found"
          },
          "500": {
            "description": "internal server error"
          }
        },
        "security": [
          {
            "key": []
          }
        ]
      },
      "delete": {
        "tags": [
          "admin"
        ],
        "operationId": "revokeSkipInterstitial",
        "parameters": [
          {
            "name": "body",
            "in": "body",
            "schema": {
              "properties": {
                "email": {
                  "type": "string"
                }
              }
            }
          }
        ],
        "responses": {
          "200": {
            "description": "ok"
          },
          "401": {
            "description": "unauthorized"
          },
          "404": {
            "description": "account not found"
          },
          "500": {
            "description": "internal server error"
          }
        },
        "security": [
          {
            "key": []
          }
        ]
      }
    },
    "/sparklines": {
      "post": {
        "tags": [
          "metadata"
        ],
        "operationId": "getSparklines",
        "parameters": [
          {
            "name": "body",
            "in": "body",
            "schema": {
              "properties": {
                "account": {
                  "type": "boolean"
                },
                "environments": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "shares": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                }
              }
            }
          }
        ],
        "responses": {
          "200": {
            "description": "sparklines data",
            "schema": {
              "properties": {
                "sparklines": {
                  "type": "array",
                  "items": {
                    "$ref": "#/definitions/metrics"
                  }
                }
              }
            }
          },
          "401": {
            "description": "unauthorized"
          },
          "500": {
            "description": "internal server error"
          }
        },
        "security": [
          {
            "key": []
          }
        ]
      }
    },
    "/unaccess": {
      "delete": {
        "tags": [
          "share"
        ],
        "operationId": "unaccess",
        "parameters": [
          {
            "name": "body",
            "in": "body",
            "schema": {
              "properties": {
                "envZId": {
                  "type": "string"
                },
                "frontendToken": {
                  "type": "string"
                },
                "shareToken": {
                  "type": "string"
                }
              }
            }
          }
        ],
        "responses": {
          "200": {
            "description": "access removed"
          },
          "401": {
            "description": "unauthorized"
          },
          "404": {
            "description": "not found"
          },
          "500": {
            "description": "internal server error"
          },
          "503": {
            "description": "service unavailable",
            "headers": {
              "Retry-After": {
                "type": "integer",
                "description": "seconds to wait before retrying"
              }
            }
          }
        },
        "security": [
          {
            "key": []
          }
        ]
      }
    },
    "/unshare": {
      "delete": {
        "tags": [
          "share"
        ],
        "operationId": "unshare",
        "parameters": [
          {
            "name": "body",
            "in": "body",
            "schema": {
              "properties": {
                "envZId": {
                  "type": "string"
                },
                "shareToken": {
                  "type": "string"
                }
              }
            }
          }
        ],
        "responses": {
          "200": {
            "description": "share removed"
          },
          "401": {
            "description": "unauthorized"
          },
          "404": {
            "description": "not found"
          },
          "500": {
            "description": "internal server error",
            "schema": {
              "$ref": "#/definitions/errorMessage"
            }
          },
          "503": {
            "description": "service unavailable",
            "headers": {
              "Retry-After": {
                "type": "integer",
                "description": "seconds to wait before retrying"
              }
            }
          }
        },
        "security": [
          {
            "key": []
          }
        ]
      }
    },
    "/verify": {
      "post": {
        "tags": [
          "account"
        ],
        "operationId": "verify",
        "parameters": [
          {
            "name": "body",
            "in": "body",
            "schema": {
              "properties": {
                "registerToken": {
                  "type": "string"
                }
              }
            }
          }
        ],
        "responses": {
          "200": {
            "description": "registration token ready",
            "schema": {
              "properties": {
                "email": {
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "description": "registration token not found"
          },
          "500": {
            "description": "internal server error"
          }
        }
      }
    },
    "/version": {
      "get": {
        "tags": [
          "metadata"
        ],
        "operationId": "version",
        "responses": {
          "200": {
            "description": "legacy upgrade required",
            "schema": {
              "$ref": "#/definitions/version"
            }
          }
        }
      }
    },
    "/versions": {
      "get": {
        "tags": [
          "metadata"
        ],
        "operationId": "versionInventory",
        "responses": {
          "200": {
            "description": "ok",
            "schema": {
              "properties": {
                "controllerVersion": {
                  "type": "string"
                }
              }
            }
          }
        }
      }
    }
  },
  "definitions": {
    "accessSummary": {
      "type": "object",
      "properties": {
        "backendMode": {
          "type": "string"
        },
        "bindAddress": {
          "type": "string"
        },
        "createdAt": {
          "type": "integer"
        },
        "description": {
          "type": "string"
        },
        "envZId": {
          "type": "string"
        },
        "frontendToken": {
          "type": "string"
        },
        "id": {
          "type": "integer"
        },
        "limited": {
          "type": "boolean"
        },
        "shareToken": {
          "type": "string"
        },
        "updatedAt": {
          "type": "integer"
        }
      }
    },
    "accessesList": {
      "type": "object",
      "properties": {
        "accesses": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/accessSummary"
          }
        }
      }
    },
    "authUser": {
      "type": "object",
      "properties": {
        "password": {
          "type": "string"
        },
        "username": {
          "type": "string"
        }
      }
    },
    "configuration": {
      "type": "object",
      "properties": {
        "inviteTokenContact": {
          "type": "string"
        },
        "invitesOpen": {
          "type": "boolean"
        },
        "newAccountLink": {
          "type": "string"
        },
        "requiresInviteToken": {
          "type": "boolean"
        },
        "touLink": {
          "type": "string"
        },
        "version": {
          "type": "string"
        }
      }
    },
    "environment": {
      "type": "object",
      "properties": {
        "activity": {
          "$ref": "#/definitions/sparkData"
        },
        "address": {
          "type": "string"
        },
        "createdAt": {
          "type": "integer"
        },
        "description": {
          "type": "string"
        },
        "host": {
          "type": "string"
        },
        "limited": {
          "type": "boolean"
        },
        "remoteAgent": {
          "type": "boolean"
        },
        "updatedAt": {
          "type": "integer"
        },
        "zId": {
          "type": "string"
        }
      }
    },
    "environmentAndResources": {
      "type": "object",
      "properties": {
        "environment": {
          "$ref": "#/definitions/environment"
        },
        "frontends": {
          "$ref": "#/definitions/frontends"
        },
        "shares": {
          "$ref": "#/definitions/shares"
        }
      }
    },
    "environmentSummary": {
      "type": "object",
      "properties": {
        "accessCount": {
          "type": "integer"
        },
        "address": {
          "type": "string"
        },
        "createdAt": {
          "type": "integer"
        },
        "description": {
          "type": "string"
        },
        "envZId": {
          "type": "string"
        },
        "host": {
          "type": "string"
        },
        "limited": {
          "type": "boolean"
        },
        "remoteAgent": {
          "type": "boolean"
        },
        "shareCount": {
          "type": "integer"
        },
        "updatedAt": {
          "type": "integer"
        }
      }
    },
    "environments": {
      "type": "array",
      "items": {
        "$ref": "#/definitions/environment"
      }
    },
    "environmentsList": {
      "type": "object",
      "properties": {
        "environments": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/environmentSummary"
          }
        }
      }
    },
    "errorMessage": {
      "type": "string"
    },
    "frontend": {
      "type": "object",
      "properties": {
        "backendMode": {
          "type": "string"
        },
        "bindAddress": {
          "type": "string"
        },
        "createdAt": {
          "type": "integer"
        },
        "description": {
          "type": "string"
        },
        "frontendToken": {
          "type": "string"
        },
        "id": {
          "type": "integer"
        },
        "shareToken": {
          "type": "string"
        },
        "updatedAt": {
          "type": "integer"
        },
        "zId": {
          "type": "string"
        }
      }
    },
    "frontends": {
      "type": "array",
      "items": {
        "$ref": "#/definitions/frontend"
      }
    },
    "limitClass": {
      "type": "object",
      "properties": {
        "backendMode": {
          "type": "string"
        },
        "createdAt": {
          "type": "integer"
        },
        "environments": {
          "type": "integer"
        },
        "id": {
          "type": "integer"
        },
        "label": {
          "type": "string"
        },
        "limitAction": {
          "type": "string"
        },
        "periodMinutes": {
          "type": "integer"
        },
        "reservedShares": {
          "type": "integer"
        },
        "rxBytes": {
          "type": "integer"
        },
        "shareFrontends": {
          "type": "integer"
        },
        "shares": {
          "type": "integer"
        },
        "totalBytes": {
          "type": "integer"
        },
        "txBytes": {
          "type": "integer"
        },
        "uniqueNames": {
          "type": "integer"
        },
        "updatedAt": {
          "type": "integer"
        }
      }
    },
    "metrics": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string"
        },
        "period": {
          "type": "number"
        },
        "samples": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/metricsSample"
          }
        },
        "scope": {
          "type": "string"
        }
      }
    },
    "metricsSample": {
      "type": "object",
      "properties": {
        "rx": {
          "type": "number"
        },
        "timestamp": {
          "type": "number"
        },
        "tx": {
          "type": "number"
        }
      }
    },
    "name": {
      "type": "object",
      "properties": {
        "createdAt": {
          "type": "integer"
        },
        "name": {
          "type": "string"
        },
        "namespaceName": {
          "type": "string"
        },
        "namespaceToken": {
          "type": "string"
        },
        "reserved": {
          "type": "boolean"
        },
        "shareToken": {
          "type": "string"
        }
      }
    },
    "nameSelection": {
      "type": "object",
      "properties": {
        "name": {
          "type": "string"
        },
        "namespaceToken": {
          "type": "string"
        }
      }
    },
    "overview": {
      "type": "object",
      "properties": {
        "accountLimited": {
          "type": "boolean"
        },
        "environments": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/environmentAndResources"
          }
        },
        "names": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "createdAt": {
                "type": "integer"
              },
              "name": {
                "type": "string"
              },
              "namespaceName": {
                "type": "string"
              },
              "namespaceToken": {
                "type": "string"
              },
              "reserved": {
                "type": "boolean"
              },
              "shareToken": {
                "type": "string"
              }
            }
          }
        },
        "namespaces": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "description": {
                "type": "string"
              },
              "name": {
                "type": "string"
              },
              "namespaceToken": {
                "type": "string"
              }
            }
          }
        }
      }
    },
    "principal": {
      "type": "object",
      "properties": {
        "admin": {
          "type": "boolean"
        },
        "email": {
          "type": "string"
        },
        "id": {
          "type": "integer"
        },
        "limitless": {
          "type": "boolean"
        },
        "token": {
          "type": "string"
        }
      }
    },
    "share": {
      "type": "object",
      "properties": {
        "activity": {
          "$ref": "#/definitions/sparkData"
        },
        "backendMode": {
          "type": "string"
        },
        "createdAt": {
          "type": "integer"
        },
        "envZId": {
          "type": "string"
        },
        "frontendEndpoints": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "limited": {
          "type": "boolean"
        },
        "shareMode": {
          "type": "string"
        },
        "shareToken": {
          "type": "string"
        },
        "target": {
          "type": "string"
        },
        "updatedAt": {
          "type": "integer"
        },
        "zId": {
          "type": "string"
        }
      }
    },
    "shareRequest": {
      "type": "object",
      "properties": {
        "accessGrants": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "authScheme": {
          "type": "string"
        },
        "backendMode": {
          "type": "string",
          "enum": [
            "proxy",
            "web",
            "tcpTunnel",
            "udpTunnel",
            "caddy",
            "drive",
            "socks"
          ]
        },
        "basicAuthUsers": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/authUser"
          }
        },
        "envZId": {
          "type": "string"
        },
        "nameSelections": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/nameSelection"
          }
        },
        "oauthEmailDomains": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "oauthProvider": {
          "type": "string"
        },
        "oauthRefreshInterval": {
          "type": "string"
        },
        "permissionMode": {
          "type": "string",
          "enum": [
            "open",
            "closed"
          ]
        },
        "privateShareToken": {
          "type": "string"
        },
        "shareMode": {
          "type": "string",
          "enum": [
            "public",
            "private"
          ]
        },
        "target": {
          "type": "string"
        }
      }
    },
    "shareResponse": {
      "type": "object",
      "properties": {
        "frontendProxyEndpoints": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "shareToken": {
          "type": "string"
        }
      }
    },
    "shareSummary": {
      "type": "object",
      "properties": {
        "backendMode": {
          "type": "string"
        },
        "createdAt": {
          "type": "integer"
        },
        "envZId": {
          "type": "string"
        },
        "frontendEndpoints": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "limited": {
          "type": "boolean"
        },
        "shareMode": {
          "type": "string"
        },
        "shareToken": {
          "type": "string"
        },
        "target": {
          "type": "string"
        },
        "updatedAt": {
          "type": "integer"
        },
        "zId": {
          "type": "string"
        }
      }
    },
    "shares": {
      "type": "array",
      "items": {
        "$ref": "#/definitions/share"
      }
    },
    "sharesList": {
      "type": "object",
      "properties": {
        "shares": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/shareSummary"
          }
        }
      }
    },
    "sparkData": {
      "type": "array",
      "items": {
        "$ref": "#/definitions/sparkDataSample"
      }
    },
    "sparkDataSample": {
      "type": "object",
      "properties": {
        "rx": {
          "type": "number"
        },
        "tx": {
          "type": "number"
        }
      }
    },
    "version": {
      "type": "string"
    }
  },
  "securityDefinitions": {
    "key": {
      "type": "apiKey",
      "name": "x-token",
      "in": "header"
    }
  }
}`))
	FlatSwaggerJSON = json.RawMessage([]byte(`{
  "consumes": [
    "application/zrok.v1+json"
  ],
  "produces": [
    "application/zrok.v1+json"
  ],
  "schemes": [
    "http"
  ],
  "swagger": "2.0",
  "info": {
    "description": "zrok client access",
    "title": "zrok",
    "version": "2.0.0"
  },
  "basePath": "/api/v2",
  "paths": {
    "/access": {
      "post": {
        "tags": [
          "share"
        ],
        "operationId": "access",
        "parameters": [
          {
            "name": "body",
            "in": "body",
            "schema": {
              "properties": {
                "bindAddress": {
                  "type": "string"
                },
                "description": {
                  "type": "string"
                },
                "envZId": {
                  "type": "string"
                },
                "shareToken": {
                  "type": "string"
                }
              }
            }
          }
        ],
        "responses": {
          "201": {
            "description": "access created",
            "schema": {
              "properties": {
                "backendMode": {
                  "type": "string"
                },
                "frontendToken": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "description": "unauthorized"
          },
          "404": {
            "description": "not found"
          },
          "500": {
            "description": "internal server error"
          },
          "503": {
            "description": "service unavailable",
            "headers": {
              "Retry-After": {
                "type": "integer",
                "description": "seconds to wait before retrying"
              }
            }
          }
        },
        "security": [
          {
            "key": []
          }
        ]
      },
      "patch": {
        "tags": [
          "share"
        ],
        "operationId": "updateAccess",
        "parameters": [
          {
            "name": "body",
            "in": "body",
            "schema": {
              "properties": {
                "bindAddress": {
                  "type": "string"
                },
                "description": {
                  "type": "string"
                },
                "frontendToken": {
                  "type": "string"
                }
              }
            }
          }
        ],
        "responses": {
          "200": {
            "description": "access updated"
          },
          "401": {
            "description": "unauthorized"
          },
          "404": {
            "description": "not found"
          },
          "500": {
            "description": "internal server error"
          }
        },
        "security": [
          {
            "key": []
          }
        ]
      }
    },
    "/accesses": {
      "get": {
        "tags": [
          "metadata"
        ],
        "operationId": "listAccesses",
        "parameters": [
          {
            "type": "string",
            "description": "filter by environment ziti identity",
            "name": "envZId",
            "in": "query"
          },
          {
            "type": "string",
            "description": "filter by associated share token",
            "name": "shareToken",
            "in": "query"
          },
          {
            "type": "string",
            "description": "filter by bind address (substring match)",
            "name": "bindAddress",
            "in": "query"
          },
          {
            "type": "string",
            "description": "filter by description (substring match)",
            "name": "description",
            "in": "query"
          },
          {
            "type": "string",
            "description": "filter by created date (RFC3339 format)",
            "name": "createdAfter",
            "in": "query"
          },
          {
            "type": "string",
            "description": "filter by created date (RFC3339 format)",
            "name": "createdBefore",
            "in": "query"
          },
          {
            "type": "string",
            "description": "filter by updated date (RFC3339 format)",
            "name": "updatedAfter",
            "in": "query"
          },
          {
            "type": "string",
            "description": "filter by updated date (RFC3339 format)",
            "name": "updatedBefore",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "list of accesses",
            "schema": {
              "$ref": "#/definitions/accessesList"
            }
          },
          "400": {
            "description": "bad request (e.g., activityDuration exceeds 30d, invalid date format)",
            "schema": {
              "$ref": "#/definitions/errorMessage"
            }
          },
          "401": {
            "description": "unauthorized"
          },
          "500": {
            "description": "internal server error",
            "schema": {
              "$ref": "#/definitions/errorMessage"
            }
          }
        },
        "security": [
          {
            "key": []
          }
        ]
      }
    },
    "/account": {
      "post": {
        "tags": [
          "admin"
        ],
        "operationId": "createAccount",
        "parameters": [
          {
            "name": "body",
            "in": "body",
            "schema": {
              "properties": {
                "email": {
                  "type": "string"
                },
                "password": {
                  "type": "string"
                }
              }
            }
          }
        ],
        "responses": {
          "201": {
            "description": "created",
            "schema": {
              "properties": {
                "accountToken": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "description": "unauthorized"
          },
          "500": {
            "description": "internal server error"
          }
        },
        "security": [
          {
            "key": []
          }
        ]
      },
      "delete": {
        "tags": [
          "admin"
        ],
        "operationId": "deleteAccount",
        "parameters": [
          {
            "name": "body",
            "in": "body",
            "schema": {
              "properties": {
                "email": {
                  "type": "string"
                }
              }
            }
          }
        ],
        "responses": {
          "200": {
            "description": "ok"
          },
          "401": {
            "description": "unauthorized"
          },
          "404": {
            "description": "not found"
          },
          "500": {
            "description": "internal server error"
          }
        },
        "security": [
          {
            "key": []
          }
        ]
      },
      "patch": {
        "tags": [
          "admin"
        ],
        "operationId": "updateAccountPassword",
        "parameters": [
          {
            "name": "body",
            "in": "body",
            "schema": {
              "properties": {
                "email": {
                  "type": "string"
                },
                "password": {
                  "type": "string"
                }
              }
            }
          }
        ],
        "responses": {
          "200": {
            "description": "ok"
          },
          "401": {
            "description": "unauthorized"
          },
          "404": {
            "description": "not found"
          },
          "422": {
            "description": "password validation failure",
            "schema": {
              "$ref": "#/definitions/errorMessage"
            }
          },
          "500": {
            "description": "internal server error"
          }
        },
        "security": [
          {
            "key": []
          }
        ]
      }
    },
    "/agent/access": {
      "post": {
        "tags": [
          "agent"
        ],
        "operationId": "remoteAccess",
        "parameters": [
          {
            "name": "body",
            "in": "body",
            "schema": {
              "properties": {
                "autoAddress": {
                  "type": "string"
                },
                "autoEndPort": {
                  "type": "integer",
                  "maximum": 65535,
                  "minimum": 1
                },
                "autoMode": {
                  "type": "boolean"
                },
                "autoStartPort": {
                  "type": "integer",
                  "maximum": 65535,
                  "minimum": 1
                },
                "bindAddress": {
                  "type": "string"
                },
                "envZId": {
                  "type": "string"
                },
                "responseHeaders": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "token": {
                  "type": "string"
                }
              }
            }
          }
        ],
        "responses": {
          "200": {
            "description": "ok",
            "schema": {
              "properties": {
                "frontendToken": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "description": "unauthorized"
          },
          "500": {
            "description": "internal server error"
          },
          "502": {
            "description": "bad gateway; agent not reachable"
          }
        },
        "security": [
          {
            "key": []
          }
        ]
      }
    },
    "/agent/enroll": {
      "post": {
        "tags": [
          "agent"
        ],
        "operationId": "enroll",
        "parameters": [
          {
            "name": "body",
            "in": "body",
            "schema": {
              "properties": {
                "envZId": {
                  "type": "string"
                }
              }
            }
          }
        ],
        "responses": {
          "200": {
            "description": "ok",
            "schema": {
              "properties": {
                "token": {
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "description": "bad request; already enrolled"
          },
          "401": {
            "description": "unauthorized"
          },
          "500": {
            "description": "internal server error"
          }
        },
        "security": [
          {
            "key": []
          }
        ]
      }
    },
    "/agent/ping": {
      "post": {
        "tags": [
          "agent"
        ],
        "operationId": "ping",
        "parameters": [
          {
            "name": "body",
            "in": "body",
            "schema": {
              "properties": {
                "envZId": {
                  "type": "string"
                }
              }
            }
          }
        ],
        "responses": {
          "200": {
            "description": "ok",
            "schema": {
              "properties": {
                "version": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "description": "unauthorized"
          },
          "500": {
            "description": "internal server error"
          },
          "502": {
            "description": "bad gateway; agent not reachable"
          }
        },
        "security": [
          {
            "key": []
          }
        ]
      }
    },
    "/agent/share": {
      "post": {
        "tags": [
          "agent"
        ],
        "operationId": "remoteShare",
        "parameters": [
          {
            "name": "body",
            "in": "body",
            "schema": {
              "properties": {
                "accessGrants": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "backendMode": {
                  "type": "string",
                  "enum": [
                    "proxy",
                    "web",
                    "tcpTunnel",
                    "udpTunnel",
                    "caddy",
                    "drive",
                    "socks"
                  ]
                },
                "basicAuth": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "envZId": {
                  "type": "string"
                },
                "insecure": {
                  "type": "boolean"
                },
                "nameSelections": {
                  "type": "array",
                  "items": {
                    "$ref": "#/definitions/nameSelection"
                  }
                },
                "oauthEmailDomains": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "oauthProvider": {
                  "type": "string"
                },
                "oauthRefreshInterval": {
                  "type": "string"
                },
                "open": {
                  "type": "boolean"
                },
                "privateShareToken": {
                  "type": "string"
                },
                "shareMode": {
                  "type": "string",
                  "enum": [
                    "public",
                    "private"
                  ]
                },
                "target": {
                  "type": "string"
                },
                "token": {
                  "type": "string"
                }
              }
            }
          }
        ],
        "responses": {
          "200": {
            "description": "ok",
            "schema": {
              "properties": {
                "frontendEndpoints": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "token": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "description": "unauthorized"
          },
          "500": {
            "description": "internal server error"
          },
          "502": {
            "description": "bad gateway; agent not reachable"
          }
        },
        "security": [
          {
            "key": []
          }
        ]
      }
    },
    "/agent/share/http-healthcheck": {
      "post": {
        "tags": [
          "agent"
        ],
        "operationId": "shareHttpHealthcheck",
        "parameters": [
          {
            "name": "body",
            "in": "body",
            "schema": {
              "properties": {
                "endpoint": {
                  "type": "string"
                },
                "envZId": {
                  "type": "string"
                },
                "expectedHttpResponse": {
                  "type": "number"
                },
                "httpVerb": {
                  "type": "string"
                },
                "shareToken": {
                  "type": "string"
                },
                "timeoutMs": {
                  "type": "number"
                }
              }
            }
          }
        ],
        "responses": {
          "200": {
            "description": "ok",
            "schema": {
              "properties": {
                "error": {
                  "type": "string"
                },
                "healthy": {
                  "type": "boolean"
                }
              }
            }
          },
          "401": {
            "description": "unauthorized"
          },
          "500": {
            "description": "internal server error"
          },
          "502": {
            "description": "bad gateway; agent not reachable"
          }
        },
        "security": [
          {
            "key": []
          }
        ]
      }
    },
    "/agent/status": {
      "post": {
        "tags": [
          "agent"
        ],
        "operationId": "remoteStatus",
        "parameters": [
          {
            "name": "body",
            "in": "body",
            "schema": {
              "properties": {
                "envZId": {
                  "type": "string"
                }
              }
            }
          }
        ],
        "responses": {
          "200": {
            "description": "ok",
            "schema": {
              "properties": {
                "accesses": {
                  "type": "array",
                  "items": {
                    "$ref": "#/definitions/AccessesItems0"
                  }
                },
                "shares": {
                  "type": "array",
                  "items": {
                    "$ref": "#/definitions/SharesItems0"
                  }
                }
              }
            }
          },
          "401": {
            "description": "unauthorized"
          },
          "500": {
            "description": "internal server error"
          },
          "502": {
            "description": "bad gateway; agent not reachable"
          }
        },
        "security": [
          {
            "key": []
          }
        ]
      }
    },
    "/agent/unaccess": {
      "post": {
        "tags": [
          "agent"
        ],
        "operationId": "remoteUnaccess",
        "parameters": [
          {
            "name": "body",
            "in": "body",
            "schema": {
              "properties": {
                "envZId": {
                  "type": "string"
                },
                "frontendToken": {
                  "type": "string"
                }
              }
            }
          }
        ],
        "responses": {
          "200": {
            "description": "ok"
          },
          "401": {
            "description": "unauthorized"
          },
          "500": {
            "description": "internal server error"
          },
          "502": {
            "description": "bad gateway; agent not reachable"
          }
        },
        "security": [
          {
            "key": []
          }
        ]
      }
    },
    "/agent/unenroll": {
      "post": {
        "tags": [
          "agent"
        ],
        "operationId": "unenroll",
        "parameters": [
          {
            "name": "body",
            "in": "body",
            "schema": {
              "properties": {
                "envZId": {
                  "type": "string"
                }
              }
            }
          }
        ],
        "responses": {
          "200": {
            "description": "ok"
          },
          "400": {
            "description": "bad request; not enrolled"
          },
          "401": {
            "description": "unauthorized"
          },
          "500": {
            "description": "internal server error"
          }
        },
        "security": [
          {
            "key": []
          }
        ]
      }
    },
    "/agent/unshare": {
      "post": {
        "tags": [
          "agent"
        ],
        "operationId": "remoteUnshare",
        "parameters": [
          {
            "name": "body",
            "in": "body",
            "schema": {
              "properties": {
                "envZId": {
                  "type": "string"
                },
                "token": {
                  "type": "string"
                }
              }
            }
          }
        ],
        "responses": {
          "200": {
            "description": "ok"
          },
          "401": {
            "description": "unauthorized"
          },
          "500": {
            "description": "internal server error"
          },
          "502": {
            "description": "bad gateway; agent not reachable"
          }
        },
        "security": [
          {
            "key": []
          }
        ]
      }
    },
    "/applied-limit-class": {
      "post": {
        "tags": [
          "admin"
        ],
        "operationId": "applyLimitClasses",
        "parameters": [
          {
            "name": "body",
            "in": "body",
            "schema": {
              "properties": {
                "email": {
                  "type": "string"
                },
                "limitClassIds": {
                  "type": "array",
                  "items": {
                    "type": "integer"
                  }
                }
              }
            }
          }
        ],
        "responses": {
          "200": {
            "description": "applied"
          },
          "401": {
            "description": "unauthorized"
          },
          "404": {
            "description": "account or limit class not found"
          },
          "500": {
            "description": "internal server error"
          }
        },
        "security": [
          {
            "key": []
          }
        ]
      },
      "delete": {
        "tags": [
          "admin"
        ],
        "operationId": "removeAppliedLimitClasses",
        "parameters": [
          {
            "name": "body",
            "in": "body",
            "schema": {
              "properties": {
                "email": {
                  "type": "string"
                },
                "limitClassIds": {
                  "type": "array",
                  "items": {
                    "type": "integer"
                  }
                }
              }
            }
          }
        ],
        "responses": {
          "200": {
            "description": "removed"
          },
          "401": {
            "description": "unauthorized"
          },
          "404": {
            "description": "account not found"
          },
          "500": {
            "description": "internal server error"
          }
        },
        "security": [
          {
            "key": []
          }
        ]
      }
    },
    "/applied-limit-class/list": {
      "post": {
        "tags": [
          "admin"
        ],
        "operationId": "listAppliedLimitClasses",
        "parameters": [
          {
            "name": "body",
            "in": "body",
            "schema": {
              "properties": {
                "email": {
                  "type": "string"
                }
              }
            }
          }
        ],
        "responses": {
          "200": {
            "description": "applied limit classes",
            "schema": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/limitClass"
              }
            }
          },
          "401": {
            "description": "unauthorized"
          },
          "404": {
            "description": "account not found"
          },
          "500": {
            "description": "internal server error"
          }
        },
        "security": [
          {
            "key": []
          }
        ]
      }
    },
    "/changePassword": {
      "post": {
        "tags": [
          "account"
        ],
        "operationId": "changePassword",
        "parameters": [
          {
            "name": "body",
            "in": "body",
            "schema": {
              "properties": {
                "email": {
                  "type": "string"
                },
                "newPassword": {
                  "type": "string"
                },
                "oldPassword": {
                  "type": "string"
                }
              }
            }
          }
        ],
        "responses": {
          "200": {
            "description": "password changed"
          },
          "400": {
            "description": "password not changed"
          },
          "401": {
            "description": "unauthorized"
          },
          "422": {
            "description": "password validation failure",
            "schema": {
              "$ref": "#/definitions/errorMessage"
            }
          },
          "500": {
            "description": "internal server error"
          }
        },
        "security": [
          {
            "key": []
          }
        ]
      }
    },
    "/clientVersionCheck": {
      "post": {
        "tags": [
          "metadata"
        ],
        "operationId": "clientVersionCheck",
        "parameters": [
          {
            "name": "body",
            "in": "body",
            "schema": {
              "properties": {
                "clientVersion": {
                  "type": "string"
                }
              }
            }
          }
        ],
        "responses": {
          "200": {
            "description": "compatible"
          },
          "400": {
            "description": "not compatible",
            "schema": {
              "type": "string"
            }
          }
        }
      }
    },
    "/configuration": {
      "get": {
        "tags": [
          "metadata"
        ],
        "operationId": "configuration",
        "responses": {
          "200": {
            "description": "current configuration",
            "schema": {
              "$ref": "#/definitions/configuration"
            }
          }
        }
      }
    },
    "/detail/account": {
      "get": {
        "tags": [
          "metadata"
        ],
        "operationId": "getAccountDetail",
        "responses": {
          "200": {
            "description": "ok",
            "schema": {
              "$ref": "#/definitions/environments"
            }
          },
          "500": {
            "description": "internal server error"
          }
        },
        "security": [
          {
            "key": []
          }
        ]
      }
    },
    "/detail/environment/{envZId}": {
      "get": {
        "tags": [
          "metadata"
        ],
        "operationId": "getEnvironmentDetail",
        "parameters": [
          {
            "type": "string",
            "name": "envZId",
            "in": "path",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "ok",
            "schema": {
              "$ref": "#/definitions/environmentAndResources"
            }
          },
          "401": {
            "description": "unauthorized"
          },
          "404": {
            "description": "not found"
          },
          "500": {
            "description": "internal server error"
          }
        },
        "security": [
          {
            "key": []
          }
        ]
      }
    },
    "/detail/frontend/{frontendId}": {
      "get": {
        "tags": [
          "metadata"
        ],
        "operationId": "getFrontendDetail",
        "parameters": [
          {
            "type": "integer",
            "name": "frontendId",
            "in": "path",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "ok",
            "schema": {
              "$ref": "#/definitions/frontend"
            }
          },
          "401": {
            "description": "unauthorized"
          },
          "404": {
            "description": "not found"
          },
          "500": {
            "description": "internal server error"
          }
        },
        "security": [
          {
            "key": []
          }
        ]
      }
    },
    "/detail/share/{shareToken}": {
      "get": {
        "tags": [
          "metadata"
        ],
        "operationId": "getShareDetail",
        "parameters": [
          {
            "type": "string",
            "name": "shareToken",
            "in": "path",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "ok",
            "schema": {
              "$ref": "#/definitions/share"
            }
          },
          "401": {
            "description": "unauthorized"
          },
          "404": {
            "description": "not found"
          },
          "500": {
            "description": "internal server error"
          }
        },
        "security": [
          {
            "key": []
          }
        ]
      }
    },
    "/disable": {
      "post": {
        "tags": [
          "environment"
        ],
        "operationId": "disable",
        "parameters": [
          {
            "name": "body",
            "in": "body",
            "schema": {
              "properties": {
                "identity": {
                  "type": "string"
                }
              }
            }
          }
        ],
        "responses": {
          "200": {
            "description": "environment disabled"
          },
          "401": {
            "description": "invalid environment"
          },
          "500": {
            "description": "internal server error"
          },
          "503": {
            "description": "service unavailable",
            "headers": {
              "Retry-After": {
                "type": "integer",
                "description": "seconds to wait before retrying"
              }
            }
          }
        },
        "security": [
          {
            "key": []
          }
        ]
      }
    },
    "/enable": {
      "post": {
        "tags": [
          "environment"
        ],
        "operationId": "enable",
        "parameters": [
          {
            "name": "body",
            "in": "body",
            "schema": {
              "properties": {
                "description": {
                  "type": "string"
                },
                "host": {
                  "type": "string"
                }
              }
            }
          }
        ],
        "responses": {
          "201": {
            "description": "environment enabled",
            "schema": {
              "properties": {
                "cfg": {
                  "type": "string"
                },
                "identity": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "description": "unauthorized"
          },
          "404": {
            "description": "account not found"
          },
          "500": {
            "description": "internal server error"
          },
          "503": {
            "description": "service unavailable",
            "headers": {
              "Retry-After": {
                "type": "integer",
                "description": "seconds to wait before retrying"
              }
            }
          }
        },
        "security": [
          {
            "key": []
          }
        ]
      }
    },
    "/environments": {
      "get": {
        "tags": [
          "metadata"
        ],
        "operationId": "listEnvironments",
        "parameters": [
          {
            "type": "string",
            "description": "filter by description (case-insensitive substring match)",
            "name": "description",
            "in": "query"
          },
          {
            "type": "string",
            "description": "filter by host (case-insensitive substring match)",
            "name": "host",
            "in": "query"
          },
          {
            "type": "string",
            "description": "filter by address (exact match)",
            "name": "address",
            "in": "query"
          },
          {
            "type": "boolean",
            "description": "filter by whether agent is enrolled",
            "name": "remoteAgent",
            "in": "query"
          },
          {
            "type": "boolean",
            "description": "filter by whether environment has active shares",
            "name": "hasShares",
            "in": "query"
          },
          {
            "type": "boolean",
            "description": "filter by whether environment has active accesses",
            "name": "hasAccesses",
            "in": "query"
          },
          {
            "type": "boolean",
            "description": "filter by whether environment has metrics within activityDuration timeframe",
            "name": "hasActivity",
            "in": "query"
          },
          {
            "type": "boolean",
            "description": "filter environments WITHOUT recent activity (inverse of hasActivity)",
            "name": "idle",
            "in": "query"
          },
          {
            "type": "string",
            "description": "filter by share count with operator (e.g., \"\u003e0\", \"\u003e=5\", \"=0\", \"\u003c10\", \"\u003c=3\")",
            "name": "shareCount",
            "in": "query"
          },
          {
            "type": "string",
            "description": "filter by access count with operator (e.g., \"\u003e0\", \"\u003e=5\", \"=0\", \"\u003c10\", \"\u003c=3\")",
            "name": "accessCount",
            "in": "query"
          },
          {
            "type": "string",
            "description": "filter by created date (RFC3339 datetime, inclusive)",
            "name": "createdAfter",
            "in": "query"
          },
          {
            "type": "string",
            "description": "filter by created date (RFC3339 datetime, inclusive)",
            "name": "createdBefore",
            "in": "query"
          },
          {
            "type": "string",
            "description": "filter by updated date (RFC3339 datetime, inclusive)",
            "name": "updatedAfter",
            "in": "query"
          },
          {
            "type": "string",
            "description": "filter by updated date (RFC3339 datetime, inclusive)",
            "name": "updatedBefore",
            "in": "query"
          },
          {
            "type": "string",
            "description": "duration for hasActivity filter (e.g., \"24h\", \"7d\", \"30d\"). default \"24h\", maximum \"30d\" (720h)",
            "name": "activityDuration",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "list of environments",
            "schema": {
              "$ref": "#/definitions/environmentsList"
            }
          },
          "400": {
            "description": "bad request (e.g., activityDuration exceeds 30d, invalid date format, invalid operator)",
            "schema": {
              "$ref": "#/definitions/errorMessage"
            }
          },
          "401": {
            "description": "unauthorized"
          },
          "500": {
            "description": "internal server error",
            "schema": {
              "$ref": "#/definitions/errorMessage"
            }
          }
        },
        "security": [
          {
            "key": []
          }
        ]
      }
    },
    "/frontend": {
      "post": {
        "tags": [
          "admin"
        ],
        "operationId": "createFrontend",
        "parameters": [
          {
            "name": "body",
            "in": "body",
            "schema": {
              "type": "object",
              "properties": {
                "dynamic": {
                  "type": "boolean"
                },
                "permissionMode": {
                  "type": "string",
                  "enum": [
                    "open",
                    "closed"
                  ]
                },
                "public_name": {
                  "type": "string"
                },
                "url_template": {
                  "type": "string"
                },
                "zId": {
                  "type": "string"
                }
              }
            }
          }
        ],
        "responses": {
          "201": {
            "description": "frontend created",
            "schema": {
              "type": "object",
              "properties": {
                "frontendToken": {
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "description": "bad request"
          },
          "401": {
            "description": "unauthorized"
          },
          "404": {
            "description": "not found"
          },
          "500": {
            "description": "internal server error"
          }
        },
        "security": [
          {
            "key": []
          }
        ]
      },
      "delete": {
        "tags": [
          "admin"
        ],
        "operationId": "deleteFrontend",
        "parameters": [
          {
            "name": "body",
            "in": "body",
            "schema": {
              "type": "object",
              "properties": {
                "frontendToken": {
                  "type": "string"
                }
              }
            }
          }
        ],
        "responses": {
          "200": {
            "description": "frontend deleted"
          },
          "401": {
            "description": "unauthorized"
          },
          "404": {
            "description": "not found"
          },
          "500": {
            "description": "internal server error"
          }
        },
        "security": [
          {
            "key": []
          }
        ]
      },
      "patch": {
        "tags": [
          "admin"
        ],
        "operationId": "updateFrontend",
        "parameters": [
          {
            "name": "body",
            "in": "body",
            "schema": {
              "type": "object",
              "properties": {
                "dynamic": {
                  "type": "boolean"
                },
                "dynamicSet": {
                  "type": "boolean"
                },
                "frontendToken": {
                  "type": "string"
                },
                "publicName": {
                  "type": "string"
                },
                "urlTemplate": {
                  "type": "string"
                }
              }
            }
          }
        ],
        "responses": {
          "200": {
            "description": "frontend updated"
          },
          "401": {
            "description": "unauthorized"
          },
          "404": {
            "description": "not found"
          },
          "500": {
            "description": "internal server error"
          }
        },
        "security": [
          {
            "key": []
          }
        ]
      }
    },
    "/frontend/grant": {
      "post": {
        "tags": [
          "admin"
        ],
        "operationId": "addFrontendGrant",
        "parameters": [
          {
            "name": "body",
            "in": "body",
            "schema": {
              "type": "object",
              "properties": {
                "email": {
                  "type": "string"
                },
                "frontendToken": {
                  "type": "string"
                }
              }
            }
          }
        ],
        "responses": {
          "200": {
            "description": "ok"
          },
          "401": {
            "description": "unauthorized"
          },
          "404": {
            "description": "not found",
            "schema": {
              "$ref": "#/definitions/errorMessage"
            }
          },
          "500": {
            "description": "internal server error"
          }
        },
        "security": [
          {
            "key": []
          }
        ]
      },
      "delete": {
        "tags": [
          "admin"
        ],
        "operationId": "deleteFrontendGrant",
        "parameters": [
          {
            "name": "body",
            "in": "body",
            "schema": {
              "type": "object",
              "properties": {
                "email": {
                  "type": "string"
                },
                "frontendToken": {
                  "type": "string"
                }
              }
            }
          }
        ],
        "responses": {
          "200": {
            "description": "ok"
          },
          "401": {
            "description": "unauthorized"
          },
          "404": {
            "description": "not found",
            "schema": {
              "$ref": "#/definitions/errorMessage"
            }
          },
          "500": {
            "description": "internal server error"
          }
        },
        "security": [
          {
            "key": []
          }
        ]
      }
    },
    "/frontend/namespace/mapping/{frontendToken}": {
      "get": {
        "tags": [
          "admin"
        ],
        "operationId": "listFrontendNamespaceMappings",
        "parameters": [
          {
            "type": "string",
            "name": "frontendToken",
            "in": "path",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "frontend namespace mappings listed",
            "schema": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/ListFrontendNamespaceMappingsOKBodyItems0"
              }
            }
          },
          "401": {
            "description": "unauthorized"
          },
          "404": {
            "description": "frontend not found"
          },
          "500": {
            "description": "internal server error"
          }
        },
        "security": [
          {
            "key": []
          }
        ]
      }
    },
    "/frontends": {
      "get": {
        "tags": [
          "admin"
        ],
        "operationId": "listFrontends",
        "responses": {
          "200": {
            "description": "ok",
            "schema": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/ListFrontendsOKBodyItems0"
              }
            }
          },
          "401": {
            "description": "unauthorized"
          },
          "500": {
            "description": "internal server error"
          }
        },
        "security": [
          {
            "key": []
          }
        ]
      }
    },
    "/identity": {
      "post": {
        "tags": [
          "admin"
        ],
        "operationId": "createIdentity",
        "parameters": [
          {
            "name": "body",
            "in": "body",
            "schema": {
              "properties": {
                "name": {
                  "type": "string"
                }
              }
            }
          }
        ],
        "responses": {
          "201": {
            "description": "created",
            "schema": {
              "properties": {
                "cfg": {
                  "type": "string"
                },
                "identity": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "description": "unauthorized"
          },
          "500": {
            "description": "internal server error"
          }
        },
        "security": [
          {
            "key": []
          }
        ]
      },
      "delete": {
        "tags": [
          "admin"
        ],
        "operationId": "deleteIdentity",
        "parameters": [
          {
            "name": "body",
            "in": "body",
            "schema": {
              "properties": {
                "zId": {
                  "type": "string"
                }
              }
            }
          }
        ],
        "responses": {
          "200": {
            "description": "deleted"
          },
          "401": {
            "description": "unauthorized"
          },
          "404": {
            "description": "not found"
          },
          "500": {
            "description": "internal server error"
          }
        },
        "security": [
          {
            "key": []
          }
        ]
      }
    },
    "/invite": {
      "post": {
        "tags": [
          "account"
        ],
        "operationId": "invite",
        "parameters": [
          {
            "name": "body",
            "in": "body",
            "schema": {
              "properties": {
                "email": {
                  "type": "string"
                },
                "inviteToken": {
                  "type": "string"
                }
              }
            }
          }
        ],
        "responses": {
          "201": {
            "description": "invitation created"
          },
          "400": {
            "description": "invitation not created (already exists)",
            "schema": {
              "$ref": "#/definitions/errorMessage"
            }
          },
          "401": {
            "description": "unauthorized"
          },
          "500": {
            "description": "internal server error"
          }
        }
      }
    },
    "/invite/token/generate": {
      "post": {
        "tags": [
          "admin"
        ],
        "operationId": "inviteTokenGenerate",
        "parameters": [
          {
            "name": "body",
            "in": "body",
            "schema": {
              "properties": {
                "inviteTokens": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                }
              }
            }
          }
        ],
        "responses": {
          "201": {
            "description": "invite tokens created"
          },
          "400": {
            "description": "invite tokens not created"
          },
          "401": {
            "description": "unauthorized"
          },
          "500": {
            "description": "internal server error"
          }
        },
        "security": [
          {
            "key": []
          }
        ]
      }
    },
    "/limit-class/list": {
      "post": {
        "tags": [
          "admin"
        ],
        "operationId": "listLimitClasses",
        "parameters": [
          {
            "name": "body",
            "in": "body",
            "schema": {
              "properties": {
                "label": {
                  "type": "string"
                }
              }
            }
          }
        ],
        "responses": {
          "200": {
            "description": "limit classes",
            "schema": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/limitClass"
              }
            }
          },
          "401": {
            "description": "unauthorized"
          },
          "500": {
            "description": "internal server error"
          }
        },
        "security": [
          {
            "key": []
          }
        ]
      }
    },
    "/login": {
      "post": {
        "tags": [
          "account"
        ],
        "operationId": "login",
        "parameters": [
          {
            "name": "body",
            "in": "body",
            "schema": {
              "properties": {
                "email": {
                  "type": "string"
                },
                "password": {
                  "type": "string"
                }
              }
            }
          }
        ],
        "responses": {
          "200": {
            "description": "login successful",
            "schema": {
              "type": "string"
            }
          },
          "401": {
            "description": "invalid login"
          }
        }
      }
    },
    "/members/{organizationToken}": {
      "get": {
        "tags": [
          "metadata"
        ],
        "operationId": "listOrgMembers",
        "parameters": [
          {
            "type": "string",
            "name": "organizationToken",
            "in": "path",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "ok",
            "schema": {
              "properties": {
                "members": {
                  "type": "array",
                  "items": {
                    "$ref": "#/definitions/MembersItems0"
                  }
                }
              }
            }
          },
          "404": {
            "description": "not found"
          },
          "500": {
            "description": "internal server error"
          }
        },
        "security": [
          {
            "key": []
          }
        ]
      }
    },
    "/memberships": {
      "get": {
        "tags": [
          "metadata"
        ],
        "operationId": "listMemberships",
        "responses": {
          "200": {
            "description": "ok",
            "schema": {
              "properties": {
                "memberships": {
                  "type": "array",
                  "items": {
                    "$ref": "#/definitions/MembershipsItems0"
                  }
                }
              }
            }
          },
          "500": {
            "description": "internal server error"
          }
        },
        "security": [
          {
            "key": []
          }
        ]
      }
    },
    "/metrics/account": {
      "get": {
        "tags": [
          "metadata"
        ],
        "operationId": "getAccountMetrics",
        "parameters": [
          {
            "type": "string",
            "name": "duration",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "account metrics",
            "schema": {
              "$ref": "#/definitions/metrics"
            }
          },
          "400": {
            "description": "bad request"
          },
          "500": {
            "description": "internal server error"
          }
        },
        "security": [
          {
            "key": []
          }
        ]
      }
    },
    "/metrics/environment/{envId}": {
      "get": {
        "tags": [
          "metadata"
        ],
        "operationId": "getEnvironmentMetrics",
        "parameters": [
          {
            "type": "string",
            "name": "envId",
            "in": "path",
            "required": true
          },
          {
            "type": "string",
            "name": "duration",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "environment metrics",
            "schema": {
              "$ref": "#/definitions/metrics"
            }
          },
          "400": {
            "description": "bad request"
          },
          "401": {
            "description": "unauthorized"
          },
          "500": {
            "description": "internal server error"
          }
        },
        "security": [
          {
            "key": []
          }
        ]
      }
    },
    "/metrics/share/{shareToken}": {
      "get": {
        "tags": [
          "metadata"
        ],
        "operationId": "getShareMetrics",
        "parameters": [
          {
            "type": "string",
            "name": "shareToken",
            "in": "path",
            "required": true
          },
          {
            "type": "string",
            "name": "duration",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "share metrics",
            "schema": {
              "$ref": "#/definitions/metrics"
            }
          },
          "400": {
            "description": "bad request"
          },
          "401": {
            "description": "unauthorized"
          },
          "500": {
            "description": "internal server error"
          }
        },
        "security": [
          {
            "key": []
          }
        ]
      }
    },
    "/name/{namespaceToken}/{name}": {
      "get": {
        "tags": [
          "admin"
        ],
        "operationId": "getName",
        "parameters": [
          {
            "type": "string",
            "name": "namespaceToken",
            "in": "path",
            "required": true
          },
          {
            "type": "string",
            "name": "name",
            "in": "path",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "ok",
            "schema": {
              "type": "object",
              "required": [
                "namespaceToken",
                "namespaceName",
                "name",
                "accountEmail",
                "shareToken",
                "reserved",
                "createdAt"
              ],
              "properties": {
                "accountEmail": {
                  "type": "string"
                },
                "createdAt": {
                  "type": "integer"
                },
                "name": {
                  "type": "string"
                },
                "namespaceName": {
                  "type": "string"
                },
                "namespaceToken": {
                  "type": "string"
                },
                "reserved": {
                  "type": "boolean"
                },
                "shareToken": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "description": "unauthorized"
          },
          "404": {
            "description": "not found"
          },
          "500": {
            "description": "internal server error"
          }
        },
        "security": [
          {
            "key": []
          }
        ]
      }
    },
    "/namespace": {
      "post": {
        "tags": [
          "admin"
        ],
        "operationId": "createNamespace",
        "parameters": [
          {
            "name": "body",
            "in": "body",
            "schema": {
              "properties": {
                "description": {
                  "type": "string"
                },
                "name": {
                  "type": "string"
                },
                "open": {
                  "type": "boolean"
                },
                "token": {
                  "type": "string"
                }
              }
            }
          }
        ],
        "responses": {
          "201": {
            "description": "namespace created",
            "schema": {
              "properties": {
                "namespaceToken": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "description": "unauthorized"
          },
          "409": {
            "description": "namespace already exists"
          },
          "500": {
            "description": "internal server error"
          }
        },
        "security": [
          {
            "key": []
          }
        ]
      },
      "delete": {
        "tags": [
          "admin"
        ],
        "operationId": "deleteNamespace",
        "parameters": [
          {
            "name": "body",
            "in": "body",
            "schema": {
              "properties": {
                "namespaceToken": {
                  "type": "string"
                }
              }
            }
          }
        ],
        "responses": {
          "200": {
            "description": "namespace deleted"
          },
          "401": {
            "description": "unauthorized"
          },
          "404": {
            "description": "not found"
          },
          "500": {
            "description": "internal server error"
          }
        },
        "security": [
          {
            "key": []
          }
        ]
      },
      "patch": {
        "tags": [
          "admin"
        ],
        "operationId": "updateNamespace",
        "parameters": [
          {
            "name": "body",
            "in": "body",
            "schema": {
              "properties": {
                "description": {
                  "type": "string"
                },
                "name": {
                  "type": "string"
                },
                "namespaceToken": {
                  "type": "string"
                },
                "open": {
                  "type": "boolean"
                },
                "openSet": {
                  "type": "boolean"
                }
              }
            }
          }
        ],
        "responses": {
          "200": {
            "description": "namespace updated"
          },
          "401": {
            "description": "unauthorized"
          },
          "404": {
            "description": "not found"
          },
          "500": {
            "description": "internal server error"
          }
        },
        "security": [
          {
            "key": []
          }
        ]
      }
    },
    "/namespace/frontend/mapping": {
      "post": {
        "tags": [
          "admin"
        ],
        "operationId": "addNamespaceFrontendMapping",
        "parameters": [
          {
            "name": "body",
            "in": "body",
            "schema": {
              "type": "object",
              "properties": {
                "frontendToken": {
                  "type": "string"
                },
                "isDefault": {
                  "type": "boolean"
                },
                "namespaceToken": {
                  "type": "string"
                }
              }
            }
          }
        ],
        "responses": {
          "200": {
            "description": "namespace frontend mapping added"
          },
          "401": {
            "description": "unauthorized"
          },
          "404": {
            "description": "not found"
          },
          "500": {
            "description": "internal server error"
          }
        },
        "security": [
          {
            "key": []
          }
        ]
      },
      "delete": {
        "tags": [
          "admin"
        ],
        "operationId": "removeNamespaceFrontendMapping",
        "parameters": [
          {
            "name": "body",
            "in": "body",
            "schema": {
              "type": "object",
              "properties": {
                "frontendToken": {
                  "type": "string"
                },
                "namespaceToken": {
                  "type": "string"
                }
              }
            }
          }
        ],
        "responses": {
          "200": {
            "description": "namespace frontend mapping removed"
          },
          "401": {
            "description": "unauthorized"
          },
          "404": {
            "description": "not found"
          },
          "500": {
            "description": "internal server error"
          }
        },
        "security": [
          {
            "key": []
          }
        ]
      }
    },
    "/namespace/frontend/mapping/{namespaceToken}": {
      "get": {
        "tags": [
          "admin"
        ],
        "operationId": "listNamespaceFrontendMappings",
        "parameters": [
          {
            "type": "string",
            "name": "namespaceToken",
            "in": "path",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "namespace frontend mappings listed",
            "schema": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/ListNamespaceFrontendMappingsOKBodyItems0"
              }
            }
          },
          "401": {
            "description": "unauthorized"
          },
          "404": {
            "description": "namespace not found"
          },
          "500": {
            "description": "internal server error"
          }
        },
        "security": [
          {
            "key": []
          }
        ]
      }
    },
    "/namespace/grant": {
      "post": {
        "tags": [
          "admin"
        ],
        "operationId": "addNamespaceGrant",
        "parameters": [
          {
            "name": "body",
            "in": "body",
            "schema": {
              "type": "object",
              "properties": {
                "email": {
                  "type": "string"
                },
                "namespaceToken": {
                  "type": "string"
                }
              }
            }
          }
        ],
        "responses": {
          "200": {
            "description": "namespace grant added"
          },
          "401": {
            "description": "unauthorized"
          },
          "404": {
            "description": "not found"
          },
          "500": {
            "description": "internal server error"
          }
        },
        "security": [
          {
            "key": []
          }
        ]
      },
      "delete": {
        "tags": [
          "admin"
        ],
        "operationId": "removeNamespaceGrant",
        "parameters": [
          {
            "name": "body",
            "in": "body",
            "schema": {
              "type": "object",
              "properties": {
                "email": {
                  "type": "string"
                },
                "namespaceToken": {
                  "type": "string"
                }
              }
            }
          }
        ],
        "responses": {
          "200": {
            "description": "namespace grant removed"
          },
          "401": {
            "description": "unauthorized"
          },
          "404": {
            "description": "not found"
          },
          "500": {
            "description": "internal server error"
          }
        },
        "security": [
          {
            "key": []
          }
        ]
      }
    },
    "/namespaces": {
      "get": {
        "tags": [
          "admin"
        ],
        "operationId": "listNamespaces",
        "responses": {
          "200": {
            "description": "ok",
            "schema": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/ListNamespacesOKBodyItems0"
              }
            }
          },
          "401": {
            "description": "unauthorized"
          },
          "500": {
            "description": "internal server error"
          }
        },
        "security": [
          {
            "key": []
          }
        ]
      }
    },
    "/organization": {
      "post": {
        "tags": [
          "admin"
        ],
        "operationId": "createOrganization",
        "parameters": [
          {
            "name": "body",
            "in": "body",
            "schema": {
              "properties": {
                "description": {
                  "type": "string"
                }
              }
            }
          }
        ],
        "responses": {
          "201": {
            "description": "organization created",
            "schema": {
              "properties": {
                "organizationToken": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "description": "unauthorized"
          },
          "500": {
            "description": "internal server error"
          }
        },
        "security": [
          {
            "key": []
          }
        ]
      },
      "delete": {
        "tags": [
          "admin"
        ],
        "operationId": "deleteOrganization",
        "parameters": [
          {
            "name": "body",
            "in": "body",
            "schema": {
              "properties": {
                "organizationToken": {
                  "type": "string"
                }
              }
            }
          }
        ],
        "responses": {
          "200": {
            "description": "organization deleted"
          },
          "401": {
            "description": "unauthorized"
          },
          "404": {
            "description": "organization not found"
          },
          "500": {
            "description": "internal server error"
          }
        },
        "security": [
          {
            "key": []
          }
        ]
      }
    },
    "/organization/add": {
      "post": {
        "tags": [
          "admin"
        ],
        "operationId": "addOrganizationMember",
        "parameters": [
          {
            "name": "body",
            "in": "body",
            "schema": {
              "properties": {
                "admin": {
                  "type": "boolean"
                },
                "email": {
                  "type": "string"
                },
                "organizationToken": {
                  "type": "string"
                }
              }
            }
          }
        ],
        "responses": {
          "201": {
            "description": "member added"
          },
          "401": {
            "description": "unauthorized"
          },
          "404": {
            "description": "not found"
          },
          "500": {
            "description": "internal server error"
          }
        },
        "security": [
          {
            "key": []
          }
        ]
      }
    },
    "/organization/list": {
      "post": {
        "tags": [
          "admin"
        ],
        "operationId": "listOrganizationMembers",
        "parameters": [
          {
            "name": "body",
            "in": "body",
            "schema": {
              "properties": {
                "organizationToken": {
                  "type": "string"
                }
              }
            }
          }
        ],
        "responses": {
          "200": {
            "description": "list organization members",
            "schema": {
              "properties": {
                "members": {
                  "type": "array",
                  "items": {
                    "$ref": "#/definitions/MembersItems0"
                  }
                }
              }
            }
          },
          "401": {
            "description": "unauthorized"
          },
          "404": {
            "description": "not found"
          },
          "500": {
            "description": "internal server error"
          }
        },
        "security": [
          {
            "key": []
          }
        ]
      }
    },
    "/organization/remove": {
      "post": {
        "tags": [
          "admin"
        ],
        "operationId": "removeOrganizationMember",
        "parameters": [
          {
            "name": "body",
            "in": "body",
            "schema": {
              "properties": {
                "email": {
                  "type": "string"
                },
                "organizationToken": {
                  "type": "string"
                }
              }
            }
          }
        ],
        "responses": {
          "200": {
            "description": "member removed"
          },
          "401": {
            "description": "unauthorized"
          },
          "404": {
            "description": "not found"
          },
          "500": {
            "description": "internal server error"
          }
        },
        "security": [
          {
            "key": []
          }
        ]
      }
    },
    "/organizations": {
      "get": {
        "tags": [
          "admin"
        ],
        "operationId": "listOrganizations",
        "responses": {
          "200": {
            "description": "ok",
            "schema": {
              "properties": {
                "organizations": {
                  "type": "array",
                  "items": {
                    "$ref": "#/definitions/OrganizationsItems0"
                  }
                }
              }
            }
          },
          "401": {
            "description": "unauthorized"
          },
          "500": {
            "description": "internal server error"
          }
        },
        "security": [
          {
            "key": []
          }
        ]
      }
    },
    "/overview": {
      "get": {
        "tags": [
          "metadata"
        ],
        "operationId": "overview",
        "responses": {
          "200": {
            "description": "overview returned",
            "schema": {
              "$ref": "#/definitions/overview"
            }
          },
          "500": {
            "description": "internal server error",
            "schema": {
              "$ref": "#/definitions/errorMessage"
            }
          }
        },
        "security": [
          {
            "key": []
          }
        ]
      }
    },
    "/overview/{organizationToken}/{accountEmail}": {
      "get": {
        "tags": [
          "metadata"
        ],
        "operationId": "orgAccountOverview",
        "parameters": [
          {
            "type": "string",
            "name": "organizationToken",
            "in": "path",
            "required": true
          },
          {
            "type": "string",
            "name": "accountEmail",
            "in": "path",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "ok",
            "schema": {
              "$ref": "#/definitions/overview"
            }
          },
          "404": {
            "description": "not found"
          },
          "500": {
            "description": "internal server error"
          }
        },
        "security": [
          {
            "key": []
          }
        ]
      }
    },
    "/regenerateAccountToken": {
      "post": {
        "tags": [
          "account"
        ],
        "operationId": "regenerateAccountToken",
        "parameters": [
          {
            "name": "body",
            "in": "body",
            "schema": {
              "properties": {
                "emailAddress": {
                  "type": "string"
                }
              }
            }
          }
        ],
        "responses": {
          "200": {
            "description": "regenerate account token",
            "schema": {
              "properties": {
                "accountToken": {
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "description": "account not found"
          },
          "500": {
            "description": "internal server error"
          }
        },
        "security": [
          {
            "key": []
          }
        ]
      }
    },
    "/register": {
      "post": {
        "tags": [
          "account"
        ],
        "operationId": "register",
        "parameters": [
          {
            "name": "body",
            "in": "body",
            "schema": {
              "properties": {
                "password": {
                  "type": "string"
                },
                "registerToken": {
                  "type": "string"
                }
              }
            }
          }
        ],
        "responses": {
          "200": {
            "description": "account created",
            "schema": {
              "properties": {
                "accountToken": {
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "description": "request not found"
          },
          "422": {
            "description": "password validation failure",
            "schema": {
              "$ref": "#/definitions/errorMessage"
            }
          },
          "500": {
            "description": "internal server error"
          }
        }
      }
    },
    "/resetPassword": {
      "post": {
        "tags": [
          "account"
        ],
        "operationId": "resetPassword",
        "parameters": [
          {
            "name": "body",
            "in": "body",
            "schema": {
              "properties": {
                "password": {
                  "type": "string"
                },
                "resetToken": {
                  "type": "string"
                }
              }
            }
          }
        ],
        "responses": {
          "200": {
            "description": "password reset"
          },
          "404": {
            "description": "request not found"
          },
          "422": {
            "description": "password validation failure",
            "schema": {
              "$ref": "#/definitions/errorMessage"
            }
          },
          "500": {
            "description": "internal server error"
          }
        }
      }
    },
    "/resetPasswordRequest": {
      "post": {
        "tags": [
          "account"
        ],
        "operationId": "resetPasswordRequest",
        "parameters": [
          {
            "name": "body",
            "in": "body",
            "schema": {
              "properties": {
                "emailAddress": {
                  "type": "string"
                }
              }
            }
          }
        ],
        "responses": {
          "201": {
            "description": "reset password request created"
          },
          "400": {
            "description": "reset password request not created"
          },
          "500": {
            "description": "internal server error"
          }
        }
      }
    },
    "/share": {
      "post": {
        "tags": [
          "share"
        ],
        "operationId": "share",
        "parameters": [
          {
            "name": "body",
            "in": "body",
            "schema": {
              "$ref": "#/definitions/shareRequest"
            }
          }
        ],
        "responses": {
          "201": {
            "description": "share created",
            "schema": {
              "$ref": "#/definitions/shareResponse"
            }
          },
          "401": {
            "description": "unauthorized"
          },
          "404": {
            "description": "not found"
          },
          "409": {
            "description": "conflict",
            "schema": {
              "$ref": "#/definitions/errorMessage"
            }
          },
          "422": {
            "description": "unprocessable"
          },
          "500": {
            "description": "internal server error",
            "schema": {
              "$ref": "#/definitions/errorMessage"
            }
          },
          "503": {
            "description": "service unavailable",
            "headers": {
              "Retry-After": {
                "type": "integer",
                "description": "seconds to wait before retrying"
              }
            }
          }
        },
        "security": [
          {
            "key": []
          }
        ]
      },
      "patch": {
        "tags": [
          "share"
        ],
        "operationId": "updateShare",
        "parameters": [
          {
            "name": "body",
            "in": "body",
            "schema": {
              "properties": {
                "addAccessGrants": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "removeAccessGrants": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "shareToken": {
                  "type": "string"
                }
              }
            }
          }
        ],
        "responses": {
          "200": {
            "description": "share updated"
          },
          "400": {
            "description": "bad request"
          },
          "401": {
            "description": "unauthorized"
          },
          "404": {
            "description": "not found"
          },
          "500": {
            "description": "internal server error"
          }
        },
        "security": [
          {
            "key": []
          }
        ]
      }
    },
    "/share/name": {
      "post": {
        "tags": [
          "share"
        ],
        "operationId": "createShareName",
        "parameters": [
          {
            "name": "body",
            "in": "body",
            "schema": {
              "properties": {
                "name": {
                  "type": "string"
                },
                "namespaceToken": {
                  "type": "string"
                }
              }
            }
          }
        ],
        "responses": {
          "201": {
            "description": "name created"
          },
          "401": {
            "description": "unauthorized"
          },
          "404": {
            "description": "namespace not found"
          },
          "409": {
            "description": "name already exists",
            "schema": {
              "$ref": "#/definitions/errorMessage"
            }
          },
          "500": {
            "description": "internal server error"
          }
        },
        "security": [
          {
            "key": []
          }
        ]
      },
      "delete": {
        "tags": [
          "share"
        ],
        "operationId": "deleteShareName",
        "parameters": [
          {
            "name": "body",
            "in": "body",
            "schema": {
              "properties": {
                "name": {
                  "type": "string"
                },
                "namespaceToken": {
                  "type": "string"
                }
              }
            }
          }
        ],
        "responses": {
          "200": {
            "description": "name deleted"
          },
          "401": {
            "description": "unauthorized"
          },
          "404": {
            "description": "name not found"
          },
          "409": {
            "description": "name is still attached to an active share",
            "schema": {
              "$ref": "#/definitions/errorMessage"
            }
          },
          "500": {
            "description": "internal server error"
          }
        },
        "security": [
          {
            "key": []
          }
        ]
      },
      "patch": {
        "tags": [
          "share"
        ],
        "operationId": "updateShareName",
        "parameters": [
          {
            "name": "body",
            "in": "body",
            "schema": {
              "properties": {
                "name": {
                  "type": "string"
                },
                "namespaceToken": {
                  "type": "string"
                },
                "reserved": {
                  "description": "whether the name should be reserved (true) or released (false)",
                  "type": "boolean"
                }
              }
            }
          }
        ],
        "responses": {
          "200": {
            "description": "name updated successfully"
          },
          "401": {
            "description": "unauthorized"
          },
          "404": {
            "description": "name not found"
          },
          "409": {
            "description": "conflict - cannot change reservation state",
            "schema": {
              "$ref": "#/definitions/errorMessage"
            }
          },
          "500": {
            "description": "internal server error"
          }
        },
        "security": [
          {
            "key": []
          }
        ]
      }
    },
    "/share/names": {
      "get": {
        "tags": [
          "share"
        ],
        "operationId": "listAllNames",
        "responses": {
          "200": {
            "description": "ok",
            "schema": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/name"
              }
            }
          },
          "401": {
            "description": "unauthorized"
          },
          "500": {
            "description": "internal server error"
          }
        },
        "security": [
          {
            "key": []
          }
        ]
      }
    },
    "/share/names/{namespaceToken}": {
      "get": {
        "tags": [
          "share"
        ],
        "operationId": "listNamesForNamespace",
        "parameters": [
          {
            "type": "string",
            "name": "namespaceToken",
            "in": "path",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "ok",
            "schema": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/name"
              }
            }
          },
          "401": {
            "description": "unauthorized"
          },
          "404": {
            "description": "namespace not found"
          },
          "500": {
            "description": "internal server error"
          }
        },
        "security": [
          {
            "key": []
          }
        ]
      }
    },
    "/share/namespaces": {
      "get": {
        "tags": [
          "share"
        ],
        "operationId": "listShareNamespaces",
        "responses": {
          "200": {
            "description": "ok",
            "schema": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/ListShareNamespacesOKBodyItems0"
              }
            }
          },
          "401": {
            "description": "unauthorized"
          },
          "500": {
            "description": "internal server error"
          }
        },
        "security": [
          {
            "key": []
          }
        ]
      }
    },
    "/shares": {
      "get": {
        "tags": [
          "metadata"
        ],
        "operationId": "listShares",
        "parameters": [
          {
            "type": "string",
            "description": "filter by environment ziti identity",
            "name": "envZId",
            "in": "query"
          },
          {
            "type": "string",
            "description": "filter by share mode (public/private)",
            "name": "shareMode",
            "in": "query"
          },
          {
            "type": "string",
            "description": "filter by backend mode",
            "name": "backendMode",
            "in": "query"
          },
          {
            "type": "string",
            "description": "filter by share token (substring match)",
            "name": "shareToken",
            "in": "query"
          },
          {
            "type": "string",
            "description": "filter by target (substring match)",
            "name": "target",
            "in": "query"
          },
          {
            "type": "string",
            "description": "filter by permission mode (open/closed)",
            "name": "permissionMode",
            "in": "query"
          },
          {
            "type": "boolean",
            "description": "filter shares with recent activity",
            "name": "hasActivity",
            "in": "query"
          },
          {
            "type": "boolean",
            "description": "filter shares WITHOUT recent activity (inverse of hasActivity)",
            "name": "idle",
            "in": "query"
          },
          {
            "type": "string",
            "description": "duration for hasActivity filter (e.g., \"24h\", \"7d\", \"30d\"). default \"24h\", maximum \"30d\" (720h)",
            "name": "activityDuration",
            "in": "query"
          },
          {
            "type": "string",
            "description": "filter by created date (RFC3339 format)",
            "name": "createdAfter",
            "in": "query"
          },
          {
            "type": "string",
            "description": "filter by created date (RFC3339 format)",
            "name": "createdBefore",
            "in": "query"
          },
          {
            "type": "string",
            "description": "filter by updated date (RFC3339 format)",
            "name": "updatedAfter",
            "in": "query"
          },
          {
            "type": "string",
            "description": "filter by updated date (RFC3339 format)",
            "name": "updatedBefore",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "list of shares",
            "schema": {
              "$ref": "#/definitions/sharesList"
            }
          },
          "400": {
            "description": "bad request (e.g., activityDuration exceeds 30d, invalid date format)",
            "schema": {
              "$ref": "#/definitions/errorMessage"
            }
          },
          "401": {
            "description": "unauthorized"
          },
          "500": {
            "description": "internal server error",
            "schema": {
              "$ref": "#/definitions/errorMessage"
            }
          }
        },
        "security": [
          {
            "key": []
          }
        ]
      }
    },
    "/skip-interstitial-grant": {
      "get": {
        "tags": [
          "admin"
        ],
        "operationId": "getSkipInterstitialGrant",
        "parameters": [
          {
            "type": "string",
            "name": "email",
            "in": "query",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "ok",
            "schema": {
              "type": "object",
              "properties": {
                "email": {
                  "type": "string"
                },
                "granted": {
                  "type": "boolean"
                }
              }
            }
          },
          "401": {
            "description": "unauthorized"
          },
          "404": {
            "description": "account not found"
          },
          "500": {
            "description": "internal server error"
          }
        },
        "security": [
          {
            "key": []
          }
        ]
      },
      "post": {
        "tags": [
          "admin"
        ],
        "operationId": "grantSkipInterstitial",
        "parameters": [
          {
            "name": "body",
            "in": "body",
            "schema": {
              "properties": {
                "email": {
                  "type": "string"
                }
              }
            }
          }
        ],
        "responses": {
          "200": {
            "description": "ok"
          },
          "401": {
            "description": "unauthorized"
          },
          "404": {
            "description": "account not found"
          },
          "500": {
            "description": "internal server error"
          }
        },
        "security": [
          {
            "key": []
          }
        ]
      },
      "delete": {
        "tags": [
          "admin"
        ],
        "operationId": "revokeSkipInterstitial",
        "parameters": [
          {
            "name": "body",
            "in": "body",
            "schema": {
              "properties": {
                "email": {
                  "type": "string"
                }
              }
            }
          }
        ],
        "responses": {
          "200": {
            "description": "ok"
          },
          "401": {
            "description": "unauthorized"
          },
          "404": {
            "description": "account not found"
          },
          "500": {
            "description": "internal server error"
          }
        },
        "security": [
          {
            "key": []
          }
        ]
      }
    },
    "/sparklines": {
      "post": {
        "tags": [
          "metadata"
        ],
        "operationId": "getSparklines",
        "parameters": [
          {
            "name": "body",
            "in": "body",
            "schema": {
              "properties": {
                "account": {
                  "type": "boolean"
                },
                "environments": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "shares": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                }
              }
            }
          }
        ],
        "responses": {
          "200": {
            "description": "sparklines data",
            "schema": {
              "properties": {
                "sparklines": {
                  "type": "array",
                  "items": {
                    "$ref": "#/definitions/metrics"
                  }
                }
              }
            }
          },
          "401": {
            "description": "unauthorized"
          },
          "500": {
            "description": "internal server error"
          }
        },
        "security": [
          {
            "key": []
          }
        ]
      }
    },
    "/unaccess": {
      "delete": {
        "tags": [
          "share"
        ],
        "operationId": "unaccess",
        "parameters": [
          {
            "name": "body",
            "in": "body",
            "schema": {
              "properties": {
                "envZId": {
                  "type": "string"
                },
                "frontendToken": {
                  "type": "string"
                },
                "shareToken": {
                  "type": "string"
                }
              }
            }
          }
        ],
        "responses": {
          "200": {
            "description": "access removed"
          },
          "401": {
            "description": "unauthorized"
          },
          "404": {
            "description": "not found"
          },
          "500": {
            "description": "internal server error"
          },
          "503": {
            "description": "service unavailable",
            "headers": {
              "Retry-After": {
                "type": "integer",
                "description": "seconds to wait before retrying"
              }
            }
          }
        },
        "security": [
          {
            "key": []
          }
        ]
      }
    },
    "/unshare": {
      "delete": {
        "tags": [
          "share"
        ],
        "operationId": "unshare",
        "parameters": [
          {
            "name": "body",
            "in": "body",
            "schema": {
              "properties": {
                "envZId": {
                  "type": "string"
                },
                "shareToken": {
                  "type": "string"
                }
              }
            }
          }
        ],
        "responses": {
          "200": {
            "description": "share removed"
          },
          "401": {
            "description": "unauthorized"
          },
          "404": {
            "description": "not found"
          },
          "500": {
            "description": "internal server error",
            "schema": {
              "$ref": "#/definitions/errorMessage"
            }
          },
          "503": {
            "description": "service unavailable",
            "headers": {
              "Retry-After": {
                "type": "integer",
                "description": "seconds to wait before retrying"
              }
            }
          }
        },
        "security": [
          {
            "key": []
          }
        ]
      }
    },
    "/verify": {
      "post": {
        "tags": [
          "account"
        ],
        "operationId": "verify",
        "parameters": [
          {
            "name": "body",
            "in": "body",
            "schema": {
              "properties": {
                "registerToken": {
                  "type": "string"
                }
              }
            }
          }
        ],
        "responses": {
          "200": {
            "description": "registration token ready",
            "schema": {
              "properties": {
                "email": {
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "description": "registration token not found"
          },
          "500": {
            "description": "internal server error"
          }
        }
      }
    },
    "/version": {
      "get": {
        "tags": [
          "metadata"
        ],
        "operationId": "version",
        "responses": {
          "200": {
            "description": "legacy upgrade required",
            "schema": {
              "$ref": "#/definitions/version"
            }
          }
        }
      }
    },
    "/versions": {
      "get": {
        "tags": [
          "metadata"
        ],
        "operationId": "versionInventory",
        "responses": {
          "200": {
            "description": "ok",
            "schema": {
              "properties": {
                "controllerVersion": {
                  "type": "string"
                }
              }
            }
          }
        }
      }
    }
  },
  "definitions": {
    "AccessesItems0": {
      "type": "object",
      "properties": {
        "bindAddress": {
          "type": "string"
        },
        "failure": {
          "type": "object",
          "properties": {
            "count": {
              "type": "integer"
            },
            "id": {
              "type": "string"
            },
            "lastError": {
              "type": "string"
            },
            "nextRetry": {
              "type": "string"
            }
          }
        },
        "frontendToken": {
          "type": "string"
        },
        "responseHeaders": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "status": {
          "type": "string"
        },
        "token": {
          "type": "string"
        }
      }
    },
    "AccessesItems0Failure": {
      "type": "object",
      "properties": {
        "count": {
          "type": "integer"
        },
        "id": {
          "type": "string"
        },
        "lastError": {
          "type": "string"
        },
        "nextRetry": {
          "type": "string"
        }
      }
    },
    "ListFrontendNamespaceMappingsOKBodyItems0": {
      "type": "object",
      "properties": {
        "createdAt": {
          "type": "integer"
        },
        "frontendToken": {
          "type": "string"
        },
        "isDefault": {
          "type": "boolean"
        },
        "namespaceToken": {
          "type": "string"
        }
      }
    },
    "ListFrontendsOKBodyItems0": {
      "type": "object",
      "properties": {
        "createdAt": {
          "type": "integer"
        },
        "dynamic": {
          "type": "boolean"
        },
        "frontendToken": {
          "type": "string"
        },
        "permissionMode": {
          "type": "string"
        },
        "publicName": {
          "type": "string"
        },
        "updatedAt": {
          "type": "integer"
        },
        "urlTemplate": {
          "type": "string"
        },
        "zId": {
          "type": "string"
        }
      }
    },
    "ListNamespaceFrontendMappingsOKBodyItems0": {
      "type": "object",
      "properties": {
        "createdAt": {
          "type": "integer"
        },
        "frontendToken": {
          "type": "string"
        },
        "isDefault": {
          "type": "boolean"
        },
        "namespaceToken": {
          "type": "string"
        }
      }
    },
    "ListNamespacesOKBodyItems0": {
      "type": "object",
      "properties": {
        "createdAt": {
          "type": "integer"
        },
        "description": {
          "type": "string"
        },
        "name": {
          "type": "string"
        },
        "namespaceToken": {
          "type": "string"
        },
        "open": {
          "type": "boolean"
        },
        "updatedAt": {
          "type": "integer"
        }
      }
    },
    "ListShareNamespacesOKBodyItems0": {
      "type": "object",
      "properties": {
        "description": {
          "type": "string"
        },
        "name": {
          "type": "string"
        },
        "namespaceToken": {
          "type": "string"
        }
      }
    },
    "MembersItems0": {
      "properties": {
        "admin": {
          "type": "boolean"
        },
        "email": {
          "type": "string"
        }
      }
    },
    "MembershipsItems0": {
      "properties": {
        "admin": {
          "type": "boolean"
        },
        "description": {
          "type": "string"
        },
        "organizationToken": {
          "type": "string"
        }
      }
    },
    "OrganizationsItems0": {
      "properties": {
        "description": {
          "type": "string"
        },
        "organizationToken": {
          "type": "string"
        }
      }
    },
    "OverviewNamesItems0": {
      "type": "object",
      "properties": {
        "createdAt": {
          "type": "integer"
        },
        "name": {
          "type": "string"
        },
        "namespaceName": {
          "type": "string"
        },
        "namespaceToken": {
          "type": "string"
        },
        "reserved": {
          "type": "boolean"
        },
        "shareToken": {
          "type": "string"
        }
      }
    },
    "OverviewNamespacesItems0": {
      "type": "object",
      "properties": {
        "description": {
          "type": "string"
        },
        "name": {
          "type": "string"
        },
        "namespaceToken": {
          "type": "string"
        }
      }
    },
    "SharesItems0": {
      "type": "object",
      "properties": {
        "backendEndpoint": {
          "type": "string"
        },
        "backendMode": {
          "type": "string"
        },
        "failure": {
          "type": "object",
          "properties": {
            "count": {
              "type": "integer"
            },
            "id": {
              "type": "string"
            },
            "lastError": {
              "type": "string"
            },
            "nextRetry": {
              "type": "string"
            }
          }
        },
        "frontendEndpoints": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "open": {
          "type": "boolean"
        },
        "shareMode": {
          "type": "string"
        },
        "status": {
          "type": "string"
        },
        "token": {
          "type": "string"
        }
      }
    },
    "SharesItems0Failure": {
      "type": "object",
      "properties": {
        "count": {
          "type": "integer"
        },
        "id": {
          "type": "string"
        },
        "lastError": {
          "type": "string"
        },
        "nextRetry": {
          "type": "string"
        }
      }
    },
    "accessSummary": {
      "type": "object",
      "properties": {
        "backendMode": {
          "type": "string"
        },
        "bindAddress": {
          "type": "string"
        },
        "createdAt": {
          "type": "integer"
        },
        "description": {
          "type": "string"
        },
        "envZId": {
          "type": "string"
        },
        "frontendToken": {
          "type": "string"
        },
        "id": {
          "type": "integer"
        },
        "limited": {
          "type": "boolean"
        },
        "shareToken": {
          "type": "string"
        },
        "updatedAt": {
          "type": "integer"
        }
      }
    },
    "accessesList": {
      "type": "object",
      "properties": {
        "accesses": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/accessSummary"
          }
        }
      }
    },
    "authUser": {
      "type": "object",
      "properties": {
        "password": {
          "type": "string"
        },
        "username": {
          "type": "string"
        }
      }
    },
    "configuration": {
      "type": "object",
      "properties": {
        "inviteTokenContact": {
          "type": "string"
        },
        "invitesOpen": {
          "type": "boolean"
        },
        "newAccountLink": {
          "type": "string"
        },
        "requiresInviteToken": {
          "type": "boolean"
        },
        "touLink": {
          "type": "string"
        },
        "version": {
          "type": "string"
        }
      }
    },
    "environment": {
      "type": "object",
      "properties": {
        "activity": {
          "$ref": "#/definitions/sparkData"
        },
        "address": {
          "type": "string"
        },
        "createdAt": {
          "type": "integer"
        },
        "description": {
          "type": "string"
        },
        "host": {
          "type": "string"
        },
        "limited": {
          "type": "boolean"
        },
        "remoteAgent": {
          "type": "boolean"
        },
        "updatedAt": {
          "type": "integer"
        },
        "zId": {
          "type": "string"
        }
      }
    },
    "environmentAndResources": {
      "type": "object",
      "properties": {
        "environment": {
          "$ref": "#/definitions/environment"
        },
        "frontends": {
          "$ref": "#/definitions/frontends"
        },
        "shares": {
          "$ref": "#/definitions/shares"
        }
      }
    },
    "environmentSummary": {
      "type": "object",
      "properties": {
        "accessCount": {
          "type": "integer"
        },
        "address": {
          "type": "string"
        },
        "createdAt": {
          "type": "integer"
        },
        "description": {
          "type": "string"
        },
        "envZId": {
          "type": "string"
        },
        "host": {
          "type": "string"
        },
        "limited": {
          "type": "boolean"
        },
        "remoteAgent": {
          "type": "boolean"
        },
        "shareCount": {
          "type": "integer"
        },
        "updatedAt": {
          "type": "integer"
        }
      }
    },
    "environments": {
      "type": "array",
      "items": {
        "$ref": "#/definitions/environment"
      }
    },
    "environmentsList": {
      "type": "object",
      "properties": {
        "environments": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/environmentSummary"
          }
        }
      }
    },
    "errorMessage": {
      "type": "string"
    },
    "frontend": {
      "type": "object",
      "properties": {
        "backendMode": {
          "type": "string"
        },
        "bindAddress": {
          "type": "string"
        },
        "createdAt": {
          "type": "integer"
        },
        "description": {
          "type": "string"
        },
        "frontendToken": {
          "type": "string"
        },
        "id": {
          "type": "integer"
        },
        "shareToken": {
          "type": "string"
        },
        "updatedAt": {
          "type": "integer"
        },
        "zId": {
          "type": "string"
        }
      }
    },
    "frontends": {
      "type": "array",
      "items": {
        "$ref": "#/definitions/frontend"
      }
    },
    "limitClass": {
      "type": "object",
      "properties": {
        "backendMode": {
          "type": "string"
        },
        "createdAt": {
          "type": "integer"
        },
        "environments": {
          "type": "integer"
        },
        "id": {
          "type": "integer"
        },
        "label": {
          "type": "string"
        },
        "limitAction": {
          "type": "string"
        },
        "periodMinutes": {
          "type": "integer"
        },
        "reservedShares": {
          "type": "integer"
        },
        "rxBytes": {
          "type": "integer"
        },
        "shareFrontends": {
          "type": "integer"
        },
        "shares": {
          "type": "integer"
        },
        "totalBytes": {
          "type": "integer"
        },
        "txBytes": {
          "type": "integer"
        },
        "uniqueNames": {
          "type": "integer"
        },
        "updatedAt": {
          "type": "integer"
        }
      }
    },
    "metrics": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string"
        },
        "period": {
          "type": "number"
        },
        "samples": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/metricsSample"
          }
        },
        "scope": {
          "type": "string"
        }
      }
    },
    "metricsSample": {
      "type": "object",
      "properties": {
        "rx": {
          "type": "number"
        },
        "timestamp": {
          "type": "number"
        },
        "tx": {
          "type": "number"
        }
      }
    },
    "name": {
      "type": "object",
      "properties": {
        "createdAt": {
          "type": "integer"
        },
        "name": {
          "type": "string"
        },
        "namespaceName": {
          "type": "string"
        },
        "namespaceToken": {
          "type": "string"
        },
        "reserved": {
          "type": "boolean"
        },
        "shareToken": {
          "type": "string"
        }
      }
    },
    "nameSelection": {
      "type": "object",
      "properties": {
        "name": {
          "type": "string"
        },
        "namespaceToken": {
          "type": "string"
        }
      }
    },
    "overview": {
      "type": "object",
      "properties": {
        "accountLimited": {
          "type": "boolean"
        },
        "environments": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/environmentAndResources"
          }
        },
        "names": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/OverviewNamesItems0"
          }
        },
        "namespaces": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/OverviewNamespacesItems0"
          }
        }
      }
    },
    "principal": {
      "type": "object",
      "properties": {
        "admin": {
          "type": "boolean"
        },
        "email": {
          "type": "string"
        },
        "id": {
          "type": "integer"
        },
        "limitless": {
          "type": "boolean"
        },
        "token": {
          "type": "string"
        }
      }
    },
    "share": {
      "type": "object",
      "properties": {
        "activity": {
          "$ref": "#/definitions/sparkData"
        },
        "backendMode": {
          "type": "string"
        },
        "createdAt": {
          "type": "integer"
        },
        "envZId": {
          "type": "string"
        },
        "frontendEndpoints": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "limited": {
          "type": "boolean"
        },
        "shareMode": {
          "type": "string"
        },
        "shareToken": {
          "type": "string"
        },
        "target": {
          "type": "string"
        },
        "updatedAt": {
          "type": "integer"
        },
        "zId": {
          "type": "string"
        }
      }
    },
    "shareRequest": {
      "type": "object",
      "properties": {
        "accessGrants": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "authScheme": {
          "type": "string"
        },
        "backendMode": {
          "type": "string",
          "enum": [
            "proxy",
            "web",
            "tcpTunnel",
            "udpTunnel",
            "caddy",
            "drive",
            "socks"
          ]
        },
        "basicAuthUsers": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/authUser"
          }
        },
        "envZId": {
          "type": "string"
        },
        "nameSelections": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/nameSelection"
          }
        },
        "oauthEmailDomains": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "oauthProvider": {
          "type": "string"
        },
        "oauthRefreshInterval": {
          "type": "string"
        },
        "permissionMode": {
          "type": "string",
          "enum": [
            "open",
            "closed"
          ]
        },
        "privateShareToken": {
          "type": "string"
        },
        "shareMode": {
          "type": "string",
          "enum": [
            "public",
            "private"
          ]
        },
        "target": {
          "type": "string"
        }
      }
    },
    "shareResponse": {
      "type": "object",
      "properties": {
        "frontendProxyEndpoints": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "shareToken": {
          "type": "string"
        }
      }
    },
    "shareSummary": {
      "type": "object",
      "properties": {
        "backendMode": {
          "type": "string"
        },
        "createdAt": {
          "type": "integer"
        },
        "envZId": {
          "type": "string"
        },
        "frontendEndpoints": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "limited": {
          "type": "boolean"
        },
        "shareMode": {
          "type": "string"
        },
        "shareToken": {
          "type": "string"
        },
        "target": {
          "type": "string"
        },
        "updatedAt": {
          "type": "integer"
        },
        "zId": {
          "type": "string"
        }
      }
    },
    "shares": {
      "type": "array",
      "items": {
        "$ref": "#/definitions/share"
      }
    },
    "sharesList": {
      "type": "object",
      "properties": {
        "shares": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/shareSummary"
          }
        }
      }
    },
    "sparkData": {
      "type": "array",
      "items": {
        "$ref": "#/definitions/sparkDataSample"
      }
    },
    "sparkDataSample": {
      "type": "object",
      "properties": {
        "rx": {
          "type": "number"
        },
        "tx": {
          "type": "number"
        }
      }
    },
    "version": {
      "type": "string"
    }
  },
  "securityDefinitions": {
    "key": {
      "type": "apiKey",
      "name": "x-token",
      "in": "header"
    }
  }
}`))
}
