Documentation

Developer Guide

Integrate with ZopNight's REST API to manage cloud resource schedules, discover resources, track costs, and automate start/stop operations across AWS, GCP, and Azure.

How It Works

ZopNight follows a discover-schedule-execute pattern across your cloud infrastructure.

1
Connect Cloud Accounts

Provide credentials for your AWS, GCP, or Azure accounts. ZopNight supports multiple authentication methods per provider.

2
Discover Resources

ZopNight automatically discovers VMs, databases, Kubernetes clusters, serverless functions, and more across all connected accounts.

3
Create Schedules

Define cron-based schedules to automatically start and stop resources. Attach individual resources or groups for organized management.

4
Execute & Monitor

The scheduler evaluates crons every minute and executes start/stop actions. Track state history, cost savings, and get optimization recommendations.

Architecture Overview

All API requests go through a gateway that handles authentication and routes to the appropriate backend service.

Client (Your App)
    │
    ▼
┌──────────┐     JWT validation, org context injection
│  Gateway  │─────────────────────────────────────────
└──────────┘
    │
    ├──► Config        Schedules, Groups, Overrides, Cloud Accounts,
    │                  Projects, Environments, Deployments, Spaces,
    │                  AI Gateway (virtual keys, models, AI usage)
    ├──► Discoverer    Resource discovery across cloud providers
    ├──► Executor      Start/stop execution, state history
    ├──► Aggregator    Cost reports, trends, budgets
    ├──► Recommender   Optimization recommendations, smart tags,
    │                  IaC governance checks
    ├──► Billing       Your ZopNight plan, invoices, orders
    ├──► MCP Server    Model Context Protocol endpoint for AI assistants
    ├──► Deployer      Build, revision, rollback, events, loadbalancer
    └──► Provisioner   Cluster/datastore/component provisioning + auto-remediation

Key Concepts

ConceptDescription
Cloud AccountA connected AWS, GCP, Azure, Snowflake, Databricks, OpenShift or Microsoft 365 account with credentials for access
ResourceA discovered cloud resource (VM, database, cluster, etc.) that can be managed
ScheduleA set of cron-based rules that define when resources should be started or stopped
Resource GroupA logical collection of resources that can be scheduled together with execution ordering
OverrideA temporary force-on or force-off that takes precedence over schedules
ActionA start or stop operation executed against a cloud resource
RecommendationA cost optimization suggestion based on resource usage analysis
Smart TagA tag that ZopNight suggests from your tagging policies. Once accepted, it can be written to the cloud resource. See Smart Tags
BudgetA monthly spend limit on a scope, with an alert threshold as a percentage of that limit
AI GatewayA single endpoint in front of your AI providers. Developers use ZopNight virtual keys, each with its own budget and allowed models. See AI Gateway
IaC GovernanceChecks Terraform or OpenTofu plans from your CI against your policies and returns pass or fail. See IaC Governance
MCP ServerLets AI assistants query your ZopNight data over the Model Context Protocol. See MCP Server

Cloud Provider Support

ZopNight supports resource discovery and scheduling across AWS, GCP, and Azure. See the Cloud Support Matrix for the supported resource types.

You can also connect these platforms:

PlatformWhat ZopNight does
SnowflakeDiscovers warehouses, databases and other account objects. Warehouses can be suspended and resumed on a schedule.
DatabricksDiscovers clusters, pools, SQL warehouses, jobs and model serving endpoints across your workspaces.
OpenShift (ROSA)Connects through OpenShift Cluster Manager and discovers clusters and machine pools.
Microsoft 365Tracks Copilot seats and their usage. See Microsoft 365 Copilot.