zrok Documentation

Secure internet sharing made simple.

RAW Doc

Docker & Self-Hosted Deployment Verified OCI

Deploy zrok on any server, homelab, or cloud container platform.

1-Click Terminal Command
bash (docker run)
docker run -d --name zrok -p 2:2 --restart always postgres:16-alpine
Configured Services & Ports
⚙️ ziti-controller
image: ${ZITI_CONTROLLER_IMAGE:-docker.io/openziti/ziti-controller}:${ZITI_CONTROLLER_TAG:-latest}
🔌 Ports: ${ZROK2_INSECURE_INTERFACE:-127.0.0.1}:${ZITI_CTRL_PORT:-1280}:${ZITI_CTRL_PORT:-1280}
⚙️ ziti-router-init
image: ${ZITI_CONTROLLER_IMAGE:-docker.io/openziti/ziti-controller}:${ZITI_CONTROLLER_TAG:-latest}
⚙️ ziti-router
image: ${ZITI_ROUTER_IMAGE:-docker.io/openziti/ziti-router}:${ZITI_ROUTER_TAG:-latest}
🔌 Ports: 0.0.0.0:${ZITI_ROUTER_PORT:-3022}:${ZITI_ROUTER_PORT:-3022}
⚙️ postgresql
image: postgres:16-alpine
⚙️ zrok2-init
image: ${ZROK2_IMAGE:-docker.io/openziti/zrok2}:${ZROK2_TAG:-latest}
⚙️ zrok2-controller
image: ${ZROK2_IMAGE:-docker.io/openziti/zrok2}:${ZROK2_TAG:-latest}
🔌 Ports: ${ZROK2_INSECURE_INTERFACE:-127.0.0.1}:${ZROK2_CTRL_PORT:-18080}:${ZROK2_CTRL_PORT:-18080}
⚙️ zrok2-frontend
image: ${ZROK2_IMAGE:-docker.io/openziti/zrok2}:${ZROK2_TAG:-latest}
🔌 Ports: ${ZROK2_INSECURE_INTERFACE:-127.0.0.1}:${ZROK2_FRONTEND_PORT:-8080}:${ZROK2_FRONTEND_PORT:-8080}
⚙️ zrok2-metrics-bridge
image: ${ZROK2_IMAGE:-docker.io/openziti/zrok2}:${ZROK2_TAG:-latest}
⚙️ rabbitmq
image: rabbitmq:3-management-alpine
⚙️ influxdb
image: ${INFLUXDB_IMAGE:-influxdb:2.8-alpine}
docker-compose.yml
yaml (docker-compose.yml)
# zrok2 Docker Compose — self-hosting stack
#
# Usage:
#   cp .env.example .env   # edit required values
#   docker compose up -d
#
# Optional TLS with Caddy:
#   COMPOSE_FILE=compose.yml:compose.caddy.yml docker compose up -d
#
# See https://docs.zrok.io/docs/self-hosting/docker/ for the full guide.

x-zrok2-image: &zrok2-image
  image: ${ZROK2_IMAGE:-docker.io/openziti/zrok2}:${ZROK2_TAG:-latest}

services:

  # ── Ziti Overlay Network ──────────────────────────────────────────────────

  ziti-controller:
    image: ${ZITI_CONTROLLER_IMAGE:-docker.io/openziti/ziti-controller}:${ZITI_CONTROLLER_TAG:-latest}
    environment:
      ZITI_BOOTSTRAP: "true"
      ZITI_BOOTSTRAP_CLUSTER: "true"
      ZITI_CTRL_ADVERTISED_ADDRESS: ziti.${ZROK2_DNS_ZONE:?err}
      ZITI_CTRL_ADVERTISED_PORT: ${ZITI_CTRL_PORT:-1280}
      ZITI_USER: ${ZITI_USER:-admin}
      ZITI_PWD: ${ZITI_PWD:?err}
      ZITI_CLUSTER_TRUST_DOMAIN: ${ZROK2_DNS_ZONE}
      ZITI_CLUSTER_NODE_NAME: ziti-ctrl
      PFXLOG_NO_JSON: "true"
    volumes:
      - ziti-ctrl-data:/ziti-controller
    ports:
      - "${ZROK2_INSECURE_INTERFACE:-127.0.0.1}:${ZITI_CTRL_PORT:-1280}:${ZITI_CTRL_PORT:-1280}"
    networks:
      zrok2:
        aliases:
          - ziti.${ZROK2_DNS_ZONE}
    healthcheck:
      test: ["CMD", "ziti", "agent", "stats"]
      interval: 5s
      timeout: 5s
      retries: 12
      start_period: 30s
    restart: unless-stopped

  # One-shot: create the edge router on the controller and save the JWT for
  # enrollment by the ziti-router service. Idempotent — skips creation if the
  # router already exists.
  ziti-router-init:
    image: ${ZITI_CONTROLLER_IMAGE:-docker.io/openziti/ziti-controller}:${ZITI_CONTROLLER_TAG:-latest}
    entrypoint: ["/bin/bash", "-c"]
    command:
      - |
        set -o errexit -o nounset -o pipefail

        # Retry helper (self-contained — no external dependencies)
        retry() {
          local max="$$1" delay="$$2" desc="$$3"; shift 3
          local n=1
          while true; do
            if "$$@"; then return 0; fi
            if (( n >= max )); then
              echo "ERROR: $$desc failed after $$max attempts" >&2; exit 1
            fi
            echo "WARN: $$desc failed (attempt $$n/$$max), retrying in $${delay}s..."
            sleep "$$delay"; (( n++ ))
          done
        }

        ROUTER_NAME="$${ZITI_ROUTER_NAME:-zrok2-router}"
        JWT_FILE="/ziti-router/$${ROUTER_NAME}.jwt"
        ZITI_ENDPOINT="https://ziti.$${ZROK2_DNS_ZONE}:$${ZITI_CTRL_PORT:-1280}"

        echo "INFO: logging into Ziti controller..."
        retry 60 5 "Ziti controller login" \
          ziti edge login "$$ZITI_ENDPOINT" \
            --username "$${ZITI_USER:-admin}" \
            --password "$${ZITI_PWD}" \
            --yes
        echo "INFO: logged into Ziti controller"

        # skip if router already enrolled (identity cert exists)
        if [[ -f "/ziti-router/$${ROUTER_NAME}.cert.pem" \
           || -f "/ziti-router/certs/cert.pem" ]]; then
          echo "INFO: router identity already exists, skipping creation"
          exit 0
        fi

        # create the edge router (idempotent check via list)
        _create_router() {
          if ziti edge list edge-routers "name=\"$${ROUTER_NAME}\"" 2>/dev/null \
             | grep -q "$${ROUTER_NAME}"; then
            echo "INFO: edge router '$${ROUTER_NAME}' already exists"
            return 0
          fi
          echo "INFO: creating edge router '$${ROUTER_NAME}'..."
          ziti edge create edge-router "$${ROUTER_NAME}" \
            --jwt-output-file "$$JWT_FILE" \
            --tunneler-enabled
          echo "INFO: edge router created, JWT saved to $$JWT_FILE"
        }
        retry 5 3 "create edge router" _create_router
    environment:
      ZROK2_DNS_ZONE: ${ZROK2_DNS_ZONE:?err}
      ZITI_PWD: ${ZITI_PWD:?err}
      ZITI_USER: ${ZITI_USER:-admin}
      ZITI_CTRL_PORT: ${ZITI_CTRL_PORT:-1280}
      ZITI_ROUTER_NAME: ${ZITI_ROUTER_NAME:-zrok2-router}
    depends_on:
      ziti-controller:
        condition: service_healthy
    volumes:
      - ziti-router-data:/ziti-router
    networks:
      - zrok2

  ziti-router:
    image: ${ZITI_ROUTER_IMAGE:-docker.io/openziti/ziti-router}:${ZITI_ROUTER_TAG:-latest}
    environment:
      ZITI_BOOTSTRAP: "true"
      ZITI_BOOTSTRAP_ENROLLMENT: "true"
      ZITI_BOOTSTRAP_CONFIG: "true"
      ZITI_AUTO_RENEW_CERTS: "true"
      ZITI_CTRL_ADVERTISED_ADDRESS: ziti.${ZROK2_DNS_ZONE}
      ZITI_CTRL_ADVERTISED_PORT: ${ZITI_CTRL_PORT:-1280}
      ZITI_ROUTER_ADVERTISED_ADDRESS: router.${ZROK2_DNS_ZONE}
      ZITI_ROUTER_PORT: ${ZITI_ROUTER_PORT:-3022}
      ZITI_ROUTER_NAME: ${ZITI_ROUTER_NAME:-zrok2-router}
      ZITI_ENROLL_TOKEN: /ziti-router/${ZITI_ROUTER_NAME:-zrok2-router}.jwt
      PFXLOG_NO_JSON: "true"
    depends_on:
      ziti-router-init:
        condition: service_completed_successfully
    volumes:
      - ziti-router-data:/ziti-router
    ports:
      - "0.0.0.0:${ZITI_ROUTER_PORT:-3022}:${ZITI_ROUTER_PORT:-3022}"
    networks:
      zrok2:
        aliases:
          - router.${ZROK2_DNS_ZONE}
    healthcheck:
      test: ["CMD", "ziti", "agent", "stats"]
      interval: 5s
      timeout: 5s
      retries: 12
      start_period: 30s
    restart: unless-stopped

  # ── Database ──────────────────────────────────────────────────────────────

  postgresql:
    image: postgres:16-alpine
    environment:
      POSTGRES_USER: zrok2
      POSTGRES_PASSWORD: ${ZROK2_DB_PASSWORD:-zrok2defaultpw}
      POSTGRES_DB: zrok2
    volumes:
      - pg-data:/var/lib/postgresql/data
    networks:
      - zrok2
    healthcheck:
      test: ["CMD-SHELL", "pg_isready -U zrok2"]
      interval: 5s
      timeout: 3s
      retries: 10
    restart: unless-stopped

  # ── zrok2 Bootstrap (one-shot) ────────────────────────────────────────────
  #
  # Sources the zrok2-bootstrap library shipped in the image at
  # /usr/local/bin/zrok2-bootstrap (the same library used for Linux
  # self-hosting) and calls its functions to generate configs, run
  # "zrok2 admin bootstrap", and create the default public frontend +
  # namespace.  All post-bootstrap admin commands run against a temporary
  # controller process inside this container, so no separate post-init
  # service is needed.  Idempotent — safe to re-run.

  zrok2-init:
    <<: *zrok2-image
    user: "0:0"
    entrypoint: ["/bin/bash", "/bootstrap/entrypoint-init.bash"]
    environment:
      ZROK2_DNS_ZONE: ${ZROK2_DNS_ZONE:?err}
      ZROK2_ADMIN_TOKEN: ${ZROK2_ADMIN_TOKEN:?err}
      ZITI_PWD: ${ZITI_PWD:?err}
      ZITI_USER: ${ZITI_USER:-admin}
      ZITI_CTRL_PORT: ${ZITI_CTRL_PORT:-1280}
      ZROK2_CTRL_PORT: ${ZROK2_CTRL_PORT:-18080}
      ZROK2_FRONTEND_PORT: ${ZROK2_FRONTEND_PORT:-8080}
      ZROK2_STORE_TYPE: ${ZROK2_STORE_TYPE:-postgres}
      ZROK2_DB_PASSWORD: ${ZROK2_DB_PASSWORD:-zrok2defaultpw}
      ZROK2_METRICS_ENABLED: ${ZROK2_METRICS_ENABLED:-false}
      ZROK2_INFLUX_TOKEN: ${ZROK2_INFLUX_TOKEN:-}
      HOME: /var/lib/zrok2
    depends_on:
      ziti-controller:
        condition: service_healthy
      postgresql:
        condition: service_healthy
      rabbitmq:
        condition: service_healthy
    volumes:
      - zrok2-config:/var/lib/zrok2
      - ./entrypoint-init.bash:/bootstrap/entrypoint-init.bash:ro
    networks:
      - zrok2

  # ── zrok2 Controller ──────────────────────────────────────────────────────

  zrok2-controller:
    <<: *zrok2-image
    command: ["controller", "/var/lib/zrok2/config/ctrl.yaml"]
    environment:
      ZROK2_ADMIN_TOKEN: ${ZROK2_ADMIN_TOKEN:?err}
      ZROK2_API_ENDPOINT: http://127.0.0.1:${ZROK2_CTRL_PORT:-18080}
      HOME: /var/lib/zrok2
    depends_on:
      zrok2-init:
        condition: service_completed_successfully
    volumes:
      - zrok2-config:/var/lib/zrok2
    ports:
      - "${ZROK2_INSECURE_INTERFACE:-127.0.0.1}:${ZROK2_CTRL_PORT:-18080}:${ZROK2_CTRL_PORT:-18080}"
    networks:
      zrok2:
        aliases:
          - zrok2.${ZROK2_DNS_ZONE}
    healthcheck:
      test: ["CMD", "curl", "-sf", "http://127.0.0.1:${ZROK2_CTRL_PORT:-18080}/api/v1/version"]
      interval: 5s
      timeout: 3s
      retries: 12
      start_period: 15s
    restart: unless-stopped

  # ── zrok2 Frontend ────────────────────────────────────────────────────────

  zrok2-frontend:
    <<: *zrok2-image
    command: ["access", "dynamicProxy", "/var/lib/zrok2/config/frontend.yaml"]
    environment:
      ZROK2_API_ENDPOINT: http://zrok2-controller:${ZROK2_CTRL_PORT:-18080}
      HOME: /var/lib/zrok2
    depends_on:
      zrok2-controller:
        condition: service_healthy
    volumes:
      - zrok2-config:/var/lib/zrok2:ro
    ports:
      - "${ZROK2_INSECURE_INTERFACE:-127.0.0.1}:${ZROK2_FRONTEND_PORT:-8080}:${ZROK2_FRONTEND_PORT:-8080}"
    networks:
      - zrok2
    restart: unless-stopped

  # ── Metrics Pipeline (optional) ──────────────────────────────────────────
  # To enable: set ZROK2_METRICS_ENABLED=true in .env and run with
  #   docker compose --profile metrics up -d

  # Metrics bridge: reads fabric-usage.json from the Ziti controller data
  # volume and publishes events to RabbitMQ for the zrok2 controller to
  # consume and write to InfluxDB.
  zrok2-metrics-bridge:
    <<: *zrok2-image
    command: ["controller", "metrics", "bridge", "/var/lib/zrok2/config/ctrl.yaml"]
    profiles: ["metrics"]
    environment:
      HOME: /var/lib/zrok2
    depends_on:
      zrok2-controller:
        condition: service_healthy
      rabbitmq:
        condition: service_healthy
    volumes:
      - zrok2-config:/var/lib/zrok2:ro
      - ziti-ctrl-data:/ziti-data
    networks:
      - zrok2
    restart: unless-stopped

  # RabbitMQ is required by the dynamic frontend for real-time mapping updates
  # (AMQP-backed share name resolution).  It is NOT optional.
  rabbitmq:
    image: rabbitmq:3-management-alpine
    volumes:
      - rabbitmq-data:/var/lib/rabbitmq
    networks:
      - zrok2
    healthcheck:
      test: ["CMD", "rabbitmq-diagnostics", "-q", "ping"]
      interval: 10s
      timeout: 5s
      retries: 10
    restart: unless-stopped

  influxdb:
    image: ${INFLUXDB_IMAGE:-influxdb:2.8-alpine}
    profiles: ["metrics"]
    environment:
      DOCKER_INFLUXDB_INIT_MODE: setup
      DOCKER_INFLUXDB_INIT_USERNAME: zrok2
      DOCKER_INFLUXDB_INIT_PASSWORD: ${ZROK2_INFLUX_PASSWORD:-zrok2defaultpw}
      DOCKER_INFLUXDB_INIT_ORG: zrok2
      DOCKER_INFLUXDB_INIT_BUCKET: zrok2
      DOCKER_INFLUXDB_INIT_ADMIN_TOKEN: ${ZROK2_INFLUX_TOKEN:-zrok2defaulttoken}
    volumes:
      - influx-data:/var/lib/influxdb2
    networks:
      - zrok2
    healthcheck:
      test: ["CMD", "influx", "ping"]
      interval: 10s
      timeout: 5s
      retries: 10
    restart: unless-stopped

networks:
  zrok2:
    driver: bridge

volumes:
  ziti-ctrl-data:
  ziti-router-data:
  zrok2-config:
  pg-data:
  rabbitmq-data:
  influx-data:

Technical Documentation: openziti/zrok

ℹ️ Provenance: Multi-Tier Ingestion · CodeWiki Reference

Overview (`README.md`)

zrok - Secure internet sharing made simple

Share anything, anywhere, instantly. Enterprise reliability. No firewall changes. No port forwarding. No hassle.

zrok lets you securely share web services, files, and network resources with anyone—whether they're across the internet or your private network. Built on zero-trust networking, it works through firewalls and NAT without requiring any network configuration changes.

Quick start

Get sharing in under 2 minutes:

  1. Install zrok for your platform
  2. Get an account: zrok invite (use the free zrok.io service)
  3. Enable sharing: zrok enable

That's it! Now you can share anything:

bash
# Share a web service publicly
$ zrok share public localhost:8080

# Share files as a network drive  
$ zrok share public --backend-mode drive ~/Documents

# Share privately with other zrok users
$ zrok share private localhost:3000

What you can share

Web services

Instantly make local web apps accessible over the internet:

bash
zrok share public localhost:8080

Files & directories

Turn any folder into a shareable network drive:

bash
zrok share public --backend-mode drive ~/Repos/zrok

Private resources

Share TCP/UDP services securely with other zrok users—no public internet exposure.

Key features

  • Zero Configuration: Works through firewalls, NAT, and corporate networks
  • Secure by Default: End-to-end encryption with zero-trust architecture
  • Public & Private Sharing: Share with anyone or just specific users
  • Multiple Protocols: HTTP/HTTPS, TCP, UDP, and file sharing
  • Cross-Platform: Windows, macOS, Linux, and Raspberry Pi
  • Self-Hostable: Run your own zrok service instance

How it works

zrok is built on OpenZiti, a programmable zero-trust network overlay. This means:

  • No inbound connectivity required: Works from behind firewalls and NAT
  • End-to-end encryption: All traffic is encrypted, even from zrok servers
  • Peer-to-peer connections: Direct connections between users when possible
  • Identity-based access: Share with specific users, not IP addresses

Developer SDK

Embed zrok sharing into your applications with our Go SDK:

go
// Create a share
shr, err := sdk.CreateShare(root, &sdk.ShareRequest{
    BackendMode: sdk.TcpTunnelBackendMode,
    ShareMode:   sdk.PrivateShareMode,
})

// Accept connections
listener, err := sdk.NewListener(shr.Token, root)

Read the SDK guide for complete examples.

Self-hosting

Run your own zrok service—from Raspberry Pi to enterprise scale:

  • Single binary contains everything you need
  • Scales from small personal instances to large public services
  • Built on the same codebase as the public zrok.io service

Self-Hosting Guide

Resources


Ready to start sharing? Get started with zrok →


Overview (`nfpm/README.md`)

nfpm supporting files

These files are sourced by nfpm when invoked by goreleaser to build Linux packages, and by BuildKit when building the Docker images.


Overview (`ui/README.md`)

React + TypeScript + Vite

This template provides a minimal setup to get React working in Vite with HMR and some ESLint rules.

Currently, two official plugins are available:

Expanding the ESLint configuration

If you are developing a production application, we recommend updating the configuration to enable type aware lint rules:

  • Configure the top-level parserOptions property like this:
js
export default tseslint.config({
  languageOptions: {
    // other options...
    parserOptions: {
      project: ['./tsconfig.node.json', './tsconfig.app.json'],
      tsconfigRootDir: import.meta.dirname,
    },
  },
})
  • Replace tseslint.configs.recommended to tseslint.configs.recommendedTypeChecked or tseslint.configs.strictTypeChecked
  • Optionally add ...tseslint.configs.stylisticTypeChecked
  • Install eslint-plugin-react and update the config:
js
// eslint.config.js
import react from 'eslint-plugin-react'

export default tseslint.config({
  // Set the react version
  settings: { react: { version: '18.3' } },
  plugins: {
    // Add the react plugin
    react,
  },
  rules: {
    // other rules...
    // Enable its recommended rules
    ...react.configs.recommended.rules,
    ...react.configs['jsx-runtime'].rules,
  },
})

Overview (`website/README.md`)

Website

This website is built using Docusaurus, a modern static website generator.

Installation

text
$ yarn

Local Development

text
$ yarn start

This command starts a local development server and opens up a browser window. Most changes are reflected live without having to restart the server.

Build

text
$ yarn build

This command generates static content into the build directory and can be served using any static contents hosting service.

Cutting a new doc version

New doc releases should only be cut when major revisions are coming and the current version is ready to be frozen.
Cutting a new version will snapshot the current ./docs directory and copy it all into the ./website/versioned_docs directory based on the version that is tagged.

text
$ yarn docusaurus docs:version 1.1`

The default doc version that is displayed is managed in the docusaurus.config.js file.
By default the last version that was cut will be displayed, but this can be overridden be updating the config to render
the "current" doc version.

text
presets: [
    [
        docs: {
          // These lines to show the current docs by default and assign them a label
          lastVersion: 'current',
          versions: {
             current: {
               label: '1.0',
             },
          },

        },

Deployment

Using SSH:

text
$ USE_SSH=true yarn deploy

Not using SSH:

text
$ GIT_USER=<Your GitHub username> yarn deploy

If you are using GitHub pages for hosting, this command is a convenient way to build the website and push to the gh-pages branch.


Overview (`agent/agentUi/README.md`)

React + TypeScript + Vite

This template provides a minimal setup to get React working in Vite with HMR and some ESLint rules.

Currently, two official plugins are available:

Expanding the ESLint configuration

If you are developing a production application, we recommend updating the configuration to enable type aware lint rules:

  • Configure the top-level parserOptions property like this:
js
export default tseslint.config({
  languageOptions: {
    // other options...
    parserOptions: {
      project: ['./tsconfig.node.json', './tsconfig.app.json'],
      tsconfigRootDir: import.meta.dirname,
    },
  },
})
  • Replace tseslint.configs.recommended to tseslint.configs.recommendedTypeChecked or tseslint.configs.strictTypeChecked
  • Optionally add ...tseslint.configs.stylisticTypeChecked
  • Install eslint-plugin-react and update the config:
js
// eslint.config.js
import react from 'eslint-plugin-react'

export default tseslint.config({
  // Set the react version
  settings: { react: { version: '18.3' } },
  plugins: {
    // Add the react plugin
    react,
  },
  rules: {
    // other rules...
    // Enable its recommended rules
    ...react.configs.recommended.rules,
    ...react.configs['jsx-runtime'].rules,
  },
})

Overview (`etc/caddy/README.md`)

Caddyfile Samples

The Caddyfile samples in this directory are for use with --backend-mode caddy ./my.Caddyfile which runs an embedded
Caddy server.

The Caddyfile must have this structure because it is rendered as a Go template by zrok to bind the HTTP listener.

console
http:// {
    bind {{ .ZrokBindAddress }}
    # customize reverse_proxy, file_server, etc.
}

Notes

multiple_upstream.Caddyfile is bundled in the zrok2-agent package for Linux as an example Caddyfile.


Overview (`sdk/nodejs/README.md`)

zrok2 Node.js SDK

The Node.js SDK for zrok -- zero-trust peer-to-peer application sharing built on OpenZiti.

Installation

bash
npm install @openziti/zrok2

Prerequisites

You need a zrok2 environment enabled before using the SDK:

bash
zrok2 enable <your-account-token>

This creates ~/.zrok2/ with your environment configuration and identity files.

Quick Start

Share a service

typescript
import {
    loadRoot,
    createShare,
    deleteShare,
    ShareRequest,
    PUBLIC_SHARE_MODE,
    PROXY_BACKEND_MODE,
} from "@openziti/zrok2";

const root = loadRoot();
const request = new ShareRequest(PUBLIC_SHARE_MODE, PROXY_BACKEND_MODE, "http://localhost:3000");
const share = await createShare(root, request);

console.log("shared at:", share.frontendEndpoints);

// clean up when done
await deleteShare(root, share);

Auto-cleanup with wrappers

typescript
import { loadRoot, withShare, ShareRequest, PUBLIC_SHARE_MODE, PROXY_BACKEND_MODE } from "@openziti/zrok2";

const root = loadRoot();
const request = new ShareRequest(PUBLIC_SHARE_MODE, PROXY_BACKEND_MODE, "http://localhost:3000");

// share is automatically deleted when the callback completes (or throws)
await withShare(root, request, async (share) => {
    console.log("shared at:", share.frontendEndpoints);
    // ... do work ...
});

Check environment status

typescript
import { loadRoot, status } from "@openziti/zrok2";

const root = loadRoot();
const s = status(root);
console.log("enabled:", s.enabled);
console.log("api endpoint:", s.apiEndpoint);
console.log("token:", s.token);

API Reference

Environment

Function Description
loadRoot() Load the zrok2 environment from ~/.zrok2/. Returns a Root.
defaultRoot() Create a default (disabled) Root without reading from disk.
rootExists() Check if ~/.zrok2/metadata.json exists.
assertRoot() Check if the root exists and has a compatible environment version.
status(root) Return a Status with the current environment state. No API call.

Enable / Disable

Function Description
enable(root, token, description?, host?) Enable an environment from an account token. Idempotent.
disable(root) Disable the current environment. No-op if not enabled.

Shares

Function Description
createShare(root, request) Create a share. Returns a Share with shareToken and frontendEndpoints.
deleteShare(root, share) Delete a share.
releaseReservedShare(root, share) Release a reserved share. Calls the same API as deleteShare.
modifyShare(root, shareToken, addAccessGrants?, removeAccessGrants?) Update access grants on a share.
getShareDetail(root, shareToken) Get detailed metadata for a share. Returns a ShareDetail.
listShares(root, filters?) List shares with optional filters. Returns ShareDetail[].

Access

Function Description
createAccess(root, request) Create access to a share. Returns an Access with frontendToken.
deleteAccess(root, access) Delete an access.
listAccesses(root, filters?) List accesses with optional filters. Returns AccessDetail[].

Names and Namespaces

Function Description
createName(root, name, namespaceToken?) Create a name in a namespace.
deleteName(root, name, namespaceToken?) Delete a name.
listNames(root, namespaceToken?) List names, optionally filtered by namespace.
listNamespaces(root) List all available namespaces.

Overview

Function Description
getOverview(root) Get the full account overview (environments, shares, namespaces).

Convenience Wrappers

Function Description
withShare(root, request, fn) Create a share, call fn(share), delete on completion. Skips delete if request.reserved is true.
withAccess(root, request, fn) Create access, call fn(access), delete on completion.
ProxyShare.create(root, target, options?) Create a managed proxy share with optional uniqueName, frontends, shareMode, and verifySsl.

OpenZiti Data Plane

These functions use the native @openziti/ziti-sdk-nodejs module to send traffic over the OpenZiti overlay network directly from Node.js:

Function Description
init(root) Initialize the Ziti SDK with the environment identity.
setLogLevel(level) Set the Ziti SDK log level.
listener(share, onConnect, onData?, onListen?, onClient?) Listen for connections on a share.
dialer(access, onConnect, onData) Dial a share to send/receive data.
write(conn, buf, callback?) Write data to a Ziti connection.
express(share) Create an Express app bound to a share's Ziti service.

Share Modes

Constant Value Description
PUBLIC_SHARE_MODE "public" Publicly accessible via frontend endpoints
PRIVATE_SHARE_MODE "private" Accessible only via createAccess

Backend Modes

Constant Value
PROXY_BACKEND_MODE "proxy"
WEB_BACKEND_MODE "web"
TCP_TUNNEL_BACKEND_MODE "tcpTunnel"
UDP_TUNNEL_BACKEND_MODE "udpTunnel"
CADDY_BACKEND_MODE "caddy"
DRIVE_BACKEND_MODE "drive"
SOCKS_BACKEND_MODE "socks"

Permission Modes

Constant Value
OPEN_PERMISSION_MODE "open"
CLOSED_PERMISSION_MODE "closed"

Examples

Two working examples are in examples/.

Prerequisites

bash
# build the SDK first
cd sdk && npm install && npm run build && cd ..

Node.js 20 or 22 is required for the native OpenZiti module.

http-server

A public HTTP server shared via zrok2:

bash
cd examples/http-server
npm install
npm run build
node dist/index.js http-server

This creates a public proxy share, starts an Express server on the Ziti overlay, and prints the frontend endpoint. Visit http://<endpoint>:/ to see "hello, world!".

pastebin

A private peer-to-peer text transfer over a TCP tunnel:

bash
cd examples/pastebin
npm install
npm run build

# terminal 1: serve text
node dist/index.js copyto
# enter text when prompted, then note the share token

# terminal 2: receive text
node dist/index.js pastefrom <shareToken>

Development

Build

bash
cd sdk
npm install
npm run build

Test

bash
# unit tests (no network required)
npm test

# watch mode
npm run test:watch

Integration Tests

Integration tests require a live zrok2 environment:

bash
ZROK2_API_ENDPOINT=http://localhost:18080 \
ZROK2_ADMIN_TOKEN=<admin-secret> \
npm test -- test/integration/

Overview (`sdk/python/README.md`)

zrok Python SDK

The zrok Python SDK (zrok2 on PyPI) provides a high-level interface for the zrok API and a lower-level
auto-generated REST client.

Package structure

  • src/zrok/ — hand-written SDK modules: share, access, name, listing, status, environment, etc.
  • src/zrok_api/ — auto-generated OpenAPI client (do not edit by hand; regenerate with bin/generate_rest.sh from repo root)
  • tests/ — unit tests (mocked, no live services required)
  • tests/integration/ — integration tests (requires a running zrok2 instance)
  • examples/ — runnable examples (http-server, pastebin, notebook proxy)

Requirements

  • Python >3.10 (3.12+ recommended for faster installs and broader wheel availability)
  • Runtime dependencies are declared in src/requirements.txt
  • Test dependencies are declared in src/test-requirements.txt

Development setup

Create a virtual environment and install the SDK in editable mode with test extras:

bash
python3 -m venv .venv
source .venv/bin/activate
pip install -e src/[test]

This installs the SDK, its runtime dependencies, pytest, and pytest-cov.

For the full test-requirements (includes flake8, mypy, tox):

bash
pip install -r src/test-requirements.txt

Regenerating the API client

src/zrok_api/ is generated by the repo's REST generation script. Run this from the zrok repository root:

bash
./bin/generate_rest.sh

This regenerates all REST clients/servers (including the Python client) from the modular OpenAPI sources.

Running tests

Unit tests

Unit tests mock the API and need no live infrastructure:

bash
pytest src/ -v

Lint with flake8 (uses the .flake8 config in this directory):

bash
flake8 .

Integration tests

Integration tests run against a live zrok2 instance. They require two environment variables:

Variable Description
ZROK2_API_ENDPOINT Controller URL, e.g. http://zrok.example.com:18080
ZROK2_ADMIN_TOKEN Admin secret from the controller config

The instance must have been bootstrapped with zrok2-bootstrap.bash (which creates the required
public namespace with --open).

bash
ZROK2_API_ENDPOINT='http://localhost:18080' \
ZROK2_ADMIN_TOKEN='<token>' \
pytest tests/integration/ -v --tb=short

The easiest way to get a local instance is the
Docker self-hosting guide.
To build from your local source instead of pulling release images, use the build overlay:

bash
cd docker/compose/zrok2-instance
cp .env.example .env
# edit .env to set secrets (see the self-hosting guide for details)
COMPOSE_FILE=compose.yml:compose.build.yml \
  docker compose up -d --build --wait

# To tear down and remove all state (required before re-creating):
COMPOSE_FILE=compose.yml:compose.build.yml docker compose down -v

Or use the Linux package test harness (builds and installs packages, bootstraps all services):

bash
bash nfpm/dangerous.linux.test.bash --keep

CI

  • ci-build.yml — runs unit tests and flake8 across Python 3.10–3.13
  • integration-tests.yml — builds from source with Docker Compose, runs integration tests
  • build-wheels.yml — builds and publishes to PyPI on release tags

Overview (`docker/compose/zrok2-instance/README.md`)

zrok2 Docker Compose Self-Hosting

This directory contains the Docker Compose project for self-hosting a
complete zrok2 instance with a Ziti overlay network.

For the full self-hosting guide, see deployments:
https://netfoundry.io/docs/zrok/category/deployment

Quick start

bash
cp .env.example .env
# Edit .env — set ZROK2_DNS_ZONE, ZROK2_ADMIN_TOKEN, and ZITI_PWD
docker compose up -d

Or download the essential Docker Compose files without cloning the repository:

bash
curl -sSfL https://get.openziti.io/zrok2-instance/fetch.bash | bash
cd zrok2-instance

Essential files

File Purpose
compose.yml Core services: Ziti overlay, zrok2, PostgreSQL, RabbitMQ
compose.caddy.yml Optional TLS overlay with Caddy
.env.example Documented environment variable template
entrypoint-init.bash Bootstrap script for the zrok2-init one-shot container
fetch.bash Download script — fetches these files into a zrok2-instance/ directory

Services

The stack deploys these services:

  • ziti-controller — Ziti control plane (PKI, identities, policies)
  • ziti-router — Ziti data plane (SDK traffic)
  • postgresql — zrok2 database (default; SQLite3 available)
  • rabbitmq — AMQP message bus for the dynamic frontend's real-time
    share mapping updates (required for named public shares via
    zrok2 share public --name-selection)
  • zrok2-init — one-shot bootstrap (generates config, creates
    identities, sets up the dynamicProxyController gRPC service)
  • zrok2-controller — zrok2 API and admin
  • zrok2-frontend — AMQP-backed dynamic public share frontend

Optional metrics pipeline (enable with --profile metrics):

  • influxdb — metrics time-series storage
  • zrok2-metrics-bridge — reads Ziti usage events and publishes to
    RabbitMQ for the zrok2 controller to write to InfluxDB

Overview (`docker/images/cross-build/README.md`)

Building zrok2 with Docker

This directory covers all Docker-based approaches to building zrok2. For
builds without Docker, see BUILD.md.

Quick start: `bin/build.bash`

bin/build.bash wraps the zrok-builder container. It auto-detects your host
architecture, builds the container image on first run, and requires only Docker:

bash
bin/build.bash            # quiet mode
bin/build.bash --verbose  # show full build output

Requirements: Docker installed and running. No Go, Node.js, or other
toolchain needed on the host.

Output: dist/zrok2_linux_<arch>_<variant>/zrok2

Build the `openziti/zrok2` container image

The multi-stage Dockerfile.build compiles the UI assets (Vite) and Go binary
(with CGO for SQLite3) and packages the result into the same
openziti/ziti-cli base image used by published releases.

bash
# From the project root
docker build -f docker/compose/zrok2-instance/Dockerfile.build \
  -t openziti/zrok2:local .

The resulting image contains:

  • /usr/local/bin/zrok2 — binary with embedded UIs
  • /usr/local/bin/zrok2-enable — enable helper script
  • /usr/local/bin/zrok2-bootstrap — bootstrap script

Use the image with Docker Compose via the build overlay:

bash
cd docker/compose/zrok2-instance
cp .env.example .env
# edit .env with required values
COMPOSE_FILE=compose.yml:compose.build.yml docker compose up -d --build --wait

Advanced: `zrok-builder` container directly

The zrok-builder image supports cross-compilation for multiple architectures.

Build the container image

bin/build.bash handles this automatically, but you can build manually:

bash
# From the project root
docker buildx build -t zrok-builder ./docker/images/cross-build --load

The image is automatically rebuilt when Dockerfile or linux-build.sh changes.

Supported architectures: amd64, arm64, armhf (arm/v7 hard-float), armel (arm/v7 soft-float)

Build for a specific architecture

bash
docker run --user "$(id -u):$(id -g)" --rm \
  --volume="${GOCACHE:-${HOME}/.cache/go-build}:/usr/share/go_cache" \
  --volume="${GOMODCACHE:-${HOME}/.cache/go-mod}:/usr/share/go/pkg/mod" \
  --volume="${PWD}:/mnt" \
  zrok-builder arm64

Each architecture must be built in a separate docker run — goreleaser cleans
./dist/ at the start of each build.

Verbose output

bash
docker run --user "$(id -u):$(id -g)" --rm \
  --volume="${GOCACHE:-${HOME}/.cache/go-build}:/usr/share/go_cache" \
  --volume="${GOMODCACHE:-${HOME}/.cache/go-mod}:/usr/share/go/pkg/mod" \
  --volume="${PWD}:/mnt" \
  zrok-builder --verbose arm64

Or set VERBOSE=1 in the environment.

Debug mode

Maximum verbosity with bash xtrace (implies --verbose):

bash
docker run --user "$(id -u):$(id -g)" --rm \
  --volume="${GOCACHE:-${HOME}/.cache/go-build}:/usr/share/go_cache" \
  --volume="${GOMODCACHE:-${HOME}/.cache/go-mod}:/usr/share/go/pkg/mod" \
  --volume="${PWD}:/mnt" \
  zrok-builder --debug arm64

Or set DEBUG=1 in the environment.

Build output

text
dist/
├── artifacts.json
├── config.yaml
├── metadata.json
└── zrok2_linux_<arch>_<variant>/
    └── zrok2

Notes

  • Go caches: Mount GOCACHE and GOMODCACHE to avoid re-downloading
    modules and recompiling unchanged packages across builds.
  • Dirty builds: Snapshot builds work with uncommitted changes.
  • User permissions: --user "$(id -u):$(id -g)" ensures output files
    have correct ownership.

Overview (`sdk/golang/pubsub/README.md`)

OpenZiti Pub/Sub Package

A simple, reliable pub/sub implementation built on OpenZiti with mesh networking support.

Features

  • OpenZiti Native: Uses OpenZiti services for secure, overlay network communication
  • Mesh Architecture: Multiple publishers form a self-organizing mesh for fault tolerance
  • Addressable Terminators: Uses OpenZiti addressable terminators for peer discovery
  • Auto-Reconnect: Automatic reconnection with configurable delays and retry limits
  • Topic Filtering: Subscribe to specific topics or all messages
  • Message Deduplication: Prevents message loops in mesh networks
  • Simple API: Clean interfaces for both publishers and subscribers
  • Reliability: Built-in error handling, connection monitoring, and graceful degradation

Quick Start

Publisher

go
package main

import (
    "context"
    "fmt"
    "github.com/openziti/zrok/v2/sdk/golang/pubsub"
    "github.com/sirupsen/logrus"
)

func main() {
    // configure the publisher
    cfg := &pubsub.PublisherConfig{
        ServiceName:  "zrok-pubsub-service",
        IdentityPath: "/path/to/publisher.json",
    }

    // create publisher
    pub, err := pubsub.NewPublisher(cfg)
    if err != nil {
        dl.Fatalf("failed to create publisher: %v", err)
    }
    defer pub.Close()

    // publish dynamic hostname mapping
    msg := pubsub.NewMessage("hostname_update", "frontend", map[string]any{
        "operation": "ADD",
        "hostname":  "api.example.com",
        "service":   "zrok-service-abc123",
        "ttl":       3600,
    })

    ctx := context.Background()
    if err := pub.Publish(ctx, msg); err != nil {
        dl.Errorf("failed to publish: %v", err)
    }

    fmt.Println("message published successfully")
}

Subscriber (Frontend Side)

text
/* Detailed source-code truncated for AI context efficiency. */

Message Format

json
{
    "id": "abc123def456",
    "type": "hostname_update", 
    "topic": "frontend",
    "data": {
        "operation": "ADD",
        "hostname": "api.example.com",
        "service": "zrok-service-123",
        "ttl": 3600
    },
    "timestamp": "2025-08-13T10:30:00Z"
}

Configuration

SubscriberConfig Options

  • ReconnectDelay: Time to wait between reconnection attempts
  • MaxReconnects: Maximum reconnection attempts (-1 = infinite)
  • MessageTimeout: Timeout for message processing

Mesh Publisher

go
package main

import (
    "context"
    "time"
    "github.com/openziti/zrok/v2/sdk/golang/pubsub"
    "github.com/sirupsen/logrus"
)

func main() {
    // configure mesh publisher
    cfg := &pubsub.MeshConfig{
        ServiceName:       "zrok-pubsub-mesh",
        IdentityPath:      "/path/to/identity.json",
        NodeID:           "controller-1",
        PeerRefreshDelay: 30 * time.Second,
        MaxHops:          3,
        MessageCacheSize: 1000,
        MessageCacheTTL:  5 * time.Minute,
    }

    // create mesh publisher
    pub, err := pubsub.NewMeshPublisher(cfg)
    if err != nil {
        dl.Fatalf("failed to create mesh publisher: %v", err)
    }
    defer pub.Close()

    // join mesh network
    ctx := context.Background()
    if err := pub.JoinMesh(ctx); err != nil {
        dl.Fatalf("failed to join mesh: %v", err)
    }

    // announce available topics
    pub.AnnounceTopics([]string{"frontend", "metrics", "events"})

    // publish messages (will reach both local subscribers and mesh peers)
    msg := pubsub.NewMessage("hostname_update", "frontend", map[string]any{
        "operation": "ADD",
        "hostname":  "api.example.com",
        "service":   "zrok-service-abc123",
    })

    if err := pub.Publish(ctx, msg); err != nil {
        dl.Errorf("failed to publish: %v", err)
    }

    dl.Infof("connected to %d mesh peers", len(pub.GetConnectedPeers()))
}

Mesh Subscriber

go
package main

import (
    "context"
    "time"
    "github.com/openziti/zrok/v2/sdk/golang/pubsub"
    "github.com/sirupsen/logrus"
)

func main() {
    // configure subscriber (automatically connects to any mesh publisher)
    cfg := &pubsub.SubscriberConfig{
        ServiceName:    "zrok-pubsub-mesh",
        IdentityPath:   "/path/to/subscriber.json",
        ReconnectDelay: 5 * time.Second,
        MaxReconnects:  -1,
    }

    // create mesh-aware subscriber
    sub, err := pubsub.NewMeshSubscriber(cfg, "frontend-1")
    if err != nil {
        dl.Fatalf("failed to create subscriber: %v", err)
    }
    defer sub.Close()

    // handler automatically deduplicates mesh messages
    handler := func(msg *pubsub.Message) error {
        dl.Infof("received %s from %s (hops: %d)", 
            msg.Type, msg.OriginNode, msg.HopCount)
        return nil
    }

    ctx := context.Background()
    if err := sub.Subscribe(ctx, []string{"frontend"}, handler); err != nil {
        dl.Errorf("subscription failed: %v", err)
    }
}

Discovery Mechanism

Peers discover each other through:

  1. Ziti Terminator Query: Direct query to ziti controller for service terminators
  2. Connection-based Discovery: Fallback discovery protocol through service connections
  3. Periodic Refresh: Automatic discovery of new peers every 30 seconds (configurable)

When a new publisher joins:

  • It binds the service with its unique node ID as addressable terminator
  • Existing peers discover it during their next periodic refresh (≤30s)
  • New connections are established automatically
  • Mesh forms organically without configuration

Use Cases

Perfect for distributed systems where:

  • Multiple controllers need to coordinate without single points of failure
  • Frontend instances need real-time updates from any available controller
  • System should gracefully handle controller failures
  • Messages need to reach all nodes regardless of which controller publishes

Overview (`sdk/python/src/README.md`)

zrok

zrok client access

This Python package is automatically generated by the OpenAPI Generator project:

  • API version: 2.0.0
  • Package version: 1.0.0
  • Generator version: 7.14.0
  • Build package: org.openapitools.codegen.languages.PythonClientCodegen

Requirements.

Python 3.9+

Installation & Usage

pip install

If the python package is hosted on a repository, you can install directly using:

sh
pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git

(you may need to run pip with root permission: sudo pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git)

Then import the package:

python
import zrok_api

Setuptools

Install via Setuptools.

sh
python setup.py install --user

(or sudo python setup.py install to install the package for all users)

Then import the package:

python
import zrok_api

Tests

Execute pytest to run the tests.

Getting Started

Please follow the installation procedure and then run the following:

python
import zrok_api
from zrok_api.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to /api/v2
# See configuration.py for a list of all supported configuration parameters.
configuration = zrok_api.Configuration(
    host = "/api/v2"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure API key authorization: key
configuration.api_key['key'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['key'] = 'Bearer'


# Enter a context with an instance of the API client
with zrok_api.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = zrok_api.AccountApi(api_client)
    body = zrok_api.ChangePasswordRequest() # ChangePasswordRequest |  (optional)

    try:
        api_instance.change_password(body=body)
    except ApiException as e:
        print("Exception when calling AccountApi->change_password: %s\n" % e)

Documentation for API Endpoints

All URIs are relative to /api/v2

Class Method HTTP request Description
AccountApi change_password POST /changePassword
AccountApi invite POST /invite
AccountApi login POST /login
AccountApi regenerate_account_token POST /regenerateAccountToken
AccountApi register POST /register
AccountApi reset_password POST /resetPassword
AccountApi reset_password_request POST /resetPasswordRequest
AccountApi verify POST /verify
AdminApi add_frontend_grant POST /frontend/grant
AdminApi add_namespace_frontend_mapping POST /namespace/frontend/mapping
AdminApi add_namespace_grant POST /namespace/grant
AdminApi add_organization_member POST /organization/add
AdminApi apply_limit_classes POST /applied-limit-class
AdminApi create_account POST /account
AdminApi create_frontend POST /frontend
AdminApi create_identity POST /identity
AdminApi create_namespace POST /namespace
AdminApi create_organization POST /organization
AdminApi delete_account DELETE /account
AdminApi delete_frontend DELETE /frontend
AdminApi delete_frontend_grant DELETE /frontend/grant
AdminApi delete_identity DELETE /identity
AdminApi delete_namespace DELETE /namespace
AdminApi delete_organization DELETE /organization
AdminApi get_name GET /name/{namespaceToken}/{name}
AdminApi get_skip_interstitial_grant GET /skip-interstitial-grant
AdminApi grant_skip_interstitial POST /skip-interstitial-grant
AdminApi invite_token_generate POST /invite/token/generate
AdminApi list_applied_limit_classes POST /applied-limit-class/list
AdminApi list_frontend_namespace_mappings GET /frontend/namespace/mapping/{frontendToken}
AdminApi list_frontends GET /frontends
AdminApi list_limit_classes POST /limit-class/list
AdminApi list_namespace_frontend_mappings GET /namespace/frontend/mapping/{namespaceToken}
AdminApi list_namespaces GET /namespaces
AdminApi list_organization_members POST /organization/list
AdminApi list_organizations GET /organizations
AdminApi remove_applied_limit_classes DELETE /applied-limit-class
AdminApi remove_namespace_frontend_mapping DELETE /namespace/frontend/mapping
AdminApi remove_namespace_grant DELETE /namespace/grant
AdminApi remove_organization_member POST /organization/remove
AdminApi revoke_skip_interstitial DELETE /skip-interstitial-grant
AdminApi update_account_password PATCH /account
AdminApi update_frontend PATCH /frontend
AdminApi update_namespace PATCH /namespace
AgentApi enroll POST /agent/enroll
AgentApi ping POST /agent/ping
AgentApi remote_access POST /agent/access
AgentApi remote_share POST /agent/share
AgentApi remote_status POST /agent/status
AgentApi remote_unaccess POST /agent/unaccess
AgentApi remote_unshare POST /agent/unshare
AgentApi share_http_healthcheck POST /agent/share/http-healthcheck
AgentApi unenroll POST /agent/unenroll
EnvironmentApi disable POST /disable
EnvironmentApi enable POST /enable
MetadataApi client_version_check POST /clientVersionCheck
MetadataApi configuration GET /configuration
MetadataApi get_account_detail GET /detail/account
MetadataApi get_account_metrics GET /metrics/account
MetadataApi get_environment_detail GET /detail/environment/{envZId}
MetadataApi get_environment_metrics GET /metrics/environment/{envId}
MetadataApi get_frontend_detail GET /detail/frontend/{frontendId}
MetadataApi get_share_detail GET /detail/share/{shareToken}
MetadataApi get_share_metrics GET /metrics/share/{shareToken}
MetadataApi get_sparklines POST /sparklines
MetadataApi list_accesses GET /accesses
MetadataApi list_environments GET /environments
MetadataApi list_memberships GET /memberships
MetadataApi list_org_members GET /members/{organizationToken}
MetadataApi list_shares GET /shares
MetadataApi org_account_overview GET /overview/{organizationToken}/{accountEmail}
MetadataApi overview GET /overview
MetadataApi version GET /version
MetadataApi version_inventory GET /versions
ShareApi access POST /access
ShareApi create_share_name POST /share/name
ShareApi delete_share_name DELETE /share/name
ShareApi list_all_names GET /share/names
ShareApi list_names_for_namespace GET /share/names/{namespaceToken}
ShareApi list_share_namespaces GET /share/namespaces
ShareApi share POST /share
ShareApi unaccess DELETE /unaccess
ShareApi unshare DELETE /unshare
ShareApi update_access PATCH /access
ShareApi update_share PATCH /share
ShareApi update_share_name PATCH /share/name

Documentation For Models

Documentation For Authorization

Authentication schemes defined for the API:

key

  • Type: API key
  • API key parameter name: x-token
  • Location: HTTP header

Author


Overview (`sdk/golang/examples/http-server/README.md`)

"http-server" SDK Example

This http-server example is a minimal zrok application that surfaces a basic http server over a public zrok share.

Implementation

go
root, err := environment.LoadRoot()
	if err != nil {
		panic(err)
	}

The root is a structure that contains all of the user's environment detail and allows the SDK application to access the zrok service instance and the underlying OpenZiti network.

go
shr, err := sdk.CreateShare(root, &sdk.ShareRequest{
		BackendMode: sdk.TcpTunnelBackendMode,
		ShareMode:   sdk.PublicShareMode,
		Frontends:   []string{"public"},
		Target:      "http-server",
	})

	if err != nil {
		panic(err)
	}
	defer func() {
		if err := sdk.DeleteShare(root, shr); err != nil {
			panic(err)
		}
	}()
    ...
	fmt.Println("Access server at the following endpoints: ", strings.Join(shr.FrontendEndpoints, "\n"))

The sdk.CreateShare call uses the loaded environment root along with the details of the share request (sdk.ShareRequest) to create the share that will be used to access the http-server.

We are using the sdk.TcpTunnelBackendMode to handle tcp traffic. This time we are using sdk.PublicShareMode to take advantage of a public share that is running. With that we set which frontends to listen on, so we use whatever is configured, public here.

Further down we emit where to access the service.

Then we create a listener and use that to server our http server:

go
conn, err := sdk.NewListener(shr.Token, root)
	if err != nil {
		panic(err)
	}
	defer conn.Close()

    ...

	http.HandleFunc("/", helloZrok)

	if err := http.Serve(conn, nil); err != nil {
		panic(err)
	}

Overview (`sdk/golang/examples/pastebin/README.md`)

"pastebin" SDK Example

This pastebin example is a minimal zrok SDK application that implements a wormhole that makes redirecting file contents between multiple zrok environments very easy.

The pastebin example is split into two separate commands. The copyto command takes a copy buffer from standard input. You can use it like this:

text
$ echo "this is a pastebin test" | copyto
access your pastebin using 'pastefrom b46p9j82z81f'

And then using another terminal window, you can access your pastebin data like this:

text
$ pastefrom b46p9j82z81f
this is a pastebin test

The `copyto` Implementation

The copyto utility is an illustration of how to implement an application that creates a share and exposes it to the zrok network. Let's look at each section of the implementation:

go
data, err := loadData()
	if err != nil {
		panic(err)
	}

This first block of code is responsible for calling the loadData function, which loads the pastebin with data from os.Stdin.

All SDK applications need to load the user's "root" from the environment package, like this:

go
root, err := environment.LoadRoot()
	if err != nil {
		panic(err)
	}

The root is a structure that contains all of the user's environment detail and allows the SDK application to access the zrok service instance and the underlying OpenZiti network.

Next, copyto will create a zrok share:

go
shr, err := sdk.CreateShare(root, &sdk.ShareRequest{
		BackendMode: sdk.TcpTunnelBackendMode,
		ShareMode:   sdk.PrivateShareMode,
		Target:      "pastebin",
	})
	if err != nil {
		panic(err)
	}

	fmt.Printf("access your pastebin using 'pastefrom %v'\n", shr.Token)

The sdk.CreateShare call uses the loaded environment root along with the details of the share request (sdk.ShareRequest) to create the share that will be used to access the pastebin.

For the pastebin application, we're using a sdk.TcpTunnelBackendMode backend mode (we're just using a single network connection that implements a reliable byte stream, so TCP works great). Tunnel backends only work with private shares as of zrok v0.4, so we're using sdk.PrivateShareMode.

We'll set the Target to be pastebin, as that's just metadata describing the application.

Finally, we emit the share token so the user can access the pastebin using the pastefrom command.

Next, we'll use the SDK to create a listener for this share:

go
listener, err := sdk.NewListener(shr.Token, root)
	if err != nil {
		panic(err)
	}

The sdk.NewListener establishes a network listener for the newly created share. This listener works just like a net.Listener.

Next, we're going to add a shutdown hook so that copyto will delete the share when the application is terminated using ^C:

go
c := make(chan os.Signal)
	signal.Notify(c, os.Interrupt, syscall.SIGTERM)
	go func() {
		<-c
		if err := sdk.DeleteShare(root, shr); err != nil {
			panic(err)
		}
		_ = listener.Close()
		os.Exit(0)
	}()

This anonymous function runs waiting for a signal to exit. When that is received, it runs the sdk.DeleteShare function to remove the share that was created. This is how ephemeral shares work for the zrok share commands as well.

And finally, we run in an infinite loop waiting for requests for the pastebin data from the network:

go
for {
		if conn, err := listener.Accept(); err == nil {
			go handle(conn, data)
		} else {
			panic(err)
		}
	}

The "pastefrom" Implementation

The pastefrom application works very similarly to copyto. The primary difference is that it "dials" the share through the SDK using sdk.NewDialer, which returns a net.Conn:

go
conn, err := sdk.NewDialer(shrToken, root)
	if err != nil {
		panic(err)
	}

When this sdk.NewDialer function returns without an error, a bidirectional net.Conn has been established between the copyto "server" and the pastefrom "client". pastefrom then just reads the available data from the net.Conn and emits it to os.Stdout.


Overview (`sdk/python/examples/http-server/README.md`)

"http-server" SDK Example

This http-server example is a minimal zrok application that surfaces a basic HTTP server over a public share.

Implementation

python
root = zrok.environment.root.Load()

The root is a structure that contains all of the user's environment details and allows the SDK application to access the zrok service instance and the underlying OpenZiti network.

python
try:
    shr = zrok.share.CreateShare(root=root, request=ShareRequest(
        BackendMode=zrok.model.TCP_TUNNEL_BACKEND_MODE,
        ShareMode=zrok.model.PUBLIC_SHARE_MODE,
        Frontends=['public'],
        Target="http-server"
    ))
    shrToken = shr.Token
    print("Access server at the following endpoints: ", "\n".join(shr.FrontendEndpoints))

    def removeShare():
        zrok.share.DeleteShare(root=root, shr=shr)
        print("Deleted share")
    atexit.register(removeShare)
except Exception as e:
    print("unable to create share", e)
    sys.exit(1)

The sdk.CreateShare call uses the loaded environment root along with the details of the share request (sdk.ShareRequest) to create the share that will be used to access the http-server.

We are using the sdk.TcpTunnelBackendMode to handle tcp traffic. This time we are using sdk.PublicShareMode to take advantage of a public share that is running. With that we set which frontends to listen on, so we use whatever is configured, public here.

Next, we populate our cfg options for our decorator.

python
zrok_opts['cfg'] = zrok.decor.Opts(root=root, shrToken=shrToken, bindPort=bindPort)

Next, we run the server which ends up calling the following:

python
@zrok.decor.zrok(opts=zrok_opts)
def runApp():
    from waitress import serve
    # the port is only used to integrate zrok with frameworks that expect a "hostname:port" combo
    serve(app, port=bindPort)

Overview (`sdk/python/examples/pastebin/README.md`)

zrok Pastebin

This example shows the use of the zrok SDK spinning up a simple pastebin command.

Self-hosting Setup :wrench:

You don't need this section if you're using hosted zrok from NetFoundry (https://api-v2.zrok.io/).

Refer to the setup guide for details on setting up your zrok
environment if you're self-hosting zrok.

Install Python Requirements

The zrok SDK requires Python 3.10 or later.

If you haven't already installed them, you'll need the dependent libraries used in the examples.

bash
pip install -r ./sdk/python/examples/pastebin/requirements.txt

Running the Example :arrow_forward:

This example contains a copyto server portion and pastefrom client portion.

copyto

The server portion expects to get the data you want to send via stdin. It can be invoked by:

bash
echo "this is a cool test" | python pastebin.py copyto

You should see some helpful info printed out to your terminal:

bash
access your pastebin using 'pastebin.py pastefrom vp0xgmknvisu'

The last token in that line is your share token. We'll use that in the pastefrom command to access our data.

pastefrom

The pastefrom client expects the share token as an argument.
If we envoke it using the same token as above:

bash
python pastebin.py pastefrom vp0xgmknvisu

we see the data we had piped into the copyto server:

text
this is a cool test

Overview (`sdk/python/examples/proxy/README.md`)

zrok Python Proxy Example

This demonstrates using the ProxyShare class to forward requests from the public frontend to a target URL.

Run the Example

bash
LOG_LEVEL=INFO python ./proxy.py http://127.0.0.1:3000

Expected output:

txt
2025-01-29 06:37:00,884 - __main__ - INFO - === Starting proxy server ===
2025-01-29 06:37:00,884 - __main__ - INFO - Target URL: http://127.0.0.1:3000
2025-01-29 06:37:01,252 - __main__ - INFO - Access proxy at: https://24x0pq7s6jr0.zrok.example.com:443
2025-01-29 06:37:07,981 - zrok.proxy - INFO - Share 24x0pq7s6jr0 released

Basic Usage

python
from zrok2.proxy import ProxyShare
import zrok2

# Load the user's zrok environment from ~/.zrok2
zrok_env = zrok.environment.root.Load()

# Create a temporary proxy share (will be cleaned up on exit)
proxy = ProxyShare.create(root=zrok_env, target="http://127.0.0.1:3000")

print(f"Public URL: {proxy.endpoints}")
proxy.run()

Creating a Reserved Proxy Share

To create a share token that persists and can be reused, run the example proxy.py --unique-name my-persistent-proxy. If the unique name already exists it will be reused. Here's how it works:

python
proxy = ProxyShare.create(
    root=root,
    target="http://127.0.0.1:3000",
    unique_name="myuniquename"
)

Intro (`website/docs/intro.md`)


zrok overview

zrok (/ziːɹɒk/ ZEE-rock) is a secure, open-source platform for sharing local services and files over the internet
without opening firewall ports or managing TLS. Built on OpenZiti zero-trust networking and
backed by NetFoundry, it supports public HTTPS shares with optional authentication and private
shares accessible only to other zrok users. Run it as a hosted service at myzrok.io with a generous
free tier, or self-host your own instance on Linux, Docker, or Kubernetes.

zrok is free and open source under the Apache v2 license. The
source code is available on GitHub.

Why use zrok

Use zrok to share a running service, like a web server or network socket, or a directory of static files.

When sharing publicly, you can reserve a public hostname, enable authentication options, or both. Public shares proxy
HTTPS to your service or files.

When sharing privately, only users with the share token (and the appropriate permission grants) can access your share.
In addition to what you can share publicly, private shares can include TCP and UDP services.

Ready to share something? Get started.


Attic Overview (`website/docs/_attic/overview.md`)


What is `zrok`

Overview

zrok is a super-lightweight tool for providing on-demand access to dark, unreachable resources.
The super-power of zrok is providing a single-step solution to creating ephemeral network connectivity. From an end-user perspective, zrok is a tool packaged as a single executable, which can be used as a "shim" to quickly create public endpoints for dark resources.

zrok is also a service (which can be self-hosted) and runs on top of any OpenZiti network. The service provides one or more listening endpoints (typically on the public internet), that are designed to dynamically expose endpoints (HTTP(S)-only, as of v0.1.x), as requested by the end-user zrok tooling.

zrok listening endpoints, and zrok terminating endpoints are typically used together to create the streamlined, ephemeral connectivity solution for dark services. But listening endpoints and the terminating endpoints can be used orthogonally, interoperating with other OpenZiti SDK clients.

The Primary Use Case

The primary use case for zrok is exposing dark resources across the public internet, for a multiplicity of reasons. Consider a developer, who is building a web application and wants to share work in progress with third parties for review. The developer already has signed up for a zrok account and has been issued a secret token.

The developer will have enabled zrok capabilities for their shell environment using the zrok enable command:

text
$ zrok enable <secret-token>

After enabling their environment, the developer can quickly create a publicly available URL for their application like this:

text
$ zrok http http://localhost:3000

zrok will then give them a public URL, like this:

text
http://d9121e7cdfd2dd2f.zrok.io/

This URL can be shared with anyone, anywhere, allowing access to the developer's application as long as the developer is running the zrok http command. Simply ending that process will destroy all of the public access, and clean up the associated resources in the underlying OpenZiti environment.

How Does `zrok` Work?

At a high level, the zrok stack looks like this:

Let's discuss a couple of the flows through the above use case and talk about what's happening.

The `zrok enable` Flow

When a new zrok user signs up for an account, they are issued a "secret token". This secret token is used to enable shell access to zrok http from the command line.

When the user runs zrok enable from their shell, here's what happens:

  1. The zrok enable client reaches out with an enable request to the zrok controller.
  2. The zrok controller creates a new OpenZiti identity for the environment and enrolls it.
  3. The zrok controller creates an edge router policy associating the new OpenZiti identity with #all edge routers.
  4. The zrok controller returns the entire SDK configuration back to the zrok enable client.
  5. The zrok enable client then stores the OpenZiti identity along with a few other housekeeping details in the user's ~/.zrok folder.
  6. With the OpenZiti identity and configuration details stored in the user's environment, the user is then able to create any number of binding endpoints using the zrok http command.

The `zrok http` Flow

When a zrok user issues a zrok http command for an endpoint, here's what happens:

  1. The zrok http client gathers the necessary identity details from the environment (this was all staged during zrok enable).
  2. The zrok http client reaches out to the zrok controller with an authenticated tunnel request, asking to have a new endpoint binding created.
  3. The zrok controller allocates a new "service name" for the binding.
  4. The zrok controller creates a zrok.proxy.v1 configuration describing the user's requested authentication details (currently: none or basic).
  5. The zrok controller creates a new service, associating the service with the configuration.
  6. The zrok controller creates a bind service policy for the user's environment identity and the newly created OpenZiti service.
  7. The zrok controller creates a dial service policy allowing the configured listening endpoints (ingress proxies) to dial the newly created service.
  8. The zrok controller creates a service edge router policy associating the newly created service with #all edge routers.
  9. The URL for the new zrok service is constructed and returned to the zrok http client.
  10. The zrok http client then binds the OpenZiti service with an SDK client, and begins reverse-proxying traffic received from OpenZiti across to the dark service.

When the user terminates the zrok http client, these resources are removed from the OpenZiti network.

`zrok proxy` and HTTP Clients

When zrok http exposes a service and returns a URL, that URL is designed to be sent to a zrok listening endpoint (zrok proxy, currently). The zrok proxy is a stateless SDK client with an HTTP(S) listener exposed to the public internet.

When an HTTP request arrives as the zrok proxy listener, this happens:

  1. The zrok proxy parses the Host header provided by the client, extracting the zrok service name from the URL.
  2. The service is refreshed (if necessary) and retrieved. The zrok.proxy.v1 configuration details are retrieved.
  3. The zrok.proxy.v1 configuration is used to do authentication processing. If authentication is required, such a response is returned to the client.
  4. The zrok proxy then dials the OpenZiti service, and the dialed service is used to reverse proxy the request from the end user across OpenZiti to the binding endpoint, and then dark service.

The zrok proxy does not require any communication with the zrok controller, and is stateless. They can be pooled behind a load balancer. It is currently a goal is to maintain this lightweight nature.


Get Started Index (`website/docs/get-started/index.mdx`)


title: Get started with zrok sidebar_label: Get started

Get started with zrok

This guide takes you from zero to your first working share, then shows you how to keep shares running reliably
with the zrok agent.

Choose your deployment

Before you begin, decide how you'll use zrok:

  • myzrok.io (hosted) — NetFoundry runs the infrastructure. Sign up for a free account at
    myzrok.io and skip the deployment step entirely.
  • Self-hosted — You run your own zrok instance on Linux,
    Docker, or Kubernetes. Complete your
    deployment first, then return here once you have zrok running.

Steps overview

  1. Get an account token
  2. Install the zrok2 command
  3. Enable your environment
  4. Create your first share
  5. Set up the agent

Sdk Python Src Docs Overview (`sdk/python/src/docs/Overview.md`)

Overview

Properties

Name Type Description Notes
account_limited bool [optional]
environments List[EnvironmentAndResources] [optional]
namespaces List[ListShareNamespaces200ResponseInner] [optional]
names List[OverviewNamesInner] [optional]

Example

python
from zrok_api.models.overview import Overview

# TODO update the JSON string below
json = "{}"
# create an instance of Overview from a JSON string
overview_instance = Overview.from_json(json)
# print the JSON string representation of the object
print(Overview.to_json())

# convert the object into a dict
overview_dict = overview_instance.to_dict()
# create an instance of Overview from a dict
overview_from_dict = Overview.from_dict(overview_dict)

[Back to Model list] [Back to API list] [Back to README]


Concepts Backend Modes Index (`website/docs/concepts/backend-modes/index.mdx`)


Backend modes

Backend modes define how zrok handles the content being shared. zrok supports HTTP-based backends and raw TCP/UDP
backends.

HTTP-based backends

HTTP-based backends serve or proxy content over HTTP. There are four modes:

  • proxy: Forwards incoming requests to a target HTTP/HTTPS server running on your machine
  • web: Serves a local directory as a browsable file index or static website
  • drive: Exposes a local directory over WebDAV for mounting as a network drive
  • caddy: Runs the built-in Caddy server using a Caddyfile you provide

TCP and UDP backends

zrok also supports sharing raw TCP and UDP services, without HTTP in the path. Use these when you need to tunnel
non-HTTP traffic such as databases, game servers, or custom protocols.

Other modes

socks mode provides a SOCKS5 proxy on the access endpoint, tunneling TCP traffic to its destination through the share.


How Tos Agent Index (`website/docs/how-tos/agent/index.mdx`)


import DocCardList from '@theme/DocCardList';

zrok agent

The zrok agent centralizes management of your zrok shares and accesses as a single persistent background process.
For a full explanation of how it works, see zrok agent overview.


How Tos Install Index (`website/docs/how-tos/install/index.mdx`)


import InstallCards from './_install_cards.mdx';

Install zrok

Choose your platform to download zrok and follow the installation guide.


Self Hosting Metrics And Limits Index (`website/docs/self-hosting/metrics-and-limits/index.mdx`)


import DocCardList from '@theme/DocCardList';

Metrics and limits

Metrics and limits are two complementary systems for operating a self-hosted zrok instance at scale.

Metrics give you visibility into usage across your service instance. zrok builds on top of the fabric.usage event
type from OpenZiti, routing usage events through a metrics bridge and into InfluxDB, where they power the activity
graphs in the zrok web console.

Limits let you control how much of that usage any single account can consume—both in terms of resource counts
(environments, shares, names) and data transfer bandwidth. When an account exceeds a threshold, the limits agent can
warn the user or disable their shares until usage falls back within bounds.

Metrics architecture

A fully configured, production-scale zrok service instance looks like this:

The OpenZiti controller has a number of ways to emit events. The zrok controller has several ways to consume
fabric.usage events. Smaller installations could be configured in these ways:

Environments that horizontally scale the zrok control plane with multiple controllers should use an AMQP-based queue to
"fan out" the metrics workload across the entire control plane. Simpler installations that use a single zrok controller
can collect fabric.usage events from the OpenZiti controller by "tailing" the events log file, or collecting them from
the OpenZiti controller's websocket implementation.

In this section


How Tos Agent Windows Service Index (`website/docs/how-tos/agent/windows-service/index.mdx`)


Set up the Windows agent service

Run the zrok agent as a Windows service so it starts automatically with your system. Service management is handled
through nssm (Non-Sucking Service Manager), a third-party utility. Review the nssm
documentation
before proceeding.

Prerequisites

  • A zrok account token.

  • zrok2.exe and nssm.exe installed in a protected location. This guide uses C:\Program Files\zrok2\.

  • A Command Prompt open in C:\Program Files\zrok2\:

    cmd
    cd "\Program Files\zrok2"

Enable the service environment

The Windows service runs as the Local System user, whose home directory is C:\Windows\System32\config\systemprofile.
You need to enable a zrok environment there.

  1. Set USERPROFILE to the Local System home directory:

    cmd
    C:\Program Files\zrok2>set USERPROFILE=c:\Windows\System32\config\systemprofile
  2. Enable a zrok environment for the service:

    cmd
    C:\Program Files\zrok2>zrok2 enable <accountToken>

Install the service

  1. Run nssm install to open the configuration dialog:

    cmd
    C:\Program Files\zrok2>nssm install zrokAgent

    Windows may prompt for elevated Administrator privileges before showing the nssm installation dialog.

  2. On the Application tab, configure the following fields:

    • Path: C:\Program Files\zrok2\zrok2.exe
    • Startup directory: C:\Windows\System32\config\systemprofile
    • Arguments: agent start
    • Service name: zrokAgent
  3. Click the I/O tab and configure log output:

    • Output (stdout): C:\Windows\System32\config\systemprofile\.zrok2\agent-stdout.log
    • Error (stderr): C:\Windows\System32\config\systemprofile\.zrok2\agent-stderr.log

    Setting up I/O redirection produces logs from the zrok2 agent start process that are useful for troubleshooting.
    Optionally, configure log rotation on the File rotation tab if your setup requires it:

  4. Click Install service.

  5. Open the Windows Services utility. You should see the new zrokAgent service:

  6. Start the service by clicking the start button in the toolbar, or right-clicking the service and selecting Start:

  7. Verify the service is working by opening a Windows Explorer window at
    C:\Windows\System32\config\systemprofile\.zrok2. You should see the log files and the agent.socket file used by
    the zrok CLI:

  8. Open the agent console:

    cmd
    C:\Program Files\zrok2>zrok2 agent console

    This opens a web interface for managing the agent. You can create shares and accesses from the console, or continue
    using the zrok CLI.

:::note
Whenever you interact with this service environment from a Command Prompt, set USERPROFILE to
C:\Windows\System32\config\systemprofile first. Otherwise, zrok commands will use your default user profile directory
instead.
:::

Non-interactive service installation

nssm supports a command-line interface that bypasses the GUI. Run these commands from an Administrator Command Prompt:

  1. Create the service:

    cmd
    C:\Program Files\zrok2>nssm install zrokAgent "C:\Program Files\zrok2\zrok2.exe" agent start
  2. Set the working directory:

    cmd
    C:\Program Files\zrok2>nssm set zrokAgent AppDirectory C:\Windows\System32\config\systemprofile
  3. Configure log output:

    cmd
    C:\Program Files\zrok2>nssm set zrokAgent AppStdout C:\Windows\System32\config\systemprofile\.zrok2\agent-stdout.log
    cmd
    C:\Program Files\zrok2>nssm set zrokAgent AppStderr C:\Windows\System32\config\systemprofile\.zrok2\agent-stderr.log
  4. Start the service:

    cmd
    C:\Program Files\zrok2>sc start zrokAgent

Remove the zrok agent service

Run the following commands from an Administrator Command Prompt:

  1. Stop the service:

    cmd
    C:\>sc stop zrokAgent
  2. Delete the service:

    cmd
    C:\>sc delete zrokAgent
  3. With USERPROFILE set to C:\Windows\System32\config\systemprofile, remove the zrok environment from your system
    and from the zrok service:

    cmd
    C:\Program Files\zrok2>zrok2 disable

Current Bandwidth Limit Relax (`docs/current/bandwidth-limit-relax.md`)

Bandwidth-limit relaxation

The controller checks limited accounts after their bandwidth usage drops below the configured threshold. It restores each share's dial policies and removes the account's bandwidth-limit journal entry only when every applicable share succeeds. Failed accounts retain their entries for a later cycle, while other accounts continue. Policy lookup by deterministic name makes a partial retry safe, and a second cycle over restored policies creates nothing.

The cycle uses one database transaction. A store error ends the cycle because PostgreSQL aborts the transaction after a failed statement.

Which dial policies a share should have

controller/limits/dialPolicies.go computes a share's desired dial policies separately from ensuring them; relax and the repair command share it.

  • Public share frontend policy, <envZId>-<shrZId>-dial, tagged with the share token. Its identity roles are the frontends of every namespace the share's live name mappings point at (mapping, name and namespace all undeleted), de-duplicated, which is how allocatePublicResources creates it. frontend_selection is the v1 column and v2 never writes it, so it is used only for a v1-created row with no live mappings. A share with neither, or whose namespaces have no frontends, has no frontend policy; its create made none, and relax counts it as done.
  • Private access policy, <frontendToken>-<envZId>-<shrZId>-dial, one per frontend row with private_share_id. access private does not check the share mode, so these exist for public shares too, and relax restores them for both modes.

Influx deadline

Each limits-agent Influx query is bounded by limits.query_timeout (default 30s) and by the agent's context, which Stop cancels. A query that times out or fails part-way through its result is an error, never zero usage, so it cannot relax an account.

Repairing shares the journal no longer reaches

Incidents cleared by hand, and cycles that crashed before step 1, left live shares with no dial policy and no journal entry; relax never visits them. zrok2 admin repair-dial-policies <configPath> walks every live share, computes its desired dial policies and reports each one missing by account, share token and policy name. It honours the journal: an account with a global limit entry, or a limit entry whose limit class has no backend mode, is skipped as a whole; a limit entry whose class has a backend mode skips that mode's shares. It never deletes.

Production procedure:

  1. Run zrok2 admin repair-dial-policies <configPath> (a dry run) and review the missing policies and skipped accounts.
  2. Run it again with --apply. It creates the missing policies through the same find-then-create as relax, continues past individual OpenZiti failures, lists under failed shares any v1-created share whose selected frontend no longer exists (with the frontend it selects), and prints checked, missing, created and failed counts; any failure exits non-zero after the run.
  3. Run the dry run again; it should report nothing missing.

Current Dynamic Proxy Mappings (`docs/current/dynamic-proxy-mappings.md`)

Dynamic proxy mappings

The dynamic frontend (zrok2 access dynamicProxy, endpoints/dynamicProxy/) serves requests from an in-memory map of hostname to share token. The controller's frontend_mappings rows are authoritative; the map learns them three ways, all applied by one loop in mappings.go:

Source When Can learn Cannot learn
Full pull (FrontendMappings, id 0) at start, then every mapping_reconcile_interval (default 10m) additions, removals, replacements nothing, but it is tens of thousands of rows for a busy frontend, so it runs on minutes
Delta pull (id above the highest held) every mapping_refresh_interval (default 5m) every row with a higher id than any held: additions, and replacements, since a name deleted and re-inserted gets a higher id deletions: a deleted row never appears in a higher-id pull
AMQP bind and unbind (amqpSubscriber.go) as the controller publishes, after commit additions and removals, immediately anything published while the broker or the frontend's connection was down

The delta pull never removes a name, by design, and stays that way; removals are the subscriber's job and, when an update is lost, the reconciliation's.

Start

The initial full pull retries with backoff, one second doubling to thirty, until it succeeds or the frontend stops, logging each failure. Until it succeeds the map is empty and requests answer not-found.

Reconciliation

On each tick the frontend pulls the complete set and, under the map's lock, makes the map match it:

  • a name absent from the set is dropped;
  • a name missing from the map is added;
  • a name whose share token or id differs from the set's is replaced with the set's row;
  • a name whose row is identical is left alone.

Each difference is logged at info with the name and both tokens, and one summary line gives the counts and elapsed time. A failed pull is logged at error and the map is left untouched.

A complete set that comes back empty while the map is non-empty is logged at warn and not applied the first time. For a frontend carrying traffic a single empty answer is more likely a failure the client did not see than a world with no shares, and applying it would drop every mapping at once. If the very next reconciliation is also empty it is applied like any other set, each drop and the summary logged as usual, so a frontend whose last mappings really were removed stops serving them within two intervals. A non-empty set or a failed pull in between resets the count.

Subscriber acknowledgement

The subscriber consumes its own queue, exclusive and deleted with the process, with manual acknowledgement and a prefetch of amqp_subscriber.prefetch (default 64).

Delivery Settlement
parsed bind or unbind, handed to the loop ack
parsed, but the handoff channel (amqp_subscriber.queue_depth) is full ack, logged at warn; reconciliation covers it
body that does not parse, or an unknown operation nack without requeue, logged at error with the body's first hundred bytes; not forwarded
in flight when the frontend stops nack without requeue

Nothing requeues. The queue has no other consumer and dies with the process, so a requeued message can only return to the same handler, and one it cannot process would return forever. A message lost with the queue is what reconciliation recovers.


Current Garbage Collection (`docs/current/garbage-collection.md`)

Garbage collection

zrok2 admin gc <configPath> [--delete] [--min-age 24h] (cmd/zrok2/adminGc.go, controller/gc.go) runs as its own process against the controller's store and OpenZiti controller, and removes OpenZiti objects left behind by shares that no longer exist. It opens the store with auto-migration off (controller/adminStore.go), so even a dry run never changes the schema; migrations belong to the controller and zrok2 admin migrate.

What gc owns

gc examines services, configs, service policies and service edge router policies tagged zrok. An object belongs to a share when it carries a zrokShareToken tag:

  • token belongs to a live (not deleted) row in shares: live, kept;
  • token belongs to no live row: orphaned, a candidate;
  • no zrokShareToken tag: not share-owned, never touched.

Names are never consulted. The last group covers agent-remote objects (zrokAgentRemote), frontend identities and their policies, the dynamic proxy controller's service, and anything else carrying only the zrok tag. An access-path dial policy carries the share token as well as zrokFrontendToken, so it follows its share. Identities and edge router policies belong to environments and are handled by disable, not gc. Live shares come from the shared shares table, so the v1 line's shares count as live too.

Age guard

A candidate whose createdAt is younger than --min-age (default 24 hours) is skipped and counted as too young. A share create allocates its OpenZiti objects before its row commits, so for the length of that request its objects look orphaned; the guard keeps gc off them, and a later run picks up a real orphan. The store is read before OpenZiti is listed, so an object created after the read is younger than the run.

The default is a day rather than minutes for two reasons. createdAt is stamped by the OpenZiti controller's clock and compared against the clock of the host running gc, and a day is well clear of any skew between the two. And since v2.0.6 stopped the leak, the orphans left to reclaim are old; nothing younger than a day needs collecting, so the longer guard costs nothing. A shorter --min-age is for a deliberate cleanup, such as on a dev environment, where the clocks are known to agree.

Modes

Every kind is listed in full, 500 at a time with an advancing offset (automation.FindAll). The report goes to stdout in both modes: for each kind the counts of live, orphaned, too young and not share-owned objects, then the orphans' ids and names grouped by share token. The JSON log names every orphan and too-young object.

Without --delete it is a dry run and nothing is deleted. With --delete the orphans are deleted by id in the order service edge router policies, service policies, configs, services, so a service is never left referenced by a policy or config that outlives it. An object already gone counts as collected; any other failure is logged and the run continues, and the command exits with an error naming the number of failed deletes. A table of deleted, already gone and failed counts per kind follows the report.

Production procedure

  1. Run the dry run and keep its output.
  2. Review it: every live share's objects should be counted live, the orphans listed by token should be shares you expect to be gone, and nothing without a share token appears in the orphan list.
  3. Run with --delete. Objects created since the dry run are either live or too young.
  4. Run the dry run again; it should report no orphans.

Current Metrics Consumer (`docs/current/metrics-consumer.md`)

Metrics consumer bounds

The controller consumes metrics with manual acknowledgement and a finite prefetch window. It nacks malformed JSON and unusable events without requeue immediately. A usable event has namespace fabric.usage, a numeric interval_start_utc, a string tags.serviceId, and a usage object. A missing circuit_id produces a warning and remains acceptable.

Within usage, a present ingress.tx, ingress.rx, egress.tx, or egress.rx must be numeric; a mistyped counter makes the event invalid. Absent counters remain zero, so intervals containing only ingress or only egress are accepted.

The agent holds the Influx writer as its explicit durable sink. It retries that sink locally with exponential backoff, then nacks without requeue if the attempt or elapsed-time budget runs out. Remaining sinks do not receive an event whose durable write failed. Once the durable sink succeeds, later sinks run without retries; their errors are logged and the delivery is acknowledged.

A panic during per-message processing is logged at error level with the recovered value and up to the first 512 bytes of the message body. The delivery is nacked without requeue and processing continues with the next message, preventing a poison message from repeatedly crashing the controller. Legacy sink calls carry their panics back from the guarded goroutine to this recovery boundary. The shutdown drain remains outside it and leaves deliveries unsettled.

The limits sink runs after Influx. If its queue stays full, it logs and counts the dropped handoff, then returns success so the delivery is acknowledged. The usage remains in Influx for later enforcement. DroppedEvents() exposes the limits handoff drop count.

The following optional configuration values use these defaults when unset:

Configuration path Default
metrics.agent.source.prefetch 64
metrics.agent.retry_attempts 5 attempts per enrichment or durable-write operation
metrics.agent.retry_initial_backoff 1s
metrics.agent.retry_max_backoff 30s
metrics.agent.retry_budget 2m shared per message
metrics.influx.write_timeout 10s per attempt
limits.handoff_timeout 3s
limits.query_timeout 30s per limits-agent Influx query

Share-detail enrichment and the durable write share one per-message deadline, including waiting for a store connection. Enrichment has three outcomes:

  • A confirmed missing share is recognized as errNotAShare, debug-logged, and processing continues without retries or attribution. This is legitimate traffic for another service; the Influx writer skips events without a share token and the delivery is acknowledged.
  • A share is attributed and processing continues to the durable sink. Ephemeral environments deliberately have no account: enrichment reports that condition at debug level, retains the share token and environment ID, and continues with account ID zero without retries.
  • A store failure is retried with the configured attempts and backoff within the shared deadline. Exhaustion is logged and nacked without requeue, and no sinks run. Treating an unavailable store as proof that the service is unrelated would silently lose real share usage.

The consumer cancels database lookups, active writes, and retry waits at shutdown. It drains events so a source blocked on send can exit, leaving drained deliveries unsettled. A delivery held by the source when its send is cancelled is also left unsettled, as is an active delivery interrupted before durable success. Closing the AMQP connection lets the broker requeue these deliveries for recovery. This differs from failed processing: shutdown is not a processing failure, and nacking these valid messages would discard them on restart.

The built-in sinks accept cancellation through HandleContext while preserving the existing UsageSink.Handle interface. A sink implementing only Handle runs through a single guarded call slot: if it never returns, subsequent calls time out without starting more goroutines.

No failed-processing path requests requeue. A broker policy may route discarded deliveries to a dead-letter queue with its own length and TTL bounds; no such policy is required or configured by the controller. The limits agent's own Influx queries are bounded separately, by limits.query_timeout and the agent's shutdown (see bandwidth-limit-relax.md). A stuck limits query cannot block this consumer beyond its bounded handoff.


Current Repair Store (`docs/current/repair-store.md`)

Store repair

zrok2 admin repair-store <configPath> [--apply] [--batch 500] (cmd/zrok2/adminRepairStore.go, controller/repairStore.go) runs as its own process against the controller's store and releases the store rows a teardown would have released had it run: rows left by shares deleted before teardownShare released names on every path, and by teardowns that never ran or stopped part-way. It opens the store with auto-migration off, as admin gc and admin repair-dial-policies do (controller/adminStore.go): a store behind the binary's schema fails the command rather than being migrated by it. healSeveredName repairs a name when someone asks for it (see share-teardown.md); this sweep reaches the rest, which no request will ever visit.

What it repairs

Each condition is one a teardown would have handled had it run. They run in this order.

  • A. A live environment of a deleted account, and a live share in a deleted environment (or in a live environment of a deleted account, which A is about to delete). The environment goes through removeEnvironmentFromStore, the store half of disable: its own frontends and the environment row are soft-deleted. The share goes through releaseShareFromStore, the store half of teardownShare: its name mappings and allocated names, frontend mappings, access frontends, access grants and the share row. Environments go first, a batch of environments at a time, then shares. This is store-side only. It makes no OpenZiti calls: once the share row is deleted its token is no longer live, and the next admin gc run collects its objects.
  • B. A live access frontend (frontends.private_share_id set) whose share has no live row. Soft-deleted. Shares torn down before step 13 left these, because teardownShare removed their dial policies but not the rows.
  • C. A live name of a deleted account. Soft-deleted, with any live mapping on it soft-deleted first. Account deletes before step 13 left these.
  • D. A live auto-allocated name that no live mapping holds. Soft-deleted.

Then the mapping conditions:

  1. A live share_name_mappings row whose share has no live row. The mapping is soft-deleted; if its name is auto-allocated (not reserved) and still live, the name is soft-deleted too, as teardownShare does. Reserved names survive. A mapping whose name is also deleted counts here, not under 2.
  2. A live share_name_mappings row of a live share whose name is deleted. The availability check looks mappings up by the live name's id, so it never sees these. Soft-deleted.
  3. A frontend_mappings row whose share token belongs to no live share: the share is deleted, or no share row carries the token at all. The availability check treats the second kind as a live holder and never heals it; only this sweep removes it. Deleted; the table has no deleted column.

A row can match more than one condition when the survey runs: an allocated name of a deleted account held by a stranded share is counted under A's shares and under C. The earlier condition repairs it, and the later one finds it already done, so its repaired count is lower than its found count. The survey's found counts are therefore not additive.

A share token is unique only among live shares, so condition 3 asks whether any live share carries the token, not whether a row with the token is deleted.

Modes

Without --apply it is a dry run. One transaction, rolled back, counts each condition (A split into environments and shares, 1 into reserved and auto-allocated), counts the auto-allocated names condition 1 would release, and lists up to twenty rows of each: the row's table and id, then whichever it has of name, namespace token (frontend token for condition 3 and B, OpenZiti id for an environment), share token, and the environment or account it belongs to, marking a frontend mapping whose token has no share row. The report goes to stdout and the totals to the log.

With --apply the survey is printed and then each condition is repaired in order: A environments, A shares, B, C, D, 1 reserved, 1 auto-allocated, 2, 3. A goes first because a released share takes its name mappings, frontend mappings and access frontends with it. Among the mapping conditions, reserved names go first so the names users chose are freed first if a run is interrupted. Each batch is its own transaction: a plain select ... order by id limit N of the matching rows, then an update or delete by those ids, in SQL both engines accept. Progress is logged after each batch. A failed batch rolls back, is reported, and stops the run with a non-zero exit; the batches before it stay committed. Repaired rows no longer match, so a re-run resumes where the last one stopped. The report ends with found and repaired per condition, the names condition 1 released, batches run and failed batches.

No notifications

The command touches the store only. It publishes no unbinds: dynamic frontends drop the removed frontend mappings at their next periodic reconciliation (dynamic-proxy-mappings.md). It runs outside the controller, which owns the publisher, and a frontend mapping it removes serves no live share, so nothing is lost while the frontend waits.

What is left in OpenZiti

The command makes no OpenZiti calls; it is store-side by decision. The OpenZiti side of the same debt is admin gc's (garbage-collection.md), and that covers the objects of shares released under A: once the share row is deleted its token is no longer live, and the next gc run collects them.

gc does not cover environments. The identity and edge router policy of an environment soft-deleted under A stay in OpenZiti. After condition A, the apply report lists those identities' ids under a heading saying they are left in OpenZiti, for removal one at a time with zrok2 admin delete identity <zId>, which deletes the edge router policy named after the identity and then the identity. Only environments in committed batches are listed. The dial policies of the frontends in those environments are tagged with share tokens that may still be live, so gc keeps them; they also stay.

Production procedure

  1. Run the dry run and keep its output.
  2. Review the sample. Live shares are expected under "shares in deleted environments", whose environments are gone, and under "mappings to deleted names", whose names are gone. Under every other condition each share token should be a share you expect to be gone, and no live share should appear. Under "allocated names with no mapping", check that the names are not ones their owners un-reserved on purpose (see below).
  3. Run with --apply. Rows severed since the dry run, if any, are repaired too; the counts are the dry run's, the repaired column is what was done.
  4. Run the dry run again; it should find nothing.
  5. Remove the identities the apply report listed as left in OpenZiti, with zrok2 admin delete identity <zId>, then run admin gc to collect the released shares' objects.

Unmapped allocated names

updateShareName lets an owner set reserved to false on a name no share holds. That leaves a live, auto-allocated name with no mapping, which is exactly condition D. A run of the sweep releases such a name, as the owner's next teardown of a share on it would. The production snapshot had three, which may be this path rather than a leak.


Current Share Teardown (`docs/current/share-teardown.md`)

Share teardown

teardownShare (controller/teardownShare.go) tears a share down. unshare, disable and admin deleteAccount (through disableEnvironment) all call it, once per share, inside the request's transaction. Its store half is releaseShareFromStore, the only code that deletes a share row; admin repair-store calls that half alone for shares stranded in deleted environments (see repair-store.md). It runs, in order:

  1. Name mappings: the share's live share_name_mappings rows are soft-deleted, and each auto-allocated (non-reserved) name they point at is soft-deleted with them. Reserved names survive and can be used by the next share.
  2. Frontend mappings: every frontend_mappings row carrying the share token is deleted, whether or not a dynamic proxy controller is configured. One unbind update is returned per row.
  3. Access frontends: every live frontends row whose private_share_id is the share, the private accesses to it, is soft-deleted. Their dial policies carry the share token and go in step 6. unaccess still removes a single access on its own.
  4. Access grants for the share.
  5. The share row.
  6. OpenZiti objects tagged zrokShareToken=<token>. An object already gone counts as deleted; any other failure fails the teardown.

Any failure returns at once and the caller's transaction rolls back, leaving every row for a retry. OpenZiti goes last so that an OpenZiti failure leaves the store untouched.

Frontend mapping updates, binds from share create and unbinds from teardown, are returned to the handler and published only after its trx.Commit() returns nil, through publishMappingUpdates. A failed publish is logged at error level and not returned: the committed rows are authoritative. A lost bind or unbind is recovered by the dynamic frontend's periodic full reconciliation; see dynamic-proxy-mappings.md. Without a dynamic proxy controller the rows are still written and nothing is published.

Account delete

Admin deleteAccount disables each of the account's environments, which tears down every share in them, and then, before it deletes the account row, releases the account's names (releaseAccountNames): every live name of the account, reserved or not, is soft-deleted. By then no live share of the account can hold one. A mapping on one of its names to a live share (some other account's share) is a store error and fails the delete, rolling everything back; a severed mapping, to a share already deleted, is soft-deleted with its name.

Share create

On share create, a failed frontend_mappings insert fails the request; the share-create compensation then removes the OpenZiti objects the request created.

Name availability

A name whose share has been deleted can still carry a live share_name_mappings row, or a frontend_mappings row, written before teardownShare released names on every path. healSeveredName (controller/healSeveredName.go) is the one availability check for a name; share create (for a user-specified name), createShareName and deleteShareName all call it, inside the request's transaction. It reads the name's live mappings with their share state, and the name's frontend mappings on the namespace's dynamic frontends:

  • Any mapping whose share is live, or a frontend mapping with no share row at all, is a conflict carrying the holder's token. Nothing is modified, and the handler answers 409 name '<name>' in namespace '<ns>' is in use by share '<token>'; run 'zrok2 delete share <token>' to release it.
  • Otherwise every mapping is dead: each share name mapping is soft-deleted, each frontend mapping is removed, and each is logged at info with the dead share's token. The request then proceeds as if the name had been free.

Each frontend mapping removed yields an unbind, returned like teardownShare's and published only after the handler's commit: createShareName and deleteShareName publish them on their own, and share create puts them ahead of its binds in the one list it publishes, so a frontend sees the unbind and then the bind for the same name. In share create, a conflict (a namespace or name that does not exist, a name the account does not own, a namespace it is not granted, a live holder) is a nameSelectionConflict and answers 409; any other error from the name check, a store failure in the heal included, answers 500.

The healing commits or rolls back with the request; a request that fails later leaves the severed rows for the next attempt to heal again. It is a repair of past damage, not a teardown path: it touches no share row and no OpenZiti object. The auto-allocated branch of share create (no name given) creates a fresh name and does not call it.


Current Ziti Session (`docs/current/ziti-session.md`)

Controller OpenZiti management session

The controller shares one OpenZiti management client per API endpoint and username for the life of the process, including bandwidth-limit enforcement and relaxation. It fetches the controller CA bundle and authenticates when that client is first created. A plain http:// endpoint has no TLS, so the CA fetch is skipped for it; this is what lets controller tests reach a fake Ziti through the production client. A failed initial build is not cached; the next call tries again.

When a management request receives HTTP 401, the transport refreshes the session and replays the request once, including its body. Concurrent requests share one in-flight refresh; no lock is held across the authentication call. The CA bundle and management transport remain in use across refreshes. Failed re-authentication or a second 401 returns the operation's typed unauthorized error to its caller; there is no retry loop.

A failed refresh is remembered for five seconds: requests still holding the failed session during that window get the unauthorized error immediately, and the first request after it makes one fresh attempt. A persistent authentication failure therefore costs one login per window and fails operations quickly instead of serializing them. The first build of the client for an endpoint and username happens outside the cache lock; concurrent callers for the same key wait for that build and share its result, and callers for other keys are not blocked.

The process-wide zrok.ziti.authentications expvar counter counts successful authentications. Read it at /debug/vars on the configured admin.profile_endpoint listener. Each successful authentication also writes an INFO log with the running count and reason (initial or expired). After startup the count should remain stable across ordinary share creates and deletes, increasing only when an expired session needs replacement.

When an OpenZiti rate limiter answers a management request with HTTP 429, the transport consumes the response and returns *automation.RateLimitedError, naming the limiter (the error code in Ziti's envelope, SERVER_TOO_MANY_REQUESTS for the command rate limiter), the method and the path. A 429 from /authenticate during a refresh is returned the same way with limiter authenticate, and is remembered for the failed-refresh window like any other refresh failure; requests waiting on that refresh receive the rate-limited error rather than their typed 401. Nothing is retried. automation.IsRateLimited recognises the error through any wrapping. The share, unshare, access, unaccess, enable and disable handlers answer it with 503 and Retry-After: 5; admin and agent handlers still answer 500.

Each 429 increments the process-wide zrok.ziti.rate_limited expvar counter, beside zrok.ziti.authentications at /debug/vars, and writes one WARN log line naming the limiter, method and path with the running count. The counter should stay at zero in ordinary operation; a rising count is the evidence for adding retry or a concurrency cap.

Credentials are retained from the first successful build for an endpoint and username. Restart the controller after changing credentials. Separate admin command processes have their own session.


Journal 2026 09 24 (`docs/journal/2026-09-24.md`)

2026-09-24

  • Retaining a limit journal entry requires every policy creation to be idempotent: earlier shares may have succeeded before another share failed, so the next cycle sees both again.
  • A nil frontend_selection is normal for v2 public shares; it is not evidence of a corrupt row. Rebuilding the missing dial policy from name mappings remains separate work.
  • Store errors still abort the shared relax transaction. PostgreSQL poisons a transaction after a failed statement, even though the sqlite tests continue from one.
  • The zrok-one-ziti-session Terminus quality describes a later stage: NewZitiAutomation still authenticates per call. Step 1 deliberately leaves that production constructor unchanged; Terminus flags it, so this stage awaits the operator's disposition rather than a client-cache change.

Journal 2026 09 25 (`docs/journal/2026-09-25.md`)

2026-09-25

  • Terminus review of the relax-cycle stage (session 9d240f423f4a) returned five blocking findings, all in code the stage did not touch. Vetoed by the operator on the condition that each is addressed by a later stage: per-call authentication in NewZitiAutomation (zrok-one-ziti-session), no ID-based compensation in the share handler and DeleteWithFilter stopping on not-found (zrok-compensate-by-id, zrok-absence-is-success), bind/unbind published inside the transaction (zrok-notify-after-commit), and the swallowed bind error in processDynamicMappings (zrok-store-engine-parity). Each has a stage in the route; none is to be fixed opportunistically inside an unrelated stage.
  • The reviewer reports pre-existing debt in untouched code as findings against the change under review. Expect the same vetoes to recur on later stages until those stages land; no rubric change was made.
  • The relax-cycle change was exercised against a real Ziti controller and a PostgreSQL store (local dev environment, etc/dev.yml with the secrets block removed): two limited accounts, one holding a public share with NULL frontend_selection. Over six 15-second cycles the account with the public share was retried every cycle with its journal entry retained and the public share named in the log, its private share's dial policy was recreated exactly once, the other account was relaxed and cleared on the first cycle, and the controller stayed up. The fake and the real controller agreed on the list-by-name lookup the idempotency check depends on.
  • ZROK2_API_ENDPOINT does not override an enabled environment's stored endpoint (env_v0_4/api.go, ApiEndpoint()): the env wins. Client and admin commands for a local controller need a HOME whose ~/.zrok2 is not enabled elsewhere.
  • Observed in passing: zrok2 access private that fails to bind its local port runs unaccess on the way out, which removes the frontend row but left the Ziti dial policy behind. Same family as the create-path compensation work; not fixed here.
  • Before/after on the same live setup: the controller built from the committed HEAD (no nil guard) panicked 12 seconds after a limit journal row was inserted for an account holding a public share with NULL frontend_selection, with the stack relaxPublicShare → relaxAction.HandleAccount → Agent.relax. The working-tree controller on the identical rows logged the share, retained the entry, and stayed up. A limited account cannot create shares (CanCreateShare refuses), so a reproduction has to create the share before inserting the journal row.
  • Metrics failures never requeue: AMQP redelivery carries no incremented retry count and a persistent sink failure becomes a hot loop. Retries stay local and bounded. Influx exhaustion nacks without requeue; a limits handoff drop returns nil and acks because Influx already holds the usage used by later enforcement.
  • Optional bounded replay belongs in a broker dead-letter policy, not QueueDeclare arguments: the durable queue's arguments cannot be changed in place. The consumer neither installs nor requires a DLX.

Journal 2026 09 26 (`docs/journal/2026-09-26.md`)

2026-09-26

  • Round 4 supersedes the blanket best-effort enrichment disposition: confirmed not-found continues without retry (normal traffic for another service), while transient store errors retry then drop because acknowledging without attribution silently loses real share usage. Enrichment and durable writes now share one per-message deadline.
  • Shutdown is not failed processing. Both the agent's drain and the source's cancelled send deliberately leave deliveries unsettled so the broker requeues them on connection close. The operator rejected Terminus's proposed shutdown nack because it would discard valid messages on restarts; the no-requeue rule applies to processing failures.
  • Deadlines for controller/limits/influxReader.go are explicitly deferred by the operator to the relax stage. A stuck query can stall that worker, but the bounded handoff prevents it from parking the metrics consumer.
  • Usage counters distinguish absent from mistyped: absent is zero for legitimate one-sided intervals; present-and-mistyped makes the event invalid.
  • Operator vetoes for this stage: the bridge acknowledging a failed publish belongs on the route's filler track (publisher-side under-count, unable to fill the broker); environment disable bypassing shared share teardown belongs to a numbered later stage. Leave bridge.go, amqpSink.go, and disable.go untouched here.
  • Ephemeral environments intentionally have a null account ID (migration 002); enrichment tolerates it, retaining share/environment attribution with account zero.
  • The consumer isolates panics per message and drops the poison delivery without requeue, for the same reason as the relax cycle's isolation: one bad item must not crash controllers repeatedly through broker redelivery.
  • Metrics consumer verified live against the dev RabbitMQ (Docker, rabbitmqctl inside the container) with InfluxDB pointed at a closed port and 300 synthetic fabric.usage events for a real share id. Pre-fix build: all 300 delivered and parked unacknowledged, messages_ready 0, none settled until the channel closed. Step 2 build (retry budget shortened to 5s for the run): messages_unacknowledged pinned at the prefetch of 64 throughout, ready draining as each message exhausted its budget and was nacked, all 300 dropped in about a minute, no panics, controller up. With Influx reachable, 100 events were acked and written within 5 seconds. Watch messages_unacknowledged; messages_ready reads 0 in the failure mode.
  • A make test run does not refresh GOBIN; a live run of a working-tree change needs go build (or make) first, or it runs the previous install.
  • Transient enrichment verified live: with a TCP relay between the controller and Postgres killed mid-run, events for a real share went through the bounded retry ("usage processing attempt '1' failed: ... connection refused") and were nacked without requeue ("message dropped"); with the relay restored the next events were enriched, written and acked; the controller stayed up throughout. The store's error through a dead relay is "connection refused" from BeginContext, never sql.ErrNoRows, so the not-found sentinel cannot misfire on an outage.
  • zrok2 --verbose does not enable debug logging: PersistentPreRun in cmd/zrok2/main.go re-initialises dl at slog.LevelInfo when the flag is set. Pre-existing; not changed here.
  • Ziti session refresh is guarded by generation rather than promising exact-once authentication: the goal is removing per-operation pressure on the shared authentication limiter, and occasional redundant refreshes are acceptable. The HTTP transport handles 401 so every manager and existing caller shares the same behavior, including replay of create bodies. Failed re-authentication or a persistent 401 propagates as the operation's typed error after at most one refresh/replay; it must never become a retry loop.

Journal 2026 09 27 (`docs/journal/2026-09-27.md`)

2026-09-27

  • Shared Ziti session verified live against a Ziti 1.5.4 controller. Step 2 build (per-call authentication): five share create/unshare pairs added ten admin API sessions on the Ziti side. Step 3 build: startup cost one authentication, ten create/unshare pairs added none, and after the controller's API session was deleted on the Ziti side the next operation succeeded with exactly one re-authentication logged reason 'expired' and no error. The counter at /debug/vars on the admin profile endpoint tracked both.
  • The refresh replays a request once through http.Request.GetBody, which go-openapi's runtime sets for the buffered bodies it builds; a streaming body, or a refresh that itself fails, returns the original typed 401 to the caller. There is no retry loop behind a persistent 401.
  • Ziti session refresh is single-flight rather than mutex-held (PR review of 63ff5ae5): holding the lock across /authenticate dedupes successes but serializes failures, since a failed refresh leaves the generation unchanged and each waiter then runs its own login. Under a sustained 401 (rotated or wrong credentials, disabled identity, Ziti itself up) that turned N concurrent handlers into a chain of N logins of up to 30 s, so the API looked dead rather than misconfigured. Now waiters share the in-flight attempt, and a failure is remembered for failedRefreshWindow (5 s) against the generation it failed for, so a persistent failure costs one login per window and everything else gets the typed 401 at once. The refresh runs on a context detached from the first caller's cancellation, so one abandoned request cannot fail or poison the window for the others. First build moved outside the cache lock for the same reason. The same change is owed on the v1 branch's controller/zrokEdgeSdk/session.go before v1.1.12.

Journal 2026 09 28 (`docs/journal/2026-09-28.md`)

2026-09-28

  • Share-create compensation deletes the objects the request recorded, by ID, and never calls CleanupByTag. checkPrivateShareTokenAvailability is a read before the create, so two requests for the same private token can both pass it; both carry the same zrokShareToken tag, and a tag-scoped cleanup by the loser would delete the winner's config, service and policies. Tag-scoped cleanup stays only where a share row already owns the token (unshare, disable, gc). controller/access.go has the same leak on its dial policy and is meant to reuse zitiCompensation.
  • In real Ziti config names are unique too, so the private-token loser normally fails at the config create with nothing to compensate; the handler race test seeds the winner's service and policies without a config so the loser gets one object in before conflicting.
  • automation.IsNotFound matches a fixed list of generated Delete*NotFound types: the pinned edge-api (v0.26.48) generates no Code() accessor, so there is no status to test. A new delete path in the package adds its type to the list, or its not-found will propagate as a failure.
  • The generated edge-api errors format their payload as pointers (createServiceBadRequest &{Error:0x...}), so every manager call site wraps through wrapEdgeError, which unwraps the APIErrorEnvelope into ziti <code>: <message> (cause: ...) at the manager boundary. It wraps rather than replaces: IsNotFound and callers' errors.As match the generated type, so it has to stay in the chain. A new edge-api call in the package uses the helper, or its failures log without Ziti's message.
  • The shadow analyzer is deliberately not in the vet gate: 163 findings tree-wide on main, nearly all the ordinary if err := f(); err != nil idiom. The share handler's lost allocation error is guarded by the restructure (no := of err inside the mode switch) and the handler tests.
  • sessionCache.get skips the CA fetch for a plain http:// endpoint, which is what lets controller handler tests use zitifake through the production NewZitiAutomation. The session tests now run against a TLS fake (zitifake.NewTLSWithCredentials) so their CA-fetch assertions still cover the https path.

Journal 2026 09 29 (`docs/journal/2026-09-29.md`)

2026-09-29

  • Environment teardown (disableEnvironment, admin deleteIdentity) treats an already-deleted identity as deleted; anything else, a typed 401 included, still fails the request so the transaction rolls back and the rows survive for a retry. The identity is deleted by the ID the store records, so zitifake.SeedWithID exists to place one at an environment's ZId.
  • The handler test for "other failures still fail" rejects every operation, so its 401 surfaces at the edge router policy listing before the identity delete is reached; the guard's own refusal of a 401 rests on automation.IsNotFound matching only the generated Delete*NotFound types.
  • Share teardown is one routine, teardownShare; nothing else deletes a share row. A new share-deleting path calls it rather than composing store deletes, or it leaves names severed and frontend_mappings rows behind (the disable-path defect: a live mapping on a deleted share blocks the name forever through the unique index).
  • Frontend mapping updates are returned as pendingMappingUpdate and published by the handler after commit, never from inside a transaction; the dynamic proxy controller no longer writes rows, only Publishes. A failed publish is logged and left to the frontends' reconciliation, not returned, since the rows are already committed. As of this step that reconciliation is only the frontend's higher-id pull, which recovers a lost bind but never a lost unbind; the unbind side is step 9's. Handlers publish through the mappingPub seam, set only when the dynamic proxy controller is configured; tests install a recording publisher whose store read times out while the publishing transaction is open (sqlite store has one connection), which is how "after commit" is asserted.
  • Ziti cleanup is the last step of the teardown so a Ziti failure rolls back with the store intact. TestDisableOtherFailuresStillFail now meets its 401 at the share's CleanupByTag, before the edge router policy listing named above.
  • removeFrontendsForEnvironment now fails the disable on a frontend policy delete failure instead of logging it, so no step of environment teardown logs and continues. A blanket RejectOperations cannot tell this apart from the later edge router policy failure (both answer 500), so TestDisableFrontendFailureRollsBack uses an environment with a frontend and no share and asserts the frontend's error in the log.
  • The dynamic frontend's AMQP subscriber never requeues (step 9). Its queue is exclusive and auto-deleted per process, so requeue can only hand a message back to the same handler; a malformed one looped forever. Unparseable and unknown-operation messages are nacked without requeue, a full handoff channel still acks; a lost message is the reconciliation's to recover. Don't reintroduce requeue "for reliability".
  • The full reconciliation holds back the first empty set over a non-empty map (one empty answer for a busy frontend is more likely an unseen failure, and applying it would black-hole the frontend) and applies the second consecutive one, so a frontend whose last mappings really were removed clears them within two intervals. A non-empty set or a failed pull in between resets the count (emptyPulls). Both halves are deliberate: the first empty set is not to be applied, and the second is not to be refused.
  • The delta pull (refresh, id above the highest held) learns every row with a higher id, which includes a replacement (a name deleted and re-inserted gets a higher id), but never a deletion; that is by design and pinned by TestRefreshOnlyAdds. Removals come from unbinds and the reconciliation. mapping_reconcile_interval and mapping_refresh_interval are independent.
  • The dynamic proxy subscriber dials like the metrics AMQP source: DialConfig with a net.Dialer.DialContext on the shutdown context, a context.AfterFunc that closes the socket on shutdown, and a 10s deadline on the handshake and again on queue setup. The AfterFunc is the part that matters for a broker that accepts and never answers; the dial context alone does not interrupt a handshake already under way. disconnect stops the AfterFunc so reconnects don't accumulate them.

Journal 2026 10 02 (`docs/journal/2026-10-02.md`)

2026-10-02

  • zrok2 admin gc decides ownership by the zrokShareToken tag and never by name. v2 policy names lead with the environment ZId (<envZId>-<shrZId>-bind, <envZId>-<token>-serp, <feToken>-<envZId>-<shrZId>-dial), so any name parsing marks every live share's policies orphaned; that is how the old gc stripped a live private share on dev. An object with no share token is not gc's (agent-remote, frontend, dynamic proxy controller objects) and is counted, never deleted.
  • A ziti list with limit zero returns the default page of ten, not everything. automation.FindAll pages at MaxPageSize (500). GetByName and GetByID still send a zero limit, which is harmless for name and id lookups. The fake now pages the same way, so a test seeding more than ten objects of a kind and reading them through a zero-limit Find sees ten.
  • DeleteWithFilter (and so CleanupByTag, the Ziti step of teardownShare) now lists through FindAll before deleting; before step 12 it read one page of ten, so a share with more than ten objects of one kind was torn down with the rest left behind. It must list everything first: deleting while paging by offset shifts later objects into pages already read.
  • gc deletes policies and configs before services so that a failure part-way never leaves a policy or config pointing at a deleted service; a leftover service with no policies is harmless and the next run takes it.
  • gc reads the live share set before listing Ziti, and the age guard is what covers a share whose objects exist before its row commits. Don't reorder the two reads or default --min-age to zero.
  • Step 6 (relax for v2 public shares): frontend_selection is v1's column; v2 never writes it. A public share's desired dial policy comes from its live name mappings (namespace frontends), never from the share row; the row's selection is consulted only when there are no live mappings. Relax and admin repair-dial-policies share desiredDialPolicies, so a new policy kind added at create time needs adding there or both will miss it.
  • admin repair-dial-policies must honour the bandwidth limit journal or it un-limits limited accounts: limitAction deletes dial policies and nothing else, so "missing dial policy" is exactly what a limited share looks like. It treats a limit entry whose limit class has no backend mode as whole-account limited, which is stricter than relaxAction's limitedBackends (that map ignores unscoped classes); deliberate.
  • influxReader.runQueryForRxTx checks result.Err() after iterating. Without it, a deadline hit while reading the result ended Next() early and returned zero usage with no error, which relax reads as "under the limit".
  • The relax fixture's "bad" share now fails through zitifake.RejectCreates on its dial policy name; a public share with no mappings and no selection now relaxes successfully, so it can no longer stand in for a failing share.
  • A v1-shaped share whose frontend_selection names no live frontend is a per-share relax failure (missingPublicFrontendError, journal retained, cycle continues), not a store failure: a no-rows lookup aborts no PostgreSQL transaction, so ending the cycle for it stalled every account behind it. Any other lookup error stays a store failure. admin repair-dial-policies treats it the same way: the share is listed under failed shares with the frontend it selects, counted in failed (so the run exits non-zero), and the run continues; its access policies are not checked in that run, since the derivation stops at the error.
  • Step 1a: a Ziti 429 is recognised in sessionTransport.RoundTrip by status code, not through the 75 generated *TooManyRequests types (the pinned edge-api has no status accessor); the authenticate 429 is the one generated type matched, because authentication bypasses the session transport. Don't add per-operation type checks.
  • There is deliberately no retry or concurrency cap on a 429 (shelved: operations reported none since 2.0.5/2.0.6). zrok.ziti.rate_limited is what would reopen that; the handlers answer 503 with a fixed Retry-After: 5 instead.
  • The 503 responders exist because specs/src/share.yml and environment.yml declare them; rest_server_zrok, rest_client_zrok, specs/zrok.yml and the sdk clients are outputs of bin/generate_rest.sh. The tree reproduces exactly with go-swagger v0.33.2 and openapi-generator-cli 7.14.0; v0.33.1 adds a header comment to every file, v0.34+ rewrite comment style and swag imports across ~450 files.
  • enable now compensates like share and access: identity and edge router policy are recorded by id after each create and deleted unless the commit succeeds. Its enroll seam exists because Identities.Enroll performs a real enrollment against the JWT's issuer, which the fake cannot serve; tests replace it, so enrollment itself is untested here. The fake now accepts identity and edge router policy creates (it used to answer 405).
  • newZitiCompensation takes a subject (compensatingShare, compensatingAccess, compensatingEnvironment) and a name for the log: the share token, the frontend token, the identity name. A new compensating path picks or adds a subject rather than reusing "share".
  • bin/generate_rest.sh refuses to run unless swagger is v0.33.2 and openapi-generator-cli is 7.14.0; anything else rewrites hundreds of generated files the spec change didn't touch. With no Java, a wrapper script named openapi-generator-cli that runs the openapitools/openapi-generator-cli:v7.14.0 image (with --user $(id -u):$(id -g) and the repo mounted at its own path) satisfies it.

Journal 2026 10 05 (`docs/journal/2026-10-05.md`)

2026-10-05

  • Step 11: the share-create availability check now ignores dead mappings, and that switch cannot be separated from soft-deleting them. share_name_mappings has a partial unique index on name_id where not deleted, so a check that merely skips dead rows lets the request reach the mapping insert and turns the old 409 into a 500. healSeveredName does both in one routine for share create, createShareName and deleteShareName; a new name path calls it rather than querying mappings itself.
  • healSeveredName is a repair, not a teardown. It must not grow OpenZiti calls or share-row deletes; anything that removes a share goes through teardownShare. It checks everything before modifying anything, so a conflict leaves the rows as they were even without the rollback.
  • A frontend mapping whose share token matches no share row at all counts as a live holder (inherited from the old healStaleFrontendMappings), not as severed. That is why TestShareFailedFrontendMappingInsertFailsRequest no longer seeds an other-token row to make the insert fail: the check now answers that row with a 409 before the insert. The test makes the insert fail with a sqlite trigger instead.
  • createShareName creates the name before calling healSeveredName, so the routine always receives a real name row; the new name has no share mappings, so only the frontend half does anything there, and a conflict rolls the name back.
  • The auto-allocated branch of processNameSelections (no name given) does no healing, deliberately: its name is the fresh share token, so nothing can be severed on it. Its only change is that the not-granted refusal is now a typed conflict.
  • healSeveredName returns one unbind per frontend mapping it removes (frontend token and name, like teardownShare). Share create puts them ahead of its binds in the one post-commit list. That order is what keeps the new share mapped, because unbind is by name only on the frontend (endpoints/dynamicProxy/mappings.go). An unbind published after the bind for the same name drops the new share's mapping. The name handlers publish their unbinds after their own commit.
  • processNameSelections returns *nameSelectionConflict for the user-caused cases and a plain error otherwise; the share handler answers 409 only for the typed one (errors.As) and 500 for the rest. No-rows on the namespace or name lookup counts as user-caused (a 409, as before); a new user-facing refusal in that function must use the typed conflict, or it turns into a 500.

Journal 2026 10 06 (`docs/journal/2026-10-06.md`)

2026-10-06

  • Step 13: the name repair is the admin repair-names command, never a startup migration. A migration runs unattended at controller start, as one unbatched transaction against production PostgreSQL, with no dry run to review first. The sweep needs a reviewed dry run and small batches, and it repairs past data rather than changing the schema, so it runs when operations choose.
  • FindFrontendMappingByFrontendTokenAndNameWithShareState decides share state with exists over every share row carrying the token (live if any is live), not a left join. shares_token_idx is unique only where not deleted, and private shares take user-chosen tokens, so a deleted and a live row can share a token; the old join returned an arbitrary one, and healSeveredName could remove a live share's frontend mapping. Any new query that maps a share token to share state needs the same shape.
  • The three admin repair commands open the store through openAdminStore, which forces DisableAutoMigration on a copy of the config. A dry run must not change the schema either, and an operator running a newer binary against production would otherwise migrate it as a side effect. There is no schema check: a command fails only when a query hits a missing table or column. repair-names fails at once on a pre-v2 store; gc reads only shares, so it can run to completion against a behind store, which is harmless since it changes no rows there.

Journal 2026 10 07 (`docs/journal/2026-10-07.md`)

2026-10-07

  • Step 13 return. The production snapshot survey found 41,982 severed name mappings and 43,834 stale frontend mappings (the existing conditions), plus 11,371 live access frontends of deleted shares, 235 live names of deleted accounts, 38 live shares in deleted environments, 47 live environments of deleted accounts, and 3 unmapped allocated names. repair-store gained conditions A to D for those, run before the mapping conditions.
  • Condition A is store-side only and leaves OpenZiti to gc. It calls releaseShareFromStore, the store half split out of teardownShare, so there is still one teardown routine and no second copy in the sweep. Once the share row is deleted its token is no longer live, and gc collects the share's objects on its next run. Boundary: the sweep is store-side by decision, and gc covers the shares' objects. The operator vetoed terminus's blocking zrok-one-teardown-routine finding (use teardownShare in the sweep) on that basis, so don't reopen it. gc does not collect the environments' identities and edge router policies. The apply report lists those identities for zrok2 admin delete identity; they are a known remainder, not an oversight.
  • releaseAccountNames fails the account delete only on a mapping to a live share. A severed mapping, to a share already deleted, is released with its name. Failing on any live mapping would have blocked deleting every account that still holds a severed name until repair-store runs.
  • Condition D also matches a name its owner un-reserved through updateShareName while no share held it. The sweep releases those too; the 3 production rows may be that path rather than a leak.
  • The command was renamed admin repair-names to admin repair-store (controller/repairStore.go) once it began deleting share and environment rows; the 2026-10-06 entry uses the old name. The report's condition names were kept.
  • Small controller stage: a service policy's dial or bind type is read from the listed policy's Type (ServicePolicies.DeleteByTagAndType), never put in the filter. Ziti 1.x accepts type=1/type=2, but 2.x matches nothing with it and returns no error, so a typed filter silently deletes nothing on 2.x while every 1.x test passes. The fake reproduces this with IntegerTypeMatchesNothing; policy-selection tests loop over zitifake.Generations. unaccess.go carried a sixth such filter, not in the brief's list of five, and was converted with them.
  • Client stage: the share and access commands' exit status is a contract for supervisors. 2 means the controller refused (a 4xx other than 429) and a retry cannot help; 1 means anything else, including failures that are not a controller answer (local validation, a missing Caddyfile), which are left at 1 by decision rather than classified one by one. The CLI never sleeps or retries to slow a supervisor; the agent's retry manager is the one thing that paces, and the CLI's permanent message points there. classifyFailure (cmd/zrok2/failure.go) is the one place that decides; a new generated 503 type needs adding to its retryAfterSeconds.
  • A caddy backend's Run returns once caddy has started, so the share commands call it inline and treat its error as a failure to start (share deleted, then exit); the Ziti-listener backends' Run serves until Stop, so they stay in a goroutine and an error after Stop is not reported.
  • disable keeps the local environment and identity on every failure, a 401 included, by operator decision on the follow-up. A revoked account token answers 401 just as an environment the controller has forgotten does, and the client cannot tell them apart, so deleting on 401 could strand a live environment. The user removes ~/.zrok2 by hand when they know the environment is gone; the message says so.

Journal 2026 10 08 (`docs/journal/2026-10-08.md`)

2026-10-08

  • The admin name lookup reads its share token from the live share-name mapping, so its answer agrees with the names list and the name availability check after a share is torn down.

Attic V0.2 Account Requests (`website/docs/_attic/v0.2_account_requests.md`)

Account Request Process

In v0.1

The v0.1 versions of zrok had an open-access zrok create account that allows any user to create an account. Useful for closed development environments only.

In v0.2

  • The zrok create account command now only takes an email address.
  • The email address is submitted to an open-ended API endpoint, which then records an "account request", allocating a request token.
  • An email is sent to the address offering a link with the request token, allowing the user to create the account.
  • The account request is marked complete.

Invitations for Others

This open zrok create account command will allow any user to send a zrok invitation to any user with a valid email address.

Garbage Collection

An background garbage collector in the controller scans the account requests, looking for unused requests, which are removed after a configurable amount of time.


Attic V0.4 Limits (`website/docs/_attic/v0.4_limits.md`)

Testing the Limits

Consider the following zrok controller configuration stanza, describing the limits we'll be using for this testing scenario:

yaml
limits:
  environments:     -1
  shares:           -1
  bandwidth:
    per_account:
      period:       5m
      warning:
        rx:         -1
        tx:         -1
        total:      -1
      limit:
        rx:         -1
        tx:         -1
        total:      -1
    per_environment:
      period:       5m
      warning:
        rx:         -1
        tx:         -1
        total:      -1
      limit:
        rx:         -1
        tx:         -1
        total:      -1
    per_share:
      period:       5m
      warning:
        rx:         -1
        tx:         -1
        total:      1048576
      limit:
        rx:         -1
        tx:         -1
        total:      2097152
  enforcing:        true
  cycle:            1m

Any limit values set to -1 are "unlimited". In this case, we're only enforcing a transfer limit on for shares. This limits configuration will send a warning when a share has transferred more than 1 megabyte in a 5 minute period, and will temporarily deactivate the share when it has transferred more than 2 megabytes in a 5 minute period.

We're going to use the zrok test loop public framework to create a number of public shares and generate traffic. Here are the parameters we'll be using:

text
$ zrok test loop public -l 7 -i 10000 --min-pacing-ms 100 --max-pacing-ms 1500

This configuration will create 7 shares. Each share will perform 10,000 iterations. The delay between iterations will be randomly generated with a floor of 100ms and a ceiling of 1500ms.

Let's look at the zrok controller log for this run:

First, our zrok test loop public command will create the 7 shares:

text
/* Detailed source-code truncated for AI context efficiency. */

Next, we observe metrics being reported from OpenZiti into the zrok metrics infrastructure for each of the 7 shares:

text
/* Detailed source-code truncated for AI context efficiency. */

Our first share receives a bandwidth warning, after transferring more than 1 megabyte:

text
[ 105.189]    INFO zrok/controller/limits.(*shareWarningAction).HandleShare: warning 'tr7vpyrzvmh0'
[ 106.192]    INFO zrok/controller/limits.sendLimitWarningEmail: limit warning email sent to '[email protected]'
[ 110.162]    INFO zrok/controller/metrics.(*influxWriter).Handle: share: 53z6mz4re7tu, circuit: ONzzjVS0w backend {rx: 30.6 kB, tx: 30.9 kB} frontend {rx: 30.9 kB, tx: 30.6 kB}
[ 110.165]    INFO zrok/controller/metrics.(*influxWriter).Handle: share: dh3f3jj7zhig, circuit: fNXXHVSuw backend {rx: 42.9 kB, tx: 43.3 kB} frontend {rx: 43.3 kB, tx: 42.9 kB}
[ 110.170]    INFO zrok/controller/metrics.(*influxWriter).Handle: share: 0evcupz5k410, circuit: cNzzH4i0w backend {rx: 31.5 kB, tx: 31.7 kB} frontend {rx: 31.7 kB, tx: 31.5 kB}
[ 115.163]    INFO zrok/controller/metrics.(*influxWriter).Handle: share: 7u9szn30ikh0, circuit: iNzXj4S0r backend {rx: 45.3 kB, tx: 45.7 kB} frontend {rx: 45.7 kB, tx: 45.3 kB}
[ 115.164]    INFO zrok/controller/metrics.(*influxWriter).Handle: share: tr7vpyrzvmh0, circuit: MZXXjVi0w backend {rx: 36.4 kB, tx: 36.8 kB} frontend {rx: 36.8 kB, tx: 36.4 kB}
[ 115.166]    INFO zrok/controller/metrics.(*influxWriter).Handle: share: s0uzz1p7xjrr, circuit: RZzXHVSuw backend {rx: 46.5 kB, tx: 46.9 kB} frontend {rx: 46.9 kB, tx: 46.5 kB}
[ 115.170]    INFO zrok/controller/metrics.(*influxWriter).Handle: share: dh3f3jj7zhig, circuit: fNXXHVSuw backend {rx: 63.9 kB, tx: 64.4 kB} frontend {rx: 64.4 kB, tx: 63.9 kB}

More shares start receiving bandwidth warnings:

text
/* Detailed source-code truncated for AI context efficiency. */

Our first share crosses the 2 megabyte boundary and the system limits its ability to transfer additional data by removing its dial service policy:

text
/* Detailed source-code truncated for AI context efficiency. */

More shares become limited and are prevented from transferring data. Notice the metrics output reducing in the logs. As more shares become limited, we're naturally seeing less data transfer occurring on the OpenZiti network:

text
/* Detailed source-code truncated for AI context efficiency. */

By this point, we're seeing very little traffic on the OpenZiti network:

text
[ 290.176]    INFO zrok/controller/limits.(*shareLimitAction).HandleShare: limiting '8k6dnu7x7ag0'
[ 290.190]    INFO zrok/controller/zrokEdgeSdk.DeleteServicePolicy: deleted service policy '5UHCkXZabFHeWYHmF01Zoc' for environment 'd.wJYlpt9'
[ 290.191]    INFO zrok/controller/limits.(*shareLimitAction).HandleShare: removed dial service policy for '8k6dnu7x7ag0'
[ 295.163]    INFO zrok/controller/metrics.(*influxWriter).Handle: share: 7u9szn30ikh0, circuit: iNzXj4S0r backend {rx: 44.0 kB, tx: 44.4 kB} frontend {rx: 44.4 kB, tx: 44.0 kB}
[ 295.178]    INFO zrok/controller/limits.(*shareLimitAction).HandleShare: limiting '7u9szn30ikh0'
[ 295.181]    INFO zrok/controller/zrokEdgeSdk.DeleteServicePolicy: deleted service policy '3dBtc3v2G70aqqDSqujQOy' for environment 'd.wJYlpt9'
[ 295.181]    INFO zrok/controller/limits.(*shareLimitAction).HandleShare: removed dial service policy for '7u9szn30ikh0'

Notice the timestamps on the log messages. There have been no metrics messages for 60 seconds.

The limits agent runs a periodic process to look for limited resources to re-enable. It produces messages like this when there are no resources to re-enable:

text
[ 355.183]    INFO zrok/controller/limits.(*Agent).relax: relaxing
[ 355.188]    INFO zrok/controller/limits.(*Agent).relax: share 'dh3f3jj7zhig' still over limit
[ 355.192]    INFO zrok/controller/limits.(*Agent).relax: share '0evcupz5k410' still over limit
[ 355.196]    INFO zrok/controller/limits.(*Agent).relax: share '53z6mz4re7tu' still over limit
[ 355.199]    INFO zrok/controller/limits.(*Agent).relax: share 's0uzz1p7xjrr' still over limit
[ 355.203]    INFO zrok/controller/limits.(*Agent).relax: share 'tr7vpyrzvmh0' still over limit
[ 355.207]    INFO zrok/controller/limits.(*Agent).relax: share '8k6dnu7x7ag0' still over limit
[ 355.220]    INFO zrok/controller/limits.(*Agent).relax: share '7u9szn30ikh0' still over limit
[ 415.223]    INFO zrok/controller/limits.(*Agent).relax: relaxing
[ 415.228]    INFO zrok/controller/limits.(*Agent).relax: share 'dh3f3jj7zhig' still over limit
[ 415.232]    INFO zrok/controller/limits.(*Agent).relax: share '0evcupz5k410' still over limit
[ 415.236]    INFO zrok/controller/limits.(*Agent).relax: share '53z6mz4re7tu' still over limit
[ 415.240]    INFO zrok/controller/limits.(*Agent).relax: share 's0uzz1p7xjrr' still over limit
[ 415.245]    INFO zrok/controller/limits.(*Agent).relax: share 'tr7vpyrzvmh0' still over limit
[ 415.250]    INFO zrok/controller/limits.(*Agent).relax: share '8k6dnu7x7ag0' still over limit
[ 415.253]    INFO zrok/controller/limits.(*Agent).relax: share '7u9szn30ikh0' still over limit

Enough time has finally passed that the agent is able to remove the restrictions on some of the services:

text
/* Detailed source-code truncated for AI context efficiency. */

And notice that we're now starting to see traffic on those shares again:

text
/* Detailed source-code truncated for AI context efficiency. */

Concepts Agent (`website/docs/concepts/agent.md`)


zrok agent overview

The zrok agent centralizes management of your zrok shares and accesses as a single persistent background process. It
provides both a web-based console and a CLI. When the agent is running, zrok2 share and zrok2 access commands
delegate to it automatically.

Centralized management

Without the agent running, each zrok2 share or zrok2 access command creates a separate process for each share or
access. When the agent is running:

  • All shares and accesses run under a single agent process.
  • The zrok2 share and zrok2 access commands delegate to the running agent automatically.
  • You can stop and restart individual shares or accesses without stopping the agent.

Restart behavior

The agent distinguishes between reserved and ephemeral shares when it restarts:

  • Named shares started with zrok2 share public -n <namespace>:<name> or zrok2 share private --share-token <name> are automatically restarted by the agent.
  • Private accesses started with zrok2 access private are automatically restarted.
  • Ephemeral shares started without a name are not restarted—they exist only for the lifetime of the agent session.

Agent console

The agent provides a web-based console accessible with:

bash
zrok2 agent console

From the console, you can:

  • View the status of all active shares and accesses
  • Create new shares and accesses
  • Stop or restart existing shares and accesses
  • Monitor traffic and connection statistics

Concepts Environments (`website/docs/concepts/environments.md`)


Accounts and environments

zrok organizes access around two foundational concepts: your account on a zrok instance, and the environment you
create on each machine you use zrok from.

Instance and account

zrok is hosted software. You interact with a zrok instance, and your account on that instance is identified by a
username and password, which you use to sign in to the web console. Your account also has a secret token, which
you use to enable environments on your machines.

You create a new account with NetFoundry's zrok instance by subscribing at myzrok.io, or in a
self-hosted instance by running zrok2 invite or zrok2 admin create account.

Environment

Using your secret token, you use the zrok command line to enable an environment. An environment corresponds to a
single command-line user on a specific host system.

You create a new environment with zrok2 enable, which uses your secret token once to register the environment.
After that, the environment stays authorized until you explicitly disable it with zrok2 disable. Each machine you
use zrok from needs its own environment.


Concepts Namespaces (`website/docs/concepts/namespaces.md`)


Reserved names and namespaces

:::info[v2.0 feature]
This page describes the v2.0 namespace and name system. If you're migrating from v1.x, see the v2 migration
guide
for details on how this replaces the old zrok reserve workflow.
:::

By default, when you create a public or private share using zrok2 share, zrok assigns it a randomly generated share
token
. When you terminate the zrok2 share command, the share is deleted and the token is no longer valid. If you run
zrok2 share again, you'll receive a brand new share token.

In v2.0, zrok introduces a more powerful system for creating persistent shares through namespaces and names.

To create and manage reserved names, see Manage reserved names.

Understand namespaces and names

Namespaces

A namespace is a logical grouping for names, similar to how a DNS zone works. Think of it as a container that holds
related names. For example:

  • A public namespace might correspond to share.zrok.io
  • A custom namespace might correspond to your own domain like example.com

Namespaces can be:

  • Open: accessible to all users of the zrok service instance
  • Closed: requiring explicit grants for access

You can see available namespaces with:

bash
zrok2 list namespaces

Names

A name is a unique identifier within a namespace. Names can be:

  • Reserved: persistent across multiple runs of zrok2 share, similar to v1.x reserved shares
  • Ephemeral: temporary, deleted when the share terminates

Think of names as similar to DNS A records within a zone. For example, if you create a name api in the public
namespace (corresponding to share.zrok.io), your share is accessible at https://api.share.zrok.io.

Benefits of the namespace/name system

The v2.0 namespace and name system provides several advantages over v1.x reserved shares:

  • Flexibility: less coupling between environments and external names
  • Portability: easily move share backends between hosts without changing public names
  • Multiple names: use multiple names for the same share
  • Organization: logical grouping through namespaces
  • Custom domains: support for custom domain namespaces (when configured by administrators)

Concepts Personalized Frontend (`website/docs/concepts/personalized-frontend.md`)


Personalized frontend

This page describes how to use a hosted, shared zrok instance (zrok.io) with your own personalized frontend to get
custom DNS and TLS for your shares.

To do this, you need a minimal VPS instance or container hosting. The size depends on your workload, but for most
modest use cases the cheapest VPS option is sufficient.

This approach gives you complete control over how your shares are exposed publicly. It works for HTTPS shares and also
for TCP and UDP ports, letting you put all of these things on the public internet while maintaining strong security for
your protected resources.

This isn't a step-by-step how-to—it's a description of the overall concept. Figure out the specific steps to implement
this style of deployment in your own environment.

Overview

Imagine you have 3 different resources shared using zrok: A, B, and C. Both A and B use the proxy backend
mode to share private HTTPS resources. Share C uses the tcpTunnel backend to expose a listening port from a private
server (like a game server or a message queue).

You're using the shared zrok instance at zrok.io to provide your secure sharing infrastructure.

Your deployment looks like this:

You're creating reserved names in a namespace for the A, B, and C shares. These shares can be in a single
environment on a single host, or spread across completely different hosts anywhere in the world. You could use
significantly more than 3 shares, or fewer. The secure sharing fabric provides seamless, secure connectivity for all
of them. This implementation scales up or down as needed—use multiple hosts behind a load balancer for large workloads.

Because you're using private zrok shares, they need to be accessed using zrok2 access private. That command binds
a network listener where the share can be accessed on an address and port on the host where it runs. You can run
zrok2 access private to bind a listener for a share in as many places as you want (up to the service limit
configuration).

:::note
When you use zrok2 share public, your shared resources are accessible using the shared public frontend provided by
the service instance (zrok.io). zrok2 share private creates a private share that does not use the shared public
frontend—you need zrok2 access private to bind that share to a network address where it can be accessed.

In v2.0, you can create persistent private shares using the --share-token flag, which works similarly to reserved
names for public shares.
:::

Say you own the domain example.com and you want to expose your HTTPS shares A and B as a.example.com and
b.example.com. Your C share is a game server you want to expose as gaming.example.com:25565.

You can accomplish this with a cheap VPS (or container hosting). The VPS needs a public IP address and you need to
create DNS entries for example.com.

To do this, run 3 separate zrok2 access private commands on your VPS (see the
zrok agent how-to guides and the Linux agent service for
details on setting this up). One command each for shares A, B, and C. The command works like this:

text
$ zrok2 access private
Error: accepts 1 arg(s), received 0
Usage:
  zrok2 access private <shareToken> [flags]

Flags:
  -b, --bind string   The address to bind the private frontend (default "127.0.0.1:9191")
      --headless      Disable TUI and run headless
  -h, --help          help for private

Global Flags:
  -p, --panic     Panic instead of showing pretty errors
  -v, --verbose   Enable verbose logging

The --bind flag binds a network listener to a specific IP address and port on the host. Say your VPS has a public IP
of 1.2.3.4 and a loopback (127.0.0.1).

To expose your HTTPS shares, use a reverse proxy like nginx. The reverse proxy terminates TLS and reverse proxies
a.example.com and b.example.com to the network listeners for shares A and B.

Configure your VPS to persistently launch zrok2 access private for both shares. Use --bind to bind A to
127.0.0.1:9191 and B to 127.0.0.1:9192. Then configure nginx with a virtual host for a.example.com proxying
to 127.0.0.1:9191 and b.example.com proxying to 127.0.0.1:9192.

Exposing the TCP port for gaming.example.com is simply a matter of running a third zrok2 access private with
--bind 1.2.3.4:25565.

Once you've created the appropriate DNS entries and worked through TLS configuration (Let's Encrypt is your friend),
you'll have a fully functional personalized frontend for your zrok shares that you control.

Your protected resources remain disconnected from the internet and are only reachable through your personalized
endpoint.

Privacy

When you use a public frontend (with zrok2 share public) at a hosted zrok instance like zrok.io, the operators of
that service have some visibility into your traffic. The load balancers in front of the public frontend maintain logs
describing all URLs accessed, plus headers and other information about the resource you're sharing.

When you create private shares using zrok2 share private and run your own zrok2 access private from another
location, the operators of the zrok service instance only know that some amount of data moved between the environment
running zrok2 share private and the zrok2 access private. No other information is available.


Concepts Private Shares (`website/docs/concepts/private-shares.mdx`)


Private shares

zrok was built to share and access digital resources. A private share allows a resource to be accessed on another user's
system as if it were local to them. Only another zrok user who has your share token can access it. You're in control of
who can access your private shares by sharing the share token.

Peer-to-peer private resource sharing is one of the things that makes zrok unique.

zrok also provides public sharing of resources with non-zrok users. Public resource sharing is limited to resources
accessible over HTTP or HTTPS. Private sharing works with all resource types that zrok supports.

Peer-to-peer

Private shares are accessed using the zrok2 access command, and require the accessing user to have an account on the
same service instance that they've already enabled with zrok2 enable.

The private share is identified by a share token. The accessing user uses the share token with the zrok2 access
command to create a local endpoint on their system, letting them use the shared resource as if it were local.

zrok doesn't require you to open any firewall ports or otherwise compromise the security of your local system — no
attack surface is exposed to the public internet. As soon as you terminate the zrok2 share process, you immediately
terminate any possible access to your shared resource.

The shared resource can be a development web server, a webhook from a cloud server, or low-level TCP and UDP network
connections using the tunnel backend. What matters is that access is private and can only be used by other zrok users
who have your share token.

The peer-to-peer capabilities of zrok are an important property of the underlying
OpenZiti network that zrok uses to provide connectivity between
users and resources.

To create and manage private shares, see Manage shares with the agent.

Backend modes

Private shares support all backend modes. Public shares are limited to HTTP-based modes only. The modes exclusive to
private shares are:

  • tcpTunnel: Forwards raw TCP traffic to a target server
  • udpTunnel: Forwards raw UDP traffic to a target server
  • socks: Provides a SOCKS5 proxy, tunneling TCP traffic to its destination through the share

The default mode is proxy, which forwards requests to any HTTP or HTTPS URL reachable from your machine:

bash title="proxy example"
zrok2 share private 80

See Backend modes for the full list.


Concepts Public Shares (`website/docs/concepts/public-shares.mdx`)


Public shares

zrok supports public sharing for web-based (HTTP and HTTPS) resources. These resources are easily shared with the
general internet through public access points.

Peer-to-public

Public sharing is most useful when the person or service accessing your resources doesn't have zrok running locally and
can't make use of the private sharing mode. Many users share development web servers, webhooks, and other HTTP/HTTPS
resources.

As with private sharing, public sharing doesn't require you to open any firewall ports or otherwise compromise the
security of your local environment. A public share goes away as soon as you terminate the zrok2 share command.

To create and manage public shares, see Manage shares with the agent. For
persistent public shares with a stable URL, see Reserved names and namespaces.

Backend modes

Public shares support HTTP-based backend modes only:

  • proxy: Forwards incoming requests to any HTTP or HTTPS URL reachable from your machine
  • web: Serves a local directory as a browsable file index or static website
  • drive: Exposes a local directory over WebDAV for mounting as a network drive
  • caddy: Runs the built-in Caddy server using a Caddyfile you provide

The default mode is proxy, which forwards requests to any HTTP or HTTPS URL reachable from your machine:

bash title="proxy example"
zrok2 share public 80

See Backend modes for the full list.


Get Started Category .Json (`website/docs/get-started/_category_.json`)

{
"label": "Get started",
"position": 2,
"link": {
"type": "doc",
"id": "get-started/index"
}
}


Get Started Create Share (`website/docs/get-started/create-share.md`)


Step 4: Create your first share

In this step, you'll create a public share that exposes a local HTTP service to the internet. You'll see exactly how
the share works and what its limitations are before you move on to the agent.

  1. In one terminal, start zrok's built-in test endpoint:

    bash
    zrok2 test endpoint

    This starts a simple HTTP listener on port 9090—just a throwaway server to give zrok something to share.

  2. In another terminal, run:

    bash
    zrok2 share public 9090

    zrok assigns a public URL and displays it along with the share type and a live feed of incoming requests:

  3. Open that URL in a browser, or pass it to someone else—anyone with the link can reach your local service.

How shares work

zrok2 share public runs in the foreground. The share is active as long as the command is running. If you open the
API console, you'll see the share appear in the visualizer with sparkline graphs showing
live activity as the share is accessed:

When a share fails to start

If zrok2 share public (or share private, or access private) cannot start, it prints why and exits with a status
that says whether trying again can help. This matters when the command runs under a process supervisor such as systemd:

Exit status Meaning
0 The command finished normally.
1 A later retry may succeed: the zrok service could not be reached, was busy (it answers when to retry, for example the zrok service is busy, retry in 5 seconds), or failed. Also used for any failure that is not an answer from the zrok service.
2 The zrok service refused the request (for example, the name is already held by another share, or the account token is not valid). Retrying will not change the answer.

A supervisor should not restart the command on status 2; for example, a systemd unit can set
RestartPreventExitStatus=2. To have shares retried for you with backoff, run them through the
agent instead.

For more detail on a failure, add --verbose (-v) to print debug output. Debug output appears in headless mode
(--headless) only; the interactive display shows info-level output whether or not --verbose is given.

If the backend fails to start after the share was created (for example, a missing Caddyfile), the share is deleted
before the command exits, so the next attempt starts clean.

Stop the share

Press Ctrl+C or close the terminal. The share is torn down and the URL stops working. This is by design—zrok
shares are ephemeral by default.

This is a good way to understand how zrok works, but it's not the right approach for services you need to keep
running. That's what the agent is for.


Get Started Enable Env (`website/docs/get-started/enable-env.md`)


Step 3: Enable your environment

In this step, you'll enable a zrok environment on your machine using your account token. Enabling creates a secure
identity tied to your device so you can start creating shares.

Enable your environment

Run this command with your account token from Step 1:

bash
zrok2 enable <your_account_token>

After a few seconds, you'll see:

console
⣻  the zrok environment was successfully enabled...

Verify the environment

Confirm everything is set up correctly:

bash
zrok2 status

You should see output like this:

console
Config:

╭──────────────────┬────────────────────────┬────────╮
│ CONFIG           │ VALUE                  │ SOURCE │
├──────────────────┼────────────────────────┼────────┤
│ apiEndpoint      │ https://api-v2.zrok.io │ env    │
│ defaultNamespace │ public                 │ binary │
│ headless         │ false                  │ config │
│ superNetwork     │ false                  │ config │
╰──────────────────┴────────────────────────┴────────╯

Environment:

╭───────────────┬─────────╮
│ PROPERTY      │ VALUE   │
├───────────────┼─────────┤
│ Account Token │ <<SET>> │
│ EnvZId        │ <<SET>> │
╰───────────────┴─────────╯

Both Account Token and EnvZId should show <<SET>>. Your environment is ready.

:::note[Self-hosted API endpoint]
If you're using a self-hosted zrok instance, configure your API endpoint before enabling:

bash
zrok2 config set apiEndpoint https://your-zrok-instance.example.com

Your apiEndpoint value in zrok2 status will show your instance's URL instead of https://api-v2.zrok.io.
:::

Visualize your environment

If you open the API console, you'll see your new environment reflected in the
visualizer. The environment is named after your shell username and hostname. Click the environment node in the
explorer to see its details in the panel at the bottom of the page:

The visualizer supports clicking, dragging, and mouse wheel zooming. If you get lost, click the zoom-to-fit icon in
the lower-left corner of the explorer to reset the view.

:::note
With your zrok account, you can zrok2 enable multiple environments. This allows you to share (and access your
shares) from multiple environments simultaneously.
:::


Get Started Get Token (`website/docs/get-started/get-token.md`)


Step 1: Get an account token

In this step, you'll create a zrok account and get the account token you need to enable your environment.

myzrok.io (hosted)

  1. Go to myzrok.io and sign up for a free account.

  2. After signing in, click the zrok icon in the left sidebar to open the API console.

  3. Click the green CLICK HERE TO GET STARTED! button. The getting started wizard opens:

  4. Under step 2 of the wizard, copy and save your account token (a short alphanumeric string like 7g3K6gVKikWb).
    Treat it like a password: it authenticates your device to the zrok service.

Self-hosted instance

If you've deployed your own zrok instance, there are two ways to create an account:

  • Self-service — If your instance has invitations enabled, run zrok2 invite and follow the prompts to register
    with your email address. See Invitations for details.

  • Admin — An administrator can create an account directly:

    bash
    zrok2 admin create account <username> <password>

Either way, the result is an account token. Copy it for use in Step 3: Enable your environment.


Get Started Install Zrok2 (`website/docs/get-started/install-zrok2.mdx`)


import InstallCards from '@zrokroot/docs/how-tos/install/_install_cards.mdx';

Step 2: Install the `zrok2` command

In this step, you'll install the zrok2 command-line tool on your device.

:::note
zrok is not supported on mobile devices.
:::

Select your operating system below. Click GUIDE for step-by-step installation instructions, or use the
architecture links to download the binary directly. If you're not sure which to pick, use the guide.

Once you've confirmed the install works with zrok2 version, continue to Step 3.


Get Started Set Up Agent (`website/docs/get-started/set-up-agent.md`)


Step 5: Set up the agent

In this step, you'll set up the zrok agent—the recommended approach for always-on shares that need to survive
terminal sessions and system restarts.

Why use the agent?

The foreground zrok2 share command in Step 4 stops the moment you close the terminal. The zrok agent runs in the
background, manages all your shares and accesses as a single persistent process, and provides a web UI. When the agent
is running, zrok2 share and zrok2 access commands delegate to it automatically. For a full explanation, see
zrok agent overview.

Try the agent in the foreground

The foreground share from step 4 won't carry over to the agent—it started as its own process and the agent begins
fresh. You can leave it running or cancel it; either way, you'll create shares through the agent separately.

To try the agent before installing it as a service:

  1. Start the agent:

    bash
    zrok2 agent start
  2. In another terminal, open the agent console:

    bash
    zrok2 agent console

    This opens the agent UI in your browser. You can create and monitor shares from there, or continue using the
    CLI.

Install the agent as a background service

For reliable, always-on shares, install the agent as a system service:

:::note
A native macOS agent package is not yet available. macOS users can run zrok2 agent start in the foreground or use a
third-party process manager.
:::

For more detail on managing shares with the agent, see Manage shares with the agent.


How Tos Category .Json (`website/docs/how-tos/_category_.json`)

{
"label": "How-to guides",
"position": 3,
"link": {
"type": "generated-index",
"description": "Step-by-step guides for installing zrok, sharing resources, and using advanced features."
}
}


How Tos Linux Agent Install (`website/docs/how-tos/_linux-agent-install.mdx`)

  1. Set up zrok's Linux package repository by following the Linux install guide, or run this one-liner to complete the repo setup and install packages.

    bash
    curl -sSLf https://get.openziti.io/install.bash \
    | sudo bash -s zrok2-agent
  2. If you previously set up the repository by following the guide, then also install the zrok2-agent package. This package provides the systemd service.

    bash title="ubuntu, debian"
    sudo apt install zrok2-agent
    bash title="fedora, rocky"
    sudo dnf install zrok2-agent

Myzrok Category .Json (`website/docs/myzrok/_category_.json`)

{
"label": "myzrok",
"position": 6,
"link": {
"type": "generated-index",
"description": "Account management, service limits, and custom domains for the hosted myzrok.io service."
}
}


Myzrok Custom Domains (`website/docs/myzrok/custom-domains.md`)


title: Add a custom domain sidebar_position: 120

myzrok.io lets you use your own DNS name for zrok shares. For example, if you own foo.example.io,
you can create ephemeral shares like https://vw8jbg4ijz5g.foo.example.io or
reserved shares like https://toaster.foo.example.io.

Prerequisites

  • You must own the domain you want to use and have access to its DNS settings.
  • Custom domains require a Pro subscription with myzrok.io.

Add your domain

  1. Sign in to the myzrok console and click the globe icon in the left navigation to open the Custom Domains page:

  2. Click Create in the top right corner.

  3. Enter your domain name and click Create. zrok begins issuing a managed TLS certificate for your domain:

  4. Close the form. Return when your domain status changes to pending validation—this usually takes a few minutes.

Create DNS records

zrok needs two DNS records: a CNAME to validate domain ownership for certificate issuance, and an A record to route traffic.

  1. Create a CNAME record with the name and value shown in the form:

  2. Create an A record pointing your domain to the static IPs provided:

  3. Verify your records resolve correctly using the nslookup command shown in the form:

    text
    nslookup test.foo.example.io
    Server:        192.168.86.194
    Address:    192.168.86.194#53
    
    Non-authoritative answer:
    Name:    test.foo.example.io
    Address: 99.83.220.186
    Name:    test.foo.example.io
    Address: 52.223.6.108

    If the command returns the A-record IPs, DNS is resolving correctly.

  4. Close the form. zrok validates your records and issues the certificate within a few minutes.

Finalize your domain

Within 72 hours of certificate issuance, click Finalize to complete setup:

myzrok.io will finish the final steps automatically—this takes about a minute.

Start sharing

To create shares that use your custom domain, specify the --frontend flag:

bash
zrok2 share public --frontend foo-example--goPIhgtJtz

To set it as the default for your environment:

bash
zrok2 config set defaultNamespace foo-example--goPIhgtJtz

To confirm the active frontend, run zrok2 status:


Myzrok Service Limits (`website/docs/myzrok/service-limits.md`)


title: Service limits

NetFoundry's public zrok instance implements limits based on pricing tier, as well as rate limits to protect the service for all users.

Limits on shares, environments, or bandwidth

The number of shares, environments, or allowed bandwidth is based on your myzrok subscription.
These limits are defined on the zrok pricing page.
Bandwidth limits are based on a rolling 24-hour window.

:::warning
If you exceed the daily bandwidth of your plan, any running shares are disabled and the zrok API prevents new shares
from being created until bandwidth falls below the 24-hour limit.
:::

Rate limits for public shares

Public shares are subject to API rate limiting by IP address and by individual share token, to protect the zrok service
so that one user doesn't negatively impact others.

Scope Requests per 300 seconds Average
Per IP address 2,000 6.66 req/sec
Per share (any number of IPs) 7,500 25 req/sec

The rate limiter allows bursts up to the limit within a shorter timespan. Once exceeded, new requests are blocked until
the rate falls below the 300-second window threshold.


Myzrok Upgrading (`website/docs/myzrok/upgrading.md`)


title: Upgrade from 0.4 to 1.0

This guide is for users migrating from 0.4 to an older 1.x release.

:::note

  • For the latest zrok version, see Install zrok.
  • As of zrok 1.0.2, the rebase is automatic and the configuration updates to the v1 API with no action required.
    :::

Rebase your environment

If you're running version 1.0.0 or 1.0.1, rebase your environment to use the new versioned API:

shell
zrok rebase apiEndpoint https://api-v1.zrok.io

You can now resume normal zrok API interactions.

Troubleshoot after upgrade

If you run into issues, first verify your zrok version:

shell
zrok version

Then review your configuration. If you're running version 1.0 or later, apiEndpoint should be https://api-v1.zrok.io:

shell
zrok status

If you're still having issues, visit the zrok discourse forum.

Reset your environment

If you prefer to reset your environment from scratch:

:::warning
Running zrok disable deletes any running environments and shares, and releases any reserved shares.
:::

  1. Disable your current environment:

    shell
    zrok disable
  2. Reset the API endpoint to the default:

    shell
    zrok config unset apiEndpoint
  3. Create a fresh environment:

    shell
    zrok enable <your account token>

Self Hosting Category .Json (`website/docs/self-hosting/_category_.json`)

{
"label": "Self-hosting",
"position": 5,
"link": {
"type": "generated-index",
"description": "Deploy and operate your own zrok instance on Linux, Docker, or Kubernetes. These guides cover configuration, OAuth authentication, metrics and limits, organizations, and user management."
}
}


Self Hosting Instance Configuration (`website/docs/self-hosting/instance-configuration.mdx`)


Use another zrok instance

:::note
This guide is relevant if you're self-hosting or using a friend's zrok instance instead of using zrok-as-a-service from
zrok.io.
:::

The zrok command on your computer uses a zrok instance over the network.

The default API endpoint for the zrok command is api-v2.zrok.io. To point to a different instance:

bash
zrok2 config set apiEndpoint https://zrok.example.com
buttonless title="output"
[WARNING]: unable to open environment metadata; ignoring

zrok configuration updated

:::note
The WARNING about environment metadata is expected when you run zrok2 config set before zrok2 enable.
:::

Use zrok2 status to inspect the state of your local environment. In zrok, an environment is each shell where
you install and enable a copy of zrok.

bash
zrok2 status
buttonless title="output"
Config:

 CONFIG       VALUE                      SOURCE
 apiEndpoint  https://zrok.mydomain.com  config

[WARNING]: Unable to load your local environment!

To create a local environment use the zrok2 enable command.

The zrok2 status command shows the API endpoint your environment is using and the SOURCE where the value was
retrieved. Here, config means the value was set with the zrok2 config command.


Sdk Python Src Docs Access201Response (`sdk/python/src/docs/Access201Response.md`)

Access201Response

Properties

Name Type Description Notes
frontend_token str [optional]
backend_mode str [optional]

Example

python
from zrok_api.models.access201_response import Access201Response

# TODO update the JSON string below
json = "{}"
# create an instance of Access201Response from a JSON string
access201_response_instance = Access201Response.from_json(json)
# print the JSON string representation of the object
print(Access201Response.to_json())

# convert the object into a dict
access201_response_dict = access201_response_instance.to_dict()
# create an instance of Access201Response from a dict
access201_response_from_dict = Access201Response.from_dict(access201_response_dict)

[Back to Model list] [Back to API list] [Back to README]


Sdk Python Src Docs AccessRequest (`sdk/python/src/docs/AccessRequest.md`)

AccessRequest

Properties

Name Type Description Notes
env_zid str [optional]
share_token str [optional]
bind_address str [optional]
description str [optional]

Example

python
from zrok_api.models.access_request import AccessRequest

# TODO update the JSON string below
json = "{}"
# create an instance of AccessRequest from a JSON string
access_request_instance = AccessRequest.from_json(json)
# print the JSON string representation of the object
print(AccessRequest.to_json())

# convert the object into a dict
access_request_dict = access_request_instance.to_dict()
# create an instance of AccessRequest from a dict
access_request_from_dict = AccessRequest.from_dict(access_request_dict)

[Back to Model list] [Back to API list] [Back to README]


Sdk Python Src Docs AccessSummary (`sdk/python/src/docs/AccessSummary.md`)

AccessSummary

Properties

Name Type Description Notes
id int [optional]
frontend_token str [optional]
env_zid str [optional]
share_token str [optional]
backend_mode str [optional]
bind_address str [optional]
description str [optional]
limited bool [optional]
created_at int [optional]
updated_at int [optional]

Example

python
from zrok_api.models.access_summary import AccessSummary

# TODO update the JSON string below
json = "{}"
# create an instance of AccessSummary from a JSON string
access_summary_instance = AccessSummary.from_json(json)
# print the JSON string representation of the object
print(AccessSummary.to_json())

# convert the object into a dict
access_summary_dict = access_summary_instance.to_dict()
# create an instance of AccessSummary from a dict
access_summary_from_dict = AccessSummary.from_dict(access_summary_dict)

[Back to Model list] [Back to API list] [Back to README]


Sdk Python Src Docs AccessesList (`sdk/python/src/docs/AccessesList.md`)

AccessesList

Properties

Name Type Description Notes
accesses List[AccessSummary] [optional]

Example

python
from zrok_api.models.accesses_list import AccessesList

# TODO update the JSON string below
json = "{}"
# create an instance of AccessesList from a JSON string
accesses_list_instance = AccessesList.from_json(json)
# print the JSON string representation of the object
print(AccessesList.to_json())

# convert the object into a dict
accesses_list_dict = accesses_list_instance.to_dict()
# create an instance of AccessesList from a dict
accesses_list_from_dict = AccessesList.from_dict(accesses_list_dict)

[Back to Model list] [Back to API list] [Back to README]


Sdk Python Src Docs AccountApi (`sdk/python/src/docs/AccountApi.md`)

zrok_api.AccountApi

All URIs are relative to /api/v2

Method HTTP request Description
change_password POST /changePassword
invite POST /invite
login POST /login
regenerate_account_token POST /regenerateAccountToken
register POST /register
reset_password POST /resetPassword
reset_password_request POST /resetPasswordRequest
verify POST /verify

**change_password**

change_password(body=body)

Example

  • Api Key Authentication (key):
python
import zrok_api
from zrok_api.models.change_password_request import ChangePasswordRequest
from zrok_api.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to /api/v2
# See configuration.py for a list of all supported configuration parameters.
configuration = zrok_api.Configuration(
    host = "/api/v2"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure API key authorization: key
configuration.api_key['key'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['key'] = 'Bearer'

# Enter a context with an instance of the API client
with zrok_api.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = zrok_api.AccountApi(api_client)
    body = zrok_api.ChangePasswordRequest() # ChangePasswordRequest |  (optional)

    try:
        api_instance.change_password(body=body)
    except Exception as e:
        print("Exception when calling AccountApi->change_password: %s\n" % e)

Parameters

Name Type Description Notes
body ChangePasswordRequest [optional]

Return type

void (empty response body)

Authorization

key

HTTP request headers

  • Content-Type: application/zrok.v1+json
  • Accept: application/zrok.v1+json

HTTP response details

Status code Description Response headers
200 password changed -
400 password not changed -
401 unauthorized -
422 password validation failure -
500 internal server error -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

**invite**

invite(body=body)

Example

python
import zrok_api
from zrok_api.models.invite_request import InviteRequest
from zrok_api.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to /api/v2
# See configuration.py for a list of all supported configuration parameters.
configuration = zrok_api.Configuration(
    host = "/api/v2"
)


# Enter a context with an instance of the API client
with zrok_api.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = zrok_api.AccountApi(api_client)
    body = zrok_api.InviteRequest() # InviteRequest |  (optional)

    try:
        api_instance.invite(body=body)
    except Exception as e:
        print("Exception when calling AccountApi->invite: %s\n" % e)

Parameters

Name Type Description Notes
body InviteRequest [optional]

Return type

void (empty response body)

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/zrok.v1+json
  • Accept: application/zrok.v1+json

HTTP response details

Status code Description Response headers
201 invitation created -
400 invitation not created (already exists) -
401 unauthorized -
500 internal server error -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

**login**

str login(body=body)

Example

python
import zrok_api
from zrok_api.models.login_request import LoginRequest
from zrok_api.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to /api/v2
# See configuration.py for a list of all supported configuration parameters.
configuration = zrok_api.Configuration(
    host = "/api/v2"
)


# Enter a context with an instance of the API client
with zrok_api.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = zrok_api.AccountApi(api_client)
    body = zrok_api.LoginRequest() # LoginRequest |  (optional)

    try:
        api_response = api_instance.login(body=body)
        print("The response of AccountApi->login:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling AccountApi->login: %s\n" % e)

Parameters

Name Type Description Notes
body LoginRequest [optional]

Return type

str

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/zrok.v1+json
  • Accept: application/zrok.v1+json

HTTP response details

Status code Description Response headers
200 login successful -
401 invalid login -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

**regenerate_account_token**

RegenerateAccountToken200Response regenerate_account_token(body=body)

Example

  • Api Key Authentication (key):
text
/* Detailed source-code truncated for AI context efficiency. */

Parameters

Name Type Description Notes
body RegenerateAccountTokenRequest [optional]

Return type

RegenerateAccountToken200Response

Authorization

key

HTTP request headers

  • Content-Type: application/zrok.v1+json
  • Accept: application/zrok.v1+json

HTTP response details

Status code Description Response headers
200 regenerate account token -
404 account not found -
500 internal server error -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

**register**

RegenerateAccountToken200Response register(body=body)

Example

python
import zrok_api
from zrok_api.models.regenerate_account_token200_response import RegenerateAccountToken200Response
from zrok_api.models.register_request import RegisterRequest
from zrok_api.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to /api/v2
# See configuration.py for a list of all supported configuration parameters.
configuration = zrok_api.Configuration(
    host = "/api/v2"
)


# Enter a context with an instance of the API client
with zrok_api.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = zrok_api.AccountApi(api_client)
    body = zrok_api.RegisterRequest() # RegisterRequest |  (optional)

    try:
        api_response = api_instance.register(body=body)
        print("The response of AccountApi->register:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling AccountApi->register: %s\n" % e)

Parameters

Name Type Description Notes
body RegisterRequest [optional]

Return type

RegenerateAccountToken200Response

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/zrok.v1+json
  • Accept: application/zrok.v1+json

HTTP response details

Status code Description Response headers
200 account created -
404 request not found -
422 password validation failure -
500 internal server error -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

**reset_password**

reset_password(body=body)

Example

python
import zrok_api
from zrok_api.models.reset_password_request import ResetPasswordRequest
from zrok_api.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to /api/v2
# See configuration.py for a list of all supported configuration parameters.
configuration = zrok_api.Configuration(
    host = "/api/v2"
)


# Enter a context with an instance of the API client
with zrok_api.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = zrok_api.AccountApi(api_client)
    body = zrok_api.ResetPasswordRequest() # ResetPasswordRequest |  (optional)

    try:
        api_instance.reset_password(body=body)
    except Exception as e:
        print("Exception when calling AccountApi->reset_password: %s\n" % e)

Parameters

Name Type Description Notes
body ResetPasswordRequest [optional]

Return type

void (empty response body)

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/zrok.v1+json
  • Accept: application/zrok.v1+json

HTTP response details

Status code Description Response headers
200 password reset -
404 request not found -
422 password validation failure -
500 internal server error -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

**reset_password_request**

reset_password_request(body=body)

Example

python
import zrok_api
from zrok_api.models.regenerate_account_token_request import RegenerateAccountTokenRequest
from zrok_api.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to /api/v2
# See configuration.py for a list of all supported configuration parameters.
configuration = zrok_api.Configuration(
    host = "/api/v2"
)


# Enter a context with an instance of the API client
with zrok_api.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = zrok_api.AccountApi(api_client)
    body = zrok_api.RegenerateAccountTokenRequest() # RegenerateAccountTokenRequest |  (optional)

    try:
        api_instance.reset_password_request(body=body)
    except Exception as e:
        print("Exception when calling AccountApi->reset_password_request: %s\n" % e)

Parameters

Name Type Description Notes
body RegenerateAccountTokenRequest [optional]

Return type

void (empty response body)

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/zrok.v1+json
  • Accept: Not defined

HTTP response details

Status code Description Response headers
201 reset password request created -
400 reset password request not created -
500 internal server error -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

**verify**

Verify200Response verify(body=body)

Example

python
import zrok_api
from zrok_api.models.verify200_response import Verify200Response
from zrok_api.models.verify_request import VerifyRequest
from zrok_api.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to /api/v2
# See configuration.py for a list of all supported configuration parameters.
configuration = zrok_api.Configuration(
    host = "/api/v2"
)


# Enter a context with an instance of the API client
with zrok_api.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = zrok_api.AccountApi(api_client)
    body = zrok_api.VerifyRequest() # VerifyRequest |  (optional)

    try:
        api_response = api_instance.verify(body=body)
        print("The response of AccountApi->verify:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling AccountApi->verify: %s\n" % e)

Parameters

Name Type Description Notes
body VerifyRequest [optional]

Return type

Verify200Response

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/zrok.v1+json
  • Accept: application/zrok.v1+json

HTTP response details

Status code Description Response headers
200 registration token ready -
404 registration token not found -
500 internal server error -

[Back to top] [Back to API list] [Back to Model list] [Back to README]


Sdk Python Src Docs AddFrontendGrantRequest (`sdk/python/src/docs/AddFrontendGrantRequest.md`)

AddFrontendGrantRequest

Properties

Name Type Description Notes
frontend_token str [optional]
email str [optional]

Example

python
from zrok_api.models.add_frontend_grant_request import AddFrontendGrantRequest

# TODO update the JSON string below
json = "{}"
# create an instance of AddFrontendGrantRequest from a JSON string
add_frontend_grant_request_instance = AddFrontendGrantRequest.from_json(json)
# print the JSON string representation of the object
print(AddFrontendGrantRequest.to_json())

# convert the object into a dict
add_frontend_grant_request_dict = add_frontend_grant_request_instance.to_dict()
# create an instance of AddFrontendGrantRequest from a dict
add_frontend_grant_request_from_dict = AddFrontendGrantRequest.from_dict(add_frontend_grant_request_dict)

[Back to Model list] [Back to API list] [Back to README]


Sdk Python Src Docs AddNamespaceFrontendMappingRequest (`sdk/python/src/docs/AddNamespaceFrontendMappingRequest.md`)

AddNamespaceFrontendMappingRequest

Properties

Name Type Description Notes
namespace_token str [optional]
frontend_token str [optional]
is_default bool [optional]

Example

python
from zrok_api.models.add_namespace_frontend_mapping_request import AddNamespaceFrontendMappingRequest

# TODO update the JSON string below
json = "{}"
# create an instance of AddNamespaceFrontendMappingRequest from a JSON string
add_namespace_frontend_mapping_request_instance = AddNamespaceFrontendMappingRequest.from_json(json)
# print the JSON string representation of the object
print(AddNamespaceFrontendMappingRequest.to_json())

# convert the object into a dict
add_namespace_frontend_mapping_request_dict = add_namespace_frontend_mapping_request_instance.to_dict()
# create an instance of AddNamespaceFrontendMappingRequest from a dict
add_namespace_frontend_mapping_request_from_dict = AddNamespaceFrontendMappingRequest.from_dict(add_namespace_frontend_mapping_request_dict)

[Back to Model list] [Back to API list] [Back to README]


Sdk Python Src Docs AddNamespaceGrantRequest (`sdk/python/src/docs/AddNamespaceGrantRequest.md`)

AddNamespaceGrantRequest

Properties

Name Type Description Notes
namespace_token str [optional]
email str [optional]

Example

python
from zrok_api.models.add_namespace_grant_request import AddNamespaceGrantRequest

# TODO update the JSON string below
json = "{}"
# create an instance of AddNamespaceGrantRequest from a JSON string
add_namespace_grant_request_instance = AddNamespaceGrantRequest.from_json(json)
# print the JSON string representation of the object
print(AddNamespaceGrantRequest.to_json())

# convert the object into a dict
add_namespace_grant_request_dict = add_namespace_grant_request_instance.to_dict()
# create an instance of AddNamespaceGrantRequest from a dict
add_namespace_grant_request_from_dict = AddNamespaceGrantRequest.from_dict(add_namespace_grant_request_dict)

[Back to Model list] [Back to API list] [Back to README]


Sdk Python Src Docs AddOrganizationMemberRequest (`sdk/python/src/docs/AddOrganizationMemberRequest.md`)

AddOrganizationMemberRequest

Properties

Name Type Description Notes
organization_token str [optional]
email str [optional]
admin bool [optional]

Example

python
from zrok_api.models.add_organization_member_request import AddOrganizationMemberRequest

# TODO update the JSON string below
json = "{}"
# create an instance of AddOrganizationMemberRequest from a JSON string
add_organization_member_request_instance = AddOrganizationMemberRequest.from_json(json)
# print the JSON string representation of the object
print(AddOrganizationMemberRequest.to_json())

# convert the object into a dict
add_organization_member_request_dict = add_organization_member_request_instance.to_dict()
# create an instance of AddOrganizationMemberRequest from a dict
add_organization_member_request_from_dict = AddOrganizationMemberRequest.from_dict(add_organization_member_request_dict)

[Back to Model list] [Back to API list] [Back to README]


Sdk Python Src Docs AdminApi (`sdk/python/src/docs/AdminApi.md`)

zrok_api.AdminApi

All URIs are relative to /api/v2

Method HTTP request Description
add_frontend_grant POST /frontend/grant
add_namespace_frontend_mapping POST /namespace/frontend/mapping
add_namespace_grant POST /namespace/grant
add_organization_member POST /organization/add
apply_limit_classes POST /applied-limit-class
create_account POST /account
create_frontend POST /frontend
create_identity POST /identity
create_namespace POST /namespace
create_organization POST /organization
delete_account DELETE /account
delete_frontend DELETE /frontend
delete_frontend_grant DELETE /frontend/grant
delete_identity DELETE /identity
delete_namespace DELETE /namespace
delete_organization DELETE /organization
get_name GET /name/{namespaceToken}/{name}
get_skip_interstitial_grant GET /skip-interstitial-grant
grant_skip_interstitial POST /skip-interstitial-grant
invite_token_generate POST /invite/token/generate
list_applied_limit_classes POST /applied-limit-class/list
list_frontend_namespace_mappings GET /frontend/namespace/mapping/{frontendToken}
list_frontends GET /frontends
list_limit_classes POST /limit-class/list
list_namespace_frontend_mappings GET /namespace/frontend/mapping/{namespaceToken}
list_namespaces GET /namespaces
list_organization_members POST /organization/list
list_organizations GET /organizations
remove_applied_limit_classes DELETE /applied-limit-class
remove_namespace_frontend_mapping DELETE /namespace/frontend/mapping
remove_namespace_grant DELETE /namespace/grant
remove_organization_member POST /organization/remove
revoke_skip_interstitial DELETE /skip-interstitial-grant
update_account_password PATCH /account
update_frontend PATCH /frontend
update_namespace PATCH /namespace

**add_frontend_grant**

add_frontend_grant(body=body)

Example

  • Api Key Authentication (key):
python
import zrok_api
from zrok_api.models.add_frontend_grant_request import AddFrontendGrantRequest
from zrok_api.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to /api/v2
# See configuration.py for a list of all supported configuration parameters.
configuration = zrok_api.Configuration(
    host = "/api/v2"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure API key authorization: key
configuration.api_key['key'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['key'] = 'Bearer'

# Enter a context with an instance of the API client
with zrok_api.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = zrok_api.AdminApi(api_client)
    body = zrok_api.AddFrontendGrantRequest() # AddFrontendGrantRequest |  (optional)

    try:
        api_instance.add_frontend_grant(body=body)
    except Exception as e:
        print("Exception when calling AdminApi->add_frontend_grant: %s\n" % e)

Parameters

Name Type Description Notes
body AddFrontendGrantRequest [optional]

Return type

void (empty response body)

Authorization

key

HTTP request headers

  • Content-Type: application/zrok.v1+json
  • Accept: application/zrok.v1+json

HTTP response details

Status code Description Response headers
200 ok -
401 unauthorized -
404 not found -
500 internal server error -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

**add_namespace_frontend_mapping**

add_namespace_frontend_mapping(body=body)

Example

  • Api Key Authentication (key):
python
import zrok_api
from zrok_api.models.add_namespace_frontend_mapping_request import AddNamespaceFrontendMappingRequest
from zrok_api.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to /api/v2
# See configuration.py for a list of all supported configuration parameters.
configuration = zrok_api.Configuration(
    host = "/api/v2"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure API key authorization: key
configuration.api_key['key'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['key'] = 'Bearer'

# Enter a context with an instance of the API client
with zrok_api.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = zrok_api.AdminApi(api_client)
    body = zrok_api.AddNamespaceFrontendMappingRequest() # AddNamespaceFrontendMappingRequest |  (optional)

    try:
        api_instance.add_namespace_frontend_mapping(body=body)
    except Exception as e:
        print("Exception when calling AdminApi->add_namespace_frontend_mapping: %s\n" % e)

Parameters

Name Type Description Notes
body AddNamespaceFrontendMappingRequest [optional]

Return type

void (empty response body)

Authorization

key

HTTP request headers

  • Content-Type: application/zrok.v1+json
  • Accept: Not defined

HTTP response details

Status code Description Response headers
200 namespace frontend mapping added -
401 unauthorized -
404 not found -
500 internal server error -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

**add_namespace_grant**

add_namespace_grant(body=body)

Example

  • Api Key Authentication (key):
python
import zrok_api
from zrok_api.models.add_namespace_grant_request import AddNamespaceGrantRequest
from zrok_api.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to /api/v2
# See configuration.py for a list of all supported configuration parameters.
configuration = zrok_api.Configuration(
    host = "/api/v2"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure API key authorization: key
configuration.api_key['key'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['key'] = 'Bearer'

# Enter a context with an instance of the API client
with zrok_api.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = zrok_api.AdminApi(api_client)
    body = zrok_api.AddNamespaceGrantRequest() # AddNamespaceGrantRequest |  (optional)

    try:
        api_instance.add_namespace_grant(body=body)
    except Exception as e:
        print("Exception when calling AdminApi->add_namespace_grant: %s\n" % e)

Parameters

Name Type Description Notes
body AddNamespaceGrantRequest [optional]

Return type

void (empty response body)

Authorization

key

HTTP request headers

  • Content-Type: application/zrok.v1+json
  • Accept: Not defined

HTTP response details

Status code Description Response headers
200 namespace grant added -
401 unauthorized -
404 not found -
500 internal server error -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

**add_organization_member**

add_organization_member(body=body)

Example

  • Api Key Authentication (key):
python
import zrok_api
from zrok_api.models.add_organization_member_request import AddOrganizationMemberRequest
from zrok_api.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to /api/v2
# See configuration.py for a list of all supported configuration parameters.
configuration = zrok_api.Configuration(
    host = "/api/v2"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure API key authorization: key
configuration.api_key['key'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['key'] = 'Bearer'

# Enter a context with an instance of the API client
with zrok_api.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = zrok_api.AdminApi(api_client)
    body = zrok_api.AddOrganizationMemberRequest() # AddOrganizationMemberRequest |  (optional)

    try:
        api_instance.add_organization_member(body=body)
    except Exception as e:
        print("Exception when calling AdminApi->add_organization_member: %s\n" % e)

Parameters

Name Type Description Notes
body AddOrganizationMemberRequest [optional]

Return type

void (empty response body)

Authorization

key

HTTP request headers

  • Content-Type: application/zrok.v1+json
  • Accept: Not defined

HTTP response details

Status code Description Response headers
201 member added -
401 unauthorized -
404 not found -
500 internal server error -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

**apply_limit_classes**

apply_limit_classes(body=body)

Example

  • Api Key Authentication (key):
python
import zrok_api
from zrok_api.models.apply_limit_classes_request import ApplyLimitClassesRequest
from zrok_api.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to /api/v2
# See configuration.py for a list of all supported configuration parameters.
configuration = zrok_api.Configuration(
    host = "/api/v2"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure API key authorization: key
configuration.api_key['key'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['key'] = 'Bearer'

# Enter a context with an instance of the API client
with zrok_api.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = zrok_api.AdminApi(api_client)
    body = zrok_api.ApplyLimitClassesRequest() # ApplyLimitClassesRequest |  (optional)

    try:
        api_instance.apply_limit_classes(body=body)
    except Exception as e:
        print("Exception when calling AdminApi->apply_limit_classes: %s\n" % e)

Parameters

Name Type Description Notes
body ApplyLimitClassesRequest [optional]

Return type

void (empty response body)

Authorization

key

HTTP request headers

  • Content-Type: application/zrok.v1+json
  • Accept: Not defined

HTTP response details

Status code Description Response headers
200 applied -
401 unauthorized -
404 account or limit class not found -
500 internal server error -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

**create_account**

RegenerateAccountToken200Response create_account(body=body)

Example

  • Api Key Authentication (key):
python
import zrok_api
from zrok_api.models.login_request import LoginRequest
from zrok_api.models.regenerate_account_token200_response import RegenerateAccountToken200Response
from zrok_api.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to /api/v2
# See configuration.py for a list of all supported configuration parameters.
configuration = zrok_api.Configuration(
    host = "/api/v2"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure API key authorization: key
configuration.api_key['key'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['key'] = 'Bearer'

# Enter a context with an instance of the API client
with zrok_api.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = zrok_api.AdminApi(api_client)
    body = zrok_api.LoginRequest() # LoginRequest |  (optional)

    try:
        api_response = api_instance.create_account(body=body)
        print("The response of AdminApi->create_account:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling AdminApi->create_account: %s\n" % e)

Parameters

Name Type Description Notes
body LoginRequest [optional]

Return type

RegenerateAccountToken200Response

Authorization

key

HTTP request headers

  • Content-Type: application/zrok.v1+json
  • Accept: application/zrok.v1+json

HTTP response details

Status code Description Response headers
201 created -
401 unauthorized -
500 internal server error -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

**create_frontend**

CreateFrontend201Response create_frontend(body=body)

Example

  • Api Key Authentication (key):
python
import zrok_api
from zrok_api.models.create_frontend201_response import CreateFrontend201Response
from zrok_api.models.create_frontend_request import CreateFrontendRequest
from zrok_api.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to /api/v2
# See configuration.py for a list of all supported configuration parameters.
configuration = zrok_api.Configuration(
    host = "/api/v2"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure API key authorization: key
configuration.api_key['key'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['key'] = 'Bearer'

# Enter a context with an instance of the API client
with zrok_api.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = zrok_api.AdminApi(api_client)
    body = zrok_api.CreateFrontendRequest() # CreateFrontendRequest |  (optional)

    try:
        api_response = api_instance.create_frontend(body=body)
        print("The response of AdminApi->create_frontend:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling AdminApi->create_frontend: %s\n" % e)

Parameters

Name Type Description Notes
body CreateFrontendRequest [optional]

Return type

CreateFrontend201Response

Authorization

key

HTTP request headers

  • Content-Type: application/zrok.v1+json
  • Accept: application/zrok.v1+json

HTTP response details

Status code Description Response headers
201 frontend created -
400 bad request -
401 unauthorized -
404 not found -
500 internal server error -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

**create_identity**

CreateIdentity201Response create_identity(body=body)

Example

  • Api Key Authentication (key):
python
import zrok_api
from zrok_api.models.create_identity201_response import CreateIdentity201Response
from zrok_api.models.create_identity_request import CreateIdentityRequest
from zrok_api.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to /api/v2
# See configuration.py for a list of all supported configuration parameters.
configuration = zrok_api.Configuration(
    host = "/api/v2"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure API key authorization: key
configuration.api_key['key'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['key'] = 'Bearer'

# Enter a context with an instance of the API client
with zrok_api.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = zrok_api.AdminApi(api_client)
    body = zrok_api.CreateIdentityRequest() # CreateIdentityRequest |  (optional)

    try:
        api_response = api_instance.create_identity(body=body)
        print("The response of AdminApi->create_identity:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling AdminApi->create_identity: %s\n" % e)

Parameters

Name Type Description Notes
body CreateIdentityRequest [optional]

Return type

CreateIdentity201Response

Authorization

key

HTTP request headers

  • Content-Type: application/zrok.v1+json
  • Accept: application/zrok.v1+json

HTTP response details

Status code Description Response headers
201 created -
401 unauthorized -
500 internal server error -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

**create_namespace**

CreateNamespace201Response create_namespace(body=body)

Example

  • Api Key Authentication (key):
python
import zrok_api
from zrok_api.models.create_namespace201_response import CreateNamespace201Response
from zrok_api.models.create_namespace_request import CreateNamespaceRequest
from zrok_api.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to /api/v2
# See configuration.py for a list of all supported configuration parameters.
configuration = zrok_api.Configuration(
    host = "/api/v2"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure API key authorization: key
configuration.api_key['key'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['key'] = 'Bearer'

# Enter a context with an instance of the API client
with zrok_api.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = zrok_api.AdminApi(api_client)
    body = zrok_api.CreateNamespaceRequest() # CreateNamespaceRequest |  (optional)

    try:
        api_response = api_instance.create_namespace(body=body)
        print("The response of AdminApi->create_namespace:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling AdminApi->create_namespace: %s\n" % e)

Parameters

Name Type Description Notes
body CreateNamespaceRequest [optional]

Return type

CreateNamespace201Response

Authorization

key

HTTP request headers

  • Content-Type: application/zrok.v1+json
  • Accept: application/zrok.v1+json

HTTP response details

Status code Description Response headers
201 namespace created -
401 unauthorized -
409 namespace already exists -
500 internal server error -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

**create_organization**

CreateOrganization201Response create_organization(body=body)

Example

  • Api Key Authentication (key):
python
import zrok_api
from zrok_api.models.create_organization201_response import CreateOrganization201Response
from zrok_api.models.create_organization_request import CreateOrganizationRequest
from zrok_api.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to /api/v2
# See configuration.py for a list of all supported configuration parameters.
configuration = zrok_api.Configuration(
    host = "/api/v2"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure API key authorization: key
configuration.api_key['key'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['key'] = 'Bearer'

# Enter a context with an instance of the API client
with zrok_api.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = zrok_api.AdminApi(api_client)
    body = zrok_api.CreateOrganizationRequest() # CreateOrganizationRequest |  (optional)

    try:
        api_response = api_instance.create_organization(body=body)
        print("The response of AdminApi->create_organization:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling AdminApi->create_organization: %s\n" % e)

Parameters

Name Type Description Notes
body CreateOrganizationRequest [optional]

Return type

CreateOrganization201Response

Authorization

key

HTTP request headers

  • Content-Type: application/zrok.v1+json
  • Accept: application/zrok.v1+json

HTTP response details

Status code Description Response headers
201 organization created -
401 unauthorized -
500 internal server error -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

**delete_account**

delete_account(body=body)

Example

  • Api Key Authentication (key):
python
import zrok_api
from zrok_api.models.verify200_response import Verify200Response
from zrok_api.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to /api/v2
# See configuration.py for a list of all supported configuration parameters.
configuration = zrok_api.Configuration(
    host = "/api/v2"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure API key authorization: key
configuration.api_key['key'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['key'] = 'Bearer'

# Enter a context with an instance of the API client
with zrok_api.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = zrok_api.AdminApi(api_client)
    body = zrok_api.Verify200Response() # Verify200Response |  (optional)

    try:
        api_instance.delete_account(body=body)
    except Exception as e:
        print("Exception when calling AdminApi->delete_account: %s\n" % e)

Parameters

Name Type Description Notes
body Verify200Response [optional]

Return type

void (empty response body)

Authorization

key

HTTP request headers

  • Content-Type: application/zrok.v1+json
  • Accept: Not defined

HTTP response details

Status code Description Response headers
200 ok -
401 unauthorized -
404 not found -
500 internal server error -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

**delete_frontend**

delete_frontend(body=body)

Example

  • Api Key Authentication (key):
python
import zrok_api
from zrok_api.models.create_frontend201_response import CreateFrontend201Response
from zrok_api.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to /api/v2
# See configuration.py for a list of all supported configuration parameters.
configuration = zrok_api.Configuration(
    host = "/api/v2"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure API key authorization: key
configuration.api_key['key'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['key'] = 'Bearer'

# Enter a context with an instance of the API client
with zrok_api.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = zrok_api.AdminApi(api_client)
    body = zrok_api.CreateFrontend201Response() # CreateFrontend201Response |  (optional)

    try:
        api_instance.delete_frontend(body=body)
    except Exception as e:
        print("Exception when calling AdminApi->delete_frontend: %s\n" % e)

Parameters

Name Type Description Notes
body CreateFrontend201Response [optional]

Return type

void (empty response body)

Authorization

key

HTTP request headers

  • Content-Type: application/zrok.v1+json
  • Accept: Not defined

HTTP response details

Status code Description Response headers
200 frontend deleted -
401 unauthorized -
404 not found -
500 internal server error -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

**delete_frontend_grant**

delete_frontend_grant(body=body)

Example

  • Api Key Authentication (key):
python
import zrok_api
from zrok_api.models.add_frontend_grant_request import AddFrontendGrantRequest
from zrok_api.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to /api/v2
# See configuration.py for a list of all supported configuration parameters.
configuration = zrok_api.Configuration(
    host = "/api/v2"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure API key authorization: key
configuration.api_key['key'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['key'] = 'Bearer'

# Enter a context with an instance of the API client
with zrok_api.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = zrok_api.AdminApi(api_client)
    body = zrok_api.AddFrontendGrantRequest() # AddFrontendGrantRequest |  (optional)

    try:
        api_instance.delete_frontend_grant(body=body)
    except Exception as e:
        print("Exception when calling AdminApi->delete_frontend_grant: %s\n" % e)

Parameters

Name Type Description Notes
body AddFrontendGrantRequest [optional]

Return type

void (empty response body)

Authorization

key

HTTP request headers

  • Content-Type: application/zrok.v1+json
  • Accept: application/zrok.v1+json

HTTP response details

Status code Description Response headers
200 ok -
401 unauthorized -
404 not found -
500 internal server error -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

**delete_identity**

delete_identity(body=body)

Example

  • Api Key Authentication (key):
python
import zrok_api
from zrok_api.models.delete_identity_request import DeleteIdentityRequest
from zrok_api.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to /api/v2
# See configuration.py for a list of all supported configuration parameters.
configuration = zrok_api.Configuration(
    host = "/api/v2"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure API key authorization: key
configuration.api_key['key'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['key'] = 'Bearer'

# Enter a context with an instance of the API client
with zrok_api.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = zrok_api.AdminApi(api_client)
    body = zrok_api.DeleteIdentityRequest() # DeleteIdentityRequest |  (optional)

    try:
        api_instance.delete_identity(body=body)
    except Exception as e:
        print("Exception when calling AdminApi->delete_identity: %s\n" % e)

Parameters

Name Type Description Notes
body DeleteIdentityRequest [optional]

Return type

void (empty response body)

Authorization

key

HTTP request headers

  • Content-Type: application/zrok.v1+json
  • Accept: Not defined

HTTP response details

Status code Description Response headers
200 deleted -
401 unauthorized -
404 not found -
500 internal server error -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

**delete_namespace**

delete_namespace(body=body)

Example

  • Api Key Authentication (key):
python
import zrok_api
from zrok_api.models.create_namespace201_response import CreateNamespace201Response
from zrok_api.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to /api/v2
# See configuration.py for a list of all supported configuration parameters.
configuration = zrok_api.Configuration(
    host = "/api/v2"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure API key authorization: key
configuration.api_key['key'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['key'] = 'Bearer'

# Enter a context with an instance of the API client
with zrok_api.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = zrok_api.AdminApi(api_client)
    body = zrok_api.CreateNamespace201Response() # CreateNamespace201Response |  (optional)

    try:
        api_instance.delete_namespace(body=body)
    except Exception as e:
        print("Exception when calling AdminApi->delete_namespace: %s\n" % e)

Parameters

Name Type Description Notes
body CreateNamespace201Response [optional]

Return type

void (empty response body)

Authorization

key

HTTP request headers

  • Content-Type: application/zrok.v1+json
  • Accept: Not defined

HTTP response details

Status code Description Response headers
200 namespace deleted -
401 unauthorized -
404 not found -
500 internal server error -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

**delete_organization**

delete_organization(body=body)

Example

  • Api Key Authentication (key):
python
import zrok_api
from zrok_api.models.create_organization201_response import CreateOrganization201Response
from zrok_api.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to /api/v2
# See configuration.py for a list of all supported configuration parameters.
configuration = zrok_api.Configuration(
    host = "/api/v2"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure API key authorization: key
configuration.api_key['key'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['key'] = 'Bearer'

# Enter a context with an instance of the API client
with zrok_api.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = zrok_api.AdminApi(api_client)
    body = zrok_api.CreateOrganization201Response() # CreateOrganization201Response |  (optional)

    try:
        api_instance.delete_organization(body=body)
    except Exception as e:
        print("Exception when calling AdminApi->delete_organization: %s\n" % e)

Parameters

Name Type Description Notes
body CreateOrganization201Response [optional]

Return type

void (empty response body)

Authorization

key

HTTP request headers

  • Content-Type: application/zrok.v1+json
  • Accept: Not defined

HTTP response details

Status code Description Response headers
200 organization deleted -
401 unauthorized -
404 organization not found -
500 internal server error -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

**get_name**

GetName200Response get_name(namespace_token, name)

Example

  • Api Key Authentication (key):
python
import zrok_api
from zrok_api.models.get_name200_response import GetName200Response
from zrok_api.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to /api/v2
# See configuration.py for a list of all supported configuration parameters.
configuration = zrok_api.Configuration(
    host = "/api/v2"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure API key authorization: key
configuration.api_key['key'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['key'] = 'Bearer'

# Enter a context with an instance of the API client
with zrok_api.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = zrok_api.AdminApi(api_client)
    namespace_token = 'namespace_token_example' # str | 
    name = 'name_example' # str | 

    try:
        api_response = api_instance.get_name(namespace_token, name)
        print("The response of AdminApi->get_name:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling AdminApi->get_name: %s\n" % e)

Parameters

Name Type Description Notes
namespace_token str
name str

Return type

GetName200Response

Authorization

key

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/zrok.v1+json

HTTP response details

Status code Description Response headers
200 ok -
401 unauthorized -
404 not found -
500 internal server error -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

**get_skip_interstitial_grant**

GetSkipInterstitialGrant200Response get_skip_interstitial_grant(email)

Example

  • Api Key Authentication (key):
python
import zrok_api
from zrok_api.models.get_skip_interstitial_grant200_response import GetSkipInterstitialGrant200Response
from zrok_api.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to /api/v2
# See configuration.py for a list of all supported configuration parameters.
configuration = zrok_api.Configuration(
    host = "/api/v2"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure API key authorization: key
configuration.api_key['key'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['key'] = 'Bearer'

# Enter a context with an instance of the API client
with zrok_api.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = zrok_api.AdminApi(api_client)
    email = 'email_example' # str | 

    try:
        api_response = api_instance.get_skip_interstitial_grant(email)
        print("The response of AdminApi->get_skip_interstitial_grant:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling AdminApi->get_skip_interstitial_grant: %s\n" % e)

Parameters

Name Type Description Notes
email str

Return type

GetSkipInterstitialGrant200Response

Authorization

key

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/zrok.v1+json

HTTP response details

Status code Description Response headers
200 ok -
401 unauthorized -
404 account not found -
500 internal server error -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

**grant_skip_interstitial**

grant_skip_interstitial(body=body)

Example

  • Api Key Authentication (key):
python
import zrok_api
from zrok_api.models.verify200_response import Verify200Response
from zrok_api.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to /api/v2
# See configuration.py for a list of all supported configuration parameters.
configuration = zrok_api.Configuration(
    host = "/api/v2"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure API key authorization: key
configuration.api_key['key'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['key'] = 'Bearer'

# Enter a context with an instance of the API client
with zrok_api.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = zrok_api.AdminApi(api_client)
    body = zrok_api.Verify200Response() # Verify200Response |  (optional)

    try:
        api_instance.grant_skip_interstitial(body=body)
    except Exception as e:
        print("Exception when calling AdminApi->grant_skip_interstitial: %s\n" % e)

Parameters

Name Type Description Notes
body Verify200Response [optional]

Return type

void (empty response body)

Authorization

key

HTTP request headers

  • Content-Type: application/zrok.v1+json
  • Accept: Not defined

HTTP response details

Status code Description Response headers
200 ok -
401 unauthorized -
404 account not found -
500 internal server error -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

**invite_token_generate**

invite_token_generate(body=body)

Example

  • Api Key Authentication (key):
python
import zrok_api
from zrok_api.models.invite_token_generate_request import InviteTokenGenerateRequest
from zrok_api.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to /api/v2
# See configuration.py for a list of all supported configuration parameters.
configuration = zrok_api.Configuration(
    host = "/api/v2"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure API key authorization: key
configuration.api_key['key'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['key'] = 'Bearer'

# Enter a context with an instance of the API client
with zrok_api.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = zrok_api.AdminApi(api_client)
    body = zrok_api.InviteTokenGenerateRequest() # InviteTokenGenerateRequest |  (optional)

    try:
        api_instance.invite_token_generate(body=body)
    except Exception as e:
        print("Exception when calling AdminApi->invite_token_generate: %s\n" % e)

Parameters

Name Type Description Notes
body InviteTokenGenerateRequest [optional]

Return type

void (empty response body)

Authorization

key

HTTP request headers

  • Content-Type: application/zrok.v1+json
  • Accept: Not defined

HTTP response details

Status code Description Response headers
201 invite tokens created -
400 invite tokens not created -
401 unauthorized -
500 internal server error -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

**list_applied_limit_classes**

List[LimitClass] list_applied_limit_classes(body=body)

Example

  • Api Key Authentication (key):
python
import zrok_api
from zrok_api.models.limit_class import LimitClass
from zrok_api.models.verify200_response import Verify200Response
from zrok_api.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to /api/v2
# See configuration.py for a list of all supported configuration parameters.
configuration = zrok_api.Configuration(
    host = "/api/v2"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure API key authorization: key
configuration.api_key['key'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['key'] = 'Bearer'

# Enter a context with an instance of the API client
with zrok_api.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = zrok_api.AdminApi(api_client)
    body = zrok_api.Verify200Response() # Verify200Response |  (optional)

    try:
        api_response = api_instance.list_applied_limit_classes(body=body)
        print("The response of AdminApi->list_applied_limit_classes:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling AdminApi->list_applied_limit_classes: %s\n" % e)

Parameters

Name Type Description Notes
body Verify200Response [optional]

Return type

List[LimitClass]

Authorization

key

HTTP request headers

  • Content-Type: application/zrok.v1+json
  • Accept: application/zrok.v1+json

HTTP response details

Status code Description Response headers
200 applied limit classes -
401 unauthorized -
404 account not found -
500 internal server error -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

**list_frontend_namespace_mappings**

List[ListFrontendNamespaceMappings200ResponseInner] list_frontend_namespace_mappings(frontend_token)

Example

  • Api Key Authentication (key):
python
import zrok_api
from zrok_api.models.list_frontend_namespace_mappings200_response_inner import ListFrontendNamespaceMappings200ResponseInner
from zrok_api.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to /api/v2
# See configuration.py for a list of all supported configuration parameters.
configuration = zrok_api.Configuration(
    host = "/api/v2"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure API key authorization: key
configuration.api_key['key'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['key'] = 'Bearer'

# Enter a context with an instance of the API client
with zrok_api.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = zrok_api.AdminApi(api_client)
    frontend_token = 'frontend_token_example' # str | 

    try:
        api_response = api_instance.list_frontend_namespace_mappings(frontend_token)
        print("The response of AdminApi->list_frontend_namespace_mappings:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling AdminApi->list_frontend_namespace_mappings: %s\n" % e)

Parameters

Name Type Description Notes
frontend_token str

Return type

List[ListFrontendNamespaceMappings200ResponseInner]

Authorization

key

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/zrok.v1+json

HTTP response details

Status code Description Response headers
200 frontend namespace mappings listed -
401 unauthorized -
404 frontend not found -
500 internal server error -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

**list_frontends**

List[ListFrontends200ResponseInner] list_frontends()

Example

  • Api Key Authentication (key):
python
import zrok_api
from zrok_api.models.list_frontends200_response_inner import ListFrontends200ResponseInner
from zrok_api.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to /api/v2
# See configuration.py for a list of all supported configuration parameters.
configuration = zrok_api.Configuration(
    host = "/api/v2"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure API key authorization: key
configuration.api_key['key'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['key'] = 'Bearer'

# Enter a context with an instance of the API client
with zrok_api.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = zrok_api.AdminApi(api_client)

    try:
        api_response = api_instance.list_frontends()
        print("The response of AdminApi->list_frontends:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling AdminApi->list_frontends: %s\n" % e)

Parameters

This endpoint does not need any parameter.

Return type

List[ListFrontends200ResponseInner]

Authorization

key

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/zrok.v1+json

HTTP response details

Status code Description Response headers
200 ok -
401 unauthorized -
500 internal server error -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

**list_limit_classes**

List[LimitClass] list_limit_classes(body=body)

Example

  • Api Key Authentication (key):
python
import zrok_api
from zrok_api.models.limit_class import LimitClass
from zrok_api.models.list_limit_classes_request import ListLimitClassesRequest
from zrok_api.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to /api/v2
# See configuration.py for a list of all supported configuration parameters.
configuration = zrok_api.Configuration(
    host = "/api/v2"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure API key authorization: key
configuration.api_key['key'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['key'] = 'Bearer'

# Enter a context with an instance of the API client
with zrok_api.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = zrok_api.AdminApi(api_client)
    body = zrok_api.ListLimitClassesRequest() # ListLimitClassesRequest |  (optional)

    try:
        api_response = api_instance.list_limit_classes(body=body)
        print("The response of AdminApi->list_limit_classes:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling AdminApi->list_limit_classes: %s\n" % e)

Parameters

Name Type Description Notes
body ListLimitClassesRequest [optional]

Return type

List[LimitClass]

Authorization

key

HTTP request headers

  • Content-Type: application/zrok.v1+json
  • Accept: application/zrok.v1+json

HTTP response details

Status code Description Response headers
200 limit classes -
401 unauthorized -
500 internal server error -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

**list_namespace_frontend_mappings**

List[ListFrontendNamespaceMappings200ResponseInner] list_namespace_frontend_mappings(namespace_token)

Example

  • Api Key Authentication (key):
python
import zrok_api
from zrok_api.models.list_frontend_namespace_mappings200_response_inner import ListFrontendNamespaceMappings200ResponseInner
from zrok_api.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to /api/v2
# See configuration.py for a list of all supported configuration parameters.
configuration = zrok_api.Configuration(
    host = "/api/v2"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure API key authorization: key
configuration.api_key['key'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['key'] = 'Bearer'

# Enter a context with an instance of the API client
with zrok_api.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = zrok_api.AdminApi(api_client)
    namespace_token = 'namespace_token_example' # str | 

    try:
        api_response = api_instance.list_namespace_frontend_mappings(namespace_token)
        print("The response of AdminApi->list_namespace_frontend_mappings:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling AdminApi->list_namespace_frontend_mappings: %s\n" % e)

Parameters

Name Type Description Notes
namespace_token str

Return type

List[ListFrontendNamespaceMappings200ResponseInner]

Authorization

key

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/zrok.v1+json

HTTP response details

Status code Description Response headers
200 namespace frontend mappings listed -
401 unauthorized -
404 namespace not found -
500 internal server error -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

**list_namespaces**

List[ListNamespaces200ResponseInner] list_namespaces()

Example

  • Api Key Authentication (key):
python
import zrok_api
from zrok_api.models.list_namespaces200_response_inner import ListNamespaces200ResponseInner
from zrok_api.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to /api/v2
# See configuration.py for a list of all supported configuration parameters.
configuration = zrok_api.Configuration(
    host = "/api/v2"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure API key authorization: key
configuration.api_key['key'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['key'] = 'Bearer'

# Enter a context with an instance of the API client
with zrok_api.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = zrok_api.AdminApi(api_client)

    try:
        api_response = api_instance.list_namespaces()
        print("The response of AdminApi->list_namespaces:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling AdminApi->list_namespaces: %s\n" % e)

Parameters

This endpoint does not need any parameter.

Return type

List[ListNamespaces200ResponseInner]

Authorization

key

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/zrok.v1+json

HTTP response details

Status code Description Response headers
200 ok -
401 unauthorized -
500 internal server error -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

**list_organization_members**

ListOrganizationMembers200Response list_organization_members(body=body)

Example

  • Api Key Authentication (key):
text
/* Detailed source-code truncated for AI context efficiency. */

Parameters

Name Type Description Notes
body CreateOrganization201Response [optional]

Return type

ListOrganizationMembers200Response

Authorization

key

HTTP request headers

  • Content-Type: application/zrok.v1+json
  • Accept: application/zrok.v1+json

HTTP response details

Status code Description Response headers
200 list organization members -
401 unauthorized -
404 not found -
500 internal server error -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

**list_organizations**

ListOrganizations200Response list_organizations()

Example

  • Api Key Authentication (key):
python
import zrok_api
from zrok_api.models.list_organizations200_response import ListOrganizations200Response
from zrok_api.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to /api/v2
# See configuration.py for a list of all supported configuration parameters.
configuration = zrok_api.Configuration(
    host = "/api/v2"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure API key authorization: key
configuration.api_key['key'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['key'] = 'Bearer'

# Enter a context with an instance of the API client
with zrok_api.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = zrok_api.AdminApi(api_client)

    try:
        api_response = api_instance.list_organizations()
        print("The response of AdminApi->list_organizations:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling AdminApi->list_organizations: %s\n" % e)

Parameters

This endpoint does not need any parameter.

Return type

ListOrganizations200Response

Authorization

key

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/zrok.v1+json

HTTP response details

Status code Description Response headers
200 ok -
401 unauthorized -
500 internal server error -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

**remove_applied_limit_classes**

remove_applied_limit_classes(body=body)

Example

  • Api Key Authentication (key):
python
import zrok_api
from zrok_api.models.apply_limit_classes_request import ApplyLimitClassesRequest
from zrok_api.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to /api/v2
# See configuration.py for a list of all supported configuration parameters.
configuration = zrok_api.Configuration(
    host = "/api/v2"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure API key authorization: key
configuration.api_key['key'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['key'] = 'Bearer'

# Enter a context with an instance of the API client
with zrok_api.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = zrok_api.AdminApi(api_client)
    body = zrok_api.ApplyLimitClassesRequest() # ApplyLimitClassesRequest |  (optional)

    try:
        api_instance.remove_applied_limit_classes(body=body)
    except Exception as e:
        print("Exception when calling AdminApi->remove_applied_limit_classes: %s\n" % e)

Parameters

Name Type Description Notes
body ApplyLimitClassesRequest [optional]

Return type

void (empty response body)

Authorization

key

HTTP request headers

  • Content-Type: application/zrok.v1+json
  • Accept: Not defined

HTTP response details

Status code Description Response headers
200 removed -
401 unauthorized -
404 account not found -
500 internal server error -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

**remove_namespace_frontend_mapping**

remove_namespace_frontend_mapping(body=body)

Example

  • Api Key Authentication (key):
python
import zrok_api
from zrok_api.models.remove_namespace_frontend_mapping_request import RemoveNamespaceFrontendMappingRequest
from zrok_api.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to /api/v2
# See configuration.py for a list of all supported configuration parameters.
configuration = zrok_api.Configuration(
    host = "/api/v2"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure API key authorization: key
configuration.api_key['key'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['key'] = 'Bearer'

# Enter a context with an instance of the API client
with zrok_api.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = zrok_api.AdminApi(api_client)
    body = zrok_api.RemoveNamespaceFrontendMappingRequest() # RemoveNamespaceFrontendMappingRequest |  (optional)

    try:
        api_instance.remove_namespace_frontend_mapping(body=body)
    except Exception as e:
        print("Exception when calling AdminApi->remove_namespace_frontend_mapping: %s\n" % e)

Parameters

Name Type Description Notes
body RemoveNamespaceFrontendMappingRequest [optional]

Return type

void (empty response body)

Authorization

key

HTTP request headers

  • Content-Type: application/zrok.v1+json
  • Accept: Not defined

HTTP response details

Status code Description Response headers
200 namespace frontend mapping removed -
401 unauthorized -
404 not found -
500 internal server error -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

**remove_namespace_grant**

remove_namespace_grant(body=body)

Example

  • Api Key Authentication (key):
python
import zrok_api
from zrok_api.models.add_namespace_grant_request import AddNamespaceGrantRequest
from zrok_api.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to /api/v2
# See configuration.py for a list of all supported configuration parameters.
configuration = zrok_api.Configuration(
    host = "/api/v2"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure API key authorization: key
configuration.api_key['key'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['key'] = 'Bearer'

# Enter a context with an instance of the API client
with zrok_api.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = zrok_api.AdminApi(api_client)
    body = zrok_api.AddNamespaceGrantRequest() # AddNamespaceGrantRequest |  (optional)

    try:
        api_instance.remove_namespace_grant(body=body)
    except Exception as e:
        print("Exception when calling AdminApi->remove_namespace_grant: %s\n" % e)

Parameters

Name Type Description Notes
body AddNamespaceGrantRequest [optional]

Return type

void (empty response body)

Authorization

key

HTTP request headers

  • Content-Type: application/zrok.v1+json
  • Accept: Not defined

HTTP response details

Status code Description Response headers
200 namespace grant removed -
401 unauthorized -
404 not found -
500 internal server error -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

**remove_organization_member**

remove_organization_member(body=body)

Example

  • Api Key Authentication (key):
python
import zrok_api
from zrok_api.models.remove_organization_member_request import RemoveOrganizationMemberRequest
from zrok_api.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to /api/v2
# See configuration.py for a list of all supported configuration parameters.
configuration = zrok_api.Configuration(
    host = "/api/v2"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure API key authorization: key
configuration.api_key['key'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['key'] = 'Bearer'

# Enter a context with an instance of the API client
with zrok_api.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = zrok_api.AdminApi(api_client)
    body = zrok_api.RemoveOrganizationMemberRequest() # RemoveOrganizationMemberRequest |  (optional)

    try:
        api_instance.remove_organization_member(body=body)
    except Exception as e:
        print("Exception when calling AdminApi->remove_organization_member: %s\n" % e)

Parameters

Name Type Description Notes
body RemoveOrganizationMemberRequest [optional]

Return type

void (empty response body)

Authorization

key

HTTP request headers

  • Content-Type: application/zrok.v1+json
  • Accept: Not defined

HTTP response details

Status code Description Response headers
200 member removed -
401 unauthorized -
404 not found -
500 internal server error -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

**revoke_skip_interstitial**

revoke_skip_interstitial(body=body)

Example

  • Api Key Authentication (key):
python
import zrok_api
from zrok_api.models.verify200_response import Verify200Response
from zrok_api.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to /api/v2
# See configuration.py for a list of all supported configuration parameters.
configuration = zrok_api.Configuration(
    host = "/api/v2"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure API key authorization: key
configuration.api_key['key'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['key'] = 'Bearer'

# Enter a context with an instance of the API client
with zrok_api.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = zrok_api.AdminApi(api_client)
    body = zrok_api.Verify200Response() # Verify200Response |  (optional)

    try:
        api_instance.revoke_skip_interstitial(body=body)
    except Exception as e:
        print("Exception when calling AdminApi->revoke_skip_interstitial: %s\n" % e)

Parameters

Name Type Description Notes
body Verify200Response [optional]

Return type

void (empty response body)

Authorization

key

HTTP request headers

  • Content-Type: application/zrok.v1+json
  • Accept: Not defined

HTTP response details

Status code Description Response headers
200 ok -
401 unauthorized -
404 account not found -
500 internal server error -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

**update_account_password**

update_account_password(body=body)

Example

  • Api Key Authentication (key):
python
import zrok_api
from zrok_api.models.login_request import LoginRequest
from zrok_api.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to /api/v2
# See configuration.py for a list of all supported configuration parameters.
configuration = zrok_api.Configuration(
    host = "/api/v2"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure API key authorization: key
configuration.api_key['key'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['key'] = 'Bearer'

# Enter a context with an instance of the API client
with zrok_api.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = zrok_api.AdminApi(api_client)
    body = zrok_api.LoginRequest() # LoginRequest |  (optional)

    try:
        api_instance.update_account_password(body=body)
    except Exception as e:
        print("Exception when calling AdminApi->update_account_password: %s\n" % e)

Parameters

Name Type Description Notes
body LoginRequest [optional]

Return type

void (empty response body)

Authorization

key

HTTP request headers

  • Content-Type: application/zrok.v1+json
  • Accept: application/zrok.v1+json

HTTP response details

Status code Description Response headers
200 ok -
401 unauthorized -
404 not found -
422 password validation failure -
500 internal server error -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

**update_frontend**

update_frontend(body=body)

Example

  • Api Key Authentication (key):
python
import zrok_api
from zrok_api.models.update_frontend_request import UpdateFrontendRequest
from zrok_api.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to /api/v2
# See configuration.py for a list of all supported configuration parameters.
configuration = zrok_api.Configuration(
    host = "/api/v2"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure API key authorization: key
configuration.api_key['key'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['key'] = 'Bearer'

# Enter a context with an instance of the API client
with zrok_api.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = zrok_api.AdminApi(api_client)
    body = zrok_api.UpdateFrontendRequest() # UpdateFrontendRequest |  (optional)

    try:
        api_instance.update_frontend(body=body)
    except Exception as e:
        print("Exception when calling AdminApi->update_frontend: %s\n" % e)

Parameters

Name Type Description Notes
body UpdateFrontendRequest [optional]

Return type

void (empty response body)

Authorization

key

HTTP request headers

  • Content-Type: application/zrok.v1+json
  • Accept: Not defined

HTTP response details

Status code Description Response headers
200 frontend updated -
401 unauthorized -
404 not found -
500 internal server error -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

**update_namespace**

update_namespace(body=body)

Example

  • Api Key Authentication (key):
python
import zrok_api
from zrok_api.models.update_namespace_request import UpdateNamespaceRequest
from zrok_api.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to /api/v2
# See configuration.py for a list of all supported configuration parameters.
configuration = zrok_api.Configuration(
    host = "/api/v2"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure API key authorization: key
configuration.api_key['key'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['key'] = 'Bearer'

# Enter a context with an instance of the API client
with zrok_api.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = zrok_api.AdminApi(api_client)
    body = zrok_api.UpdateNamespaceRequest() # UpdateNamespaceRequest |  (optional)

    try:
        api_instance.update_namespace(body=body)
    except Exception as e:
        print("Exception when calling AdminApi->update_namespace: %s\n" % e)

Parameters

Name Type Description Notes
body UpdateNamespaceRequest [optional]

Return type

void (empty response body)

Authorization

key

HTTP request headers

  • Content-Type: application/zrok.v1+json
  • Accept: Not defined

HTTP response details

Status code Description Response headers
200 namespace updated -
401 unauthorized -
404 not found -
500 internal server error -

[Back to top] [Back to API list] [Back to Model list] [Back to README]


Sdk Python Src Docs AgentApi (`sdk/python/src/docs/AgentApi.md`)

zrok_api.AgentApi

All URIs are relative to /api/v2

Method HTTP request Description
enroll POST /agent/enroll
ping POST /agent/ping
remote_access POST /agent/access
remote_share POST /agent/share
remote_status POST /agent/status
remote_unaccess POST /agent/unaccess
remote_unshare POST /agent/unshare
share_http_healthcheck POST /agent/share/http-healthcheck
unenroll POST /agent/unenroll

**enroll**

Enroll200Response enroll(body=body)

Example

  • Api Key Authentication (key):
python
import zrok_api
from zrok_api.models.enroll200_response import Enroll200Response
from zrok_api.models.enroll_request import EnrollRequest
from zrok_api.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to /api/v2
# See configuration.py for a list of all supported configuration parameters.
configuration = zrok_api.Configuration(
    host = "/api/v2"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure API key authorization: key
configuration.api_key['key'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['key'] = 'Bearer'

# Enter a context with an instance of the API client
with zrok_api.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = zrok_api.AgentApi(api_client)
    body = zrok_api.EnrollRequest() # EnrollRequest |  (optional)

    try:
        api_response = api_instance.enroll(body=body)
        print("The response of AgentApi->enroll:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling AgentApi->enroll: %s\n" % e)

Parameters

Name Type Description Notes
body EnrollRequest [optional]

Return type

Enroll200Response

Authorization

key

HTTP request headers

  • Content-Type: application/zrok.v1+json
  • Accept: application/zrok.v1+json

HTTP response details

Status code Description Response headers
200 ok -
400 bad request; already enrolled -
401 unauthorized -
500 internal server error -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

**ping**

Ping200Response ping(body=body)

Example

  • Api Key Authentication (key):
python
import zrok_api
from zrok_api.models.enroll_request import EnrollRequest
from zrok_api.models.ping200_response import Ping200Response
from zrok_api.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to /api/v2
# See configuration.py for a list of all supported configuration parameters.
configuration = zrok_api.Configuration(
    host = "/api/v2"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure API key authorization: key
configuration.api_key['key'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['key'] = 'Bearer'

# Enter a context with an instance of the API client
with zrok_api.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = zrok_api.AgentApi(api_client)
    body = zrok_api.EnrollRequest() # EnrollRequest |  (optional)

    try:
        api_response = api_instance.ping(body=body)
        print("The response of AgentApi->ping:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling AgentApi->ping: %s\n" % e)

Parameters

Name Type Description Notes
body EnrollRequest [optional]

Return type

Ping200Response

Authorization

key

HTTP request headers

  • Content-Type: application/zrok.v1+json
  • Accept: application/zrok.v1+json

HTTP response details

Status code Description Response headers
200 ok -
401 unauthorized -
500 internal server error -
502 bad gateway; agent not reachable -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

**remote_access**

CreateFrontend201Response remote_access(body=body)

Example

  • Api Key Authentication (key):
python
import zrok_api
from zrok_api.models.create_frontend201_response import CreateFrontend201Response
from zrok_api.models.remote_access_request import RemoteAccessRequest
from zrok_api.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to /api/v2
# See configuration.py for a list of all supported configuration parameters.
configuration = zrok_api.Configuration(
    host = "/api/v2"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure API key authorization: key
configuration.api_key['key'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['key'] = 'Bearer'

# Enter a context with an instance of the API client
with zrok_api.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = zrok_api.AgentApi(api_client)
    body = zrok_api.RemoteAccessRequest() # RemoteAccessRequest |  (optional)

    try:
        api_response = api_instance.remote_access(body=body)
        print("The response of AgentApi->remote_access:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling AgentApi->remote_access: %s\n" % e)

Parameters

Name Type Description Notes
body RemoteAccessRequest [optional]

Return type

CreateFrontend201Response

Authorization

key

HTTP request headers

  • Content-Type: application/zrok.v1+json
  • Accept: application/zrok.v1+json

HTTP response details

Status code Description Response headers
200 ok -
401 unauthorized -
500 internal server error -
502 bad gateway; agent not reachable -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

**remote_share**

RemoteShare200Response remote_share(body=body)

Example

  • Api Key Authentication (key):
python
import zrok_api
from zrok_api.models.remote_share200_response import RemoteShare200Response
from zrok_api.models.remote_share_request import RemoteShareRequest
from zrok_api.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to /api/v2
# See configuration.py for a list of all supported configuration parameters.
configuration = zrok_api.Configuration(
    host = "/api/v2"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure API key authorization: key
configuration.api_key['key'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['key'] = 'Bearer'

# Enter a context with an instance of the API client
with zrok_api.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = zrok_api.AgentApi(api_client)
    body = zrok_api.RemoteShareRequest() # RemoteShareRequest |  (optional)

    try:
        api_response = api_instance.remote_share(body=body)
        print("The response of AgentApi->remote_share:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling AgentApi->remote_share: %s\n" % e)

Parameters

Name Type Description Notes
body RemoteShareRequest [optional]

Return type

RemoteShare200Response

Authorization

key

HTTP request headers

  • Content-Type: application/zrok.v1+json
  • Accept: application/zrok.v1+json

HTTP response details

Status code Description Response headers
200 ok -
401 unauthorized -
500 internal server error -
502 bad gateway; agent not reachable -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

**remote_status**

RemoteStatus200Response remote_status(body=body)

Example

  • Api Key Authentication (key):
python
import zrok_api
from zrok_api.models.enroll_request import EnrollRequest
from zrok_api.models.remote_status200_response import RemoteStatus200Response
from zrok_api.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to /api/v2
# See configuration.py for a list of all supported configuration parameters.
configuration = zrok_api.Configuration(
    host = "/api/v2"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure API key authorization: key
configuration.api_key['key'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['key'] = 'Bearer'

# Enter a context with an instance of the API client
with zrok_api.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = zrok_api.AgentApi(api_client)
    body = zrok_api.EnrollRequest() # EnrollRequest |  (optional)

    try:
        api_response = api_instance.remote_status(body=body)
        print("The response of AgentApi->remote_status:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling AgentApi->remote_status: %s\n" % e)

Parameters

Name Type Description Notes
body EnrollRequest [optional]

Return type

RemoteStatus200Response

Authorization

key

HTTP request headers

  • Content-Type: application/zrok.v1+json
  • Accept: application/zrok.v1+json

HTTP response details

Status code Description Response headers
200 ok -
401 unauthorized -
500 internal server error -
502 bad gateway; agent not reachable -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

**remote_unaccess**

remote_unaccess(body=body)

Example

  • Api Key Authentication (key):
python
import zrok_api
from zrok_api.models.remote_unaccess_request import RemoteUnaccessRequest
from zrok_api.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to /api/v2
# See configuration.py for a list of all supported configuration parameters.
configuration = zrok_api.Configuration(
    host = "/api/v2"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure API key authorization: key
configuration.api_key['key'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['key'] = 'Bearer'

# Enter a context with an instance of the API client
with zrok_api.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = zrok_api.AgentApi(api_client)
    body = zrok_api.RemoteUnaccessRequest() # RemoteUnaccessRequest |  (optional)

    try:
        api_instance.remote_unaccess(body=body)
    except Exception as e:
        print("Exception when calling AgentApi->remote_unaccess: %s\n" % e)

Parameters

Name Type Description Notes
body RemoteUnaccessRequest [optional]

Return type

void (empty response body)

Authorization

key

HTTP request headers

  • Content-Type: application/zrok.v1+json
  • Accept: Not defined

HTTP response details

Status code Description Response headers
200 ok -
401 unauthorized -
500 internal server error -
502 bad gateway; agent not reachable -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

**remote_unshare**

remote_unshare(body=body)

Example

  • Api Key Authentication (key):
python
import zrok_api
from zrok_api.models.remote_unshare_request import RemoteUnshareRequest
from zrok_api.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to /api/v2
# See configuration.py for a list of all supported configuration parameters.
configuration = zrok_api.Configuration(
    host = "/api/v2"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure API key authorization: key
configuration.api_key['key'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['key'] = 'Bearer'

# Enter a context with an instance of the API client
with zrok_api.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = zrok_api.AgentApi(api_client)
    body = zrok_api.RemoteUnshareRequest() # RemoteUnshareRequest |  (optional)

    try:
        api_instance.remote_unshare(body=body)
    except Exception as e:
        print("Exception when calling AgentApi->remote_unshare: %s\n" % e)

Parameters

Name Type Description Notes
body RemoteUnshareRequest [optional]

Return type

void (empty response body)

Authorization

key

HTTP request headers

  • Content-Type: application/zrok.v1+json
  • Accept: Not defined

HTTP response details

Status code Description Response headers
200 ok -
401 unauthorized -
500 internal server error -
502 bad gateway; agent not reachable -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

**share_http_healthcheck**

ShareHttpHealthcheck200Response share_http_healthcheck(body=body)

Example

  • Api Key Authentication (key):
text
/* Detailed source-code truncated for AI context efficiency. */

Parameters

Name Type Description Notes
body ShareHttpHealthcheckRequest [optional]

Return type

ShareHttpHealthcheck200Response

Authorization

key

HTTP request headers

  • Content-Type: application/zrok.v1+json
  • Accept: application/zrok.v1+json

HTTP response details

Status code Description Response headers
200 ok -
401 unauthorized -
500 internal server error -
502 bad gateway; agent not reachable -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

**unenroll**

unenroll(body=body)

Example

  • Api Key Authentication (key):
python
import zrok_api
from zrok_api.models.enroll_request import EnrollRequest
from zrok_api.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to /api/v2
# See configuration.py for a list of all supported configuration parameters.
configuration = zrok_api.Configuration(
    host = "/api/v2"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure API key authorization: key
configuration.api_key['key'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['key'] = 'Bearer'

# Enter a context with an instance of the API client
with zrok_api.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = zrok_api.AgentApi(api_client)
    body = zrok_api.EnrollRequest() # EnrollRequest |  (optional)

    try:
        api_instance.unenroll(body=body)
    except Exception as e:
        print("Exception when calling AgentApi->unenroll: %s\n" % e)

Parameters

Name Type Description Notes
body EnrollRequest [optional]

Return type

void (empty response body)

Authorization

key

HTTP request headers

  • Content-Type: application/zrok.v1+json
  • Accept: Not defined

HTTP response details

Status code Description Response headers
200 ok -
400 bad request; not enrolled -
401 unauthorized -
500 internal server error -

[Back to top] [Back to API list] [Back to Model list] [Back to README]


Sdk Python Src Docs ApplyLimitClassesRequest (`sdk/python/src/docs/ApplyLimitClassesRequest.md`)

ApplyLimitClassesRequest

Properties

Name Type Description Notes
email str [optional]
limit_class_ids List[int] [optional]

Example

python
from zrok_api.models.apply_limit_classes_request import ApplyLimitClassesRequest

# TODO update the JSON string below
json = "{}"
# create an instance of ApplyLimitClassesRequest from a JSON string
apply_limit_classes_request_instance = ApplyLimitClassesRequest.from_json(json)
# print the JSON string representation of the object
print(ApplyLimitClassesRequest.to_json())

# convert the object into a dict
apply_limit_classes_request_dict = apply_limit_classes_request_instance.to_dict()
# create an instance of ApplyLimitClassesRequest from a dict
apply_limit_classes_request_from_dict = ApplyLimitClassesRequest.from_dict(apply_limit_classes_request_dict)

[Back to Model list] [Back to API list] [Back to README]


Sdk Python Src Docs AuthUser (`sdk/python/src/docs/AuthUser.md`)

AuthUser

Properties

Name Type Description Notes
username str [optional]
password str [optional]

Example

python
from zrok_api.models.auth_user import AuthUser

# TODO update the JSON string below
json = "{}"
# create an instance of AuthUser from a JSON string
auth_user_instance = AuthUser.from_json(json)
# print the JSON string representation of the object
print(AuthUser.to_json())

# convert the object into a dict
auth_user_dict = auth_user_instance.to_dict()
# create an instance of AuthUser from a dict
auth_user_from_dict = AuthUser.from_dict(auth_user_dict)

[Back to Model list] [Back to API list] [Back to README]


Sdk Python Src Docs ChangePasswordRequest (`sdk/python/src/docs/ChangePasswordRequest.md`)

ChangePasswordRequest

Properties

Name Type Description Notes
email str [optional]
old_password str [optional]
new_password str [optional]

Example

python
from zrok_api.models.change_password_request import ChangePasswordRequest

# TODO update the JSON string below
json = "{}"
# create an instance of ChangePasswordRequest from a JSON string
change_password_request_instance = ChangePasswordRequest.from_json(json)
# print the JSON string representation of the object
print(ChangePasswordRequest.to_json())

# convert the object into a dict
change_password_request_dict = change_password_request_instance.to_dict()
# create an instance of ChangePasswordRequest from a dict
change_password_request_from_dict = ChangePasswordRequest.from_dict(change_password_request_dict)

[Back to Model list] [Back to API list] [Back to README]


Sdk Python Src Docs ClientVersionCheckRequest (`sdk/python/src/docs/ClientVersionCheckRequest.md`)

ClientVersionCheckRequest

Properties

Name Type Description Notes
client_version str [optional]

Example

python
from zrok_api.models.client_version_check_request import ClientVersionCheckRequest

# TODO update the JSON string below
json = "{}"
# create an instance of ClientVersionCheckRequest from a JSON string
client_version_check_request_instance = ClientVersionCheckRequest.from_json(json)
# print the JSON string representation of the object
print(ClientVersionCheckRequest.to_json())

# convert the object into a dict
client_version_check_request_dict = client_version_check_request_instance.to_dict()
# create an instance of ClientVersionCheckRequest from a dict
client_version_check_request_from_dict = ClientVersionCheckRequest.from_dict(client_version_check_request_dict)

[Back to Model list] [Back to API list] [Back to README]


Sdk Python Src Docs Configuration (`sdk/python/src/docs/Configuration.md`)

Configuration

Properties

Name Type Description Notes
version str [optional]
tou_link str [optional]
new_account_link str [optional]
invites_open bool [optional]
requires_invite_token bool [optional]
invite_token_contact str [optional]

Example

python
from zrok_api.models.configuration import Configuration

# TODO update the JSON string below
json = "{}"
# create an instance of Configuration from a JSON string
configuration_instance = Configuration.from_json(json)
# print the JSON string representation of the object
print(Configuration.to_json())

# convert the object into a dict
configuration_dict = configuration_instance.to_dict()
# create an instance of Configuration from a dict
configuration_from_dict = Configuration.from_dict(configuration_dict)

[Back to Model list] [Back to API list] [Back to README]


Sdk Python Src Docs CreateFrontend201Response (`sdk/python/src/docs/CreateFrontend201Response.md`)

CreateFrontend201Response

Properties

Name Type Description Notes
frontend_token str [optional]

Example

python
from zrok_api.models.create_frontend201_response import CreateFrontend201Response

# TODO update the JSON string below
json = "{}"
# create an instance of CreateFrontend201Response from a JSON string
create_frontend201_response_instance = CreateFrontend201Response.from_json(json)
# print the JSON string representation of the object
print(CreateFrontend201Response.to_json())

# convert the object into a dict
create_frontend201_response_dict = create_frontend201_response_instance.to_dict()
# create an instance of CreateFrontend201Response from a dict
create_frontend201_response_from_dict = CreateFrontend201Response.from_dict(create_frontend201_response_dict)

[Back to Model list] [Back to API list] [Back to README]


Sdk Python Src Docs CreateFrontendRequest (`sdk/python/src/docs/CreateFrontendRequest.md`)

CreateFrontendRequest

Properties

Name Type Description Notes
z_id str [optional]
url_template str [optional]
public_name str [optional]
permission_mode str [optional]
dynamic bool [optional]

Example

python
from zrok_api.models.create_frontend_request import CreateFrontendRequest

# TODO update the JSON string below
json = "{}"
# create an instance of CreateFrontendRequest from a JSON string
create_frontend_request_instance = CreateFrontendRequest.from_json(json)
# print the JSON string representation of the object
print(CreateFrontendRequest.to_json())

# convert the object into a dict
create_frontend_request_dict = create_frontend_request_instance.to_dict()
# create an instance of CreateFrontendRequest from a dict
create_frontend_request_from_dict = CreateFrontendRequest.from_dict(create_frontend_request_dict)

[Back to Model list] [Back to API list] [Back to README]


Sdk Python Src Docs CreateIdentity201Response (`sdk/python/src/docs/CreateIdentity201Response.md`)

CreateIdentity201Response

Properties

Name Type Description Notes
identity str [optional]
cfg str [optional]

Example

python
from zrok_api.models.create_identity201_response import CreateIdentity201Response

# TODO update the JSON string below
json = "{}"
# create an instance of CreateIdentity201Response from a JSON string
create_identity201_response_instance = CreateIdentity201Response.from_json(json)
# print the JSON string representation of the object
print(CreateIdentity201Response.to_json())

# convert the object into a dict
create_identity201_response_dict = create_identity201_response_instance.to_dict()
# create an instance of CreateIdentity201Response from a dict
create_identity201_response_from_dict = CreateIdentity201Response.from_dict(create_identity201_response_dict)

[Back to Model list] [Back to API list] [Back to README]


Sdk Python Src Docs CreateIdentityRequest (`sdk/python/src/docs/CreateIdentityRequest.md`)

CreateIdentityRequest

Properties

Name Type Description Notes
name str [optional]

Example

python
from zrok_api.models.create_identity_request import CreateIdentityRequest

# TODO update the JSON string below
json = "{}"
# create an instance of CreateIdentityRequest from a JSON string
create_identity_request_instance = CreateIdentityRequest.from_json(json)
# print the JSON string representation of the object
print(CreateIdentityRequest.to_json())

# convert the object into a dict
create_identity_request_dict = create_identity_request_instance.to_dict()
# create an instance of CreateIdentityRequest from a dict
create_identity_request_from_dict = CreateIdentityRequest.from_dict(create_identity_request_dict)

[Back to Model list] [Back to API list] [Back to README]


Sdk Python Src Docs CreateNamespace201Response (`sdk/python/src/docs/CreateNamespace201Response.md`)

CreateNamespace201Response

Properties

Name Type Description Notes
namespace_token str [optional]

Example

python
from zrok_api.models.create_namespace201_response import CreateNamespace201Response

# TODO update the JSON string below
json = "{}"
# create an instance of CreateNamespace201Response from a JSON string
create_namespace201_response_instance = CreateNamespace201Response.from_json(json)
# print the JSON string representation of the object
print(CreateNamespace201Response.to_json())

# convert the object into a dict
create_namespace201_response_dict = create_namespace201_response_instance.to_dict()
# create an instance of CreateNamespace201Response from a dict
create_namespace201_response_from_dict = CreateNamespace201Response.from_dict(create_namespace201_response_dict)

[Back to Model list] [Back to API list] [Back to README]


Sdk Python Src Docs CreateNamespaceRequest (`sdk/python/src/docs/CreateNamespaceRequest.md`)

CreateNamespaceRequest

Properties

Name Type Description Notes
token str [optional]
name str [optional]
description str [optional]
open bool [optional]

Example

python
from zrok_api.models.create_namespace_request import CreateNamespaceRequest

# TODO update the JSON string below
json = "{}"
# create an instance of CreateNamespaceRequest from a JSON string
create_namespace_request_instance = CreateNamespaceRequest.from_json(json)
# print the JSON string representation of the object
print(CreateNamespaceRequest.to_json())

# convert the object into a dict
create_namespace_request_dict = create_namespace_request_instance.to_dict()
# create an instance of CreateNamespaceRequest from a dict
create_namespace_request_from_dict = CreateNamespaceRequest.from_dict(create_namespace_request_dict)

[Back to Model list] [Back to API list] [Back to README]


Sdk Python Src Docs CreateOrganization201Response (`sdk/python/src/docs/CreateOrganization201Response.md`)

CreateOrganization201Response

Properties

Name Type Description Notes
organization_token str [optional]

Example

python
from zrok_api.models.create_organization201_response import CreateOrganization201Response

# TODO update the JSON string below
json = "{}"
# create an instance of CreateOrganization201Response from a JSON string
create_organization201_response_instance = CreateOrganization201Response.from_json(json)
# print the JSON string representation of the object
print(CreateOrganization201Response.to_json())

# convert the object into a dict
create_organization201_response_dict = create_organization201_response_instance.to_dict()
# create an instance of CreateOrganization201Response from a dict
create_organization201_response_from_dict = CreateOrganization201Response.from_dict(create_organization201_response_dict)

[Back to Model list] [Back to API list] [Back to README]


Sdk Python Src Docs CreateOrganizationRequest (`sdk/python/src/docs/CreateOrganizationRequest.md`)

CreateOrganizationRequest

Properties

Name Type Description Notes
description str [optional]

Example

python
from zrok_api.models.create_organization_request import CreateOrganizationRequest

# TODO update the JSON string below
json = "{}"
# create an instance of CreateOrganizationRequest from a JSON string
create_organization_request_instance = CreateOrganizationRequest.from_json(json)
# print the JSON string representation of the object
print(CreateOrganizationRequest.to_json())

# convert the object into a dict
create_organization_request_dict = create_organization_request_instance.to_dict()
# create an instance of CreateOrganizationRequest from a dict
create_organization_request_from_dict = CreateOrganizationRequest.from_dict(create_organization_request_dict)

[Back to Model list] [Back to API list] [Back to README]


Sdk Python Src Docs CreateShareNameRequest (`sdk/python/src/docs/CreateShareNameRequest.md`)

CreateShareNameRequest

Properties

Name Type Description Notes
namespace_token str [optional]
name str [optional]

Example

python
from zrok_api.models.create_share_name_request import CreateShareNameRequest

# TODO update the JSON string below
json = "{}"
# create an instance of CreateShareNameRequest from a JSON string
create_share_name_request_instance = CreateShareNameRequest.from_json(json)
# print the JSON string representation of the object
print(CreateShareNameRequest.to_json())

# convert the object into a dict
create_share_name_request_dict = create_share_name_request_instance.to_dict()
# create an instance of CreateShareNameRequest from a dict
create_share_name_request_from_dict = CreateShareNameRequest.from_dict(create_share_name_request_dict)

[Back to Model list] [Back to API list] [Back to README]


Sdk Python Src Docs DeleteIdentityRequest (`sdk/python/src/docs/DeleteIdentityRequest.md`)

DeleteIdentityRequest

Properties

Name Type Description Notes
z_id str [optional]

Example

python
from zrok_api.models.delete_identity_request import DeleteIdentityRequest

# TODO update the JSON string below
json = "{}"
# create an instance of DeleteIdentityRequest from a JSON string
delete_identity_request_instance = DeleteIdentityRequest.from_json(json)
# print the JSON string representation of the object
print(DeleteIdentityRequest.to_json())

# convert the object into a dict
delete_identity_request_dict = delete_identity_request_instance.to_dict()
# create an instance of DeleteIdentityRequest from a dict
delete_identity_request_from_dict = DeleteIdentityRequest.from_dict(delete_identity_request_dict)

[Back to Model list] [Back to API list] [Back to README]


Sdk Python Src Docs DisableRequest (`sdk/python/src/docs/DisableRequest.md`)

DisableRequest

Properties

Name Type Description Notes
identity str [optional]

Example

python
from zrok_api.models.disable_request import DisableRequest

# TODO update the JSON string below
json = "{}"
# create an instance of DisableRequest from a JSON string
disable_request_instance = DisableRequest.from_json(json)
# print the JSON string representation of the object
print(DisableRequest.to_json())

# convert the object into a dict
disable_request_dict = disable_request_instance.to_dict()
# create an instance of DisableRequest from a dict
disable_request_from_dict = DisableRequest.from_dict(disable_request_dict)

[Back to Model list] [Back to API list] [Back to README]


Sdk Python Src Docs EnableRequest (`sdk/python/src/docs/EnableRequest.md`)

EnableRequest

Properties

Name Type Description Notes
description str [optional]
host str [optional]

Example

python
from zrok_api.models.enable_request import EnableRequest

# TODO update the JSON string below
json = "{}"
# create an instance of EnableRequest from a JSON string
enable_request_instance = EnableRequest.from_json(json)
# print the JSON string representation of the object
print(EnableRequest.to_json())

# convert the object into a dict
enable_request_dict = enable_request_instance.to_dict()
# create an instance of EnableRequest from a dict
enable_request_from_dict = EnableRequest.from_dict(enable_request_dict)

[Back to Model list] [Back to API list] [Back to README]


Sdk Python Src Docs Enroll200Response (`sdk/python/src/docs/Enroll200Response.md`)

Enroll200Response

Properties

Name Type Description Notes
token str [optional]

Example

python
from zrok_api.models.enroll200_response import Enroll200Response

# TODO update the JSON string below
json = "{}"
# create an instance of Enroll200Response from a JSON string
enroll200_response_instance = Enroll200Response.from_json(json)
# print the JSON string representation of the object
print(Enroll200Response.to_json())

# convert the object into a dict
enroll200_response_dict = enroll200_response_instance.to_dict()
# create an instance of Enroll200Response from a dict
enroll200_response_from_dict = Enroll200Response.from_dict(enroll200_response_dict)

[Back to Model list] [Back to API list] [Back to README]


Sdk Python Src Docs EnrollRequest (`sdk/python/src/docs/EnrollRequest.md`)

EnrollRequest

Properties

Name Type Description Notes
env_zid str [optional]

Example

python
from zrok_api.models.enroll_request import EnrollRequest

# TODO update the JSON string below
json = "{}"
# create an instance of EnrollRequest from a JSON string
enroll_request_instance = EnrollRequest.from_json(json)
# print the JSON string representation of the object
print(EnrollRequest.to_json())

# convert the object into a dict
enroll_request_dict = enroll_request_instance.to_dict()
# create an instance of EnrollRequest from a dict
enroll_request_from_dict = EnrollRequest.from_dict(enroll_request_dict)

[Back to Model list] [Back to API list] [Back to README]


Sdk Python Src Docs Environment (`sdk/python/src/docs/Environment.md`)

Environment

Properties

Name Type Description Notes
description str [optional]
host str [optional]
address str [optional]
z_id str [optional]
remote_agent bool [optional]
activity List[SparkDataSample] [optional]
limited bool [optional]
created_at int [optional]
updated_at int [optional]

Example

python
from zrok_api.models.environment import Environment

# TODO update the JSON string below
json = "{}"
# create an instance of Environment from a JSON string
environment_instance = Environment.from_json(json)
# print the JSON string representation of the object
print(Environment.to_json())

# convert the object into a dict
environment_dict = environment_instance.to_dict()
# create an instance of Environment from a dict
environment_from_dict = Environment.from_dict(environment_dict)

[Back to Model list] [Back to API list] [Back to README]


Sdk Python Src Docs EnvironmentAndResources (`sdk/python/src/docs/EnvironmentAndResources.md`)

EnvironmentAndResources

Properties

Name Type Description Notes
environment Environment [optional]
frontends List[Frontend] [optional]
shares List[Share] [optional]

Example

python
from zrok_api.models.environment_and_resources import EnvironmentAndResources

# TODO update the JSON string below
json = "{}"
# create an instance of EnvironmentAndResources from a JSON string
environment_and_resources_instance = EnvironmentAndResources.from_json(json)
# print the JSON string representation of the object
print(EnvironmentAndResources.to_json())

# convert the object into a dict
environment_and_resources_dict = environment_and_resources_instance.to_dict()
# create an instance of EnvironmentAndResources from a dict
environment_and_resources_from_dict = EnvironmentAndResources.from_dict(environment_and_resources_dict)

[Back to Model list] [Back to API list] [Back to README]


Sdk Python Src Docs EnvironmentApi (`sdk/python/src/docs/EnvironmentApi.md`)

zrok_api.EnvironmentApi

All URIs are relative to /api/v2

Method HTTP request Description
disable POST /disable
enable POST /enable

**disable**

disable(body=body)

Example

  • Api Key Authentication (key):
python
import zrok_api
from zrok_api.models.disable_request import DisableRequest
from zrok_api.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to /api/v2
# See configuration.py for a list of all supported configuration parameters.
configuration = zrok_api.Configuration(
    host = "/api/v2"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure API key authorization: key
configuration.api_key['key'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['key'] = 'Bearer'

# Enter a context with an instance of the API client
with zrok_api.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = zrok_api.EnvironmentApi(api_client)
    body = zrok_api.DisableRequest() # DisableRequest |  (optional)

    try:
        api_instance.disable(body=body)
    except Exception as e:
        print("Exception when calling EnvironmentApi->disable: %s\n" % e)

Parameters

Name Type Description Notes
body DisableRequest [optional]

Return type

void (empty response body)

Authorization

key

HTTP request headers

  • Content-Type: application/zrok.v1+json
  • Accept: Not defined

HTTP response details

Status code Description Response headers
200 environment disabled -
401 invalid environment -
500 internal server error -
503 service unavailable * Retry-After - seconds to wait before retrying

[Back to top] [Back to API list] [Back to Model list] [Back to README]

**enable**

CreateIdentity201Response enable(body=body)

Example

  • Api Key Authentication (key):
python
import zrok_api
from zrok_api.models.create_identity201_response import CreateIdentity201Response
from zrok_api.models.enable_request import EnableRequest
from zrok_api.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to /api/v2
# See configuration.py for a list of all supported configuration parameters.
configuration = zrok_api.Configuration(
    host = "/api/v2"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure API key authorization: key
configuration.api_key['key'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['key'] = 'Bearer'

# Enter a context with an instance of the API client
with zrok_api.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = zrok_api.EnvironmentApi(api_client)
    body = zrok_api.EnableRequest() # EnableRequest |  (optional)

    try:
        api_response = api_instance.enable(body=body)
        print("The response of EnvironmentApi->enable:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling EnvironmentApi->enable: %s\n" % e)

Parameters

Name Type Description Notes
body EnableRequest [optional]

Return type

CreateIdentity201Response

Authorization

key

HTTP request headers

  • Content-Type: application/zrok.v1+json
  • Accept: application/zrok.v1+json

HTTP response details

Status code Description Response headers
201 environment enabled -
401 unauthorized -
404 account not found -
500 internal server error -
503 service unavailable * Retry-After - seconds to wait before retrying

[Back to top] [Back to API list] [Back to Model list] [Back to README]


Sdk Python Src Docs EnvironmentSummary (`sdk/python/src/docs/EnvironmentSummary.md`)

EnvironmentSummary

Properties

Name Type Description Notes
env_zid str [optional]
description str [optional]
host str [optional]
address str [optional]
remote_agent bool [optional]
share_count int [optional]
access_count int [optional]
limited bool [optional]
created_at int [optional]
updated_at int [optional]

Example

python
from zrok_api.models.environment_summary import EnvironmentSummary

# TODO update the JSON string below
json = "{}"
# create an instance of EnvironmentSummary from a JSON string
environment_summary_instance = EnvironmentSummary.from_json(json)
# print the JSON string representation of the object
print(EnvironmentSummary.to_json())

# convert the object into a dict
environment_summary_dict = environment_summary_instance.to_dict()
# create an instance of EnvironmentSummary from a dict
environment_summary_from_dict = EnvironmentSummary.from_dict(environment_summary_dict)

[Back to Model list] [Back to API list] [Back to README]


Sdk Python Src Docs EnvironmentsList (`sdk/python/src/docs/EnvironmentsList.md`)

EnvironmentsList

Properties

Name Type Description Notes
environments List[EnvironmentSummary] [optional]

Example

python
from zrok_api.models.environments_list import EnvironmentsList

# TODO update the JSON string below
json = "{}"
# create an instance of EnvironmentsList from a JSON string
environments_list_instance = EnvironmentsList.from_json(json)
# print the JSON string representation of the object
print(EnvironmentsList.to_json())

# convert the object into a dict
environments_list_dict = environments_list_instance.to_dict()
# create an instance of EnvironmentsList from a dict
environments_list_from_dict = EnvironmentsList.from_dict(environments_list_dict)

[Back to Model list] [Back to API list] [Back to README]


Sdk Python Src Docs Frontend (`sdk/python/src/docs/Frontend.md`)

Frontend

Properties

Name Type Description Notes
id int [optional]
frontend_token str [optional]
share_token str [optional]
backend_mode str [optional]
bind_address str [optional]
description str [optional]
z_id str [optional]
created_at int [optional]
updated_at int [optional]

Example

python
from zrok_api.models.frontend import Frontend

# TODO update the JSON string below
json = "{}"
# create an instance of Frontend from a JSON string
frontend_instance = Frontend.from_json(json)
# print the JSON string representation of the object
print(Frontend.to_json())

# convert the object into a dict
frontend_dict = frontend_instance.to_dict()
# create an instance of Frontend from a dict
frontend_from_dict = Frontend.from_dict(frontend_dict)

[Back to Model list] [Back to API list] [Back to README]


Sdk Python Src Docs GetName200Response (`sdk/python/src/docs/GetName200Response.md`)

GetName200Response

Properties

Name Type Description Notes
namespace_token str
namespace_name str
name str
account_email str
share_token str
reserved bool
created_at int

Example

python
from zrok_api.models.get_name200_response import GetName200Response

# TODO update the JSON string below
json = "{}"
# create an instance of GetName200Response from a JSON string
get_name200_response_instance = GetName200Response.from_json(json)
# print the JSON string representation of the object
print(GetName200Response.to_json())

# convert the object into a dict
get_name200_response_dict = get_name200_response_instance.to_dict()
# create an instance of GetName200Response from a dict
get_name200_response_from_dict = GetName200Response.from_dict(get_name200_response_dict)

[Back to Model list] [Back to API list] [Back to README]


Sdk Python Src Docs GetSkipInterstitialGrant200Response (`sdk/python/src/docs/GetSkipInterstitialGrant200Response.md`)

GetSkipInterstitialGrant200Response

Properties

Name Type Description Notes
email str [optional]
granted bool [optional]

Example

python
from zrok_api.models.get_skip_interstitial_grant200_response import GetSkipInterstitialGrant200Response

# TODO update the JSON string below
json = "{}"
# create an instance of GetSkipInterstitialGrant200Response from a JSON string
get_skip_interstitial_grant200_response_instance = GetSkipInterstitialGrant200Response.from_json(json)
# print the JSON string representation of the object
print(GetSkipInterstitialGrant200Response.to_json())

# convert the object into a dict
get_skip_interstitial_grant200_response_dict = get_skip_interstitial_grant200_response_instance.to_dict()
# create an instance of GetSkipInterstitialGrant200Response from a dict
get_skip_interstitial_grant200_response_from_dict = GetSkipInterstitialGrant200Response.from_dict(get_skip_interstitial_grant200_response_dict)

[Back to Model list] [Back to API list] [Back to README]


Sdk Python Src Docs GetSparklines200Response (`sdk/python/src/docs/GetSparklines200Response.md`)

GetSparklines200Response

Properties

Name Type Description Notes
sparklines List[Metrics] [optional]

Example

python
from zrok_api.models.get_sparklines200_response import GetSparklines200Response

# TODO update the JSON string below
json = "{}"
# create an instance of GetSparklines200Response from a JSON string
get_sparklines200_response_instance = GetSparklines200Response.from_json(json)
# print the JSON string representation of the object
print(GetSparklines200Response.to_json())

# convert the object into a dict
get_sparklines200_response_dict = get_sparklines200_response_instance.to_dict()
# create an instance of GetSparklines200Response from a dict
get_sparklines200_response_from_dict = GetSparklines200Response.from_dict(get_sparklines200_response_dict)

[Back to Model list] [Back to API list] [Back to README]


Sdk Python Src Docs GetSparklinesRequest (`sdk/python/src/docs/GetSparklinesRequest.md`)

GetSparklinesRequest

Properties

Name Type Description Notes
account bool [optional]
environments List[str] [optional]
shares List[str] [optional]

Example

python
from zrok_api.models.get_sparklines_request import GetSparklinesRequest

# TODO update the JSON string below
json = "{}"
# create an instance of GetSparklinesRequest from a JSON string
get_sparklines_request_instance = GetSparklinesRequest.from_json(json)
# print the JSON string representation of the object
print(GetSparklinesRequest.to_json())

# convert the object into a dict
get_sparklines_request_dict = get_sparklines_request_instance.to_dict()
# create an instance of GetSparklinesRequest from a dict
get_sparklines_request_from_dict = GetSparklinesRequest.from_dict(get_sparklines_request_dict)

[Back to Model list] [Back to API list] [Back to README]


Sdk Python Src Docs InviteRequest (`sdk/python/src/docs/InviteRequest.md`)

InviteRequest

Properties

Name Type Description Notes
email str [optional]
invite_token str [optional]

Example

python
from zrok_api.models.invite_request import InviteRequest

# TODO update the JSON string below
json = "{}"
# create an instance of InviteRequest from a JSON string
invite_request_instance = InviteRequest.from_json(json)
# print the JSON string representation of the object
print(InviteRequest.to_json())

# convert the object into a dict
invite_request_dict = invite_request_instance.to_dict()
# create an instance of InviteRequest from a dict
invite_request_from_dict = InviteRequest.from_dict(invite_request_dict)

[Back to Model list] [Back to API list] [Back to README]


Sdk Python Src Docs InviteTokenGenerateRequest (`sdk/python/src/docs/InviteTokenGenerateRequest.md`)

InviteTokenGenerateRequest

Properties

Name Type Description Notes
invite_tokens List[str] [optional]

Example

python
from zrok_api.models.invite_token_generate_request import InviteTokenGenerateRequest

# TODO update the JSON string below
json = "{}"
# create an instance of InviteTokenGenerateRequest from a JSON string
invite_token_generate_request_instance = InviteTokenGenerateRequest.from_json(json)
# print the JSON string representation of the object
print(InviteTokenGenerateRequest.to_json())

# convert the object into a dict
invite_token_generate_request_dict = invite_token_generate_request_instance.to_dict()
# create an instance of InviteTokenGenerateRequest from a dict
invite_token_generate_request_from_dict = InviteTokenGenerateRequest.from_dict(invite_token_generate_request_dict)

[Back to Model list] [Back to API list] [Back to README]


Sdk Python Src Docs LimitClass (`sdk/python/src/docs/LimitClass.md`)

LimitClass

Properties

Name Type Description Notes
id int [optional]
label str [optional]
backend_mode str [optional]
environments int [optional]
shares int [optional]
reserved_shares int [optional]
unique_names int [optional]
share_frontends int [optional]
period_minutes int [optional]
rx_bytes int [optional]
tx_bytes int [optional]
total_bytes int [optional]
limit_action str [optional]
created_at int [optional]
updated_at int [optional]

Example

python
from zrok_api.models.limit_class import LimitClass

# TODO update the JSON string below
json = "{}"
# create an instance of LimitClass from a JSON string
limit_class_instance = LimitClass.from_json(json)
# print the JSON string representation of the object
print(LimitClass.to_json())

# convert the object into a dict
limit_class_dict = limit_class_instance.to_dict()
# create an instance of LimitClass from a dict
limit_class_from_dict = LimitClass.from_dict(limit_class_dict)

[Back to Model list] [Back to API list] [Back to README]


Sdk Python Src Docs ListFrontendNamespaceMappings200ResponseInner (`sdk/python/src/docs/ListFrontendNamespaceMappings200ResponseInner.md`)

ListFrontendNamespaceMappings200ResponseInner

Properties

Name Type Description Notes
namespace_token str [optional]
frontend_token str [optional]
is_default bool [optional]
created_at int [optional]

Example

python
from zrok_api.models.list_frontend_namespace_mappings200_response_inner import ListFrontendNamespaceMappings200ResponseInner

# TODO update the JSON string below
json = "{}"
# create an instance of ListFrontendNamespaceMappings200ResponseInner from a JSON string
list_frontend_namespace_mappings200_response_inner_instance = ListFrontendNamespaceMappings200ResponseInner.from_json(json)
# print the JSON string representation of the object
print(ListFrontendNamespaceMappings200ResponseInner.to_json())

# convert the object into a dict
list_frontend_namespace_mappings200_response_inner_dict = list_frontend_namespace_mappings200_response_inner_instance.to_dict()
# create an instance of ListFrontendNamespaceMappings200ResponseInner from a dict
list_frontend_namespace_mappings200_response_inner_from_dict = ListFrontendNamespaceMappings200ResponseInner.from_dict(list_frontend_namespace_mappings200_response_inner_dict)

[Back to Model list] [Back to API list] [Back to README]


Sdk Python Src Docs ListFrontends200ResponseInner (`sdk/python/src/docs/ListFrontends200ResponseInner.md`)

ListFrontends200ResponseInner

Properties

Name Type Description Notes
frontend_token str [optional]
z_id str [optional]
url_template str [optional]
public_name str [optional]
permission_mode str [optional]
dynamic bool [optional]
created_at int [optional]
updated_at int [optional]

Example

python
from zrok_api.models.list_frontends200_response_inner import ListFrontends200ResponseInner

# TODO update the JSON string below
json = "{}"
# create an instance of ListFrontends200ResponseInner from a JSON string
list_frontends200_response_inner_instance = ListFrontends200ResponseInner.from_json(json)
# print the JSON string representation of the object
print(ListFrontends200ResponseInner.to_json())

# convert the object into a dict
list_frontends200_response_inner_dict = list_frontends200_response_inner_instance.to_dict()
# create an instance of ListFrontends200ResponseInner from a dict
list_frontends200_response_inner_from_dict = ListFrontends200ResponseInner.from_dict(list_frontends200_response_inner_dict)

[Back to Model list] [Back to API list] [Back to README]


Sdk Python Src Docs ListLimitClassesRequest (`sdk/python/src/docs/ListLimitClassesRequest.md`)

ListLimitClassesRequest

Properties

Name Type Description Notes
label str [optional]

Example

python
from zrok_api.models.list_limit_classes_request import ListLimitClassesRequest

# TODO update the JSON string below
json = "{}"
# create an instance of ListLimitClassesRequest from a JSON string
list_limit_classes_request_instance = ListLimitClassesRequest.from_json(json)
# print the JSON string representation of the object
print(ListLimitClassesRequest.to_json())

# convert the object into a dict
list_limit_classes_request_dict = list_limit_classes_request_instance.to_dict()
# create an instance of ListLimitClassesRequest from a dict
list_limit_classes_request_from_dict = ListLimitClassesRequest.from_dict(list_limit_classes_request_dict)

[Back to Model list] [Back to API list] [Back to README]


Sdk Python Src Docs ListMemberships200Response (`sdk/python/src/docs/ListMemberships200Response.md`)

ListMemberships200Response

Properties

Name Type Description Notes
memberships List[ListMemberships200ResponseMembershipsInner] [optional]

Example

python
from zrok_api.models.list_memberships200_response import ListMemberships200Response

# TODO update the JSON string below
json = "{}"
# create an instance of ListMemberships200Response from a JSON string
list_memberships200_response_instance = ListMemberships200Response.from_json(json)
# print the JSON string representation of the object
print(ListMemberships200Response.to_json())

# convert the object into a dict
list_memberships200_response_dict = list_memberships200_response_instance.to_dict()
# create an instance of ListMemberships200Response from a dict
list_memberships200_response_from_dict = ListMemberships200Response.from_dict(list_memberships200_response_dict)

[Back to Model list] [Back to API list] [Back to README]


Sdk Python Src Docs ListMemberships200ResponseMembershipsInner (`sdk/python/src/docs/ListMemberships200ResponseMembershipsInner.md`)

ListMemberships200ResponseMembershipsInner

Properties

Name Type Description Notes
organization_token str [optional]
description str [optional]
admin bool [optional]

Example

python
from zrok_api.models.list_memberships200_response_memberships_inner import ListMemberships200ResponseMembershipsInner

# TODO update the JSON string below
json = "{}"
# create an instance of ListMemberships200ResponseMembershipsInner from a JSON string
list_memberships200_response_memberships_inner_instance = ListMemberships200ResponseMembershipsInner.from_json(json)
# print the JSON string representation of the object
print(ListMemberships200ResponseMembershipsInner.to_json())

# convert the object into a dict
list_memberships200_response_memberships_inner_dict = list_memberships200_response_memberships_inner_instance.to_dict()
# create an instance of ListMemberships200ResponseMembershipsInner from a dict
list_memberships200_response_memberships_inner_from_dict = ListMemberships200ResponseMembershipsInner.from_dict(list_memberships200_response_memberships_inner_dict)

[Back to Model list] [Back to API list] [Back to README]


Sdk Python Src Docs ListNamespaces200ResponseInner (`sdk/python/src/docs/ListNamespaces200ResponseInner.md`)

ListNamespaces200ResponseInner

Properties

Name Type Description Notes
namespace_token str [optional]
name str [optional]
description str [optional]
open bool [optional]
created_at int [optional]
updated_at int [optional]

Example

python
from zrok_api.models.list_namespaces200_response_inner import ListNamespaces200ResponseInner

# TODO update the JSON string below
json = "{}"
# create an instance of ListNamespaces200ResponseInner from a JSON string
list_namespaces200_response_inner_instance = ListNamespaces200ResponseInner.from_json(json)
# print the JSON string representation of the object
print(ListNamespaces200ResponseInner.to_json())

# convert the object into a dict
list_namespaces200_response_inner_dict = list_namespaces200_response_inner_instance.to_dict()
# create an instance of ListNamespaces200ResponseInner from a dict
list_namespaces200_response_inner_from_dict = ListNamespaces200ResponseInner.from_dict(list_namespaces200_response_inner_dict)

[Back to Model list] [Back to API list] [Back to README]


Sdk Python Src Docs ListOrganizationMembers200Response (`sdk/python/src/docs/ListOrganizationMembers200Response.md`)

ListOrganizationMembers200Response

Properties

Name Type Description Notes
members List[ListOrganizationMembers200ResponseMembersInner] [optional]

Example

python
from zrok_api.models.list_organization_members200_response import ListOrganizationMembers200Response

# TODO update the JSON string below
json = "{}"
# create an instance of ListOrganizationMembers200Response from a JSON string
list_organization_members200_response_instance = ListOrganizationMembers200Response.from_json(json)
# print the JSON string representation of the object
print(ListOrganizationMembers200Response.to_json())

# convert the object into a dict
list_organization_members200_response_dict = list_organization_members200_response_instance.to_dict()
# create an instance of ListOrganizationMembers200Response from a dict
list_organization_members200_response_from_dict = ListOrganizationMembers200Response.from_dict(list_organization_members200_response_dict)

[Back to Model list] [Back to API list] [Back to README]


Sdk Python Src Docs ListOrganizationMembers200ResponseMembersInner (`sdk/python/src/docs/ListOrganizationMembers200ResponseMembersInner.md`)

ListOrganizationMembers200ResponseMembersInner

Properties

Name Type Description Notes
email str [optional]
admin bool [optional]

Example

python
from zrok_api.models.list_organization_members200_response_members_inner import ListOrganizationMembers200ResponseMembersInner

# TODO update the JSON string below
json = "{}"
# create an instance of ListOrganizationMembers200ResponseMembersInner from a JSON string
list_organization_members200_response_members_inner_instance = ListOrganizationMembers200ResponseMembersInner.from_json(json)
# print the JSON string representation of the object
print(ListOrganizationMembers200ResponseMembersInner.to_json())

# convert the object into a dict
list_organization_members200_response_members_inner_dict = list_organization_members200_response_members_inner_instance.to_dict()
# create an instance of ListOrganizationMembers200ResponseMembersInner from a dict
list_organization_members200_response_members_inner_from_dict = ListOrganizationMembers200ResponseMembersInner.from_dict(list_organization_members200_response_members_inner_dict)

[Back to Model list] [Back to API list] [Back to README]


Sdk Python Src Docs ListOrganizations200Response (`sdk/python/src/docs/ListOrganizations200Response.md`)

ListOrganizations200Response

Properties

Name Type Description Notes
organizations List[ListOrganizations200ResponseOrganizationsInner] [optional]

Example

python
from zrok_api.models.list_organizations200_response import ListOrganizations200Response

# TODO update the JSON string below
json = "{}"
# create an instance of ListOrganizations200Response from a JSON string
list_organizations200_response_instance = ListOrganizations200Response.from_json(json)
# print the JSON string representation of the object
print(ListOrganizations200Response.to_json())

# convert the object into a dict
list_organizations200_response_dict = list_organizations200_response_instance.to_dict()
# create an instance of ListOrganizations200Response from a dict
list_organizations200_response_from_dict = ListOrganizations200Response.from_dict(list_organizations200_response_dict)

[Back to Model list] [Back to API list] [Back to README]


Sdk Python Src Docs ListOrganizations200ResponseOrganizationsInner (`sdk/python/src/docs/ListOrganizations200ResponseOrganizationsInner.md`)

ListOrganizations200ResponseOrganizationsInner

Properties

Name Type Description Notes
organization_token str [optional]
description str [optional]

Example

python
from zrok_api.models.list_organizations200_response_organizations_inner import ListOrganizations200ResponseOrganizationsInner

# TODO update the JSON string below
json = "{}"
# create an instance of ListOrganizations200ResponseOrganizationsInner from a JSON string
list_organizations200_response_organizations_inner_instance = ListOrganizations200ResponseOrganizationsInner.from_json(json)
# print the JSON string representation of the object
print(ListOrganizations200ResponseOrganizationsInner.to_json())

# convert the object into a dict
list_organizations200_response_organizations_inner_dict = list_organizations200_response_organizations_inner_instance.to_dict()
# create an instance of ListOrganizations200ResponseOrganizationsInner from a dict
list_organizations200_response_organizations_inner_from_dict = ListOrganizations200ResponseOrganizationsInner.from_dict(list_organizations200_response_organizations_inner_dict)

[Back to Model list] [Back to API list] [Back to README]


Sdk Python Src Docs ListShareNamespaces200ResponseInner (`sdk/python/src/docs/ListShareNamespaces200ResponseInner.md`)

ListShareNamespaces200ResponseInner

Properties

Name Type Description Notes
namespace_token str [optional]
name str [optional]
description str [optional]

Example

python
from zrok_api.models.list_share_namespaces200_response_inner import ListShareNamespaces200ResponseInner

# TODO update the JSON string below
json = "{}"
# create an instance of ListShareNamespaces200ResponseInner from a JSON string
list_share_namespaces200_response_inner_instance = ListShareNamespaces200ResponseInner.from_json(json)
# print the JSON string representation of the object
print(ListShareNamespaces200ResponseInner.to_json())

# convert the object into a dict
list_share_namespaces200_response_inner_dict = list_share_namespaces200_response_inner_instance.to_dict()
# create an instance of ListShareNamespaces200ResponseInner from a dict
list_share_namespaces200_response_inner_from_dict = ListShareNamespaces200ResponseInner.from_dict(list_share_namespaces200_response_inner_dict)

[Back to Model list] [Back to API list] [Back to README]


Sdk Python Src Docs LoginRequest (`sdk/python/src/docs/LoginRequest.md`)

LoginRequest

Properties

Name Type Description Notes
email str [optional]
password str [optional]

Example

python
from zrok_api.models.login_request import LoginRequest

# TODO update the JSON string below
json = "{}"
# create an instance of LoginRequest from a JSON string
login_request_instance = LoginRequest.from_json(json)
# print the JSON string representation of the object
print(LoginRequest.to_json())

# convert the object into a dict
login_request_dict = login_request_instance.to_dict()
# create an instance of LoginRequest from a dict
login_request_from_dict = LoginRequest.from_dict(login_request_dict)

[Back to Model list] [Back to API list] [Back to README]


Sdk Python Src Docs MetadataApi (`sdk/python/src/docs/MetadataApi.md`)

zrok_api.MetadataApi

All URIs are relative to /api/v2

Method HTTP request Description
client_version_check POST /clientVersionCheck
configuration GET /configuration
get_account_detail GET /detail/account
get_account_metrics GET /metrics/account
get_environment_detail GET /detail/environment/{envZId}
get_environment_metrics GET /metrics/environment/{envId}
get_frontend_detail GET /detail/frontend/{frontendId}
get_share_detail GET /detail/share/{shareToken}
get_share_metrics GET /metrics/share/{shareToken}
get_sparklines POST /sparklines
list_accesses GET /accesses
list_environments GET /environments
list_memberships GET /memberships
list_org_members GET /members/{organizationToken}
list_shares GET /shares
org_account_overview GET /overview/{organizationToken}/{accountEmail}
overview GET /overview
version GET /version
version_inventory GET /versions

**client_version_check**

client_version_check(body=body)

Example

python
import zrok_api
from zrok_api.models.client_version_check_request import ClientVersionCheckRequest
from zrok_api.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to /api/v2
# See configuration.py for a list of all supported configuration parameters.
configuration = zrok_api.Configuration(
    host = "/api/v2"
)


# Enter a context with an instance of the API client
with zrok_api.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = zrok_api.MetadataApi(api_client)
    body = zrok_api.ClientVersionCheckRequest() # ClientVersionCheckRequest |  (optional)

    try:
        api_instance.client_version_check(body=body)
    except Exception as e:
        print("Exception when calling MetadataApi->client_version_check: %s\n" % e)

Parameters

Name Type Description Notes
body ClientVersionCheckRequest [optional]

Return type

void (empty response body)

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/zrok.v1+json
  • Accept: application/zrok.v1+json

HTTP response details

Status code Description Response headers
200 compatible -
400 not compatible -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

**configuration**

Configuration configuration()

Example

python
import zrok_api
from zrok_api.models.configuration import Configuration
from zrok_api.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to /api/v2
# See configuration.py for a list of all supported configuration parameters.
configuration = zrok_api.Configuration(
    host = "/api/v2"
)


# Enter a context with an instance of the API client
with zrok_api.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = zrok_api.MetadataApi(api_client)

    try:
        api_response = api_instance.configuration()
        print("The response of MetadataApi->configuration:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling MetadataApi->configuration: %s\n" % e)

Parameters

This endpoint does not need any parameter.

Return type

Configuration

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/zrok.v1+json

HTTP response details

Status code Description Response headers
200 current configuration -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

**get_account_detail**

List[Environment] get_account_detail()

Example

  • Api Key Authentication (key):
python
import zrok_api
from zrok_api.models.environment import Environment
from zrok_api.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to /api/v2
# See configuration.py for a list of all supported configuration parameters.
configuration = zrok_api.Configuration(
    host = "/api/v2"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure API key authorization: key
configuration.api_key['key'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['key'] = 'Bearer'

# Enter a context with an instance of the API client
with zrok_api.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = zrok_api.MetadataApi(api_client)

    try:
        api_response = api_instance.get_account_detail()
        print("The response of MetadataApi->get_account_detail:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling MetadataApi->get_account_detail: %s\n" % e)

Parameters

This endpoint does not need any parameter.

Return type

List[Environment]

Authorization

key

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/zrok.v1+json

HTTP response details

Status code Description Response headers
200 ok -
500 internal server error -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

**get_account_metrics**

Metrics get_account_metrics(duration=duration)

Example

  • Api Key Authentication (key):
python
import zrok_api
from zrok_api.models.metrics import Metrics
from zrok_api.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to /api/v2
# See configuration.py for a list of all supported configuration parameters.
configuration = zrok_api.Configuration(
    host = "/api/v2"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure API key authorization: key
configuration.api_key['key'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['key'] = 'Bearer'

# Enter a context with an instance of the API client
with zrok_api.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = zrok_api.MetadataApi(api_client)
    duration = 'duration_example' # str |  (optional)

    try:
        api_response = api_instance.get_account_metrics(duration=duration)
        print("The response of MetadataApi->get_account_metrics:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling MetadataApi->get_account_metrics: %s\n" % e)

Parameters

Name Type Description Notes
duration str [optional]

Return type

Metrics

Authorization

key

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/zrok.v1+json

HTTP response details

Status code Description Response headers
200 account metrics -
400 bad request -
500 internal server error -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

**get_environment_detail**

EnvironmentAndResources get_environment_detail(env_zid)

Example

  • Api Key Authentication (key):
python
import zrok_api
from zrok_api.models.environment_and_resources import EnvironmentAndResources
from zrok_api.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to /api/v2
# See configuration.py for a list of all supported configuration parameters.
configuration = zrok_api.Configuration(
    host = "/api/v2"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure API key authorization: key
configuration.api_key['key'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['key'] = 'Bearer'

# Enter a context with an instance of the API client
with zrok_api.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = zrok_api.MetadataApi(api_client)
    env_zid = 'env_zid_example' # str | 

    try:
        api_response = api_instance.get_environment_detail(env_zid)
        print("The response of MetadataApi->get_environment_detail:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling MetadataApi->get_environment_detail: %s\n" % e)

Parameters

Name Type Description Notes
env_zid str

Return type

EnvironmentAndResources

Authorization

key

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/zrok.v1+json

HTTP response details

Status code Description Response headers
200 ok -
401 unauthorized -
404 not found -
500 internal server error -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

**get_environment_metrics**

Metrics get_environment_metrics(env_id, duration=duration)

Example

  • Api Key Authentication (key):
python
import zrok_api
from zrok_api.models.metrics import Metrics
from zrok_api.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to /api/v2
# See configuration.py for a list of all supported configuration parameters.
configuration = zrok_api.Configuration(
    host = "/api/v2"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure API key authorization: key
configuration.api_key['key'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['key'] = 'Bearer'

# Enter a context with an instance of the API client
with zrok_api.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = zrok_api.MetadataApi(api_client)
    env_id = 'env_id_example' # str | 
    duration = 'duration_example' # str |  (optional)

    try:
        api_response = api_instance.get_environment_metrics(env_id, duration=duration)
        print("The response of MetadataApi->get_environment_metrics:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling MetadataApi->get_environment_metrics: %s\n" % e)

Parameters

Name Type Description Notes
env_id str
duration str [optional]

Return type

Metrics

Authorization

key

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/zrok.v1+json

HTTP response details

Status code Description Response headers
200 environment metrics -
400 bad request -
401 unauthorized -
500 internal server error -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

**get_frontend_detail**

Frontend get_frontend_detail(frontend_id)

Example

  • Api Key Authentication (key):
python
import zrok_api
from zrok_api.models.frontend import Frontend
from zrok_api.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to /api/v2
# See configuration.py for a list of all supported configuration parameters.
configuration = zrok_api.Configuration(
    host = "/api/v2"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure API key authorization: key
configuration.api_key['key'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['key'] = 'Bearer'

# Enter a context with an instance of the API client
with zrok_api.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = zrok_api.MetadataApi(api_client)
    frontend_id = 56 # int | 

    try:
        api_response = api_instance.get_frontend_detail(frontend_id)
        print("The response of MetadataApi->get_frontend_detail:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling MetadataApi->get_frontend_detail: %s\n" % e)

Parameters

Name Type Description Notes
frontend_id int

Return type

Frontend

Authorization

key

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/zrok.v1+json

HTTP response details

Status code Description Response headers
200 ok -
401 unauthorized -
404 not found -
500 internal server error -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

**get_share_detail**

Share get_share_detail(share_token)

Example

  • Api Key Authentication (key):
python
import zrok_api
from zrok_api.models.share import Share
from zrok_api.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to /api/v2
# See configuration.py for a list of all supported configuration parameters.
configuration = zrok_api.Configuration(
    host = "/api/v2"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure API key authorization: key
configuration.api_key['key'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['key'] = 'Bearer'

# Enter a context with an instance of the API client
with zrok_api.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = zrok_api.MetadataApi(api_client)
    share_token = 'share_token_example' # str | 

    try:
        api_response = api_instance.get_share_detail(share_token)
        print("The response of MetadataApi->get_share_detail:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling MetadataApi->get_share_detail: %s\n" % e)

Parameters

Name Type Description Notes
share_token str

Return type

Share

Authorization

key

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/zrok.v1+json

HTTP response details

Status code Description Response headers
200 ok -
401 unauthorized -
404 not found -
500 internal server error -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

**get_share_metrics**

Metrics get_share_metrics(share_token, duration=duration)

Example

  • Api Key Authentication (key):
python
import zrok_api
from zrok_api.models.metrics import Metrics
from zrok_api.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to /api/v2
# See configuration.py for a list of all supported configuration parameters.
configuration = zrok_api.Configuration(
    host = "/api/v2"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure API key authorization: key
configuration.api_key['key'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['key'] = 'Bearer'

# Enter a context with an instance of the API client
with zrok_api.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = zrok_api.MetadataApi(api_client)
    share_token = 'share_token_example' # str | 
    duration = 'duration_example' # str |  (optional)

    try:
        api_response = api_instance.get_share_metrics(share_token, duration=duration)
        print("The response of MetadataApi->get_share_metrics:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling MetadataApi->get_share_metrics: %s\n" % e)

Parameters

Name Type Description Notes
share_token str
duration str [optional]

Return type

Metrics

Authorization

key

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/zrok.v1+json

HTTP response details

Status code Description Response headers
200 share metrics -
400 bad request -
401 unauthorized -
500 internal server error -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

**get_sparklines**

GetSparklines200Response get_sparklines(body=body)

Example

  • Api Key Authentication (key):
python
import zrok_api
from zrok_api.models.get_sparklines200_response import GetSparklines200Response
from zrok_api.models.get_sparklines_request import GetSparklinesRequest
from zrok_api.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to /api/v2
# See configuration.py for a list of all supported configuration parameters.
configuration = zrok_api.Configuration(
    host = "/api/v2"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure API key authorization: key
configuration.api_key['key'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['key'] = 'Bearer'

# Enter a context with an instance of the API client
with zrok_api.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = zrok_api.MetadataApi(api_client)
    body = zrok_api.GetSparklinesRequest() # GetSparklinesRequest |  (optional)

    try:
        api_response = api_instance.get_sparklines(body=body)
        print("The response of MetadataApi->get_sparklines:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling MetadataApi->get_sparklines: %s\n" % e)

Parameters

Name Type Description Notes
body GetSparklinesRequest [optional]

Return type

GetSparklines200Response

Authorization

key

HTTP request headers

  • Content-Type: application/zrok.v1+json
  • Accept: application/zrok.v1+json

HTTP response details

Status code Description Response headers
200 sparklines data -
401 unauthorized -
500 internal server error -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

**list_accesses**

AccessesList list_accesses(env_zid=env_zid, share_token=share_token, bind_address=bind_address, description=description, created_after=created_after, created_before=created_before, updated_after=updated_after, updated_before=updated_before)

Example

  • Api Key Authentication (key):
text
/* Detailed source-code truncated for AI context efficiency. */

Parameters

Name Type Description Notes
env_zid str filter by environment ziti identity [optional]
share_token str filter by associated share token [optional]
bind_address str filter by bind address (substring match) [optional]
description str filter by description (substring match) [optional]
created_after str filter by created date (RFC3339 format) [optional]
created_before str filter by created date (RFC3339 format) [optional]
updated_after str filter by updated date (RFC3339 format) [optional]
updated_before str filter by updated date (RFC3339 format) [optional]

Return type

AccessesList

Authorization

key

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/zrok.v1+json

HTTP response details

Status code Description Response headers
200 list of accesses -
400 bad request (e.g., activityDuration exceeds 30d, invalid date format) -
401 unauthorized -
500 internal server error -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

**list_environments**

EnvironmentsList list_environments(description=description, host=host, address=address, remote_agent=remote_agent, has_shares=has_shares, has_accesses=has_accesses, has_activity=has_activity, idle=idle, share_count=share_count, access_count=access_count, created_after=created_after, created_before=created_before, updated_after=updated_after, updated_before=updated_before, activity_duration=activity_duration)

Example

  • Api Key Authentication (key):
text
/* Detailed source-code truncated for AI context efficiency. */

Parameters

Name Type Description Notes
description str filter by description (case-insensitive substring match) [optional]
host str filter by host (case-insensitive substring match) [optional]
address str filter by address (exact match) [optional]
remote_agent bool filter by whether agent is enrolled [optional]
has_shares bool filter by whether environment has active shares [optional]
has_accesses bool filter by whether environment has active accesses [optional]
has_activity bool filter by whether environment has metrics within activityDuration timeframe [optional]
idle bool filter environments WITHOUT recent activity (inverse of hasActivity) [optional]
share_count str filter by share count with operator (e.g., &quot;>0&quot;, &quot;>=5&quot;, &quot;=0&quot;, &quot;<10&quot;, &quot;<=3&quot;) [optional]
access_count str filter by access count with operator (e.g., &quot;>0&quot;, &quot;>=5&quot;, &quot;=0&quot;, &quot;<10&quot;, &quot;<=3&quot;) [optional]
created_after str filter by created date (RFC3339 datetime, inclusive) [optional]
created_before str filter by created date (RFC3339 datetime, inclusive) [optional]
updated_after str filter by updated date (RFC3339 datetime, inclusive) [optional]
updated_before str filter by updated date (RFC3339 datetime, inclusive) [optional]
activity_duration str duration for hasActivity filter (e.g., &quot;24h&quot;, &quot;7d&quot;, &quot;30d&quot;). default &quot;24h&quot;, maximum &quot;30d&quot; (720h) [optional]

Return type

EnvironmentsList

Authorization

key

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/zrok.v1+json

HTTP response details

Status code Description Response headers
200 list of environments -
400 bad request (e.g., activityDuration exceeds 30d, invalid date format, invalid operator) -
401 unauthorized -
500 internal server error -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

**list_memberships**

ListMemberships200Response list_memberships()

Example

  • Api Key Authentication (key):
python
import zrok_api
from zrok_api.models.list_memberships200_response import ListMemberships200Response
from zrok_api.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to /api/v2
# See configuration.py for a list of all supported configuration parameters.
configuration = zrok_api.Configuration(
    host = "/api/v2"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure API key authorization: key
configuration.api_key['key'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['key'] = 'Bearer'

# Enter a context with an instance of the API client
with zrok_api.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = zrok_api.MetadataApi(api_client)

    try:
        api_response = api_instance.list_memberships()
        print("The response of MetadataApi->list_memberships:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling MetadataApi->list_memberships: %s\n" % e)

Parameters

This endpoint does not need any parameter.

Return type

ListMemberships200Response

Authorization

key

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/zrok.v1+json

HTTP response details

Status code Description Response headers
200 ok -
500 internal server error -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

**list_org_members**

ListOrganizationMembers200Response list_org_members(organization_token)

Example

  • Api Key Authentication (key):
python
import zrok_api
from zrok_api.models.list_organization_members200_response import ListOrganizationMembers200Response
from zrok_api.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to /api/v2
# See configuration.py for a list of all supported configuration parameters.
configuration = zrok_api.Configuration(
    host = "/api/v2"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure API key authorization: key
configuration.api_key['key'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['key'] = 'Bearer'

# Enter a context with an instance of the API client
with zrok_api.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = zrok_api.MetadataApi(api_client)
    organization_token = 'organization_token_example' # str | 

    try:
        api_response = api_instance.list_org_members(organization_token)
        print("The response of MetadataApi->list_org_members:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling MetadataApi->list_org_members: %s\n" % e)

Parameters

Name Type Description Notes
organization_token str

Return type

ListOrganizationMembers200Response

Authorization

key

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/zrok.v1+json

HTTP response details

Status code Description Response headers
200 ok -
404 not found -
500 internal server error -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

**list_shares**

SharesList list_shares(env_zid=env_zid, share_mode=share_mode, backend_mode=backend_mode, share_token=share_token, target=target, permission_mode=permission_mode, has_activity=has_activity, idle=idle, activity_duration=activity_duration, created_after=created_after, created_before=created_before, updated_after=updated_after, updated_before=updated_before)

Example

  • Api Key Authentication (key):
text
/* Detailed source-code truncated for AI context efficiency. */

Parameters

Name Type Description Notes
env_zid str filter by environment ziti identity [optional]
share_mode str filter by share mode (public/private) [optional]
backend_mode str filter by backend mode [optional]
share_token str filter by share token (substring match) [optional]
target str filter by target (substring match) [optional]
permission_mode str filter by permission mode (open/closed) [optional]
has_activity bool filter shares with recent activity [optional]
idle bool filter shares WITHOUT recent activity (inverse of hasActivity) [optional]
activity_duration str duration for hasActivity filter (e.g., &quot;24h&quot;, &quot;7d&quot;, &quot;30d&quot;). default &quot;24h&quot;, maximum &quot;30d&quot; (720h) [optional]
created_after str filter by created date (RFC3339 format) [optional]
created_before str filter by created date (RFC3339 format) [optional]
updated_after str filter by updated date (RFC3339 format) [optional]
updated_before str filter by updated date (RFC3339 format) [optional]

Return type

SharesList

Authorization

key

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/zrok.v1+json

HTTP response details

Status code Description Response headers
200 list of shares -
400 bad request (e.g., activityDuration exceeds 30d, invalid date format) -
401 unauthorized -
500 internal server error -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

**org_account_overview**

Overview org_account_overview(organization_token, account_email)

Example

  • Api Key Authentication (key):
python
import zrok_api
from zrok_api.models.overview import Overview
from zrok_api.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to /api/v2
# See configuration.py for a list of all supported configuration parameters.
configuration = zrok_api.Configuration(
    host = "/api/v2"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure API key authorization: key
configuration.api_key['key'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['key'] = 'Bearer'

# Enter a context with an instance of the API client
with zrok_api.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = zrok_api.MetadataApi(api_client)
    organization_token = 'organization_token_example' # str | 
    account_email = 'account_email_example' # str | 

    try:
        api_response = api_instance.org_account_overview(organization_token, account_email)
        print("The response of MetadataApi->org_account_overview:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling MetadataApi->org_account_overview: %s\n" % e)

Parameters

Name Type Description Notes
organization_token str
account_email str

Return type

Overview

Authorization

key

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/zrok.v1+json

HTTP response details

Status code Description Response headers
200 ok -
404 not found -
500 internal server error -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

**overview**

Overview overview()

Example

  • Api Key Authentication (key):
python
import zrok_api
from zrok_api.models.overview import Overview
from zrok_api.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to /api/v2
# See configuration.py for a list of all supported configuration parameters.
configuration = zrok_api.Configuration(
    host = "/api/v2"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure API key authorization: key
configuration.api_key['key'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['key'] = 'Bearer'

# Enter a context with an instance of the API client
with zrok_api.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = zrok_api.MetadataApi(api_client)

    try:
        api_response = api_instance.overview()
        print("The response of MetadataApi->overview:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling MetadataApi->overview: %s\n" % e)

Parameters

This endpoint does not need any parameter.

Return type

Overview

Authorization

key

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/zrok.v1+json

HTTP response details

Status code Description Response headers
200 overview returned -
500 internal server error -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

**version**

str version()

Example

python
import zrok_api
from zrok_api.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to /api/v2
# See configuration.py for a list of all supported configuration parameters.
configuration = zrok_api.Configuration(
    host = "/api/v2"
)


# Enter a context with an instance of the API client
with zrok_api.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = zrok_api.MetadataApi(api_client)

    try:
        api_response = api_instance.version()
        print("The response of MetadataApi->version:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling MetadataApi->version: %s\n" % e)

Parameters

This endpoint does not need any parameter.

Return type

str

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/zrok.v1+json

HTTP response details

Status code Description Response headers
200 legacy upgrade required -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

**version_inventory**

VersionInventory200Response version_inventory()

Example

python
import zrok_api
from zrok_api.models.version_inventory200_response import VersionInventory200Response
from zrok_api.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to /api/v2
# See configuration.py for a list of all supported configuration parameters.
configuration = zrok_api.Configuration(
    host = "/api/v2"
)


# Enter a context with an instance of the API client
with zrok_api.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = zrok_api.MetadataApi(api_client)

    try:
        api_response = api_instance.version_inventory()
        print("The response of MetadataApi->version_inventory:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling MetadataApi->version_inventory: %s\n" % e)

Parameters

This endpoint does not need any parameter.

Return type

VersionInventory200Response

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/zrok.v1+json

HTTP response details

Status code Description Response headers
200 ok -

[Back to top] [Back to API list] [Back to Model list] [Back to README]


Sdk Python Src Docs Metrics (`sdk/python/src/docs/Metrics.md`)

Metrics

Properties

Name Type Description Notes
scope str [optional]
id str [optional]
period float [optional]
samples List[MetricsSample] [optional]

Example

python
from zrok_api.models.metrics import Metrics

# TODO update the JSON string below
json = "{}"
# create an instance of Metrics from a JSON string
metrics_instance = Metrics.from_json(json)
# print the JSON string representation of the object
print(Metrics.to_json())

# convert the object into a dict
metrics_dict = metrics_instance.to_dict()
# create an instance of Metrics from a dict
metrics_from_dict = Metrics.from_dict(metrics_dict)

[Back to Model list] [Back to API list] [Back to README]


Sdk Python Src Docs MetricsSample (`sdk/python/src/docs/MetricsSample.md`)

MetricsSample

Properties

Name Type Description Notes
rx float [optional]
tx float [optional]
timestamp float [optional]

Example

python
from zrok_api.models.metrics_sample import MetricsSample

# TODO update the JSON string below
json = "{}"
# create an instance of MetricsSample from a JSON string
metrics_sample_instance = MetricsSample.from_json(json)
# print the JSON string representation of the object
print(MetricsSample.to_json())

# convert the object into a dict
metrics_sample_dict = metrics_sample_instance.to_dict()
# create an instance of MetricsSample from a dict
metrics_sample_from_dict = MetricsSample.from_dict(metrics_sample_dict)

[Back to Model list] [Back to API list] [Back to README]


Sdk Python Src Docs Name (`sdk/python/src/docs/Name.md`)

Name

Properties

Name Type Description Notes
namespace_token str [optional]
namespace_name str [optional]
name str [optional]
share_token str [optional]
reserved bool [optional]
created_at int [optional]

Example

python
from zrok_api.models.name import Name

# TODO update the JSON string below
json = "{}"
# create an instance of Name from a JSON string
name_instance = Name.from_json(json)
# print the JSON string representation of the object
print(Name.to_json())

# convert the object into a dict
name_dict = name_instance.to_dict()
# create an instance of Name from a dict
name_from_dict = Name.from_dict(name_dict)

[Back to Model list] [Back to API list] [Back to README]


Sdk Python Src Docs NameSelection (`sdk/python/src/docs/NameSelection.md`)

NameSelection

Properties

Name Type Description Notes
namespace_token str [optional]
name str [optional]

Example

python
from zrok_api.models.name_selection import NameSelection

# TODO update the JSON string below
json = "{}"
# create an instance of NameSelection from a JSON string
name_selection_instance = NameSelection.from_json(json)
# print the JSON string representation of the object
print(NameSelection.to_json())

# convert the object into a dict
name_selection_dict = name_selection_instance.to_dict()
# create an instance of NameSelection from a dict
name_selection_from_dict = NameSelection.from_dict(name_selection_dict)

[Back to Model list] [Back to API list] [Back to README]


Sdk Python Src Docs OverviewNamesInner (`sdk/python/src/docs/OverviewNamesInner.md`)

OverviewNamesInner

Properties

Name Type Description Notes
namespace_token str [optional]
namespace_name str [optional]
name str [optional]
share_token str [optional]
reserved bool [optional]
created_at int [optional]

Example

python
from zrok_api.models.overview_names_inner import OverviewNamesInner

# TODO update the JSON string below
json = "{}"
# create an instance of OverviewNamesInner from a JSON string
overview_names_inner_instance = OverviewNamesInner.from_json(json)
# print the JSON string representation of the object
print(OverviewNamesInner.to_json())

# convert the object into a dict
overview_names_inner_dict = overview_names_inner_instance.to_dict()
# create an instance of OverviewNamesInner from a dict
overview_names_inner_from_dict = OverviewNamesInner.from_dict(overview_names_inner_dict)

[Back to Model list] [Back to API list] [Back to README]


Sdk Python Src Docs Ping200Response (`sdk/python/src/docs/Ping200Response.md`)

Ping200Response

Properties

Name Type Description Notes
version str [optional]

Example

python
from zrok_api.models.ping200_response import Ping200Response

# TODO update the JSON string below
json = "{}"
# create an instance of Ping200Response from a JSON string
ping200_response_instance = Ping200Response.from_json(json)
# print the JSON string representation of the object
print(Ping200Response.to_json())

# convert the object into a dict
ping200_response_dict = ping200_response_instance.to_dict()
# create an instance of Ping200Response from a dict
ping200_response_from_dict = Ping200Response.from_dict(ping200_response_dict)

[Back to Model list] [Back to API list] [Back to README]


Sdk Python Src Docs Principal (`sdk/python/src/docs/Principal.md`)

Principal

Properties

Name Type Description Notes
id int [optional]
email str [optional]
token str [optional]
limitless bool [optional]
admin bool [optional]

Example

python
from zrok_api.models.principal import Principal

# TODO update the JSON string below
json = "{}"
# create an instance of Principal from a JSON string
principal_instance = Principal.from_json(json)
# print the JSON string representation of the object
print(Principal.to_json())

# convert the object into a dict
principal_dict = principal_instance.to_dict()
# create an instance of Principal from a dict
principal_from_dict = Principal.from_dict(principal_dict)

[Back to Model list] [Back to API list] [Back to README]


Sdk Python Src Docs RegenerateAccountToken200Response (`sdk/python/src/docs/RegenerateAccountToken200Response.md`)

RegenerateAccountToken200Response

Properties

Name Type Description Notes
account_token str [optional]

Example

python
from zrok_api.models.regenerate_account_token200_response import RegenerateAccountToken200Response

# TODO update the JSON string below
json = "{}"
# create an instance of RegenerateAccountToken200Response from a JSON string
regenerate_account_token200_response_instance = RegenerateAccountToken200Response.from_json(json)
# print the JSON string representation of the object
print(RegenerateAccountToken200Response.to_json())

# convert the object into a dict
regenerate_account_token200_response_dict = regenerate_account_token200_response_instance.to_dict()
# create an instance of RegenerateAccountToken200Response from a dict
regenerate_account_token200_response_from_dict = RegenerateAccountToken200Response.from_dict(regenerate_account_token200_response_dict)

[Back to Model list] [Back to API list] [Back to README]


Sdk Python Src Docs RegenerateAccountTokenRequest (`sdk/python/src/docs/RegenerateAccountTokenRequest.md`)

RegenerateAccountTokenRequest

Properties

Name Type Description Notes
email_address str [optional]

Example

python
from zrok_api.models.regenerate_account_token_request import RegenerateAccountTokenRequest

# TODO update the JSON string below
json = "{}"
# create an instance of RegenerateAccountTokenRequest from a JSON string
regenerate_account_token_request_instance = RegenerateAccountTokenRequest.from_json(json)
# print the JSON string representation of the object
print(RegenerateAccountTokenRequest.to_json())

# convert the object into a dict
regenerate_account_token_request_dict = regenerate_account_token_request_instance.to_dict()
# create an instance of RegenerateAccountTokenRequest from a dict
regenerate_account_token_request_from_dict = RegenerateAccountTokenRequest.from_dict(regenerate_account_token_request_dict)

[Back to Model list] [Back to API list] [Back to README]


Sdk Python Src Docs RegisterRequest (`sdk/python/src/docs/RegisterRequest.md`)

RegisterRequest

Properties

Name Type Description Notes
register_token str [optional]
password str [optional]

Example

python
from zrok_api.models.register_request import RegisterRequest

# TODO update the JSON string below
json = "{}"
# create an instance of RegisterRequest from a JSON string
register_request_instance = RegisterRequest.from_json(json)
# print the JSON string representation of the object
print(RegisterRequest.to_json())

# convert the object into a dict
register_request_dict = register_request_instance.to_dict()
# create an instance of RegisterRequest from a dict
register_request_from_dict = RegisterRequest.from_dict(register_request_dict)

[Back to Model list] [Back to API list] [Back to README]


Sdk Python Src Docs RemoteAccessRequest (`sdk/python/src/docs/RemoteAccessRequest.md`)

RemoteAccessRequest

Properties

Name Type Description Notes
env_zid str [optional]
token str [optional]
bind_address str [optional]
auto_mode bool [optional]
auto_address str [optional]
auto_start_port int [optional]
auto_end_port int [optional]
response_headers List[str] [optional]

Example

python
from zrok_api.models.remote_access_request import RemoteAccessRequest

# TODO update the JSON string below
json = "{}"
# create an instance of RemoteAccessRequest from a JSON string
remote_access_request_instance = RemoteAccessRequest.from_json(json)
# print the JSON string representation of the object
print(RemoteAccessRequest.to_json())

# convert the object into a dict
remote_access_request_dict = remote_access_request_instance.to_dict()
# create an instance of RemoteAccessRequest from a dict
remote_access_request_from_dict = RemoteAccessRequest.from_dict(remote_access_request_dict)

[Back to Model list] [Back to API list] [Back to README]


Sdk Python Src Docs RemoteShare200Response (`sdk/python/src/docs/RemoteShare200Response.md`)

RemoteShare200Response

Properties

Name Type Description Notes
token str [optional]
frontend_endpoints List[str] [optional]

Example

python
from zrok_api.models.remote_share200_response import RemoteShare200Response

# TODO update the JSON string below
json = "{}"
# create an instance of RemoteShare200Response from a JSON string
remote_share200_response_instance = RemoteShare200Response.from_json(json)
# print the JSON string representation of the object
print(RemoteShare200Response.to_json())

# convert the object into a dict
remote_share200_response_dict = remote_share200_response_instance.to_dict()
# create an instance of RemoteShare200Response from a dict
remote_share200_response_from_dict = RemoteShare200Response.from_dict(remote_share200_response_dict)

[Back to Model list] [Back to API list] [Back to README]


Sdk Python Src Docs RemoteShareRequest (`sdk/python/src/docs/RemoteShareRequest.md`)

RemoteShareRequest

Properties

Name Type Description Notes
env_zid str [optional]
share_mode str [optional]
token str [optional]
target str [optional]
basic_auth List[str] [optional]
name_selections List[NameSelection] [optional]
private_share_token str [optional]
backend_mode str [optional]
insecure bool [optional]
oauth_provider str [optional]
oauth_email_domains List[str] [optional]
oauth_refresh_interval str [optional]
open bool [optional]
access_grants List[str] [optional]

Example

python
from zrok_api.models.remote_share_request import RemoteShareRequest

# TODO update the JSON string below
json = "{}"
# create an instance of RemoteShareRequest from a JSON string
remote_share_request_instance = RemoteShareRequest.from_json(json)
# print the JSON string representation of the object
print(RemoteShareRequest.to_json())

# convert the object into a dict
remote_share_request_dict = remote_share_request_instance.to_dict()
# create an instance of RemoteShareRequest from a dict
remote_share_request_from_dict = RemoteShareRequest.from_dict(remote_share_request_dict)

[Back to Model list] [Back to API list] [Back to README]


Sdk Python Src Docs RemoteStatus200Response (`sdk/python/src/docs/RemoteStatus200Response.md`)

RemoteStatus200Response

Properties

Name Type Description Notes
shares List[RemoteStatus200ResponseSharesInner] [optional]
accesses List[RemoteStatus200ResponseAccessesInner] [optional]

Example

python
from zrok_api.models.remote_status200_response import RemoteStatus200Response

# TODO update the JSON string below
json = "{}"
# create an instance of RemoteStatus200Response from a JSON string
remote_status200_response_instance = RemoteStatus200Response.from_json(json)
# print the JSON string representation of the object
print(RemoteStatus200Response.to_json())

# convert the object into a dict
remote_status200_response_dict = remote_status200_response_instance.to_dict()
# create an instance of RemoteStatus200Response from a dict
remote_status200_response_from_dict = RemoteStatus200Response.from_dict(remote_status200_response_dict)

[Back to Model list] [Back to API list] [Back to README]


Sdk Python Src Docs RemoteStatus200ResponseAccessesInner (`sdk/python/src/docs/RemoteStatus200ResponseAccessesInner.md`)

RemoteStatus200ResponseAccessesInner

Properties

Name Type Description Notes
frontend_token str [optional]
token str [optional]
bind_address str [optional]
response_headers List[str] [optional]
status str [optional]
failure RemoteStatus200ResponseSharesInnerFailure [optional]

Example

python
from zrok_api.models.remote_status200_response_accesses_inner import RemoteStatus200ResponseAccessesInner

# TODO update the JSON string below
json = "{}"
# create an instance of RemoteStatus200ResponseAccessesInner from a JSON string
remote_status200_response_accesses_inner_instance = RemoteStatus200ResponseAccessesInner.from_json(json)
# print the JSON string representation of the object
print(RemoteStatus200ResponseAccessesInner.to_json())

# convert the object into a dict
remote_status200_response_accesses_inner_dict = remote_status200_response_accesses_inner_instance.to_dict()
# create an instance of RemoteStatus200ResponseAccessesInner from a dict
remote_status200_response_accesses_inner_from_dict = RemoteStatus200ResponseAccessesInner.from_dict(remote_status200_response_accesses_inner_dict)

[Back to Model list] [Back to API list] [Back to README]


Sdk Python Src Docs RemoteStatus200ResponseSharesInner (`sdk/python/src/docs/RemoteStatus200ResponseSharesInner.md`)

RemoteStatus200ResponseSharesInner

Properties

Name Type Description Notes
token str [optional]
share_mode str [optional]
backend_mode str [optional]
frontend_endpoints List[str] [optional]
backend_endpoint str [optional]
open bool [optional]
status str [optional]
failure RemoteStatus200ResponseSharesInnerFailure [optional]

Example

python
from zrok_api.models.remote_status200_response_shares_inner import RemoteStatus200ResponseSharesInner

# TODO update the JSON string below
json = "{}"
# create an instance of RemoteStatus200ResponseSharesInner from a JSON string
remote_status200_response_shares_inner_instance = RemoteStatus200ResponseSharesInner.from_json(json)
# print the JSON string representation of the object
print(RemoteStatus200ResponseSharesInner.to_json())

# convert the object into a dict
remote_status200_response_shares_inner_dict = remote_status200_response_shares_inner_instance.to_dict()
# create an instance of RemoteStatus200ResponseSharesInner from a dict
remote_status200_response_shares_inner_from_dict = RemoteStatus200ResponseSharesInner.from_dict(remote_status200_response_shares_inner_dict)

[Back to Model list] [Back to API list] [Back to README]


Sdk Python Src Docs RemoteStatus200ResponseSharesInnerFailure (`sdk/python/src/docs/RemoteStatus200ResponseSharesInnerFailure.md`)

RemoteStatus200ResponseSharesInnerFailure

Properties

Name Type Description Notes
id str [optional]
count int [optional]
last_error str [optional]
next_retry str [optional]

Example

python
from zrok_api.models.remote_status200_response_shares_inner_failure import RemoteStatus200ResponseSharesInnerFailure

# TODO update the JSON string below
json = "{}"
# create an instance of RemoteStatus200ResponseSharesInnerFailure from a JSON string
remote_status200_response_shares_inner_failure_instance = RemoteStatus200ResponseSharesInnerFailure.from_json(json)
# print the JSON string representation of the object
print(RemoteStatus200ResponseSharesInnerFailure.to_json())

# convert the object into a dict
remote_status200_response_shares_inner_failure_dict = remote_status200_response_shares_inner_failure_instance.to_dict()
# create an instance of RemoteStatus200ResponseSharesInnerFailure from a dict
remote_status200_response_shares_inner_failure_from_dict = RemoteStatus200ResponseSharesInnerFailure.from_dict(remote_status200_response_shares_inner_failure_dict)

[Back to Model list] [Back to API list] [Back to README]


Sdk Python Src Docs RemoteUnaccessRequest (`sdk/python/src/docs/RemoteUnaccessRequest.md`)

RemoteUnaccessRequest

Properties

Name Type Description Notes
env_zid str [optional]
frontend_token str [optional]

Example

python
from zrok_api.models.remote_unaccess_request import RemoteUnaccessRequest

# TODO update the JSON string below
json = "{}"
# create an instance of RemoteUnaccessRequest from a JSON string
remote_unaccess_request_instance = RemoteUnaccessRequest.from_json(json)
# print the JSON string representation of the object
print(RemoteUnaccessRequest.to_json())

# convert the object into a dict
remote_unaccess_request_dict = remote_unaccess_request_instance.to_dict()
# create an instance of RemoteUnaccessRequest from a dict
remote_unaccess_request_from_dict = RemoteUnaccessRequest.from_dict(remote_unaccess_request_dict)

[Back to Model list] [Back to API list] [Back to README]


Sdk Python Src Docs RemoteUnshareRequest (`sdk/python/src/docs/RemoteUnshareRequest.md`)

RemoteUnshareRequest

Properties

Name Type Description Notes
env_zid str [optional]
token str [optional]

Example

python
from zrok_api.models.remote_unshare_request import RemoteUnshareRequest

# TODO update the JSON string below
json = "{}"
# create an instance of RemoteUnshareRequest from a JSON string
remote_unshare_request_instance = RemoteUnshareRequest.from_json(json)
# print the JSON string representation of the object
print(RemoteUnshareRequest.to_json())

# convert the object into a dict
remote_unshare_request_dict = remote_unshare_request_instance.to_dict()
# create an instance of RemoteUnshareRequest from a dict
remote_unshare_request_from_dict = RemoteUnshareRequest.from_dict(remote_unshare_request_dict)

[Back to Model list] [Back to API list] [Back to README]


Sdk Python Src Docs RemoveNamespaceFrontendMappingRequest (`sdk/python/src/docs/RemoveNamespaceFrontendMappingRequest.md`)

RemoveNamespaceFrontendMappingRequest

Properties

Name Type Description Notes
namespace_token str [optional]
frontend_token str [optional]

Example

python
from zrok_api.models.remove_namespace_frontend_mapping_request import RemoveNamespaceFrontendMappingRequest

# TODO update the JSON string below
json = "{}"
# create an instance of RemoveNamespaceFrontendMappingRequest from a JSON string
remove_namespace_frontend_mapping_request_instance = RemoveNamespaceFrontendMappingRequest.from_json(json)
# print the JSON string representation of the object
print(RemoveNamespaceFrontendMappingRequest.to_json())

# convert the object into a dict
remove_namespace_frontend_mapping_request_dict = remove_namespace_frontend_mapping_request_instance.to_dict()
# create an instance of RemoveNamespaceFrontendMappingRequest from a dict
remove_namespace_frontend_mapping_request_from_dict = RemoveNamespaceFrontendMappingRequest.from_dict(remove_namespace_frontend_mapping_request_dict)

[Back to Model list] [Back to API list] [Back to README]


Sdk Python Src Docs RemoveOrganizationMemberRequest (`sdk/python/src/docs/RemoveOrganizationMemberRequest.md`)

RemoveOrganizationMemberRequest

Properties

Name Type Description Notes
organization_token str [optional]
email str [optional]

Example

python
from zrok_api.models.remove_organization_member_request import RemoveOrganizationMemberRequest

# TODO update the JSON string below
json = "{}"
# create an instance of RemoveOrganizationMemberRequest from a JSON string
remove_organization_member_request_instance = RemoveOrganizationMemberRequest.from_json(json)
# print the JSON string representation of the object
print(RemoveOrganizationMemberRequest.to_json())

# convert the object into a dict
remove_organization_member_request_dict = remove_organization_member_request_instance.to_dict()
# create an instance of RemoveOrganizationMemberRequest from a dict
remove_organization_member_request_from_dict = RemoveOrganizationMemberRequest.from_dict(remove_organization_member_request_dict)

[Back to Model list] [Back to API list] [Back to README]


Sdk Python Src Docs ResetPasswordRequest (`sdk/python/src/docs/ResetPasswordRequest.md`)

ResetPasswordRequest

Properties

Name Type Description Notes
reset_token str [optional]
password str [optional]

Example

python
from zrok_api.models.reset_password_request import ResetPasswordRequest

# TODO update the JSON string below
json = "{}"
# create an instance of ResetPasswordRequest from a JSON string
reset_password_request_instance = ResetPasswordRequest.from_json(json)
# print the JSON string representation of the object
print(ResetPasswordRequest.to_json())

# convert the object into a dict
reset_password_request_dict = reset_password_request_instance.to_dict()
# create an instance of ResetPasswordRequest from a dict
reset_password_request_from_dict = ResetPasswordRequest.from_dict(reset_password_request_dict)

[Back to Model list] [Back to API list] [Back to README]


Sdk Python Src Docs Share (`sdk/python/src/docs/Share.md`)

Share

Properties

Name Type Description Notes
share_token str [optional]
z_id str [optional]
env_zid str [optional]
share_mode str [optional]
backend_mode str [optional]
frontend_endpoints List[str] [optional]
target str [optional]
activity List[SparkDataSample] [optional]
limited bool [optional]
created_at int [optional]
updated_at int [optional]

Example

python
from zrok_api.models.share import Share

# TODO update the JSON string below
json = "{}"
# create an instance of Share from a JSON string
share_instance = Share.from_json(json)
# print the JSON string representation of the object
print(Share.to_json())

# convert the object into a dict
share_dict = share_instance.to_dict()
# create an instance of Share from a dict
share_from_dict = Share.from_dict(share_dict)

[Back to Model list] [Back to API list] [Back to README]


Sdk Python Src Docs ShareApi (`sdk/python/src/docs/ShareApi.md`)

zrok_api.ShareApi

All URIs are relative to /api/v2

Method HTTP request Description
access POST /access
create_share_name POST /share/name
delete_share_name DELETE /share/name
list_all_names GET /share/names
list_names_for_namespace GET /share/names/{namespaceToken}
list_share_namespaces GET /share/namespaces
share POST /share
unaccess DELETE /unaccess
unshare DELETE /unshare
update_access PATCH /access
update_share PATCH /share
update_share_name PATCH /share/name

**access**

Access201Response access(body=body)

Example

  • Api Key Authentication (key):
python
import zrok_api
from zrok_api.models.access201_response import Access201Response
from zrok_api.models.access_request import AccessRequest
from zrok_api.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to /api/v2
# See configuration.py for a list of all supported configuration parameters.
configuration = zrok_api.Configuration(
    host = "/api/v2"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure API key authorization: key
configuration.api_key['key'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['key'] = 'Bearer'

# Enter a context with an instance of the API client
with zrok_api.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = zrok_api.ShareApi(api_client)
    body = zrok_api.AccessRequest() # AccessRequest |  (optional)

    try:
        api_response = api_instance.access(body=body)
        print("The response of ShareApi->access:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling ShareApi->access: %s\n" % e)

Parameters

Name Type Description Notes
body AccessRequest [optional]

Return type

Access201Response

Authorization

key

HTTP request headers

  • Content-Type: application/zrok.v1+json
  • Accept: application/zrok.v1+json

HTTP response details

Status code Description Response headers
201 access created -
401 unauthorized -
404 not found -
500 internal server error -
503 service unavailable * Retry-After - seconds to wait before retrying

[Back to top] [Back to API list] [Back to Model list] [Back to README]

**create_share_name**

create_share_name(body=body)

Example

  • Api Key Authentication (key):
python
import zrok_api
from zrok_api.models.create_share_name_request import CreateShareNameRequest
from zrok_api.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to /api/v2
# See configuration.py for a list of all supported configuration parameters.
configuration = zrok_api.Configuration(
    host = "/api/v2"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure API key authorization: key
configuration.api_key['key'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['key'] = 'Bearer'

# Enter a context with an instance of the API client
with zrok_api.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = zrok_api.ShareApi(api_client)
    body = zrok_api.CreateShareNameRequest() # CreateShareNameRequest |  (optional)

    try:
        api_instance.create_share_name(body=body)
    except Exception as e:
        print("Exception when calling ShareApi->create_share_name: %s\n" % e)

Parameters

Name Type Description Notes
body CreateShareNameRequest [optional]

Return type

void (empty response body)

Authorization

key

HTTP request headers

  • Content-Type: application/zrok.v1+json
  • Accept: application/zrok.v1+json

HTTP response details

Status code Description Response headers
201 name created -
401 unauthorized -
404 namespace not found -
409 name already exists -
500 internal server error -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

**delete_share_name**

delete_share_name(body=body)

Example

  • Api Key Authentication (key):
python
import zrok_api
from zrok_api.models.create_share_name_request import CreateShareNameRequest
from zrok_api.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to /api/v2
# See configuration.py for a list of all supported configuration parameters.
configuration = zrok_api.Configuration(
    host = "/api/v2"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure API key authorization: key
configuration.api_key['key'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['key'] = 'Bearer'

# Enter a context with an instance of the API client
with zrok_api.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = zrok_api.ShareApi(api_client)
    body = zrok_api.CreateShareNameRequest() # CreateShareNameRequest |  (optional)

    try:
        api_instance.delete_share_name(body=body)
    except Exception as e:
        print("Exception when calling ShareApi->delete_share_name: %s\n" % e)

Parameters

Name Type Description Notes
body CreateShareNameRequest [optional]

Return type

void (empty response body)

Authorization

key

HTTP request headers

  • Content-Type: application/zrok.v1+json
  • Accept: application/zrok.v1+json

HTTP response details

Status code Description Response headers
200 name deleted -
401 unauthorized -
404 name not found -
409 name is still attached to an active share -
500 internal server error -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

**list_all_names**

List[Name] list_all_names()

Example

  • Api Key Authentication (key):
python
import zrok_api
from zrok_api.models.name import Name
from zrok_api.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to /api/v2
# See configuration.py for a list of all supported configuration parameters.
configuration = zrok_api.Configuration(
    host = "/api/v2"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure API key authorization: key
configuration.api_key['key'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['key'] = 'Bearer'

# Enter a context with an instance of the API client
with zrok_api.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = zrok_api.ShareApi(api_client)

    try:
        api_response = api_instance.list_all_names()
        print("The response of ShareApi->list_all_names:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling ShareApi->list_all_names: %s\n" % e)

Parameters

This endpoint does not need any parameter.

Return type

List[Name]

Authorization

key

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/zrok.v1+json

HTTP response details

Status code Description Response headers
200 ok -
401 unauthorized -
500 internal server error -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

**list_names_for_namespace**

List[Name] list_names_for_namespace(namespace_token)

Example

  • Api Key Authentication (key):
python
import zrok_api
from zrok_api.models.name import Name
from zrok_api.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to /api/v2
# See configuration.py for a list of all supported configuration parameters.
configuration = zrok_api.Configuration(
    host = "/api/v2"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure API key authorization: key
configuration.api_key['key'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['key'] = 'Bearer'

# Enter a context with an instance of the API client
with zrok_api.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = zrok_api.ShareApi(api_client)
    namespace_token = 'namespace_token_example' # str | 

    try:
        api_response = api_instance.list_names_for_namespace(namespace_token)
        print("The response of ShareApi->list_names_for_namespace:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling ShareApi->list_names_for_namespace: %s\n" % e)

Parameters

Name Type Description Notes
namespace_token str

Return type

List[Name]

Authorization

key

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/zrok.v1+json

HTTP response details

Status code Description Response headers
200 ok -
401 unauthorized -
404 namespace not found -
500 internal server error -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

**list_share_namespaces**

List[ListShareNamespaces200ResponseInner] list_share_namespaces()

Example

  • Api Key Authentication (key):
python
import zrok_api
from zrok_api.models.list_share_namespaces200_response_inner import ListShareNamespaces200ResponseInner
from zrok_api.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to /api/v2
# See configuration.py for a list of all supported configuration parameters.
configuration = zrok_api.Configuration(
    host = "/api/v2"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure API key authorization: key
configuration.api_key['key'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['key'] = 'Bearer'

# Enter a context with an instance of the API client
with zrok_api.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = zrok_api.ShareApi(api_client)

    try:
        api_response = api_instance.list_share_namespaces()
        print("The response of ShareApi->list_share_namespaces:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling ShareApi->list_share_namespaces: %s\n" % e)

Parameters

This endpoint does not need any parameter.

Return type

List[ListShareNamespaces200ResponseInner]

Authorization

key

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/zrok.v1+json

HTTP response details

Status code Description Response headers
200 ok -
401 unauthorized -
500 internal server error -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

**share**

ShareResponse share(body=body)

Example

  • Api Key Authentication (key):
python
import zrok_api
from zrok_api.models.share_request import ShareRequest
from zrok_api.models.share_response import ShareResponse
from zrok_api.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to /api/v2
# See configuration.py for a list of all supported configuration parameters.
configuration = zrok_api.Configuration(
    host = "/api/v2"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure API key authorization: key
configuration.api_key['key'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['key'] = 'Bearer'

# Enter a context with an instance of the API client
with zrok_api.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = zrok_api.ShareApi(api_client)
    body = zrok_api.ShareRequest() # ShareRequest |  (optional)

    try:
        api_response = api_instance.share(body=body)
        print("The response of ShareApi->share:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling ShareApi->share: %s\n" % e)

Parameters

Name Type Description Notes
body ShareRequest [optional]

Return type

ShareResponse

Authorization

key

HTTP request headers

  • Content-Type: application/zrok.v1+json
  • Accept: application/zrok.v1+json

HTTP response details

Status code Description Response headers
201 share created -
401 unauthorized -
404 not found -
409 conflict -
422 unprocessable -
500 internal server error -
503 service unavailable * Retry-After - seconds to wait before retrying

[Back to top] [Back to API list] [Back to Model list] [Back to README]

**unaccess**

unaccess(body=body)

Example

  • Api Key Authentication (key):
python
import zrok_api
from zrok_api.models.unaccess_request import UnaccessRequest
from zrok_api.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to /api/v2
# See configuration.py for a list of all supported configuration parameters.
configuration = zrok_api.Configuration(
    host = "/api/v2"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure API key authorization: key
configuration.api_key['key'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['key'] = 'Bearer'

# Enter a context with an instance of the API client
with zrok_api.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = zrok_api.ShareApi(api_client)
    body = zrok_api.UnaccessRequest() # UnaccessRequest |  (optional)

    try:
        api_instance.unaccess(body=body)
    except Exception as e:
        print("Exception when calling ShareApi->unaccess: %s\n" % e)

Parameters

Name Type Description Notes
body UnaccessRequest [optional]

Return type

void (empty response body)

Authorization

key

HTTP request headers

  • Content-Type: application/zrok.v1+json
  • Accept: Not defined

HTTP response details

Status code Description Response headers
200 access removed -
401 unauthorized -
404 not found -
500 internal server error -
503 service unavailable * Retry-After - seconds to wait before retrying

[Back to top] [Back to API list] [Back to Model list] [Back to README]

**unshare**

unshare(body=body)

Example

  • Api Key Authentication (key):
python
import zrok_api
from zrok_api.models.unshare_request import UnshareRequest
from zrok_api.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to /api/v2
# See configuration.py for a list of all supported configuration parameters.
configuration = zrok_api.Configuration(
    host = "/api/v2"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure API key authorization: key
configuration.api_key['key'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['key'] = 'Bearer'

# Enter a context with an instance of the API client
with zrok_api.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = zrok_api.ShareApi(api_client)
    body = zrok_api.UnshareRequest() # UnshareRequest |  (optional)

    try:
        api_instance.unshare(body=body)
    except Exception as e:
        print("Exception when calling ShareApi->unshare: %s\n" % e)

Parameters

Name Type Description Notes
body UnshareRequest [optional]

Return type

void (empty response body)

Authorization

key

HTTP request headers

  • Content-Type: application/zrok.v1+json
  • Accept: application/zrok.v1+json

HTTP response details

Status code Description Response headers
200 share removed -
401 unauthorized -
404 not found -
500 internal server error -
503 service unavailable * Retry-After - seconds to wait before retrying

[Back to top] [Back to API list] [Back to Model list] [Back to README]

**update_access**

update_access(body=body)

Example

  • Api Key Authentication (key):
python
import zrok_api
from zrok_api.models.update_access_request import UpdateAccessRequest
from zrok_api.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to /api/v2
# See configuration.py for a list of all supported configuration parameters.
configuration = zrok_api.Configuration(
    host = "/api/v2"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure API key authorization: key
configuration.api_key['key'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['key'] = 'Bearer'

# Enter a context with an instance of the API client
with zrok_api.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = zrok_api.ShareApi(api_client)
    body = zrok_api.UpdateAccessRequest() # UpdateAccessRequest |  (optional)

    try:
        api_instance.update_access(body=body)
    except Exception as e:
        print("Exception when calling ShareApi->update_access: %s\n" % e)

Parameters

Name Type Description Notes
body UpdateAccessRequest [optional]

Return type

void (empty response body)

Authorization

key

HTTP request headers

  • Content-Type: application/zrok.v1+json
  • Accept: Not defined

HTTP response details

Status code Description Response headers
200 access updated -
401 unauthorized -
404 not found -
500 internal server error -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

**update_share**

update_share(body=body)

Example

  • Api Key Authentication (key):
python
import zrok_api
from zrok_api.models.update_share_request import UpdateShareRequest
from zrok_api.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to /api/v2
# See configuration.py for a list of all supported configuration parameters.
configuration = zrok_api.Configuration(
    host = "/api/v2"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure API key authorization: key
configuration.api_key['key'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['key'] = 'Bearer'

# Enter a context with an instance of the API client
with zrok_api.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = zrok_api.ShareApi(api_client)
    body = zrok_api.UpdateShareRequest() # UpdateShareRequest |  (optional)

    try:
        api_instance.update_share(body=body)
    except Exception as e:
        print("Exception when calling ShareApi->update_share: %s\n" % e)

Parameters

Name Type Description Notes
body UpdateShareRequest [optional]

Return type

void (empty response body)

Authorization

key

HTTP request headers

  • Content-Type: application/zrok.v1+json
  • Accept: Not defined

HTTP response details

Status code Description Response headers
200 share updated -
400 bad request -
401 unauthorized -
404 not found -
500 internal server error -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

**update_share_name**

update_share_name(body=body)

Example

  • Api Key Authentication (key):
python
import zrok_api
from zrok_api.models.update_share_name_request import UpdateShareNameRequest
from zrok_api.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to /api/v2
# See configuration.py for a list of all supported configuration parameters.
configuration = zrok_api.Configuration(
    host = "/api/v2"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure API key authorization: key
configuration.api_key['key'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['key'] = 'Bearer'

# Enter a context with an instance of the API client
with zrok_api.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = zrok_api.ShareApi(api_client)
    body = zrok_api.UpdateShareNameRequest() # UpdateShareNameRequest |  (optional)

    try:
        api_instance.update_share_name(body=body)
    except Exception as e:
        print("Exception when calling ShareApi->update_share_name: %s\n" % e)

Parameters

Name Type Description Notes
body UpdateShareNameRequest [optional]

Return type

void (empty response body)

Authorization

key

HTTP request headers

  • Content-Type: application/zrok.v1+json
  • Accept: application/zrok.v1+json

HTTP response details

Status code Description Response headers
200 name updated successfully -
401 unauthorized -
404 name not found -
409 conflict - cannot change reservation state -
500 internal server error -

[Back to top] [Back to API list] [Back to Model list] [Back to README]


Sdk Python Src Docs ShareHttpHealthcheck200Response (`sdk/python/src/docs/ShareHttpHealthcheck200Response.md`)

ShareHttpHealthcheck200Response

Properties

Name Type Description Notes
healthy bool [optional]
error str [optional]

Example

python
from zrok_api.models.share_http_healthcheck200_response import ShareHttpHealthcheck200Response

# TODO update the JSON string below
json = "{}"
# create an instance of ShareHttpHealthcheck200Response from a JSON string
share_http_healthcheck200_response_instance = ShareHttpHealthcheck200Response.from_json(json)
# print the JSON string representation of the object
print(ShareHttpHealthcheck200Response.to_json())

# convert the object into a dict
share_http_healthcheck200_response_dict = share_http_healthcheck200_response_instance.to_dict()
# create an instance of ShareHttpHealthcheck200Response from a dict
share_http_healthcheck200_response_from_dict = ShareHttpHealthcheck200Response.from_dict(share_http_healthcheck200_response_dict)

[Back to Model list] [Back to API list] [Back to README]


Sdk Python Src Docs ShareHttpHealthcheckRequest (`sdk/python/src/docs/ShareHttpHealthcheckRequest.md`)

ShareHttpHealthcheckRequest

Properties

Name Type Description Notes
env_zid str [optional]
share_token str [optional]
http_verb str [optional]
endpoint str [optional]
expected_http_response float [optional]
timeout_ms float [optional]

Example

python
from zrok_api.models.share_http_healthcheck_request import ShareHttpHealthcheckRequest

# TODO update the JSON string below
json = "{}"
# create an instance of ShareHttpHealthcheckRequest from a JSON string
share_http_healthcheck_request_instance = ShareHttpHealthcheckRequest.from_json(json)
# print the JSON string representation of the object
print(ShareHttpHealthcheckRequest.to_json())

# convert the object into a dict
share_http_healthcheck_request_dict = share_http_healthcheck_request_instance.to_dict()
# create an instance of ShareHttpHealthcheckRequest from a dict
share_http_healthcheck_request_from_dict = ShareHttpHealthcheckRequest.from_dict(share_http_healthcheck_request_dict)

[Back to Model list] [Back to API list] [Back to README]


Sdk Python Src Docs ShareRequest (`sdk/python/src/docs/ShareRequest.md`)

ShareRequest

Properties

Name Type Description Notes
env_zid str [optional]
share_mode str [optional]
name_selections List[NameSelection] [optional]
private_share_token str [optional]
backend_mode str [optional]
target str [optional]
auth_scheme str [optional]
basic_auth_users List[AuthUser] [optional]
oauth_provider str [optional]
oauth_email_domains List[str] [optional]
oauth_refresh_interval str [optional]
permission_mode str [optional]
access_grants List[str] [optional]

Example

python
from zrok_api.models.share_request import ShareRequest

# TODO update the JSON string below
json = "{}"
# create an instance of ShareRequest from a JSON string
share_request_instance = ShareRequest.from_json(json)
# print the JSON string representation of the object
print(ShareRequest.to_json())

# convert the object into a dict
share_request_dict = share_request_instance.to_dict()
# create an instance of ShareRequest from a dict
share_request_from_dict = ShareRequest.from_dict(share_request_dict)

[Back to Model list] [Back to API list] [Back to README]


Sdk Python Src Docs ShareResponse (`sdk/python/src/docs/ShareResponse.md`)

ShareResponse

Properties

Name Type Description Notes
frontend_proxy_endpoints List[str] [optional]
share_token str [optional]

Example

python
from zrok_api.models.share_response import ShareResponse

# TODO update the JSON string below
json = "{}"
# create an instance of ShareResponse from a JSON string
share_response_instance = ShareResponse.from_json(json)
# print the JSON string representation of the object
print(ShareResponse.to_json())

# convert the object into a dict
share_response_dict = share_response_instance.to_dict()
# create an instance of ShareResponse from a dict
share_response_from_dict = ShareResponse.from_dict(share_response_dict)

[Back to Model list] [Back to API list] [Back to README]


Sdk Python Src Docs ShareSummary (`sdk/python/src/docs/ShareSummary.md`)

ShareSummary

Properties

Name Type Description Notes
share_token str [optional]
z_id str [optional]
env_zid str [optional]
share_mode str [optional]
backend_mode str [optional]
frontend_endpoints List[str] [optional]
target str [optional]
limited bool [optional]
created_at int [optional]
updated_at int [optional]

Example

python
from zrok_api.models.share_summary import ShareSummary

# TODO update the JSON string below
json = "{}"
# create an instance of ShareSummary from a JSON string
share_summary_instance = ShareSummary.from_json(json)
# print the JSON string representation of the object
print(ShareSummary.to_json())

# convert the object into a dict
share_summary_dict = share_summary_instance.to_dict()
# create an instance of ShareSummary from a dict
share_summary_from_dict = ShareSummary.from_dict(share_summary_dict)

[Back to Model list] [Back to API list] [Back to README]


Sdk Python Src Docs SharesList (`sdk/python/src/docs/SharesList.md`)

SharesList

Properties

Name Type Description Notes
shares List[ShareSummary] [optional]

Example

python
from zrok_api.models.shares_list import SharesList

# TODO update the JSON string below
json = "{}"
# create an instance of SharesList from a JSON string
shares_list_instance = SharesList.from_json(json)
# print the JSON string representation of the object
print(SharesList.to_json())

# convert the object into a dict
shares_list_dict = shares_list_instance.to_dict()
# create an instance of SharesList from a dict
shares_list_from_dict = SharesList.from_dict(shares_list_dict)

[Back to Model list] [Back to API list] [Back to README]


Sdk Python Src Docs SparkDataSample (`sdk/python/src/docs/SparkDataSample.md`)

SparkDataSample

Properties

Name Type Description Notes
rx float [optional]
tx float [optional]

Example

python
from zrok_api.models.spark_data_sample import SparkDataSample

# TODO update the JSON string below
json = "{}"
# create an instance of SparkDataSample from a JSON string
spark_data_sample_instance = SparkDataSample.from_json(json)
# print the JSON string representation of the object
print(SparkDataSample.to_json())

# convert the object into a dict
spark_data_sample_dict = spark_data_sample_instance.to_dict()
# create an instance of SparkDataSample from a dict
spark_data_sample_from_dict = SparkDataSample.from_dict(spark_data_sample_dict)

[Back to Model list] [Back to API list] [Back to README]


Sdk Python Src Docs UnaccessRequest (`sdk/python/src/docs/UnaccessRequest.md`)

UnaccessRequest

Properties

Name Type Description Notes
frontend_token str [optional]
env_zid str [optional]
share_token str [optional]

Example

python
from zrok_api.models.unaccess_request import UnaccessRequest

# TODO update the JSON string below
json = "{}"
# create an instance of UnaccessRequest from a JSON string
unaccess_request_instance = UnaccessRequest.from_json(json)
# print the JSON string representation of the object
print(UnaccessRequest.to_json())

# convert the object into a dict
unaccess_request_dict = unaccess_request_instance.to_dict()
# create an instance of UnaccessRequest from a dict
unaccess_request_from_dict = UnaccessRequest.from_dict(unaccess_request_dict)

[Back to Model list] [Back to API list] [Back to README]


Sdk Python Src Docs UnshareRequest (`sdk/python/src/docs/UnshareRequest.md`)

UnshareRequest

Properties

Name Type Description Notes
env_zid str [optional]
share_token str [optional]

Example

python
from zrok_api.models.unshare_request import UnshareRequest

# TODO update the JSON string below
json = "{}"
# create an instance of UnshareRequest from a JSON string
unshare_request_instance = UnshareRequest.from_json(json)
# print the JSON string representation of the object
print(UnshareRequest.to_json())

# convert the object into a dict
unshare_request_dict = unshare_request_instance.to_dict()
# create an instance of UnshareRequest from a dict
unshare_request_from_dict = UnshareRequest.from_dict(unshare_request_dict)

[Back to Model list] [Back to API list] [Back to README]


Sdk Python Src Docs UpdateAccessRequest (`sdk/python/src/docs/UpdateAccessRequest.md`)

UpdateAccessRequest

Properties

Name Type Description Notes
frontend_token str [optional]
bind_address str [optional]
description str [optional]

Example

python
from zrok_api.models.update_access_request import UpdateAccessRequest

# TODO update the JSON string below
json = "{}"
# create an instance of UpdateAccessRequest from a JSON string
update_access_request_instance = UpdateAccessRequest.from_json(json)
# print the JSON string representation of the object
print(UpdateAccessRequest.to_json())

# convert the object into a dict
update_access_request_dict = update_access_request_instance.to_dict()
# create an instance of UpdateAccessRequest from a dict
update_access_request_from_dict = UpdateAccessRequest.from_dict(update_access_request_dict)

[Back to Model list] [Back to API list] [Back to README]


Sdk Python Src Docs UpdateFrontendRequest (`sdk/python/src/docs/UpdateFrontendRequest.md`)

UpdateFrontendRequest

Properties

Name Type Description Notes
frontend_token str [optional]
public_name str [optional]
url_template str [optional]
dynamic bool [optional]
dynamic_set bool [optional]

Example

python
from zrok_api.models.update_frontend_request import UpdateFrontendRequest

# TODO update the JSON string below
json = "{}"
# create an instance of UpdateFrontendRequest from a JSON string
update_frontend_request_instance = UpdateFrontendRequest.from_json(json)
# print the JSON string representation of the object
print(UpdateFrontendRequest.to_json())

# convert the object into a dict
update_frontend_request_dict = update_frontend_request_instance.to_dict()
# create an instance of UpdateFrontendRequest from a dict
update_frontend_request_from_dict = UpdateFrontendRequest.from_dict(update_frontend_request_dict)

[Back to Model list] [Back to API list] [Back to README]


Sdk Python Src Docs UpdateNamespaceRequest (`sdk/python/src/docs/UpdateNamespaceRequest.md`)

UpdateNamespaceRequest

Properties

Name Type Description Notes
namespace_token str [optional]
name str [optional]
description str [optional]
open bool [optional]
open_set bool [optional]

Example

python
from zrok_api.models.update_namespace_request import UpdateNamespaceRequest

# TODO update the JSON string below
json = "{}"
# create an instance of UpdateNamespaceRequest from a JSON string
update_namespace_request_instance = UpdateNamespaceRequest.from_json(json)
# print the JSON string representation of the object
print(UpdateNamespaceRequest.to_json())

# convert the object into a dict
update_namespace_request_dict = update_namespace_request_instance.to_dict()
# create an instance of UpdateNamespaceRequest from a dict
update_namespace_request_from_dict = UpdateNamespaceRequest.from_dict(update_namespace_request_dict)

[Back to Model list] [Back to API list] [Back to README]


Sdk Python Src Docs UpdateShareNameRequest (`sdk/python/src/docs/UpdateShareNameRequest.md`)

UpdateShareNameRequest

Properties

Name Type Description Notes
namespace_token str [optional]
name str [optional]
reserved bool whether the name should be reserved (true) or released (false) [optional]

Example

python
from zrok_api.models.update_share_name_request import UpdateShareNameRequest

# TODO update the JSON string below
json = "{}"
# create an instance of UpdateShareNameRequest from a JSON string
update_share_name_request_instance = UpdateShareNameRequest.from_json(json)
# print the JSON string representation of the object
print(UpdateShareNameRequest.to_json())

# convert the object into a dict
update_share_name_request_dict = update_share_name_request_instance.to_dict()
# create an instance of UpdateShareNameRequest from a dict
update_share_name_request_from_dict = UpdateShareNameRequest.from_dict(update_share_name_request_dict)

[Back to Model list] [Back to API list] [Back to README]


Sdk Python Src Docs UpdateShareRequest (`sdk/python/src/docs/UpdateShareRequest.md`)

UpdateShareRequest

Properties

Name Type Description Notes
share_token str [optional]
add_access_grants List[str] [optional]
remove_access_grants List[str] [optional]

Example

python
from zrok_api.models.update_share_request import UpdateShareRequest

# TODO update the JSON string below
json = "{}"
# create an instance of UpdateShareRequest from a JSON string
update_share_request_instance = UpdateShareRequest.from_json(json)
# print the JSON string representation of the object
print(UpdateShareRequest.to_json())

# convert the object into a dict
update_share_request_dict = update_share_request_instance.to_dict()
# create an instance of UpdateShareRequest from a dict
update_share_request_from_dict = UpdateShareRequest.from_dict(update_share_request_dict)

[Back to Model list] [Back to API list] [Back to README]


Sdk Python Src Docs Verify200Response (`sdk/python/src/docs/Verify200Response.md`)

Verify200Response

Properties

Name Type Description Notes
email str [optional]

Example

python
from zrok_api.models.verify200_response import Verify200Response

# TODO update the JSON string below
json = "{}"
# create an instance of Verify200Response from a JSON string
verify200_response_instance = Verify200Response.from_json(json)
# print the JSON string representation of the object
print(Verify200Response.to_json())

# convert the object into a dict
verify200_response_dict = verify200_response_instance.to_dict()
# create an instance of Verify200Response from a dict
verify200_response_from_dict = Verify200Response.from_dict(verify200_response_dict)

[Back to Model list] [Back to API list] [Back to README]


Sdk Python Src Docs VerifyRequest (`sdk/python/src/docs/VerifyRequest.md`)

VerifyRequest

Properties

Name Type Description Notes
register_token str [optional]

Example

python
from zrok_api.models.verify_request import VerifyRequest

# TODO update the JSON string below
json = "{}"
# create an instance of VerifyRequest from a JSON string
verify_request_instance = VerifyRequest.from_json(json)
# print the JSON string representation of the object
print(VerifyRequest.to_json())

# convert the object into a dict
verify_request_dict = verify_request_instance.to_dict()
# create an instance of VerifyRequest from a dict
verify_request_from_dict = VerifyRequest.from_dict(verify_request_dict)

[Back to Model list] [Back to API list] [Back to README]


Sdk Python Src Docs VersionInventory200Response (`sdk/python/src/docs/VersionInventory200Response.md`)

VersionInventory200Response

Properties

Name Type Description Notes
controller_version str [optional]

Example

python
from zrok_api.models.version_inventory200_response import VersionInventory200Response

# TODO update the JSON string below
json = "{}"
# create an instance of VersionInventory200Response from a JSON string
version_inventory200_response_instance = VersionInventory200Response.from_json(json)
# print the JSON string representation of the object
print(VersionInventory200Response.to_json())

# convert the object into a dict
version_inventory200_response_dict = version_inventory200_response_instance.to_dict()
# create an instance of VersionInventory200Response from a dict
version_inventory200_response_from_dict = VersionInventory200Response.from_dict(version_inventory200_response_dict)

[Back to Model list] [Back to API list] [Back to README]


Attic Network Category .Json (`website/docs/_attic/network/_category_.json`)

{
"label": "Network",
"position": 60,
"link": {
"type": "generated-index",
}
}


Attic Sharing Category .Json (`website/docs/_attic/sharing/_category_.json`)

{
"label": "Sharing",
"position": 20,
"link": {
"type": "generated-index",
}
}


Attic Sharing Reserved Services (`website/docs/_attic/sharing/reserved_services.md`)

Reserved Services

With v0.3, zrok introduced a concept of "reserving" services. The intention is that the zrok control plane will support limits on the number of reserved services (and eventually frontendinstances) that an account is allowed to utilize. Service reservations could also be time-limited, or possibly even bandwidth-limited (the reservation expires after a bandwidth threshold is crossed).

Reserved Services Example

With v0.3 zrok introduced the zrok reserve command:

text
$ zrok reserve private http://localhost:9090
[   0.047]    INFO main.(*reserveCommand).run: your reserved service token is 'x88xujrpk4k3'
[   0.048]    INFO main.(*reserveCommand).run: your reserved service frontend is 'http://x88xujrpk4k3.zrok.quigley.com:8080/'

The reserve command creates a service reservation that allows a service to become non-ephemeral. The service token x88xujrpk4k3 is guaranteed to exist between backend executions.

Running a backend against a service reservation is done like this:

text
$ zrok share reserved x88xujrpk4k3
[   0.005]    INFO main.(*shareReservedCommand).run: sharing target endpoint: 'http://localhost:9090'
[   0.040]    INFO main.(*shareReservedCommand).run: use this command to access your zrok service: 'zrok access private x88xujrpk4k3'
^C
$ zrok share reserved x88xujrpk4k3
[   0.007]    INFO main.(*shareReservedCommand).run: sharing target endpoint: 'http://localhost:9090'
[   0.047]    INFO main.(*shareReservedCommand).run: use this command to access your zrok service: 'zrok access private x88xujrpk4k3'

The share reserved comand starts a backend process for the service. User-facing and public-facing frontend instances are allowed to come and go, just as if the service were ephemeral.

Releasing a reserved service is done with the zrok release command:

text
$ zrok release x88xujrpk4k3
[   0.056]    INFO main.(*releaseCommand).run: reserved service 'x88xujrpk4k3' released

Attic Sharing Sharing Modes (`website/docs/_attic/sharing/sharing_modes.md`)

Public/Private Sharing

In v0.3 new sharing modes and new types of built-in services were introduced.

Share Modes

Note: In v0.3, the tunnel and untunnel concepts get renamed to share and unshare.

Note: We're going to continue using frontend and backend as concepts, even though those words will be changing in the zrok CLI. A frontend will continue to describe an "ingress" into the zrokservice, and is the tool that is used by the user "consuming" or access-ing the the zrok service. A backend will continue to describe the "binding" created by a user that wants to share a resource.

Public Sharing

In v0.2, zrok only offered a "public" sharing mode. The public sharing mode will allow any configured frontend instances to send traffic to any backend. The policy and permission model was very simple and flat. A v0.2 deployment considers any available frontend instance to be allowed to send traffic to configured services. The access for frontend instances is controlled by identity provisioning within the underlying OpenZiti network.

In v0.3, zrok will offer both a "public" and a "private" sharing mode. When v0.3 configures the policies for a service, a publicly-shared service will have policies created that allow whichever selected public frontend instances to access the shared backend. A v0.3 deployment will have a collection of multi-tenant, high-capacity frontend instances available to be selected from. The zrok CLI will default to selecting the public frontend instances.

The frontend selection approach also gives us a clean implementation for picking public frontend instances based on geography (either network or physical). The production zrok.io service could easily offer multiple different fleets of frontend instances, and this mechanism will allow backend users to choose where they want to offer access to their service.

Private Sharing

v0.3 introduced "private" sharing mode. When provisioning a service for private sharing, zrok will not create any policies for the service, until a request for a frontend binding is created for the service (through the v0.3 zrok access command).

The v0.3 zrok API will support creating frontend instances for both identified users (where the zrok user has a provisioned environment), as well as ephemeral users (the zrok controller will create a single-use "ephemeral environment" for these frontend instances).

Backend Modes

In v0.2, the only possible backend "mode" was used for reverse proxying HTTP traffic to a local endpoint. The v0.3 zrok client will support several different backend modes, providing a number of built-in conveniences.

Web Mode

A user has a collection of files on disk. Sharing with a backend mode of "web", will create a backend that shares a file tree as if it were a local web server. This effectively allows a user to bind a web-server backend to a document root with a single CLI command.

DAV Mode

A user wants to operate a read/write repository of files accessible through either conventional WebDAV clients (through public frontend instances), or through the zrok CLI (a convenience wrapper, embedding WebDAV capabilities).

This allows users to create read/write repositories of files that can be shared with multiple users, and also allows for the creation of write-only "drop boxes" for receiving files from another user (often a tricky thing to do well and securely on the public internet).

Proxy Mode

v0.3 will retain the classic reverse proxy mode, as well. Will continue to allow a user to expose a local HTTP endpoint through zrok.

Entities (SQL)

zrok v0.3 introduced a new frontends table to allow the zrok controller to track the frontend instances that are available to any account or environment.

The following illustration shows the possibilities available.

The *.share.zrok.io frontend is a "public" frontend, available to all zrok users. Most zrok installations will want to have at least one public, global frontend for all public, internet-facing ingress traffic for private backend instances. In the underlying data store, the public frontend will have a name set to public (or some other representative name), allowing users to reference that frontend using a friendly label.

The other two "private" frontends are configured with no name label (the lack of a name label signifies that these are "private" frontends). The ephemeral environment is allocated when a zrok frontend request is made without an account on behalf of a private share.


How Tos Agent Category .Json (`website/docs/how-tos/agent/_category_.json`)

{
"label": "zrok agent",
"position": 3,
"link": {
"type": "doc",
"id": "how-tos/agent/index"
}
}


How Tos Agent Configure Http Healthcheck (`website/docs/how-tos/agent/configure-http-healthcheck.mdx`)


Configure HTTP health checks

As of v1.0.7, the zrok agent supports health checks for proxy backend shares. Health checks are not yet
implemented for other backend modes.

Run local health checks

  1. Create a share:

    bash
    zrok2 share public http://127.0.0.1:18080
    buttonless title="output"
    token:"8rvjpmeeyvwc"  frontendEndpoints:"http://8rvjpmeeyvwc.zrok.example.com:8080"
  2. Run a health check against the share token:

    bash
    zrok2 agent share http-healthcheck 8rvjpmeeyvwc GET / 200
    buttonless title="output"
    healthy

    A non-existent endpoint returns an unhealthy status:

    bash
    zrok2 agent share http-healthcheck 8rvjpmeeyvwc GET /non-existent 200
    buttonless title="output"
    unhealthy; unexpected status code; got '202', want '200'

Detect communications errors

The health check also reports low-level communication errors when the backend is unreachable. For example, create
a share pointing to an address that isn't listening:

bash
zrok2 share public http://127.1.1.1:9090
buttonless title="output"
token:"2bfvnne6kb3c"  frontendEndpoints:"http://2bfvnne6kb3c.zrok.quigley.com:8080"

Running a health check against that share returns a connection error:

bash
zrok2 agent share http-healthcheck 2bfvnne6kb3c GET / 200
buttonless title="output"
unhealthy; failed to execute request: Get "http://127.1.1.1:9090/": dial tcp 127.1.1.1:9090: connect: connection refused

Check health via the remoting API

When your agent is enrolled in remoting, use the /agent/share/http-healthcheck endpoint to check backend
connectivity remotely:

bash
curl -H "X-TOKEN: 5hLXj48Bmn11" -XPOST -H "Content-Type: application/zrok.v1+json" \
  -d '{"envZId": "MxMbUXSANU", "shareToken": "8rvjpmeeyvwc", "httpVerb": "GET", "endpoint": "/", "expectedHttpResponse": 200}' \
  http://localhost:18080/api/v2/agent/share/http-healthcheck
buttonless title="output"
{
  "healthy": true
}

A non-existent endpoint returns an error:

bash
curl -H "X-TOKEN: 5hLXj48Bmn11" -XPOST -H "Content-Type: application/zrok.v1+json" \
  -d '{"envZId": "MxMbUXSANU", "shareToken": "8rvjpmeeyvwc", "httpVerb": "GET", "endpoint": "/non-existent", "expectedHttpResponse": 200}' \
  http://localhost:18080/api/v2/agent/share/http-healthcheck
buttonless title="output"
{
  "error": "unexpected status code; got '202', want '200'"
}

How Tos Agent Enable Agent Remoting (`website/docs/how-tos/agent/enable-agent-remoting.mdx`)


Enable agent remoting

As of v1.0.5, the zrok agent and controller support secure, opt-in remote control for creating shares and
accesses through the central zrok API.

Enable agent remoting in the zrok controller

  1. Create an identity for your zrok controller to use for interacting with remote agents:

    bash
    zrok2 admin create identity agentremoting
    buttonless title="output"
    zrok identity 'agentremoting' created with ziti id 'WEfGMIx-e4'

    :::note
    The identity can be named anything; agentremoting is used here as an example.
    :::

  2. Add the identity to your controller configuration:

    yaml
    agent_controller:
      z_id:             WEfGMIx-e4
      identity_path:    /home/michael/.zrok2/identities/agentremoting.json
  3. Restart your controller. The agent remoting endpoints will become available once it's running.

Enroll an agent

Enrolling an agent in remoting requires an enabled environment.

  1. Run zrok2 agent enroll from an enabled environment:

    bash
    zrok2 agent enroll
    buttonless title="output"
    warning! proceeding will allow remote control of your zrok agent!
    
    your agent will accept remote commands from:
    
    https://api-v2.zrok.io
    
    you should only proceed if you understand the implications of this action!
    
    to proceed, type 'yes': yes
    
    agent enrolled with token 'yC9atRbCOskz'
    
    restart your zrok agent to enable remote control
  2. Restart the agent. The following message confirms remoting is active:

    buttonless title="agent log"
    [   0.001]    INFO zrok/agent.(*Agent).remoteAgent: listening for remote commands at 'yC9atRbCOskz'

Agent remoting API

:::note

  • See the zrok OpenAPI spec for complete details of
    /agent endpoints.
  • The apiEndpoint http://localhost:18080 in the examples below refers to a local development controller. The
    credentials shown are already invalid and are included for illustration only.
    :::

Create a remote share

Call the /agent/share endpoint to create a share on a remote agent:

bash
curl -H "X-TOKEN: ojF2fna5GKlt" -XPOST -H "Content-Type: application/zrok.v1+json" \
  -d '{"envZId": "qDWmgIxne4", "shareMode": "public", "backendMode": "web", "target": "/home/michael/Repos/nf/zrok"}' \
  http://localhost:18080/api/v2/agent/share | jq
buttonless title="output"
{
  "frontendEndpoints": [
    "http://51bnatug7ua3.zrok.quigley.com:8080"
  ],
  "token": "51bnatug7ua3"
}

Query the status of the remote agent

Call the /agent/status endpoint to see active shares and accesses:

bash
curl -H "X-TOKEN: ojF2fna5GKlt" -XPOST -H "Content-Type: application/zrok.v1+json" \
  -d '{"envZId": "qDWmgIxne4"}' \
  http://localhost:18080/api/v2/agent/status | jq
buttonless title="output"
{
  "accesses": null,
  "shares": [
    {
      "backendEndpoint": "/home/michael/Repos/nf/zrok",
      "backendMode": "web",
      "frontendEndpoints": [
        "http://51bnatug7ua3.zrok.quigley.com:8080"
      ],
      "shareMode": "public",
      "token": "51bnatug7ua3"
    }
  ]
}

Remove the remote share

Call /agent/unshare to remove a share, then verify with /agent/status:

bash
curl -H "X-TOKEN: ojF2fna5GKlt" -XPOST -H "Content-Type: application/zrok.v1+json" \
  -d '{"envZId": "qDWmgIxne4", "token": "51bnatug7ua3"}' \
  http://localhost:18080/api/v2/agent/unshare
bash
curl -H "X-TOKEN: ojF2fna5GKlt" -XPOST -H "Content-Type: application/zrok.v1+json" \
  -d '{"envZId": "qDWmgIxne4"}' \
  http://localhost:18080/api/v2/agent/status | jq
buttonless title="output"
{
  "accesses": null,
  "shares": null
}

Create and remove private access

The /agent/access and /agent/unaccess endpoints allow for creating and removing private access frontends
remotely.

Unenroll an agent

Run zrok2 agent unenroll to remove all remote control access from an agent in an environment:

bash
zrok2 agent unenroll
buttonless title="output"
SUCCESS: unenrolled agent from 'https://api-v2.zrok.io'
SUCCESS: removed agent-enrollment.json

:::note
Unenrolling an active agent will produce ignorable errors. Restart the agent to resume unenrolled operation.
:::


How Tos Agent Manage Shares (`website/docs/how-tos/agent/manage-shares.mdx`)


Manage shares with the agent

For a full explanation of how the agent works, see zrok agent overview.

Prerequisites

The agent must be running. If it's not already installed as a background service, start it in the foreground:

bash
zrok2 agent start

Create a public share

To share a local port publicly:

  1. Run:

    bash
    zrok2 share public 8080
    buttonless title="output"
    token:"zje5x8p0k9pi" frontendEndpoints:"https://zje5x8p0k9pi.share.zrok.io"
  2. The share appears in the agent UI and is accessible at the public share URL.

Share privately with a named token

To create a private share with a persistent token name:

  1. Start sharing with a share token name:

    bash
    zrok2 share private http://127.0.0.1:8080 --share-token "myshare"
  2. The share appears in the agent UI. To access it from another device on the same zrok2 account, run
    zrok2 access private "myshare".

Check agent status

Run zrok2 agent status to see all active shares and accesses:

bash
zrok2 agent status