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.
Getting Started
Set up authentication and make your first API call
Cloud Accounts
Connect your AWS, GCP, or Azure accounts
Schedules
Create automated start/stop schedules for resources
API Reference
Complete endpoint reference for all APIs
How It Works
ZopNight follows a discover-schedule-execute pattern across your cloud infrastructure.
Provide credentials for your AWS, GCP, or Azure accounts. ZopNight supports multiple authentication methods per provider.
ZopNight automatically discovers VMs, databases, Kubernetes clusters, serverless functions, and more across all connected accounts.
Define cron-based schedules to automatically start and stop resources. Attach individual resources or groups for organized management.
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-remediationKey Concepts
| Concept | Description |
|---|---|
| Cloud Account | A connected AWS, GCP, Azure, Snowflake, Databricks, OpenShift or Microsoft 365 account with credentials for access |
| Resource | A discovered cloud resource (VM, database, cluster, etc.) that can be managed |
| Schedule | A set of cron-based rules that define when resources should be started or stopped |
| Resource Group | A logical collection of resources that can be scheduled together with execution ordering |
| Override | A temporary force-on or force-off that takes precedence over schedules |
| Action | A start or stop operation executed against a cloud resource |
| Recommendation | A cost optimization suggestion based on resource usage analysis |
| Smart Tag | A tag that ZopNight suggests from your tagging policies. Once accepted, it can be written to the cloud resource. See Smart Tags |
| Budget | A monthly spend limit on a scope, with an alert threshold as a percentage of that limit |
| AI Gateway | A 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 Governance | Checks Terraform or OpenTofu plans from your CI against your policies and returns pass or fail. See IaC Governance |
| MCP Server | Lets 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:
| Platform | What ZopNight does |
|---|---|
| Snowflake | Discovers warehouses, databases and other account objects. Warehouses can be suspended and resumed on a schedule. |
| Databricks | Discovers 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 365 | Tracks Copilot seats and their usage. See Microsoft 365 Copilot. |