RESTful APIs for infrastructure management, secrets, change management, and DNS services
All APIs use JSON for request/response bodies and require authentication via API key or OAuth2.
Manage VMs, Kubernetes clusters, and GPU compute resources
Secure secrets and certificate management
Enterprise change request workflows
DNS analysis and threat intelligence
Single sign-on and authentication
Infrastructure management APIs
Pass your API key in the Authorization header:
curl -X GET "https://api.infrastructure.zone/v1/vms" \ -H "Authorization: Bearer YOUR_API_KEY" \ -H "Content-Type: application/json"
For user-context requests, use OAuth2 with the /oauth/token endpoint:
# Get access token curl -X POST "https://api.afterdarksys.com/v1/oauth/token" \ -H "Content-Type: application/x-www-form-urlencoded" \ -d "grant_type=client_credentials" \ -d "client_id=YOUR_CLIENT_ID" \ -d "client_secret=YOUR_CLIENT_SECRET" # Use access token curl -X GET "https://api.infrastructure.zone/v1/vms" \ -H "Authorization: Bearer ACCESS_TOKEN"
| Method | Endpoint | Description |
|---|---|---|
| GET | /vms | List all virtual machines |
| POST | /vms | Create a new virtual machine |
| GET | /vms/{id} | Get VM details |
| DELETE | /vms/{id} | Delete a virtual machine |
| POST | /vms/{id}/start | Start a VM |
| POST | /vms/{id}/stop | Stop a VM |
| GET | /k8s/deployments | List Kubernetes deployments |
| POST | /k8s/deployments | Create a deployment |
| GET | /gpu/shapes | List available GPU shapes |
| POST | /gpu/rentals | Rent GPU compute time |
| Method | Endpoint | Description |
|---|---|---|
| GET | /secrets | List all secrets |
| POST | /secrets | Create a new secret |
| GET | /secrets/{key} | Retrieve a secret value |
| PUT | /secrets/{key} | Update a secret |
| GET | /certificates | List all certificates |
| POST | /certificates/enroll | Request a new certificate |
| POST | /certificates/{id}/renew | Renew a certificate |
| GET | /ssh-keys | List SSH keys |
| POST | /ssh-keys/generate | Generate SSH key pair |
Official SDKs are available for popular programming languages:
pip install afterdark-sdk from afterdark import Client client = Client(api_key="...")
npm install @afterdark/sdk
const { Client } = require('@afterdark/sdk');
const client = new Client({ apiKey: '...' });
go get github.com/afterdark/sdk-go
import "github.com/afterdark/sdk-go"
client := sdk.NewClient("...")