The Server Management API lets you control every aspect of your Data Mammoth servers programmatically. This guide covers all available endpoints for server lifecycle management, power actions, configuration, and monitoring.
Base URL
All server endpoints are prefixed with:
https://api.datamammoth.com/v1/serversList All Servers
Retrieve a list of all servers in your account.
GET /v1/serversQuery Parameters:
| Parameter | Type | Description |
|---|---|---|
status | string | Filter by status: running, stopped, provisioning |
region | string | Filter by data center region |
tag | string | Filter by tag/label |
page | integer | Page number (default: 1) |
per_page | integer | Results per page (default: 25, max: 100) |
curl -X GET "https://api.datamammoth.com/v1/servers?status=running" \
-H "Authorization: Bearer dm_key_abc123def456"Get Server Details
Retrieve detailed information about a specific server.
GET /v1/servers/{server_id}Example:
curl -X GET "https://api.datamammoth.com/v1/servers/srv_abc123" \
-H "Authorization: Bearer dm_key_abc123def456"Response includes: Server ID, name, status, IP addresses, plan details, OS, resource allocation, tags, and creation date.
Create a Server
Provision a new server.
POST /v1/serversRequest Body:
{
"name": "web-production",
"plan": "vps-standard",
"region": "us-east",
"os": "ubuntu-24.04",
"ssh_keys": ["key_12345"],
"hostname": "web01.example.com",
"tags": ["production", "web"],
"backups": true
}Required fields: plan, region, os
Optional fields: name, ssh_keys, hostname, tags, backups
Example:
curl -X POST "https://api.datamammoth.com/v1/servers" \
-H "Authorization: Bearer dm_key_abc123def456" \
-H "Content-Type: application/json" \
-d '{
"name": "web-production",
"plan": "vps-standard",
"region": "us-east",
"os": "ubuntu-24.04"
}'Server Actions
Perform power and management actions on a server.
POST /v1/servers/{server_id}/actionsAvailable Actions:
| Action | Description |
|---|---|
start | Power on a stopped server |
stop | Graceful shutdown |
restart | Graceful reboot |
force_stop | Immediate power off |
force_restart | Immediate hard reboot |
rebuild | Reinstall the OS (destroys data) |
curl -X POST "https://api.datamammoth.com/v1/servers/srv_abc123/actions" \
-H "Authorization: Bearer dm_key_abc123def456" \
-H "Content-Type: application/json" \
-d '{"action": "restart"}'Update Server
Update server properties (name, tags, hostname).
PATCH /v1/servers/{server_id}Example:
curl -X PATCH "https://api.datamammoth.com/v1/servers/srv_abc123" \
-H "Authorization: Bearer dm_key_abc123def456" \
-H "Content-Type: application/json" \
-d '{
"name": "web-staging",
"tags": ["staging", "web"]
}'Delete a Server
Permanently delete a server and all its data.
DELETE /v1/servers/{server_id}Warning: This action is irreversible. All data on the server is permanently deleted.
curl -X DELETE "https://api.datamammoth.com/v1/servers/srv_abc123" \
-H "Authorization: Bearer dm_key_abc123def456"Server Metrics
Retrieve performance metrics for a server.
GET /v1/servers/{server_id}/metricsQuery Parameters:
| Parameter | Type | Description |
|---|---|---|
metric | string | cpu, ram, disk, network, or all |
period | string | 1h, 6h, 24h, 7d, 30d |
curl -X GET "https://api.datamammoth.com/v1/servers/srv_abc123/metrics?metric=cpu&period=24h" \
-H "Authorization: Bearer dm_key_abc123def456"Server SSH Keys
Manage SSH keys for a specific server.
# List SSH keys on a server
GET /v1/servers/{server_id}/ssh-keysAdd an SSH key
POST /v1/servers/{server_id}/ssh-keysRemove an SSH key
DELETE /v1/servers/{server_id}/ssh-keys/{key_id}Server Networking
Manage IP addresses and reverse DNS.
# List IPs
GET /v1/servers/{server_id}/ipsSet reverse DNS
PUT /v1/servers/{server_id}/ips/{ip_id}/rdnsAvailable Plans and Regions
List available plans and regions for server creation.
# List plans
GET /v1/plansList regions
GET /v1/regionsList available OS images
GET /v1/imagesWhat to Do Next
- Billing API — Manage invoices and payments.
- Webhooks — Get notified of server events.
- API Error Codes — Handle errors properly.
- API Code Examples — Python — Server management in Python.